ss-component-new 1.2.329 → 1.2.331

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 (43) hide show
  1. package/dist/{array-D0ZQUr9w.cjs → array-Bi-wunyk.cjs} +1 -1
  2. package/dist/{array-CBSVDPzk.js → array-CVIR-i--.js} +2 -2
  3. package/dist/{index-BxAxjWvZ.js → index-BAnu2IcW.js} +1 -1
  4. package/dist/{index-Cv3Hfc18.js → index-BFxYIpIU.js} +1 -1
  5. package/dist/{index-BR5tTYhM.js → index-BGB8AN7S.js} +1 -1
  6. package/dist/{index-BTDtL2tu.cjs → index-BVMFNtUY.cjs} +2 -2
  7. package/dist/{index-NUbT-9nm.cjs → index-B_SWTmBD.cjs} +1 -1
  8. package/dist/{index-Ac9B2FCN.cjs → index-BhpB-M-v.cjs} +1 -1
  9. package/dist/{index-CCfSP781.js → index-Bp1PEp0W.js} +1 -1
  10. package/dist/{index-Bz0y9ory.cjs → index-BxQs7JCB.cjs} +1 -1
  11. package/dist/{index-D_Rwo6JN.js → index-C2_KHquo.js} +2 -2
  12. package/dist/{index-DtfX1Mvl.js → index-CDseWBxW.js} +2 -2
  13. package/dist/{index-Cvh-8ZQJ.js → index-CF2oTbnv.js} +1 -1
  14. package/dist/{index-Br5TITPE.cjs → index-CQ5cuVUq.cjs} +1 -1
  15. package/dist/{index-B-D5SEzt.js → index-CY36YclZ.js} +4 -4
  16. package/dist/{index-DJu4bXem.cjs → index-CiO2uT4E.cjs} +11 -11
  17. package/dist/{index-3p7jEUNc.cjs → index-CjrO5PEa.cjs} +1 -1
  18. package/dist/{index-C3AUMHRp.cjs → index-CkO99t26.cjs} +1 -1
  19. package/dist/{index-D2VsvnsM.cjs → index-CoaLtkUJ.cjs} +1 -1
  20. package/dist/{index-B7hotjlk.js → index-D3oj5RSK.js} +1 -1
  21. package/dist/{index-6xrfXany.cjs → index-DPeOjfU1.cjs} +1 -1
  22. package/dist/{index-BCJO5f8i.js → index-DRvE5S23.js} +2 -2
  23. package/dist/{index-CaC7PDrr.js → index-DSt_Eqwk.js} +9 -8
  24. package/dist/{index-CgWz_m0_.cjs → index-Df5Gg8qa.cjs} +1 -1
  25. package/dist/{index-CWwVtgF4.js → index-DkIWU9Bu.js} +1509 -1497
  26. package/dist/{index-Cbs2Wvfj.cjs → index-DmDnw4T-.cjs} +1 -1
  27. package/dist/{index-CngqI-Wd.js → index-Dw0CPCgX.js} +1 -1
  28. package/dist/index-UbLqf_y6.cjs +1 -0
  29. package/dist/{index-CTCGSxKP.js → index-Z8iuWbfd.js} +1 -1
  30. package/dist/{index-DZEvGXJh.cjs → index-k04UdLA7.cjs} +1 -1
  31. package/dist/{index-Co_uWUdj.js → index-u30t7l7e.js} +1 -1
  32. package/dist/{index-DQa3JjyT.cjs → index-uN57qZre.cjs} +1 -1
  33. package/dist/{main-Bx-svOeG.cjs → main-BDV5VAB6.cjs} +1 -1
  34. package/dist/{main-DA3ZSH6T.js → main-BEgGvauC.js} +2 -2
  35. package/dist/ss-component.cjs +1 -1
  36. package/dist/ss-component.css +1 -1
  37. package/dist/ss-component.js +12 -12
  38. package/dist/ss-component2.cjs +1 -1
  39. package/dist/ss-component2.js +10 -10
  40. package/dist/{threeModel-C95pKcCr.cjs → threeModel-CsoaXy4U.cjs} +1 -1
  41. package/dist/{threeModel-BMCGO-l-.js → threeModel-o-U3qE_Y.js} +1 -1
  42. package/package.json +1 -1
  43. package/dist/index-CfChSLmY.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";const ba=require("./index-Ac9B2FCN.cjs"),e=require("vue"),xe=require("./index-pSTYzLRc.cjs"),Bt=require("./index-DJu4bXem.cjs"),Ne=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BDXu7acs.cjs"),Xt=require("./index-DU4iimmS.cjs"),Co=require("./threeViewerHost-e0FA2tJj.cjs"),V=require("./index-Bc85VROV.cjs");require("./index.vue_vue_type_style_index_1_lang-OiQttjIF.cjs");const Rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Do=require("./isString-DDsphIfV.cjs"),_o=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Eo=require("./index-DQa3JjyT.cjs"),ur=require("./index-BVaHwt5f.cjs"),Fl=require("./index-CRhbl-Xs.cjs"),ua=require("./index-CkUnZ2se.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),ya=require("./index-9hspBVrQ.cjs"),Ll=require("./menuIndex-bwSbtzjl.cjs");var $l=/\s/;function jl(a){for(var l=a.length;l--&&$l.test(a.charAt(l)););return l}var Ul=/^\s+/;function Kl(a){return a&&a.slice(0,jl(a)+1).replace(Ul,"")}var So=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function To(a){if(typeof a=="number")return a;if(xe.isSymbol(a))return So;if(xe.isObject(a)){var l=typeof a.valueOf=="function"?a.valueOf():a;a=xe.isObject(l)?l+"":l}if(typeof a!="string")return a===0?a:+a;a=Kl(a);var s=Hl.test(a);return s||ql.test(a)?Gl(a.slice(2),s?2:8):Wl.test(a)?So:+a}var Qa=function(){return xe.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function dr(a,l,s){var r,d,c,x,v,f,C=0,w=!1,F=!1,R=!0;if(typeof a!="function")throw new TypeError(Xl);l=To(l)||0,xe.isObject(s)&&(w=!!s.leading,F="maxWait"in s,c=F?Yl(To(s.maxWait)||0,l):c,R="trailing"in s?!!s.trailing:R);function H(T){var h=r,ce=d;return r=d=void 0,C=T,x=a.apply(ce,h),x}function M(T){return C=T,v=setTimeout(O,l),w?H(T):x}function ve(T){var h=T-f,ce=T-C,Ae=l-h;return F?Jl(Ae,c-ce):Ae}function K(T){var h=T-f,ce=T-C;return f===void 0||h>=l||h<0||F&&ce>=c}function O(){var T=Qa();if(K(T))return G(T);v=setTimeout(O,ve(T))}function G(T){return v=void 0,R&&r?H(T):(r=d=void 0,x)}function b(){v!==void 0&&clearTimeout(v),C=0,r=f=d=v=void 0}function _(){return v===void 0?x:G(Qa())}function y(){var T=Qa(),h=K(T);if(r=arguments,d=this,f=T,h){if(v===void 0)return M(f);if(F)return clearTimeout(v),v=setTimeout(O,l),H(f)}return v===void 0&&(v=setTimeout(O,l)),x}return y.cancel=b,y.flush=_,y}var Zl="[object Boolean]";function pr(a){return a===!0||a===!1||xe.isObjectLike(a)&&xe.baseGetTag(a)==Zl}function Ql(a){return a===void 0}const ei={class:"statistics-cards-container"},ti={class:"statistics-label"},ni={class:"statistics-value"},ai=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(a){return(l,s)=>(e.openBlock(),e.createElementBlock("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:d},[e.createElementVNode("div",ti,e.toDisplayString(r==null?void 0:r.label),1),e.createElementVNode("div",ni,e.toDisplayString((r==null?void 0:r.value)??0),1)]))),128))]))}}),oi=Rt._export_sfc(ai,[["__scopeId","data-v-d399b1f3"]]),ri={class:"form-content"},li={title:"选择标签"},ii={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},si={class:"col-operate-wrap"},ci={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ui={__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:l}){const s=()=>{x.value=!1,v.value=!1,f.value=[]},r=a;e.computed(()=>{var $;const B=($=A.value)==null?void 0:$.split("/");return(B==null?void 0:B.some(W=>(W==null?void 0:W.includes("updateLoading"))||(W==null?void 0:W.includes("loading"))))?!1:P.value==="view"});const d=l,c=e.ref([]),x=e.ref(!1),v=e.ref(!1),f=e.ref([]),{getFileExtension:C}=Co.useThreeSystem(),w=e.ref(),F=e.ref(!1),R=e.ref(!1),H=Ne.useUnit(xe.pinia),{chooseTitle:M}=xe.storeToRefs(H),ve=e.ref([]),K=e.ref(),O=e.ref(!1),G=e.ref([]),b=ba.useFormToTableComp(xe.pinia),_=ba.useFormComp(xe.pinia),y=e.ref(!1),T=e.ref(),h=V.useLoginState(xe.pinia),{loginUserInfo:ce}=xe.storeToRefs(h),Ae=e.ref(),at=e.ref(!0),we=V.useModelComp(xe.pinia),{tableViewContents:Pe,itemData:Le,isEdit:P,routeToChildPath:re,lockingPage:ne}=xe.storeToRefs(we),pe=e.ref(null),He=e.ref(!1),ot=e.ref(!1),X=V.useMenuState(),{activeMenuPath:A}=xe.storeToRefs(X),te=Ne.useOriginalState(xe.pinia),{originalPath:ye}=xe.storeToRefs(te),ue=e.ref([]),De=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Qe=async B=>{ot.value=B,await le("disabled",null,B,!0)},ae=async B=>{await le("operable",null,B,!0)};e.watch(()=>A.value,async()=>{c.value=[],f.value=[]},{deep:!0,immediate:!0});const _e=()=>{e.nextTick(()=>{Ie()})},I=B=>{var ee;c.value=(ee=c.value)==null?void 0:ee.map($=>({...$,isFormColHidden:!(B!=null&&B.includes($.label))}))};e.onUnmounted(()=>{pe.value=null});const Xe=B=>{d("clickTrigger",B)},Ye=async B=>{var ee,$,W,Se,ie,q;if(B===""){let Z="";(ee=c.value)==null||ee.forEach(be=>{be!=null&&be.isMain&&(Z=be==null?void 0:be.value)});let de=await Ne.getItemData(re.value,sessionStorage.getItem("systemKey"),"");Z=((q=(ie=(Se=(W=($=de==null?void 0:de[0])==null?void 0:$.compData)==null?void 0:W.find(be=>(be==null?void 0:be.key)==="mainRouters"))==null?void 0:Se.contents)==null?void 0:ie[0])==null?void 0:q.routerContent)+ye.value+Z;let Ce=await Ne.getItemData(Z,sessionStorage.getItem("systemKey"),"");O.value=!0,G.value=Ce==null?void 0:Ce.filter(be=>(be==null?void 0:be.comp)!=="methodButton"),d("routeUrl",G.value)}},Ie=()=>{var ee;const B=(ee=pe.value)==null?void 0:ee.$el;B&&Ne.Sortable.create(B,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:$=>{const{oldIndex:W,newIndex:Se}=$;if(W===Se)return;const ie=c.value.splice(W,1)[0];c.value.splice(Se,0,ie)}})},le=async(B,ee,$,W=!1)=>{try{we.setRefreshCurStructure(!1)}catch{xe.ElMessage.error("编辑处理失败")}},Q=async(B,ee)=>{await le()},se=async(B,ee)=>{B&&await le()},Ee=async(B,ee,$)=>{await le(ee,$,B,!1)},qe=(B,ee)=>{Ae.value===ee?at.value=!1:at.value=!0,Ae.value=ee==null?void 0:ee.changeProp},dt=async B=>{var $,W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt;let ee=[];if(($=B==null?void 0:B.toString())!=null&&$.includes(".urdf")){if(B.includes(",")){xe.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:B,extension:C(B)}],v.value=!0,x.value=!0;return}if((W=B==null?void 0:B.toString())!=null&&W.includes(".stl")||(Se=B==null?void 0:B.toString())!=null&&Se.includes(".STL")||(ie=B==null?void 0:B.toString())!=null&&ie.includes(".obj")||(q=B==null?void 0:B.toString())!=null&&q.includes(".mtl")){const nt=((Z=B==null?void 0:B.toString())==null?void 0:Z.split(",")).map(Be=>({url:Be,extension:C(Be)}));f.value=nt,v.value=!1,x.value=!0;return}if((de=B==null?void 0:B.toString())!=null&&de.includes(".stl")||(me=B==null?void 0:B.toString())!=null&&me.includes(".STL")||(Ce=B==null?void 0:B.toString())!=null&&Ce.includes(".obj")||(be=B==null?void 0:B.toString())!=null&&be.includes(".mtl")){let $e,nt=[],Be={};if(Array.isArray(B)?$e=B:$e=B==null?void 0:B.split(","),$e==null||$e.forEach(mt=>{mt.includes(".mtl")?nt.push(mt):Be.blob=Be.blob?Be.blob+","+mt:mt}),(nt==null?void 0:nt.length)>0&&(Be.mtlBlobs=nt),(Me=(j=Object.values(Be))==null?void 0:j[0])!=null&&Me.includes("http:"))ee.push(Be);else{const mt=new Blob([Be.blob],{type:"application/octet-stream;charset=UTF-8"});let et=URL.createObjectURL(mt),Oe="";(ge=B==null?void 0:B.split("/"))==null||ge.forEach((it,gt)=>{var Je;gt===((Je=B==null?void 0:B.split("/"))==null?void 0:Je.length)-1&&(Oe=it)}),(Ue=Be.blob)!=null&&Ue.includes(".stl")&&(Oe=(Oe==null?void 0:Oe.replaceAll(">",""))+".urdf"),K.value=[{name:Oe,blobUrl:et}],R.value=!0}}else{const $e=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),nt=await xe.axios.get(B,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{$e.close()}),Be=new Blob([nt.data],{type:"application/octet-stream;charset=UTF-8"});let mt=URL.createObjectURL(Be),et="";(rt=B==null?void 0:B.split("/"))==null||rt.forEach((Oe,it)=>{var gt;it===((gt=B==null?void 0:B.split("/"))==null?void 0:gt.length)-1&&(et=Oe)}),K.value=[{name:et,blobUrl:mt}],R.value=!0}(ee==null?void 0:ee.length)>0&&_.setBlobUrls(ee)},m=()=>{R.value=!1},S=B=>{var ie,q,Z,de;const ee=(q=(ie=V.cloneDeep(r.itemData))==null?void 0:ie.find(me=>(me==null?void 0:me.key)==="formContent"))==null?void 0:q.contents,$=V.cloneDeep(B.content);let W={};$&&((Z=Object.values($))==null?void 0:Z.length)>0&&((de=Object.values($))==null||de.forEach((me,Ce)=>{W[ee[Ce].key]=me}));const Se={content:W,index:r==null?void 0:r.index,buttonName:B==null?void 0:B.buttonName};d("change",Se)},U=e.computed(()=>"http://222.92.178.198:62001"),J=async B=>{var j,Me,ge,Ue,rt,$e,nt,Be,mt,et,Oe,it,gt,Je,je,It;if(!B)return;(Me=(j=r==null?void 0:r.itemData)==null?void 0:j.find(Te=>(Te==null?void 0:Te.key)==="parentFormPath"))==null||Me.contents;let ee=Pe.value;(ee==null?void 0:ee.length)>0&&(ee=ee==null?void 0:ee.map(Te=>{var Fe,Ze,E,fe;let Ge=(Fe=Te==null?void 0:Te.key)==null?void 0:Fe.split("/");return(r==null?void 0:r.compName)===(Ge==null?void 0:Ge[0])&&(Ze=c.value)!=null&&Ze.find(Ke=>(Ke==null?void 0:Ke.prop)===(Ge==null?void 0:Ge[1]))&&(Te.value=(fe=(E=c.value)==null?void 0:E.find(Ke=>(Ke==null?void 0:Ke.prop)===(Ge==null?void 0:Ge[1])))==null?void 0:fe.value),Te}),we.setTableViewContents(ee));const $=V.cloneDeep(r.itemData);let W=$==null?void 0:$.map(Te=>{var Ge;return(Te==null?void 0:Te.key)==="formContent"&&((Ge=Te.contents)==null||Ge.map((Fe,Ze)=>{var E,fe,Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt,vt,Mt,Lt,Ut,Wt,Jt;return Fe.type=(fe=(E=c.value)==null?void 0:E.find(Pt=>(Pt==null?void 0:Pt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:fe.type,Fe.options=Fe!=null&&Fe.options?Fe.options:((ut=(he=(Ke=Fe==null?void 0:Fe.key)==null?void 0:Ke.split("$"))==null?void 0:he[1])==null?void 0:ut.length)>0?(ct=(pt=ba.formGetOptions((xt=(st=Fe==null?void 0:Fe.key)==null?void 0:st.split("$"))==null?void 0:xt[1]))==null?void 0:pt.split(","))==null?void 0:ct.map(Pt=>({label:Pt,value:Pt})):[],(ft=Fe==null?void 0:Fe.key)!=null&&ft.includes("$")&&(Fe.key=(Tt=(wt=Fe==null?void 0:Fe.key)==null?void 0:wt.split("$"))==null?void 0:Tt[0]),Fe.signature=(vt=(jt=c.value)==null?void 0:jt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:vt.signature,Fe.isLoginUser=(Lt=(Mt=c.value)==null?void 0:Mt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Lt.isLoginUser,Fe.value=(Ut=Object.values(B))==null?void 0:Ut[Ze],Fe.isFormColHidden=(Jt=(Wt=c.value)==null?void 0:Wt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Jt.isFormColHidden,Fe})),Te}),Se=c.value,ie=(Ue=(ge=V.cloneDeep(W))==null?void 0:ge.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:Ue.contents;if(Se=Se==null?void 0:Se.map(Te=>{var Ge;return Te.value=(Ge=ie==null?void 0:ie.find((Fe,Ze)=>((Fe==null?void 0:Fe.id)??Ze)===(Te==null?void 0:Te.id)))==null?void 0:Ge.value,Te}),!at.value){d("contentChange",{contents:W,index:r.index});return}let q="",Z=(nt=($e=(rt=V.cloneDeep(W))==null?void 0:rt.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:$e.contents)==null?void 0:nt.find((Te,Ge)=>{var Fe,Ze,E;return(Te==null?void 0:Te.label)===Ae.value||Ge.toString()===((E=(Ze=(Fe=Ae.value)==null?void 0:Fe.split("t"))==null?void 0:Ze[1])==null?void 0:E.toString())}),de=(Be=Z==null?void 0:Z.optionUrl)==null?void 0:Be.menuSelect,me=!0;if((Oe=(et=(mt=V.cloneDeep(W))==null?void 0:mt.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:et.contents)==null||Oe.forEach(Te=>{var Ge,Fe,Ze,E,fe,Ke;me&&((Ze=(Fe=(Ge=Te==null?void 0:Te.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Fe[1])!=null&&Ze.includes("["))&&(q=(fe=(E=Te==null?void 0:Te.optionUrl)==null?void 0:E.groupSelect)==null?void 0:fe[1],JSON.stringify(de)===JSON.stringify((Ke=Te==null?void 0:Te.optionUrl)==null?void 0:Ke.menuSelect)&&(me=!1))}),(it=Z==null?void 0:Z.optionUrl)!=null&&it.menuSelect&&at.value){let Te=await ba.getSelectRow(Z),Ge,Fe=(gt=Z==null?void 0:Z.optionUrl)==null?void 0:gt.menuSelect;if(Te==null||Te.forEach(Ze=>{var E,fe,Ke,he,ut,st,xt,pt,ct,ft;q===((fe=(E=Z==null?void 0:Z.optionUrl)==null?void 0:E.groupSelect)==null?void 0:fe[1])&&((ut=(he=(Ke=Z==null?void 0:Z.optionUrl)==null?void 0:Ke.groupSelect)==null?void 0:he[1])!=null&&ut.includes("["))&&((ft=V.cloneDeep(Ze))==null?void 0:ft[(ct=(pt=(xt=(st=Z==null?void 0:Z.optionUrl)==null?void 0:st.groupSelect)==null?void 0:xt[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(Z==null?void 0:Z.value)&&(Ge=Ze)}),Ge){let Ze=V.cloneDeep(Se);Ze=Ze==null?void 0:Ze.map(fe=>{var Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt;return(Ge!=null&&Ge[fe==null?void 0:fe.label]||Ge!=null&&Ge[(st=(ut=(he=(Ke=fe==null?void 0:fe.optionUrl)==null?void 0:Ke.groupSelect)==null?void 0:he[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])&&((ct=(pt=(xt=fe==null?void 0:fe.optionUrl)==null?void 0:xt.groupSelect)==null?void 0:pt[1])!=null&&ct.includes("["))&&Fe!=null&&Fe.every(vt=>{var Mt,Lt;return(Lt=(Mt=fe==null?void 0:fe.optionUrl)==null?void 0:Mt.menuSelect)==null?void 0:Lt.includes(vt)})&&(fe.value=(Ge==null?void 0:Ge[fe==null?void 0:fe.label])||(Ge==null?void 0:Ge[(jt=(Tt=(wt=(ft=fe==null?void 0:fe.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:wt[1])==null?void 0:Tt.replaceAll("[",""))==null?void 0:jt.replaceAll("]","")]),Array.isArray(fe.value)&&fe.value.every(vt=>(vt==null?void 0:vt.url)&&(vt==null?void 0:vt.name))&&(fe.type="Upload")),fe}),Ze=Ze==null?void 0:Ze.map(fe=>{var Ke,he,ut;return(Ke=fe==null?void 0:fe.optionUrl)!=null&&Ke.oldMenuSelect&&(fe.optionUrl.menuSelect=(ut=(he=V.cloneDeep(fe))==null?void 0:he.optionUrl)==null?void 0:ut.oldMenuSelect),fe}),c.value=V.cloneDeep(Ze);let E=V.cloneDeep(Ze);E=E==null?void 0:E.map(fe=>{var Ke,he,ut,st,xt,pt;return(he=(Ke=fe==null?void 0:fe.optionUrl)==null?void 0:Ke.menuSelect)!=null&&he.some(ct=>ct==null?void 0:ct.includes("["))&&(fe.optionUrl.oldMenuSelect=(st=(ut=V.cloneDeep(fe))==null?void 0:ut.optionUrl)==null?void 0:st.menuSelect,fe.optionUrl.menuSelect=(pt=(xt=fe==null?void 0:fe.optionUrl)==null?void 0:xt.menuSelect)==null?void 0:pt.map(ct=>{var ft,wt,Tt,jt;if(ct!=null&&ct.includes("[")){let vt=(wt=(ft=ct==null?void 0:ct.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:wt[1];ct=(jt=(Tt=V.cloneDeep(Ze))==null?void 0:Tt.find(Mt=>(Mt==null?void 0:Mt.label)===vt))==null?void 0:jt.value}return ct})),fe}),c.value=E}else c.value=Se;W=W==null?void 0:W.map(Ze=>{var E;return(Ze==null?void 0:Ze.key)==="formContent"&&(Ze.contents=(E=Ze.contents)==null?void 0:E.map(fe=>{var Ke,he,ut,st;return fe.value=((he=(Ke=c.value)==null?void 0:Ke.find(xt=>(xt==null?void 0:xt.label)===(fe==null?void 0:fe.key)))==null?void 0:he.value)??(fe==null?void 0:fe.value),fe.type=((st=(ut=c.value)==null?void 0:ut.find(xt=>(xt==null?void 0:xt.prop)===(fe==null?void 0:fe.key)))==null?void 0:st.type)??(fe==null?void 0:fe.type),fe})),Ze})}at.value=!1,d("contentChange",{contents:W,index:r.index});let Ce=[],be=[];if((je=V.cloneDeep((Je=W==null?void 0:W.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:Je.contents))==null||je.forEach(Te=>{var Ge;Array.isArray(Te==null?void 0:Te.value)&&((Ge=Te==null?void 0:Te.value)!=null&&Ge.find(Fe=>{var Ze;return(Ze=Fe==null?void 0:Fe.url)==null?void 0:Ze.includes(".obj")}))&&(be=Te==null?void 0:Te.value)}),(be==null?void 0:be.length)>0){const Te=(It=V.cloneDeep(be))==null?void 0:It.filter(Ge=>{var Fe;return(Fe=Ge==null?void 0:Ge.url)==null?void 0:Fe.includes(".obj")});Te==null||Te.forEach(Ge=>{var Ze,E,fe,Ke;const Fe=(Ze=be==null?void 0:be.filter(he=>{var ut;return(he==null?void 0:he.name)===(Ge==null?void 0:Ge.name)&&((ut=he==null?void 0:he.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:Ze.map(he=>he==null?void 0:he.url);Ce.push({objUrl:Ge==null?void 0:Ge.url,mtlUrls:((E=be==null?void 0:be.filter(he=>{var ut;return(he==null?void 0:he.name)===(Ge==null?void 0:Ge.name)&&((ut=he==null?void 0:he.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:E.length)===1?(Ke=(fe=be==null?void 0:be.filter(he=>{var ut;return(he==null?void 0:he.name)===(Ge==null?void 0:Ge.name)&&((ut=he==null?void 0:he.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:fe[0])==null?void 0:Ke.url:Fe})}),_.setObjUrl(Ce)}},D=B=>{if(!B)return;const ee=[];let $="";for(let W of B)(W.includes("[")||$.includes("["))&&($+=W.trim(),V.cloneDeep($).split("【").length-1===V.cloneDeep($).split("】").length-1&&V.cloneDeep($).split("[").length-1===V.cloneDeep($).split("]").length-1&&(ee.push($.replace(/\/\*[\s\S]*?\*\//g,"")),$=""));return ee},oe=(B,ee,$)=>{let W="";const Se=ee==null?void 0:ee.map(ie=>{var q;return(q=ie==null?void 0:ie.value)==null?void 0:q.pageData});return Se==null||Se.forEach(ie=>{var q;(ie==null?void 0:ie.name)===(B==null?void 0:B[0])&&((q=ie==null?void 0:ie.compData)==null||q.forEach(Z=>{var de;(Z==null?void 0:Z.key)==="formContent"&&((de=Z==null?void 0:Z.contents)==null||de.forEach(me=>{var Ce;(me==null?void 0:me.prop)===(B==null?void 0:B[1])&&(W=(me==null?void 0:me.value)===""?Ne.judgeContents((Ce=V.cloneDeep(me))==null?void 0:Ce.optionUrl,$):me==null?void 0:me.value)}))}))}),W},Ve=(B,ee,$,W)=>{var Z,de;let Se="",ie="";(Z=V.cloneDeep(ee))==null||Z.forEach((me,Ce)=>{me!=null&&me.includes("[")?ie=ie+ye.value+B[Ce]:ie=ie===""?ie+me:ie+"/"+me});let q=(de=W[ie])==null?void 0:de.map(me=>{var Ce;return(Ce=me==null?void 0:me.value)==null?void 0:Ce.pageData});return q==null||q.forEach(me=>{var Ce;(me==null?void 0:me.name)===($==null?void 0:$[0])&&((Ce=me==null?void 0:me.compData)==null||Ce.forEach(be=>{var j;(be==null?void 0:be.key)==="formContent"&&((j=be==null?void 0:be.contents)==null||j.forEach(Me=>{(Me==null?void 0:Me.prop)===($==null?void 0:$[1])&&(Se=Me==null?void 0:Me.value)}))}))}),Se};return e.watch(()=>r.itemData,async()=>{var q,Z,de,me,Ce,be,j,Me,ge,Ue,rt,$e,nt,Be,mt,et,Oe,it,gt;const B=(q=r.itemData)==null?void 0:q.find(Je=>(Je==null?void 0:Je.key)==="formContent"),ee=(Z=V.cloneDeep(r.itemData))==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="formButton"),$=(de=V.cloneDeep(r.itemData))==null?void 0:de.find(Je=>(Je==null?void 0:Je.key)==="formFlex"),W=(me=V.cloneDeep(r.itemData))==null?void 0:me.find(Je=>(Je==null?void 0:Je.key)==="formWrap"),Se=(Ce=V.cloneDeep(r.itemData))==null?void 0:Ce.find(Je=>(Je==null?void 0:Je.key)==="enableWrap");if((W==null?void 0:W.contents)==="纵向"?F.value=!1:F.value=!0,y.value=(Se==null?void 0:Se.contents)===void 0?!1:Se==null?void 0:Se.contents,T.value=typeof($==null?void 0:$.contents)!="boolean"?!(!($!=null&&$.contents)===""||((be=$==null?void 0:$.contents)==null?void 0:be.toUpperCase())==="VERTICAL"):$==null?void 0:$.contents,((j=B==null?void 0:B.contents)==null?void 0:j.length)>0&&Array.isArray(B==null?void 0:B.contents)){let Je=r.allMapContents;const je=(ge=(Me=V.cloneDeep(B))==null?void 0:Me.contents)==null?void 0:ge.map((E,fe)=>{var vt,Mt,Lt,Ut,Wt,Jt,Pt,En,zn,gn,Fn,yn,Rn,Pn,Ln,$n,jn,Sn,hn,un,bn,vn,nn,pn,Un,Tn,Bn,kn,Kn,Wn,In,Hn,qn;let Ke=(E==null?void 0:E.label)??(E==null?void 0:E.key)??"",he=(E==null?void 0:E.type)??"",ut=(E==null?void 0:E.options)??[];if((vt=E==null?void 0:E.key)!=null&&vt.includes("$")&&(Ke=(Mt=V.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:Mt[0],((Ut=(Lt=V.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:Lt[1])==null?void 0:Ut.length)>0)){const[_t,Yt]=(Jt=(Wt=V.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:Wt[1])==null?void 0:Jt.split(/[()]/);he=((Pt=Ne.FormType.find(yt=>(yt==null?void 0:yt.key)===_t))==null?void 0:Pt.value)??"",((En=Yt==null?void 0:Yt.split(","))==null?void 0:En.length)>0&&(ut=(zn=Yt==null?void 0:Yt.split(","))==null?void 0:zn.map(yt=>({label:yt,value:yt})))}let st=[];E!=null&&E.contents&&!Array.isArray(E==null?void 0:E.contents)&&(st=(Fn=(gn=E==null?void 0:E.contents)==null?void 0:gn.split(","))==null?void 0:Fn.map(_t=>({label:_t,value:_t}))),((yn=E==null?void 0:E.optionUrl)==null?void 0:yn.selectRelateType)==="自定义绑定"&&(st=(Pn=(Rn=E==null?void 0:E.optionUrl)==null?void 0:Rn.defaultSelect)==null?void 0:Pn.map(_t=>({label:_t,value:_t})));let xt=!1,pt=(E==null?void 0:E.isFormColHidden)??!1,ct=Ne.judgeContents((Ln=V.cloneDeep(E))==null?void 0:Ln.optionUrl,Je),ft=ct!==void 0&&ct!==""?ct:E!=null&&E.originalContent&&(E==null?void 0:E.originalContent)!==""?E.originalContent:E!=null&&E.value?E.value:(ut==null?void 0:ut.length)>0?($n=ut==null?void 0:ut[0])==null?void 0:$n.value:(E==null?void 0:E.value)??"",wt=!1,Tt=ct!==void 0||he===""?"Input":he;if((Array.isArray(ct)&&(ct!=null&&ct.every(_t=>(_t==null?void 0:_t.name)&&(_t==null?void 0:_t.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(_t=>(_t==null?void 0:_t.name)&&(_t==null?void 0:_t.url))))&&(Tt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||E!=null&&E.isLoginUser)xt=!0,ft=((jn=ce.value)==null?void 0:jn.姓名)||((Sn=ce.value)==null?void 0:Sn.account)||((hn=ce.value)==null?void 0:hn.账号)||((un=ce.value)==null?void 0:un.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||E!=null&&E.signature||E!=null&&E.isShow)if(wt=!0,(E==null?void 0:E.isShow)==="originalSignature")Tt="image",ft=U.value+"/"+((bn=ce.value)==null?void 0:bn.signature);else{let _t=[...new Set(D(E.isShow))].map(bt=>{var Dt,Ct,zt,Vt;return{key:(Vt=(zt=(Ct=(Dt=bt==null?void 0:bt.split("["))==null?void 0:Dt[1])==null?void 0:Ct.split("]"))==null?void 0:zt[0])==null?void 0:Vt.split(":"),value:""}});(vn=Le.value)==null||vn.forEach(bt=>{_t==null||_t.forEach((Kt,Dt)=>{var zt;let Ct=Kt==null?void 0:Kt.key;(bt==null?void 0:bt.name)===(Ct==null?void 0:Ct[0].replaceAll("'",""))&&((zt=bt==null?void 0:bt.compData)==null||zt.forEach(Vt=>{var Ft;(Vt==null?void 0:Vt.key)==="formContent"&&((Ft=Vt==null?void 0:Vt.contents)==null||Ft.forEach(Ht=>{(Ht==null?void 0:Ht.prop)===(Ct==null?void 0:Ct[1].replaceAll("'",""))&&(_t[Dt].value=Ht==null?void 0:Ht.value)}))}))})});let Yt=_t==null?void 0:_t.map(bt=>{var Kt;return bt.key="["+((Kt=bt.key)==null?void 0:Kt.join(":"))+"]",bt}),yt=E==null?void 0:E.isShow;Yt==null||Yt.forEach(bt=>{bt!=null&&bt.value?yt=yt.replaceAll(bt==null?void 0:bt.key,"'"+(bt==null?void 0:bt.value)+"'"):yt=yt.replaceAll(bt==null?void 0:bt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((nn=yt==null?void 0:yt.split("==="))==null?void 0:nn[0])+"==='"+((pn=yt==null?void 0:yt.split("==="))==null?void 0:pn[1])+"'":yt=((Un=yt==null?void 0:yt.split("="))==null?void 0:Un[0])+"='"+((Tn=yt==null?void 0:yt.split("="))==null?void 0:Tn[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(pt=!1,Tt="image",ft=U.value+"/"+((Bn=ce.value)==null?void 0:Bn.signature)):ft=""}return Array.isArray(ft)&&ft.every(_t=>(_t==null?void 0:_t.url)&&(_t==null?void 0:_t.name))&&(E.type="Upload"),E!=null&&E.isMainUrl&&(Tt="Url"),{label:Ke??"",name:"t"+fe,prop:V.cloneDeep(E==null?void 0:E.key),type:Tt,value:E!=null&&E.isSync?((Kn=(kn=M.value)==null?void 0:kn[0])==null?void 0:Kn.value)??((qn=(Wn=A==null?void 0:A.value)==null?void 0:Wn.split("/"))==null?void 0:qn[((Hn=(In=A==null?void 0:A.value)==null?void 0:In.split("/"))==null?void 0:Hn.length)-1]):E!=null&&E.isNewDate&&ft===""?new Date:ft,id:(E==null?void 0:E.id)??fe,contents:(st==null?void 0:st.length)>0?st:ut??[],width:(E==null?void 0:E.width)??1,isLoginUser:xt,config:E==null?void 0:E.config,optionUrl:(E==null?void 0:E.optionUrl)??E,isFormColHidden:pt,signature:wt,isMain:E==null?void 0:E.isMain,isMainUrl:E==null?void 0:E.isMainUrl,operable:(E==null?void 0:E.operable)??!1,disabled:(E==null?void 0:E.disabled)??!1,isSync:E==null?void 0:E.isSync}}),It=je==null?void 0:je.map(E=>E==null?void 0:E.value);let Te="";It==null||It.forEach(E=>{E!==""&&E!==void 0&&(Te=Te===""?E:Te+"/"+E)}),b.setSelectArray(It),b.setSelectString(Te);let Ge=(Ue=V.cloneDeep(je))==null?void 0:Ue.map(E=>(E!=null&&E.value&&Ne.IsJson(E==null?void 0:E.value)&&Array.isArray(JSON.parse(E==null?void 0:E.value))&&(E.value=JSON.parse(E.value)),E));Ge=Ge==null?void 0:Ge.map(E=>{var fe,Ke,he,ut,st,xt,pt,ct;if((Ke=(fe=E==null?void 0:E.optionUrl)==null?void 0:fe.menuSelect)!=null&&Ke.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";E.optionUrl.oldMenuSelect=(ut=(he=V.cloneDeep(E))==null?void 0:he.optionUrl)==null?void 0:ut.menuSelect,E.optionUrl.menuSelect=(xt=(st=E==null?void 0:E.optionUrl)==null?void 0:st.menuSelect)==null?void 0:xt.map(wt=>{var Tt,jt,vt,Mt,Lt,Ut;if(wt!=null&&wt.includes("[")){let Wt=(jt=(Tt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Tt.split(":"))==null?void 0:jt[1];ft=oe((vt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"),Je==null?void 0:Je[A.value],Je),wt=((Lt=(Mt=V.cloneDeep(Ge))==null?void 0:Mt.find(Jt=>(Jt==null?void 0:Jt.label)===Wt))==null?void 0:Lt.value)||oe((Ut=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Ut.split(":"),Je==null?void 0:Je[A.value],Je)}return wt}),ft!==""&&E.value===""&&(E.value=Ve(E.optionUrl.menuSelect,E.optionUrl.oldMenuSelect,(pt=E==null?void 0:E.optionUrl)==null?void 0:pt.groupSelect,Je),Array.isArray(E.value)&&((ct=E.value)!=null&&ct.every(wt=>wt==null?void 0:wt.url))&&(E.type="UPLOAD"))}return E}),c.value=Ge,ot.value=((rt=c.value)==null?void 0:rt.every(E=>E==null?void 0:E.disabled))||ne.value===A.value,He.value=($e=c.value)==null?void 0:$e.every(E=>E==null?void 0:E.operable),ue.value=(nt=c.value)==null?void 0:nt.map(E=>E==null?void 0:E.label);let Fe=[],Ze=[];if((Be=V.cloneDeep(c.value))==null||Be.forEach(E=>{var fe;Array.isArray(E==null?void 0:E.value)&&((fe=E==null?void 0:E.value)!=null&&fe.find(Ke=>{var he;return(he=Ke==null?void 0:Ke.url)==null?void 0:he.includes(".obj")}))&&(Ze=E==null?void 0:E.value)}),(Ze==null?void 0:Ze.length)>0){const E=(mt=V.cloneDeep(Ze))==null?void 0:mt.filter(fe=>{var Ke;return(Ke=fe==null?void 0:fe.url)==null?void 0:Ke.includes(".obj")});E==null||E.forEach(fe=>{var he,ut,st,xt;const Ke=(he=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(fe==null?void 0:fe.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:he.map(pt=>pt==null?void 0:pt.url);Fe.push({objUrl:fe==null?void 0:fe.url,mtlUrls:((ut=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(fe==null?void 0:fe.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:ut.length)===1?(xt=(st=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(fe==null?void 0:fe.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:st[0])==null?void 0:xt.url:Ke})}),_.setObjUrl(Fe)}(et=V.cloneDeep(c.value))==null||et.forEach(E=>{var fe,Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt,vt;if((Ke=(fe=E==null?void 0:E.value)==null?void 0:fe.toString())!=null&&Ke.includes(".stl")||(ut=(he=E==null?void 0:E.value)==null?void 0:he.toString())!=null&&ut.includes(".STL")||(xt=(st=E==null?void 0:E.value)==null?void 0:st.toString())!=null&&xt.includes(".obj")||(ct=(pt=E==null?void 0:E.value)==null?void 0:pt.toString())!=null&&ct.includes(".mtl")||(wt=(ft=E==null?void 0:E.value)==null?void 0:ft.toString())!=null&&wt.includes(".urdf")){let Mt={},Lt=[],Ut;Array.isArray(E==null?void 0:E.value)?Ut=E==null?void 0:E.value:Ut=(Tt=E==null?void 0:E.value)==null?void 0:Tt.split(","),Ut==null||Ut.forEach(Wt=>{Wt.includes(".mtl")?Lt.push(Wt):Mt.blob=Mt.blob==="undefined"?Wt:Mt.blob+","+Wt}),(Lt==null?void 0:Lt.length)>0&&(Mt.mtlBlobs=Lt),(vt=(jt=Object.values(Mt))==null?void 0:jt[0])!=null&&vt.includes("http:")}})}else c.value=[];let ie=Pe.value;if((ie==null?void 0:ie.length)>0&&(ie=ie==null?void 0:ie.map(Je=>{var It,Te,Ge,Fe;let je=(It=Je==null?void 0:Je.key)==null?void 0:It.split("/");return(r==null?void 0:r.compName)===(je==null?void 0:je[0])&&(Te=c.value)!=null&&Te.find(Ze=>(Ze==null?void 0:Ze.prop)===(je==null?void 0:je[1]))&&(Je.value=(Fe=(Ge=c.value)==null?void 0:Ge.find(Ze=>(Ze==null?void 0:Ze.prop)===(je==null?void 0:je[1])))==null?void 0:Fe.value),Je}),we.setTableViewContents(ie)),r!=null&&r.formRules)w.value=r==null?void 0:r.formRules;else{let Je={};(Oe=V.cloneDeep(c).value)==null||Oe.forEach(je=>{(je==null?void 0:je.isMain)===!0&&(Je[(je==null?void 0:je.prop)??(je==null?void 0:je.name)]=[{required:!0,message:`${(je==null?void 0:je.prop)||(je==null?void 0:je.name)}不能为空`}])}),w.value=Je}if(((it=ee==null?void 0:ee.contents)==null?void 0:it.length)>0){const Je=[];(gt=ee==null?void 0:ee.contents)==null||gt.forEach((je,It)=>{(je==null?void 0:je.label)!==""&&Je.push({label:(je==null?void 0:je.label)??"",id:(je==null?void 0:je.id)??It,type:(je==null?void 0:je.type)??"",background:je==null?void 0:je.background})}),ve.value=Je}else ve.value=[]},{deep:!0,immediate:!0}),e.watch(()=>ne.value,B=>{ot.value=B===A.value},{immediate:!0}),(B,ee)=>{var Z,de;const $=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-switch"),Se=e.resolveComponent("el-checkbox"),ie=e.resolveComponent("el-popover"),q=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",ri,[y.value===!1?(e.openBlock(),e.createBlock(oi,{key:0,items:(de=(Z=c.value)==null?void 0:Z.filter(me=>!(me!=null&&me.isFormColHidden)))==null?void 0:de.map(me=>({label:me==null?void 0:me.label,value:me==null?void 0:me.value}))},null,8,["items"])):(e.openBlock(),e.createBlock(Bt.ssForm,{key:1,rowContents:c.value,formRules:w.value,buttonValue:ve.value,isRowFlex:!1,isEnableWrap:y.value,onOnButtonClick:S,onChange:J,formDisabled:ot.value,formLabelsOperable:He.value,isButtonRow:F.value,onPreview:dt,onBlurChange:qe,onHandleColEditChange:Q,onHandleColTypeChange:se,onRouteUrl:Ye,onClickTrigger:Xe},{operateCol:e.withCtx(({renderColumns:me,formDisabled:Ce,formLabelsOperable:be})=>[e.createVNode(ie,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:_e},{reference:e.withCtx(()=>[e.createElementVNode("span",li,[e.createVNode($,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ii,[ee[1]||(ee[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(W,{"model-value":Ce,"active-text":"禁用","inactive-text":"",onChange:Qe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(W,{"model-value":be,"active-text":"编辑所有标签","inactive-text":"",onChange:ae},null,8,["model-value"]),ee[2]||(ee[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(q,{modelValue:ue.value,"onUpdate:modelValue":ee[0]||(ee[0]=j=>ue.value=j),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:pe,onChange:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me,j=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:j.label},[e.createVNode(Se,{value:j.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(j.label),1)]),_:2},1032,["value"]),e.createVNode(ie,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode($,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Me;return[e.createElementVNode("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Me=Object.keys(j))==null?void 0:Me.filter(ge=>{var Ue;return(Ue=De.value)==null?void 0:Ue.find(rt=>(rt==null?void 0:rt.value)===ge)}),ge=>{var Ue,rt;return e.openBlock(),e.createElementBlock("div",{key:ge},[e.createVNode(Bt._sfc_main$1,{value:j==null?void 0:j[ge],"active-text":(rt=(Ue=De.value)==null?void 0:Ue.find($e=>($e==null?void 0:$e.value)===ge))==null?void 0:rt.label,inactiveText:"",onChange:$e=>Ee($e,ge,j)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ci,[e.createVNode($,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"])),R.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:2,fileDataList:K.value,onDestroy:m},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:3,visible:x.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Co.ThreeViewerHost,{files:f.value,onGetAnimationData:B.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Bo=Rt._export_sfc(ui,[["__scopeId","data-v-8040f4ad"]]),Pa=e.ref(0),fr=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=V.cloneDeep(a))==null?void 0:l.map(r=>(Pa.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Pa.value,children:fr(r==null?void 0:r.children)},r))},di=a=>{var s;return(s=V.cloneDeep(a))==null?void 0:s.map(r=>(Pa.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Pa.value,children:fr(r==null?void 0:r.children)},r))},hr=(a,l)=>{var s;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(s=V.cloneDeep(a))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=hr(r==null?void 0:r.children,l),r)),a)},vr=(a,l)=>{var s;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(s=V.cloneDeep(a))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(l==null?void 0:l.id)&&(d=l),d)):(a=a==null?void 0:a.map(r=>(r.children=vr(r==null?void 0:r.children,l),r)),a)},mr=(a,l)=>{var s;return a!=null&&a.find(r=>{var d;return(r==null?void 0:r.id)===((d=l==null?void 0:l.contents)==null?void 0:d.id)})?(s=V.cloneDeep(a))==null?void 0:s.map(d=>{var c;return(d==null?void 0:d.id)===((c=l==null?void 0:l.contents)==null?void 0:c.id)&&(d=l==null?void 0:l.contents),d}):(a=a==null?void 0:a.map(r=>(r.children=mr(r==null?void 0:r.children,l),r)),a)},gr=(a,l)=>{var s;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(s=V.cloneDeep(a))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(l==null?void 0:l.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(l.contents)),d)):(a=a==null?void 0:a.map(r=>(r.children=gr(r==null?void 0:r.children,l),r)),a)},At=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],pi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],fi=[{label:"新增",value:"add"}],wn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:fi},{key:"background",label:"按钮背景色",type:"Color"}],Cn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:pi},{key:"textColor",label:"按钮颜色",type:"Color"}],hi={class:"table-header-child"},vi={class:"table-header-child-main"},mi={class:"table-header-child-content"},gi={class:"table-header-child-content-item"},yi={class:"fix-button"},bi={key:0},ki={class:"form-content"},xi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const s=a,r=l,d=e.ref(!1),c=e.ref(""),x=Ne.useTableComp(xe.pinia),{tableIndex:v}=xe.storeToRefs(x);e.ref(0);const f=e.ref(""),C=e.ref([]),w=e.ref([]),F=b=>{var y;d.value=!0;let _=[];At==null||At.forEach(T=>{let h=V.cloneDeep(v.value)+1;x.setTableIndex(h),_.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:b[T.key],id:v.value,contents:T==null?void 0:T.options})}),b!=null&&b.children&&((y=b==null?void 0:b.children)==null?void 0:y.length)>0&&_.push({children:b==null?void 0:b.children,isFormColHidden:!0}),f.value=b==null?void 0:b.id,C.value=_,w.value=_},R=b=>{r("fixChange",V.cloneDeep(b))},H=b=>{r("deleteChange",V.cloneDeep(b))},M=b=>{d.value=!0;let _=[];At==null||At.forEach(y=>{let T=V.cloneDeep(v.value)+1;x.setTableIndex(T),_.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:v.value,contents:y==null?void 0:y.options})}),c.value=b==null?void 0:b.id,C.value=_,w.value=_},ve=b=>{let _=V.cloneDeep(w.value);_=_==null?void 0:_.map(y=>(y.children||(y.value=b==null?void 0:b[y.name]),y)),w.value=_},K=()=>{var _,y;C.value=w.value;let b={};if(f.value!=="")b.id=f.value,(_=C.value)==null||_.forEach(T=>{const h=At==null?void 0:At.find(ce=>(ce==null?void 0:ce.label)===(T==null?void 0:T.label));h?b[h.key]=T.value:T!=null&&T.children&&T.children.length>0&&(b.children=T.children)}),d.value=!1,r("fixChange",{contents:V.cloneDeep(b),id:c.value,type:"fix"});else{let T=V.cloneDeep(v.value)+1;x.setTableIndex(T),b.id="id"+v.value,(y=C.value)==null||y.forEach(h=>{const ce=At==null?void 0:At.find(Ae=>(Ae==null?void 0:Ae.label)===(h==null?void 0:h.label));ce?b[ce.key]=h.value:h!=null&&h.children&&h.children.length>0&&(b.children=h.children)}),d.value=!1,r("fixChange",{contents:V.cloneDeep(b),id:c.value,type:"add"})}f.value="",C.value=[],w.value=[]},O=()=>{d.value=!1,f.value="",c.value="",C.value=[],w.value=[]},G=b=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",b),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(b,_)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",hi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,h)=>(e.openBlock(),e.createElementBlock("div",vi,[e.createElementVNode("div",mi,[e.createElementVNode("div",gi,e.toDisplayString(T.label),1),e.createElementVNode("div",yi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>M(T)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>F(T)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>G(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(yr,{tableChildContents:T==null?void 0:T.children,onDeleteChange:H,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:O,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ki,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:O,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:K},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},wi=Rt._export_sfc(xi,[["__scopeId","data-v-e0fef72d"]]),Ci={class:"table-header-child"},Di={class:"table-header-child-main"},_i={class:"table-header-child-content"},Ei={class:"table-header-child-content-item"},Si={class:"fix-button"},Ti={key:0},Bi={class:"form-content"},Ii={class:"dialog-footer"},Ni={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const s=a,r=l,d=e.ref(!1),c=e.ref(""),x=Ne.useTableComp(xe.pinia),{tableIndex:v}=xe.storeToRefs(x),f=e.ref(""),C=e.ref([]),w=e.ref([]),F=b=>{r("fixChange",V.cloneDeep(b))},R=b=>{var y;d.value=!0;let _=[];At==null||At.forEach(T=>{let h=V.cloneDeep(v.value)+1;x.setTableIndex(h),_.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:b[T.key],id:v.value,contents:T==null?void 0:T.options})}),b!=null&&b.children&&((y=b==null?void 0:b.children)==null?void 0:y.length)>0&&_.push({children:b==null?void 0:b.children,isFormColHidden:!0}),f.value=b==null?void 0:b.id,C.value=_,w.value=_},H=b=>{d.value=!0;let _=[];At==null||At.forEach(y=>{let T=V.cloneDeep(v.value)+1;x.setTableIndex(T),_.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:v.value,contents:y==null?void 0:y.options})}),c.value=b==null?void 0:b.id,C.value=_,w.value=_},M=b=>{let _=V.cloneDeep(w.value);_=_==null?void 0:_.map(y=>(y.children||(y.value=b==null?void 0:b[y.name]),y)),w.value=_},ve=()=>{var _,y;C.value=w.value;let b={};if(f.value!=="")b.id=f.value,(_=C.value)==null||_.forEach(T=>{const h=At==null?void 0:At.find(ce=>(ce==null?void 0:ce.label)===(T==null?void 0:T.label));h?b[h.key]=T.value:T!=null&&T.children&&T.children.length>0&&(b.children=T.children)}),d.value=!1,r("fixChange",{contents:V.cloneDeep(b),id:c.value,type:"fix"});else{let T=V.cloneDeep(v.value)+1;x.setTableIndex(T),b.id="idChild"+v.value,(y=C.value)==null||y.forEach(h=>{const ce=At==null?void 0:At.find(Ae=>(Ae==null?void 0:Ae.label)===(h==null?void 0:h.label));ce?b[ce.key]=h.value:h!=null&&h.children&&h.children.length>0&&(b.children=h.children)}),d.value=!1,r("fixChange",{contents:V.cloneDeep(b),id:c.value,type:"add"})}f.value="",C.value=[],w.value=[]},K=()=>{d.value=!1,f.value="",c.value="",C.value=[],w.value=[]},O=b=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",b),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},G=b=>{r("deleteChange",b)};return(b,_)=>{const y=e.resolveComponent("svg-icon"),T=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(h,ce)=>(e.openBlock(),e.createElementBlock("div",Di,[e.createElementVNode("div",_i,[e.createElementVNode("div",Ei,e.toDisplayString(h.label),1),e.createElementVNode("div",Si,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ae=>H(h)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ae=>R(h)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ae=>O(h)},null,8,["onClick"])])]),h!=null&&h.children&&h.children.length>0?(e.openBlock(),e.createElementBlock("div",Ti,[e.createVNode(wi,{tableChildContents:h==null?void 0:h.children,onDeleteChange:G,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Bi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ii,[e.createVNode(T,{onClick:K,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[0]||(_[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(T,{class:"ok-button button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>_[1]||(_[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},yr=Rt._export_sfc(Ni,[["__scopeId","data-v-ebd68fa1"]]),Ai={class:"table-operate-content"},Vi={class:"table-operate-item"},Oi={class:"operate-title"},Mi={class:"operate-content"},zi={class:"fix-content"},Fi={class:"fix-content-label"},Ri={class:"fix-button"},Pi={key:0},Li={class:"operate-title"},$i={class:"operate-content"},ji={class:"fix-content"},Ui={class:"fix-content-label"},Ki={class:"fix-button"},Wi={class:"operate-title"},Hi={class:"operate-content"},qi={class:"fix-content"},Gi={class:"fix-content-label"},Xi={class:"fix-button"},Yi={class:"operate-title"},Ji={class:"operate-content"},Zi={class:"fix-content"},Qi={class:"fix-content-label"},es={class:"fix-button"},ts={class:"operate-content"},ns={style:{display:"flex","justify-content":"space-between"}},as={class:"form-content"},os={class:"dialog-footer"},rs={class:"form-content"},ls={class:"dialog-footer"},is={class:"form-content"},ss={class:"dialog-footer"},cs={class:"form-content"},us={class:"dialog-footer"},ds={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref([]),c=e.ref(!1),x=e.ref(!1),v=e.ref([]),f=e.ref(!1),C=e.ref([]),w=e.ref(!1),F=e.ref([]),R=e.ref(""),H=e.ref(""),M=e.ref([]),ve=e.ref([]),K=e.ref([]),O=e.ref([]),G=e.ref(!1),b=e.ref([]),_=e.ref([]),y=e.ref(0),T=e.ref([]),h=e.ref([]),ce=e.ref([]),Ae=()=>{G.value=!0;let m=[];wn==null||wn.forEach(S=>{y.value++,m.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:(S==null?void 0:S.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:S==null?void 0:S.options})}),b.value=m,_.value=m},at=()=>{var S,U,J;x.value=!0;let m=[];(J=(U=(S=Ne.FormContent)==null?void 0:S.find(D=>(D==null?void 0:D.key)==="Input"))==null?void 0:U.value)==null||J.forEach(D=>{y.value++,m.push({label:D==null?void 0:D.label,name:(D==null?void 0:D.name)||(D==null?void 0:D.label),type:D.type,value:(D==null?void 0:D.label)==="类型"?"Input":"",id:y.value,contents:D==null?void 0:D.options})}),T.value=m,h.value=m},we=m=>{m||(T.value=h.value)},Pe=async m=>{var S,U,J,D,oe,Ve,B,ee,$,W,Se,ie;if((m==null?void 0:m.类型)!==((U=(S=h.value)==null?void 0:S.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:U.value)){let q=[],Z=await((oe=(D=(J=Ne.FormContent)==null?void 0:J.find(de=>(de==null?void 0:de.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:D.value)==null?void 0:oe.value)?await((W=($=(ee=Ne.FormContent)==null?void 0:ee.find(de=>(de==null?void 0:de.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:$.value)==null?void 0:W.value):(B=(Ve=Ne.FormContent)==null?void 0:Ve.find(de=>(de==null?void 0:de.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:B.value;if(Z==null||Z.forEach(de=>{y.value++,q.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:de!=null&&de.属性名?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):(m==null?void 0:m[de.label])??"",id:y.value,contents:de==null?void 0:de.options,prop:(de==null?void 0:de.prop)||(de==null?void 0:de.name)||(de==null?void 0:de.label)})}),m!=null&&m.菜单选项&&((Se=m==null?void 0:m.菜单选项)==null?void 0:Se.length)>0){const de=await Ne.menuToContentType(m==null?void 0:m.菜单选项);q=q==null?void 0:q.map(me=>((me==null?void 0:me.name)==="组信息选项"&&(me.contents=de),me))}h.value=await Ne.selectToBase(V.cloneDeep(q)),T.value=await Ne.selectToBase(V.cloneDeep(q))}else{let q=V.cloneDeep(T.value);if(q=q==null?void 0:q.map(Z=>(Z.value=m==null?void 0:m[Z.name],Z)),m!=null&&m.菜单选项&&((ie=m==null?void 0:m.菜单选项)==null?void 0:ie.length)>0){const Z=await Ne.menuToContentType(m==null?void 0:m.菜单选项);q=q==null?void 0:q.map(de=>((de==null?void 0:de.name)==="组信息选项"&&(de.contents=Z),de))}q=Ne.formToOptionsContents(q),h.value=await Ne.selectToBase(V.cloneDeep(q))}},Le=async m=>{await Pe(m),T.value=h.value},P=(m,S)=>{if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="selectRelateType"){const U=S==null?void 0:S.optionUrl;return(U==null?void 0:U.selectRelateType)||S[m.key]}if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="menuSelect"){const U=S==null?void 0:S.optionUrl;return(U==null?void 0:U.menuSelect)||S[m.key]}if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="groupSelect"){const U=S==null?void 0:S.optionUrl;return(U==null?void 0:U.groupSelect)||S[m.key]}if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="originalContent")return(S==null?void 0:S.value)||S[m.key];if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="multiple"){const U=S[m.key];return pr(U)?U:m.default}return(m==null?void 0:m.label)==="类型"&&S[m.key]===""?"Input":(m==null?void 0:m.key)==="isFormColHidden"&&!S[m.key]?!1:S[m.key]},re=async m=>{var J,D,oe,Ve,B,ee,$,W,Se;x.value=!0;let S=[];const U=await((oe=(D=(J=Ne.FormContent)==null?void 0:J.find(ie=>(ie==null?void 0:ie.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:D.value)==null?void 0:oe.value)?await((W=($=(ee=Ne.FormContent)==null?void 0:ee.find(ie=>(ie==null?void 0:ie.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:$.value)==null?void 0:W.value):(B=(Ve=Ne.FormContent)==null?void 0:Ve.find(ie=>(ie==null?void 0:ie.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:B.value;if(U==null||U.forEach(ie=>{y.value++,S.push({label:ie==null?void 0:ie.label,name:(ie==null?void 0:ie.name)||(ie==null?void 0:ie.label),type:ie.type,value:(ie==null?void 0:ie.label)==="属性名"?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):P(ie,m),id:y.value,contents:ie==null?void 0:ie.options})}),m!=null&&m.menuSelect&&((Se=m==null?void 0:m.menuSelect)==null?void 0:Se.length)>0){const ie=await Ne.menuToContentType(m==null?void 0:m.menuSelect);S=S==null?void 0:S.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=ie),q))}R.value=m==null?void 0:m.id,T.value=await Ne.selectToBase(Ne.formToOptionsContents(S)),h.value=await Ne.selectToBase(Ne.formToOptionsContents(S))},ne=m=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var S,U;ce.value=(S=V.cloneDeep(ce.value))==null?void 0:S.filter(J=>(J==null?void 0:J.id)!==(m==null?void 0:m.id)),r("change",(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="tableToForm"&&(J.contents=ce.value),J))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},pe=()=>{x.value=!1,T.value=[],R.value=""},He=async()=>{var J,D,oe,Ve,B,ee,$,W,Se,ie;T.value=h.value;let m={};R.value!==""?m.id=R.value:(y.value++,m.id="id"+y.value);let S=await((oe=(D=(J=Ne.FormContent)==null?void 0:J.find(q=>{var Z,de;return(q==null?void 0:q.key)===(((de=(Z=T.value)==null?void 0:Z.find(me=>(me==null?void 0:me.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:D.value)==null?void 0:oe.value)??((B=(Ve=Ne.FormContent)==null?void 0:Ve.find(q=>{var Z,de;return(q==null?void 0:q.key)===(((de=(Z=T.value)==null?void 0:Z.find(me=>(me==null?void 0:me.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:B.value);if((ee=T.value)==null||ee.forEach(q=>{const Z=S==null?void 0:S.find(de=>(de==null?void 0:de.label)===(q==null?void 0:q.label));Z&&(m[Z.key]=q.value)}),m.name=m.label,($=ce.value)!=null&&$.find(q=>q.id===m.id))ce.value=(W=ce.value)==null?void 0:W.map(q=>(q.id===m.id&&(q=m),q));else{let q=V.cloneDeep(ce.value);ce.value||(ce.value=[]),q.push(m),ce.value=q}ce.value=ce.value.map(({id:q,...Z})=>Z),x.value=!1,R.value="";let U=V.cloneDeep(s.originalItemContents);(Se=V.cloneDeep(s.originalItemContents))!=null&&Se.find(q=>(q==null?void 0:q.key)==="tableToForm")?U=(ie=V.cloneDeep(s.originalItemContents))==null?void 0:ie.map(q=>((q==null?void 0:q.key)==="tableToForm"&&(q.contents=ce.value),q)):U.push({key:"tableToForm",contents:ce.value}),r("change",U)},ot=m=>{G.value=!0;let S=[];wn==null||wn.forEach(U=>{y.value++,S.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:m[U.key],id:y.value,contents:U==null?void 0:U.options})}),R.value=m==null?void 0:m.id,b.value=S,_.value=S};e.watch(()=>w.value,()=>{var S,U;let m=V.cloneDeep(s.originalItemContents);(S=V.cloneDeep(s.originalItemContents))!=null&&S.find(J=>(J==null?void 0:J.key)==="page")?m=(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="page"&&(J.contents=w.value),J)):m.push({key:"page",contents:w.value}),r("change",m)},{deep:!0});const X=m=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var S,U;ve.value=(S=V.cloneDeep(ve.value))==null?void 0:S.filter(J=>(J==null?void 0:J.id)!==(m==null?void 0:m.id)),r("change",(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="extraButton"&&(J.contents=ve.value),J))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},A=()=>{var U,J,D,oe,Ve;b.value=_.value;let m={};if(R.value!==""?m.id=R.value:(y.value++,m.id="id"+y.value),(U=b.value)==null||U.forEach(B=>{const ee=wn==null?void 0:wn.find($=>($==null?void 0:$.label)===(B==null?void 0:B.label));ee?m[ee.key]=B.value:B!=null&&B.children&&B.children.length>0&&(m.children=B.children)}),(J=ve.value)!=null&&J.find(B=>B.id===m.id))ve.value=(D=ve.value)==null?void 0:D.map(B=>(B.id===m.id&&(B=m),B));else{let B=V.cloneDeep(ve.value)??[];B.push(m),ve.value=B}G.value=!1,R.value="";let S=V.cloneDeep(s.originalItemContents);(oe=V.cloneDeep(s.originalItemContents))!=null&&oe.find(B=>(B==null?void 0:B.key)==="extraButton")?S=(Ve=V.cloneDeep(s.originalItemContents))==null?void 0:Ve.map(B=>((B==null?void 0:B.key)==="extraButton"&&(B.contents=ve.value),B)):S.push({key:"extraButton",contents:ve.value}),r("change",S)},te=m=>{let S=V.cloneDeep(_.value);S=S==null?void 0:S.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),_.value=S},ye=()=>{G.value=!1,b.value=[],R.value=""},ue=m=>{f.value=!0;let S=[];Cn==null||Cn.forEach(U=>{y.value++,S.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:m[U.key],id:y.value,contents:U==null?void 0:U.options})}),R.value=m==null?void 0:m.id,K.value=S,O.value=S},De=m=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var S,U;M.value=(S=V.cloneDeep(M.value))==null?void 0:S.filter(J=>(J==null?void 0:J.id)!==(m==null?void 0:m.id)),r("change",(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="rowButton"&&(J.contents=M.value),J))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Qe=()=>{c.value=!0;let m=[];At==null||At.forEach(S=>{y.value++,m.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:"",id:y.value,contents:S==null?void 0:S.options})}),C.value=m,F.value=m},ae=()=>{f.value=!0;let m=[];Cn==null||Cn.forEach(S=>{y.value++,m.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:"",id:y.value,contents:S==null?void 0:S.options})}),K.value=m,O.value=m},_e=m=>{let S=V.cloneDeep(O.value);S=S==null?void 0:S.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),O.value=S},I=()=>{var U,J,D,oe,Ve;K.value=O.value;let m={};if(R.value!==""?m.id=R.value:(y.value++,m.id="id"+y.value),(U=K.value)==null||U.forEach(B=>{const ee=Cn==null?void 0:Cn.find($=>($==null?void 0:$.label)===(B==null?void 0:B.label));ee?m[ee.key]=B.value:B!=null&&B.children&&B.children.length>0&&(m.children=B.children)}),(J=M.value)!=null&&J.find(B=>B.id===m.id))M.value=(D=M.value)==null?void 0:D.map(B=>(B.id===m.id&&(B=m),B));else{let B=V.cloneDeep(M.value);B.push(m),M.value=B}f.value=!1,R.value="";let S=V.cloneDeep(s.originalItemContents);(oe=V.cloneDeep(s.originalItemContents))!=null&&oe.find(B=>(B==null?void 0:B.key)==="rowButton")?S=(Ve=V.cloneDeep(s.originalItemContents))==null?void 0:Ve.map(B=>((B==null?void 0:B.key)==="rowButton"&&(B.contents=M.value),B)):S.push({key:"rowButton",contents:M.value}),r("change",S)},Xe=()=>{f.value=!1,R.value="",O.value=[],K.value=[]},Ye=m=>{c.value=!0;let S=[];At==null||At.forEach(U=>{y.value++,S.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:y.value,contents:U==null?void 0:U.options})}),C.value=S,H.value=m==null?void 0:m.id,F.value=S},Ie=m=>{var S;v.value=hr(V.cloneDeep(v.value),m==null?void 0:m.id),r("change",(S=V.cloneDeep(s.originalItemContents))==null?void 0:S.map(U=>{var J;return(U==null?void 0:U.key)==="header"&&(U.contents=(J=v.value)!=null&&J.some(D=>D==null?void 0:D.children)?[v.value]:v.value),U}))},le=m=>{var U,J,D;m.type==="fix"?m.id!==""?v.value=mr(v.value,m):v.value=vr(v.value,m==null?void 0:m.contents):v.value=gr(v.value,m),v.value=(U=v.value)!=null&&U.some(oe=>oe==null?void 0:oe.children)?[v.value]:v.value,R.value="";let S=V.cloneDeep(s.originalItemContents);(J=V.cloneDeep(s.originalItemContents))!=null&&J.find(oe=>(oe==null?void 0:oe.key)==="header")?S=(D=V.cloneDeep(s.originalItemContents))==null?void 0:D.map(oe=>((oe==null?void 0:oe.key)==="header"&&(oe.contents=v.value),oe)):S.push({key:"header",contents:v.value}),r("change",S)},Q=m=>{var U;c.value=!0;let S=[];At==null||At.forEach(J=>{y.value++,S.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:m[J.key],id:y.value,contents:J==null?void 0:J.options})}),m!=null&&m.children&&((U=m==null?void 0:m.children)==null?void 0:U.length)>0&&S.push({children:m==null?void 0:m.children,isFormColHidden:!0}),R.value=m==null?void 0:m.id,H.value="",C.value=S,F.value=S},se=m=>{let S=V.cloneDeep(F.value);S=S==null?void 0:S.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),F.value=S},Ee=()=>{c.value=!1,R.value="",H.value="",F.value=[]},qe=()=>{var U,J,D,oe,Ve,B;C.value=F.value;let m={};if(R.value!==""?m.id=R.value:(y.value++,m.id="id"+y.value),(U=C.value)==null||U.forEach(ee=>{const $=At==null?void 0:At.find(W=>(W==null?void 0:W.label)===(ee==null?void 0:ee.label));$?m[$.key]=ee.value:ee!=null&&ee.children&&ee.children.length>0&&(m.children=ee.children)}),(J=v.value)!=null&&J.find(ee=>ee.id===m.id))v.value=(D=v.value)==null?void 0:D.map(ee=>(ee.id===m.id&&(ee=m),ee));else{let ee=V.cloneDeep(v.value)??[];H.value===""?ee.push(m):ee=ee==null?void 0:ee.map($=>($.id===H.value&&($.children||($.children=[]),$.children.push(m)),$)),v.value=ee}v.value=(oe=v.value)!=null&&oe.some(ee=>ee==null?void 0:ee.children)?[v.value]:v.value,c.value=!1,R.value="",H.value="";let S=V.cloneDeep(s.originalItemContents);(Ve=V.cloneDeep(s.originalItemContents))!=null&&Ve.find(ee=>(ee==null?void 0:ee.key)==="header")?S=(B=V.cloneDeep(s.originalItemContents))==null?void 0:B.map(ee=>((ee==null?void 0:ee.key)==="header"&&(ee.contents=v.value),ee)):S.push({key:"header",contents:v.value}),r("change",S)},dt=m=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var S,U;v.value=(S=V.cloneDeep(v.value))==null?void 0:S.filter(J=>(J==null?void 0:J.id)!==(m==null?void 0:m.id)),r("change",(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>{var D;return(J==null?void 0:J.key)==="header"&&(J.contents=(D=v.value)!=null&&D.some(oe=>oe==null?void 0:oe.children)?[v.value]:v.value),J})),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var m,S,U,J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce,be;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=V.cloneDeep(s.originalItemContents),v.value=(S=(m=d.value)==null?void 0:m.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:S.contents,M.value=(J=(U=d.value)==null?void 0:U.find(j=>(j==null?void 0:j.key)==="rowButton"))==null?void 0:J.contents,ve.value=(oe=(D=d.value)==null?void 0:D.find(j=>(j==null?void 0:j.key)==="extraButton"))==null?void 0:oe.contents,w.value=(B=(Ve=d.value)==null?void 0:Ve.find(j=>(j==null?void 0:j.key)==="page"))!=null&&B.contents?!!(($=(ee=d.value)==null?void 0:ee.find(j=>(j==null?void 0:j.key)==="page"))!=null&&$.contents):!1,ce.value=(Se=(W=d.value)==null?void 0:W.find(j=>(j==null?void 0:j.key)==="tableToForm"))==null?void 0:Se.contents,v.value=(ie=v.value)==null?void 0:ie.map((j,Me)=>(Array.isArray(j)?j=di(j):j={label:(j==null?void 0:j.label)??"",prop:(j==null?void 0:j.label)==="操作"?"operate":j==null?void 0:j.prop,width:j!=null&&j.width?parseInt(j.width):"",fixed:(j==null?void 0:j.fixed)??void 0,sortable:(j==null?void 0:j.sortable)??!1,align:(j==null?void 0:j.align)??"left",showOverflowTooltip:(j==null?void 0:j.showOverflowTooltip)??!0,isNotDrag:(j==null?void 0:j.isNotDrag)??!1,isEditCol:(j==null?void 0:j.isEditCol)??!1,isOperate:(j==null?void 0:j.isOperate)??!1,id:(j==null?void 0:j.id)??Me,formMenuSelect:(j==null?void 0:j.formMenuSelect)??void 0,groupSelect:(j==null?void 0:j.groupSelect)??void 0},j)),v.value=(q=v.value)!=null&&q.every(j=>Array.isArray(j))?(Z=v.value)==null?void 0:Z[0]:v.value,M.value=(de=M.value)==null?void 0:de.map((j,Me)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",textColor:(j==null?void 0:j.textColor)??"#000000",id:(j==null?void 0:j.id)??Me}),ve.value=(me=ve.value)==null?void 0:me.map((j,Me)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",background:(j==null?void 0:j.background)??"var(--ssComponent-primary-color)",id:(j==null?void 0:j.id)??Me}),ce.value)ce.value=(be=ce.value)==null?void 0:be.map(j=>{y.value++;let Me=j;return Me.id=y.value,Me});else{let j=[];const Me=(Ce=Ne.getColumnChild(V.cloneDeep(v.value)))==null?void 0:Ce.filter(ge=>(ge==null?void 0:ge.prop)!=="operate");Me==null||Me.forEach(ge=>{var Ue;y.value++,j.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label),type:ge!=null&&ge.groupSelect?"Select":"Input",value:"",id:y.value,contents:ge==null?void 0:ge.options,menuSelect:ge==null?void 0:ge.formMenuSelect,groupSelect:(Ue=ge==null?void 0:ge.groupSelect)==null?void 0:Ue.split(":"),selectRelateType:"关联绑定列"})}),ce.value=j}},{deep:!0,immediate:!0}),(m,S)=>{const U=e.resolveComponent("svg-icon"),J=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("div",Vi,[e.createElementVNode("div",Oi,[S[2]||(S[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(J,{class:"icon-content",onClick:Qe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[S[1]||(S[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",zi,[e.createElementVNode("div",Fi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Ri,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>Ye(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>Q(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>dt(D)},null,8,["onClick"])])]),D!=null&&D.children&&D.children.length>0?(e.openBlock(),e.createElementBlock("div",Pi,[e.createVNode(yr,{tableChildContents:D==null?void 0:D.children,onDeleteChange:Ie,onFixChange:le},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Li,[S[4]||(S[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[S[3]||(S[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",$i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",ji,[e.createElementVNode("div",Ui,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Ki,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ve=>ue(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>De(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Wi,[S[6]||(S[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:Ae},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[S[5]||(S[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Hi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ve.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Xi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ve=>ot(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>X(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Yi,[S[8]||(S[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:at},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[S[7]||(S[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",Zi,[e.createElementVNode("div",Qi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",es,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ve=>re(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>ne(D)},null,8,["onClick"])])])]))),128))]),S[10]||(S[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",ts,[e.createElementVNode("div",ns,[S[9]||(S[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:w.value,"onUpdate:modelValue":S[0]||(S[0]=D=>w.value=D)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:Ee,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",as,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(J,{onClick:Ee,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[11]||(S[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(J,{class:"ok-button button",onClick:qe,id:"themeButton"},{default:e.withCtx(()=>S[12]||(S[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:Xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",rs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:K.value,key:K.value,isEnableWrap:!0,onChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ls,[e.createVNode(J,{onClick:Xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[13]||(S[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(J,{class:"ok-button button",onClick:I,id:"themeButton"},{default:e.withCtx(()=>S[14]||(S[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:G.value,onBeforeDestroy:ye,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",is,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ss,[e.createVNode(J,{onClick:ye,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[15]||(S[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(J,{class:"ok-button button",onClick:A,id:"themeButton"},{default:e.withCtx(()=>S[16]||(S[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:x.value,onBeforeDestroy:pe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",cs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:T.value,key:T.value,isEnableWrap:!0,onChange:Pe,onChangeVisible:we,onBlurChange:Le},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",us,[e.createVNode(J,{onClick:pe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[17]||(S[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(J,{class:"ok-button button",onClick:He,id:"themeButton"},{default:e.withCtx(()=>S[18]||(S[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ps=Rt._export_sfc(ds,[["__scopeId","data-v-7a6b87b5"]]),fs=V.useModelComp(xe.pinia),{pageMapState:hs}=xe.storeToRefs(fs),vs=V.useMenuState(xe.pinia),{activeMenuPath:ms}=xe.storeToRefs(vs),gs=e.ref(24),ys=e.ref(6),bs=e.ref(70),ks=e.ref(.18),xs=e.ref(45),ws=(a,l,s,r)=>{var d,c,x,v,f,C,w,F,R,H,M,ve,K,O,G,b;return{x:((c=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:c.x)||l%2*12,y:((v=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:v.y)||l,w:((C=(f=a==null?void 0:a.value)==null?void 0:f.tableData)==null?void 0:C.w)||gs.value,h:((F=(w=a==null?void 0:a.value)==null?void 0:w.tableData)==null?void 0:F.h)||s,minW:((H=(R=a==null?void 0:a.value)==null?void 0:R.tableData)==null?void 0:H.minW)||ys.value,minH:((ve=(M=a==null?void 0:a.value)==null?void 0:M.tableData)==null?void 0:ve.minH)||ks.value,maxH:((O=(K=a==null?void 0:a.value)==null?void 0:K.tableData)==null?void 0:O.maxH)||xs.value,i:((b=(G=a==null?void 0:a.value)==null?void 0:G.tableData)==null?void 0:b.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},Cs=(a,l)=>{var r,d,c,x,v,f,C,w;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((x=(c=(d=a==null?void 0:a.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:x.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(s=((w=(C=(f=a==null?void 0:a.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:C.contents)==null?void 0:w.length)/5);return s*2},br=(a,l,s)=>{var x,v;const r=(v=(x=hs.value)==null?void 0:x[ms.value])==null?void 0:v.filter(f=>{var C;return((C=f==null?void 0:f.key)==null?void 0:C.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var C,w,F;return((F=(w=(C=f==null?void 0:f.value)==null?void 0:C.tableData)==null?void 0:w.component)==null?void 0:F.id)===a.id}),c=Cs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((f,C)=>br(f,C))),{...ws(d,l,c,a)}},Ds=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const s=V.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((r,d)=>br(r,d)):[]},_s=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}]}]}}),Es=(a,l)=>a==null?void 0:a.map(s=>{for(const r in l)if(r===(s==null?void 0:s.prop))return{...s,value:l[r]};return s}),Ss=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref([]);e.watch(()=>s.compType,v=>{var w;const f=_s(s==null?void 0:s.optionItems),C=v?(w=f[v==null?void 0:v.toUpperCase()])==null?void 0:w[s==null?void 0:s.target]:[];d.value=C==null?void 0:C.map(F=>{for(const[R,H]of Object.entries((s==null?void 0:s.comp)||{}))if((F==null?void 0:F.prop)===R)return{...F,value:H};return F})},{immediate:!0});const c=v=>Bt.getComponent(v),x=v=>{var f,C;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(w=>{var F;return(w==null?void 0:w.prop)==="isStepLayout"?{...w,options:(F=w==null?void 0:w.options)==null?void 0:F.map(R=>({...R,disabled:!0}))}:(w==null?void 0:w.prop)==="isGridLayout"?{...w,disabled:!0}:w}):d.value=(C=d.value)==null?void 0:C.map(w=>{var F;return(w==null?void 0:w.prop)==="isStepLayout"?{...w,options:(F=w==null?void 0:w.options)==null?void 0:F.map(R=>({...R,disabled:!1}))}:(w==null?void 0:w.prop)==="isGridLayout"?{...w,disabled:!1}:w}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:v==null?void 0:v.prop})};return(v,f)=>{const C=e.resolveComponent("el-col"),w=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,F=>(e.openBlock(),e.createBlock(w,{class:"style-row",key:F==null?void 0:F.prop},{default:e.withCtx(()=>[e.createVNode(C,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(F==null?void 0:F.label)+":",1)]),_:2},1024),e.createVNode(C,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(F.type)),{modelValue:F.value,"onUpdate:modelValue":R=>F.value=R,content:F==null?void 0:F.options,optionUrl:F==null?void 0:F.optionUrl,disabled:F==null?void 0:F.disabled,activeText:F==null?void 0:F.activeText,inactiveText:F==null?void 0:F.inactiveText,onChange:R=>x(F)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ts=Rt._export_sfc(Ss,[["__scopeId","data-v-6c233914"]]),Bs=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:l}){const s=a,r=l,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=e.ref([]),x=O=>O==null?void 0:O.reduce((G,b)=>(G[b==null?void 0:b.prop]=b==null?void 0:b.rule,G),{}),v=e.computed(()=>({formRules:x(c.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),C=e.ref(""),w=(O,G,b)=>{var T;let _=[];(s==null?void 0:s.activeTabName)==="任务配置"?(_=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:O},{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:"暂停"}]}],c.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(_=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(T=s==null?void 0:s.relatedData)==null?void 0:T.map(h=>({label:h==null?void 0:h.任务名称,value:h==null?void 0:h.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return b&&(b==null?void 0:b.length)>0?y=[..._,...F(O,G,b)]:y=_,y},F=(O,G,b)=>{const _=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return b?_==null?void 0:_.filter(y=>b==null?void 0:b.includes(y==null?void 0:y.prop)):_},R=(O,G)=>{var h,ce,Ae,at,we,Pe,Le,P,re;const b=((we=(at=(Ae=(ce=(h=s==null?void 0:s.comp)==null?void 0:h.compData)==null?void 0:ce.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:Ae.contents)==null?void 0:at.filter(ne=>(ne==null?void 0:ne.label)!=="操作"))==null?void 0:we.map(ne=>({value:ne==null?void 0:ne.prop,label:ne.label})))||[],_=/button/i,y=((re=(P=(Le=(Pe=s==null?void 0:s.comp)==null?void 0:Pe.compData)==null?void 0:Le.filter(ne=>_.test(ne==null?void 0:ne.key)))==null?void 0:P.flatMap(ne=>ne==null?void 0:ne.contents))==null?void 0:re.map(ne=>({value:ne==null?void 0:ne.label,label:ne.label})))||[],T=w(b,y,O);f.value=G?Es(T,G):T,O&&(O==null?void 0:O.length)>0&&c.value.push(...O==null?void 0:O.map(ne=>({prop:ne,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const H=O=>{const G=O==null?void 0:O[C.value];if(C.value==="执行任务"){if(!(G!=null&&G.join("/")))return;const b=G==null?void 0:G.join("/");R(b==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:b==="进度设置/进度条"?["进度关键词"]:null,O)}},M=O=>{r("change",{target:s==null?void 0:s.target,extendConfigs:O})},ve=(O,G)=>{C.value=G==null?void 0:G.changeProp,H(O)},K=O=>{r("onButtonClick",O)};return(O,G)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:M,onBlurChange:ve,onOnButtonClick:K},null,8,["rowContents","formRules","buttonValue"]))}}),Is=Rt._export_sfc(Bs,[["__scopeId","data-v-7c660c1f"]]),Ns={};function As(a,l){return null}const Vs=Rt._export_sfc(Ns,[["render",As]]),Os={class:"form-operate-content"},Ms={class:"form-operate-item"},zs={class:"operate-title"},Fs={class:"operate-content"},Rs={class:"fix-content"},Ps={class:"fix-button"},Ls={class:"operate-title"},$s={class:"operate-content"},js={class:"fix-content"},Us={class:"fix-button"},Ks={style:{display:"flex","justify-content":"space-between"}},Ws={class:"form-content"},Hs={class:"dialog-footer"},qs={class:"form-content"},Gs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref(!1),c=e.ref([]),x=e.ref([]),v=e.ref(!1),f=e.ref([]),C=e.ref([]),w=e.ref(""),F=e.ref(!1),R=e.ref(0),H=e.ref([]),M=e.ref([]),ve=(P,re)=>{if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const ne=re==null?void 0:re.optionUrl;return(ne==null?void 0:ne.selectRelateType)||re[P.key]}if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const ne=re==null?void 0:re.optionUrl;return(ne==null?void 0:ne.menuSelect)||re[P.key]}if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const ne=re==null?void 0:re.optionUrl;return(ne==null?void 0:ne.groupSelect)||re[P.key]}if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(re==null?void 0:re.value)||re[P.key];if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const ne=re[P.key];return pr(ne)?ne:P.default}return(P==null?void 0:P.label)==="类型"&&re[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!re[P.key]?!1:re[P.key]},K=async P=>{var pe,He,ot,X,A,te;d.value=!0;let re=[];const ne=await((ot=(He=(pe=Ne.FormContent)==null?void 0:pe.find(ye=>(ye==null?void 0:ye.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:He.value)==null?void 0:ot.value)??((A=(X=Ne.FormContent)==null?void 0:X.find(ye=>(ye==null?void 0:ye.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:A.value);if(ne==null||ne.forEach(ye=>{R.value++,re.push({label:ye==null?void 0:ye.label,name:ye==null?void 0:ye.label,type:ye.type,prop:ye==null?void 0:ye.prop,value:ve(ye,P),id:R.value,contents:ye==null?void 0:ye.options,width:(P==null?void 0:P.width)??1})}),P!=null&&P.menuSelect&&((te=P==null?void 0:P.menuSelect)==null?void 0:te.length)>0){const ye=await Ne.menuToContentType(P==null?void 0:P.menuSelect);re=re==null?void 0:re.map(ue=>((ue==null?void 0:ue.name)==="组信息选项"&&(ue.contents=ye),ue))}w.value=P==null?void 0:P.id,c.value=await Ne.selectToBase(Ne.formToOptionsContents(re)),x.value=await Ne.selectToBase(Ne.formToOptionsContents(re))},O=P=>{var ne;v.value=!0;let re=[];(ne=Ne.FormButton)==null||ne.forEach(pe=>{R.value++,re.push({label:pe==null?void 0:pe.label,name:pe==null?void 0:pe.label,type:pe.type,value:(pe==null?void 0:pe.label)==="类型"&&P[pe.key]===""?"normal":P[pe.key],id:R.value,contents:pe==null?void 0:pe.options})}),H.value=re,M.value=re,w.value=P==null?void 0:P.id};e.watch(()=>F.value,()=>{var re,ne;let P=V.cloneDeep(s.originalItemContents);(re=V.cloneDeep(s.originalItemContents))!=null&&re.find(pe=>(pe==null?void 0:pe.key)==="enableWrap")?P=(ne=V.cloneDeep(s.originalItemContents))==null?void 0:ne.map(pe=>((pe==null?void 0:pe.key)==="enableWrap"&&(pe.contents=!F.value),pe)):P.push({key:"enableWrap",contents:!F.value}),r("change",P)},{deep:!0});const G=()=>{var ne,pe,He,ot,X;H.value=M.value;let P={};if(w.value!==""?P.id=w.value:(R.value++,P.id="id"+R.value),(ne=H.value)==null||ne.forEach(A=>{var ye;const te=(ye=Ne.FormButton)==null?void 0:ye.find(ue=>(ue==null?void 0:ue.label)===(A==null?void 0:A.label));te&&(P[te.key]=A.value)}),(pe=f.value)!=null&&pe.find(A=>A.id===P.id))f.value=(He=f.value)==null?void 0:He.map(A=>(A.id===P.id&&(A=P),A));else{let A=V.cloneDeep(f.value);f.value||(f.value=[]),A.push(P),f.value=A}v.value=!1,w.value="";let re=V.cloneDeep(s.originalItemContents);(ot=V.cloneDeep(s.originalItemContents))!=null&&ot.find(A=>(A==null?void 0:A.key)==="formButton")?re=(X=V.cloneDeep(s.originalItemContents))==null?void 0:X.map(A=>((A==null?void 0:A.key)==="formButton"&&(A.contents=f.value),A)):re.push({key:"formButton",contents:f.value}),r("change",re)},b=P=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var re,ne;C.value=(re=V.cloneDeep(C.value))==null?void 0:re.filter(pe=>(pe==null?void 0:pe.id)!==(P==null?void 0:P.id)),r("change",(ne=V.cloneDeep(s.originalItemContents))==null?void 0:ne.map(pe=>((pe==null?void 0:pe.key)==="formContent"&&(pe.contents=C.value),pe))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_=P=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var re,ne;f.value=(re=V.cloneDeep(f.value))==null?void 0:re.filter(pe=>(pe==null?void 0:pe.id)!==(P==null?void 0:P.id)),r("change",(ne=V.cloneDeep(s.originalItemContents))==null?void 0:ne.map(pe=>((pe==null?void 0:pe.key)==="formButton"&&(pe.contents=f.value),pe))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var re;v.value=!0;let P=[];(re=Ne.FormButton)==null||re.forEach(ne=>{R.value++,P.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:(ne==null?void 0:ne.label)==="类型"?"normal":"",id:R.value,contents:ne==null?void 0:ne.options})}),H.value=P,M.value=P},T=()=>{var re,ne,pe;d.value=!0;let P=[];(pe=(ne=(re=Ne.FormContent)==null?void 0:re.find(He=>(He==null?void 0:He.key)==="Input"))==null?void 0:ne.value)==null||pe.forEach(He=>{R.value++,P.push({label:He==null?void 0:He.label,name:He==null?void 0:He.label,type:He.type,value:(He==null?void 0:He.label)==="类型"?"Input":"",id:R.value,contents:He==null?void 0:He.options})}),c.value=P,x.value=P},h=P=>{let re=V.cloneDeep(M.value);re=re==null?void 0:re.map(ne=>(ne.value=P==null?void 0:P[ne.name],ne)),M.value=re},ce=P=>{const re=P.find(He=>(He==null?void 0:He.name)==="类型");if((re==null?void 0:re.value)!="Select")return;const ne=P.find(He=>(He==null?void 0:He.name)==="多选"),pe=P.find(He=>(He==null?void 0:He.name)==="初始值");ne!=null&&ne.value&&Do.isString(pe.value)&&(pe.value=[pe.value]),!(ne!=null&&ne.value)&&!Do.isString(pe.value)&&(pe.value="")},Ae=async P=>{var re,ne,pe,He,ot,X,A,te,ye,ue,De,Qe;if((P==null?void 0:P.类型)!==((ne=(re=x.value)==null?void 0:re.find(ae=>(ae==null?void 0:ae.label)==="类型"))==null?void 0:ne.value)){let ae=[];const _e=await((ot=(He=(pe=Ne.FormContent)==null?void 0:pe.find(I=>(I==null?void 0:I.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:He.value)==null?void 0:ot.value)?await((ue=(ye=(te=Ne.FormContent)==null?void 0:te.find(I=>(I==null?void 0:I.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:ye.value)==null?void 0:ue.value):(A=(X=Ne.FormContent)==null?void 0:X.find(I=>(I==null?void 0:I.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:A.value;if(_e==null||_e.forEach(I=>{var Ye,Ie;R.value++;const Xe=Ql(I==null?void 0:I.default)?(P==null?void 0:P[I.label])??I.value??"":I==null?void 0:I.default;ae.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:Xe,prop:I==null?void 0:I.prop,id:R.value,contents:I==null?void 0:I.options,width:((Ie=(Ye=x.value)==null?void 0:Ye[0])==null?void 0:Ie.width)??1})}),P!=null&&P.菜单选项&&((De=P==null?void 0:P.菜单选项)==null?void 0:De.length)>0){const I=await Ne.menuToContentType(P==null?void 0:P.菜单选项);ae=ae==null?void 0:ae.map(Xe=>((Xe==null?void 0:Xe.name)==="组信息选项"&&(Xe.contents=I),Xe))}ce(ae),x.value=await Ne.selectToBase(V.cloneDeep(ae)),c.value=await Ne.selectToBase(V.cloneDeep(ae))}else{let ae=V.cloneDeep(x.value);if(ae=ae==null?void 0:ae.map(_e=>(_e.value=P==null?void 0:P[_e.name],_e)),P!=null&&P.菜单选项&&((Qe=P==null?void 0:P.菜单选项)==null?void 0:Qe.length)>0){const _e=await Ne.menuToContentType(P==null?void 0:P.菜单选项);ae=ae==null?void 0:ae.map(I=>((I==null?void 0:I.name)==="组信息选项"&&(I.contents=_e),I))}ae=Ne.formToOptionsContents(ae),ce(ae),x.value=await Ne.selectToBase(V.cloneDeep(ae))}},at=P=>{P||(c.value=x.value)},we=async P=>{await Ae(P),c.value=x.value},Pe=dr(async()=>{var pe,He,ot,X,A,te,ye,ue,De,Qe,ae,_e;c.value=x.value;let P={};P.width=((He=(pe=c.value)==null?void 0:pe[0])==null?void 0:He.width)??1,w.value!==""?P.id=w.value:(R.value++,P.id="id"+R.value);let re=await((A=(X=(ot=Ne.FormContent)==null?void 0:ot.find(I=>{var Xe,Ye;return(I==null?void 0:I.key)===(((Ye=(Xe=c.value)==null?void 0:Xe.find(Ie=>(Ie==null?void 0:Ie.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:X.value)==null?void 0:A.value)??((ye=(te=Ne.FormContent)==null?void 0:te.find(I=>{var Xe,Ye;return(I==null?void 0:I.key)===(((Ye=(Xe=c.value)==null?void 0:Xe.find(Ie=>(Ie==null?void 0:Ie.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:ye.value);if((ue=c.value)==null||ue.forEach(I=>{const Xe=re==null?void 0:re.find(Ye=>(Ye==null?void 0:Ye.label)===(I==null?void 0:I.label));Xe&&(P[Xe.key]=I.value)}),P.width=P.width?P.width:1,P.key=P==null?void 0:P.label,P.isFormColHidden=P==null?void 0:P.isFormColHidden,(De=C.value)!=null&&De.find(I=>I.id===P.id))C.value=(Qe=C.value)==null?void 0:Qe.map(I=>(I.id===P.id&&(I=P),I));else{let I=V.cloneDeep(C.value);I.push(P),C.value=I}C.value=C.value.map(({id:I,...Xe})=>Xe),d.value=!1,w.value="";let ne=V.cloneDeep(s.originalItemContents);(ae=V.cloneDeep(s.originalItemContents))!=null&&ae.find(I=>(I==null?void 0:I.key)==="formContent")?ne=(_e=V.cloneDeep(s.originalItemContents))==null?void 0:_e.map(I=>((I==null?void 0:I.key)==="formContent"&&(I.contents=C.value),I)):ne.push({key:"formContent",contents:C.value}),r("change",ne)},300),Le=()=>{d.value=!1,v.value=!1,w.value="",x.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var re,ne,pe,He,ot,X;if(!s.originalItemContents||s.originalItemContents.length===0)return;const P=V.cloneDeep(s.originalItemContents);C.value=((re=P==null?void 0:P.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:re.contents)??[],f.value=((ne=P==null?void 0:P.find(A=>(A==null?void 0:A.key)==="formButton"))==null?void 0:ne.contents)??[],F.value=(pe=P==null?void 0:P.find(A=>(A==null?void 0:A.key)==="enableWrap"))!=null&&pe.contents?!((He=P==null?void 0:P.find(A=>(A==null?void 0:A.key)==="enableWrap"))!=null&&He.contents):!0,C.value=(ot=V.cloneDeep(C.value))==null?void 0:ot.map((A,te)=>{var ue;let ye=A;return ye.id=(A==null?void 0:A.id)??te,A!=null&&A.label||(A.label=(A==null?void 0:A.key)??(A==null?void 0:A.label)??""),A!=null&&A.type||(A.type=(A==null?void 0:A.type)??""),A.contents=((ue=A==null?void 0:A.options)==null?void 0:ue.length)===0?(A==null?void 0:A.contents)??"":A==null?void 0:A.options,ye}),C.value=Ne.formToOptionsContents(C.value),f.value=(X=f.value)==null?void 0:X.map((A,te)=>A={label:(A==null?void 0:A.label)??"",type:(A==null?void 0:A.type)??"",background:(A==null?void 0:A.background)??"var(--ssComponent-primary-color)",id:te})},{deep:!0,immediate:!0}),(P,re)=>{const ne=e.resolveComponent("svg-icon"),pe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Os,[e.createElementVNode("div",Ms,[e.createElementVNode("div",zs,[re[2]||(re[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:T},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[re[1]||(re[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(He,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",Rs,[e.createElementVNode("div",null,e.toDisplayString(He.label),1),e.createElementVNode("div",Ps,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>K(He)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>b(He)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ls,[re[4]||(re[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[re[3]||(re[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",$s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(He,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",js,[e.createElementVNode("div",null,e.toDisplayString(He.label),1),e.createElementVNode("div",Us,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>O(He)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>_(He)},null,8,["onClick"])])])]))),128))]),re[6]||(re[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Ks,[re[5]||(re[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:F.value,"onUpdate:modelValue":re[0]||(re[0]=He=>F.value=He)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Le,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ws,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:Ae,onChangeVisible:at,onBlurChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hs,[e.createVNode(pe,{onClick:Le,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(pe,{class:"ok-button button",onClick:e.unref(Pe),id:"themeButton"},{default:e.withCtx(()=>re[8]||(re[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:v.value,onBeforeDestroy:Le,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:h},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Le,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:G},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Io=Rt._export_sfc(Gs,[["__scopeId","data-v-20850524"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),c=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"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),C=e.ref({}),w=e.ref([]),F=K=>{var O;C.value=K,r("change",(O=M())==null?void 0:O.compData)},R=(K,O)=>{var G,b;switch(K){case"create":(G=c.value)==null||G.forEach(_=>{_.value=""}),f.value="create",v.visible=!0;break;case"update":(b=c.value)==null||b.forEach(_=>{_.value=O[_==null?void 0:_.prop]}),f.value="update",v.visible=!0;break;case"delete":w.value.splice(O,1),f.value="delete";break}},H=K=>{var O,G,b;if((K==null?void 0:K.buttonName)==="确认"){const _=V.cloneDeep(K==null?void 0:K.content);switch(Object.keys(_).forEach(y=>{_[y]===""&&delete _[y]}),f.value){case"create":w.value.push({..._,index:((O=w.value)==null?void 0:O.length)+1});break;case"update":w.value=(G=w.value)==null?void 0:G.map(y=>y.index===(_==null?void 0:_.index)?{...y,title:_==null?void 0:_.title,description:_==null?void 0:_.description}:y);break}r("change",(b=M())==null?void 0:b.compData),v.visible=!1}else v.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:w.value},{key:"stepConfig",contents:C.value}]}),ve=()=>{v.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var O,G;K&&(C.value=((O=K==null?void 0:K.find(b=>b.key==="stepConfig"))==null?void 0:O.contents)??{},w.value=((G=K==null?void 0:K.find(b=>b.key==="stepList"))==null?void 0:G.contents)??[])},{immediate:!0}),(K,O)=>{const G=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[O[2]||(O[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(b,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=_=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[O[1]||(O[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(_,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(_==null?void 0:_.title),1),e.createElementVNode("div",null,[e.createVNode(b,{type:"primary",size:"small",onClick:T=>R("update",{..._,index:y+1})},{default:e.withCtx(()=>O[3]||(O[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(b,{type:"danger",size:"small",onClick:T=>R("delete",y)},{default:e.withCtx(()=>O[4]||(O[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[O[5]||(O[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:d.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:ve,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=Rt._export_sfc(Qs,[["__scopeId","data-v-7dbd17f2"]]),tc={class:"step-module content"},nc={class:"module-data"},ac={class:"step-module layout"},oc={class:"form-content"},rc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref("create"),c=e.ref({}),x=e.ref([]),v=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),C=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),w=e.reactive({visible:!1,width:"40%",title:"时间线"}),F=K=>{var O;c.value=K,r("change",(O=M())==null?void 0:O.compData)},R=(K,O)=>{var G,b;switch(K){case"create":(G=f.value)==null||G.forEach(_=>{_.value=""}),d.value="create",w.visible=!0;break;case"update":(b=f.value)==null||b.forEach(_=>{_.value=O[_==null?void 0:_.prop]}),d.value="update",w.visible=!0;break;case"delete":x.value.splice(O,1),d.value="delete";break}},H=K=>{var O,G,b,_;if((K==null?void 0:K.buttonName)==="确认"){const y=V.cloneDeep(K==null?void 0:K.content);switch(Object.keys(y).forEach(T=>{y[T]===""&&delete y[T]}),d.value){case"create":(G=x.value)==null||G.push({...y,index:((O=x.value)==null?void 0:O.length)+1});break;case"update":x.value=(b=x.value)==null?void 0:b.map(T=>T.index===(y==null?void 0:y.index)?{...T,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:T);break}r("change",(_=M())==null?void 0:_.compData),w.visible=!1}else w.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:c.value}]}),ve=()=>{w.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var O,G;K&&(c.value=((O=K==null?void 0:K.find(b=>b.key==="timeLineConfig"))==null?void 0:O.contents)??{},x.value=((G=K==null?void 0:K.find(b=>b.key==="timeLineList"))==null?void 0:G.contents)??[])},{immediate:!0}),(K,O)=>{const G=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",tc,[O[2]||(O[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(b,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=_=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[O[1]||(O[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(_,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(_==null?void 0:_.content),1),e.createElementVNode("div",null,[e.createVNode(b,{type:"primary",size:"small",onClick:T=>R("update",{..._,index:y+1})},{default:e.withCtx(()=>O[3]||(O[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(b,{type:"danger",size:"small",onClick:T=>R("delete",y)},{default:e.withCtx(()=>O[4]||(O[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",ac,[O[5]||(O[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:v.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:w.visible,title:w.title,onBeforeDestroy:ve,width:w.width},{default:e.withCtx(()=>[e.createElementVNode("div",oc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:C.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),lc=Rt._export_sfc(rc,[["__scopeId","data-v-39ffc861"]]),ic={};function sc(a,l){return e.openBlock(),e.createElementBlock("div")}const cc=Rt._export_sfc(ic,[["render",sc]]),uc={class:"extra-content"},dc={key:0},pc={key:1},fc={class:"dialog-footer"},hc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const s=a,r=e.ref(0),d=e.ref(),c=e.ref(),x=l,v=e.ref(!1),f=e.ref({}),C=e.ref({}),w=e.ref();e.watch(()=>[s.itemData],()=>{var _;const b=V.cloneDeep(s.itemData);d.value=(_=V.cloneDeep(b))==null?void 0:_.map(y=>{var T;if(y.key==="extra"){let h=[];(T=y.value)==null||T.forEach(ce=>{var Ae;h.push((Ae=Object.values(ce))==null?void 0:Ae[0])}),y.value=h}return y})},{deep:!0,immediate:!0});const F=(b,_,y,T)=>{var ce;let h={};((ce=b==null?void 0:b[0])==null?void 0:ce.contents)==="详情"&&(v.value=!0,h[_]=b,c.value=b==null?void 0:b.filter(Ae=>(Ae==null?void 0:Ae.key)!=="tableContentName"),f.value=h,C.value=y,w.value=T.id)},R=b=>{var Ae,at,we,Pe;const _=(at=(Ae=Object.values(V.cloneDeep(f.value)))==null?void 0:Ae[0])==null?void 0:at.filter(Le=>(Le==null?void 0:Le.key)==="tableContentName"),y=(Pe=(we=Object.values(V.cloneDeep(f.value)))==null?void 0:we[0])==null?void 0:Pe.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),T=y==null?void 0:y.map((Le,P)=>{var re;return P===b.index&&(Le==null?void 0:Le.comp)==="Table"&&(Le.compData=(re=Le.compData)==null?void 0:re.map(ne=>{var pe,He;return(ne==null?void 0:ne.key)==="tableContents"&&(ne.contents=(He=(pe=b.content)==null?void 0:pe.map(ot=>{let X={};for(let A in ot)A!=="id"&&(X[A]=ot[A]);return X}))==null?void 0:He.map(ot=>Object.values(ot))),ne})),Le});T.unshift(_==null?void 0:_[0]);let h=V.cloneDeep(f.value),ce={};for(let Le in h)ce[Le]=T;f.value=ce},H=()=>{v.value=!1,f.value={},C.value={},w.value=void 0,r.value++},M=b=>{var Ae,at,we,Pe;const _=(at=(Ae=Object.values(V.cloneDeep(f.value)))==null?void 0:Ae[0])==null?void 0:at.filter(Le=>(Le==null?void 0:Le.key)==="tableContentName"),y=(Pe=(we=Object.values(V.cloneDeep(f.value)))==null?void 0:we[0])==null?void 0:Pe.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),T=y==null?void 0:y.map((Le,P)=>(P===b.index&&(Le.compData=b.contents),Le));T.unshift(_==null?void 0:_[0]);let h=V.cloneDeep(f.value),ce={};for(let Le in h)ce[Le]=T;f.value=ce},ve=()=>{var _,y;let b={};for(let T in C.value)T===((_=Object.keys(f.value))==null?void 0:_[0])?b[T]=(y=Object.values(f.value))==null?void 0:y[0]:b[T]=C.value[T];x("change",{buttonName:"编辑",index:w.value,singleContent:b},"methodData"),v.value=!1,f.value={},C.value={},w.value=void 0},K=()=>{v.value=!1,f.value={},C.value={},w.value=void 0},O=b=>{x("change",b,"methodData")},G=b=>aa(b);return(b,_)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(T,h)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(T==null?void 0:T.key)==="extra"?(e.openBlock(),e.createElementBlock("div",dc)):(e.openBlock(),e.createElementBlock("div",pc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(T.comp)),{itemData:T==null?void 0:T.compData,childItemData:T==null?void 0:T.itemChildData,key:h,index:(T==null?void 0:T.id)??h,onContentClick:F,onChange:O},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:v.value,onBeforeDestroy:K},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(T,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(T.comp)),{itemData:T==null?void 0:T.compData,onChange:R,childItemData:T==null?void 0:T.itemChildData,key:h,onContentChange:M,index:(T==null?void 0:T.id)??h,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",fc,[e.createVNode(y,{class:"cancel-button footer-button",onClick:H,id:"themeBorderButton"},{default:e.withCtx(()=>_[0]||(_[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>_[1]||(_[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},vc=Rt._export_sfc(hc,[["__scopeId","data-v-2d9c5ab2"]]),mc={key:0,class:"method-content"},gc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),s=Ne.useOriginalState(xe.pinia),{originalPath:r}=xe.storeToRefs(s),d=a,c=e.ref(!1),x=e.ref(),v=Ne.useTableComp(xe.pinia),{multipleTableConst:f}=xe.storeToRefs(v),C=V.useModelComp(xe.pinia),w=e.ref(!1),F=V.useMenuState(xe.pinia),R=V.useLoginState(xe.pinia),{itemData:H,isEdit:M,routeToChildPath:ve,tableViewContents:K,lockingPage:O,payloadTypes:G}=xe.storeToRefs(C),{activeMenuPath:b,platform:_,childMenu:y}=xe.storeToRefs(F),{loginUserInfo:T}=xe.storeToRefs(R),h=e.ref(!1),ce=async()=>{var X,A;(X=l.value)!=null&&X.find(te=>(te==null?void 0:te.buttonName)==="保存")&&await ne((A=l.value)==null?void 0:A.find(te=>(te==null?void 0:te.buttonName)==="保存")),await Ne.onSaveBack()};e.watch(()=>H.value,async()=>{M.value==="view"&&!h.value&&await ot(V.cloneDeep(d.itemData)),h.value=!1},{deep:!0});const Ae=()=>{c.value=!1,x.value=void 0},at=X=>X.map(A=>{const te={};for(const ye in A){const ue=A[ye];if(ye.includes(f.value)){const De=ye.split(f.value);let Qe=te;De.forEach((ae,_e)=>{_e===De.length-1?Qe[ae]=ue:(Qe[ae]||(Qe[ae]={}),Qe=Qe[ae])})}else te[ye]=ue}return te}),we=async(X,A,te=[])=>{var ue,De,Qe,ae,_e,I,Xe,Ye,Ie,le,Q,se,Ee,qe,dt;let ye=(ue=V.cloneDeep(A))==null?void 0:ue.filter(m=>(m==null?void 0:m.comp)!=="methodButton");if(X!=null&&X.includes("[")){let m=(I=(_e=(ae=(Qe=(De=V.cloneDeep(X))==null?void 0:De.split("["))==null?void 0:Qe[1])==null?void 0:ae.split("]"))==null?void 0:_e[0])==null?void 0:I.split(":"),S="";if(m!=null&&m[0]){let U=(Xe=ye==null?void 0:ye.find(J=>(J==null?void 0:J.name)===(m==null?void 0:m[0])))==null?void 0:Xe.compData;if(!U){let J=(Ye=X==null?void 0:X.split("["))==null?void 0:Ye[0],D=await Ne.getItemData(J,sessionStorage.getItem("systemKey"),"",!1,"","",te);U=(Ie=D==null?void 0:D.find(oe=>(oe==null?void 0:oe.name)===(m==null?void 0:m[0])))==null?void 0:Ie.compData}U==null||U.forEach(J=>{var D,oe,Ve,B,ee,$;if((J==null?void 0:J.key)==="formContent")(D=J==null?void 0:J.contents)==null||D.forEach(W=>{var Se;(W==null?void 0:W.key)===(m==null?void 0:m[1])&&(Array.isArray(W==null?void 0:W.value)?S=W==null?void 0:W.value:S=(Se=W==null?void 0:W.value)==null?void 0:Se.toString())});else if((J==null?void 0:J.key)==="tableContents"){let W=[],Se=(oe=U==null?void 0:U.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:oe.contents,ie=(m==null?void 0:m[1])??"";if(Se!=null&&Se.every(q=>Array.isArray(q))){let q=Ne.getColumnChild((ee=Se==null?void 0:Se[0])==null?void 0:ee.filter(Z=>(Z==null?void 0:Z.label)!=="操作"));($=J.contents)==null||$.forEach(Z=>{let de={};Z=Z==null?void 0:Z.filter(me=>!(me!=null&&me.id)),q==null||q.forEach((me,Ce)=>{let be=Z[Ce];typeof Z[Ce]=="number"&&(be=Z[Ce].toString()),(ie===""||ie===me.prop)&&(de[me.prop]=be)}),W.push(de)}),W=at(W)}else{let q=(Ve=Se==null?void 0:Se.map(Z=>Z==null?void 0:Z.label))==null?void 0:Ve.filter(Z=>Z!=="操作");(B=J.contents)==null||B.forEach(Z=>{let de={};Z=Z==null?void 0:Z.filter(me=>!(me!=null&&me.id)),q==null||q.forEach((me,Ce)=>{let be=Z[Ce];typeof Z[Ce]=="number"&&(be=Z[Ce].toString()),(ie===""||ie===me)&&(de[me]=be)}),W.push(de)})}S=W}})}return S}else if(X!=null&&X.includes("/")){let m={};return(le=V.cloneDeep(ye))==null||le.forEach((S,U)=>{var J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge;if((S==null?void 0:S.comp)==="Table"){let Ue=Array.isArray((oe=(D=(J=S==null?void 0:S.compData)==null?void 0:J.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:D.contents)==null?void 0:oe[0])?($=(ee=(B=(Ve=S==null?void 0:S.compData)==null?void 0:Ve.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:B.contents)==null?void 0:ee[0])==null?void 0:$.some(Be=>Be==null?void 0:Be.children):[],rt=(ie=(Se=(W=S==null?void 0:S.compData)==null?void 0:W.find(Be=>(Be==null?void 0:Be.key)==="tableContents"))==null?void 0:Se.contents)==null?void 0:ie.map(Be=>(Be!=null&&Be.find(mt=>mt==null?void 0:mt.id)&&(Be=Be.slice(1)),Be)),$e=(Ce=(me=(de=(Z=(q=S==null?void 0:S.compData)==null?void 0:q.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:Z.contents)==null?void 0:de[0])==null?void 0:me[0])==null?void 0:Ce.label,nt=(j=(be=S==null?void 0:S.compData)==null?void 0:be.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:j.contents;if(Ue)(Ue==null?void 0:Ue.length)===0?m[S.name]=m!=null&&m[S.name]?m[S.name]:Ne.tableToForm(rt,nt):m[$e]=Ne.tableToForm(rt,nt);else{const Be=[];nt=nt.slice(1,nt.length-1),nt==null||nt.forEach((mt,et)=>{rt==null||rt.forEach(Oe=>{Be.push({key:mt.label+Oe[0],value:Oe[et+1]})})}),m["form"+U]=Be}}else{const Ue=(ge=(Me=S.compData)==null?void 0:Me.find($e=>($e==null?void 0:$e.key)==="formContent"))==null?void 0:ge.contents;m!=null&&m.form||(m.form=[]);const rt=[];Ue==null||Ue.forEach($e=>{$e.key!==""&&($e={key:($e==null?void 0:$e.key)??($e==null?void 0:$e.label),value:$e==null?void 0:$e.value},rt.push($e))}),m.form=[...rt,...V.cloneDeep(m==null?void 0:m.form)]}}),m}else{if(X==="createInsofDataApi"){let m=(Q=V.cloneDeep(A))==null?void 0:Q[0];return m={comp:(se=V.cloneDeep(m))==null?void 0:se.comp,compData:(Ee=V.cloneDeep(m))==null?void 0:Ee.compData,name:(qe=V.cloneDeep(m))==null?void 0:qe.name,isShow:(dt=V.cloneDeep(m))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:b.value},value:{pageData:m}}}return X}},Pe=async(X,A,te)=>{var De,Qe,ae;let ye=await Ne.getItemData(A,sessionStorage.getItem("systemKey"),""),ue=ye==null?void 0:ye.find(_e=>(_e==null?void 0:_e.name)===(te==null?void 0:te[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let _e={};for(let se in V.cloneDeep(X))V.cloneDeep(X)[se]!=="loginUser"?_e[se]=V.cloneDeep(X)[se]:_e[se]=((De=T.value)==null?void 0:De.account)||((Qe=T.value)==null?void 0:Qe.账号);let I=[],Xe=_e;Array.isArray(X)||(Xe=[_e]),Xe==null||Xe.forEach(se=>{I.push({[se[te[1]]]:se})});let Ye=[],Ie=I==null?void 0:I.map(se=>{var Ee;return(Ee=Object.keys(se))==null?void 0:Ee[0]});ye==null||ye.forEach(se=>{var Ee;(se==null?void 0:se.name)===(te==null?void 0:te[0])&&((Ee=se==null?void 0:se.compData)==null||Ee.forEach(qe=>{var dt;(qe==null?void 0:qe.key)==="tableContents"&&((dt=qe==null?void 0:qe.contents)==null||dt.forEach(m=>{m!=null&&m.some(S=>Ie.includes(S))&&Ye.push({[m.find(S=>S.id).id]:m.find(S=>Ie.includes(S))})}))}))});let le=Ye==null?void 0:Ye.map(se=>{var Ee;return(Ee=Object.keys(se))==null?void 0:Ee[0]}),Q=[];if(le==null||le.forEach(se=>{var dt;let Ee=(dt=Ye==null?void 0:Ye.find(m=>{var S;return((S=Object.keys(m))==null?void 0:S[0].toString())===se.toString()}))==null?void 0:dt[se],qe=I==null?void 0:I.find(m=>{var S;return((S=Object.keys(m))==null?void 0:S[0])===Ee});Q.push({id:parseInt(se),value:{tableData:qe[Ee]}})}),(Q==null?void 0:Q.length)>0)return Q}else if((ue==null?void 0:ue.comp)==="Form"){let _e=V.cloneDeep(ue);_e.compData=(ae=_e.compData)==null?void 0:ae.map(Ye=>{var Ie;return(Ye==null?void 0:Ye.key)==="formContent"&&(Ye.contents=(Ie=Ye.contents)==null?void 0:Ie.map(le=>((le==null?void 0:le.key)===(te==null?void 0:te[1])&&(le.value=(X==null?void 0:X[le==null?void 0:le.prop])||X),le))),Ye});let I={};for(let Ye in _e)Ye!=="id"&&(I[Ye]=_e[Ye]);let Xe=[];if(Xe.push({id:ue==null?void 0:ue.id,keyType:te==null?void 0:te[1],value:{pageData:I}}),(Xe==null?void 0:Xe.length)>0)return Xe}}},Le=async(X,A,te)=>{var De,Qe,ae,_e,I,Xe,Ye,Ie,le,Q;let ye=await Ne.getItemData(A,sessionStorage.getItem("systemKey"),""),ue=ye==null?void 0:ye.find(se=>(se==null?void 0:se.name)===(te==null?void 0:te[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let se={};for(let Ee in V.cloneDeep(X))V.cloneDeep(X)[Ee]!=="loginUser"?se[Ee]=V.cloneDeep(X)[Ee]:se[Ee]=((De=T.value)==null?void 0:De.account)||((Qe=T.value)==null?void 0:Qe.账号);await xe.createInsofDataApi({key:{type:"data",pageKey:A,tableId:ue==null?void 0:ue.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:se}})}else if((ue==null?void 0:ue.comp)==="Form"){let se=V.cloneDeep(ue),Ee=Object.keys(X),qe="";(_e=(ae=V.cloneDeep(se))==null?void 0:ae.compData)==null||_e.forEach(D=>{var oe,Ve;(D==null?void 0:D.key)==="formContent"&&((Ve=(oe=V.cloneDeep(D))==null?void 0:oe.contents)==null||Ve.forEach(B=>{var ee;Ee.includes(B==null?void 0:B.key)&&(B==null?void 0:B.value)===((ee=T.value)==null?void 0:ee.姓名)&&(qe=B==null?void 0:B.key)}))});let dt=[];(I=Object.values(X[qe]))==null||I.forEach(D=>{D!=null&&D.includes("(")&&dt.push(D)}),dt=[...new Set(dt)];const m=dt==null?void 0:dt.map(async D=>{var $,W,Se,ie,q,Z,de,me,Ce,be,j,Me;let oe="";(Z=(q=(ie=(Se=(W=($=V.cloneDeep(D))==null?void 0:$.split("("))==null?void 0:W[1])==null?void 0:Se.split(")"))==null?void 0:ie[0])==null?void 0:q.split(":"))==null||Z.forEach(ge=>{oe=oe===""?oe+ge.replaceAll("'",""):oe+"/"+ge.replaceAll("'","")});let Ve=[];(Me=(j=(be=(Ce=(me=(de=V.cloneDeep(D))==null?void 0:de.split("<"))==null?void 0:me[1])==null?void 0:Ce.split(">"))==null?void 0:be[0])==null?void 0:j.split(":"))==null||Me.forEach(ge=>{Ve.push(ge.replaceAll("'",""))});const B=await Ne.getItemData(oe,sessionStorage.getItem("systemKey"),"");let ee="";return B==null||B.forEach(ge=>{var Ue;ge.name===(Ve==null?void 0:Ve[0])&&((Ue=ge==null?void 0:ge.compData)==null||Ue.forEach(rt=>{var $e;(rt==null?void 0:rt.key)==="formContent"&&(($e=rt.contents)==null||$e.forEach(nt=>{(nt==null?void 0:nt.key)===(Ve==null?void 0:Ve[1])&&(ee=nt==null?void 0:nt.value)}))}))}),{[D]:ee}}),S=await Promise.all(m);se.compData=(Ye=(Xe=V.cloneDeep(se))==null?void 0:Xe.compData)==null?void 0:Ye.map(D=>{var oe,Ve;return(D==null?void 0:D.key)==="formContent"&&(D.contents=(Ve=(oe=V.cloneDeep(D))==null?void 0:oe.contents)==null?void 0:Ve.map(B=>{var ee,$,W,Se;return(ee=X[qe])!=null&&ee[B==null?void 0:B.key]&&(X[qe][B==null?void 0:B.key].includes("(")?B.value=($=S==null?void 0:S.find(ie=>{var q;return((q=Object.keys(ie))==null?void 0:q[0])===X[qe][B==null?void 0:B.key]}))==null?void 0:$[X[qe][B==null?void 0:B.key]]:B.value=(Se=(W=V.cloneDeep(X))==null?void 0:W[qe])==null?void 0:Se[B==null?void 0:B.key]),B})),D});const U=await xe.getInsofDataApi({key:{type:"structure",pageKey:A,systemKey:sessionStorage.getItem("systemKey")}});let J="";((Ie=U==null?void 0:U.data)==null?void 0:Ie.type)==="success"&&((Q=(le=U==null?void 0:U.data)==null?void 0:le.result)==null||Q.forEach(D=>{var oe,Ve;((Ve=(oe=D==null?void 0:D.value)==null?void 0:oe.pageData)==null?void 0:Ve.name)===(te==null?void 0:te[0])&&(J=D.id)}),await xe.updateInsofDataApi({id:J,value:{pageData:se}}))}}},P=(X,A="",te={})=>{for(const[ye,ue]of Object.entries(X)){const De=A?`${A}.${ye}`:ye;ue!==null&&typeof ue=="object"&&!Array.isArray(ue)&&Object.prototype.toString.call(ue)!=="[object Date]"?P(ue,De,te):te[De]=ue}return te},re=async(X,A,te,ye)=>{var Qe,ae,_e,I,Xe,Ye,Ie,le,Q,se,Ee,qe,dt,m,S,U,J,D,oe,Ve,B,ee,$,W,Se;let ue=await Ne.getItemData(A,sessionStorage.getItem("systemKey"),""),De=ue==null?void 0:ue.find(ie=>(ie==null?void 0:ie.name)===(te==null?void 0:te[0]));if(De){if(!(te!=null&&te[1])&&(De==null?void 0:De.comp)==="Table"){let ie={},q=[],Z=(ae=(Qe=De==null?void 0:De.compData)==null?void 0:Qe.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:ae.contents;Z!=null&&Z.every(Ce=>Array.isArray(Ce))?q=(I=Ne.getColumnChild((_e=Z==null?void 0:Z[0])==null?void 0:_e.filter(Ce=>(Ce==null?void 0:Ce.label)!=="操作")))==null?void 0:I.map(Ce=>Ce==null?void 0:Ce.prop):q=Z==null?void 0:Z.map(Ce=>Ce==null?void 0:Ce.label);for(let Ce in V.cloneDeep(X))if(V.cloneDeep(X)[Ce]!=="loginUser"){let be=P(V.cloneDeep(X)[Ce]),j={};for(let Me in be)if(q!=null&&q.find(ge=>ge===Me))j[Me]=be[Me];else if(q!=null&&q.find(ge=>(ge==null?void 0:ge.toUpperCase())===(Me==null?void 0:Me.toUpperCase()))){let ge=q==null?void 0:q.find(Ue=>(Ue==null?void 0:Ue.toUpperCase())===(Me==null?void 0:Me.toUpperCase()));j[ge]=be[Me]}ie[Ce]=j}else ie[Ce]=((Xe=T.value)==null?void 0:Xe.account)||((Ye=T.value)==null?void 0:Ye.账号);let de=await xe.getInsofDataApi({keyLikes:{tableId:De==null?void 0:De.id}});if(((le=(Ie=de==null?void 0:de.data)==null?void 0:Ie.result)==null?void 0:le.length)>0){let Ce=(se=(Q=de==null?void 0:de.data)==null?void 0:Q.result)==null?void 0:se.map(be=>be==null?void 0:be.id);(Ce==null?void 0:Ce.length)>0&&await xe.batchDeleteInsofDataApi({ids:Ce})}let me=[];if((Ee=De==null?void 0:De.compData)!=null&&Ee.find(Ce=>(Ce==null?void 0:Ce.key)==="pageColumn")&&((m=(dt=(qe=De==null?void 0:De.compData)==null?void 0:qe.find(Ce=>(Ce==null?void 0:Ce.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&m.includes("["))){const Ce=await xe.getInsofDataApi({id:De==null?void 0:De.tableId});let be=((D=(J=(U=(S=Ce==null?void 0:Ce.data)==null?void 0:S.result)==null?void 0:U[0])==null?void 0:J.key)==null?void 0:D.pageKey)??"";(oe=Object.values(ie))==null||oe.forEach(j=>{me.push({key:{type:"data",pageKey:be,tableId:De==null?void 0:De.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:j}})})}else(Ve=Object.values(ie))==null||Ve.forEach(Ce=>{me.push({key:{type:"data",pageKey:A,tableId:De==null?void 0:De.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ce}})});(me==null?void 0:me.length)>0&&await xe.batchAddInsofDataApi({dataList:me})}else if(!(te!=null&&te[1])&&(De==null?void 0:De.comp)==="Form"){let ie=V.cloneDeep(De);ie.compData=(ee=(B=V.cloneDeep(ie))==null?void 0:B.compData)==null?void 0:ee.map(de=>{var me,Ce;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(Ce=(me=V.cloneDeep(de))==null?void 0:me.contents)==null?void 0:Ce.map(be=>{var j,Me;return(j=V.cloneDeep(X))!=null&&j[be==null?void 0:be.key]&&(be.value=(Me=V.cloneDeep(X))==null?void 0:Me[be==null?void 0:be.key]),be})),de});const q=await xe.getInsofDataApi({key:{type:"structure",pageKey:A,systemKey:sessionStorage.getItem("systemKey")}});let Z="";(($=q==null?void 0:q.data)==null?void 0:$.type)==="success"&&((Se=(W=q==null?void 0:q.data)==null?void 0:W.result)==null||Se.forEach(de=>{var me,Ce;((Ce=(me=de==null?void 0:de.value)==null?void 0:me.pageData)==null?void 0:Ce.name)===(te==null?void 0:te[0])&&(Z=de.id)}),await xe.updateInsofDataApi({id:Z,value:{pageData:ie}}))}}},ne=async X=>{var A,te,ye,ue,De,Qe,ae,_e,I,Xe,Ye,Ie,le,Q,se,Ee;F.setImportLoading(!0);try{if(X.api){let qe=new WeakMap;(te=(A=(await xe.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:G.value})).data.result)==null?void 0:A.filter($=>{var W,Se;return((W=$==null?void 0:$.key)==null?void 0:W.pageKey)!=="menu"&&((Se=$==null?void 0:$.key)==null?void 0:Se.pageKey)!=="secret"}))==null||te.forEach($=>{qe[$.key.pageKey]?qe[$.key.pageKey]=[...qe[$.key.pageKey],$]:qe[$.key.pageKey]=[$]});let m=await Ne.getItemData((y==null?void 0:y.value)===""?b.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",qe),S="";if(m=m==null?void 0:m.map($=>{var W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge;if(($==null?void 0:$.comp)==="Form")$.compData=(W=$.compData)==null?void 0:W.map(Ue=>{var rt;return(Ue==null?void 0:Ue.key)==="formContent"&&(Ue.contents=(rt=Ue.contents)==null?void 0:rt.map($e=>{var nt;if(($e==null?void 0:$e.value)===""&&($e==null?void 0:$e.type)==="Select"){let Be=Ne.judgeContents((nt=V.cloneDeep($e))==null?void 0:nt.optionUrl,qe);$e.value=$e.value||Be}return $e})),Ue});else if(($==null?void 0:$.comp)==="Table"&&(Se=$.compData)!=null&&Se.find(Ue=>(Ue==null?void 0:Ue.key)==="pageColumn")){let Ue=(q=(ie=$.compData)==null?void 0:ie.find(Be=>(Be==null?void 0:Be.key)==="pageColumn"))==null?void 0:q.contents,rt=((de=(Z=$.compData)==null?void 0:Z.find(Be=>(Be==null?void 0:Be.key)==="pageGroup"))==null?void 0:de.contents)??"",$e=(be=(Ce=(me=Ue==null?void 0:Ue.split("["))==null?void 0:me[1])==null?void 0:Ce.split("]"))==null?void 0:be[0];S=((j=Ue==null?void 0:Ue.split("["))==null?void 0:j[0])+((ge=(Me=K.value)==null?void 0:Me.find(Be=>(Be==null?void 0:Be.key)===$e))==null?void 0:ge.value)}return $}),!(S===""||S==="")){const $=await Ne.getItemData(S,sessionStorage.getItem("systemKey"),"",!1,"","",qe);m=m==null?void 0:m.map(W=>{var Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt;if((W==null?void 0:W.comp)==="Table"&&(Se=W.compData)!=null&&Se.find($e=>($e==null?void 0:$e.key)==="pageColumn")){let $e=(q=(ie=W.compData)==null?void 0:ie.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn"))==null?void 0:q.contents,nt=((de=(Z=W.compData)==null?void 0:Z.find(Oe=>(Oe==null?void 0:Oe.key)==="pageGroup"))==null?void 0:de.contents)??"",Be=(be=(Ce=(me=$e==null?void 0:$e.split("["))==null?void 0:me[1])==null?void 0:Ce.split("]"))==null?void 0:be[0],mt=((j=$e==null?void 0:$e.split("["))==null?void 0:j[0])+((ge=(Me=K.value)==null?void 0:Me.find(Oe=>(Oe==null?void 0:Oe.key)===Be))==null?void 0:ge.value),et=(Ue=$==null?void 0:$.find(Oe=>(Oe==null?void 0:Oe.name)===(nt===""?d==null?void 0:d.compName:nt)))==null?void 0:Ue.compData;W.compData=(rt=W.compData)==null?void 0:rt.map(Oe=>{var it;return(Oe==null?void 0:Oe.key)==="tableContents"&&(Oe.contents=(it=et==null?void 0:et.find(gt=>(gt==null?void 0:gt.key)==="tableContents"))==null?void 0:it.contents),Oe})}return W})}let U={};if(((ue=(ye=X==null?void 0:X.extraValues)==null?void 0:ye.input)==null?void 0:ue.length)>0){const $=(Qe=(De=X==null?void 0:X.extraValues)==null?void 0:De.input)==null?void 0:Qe.map(async W=>{var Se;pe!=null&&pe.find(ie=>ie===W)?U=await we(W,m):U[Object.keys(W)[0]]=await we((Se=Object.values(W))==null?void 0:Se[0],m,qe)});await Promise.all($)}else U=await we("/",m);let J=!1;(_e=(ae=X==null?void 0:X.extraValues)==null?void 0:ae.output)==null||_e.forEach($=>{var W,Se;(Se=(W=Object.values($))==null?void 0:W[0])!=null&&Se.includes(".doc")&&(J=!0)});let D;if(J){const $=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});D=await xe.axios.post(X.api,U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{$.close()})}else D=await xe.axios.post(X.api,U,{headers:{"Content-Type":"application/json"}});let oe=(Ie=(Ye=(Xe=(I=V.cloneDeep(X))==null?void 0:I.extraValues)==null?void 0:Xe.output)==null?void 0:Ye.map($=>{var W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt,$e,nt;if(!((Se=(W=Object.values($))==null?void 0:W[0])!=null&&Se.includes(".doc"))){let Be=(j=(be=(Ce=(q=V.cloneDeep((ie=Object.values($))==null?void 0:ie[0]))==null?void 0:q.split("["))==null?void 0:Ce[((me=(de=V.cloneDeep((Z=Object.values($))==null?void 0:Z[0]))==null?void 0:de.split("["))==null?void 0:me.length)-1])==null?void 0:be.split("]"))==null?void 0:j[0],mt=Be==null?void 0:Be.split(":"),et=(Ue=V.cloneDeep((Me=Object.values($))==null?void 0:Me[0]))==null?void 0:Ue.substring(0,V.cloneDeep((ge=Object.values($))==null?void 0:ge[0]).lastIndexOf("["));if(et=($e=V.cloneDeep(et))==null?void 0:$e.slice(0,((rt=V.cloneDeep(et))==null?void 0:rt.length)-1),et!=null&&et.includes("[")){let Oe="";if((nt=Ne.contentTransArrayToAll(et,"/"))==null||nt.forEach(it=>{var gt,Je,je,It,Te,Ge,Fe;if(!(it!=null&&it.includes("[")))Oe=Oe===""?Oe+it.replaceAll("/",""):Oe+"/"+it.replaceAll("/","");else{let Ze=V.cloneDeep(it).slice(1,((gt=V.cloneDeep(it))==null?void 0:gt.length)-1),E=(Ge=(Te=(It=(je=(Je=V.cloneDeep(Ze))==null?void 0:Je.split("["))==null?void 0:je[1])==null?void 0:It.split("]"))==null?void 0:Te[0])==null?void 0:Ge.split(":"),fe="",Ke=(Fe=m==null?void 0:m.find(he=>(he==null?void 0:he.name)===(E==null?void 0:E[0])))==null?void 0:Fe.compData;Ke==null||Ke.forEach(he=>{var ut;(he==null?void 0:he.key)==="formContent"&&((ut=he==null?void 0:he.contents)==null||ut.forEach(st=>{(st==null?void 0:st.key)===(E==null?void 0:E[1])&&(fe=st==null?void 0:st.value)}))}),Oe=Oe===""?Oe+fe.replaceAll("/",""):Oe+"/"+fe.replaceAll("/","")}}),et=Oe,et[(et==null?void 0:et.length)-1]!=="/")return et}}}))==null?void 0:Ie.filter($=>$);oe=[...new Set(V.cloneDeep(oe))];let Ve=oe==null?void 0:oe.map(async $=>{let W=await Ne.getItemData($,sessionStorage.getItem("systemKey"),"",!1,"","",qe);if((W==null?void 0:W.length)===0)return await Ne.getParentContents($)});await Promise.all(Ve);let B=[],ee=(se=(Q=(le=V.cloneDeep(X))==null?void 0:le.extraValues)==null?void 0:Q.output)==null?void 0:se.map(async $=>{var Ce,be,j,Me,ge,Ue,rt,$e,nt,Be,mt,et,Oe,it,gt,Je,je,It,Te,Ge,Fe,Ze,E,fe,Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt,vt,Mt,Lt,Ut,Wt,Jt,Pt,En,zn,gn,Fn,yn,Rn,Pn,Ln,$n,jn,Sn,hn,un,bn,vn,nn,pn,Un,Tn,Bn,kn,Kn,Wn,In,Hn,qn,_t,Yt;if((be=(Ce=Object.values($))==null?void 0:Ce[0])!=null&&be.includes(".doc")){var W=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"}),Se=D.headers["content-disposition"],ie=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),q=ie.exec(Se),Z=q==null?void 0:q[1],de=document.createElement("a"),me=window.URL.createObjectURL(W);x.value=[{name:Z,blobUrl:me}],c.value=!0}else{let yt=(Be=(nt=($e=(Me=V.cloneDeep((j=Object.values($))==null?void 0:j[0]))==null?void 0:Me.split("["))==null?void 0:$e[((rt=(Ue=V.cloneDeep((ge=Object.values($))==null?void 0:ge[0]))==null?void 0:Ue.split("["))==null?void 0:rt.length)-1])==null?void 0:nt.split("]"))==null?void 0:Be[0],Ot=yt==null?void 0:yt.split(":"),bt=(Oe=V.cloneDeep((mt=Object.values($))==null?void 0:mt[0]))==null?void 0:Oe.substring(0,V.cloneDeep((et=Object.values($))==null?void 0:et[0]).lastIndexOf("["));if(bt!=null&&bt.includes("[")?bt=(gt=V.cloneDeep(bt))==null?void 0:gt.slice(0,((it=V.cloneDeep(bt))==null?void 0:it.length)-1):bt===""&&(bt=b.value),bt=bt.replaceAll("<","[").replaceAll(">","]"),bt!=null&&bt.includes("[")){let Dt="";(Je=Ne.contentTransArrayToAll(bt,"/"))==null||Je.forEach((Ct,zt)=>{var Vt,Ft,Ht,an,Nn,Gn,An,Xn,Ea,oa,ha;if(!(Ct!=null&&Ct.includes("[")))Dt=Dt===""?Dt+Ct.replaceAll("/",""):Dt+"/"+Ct.replaceAll("/","");else{let ra="",dn="";(Vt=V.cloneDeep(Ct))!=null&&Vt.includes("]")?(ra=V.cloneDeep(Ct).slice(1,((Ft=V.cloneDeep(Ct))==null?void 0:Ft.length)-1),dn=(An=(Gn=(Nn=(an=(Ht=V.cloneDeep(ra))==null?void 0:Ht.split("["))==null?void 0:an[1])==null?void 0:Nn.split("]"))==null?void 0:Gn[0])==null?void 0:An.split(":")):(ra=V.cloneDeep(Ct).slice(1,(Xn=V.cloneDeep(Ct))==null?void 0:Xn.length),dn=(Ea=V.cloneDeep(ra))==null?void 0:Ea.split("/"));let Yn="",la=(oa=m==null?void 0:m.find(on=>(on==null?void 0:on.name)===(dn==null?void 0:dn[0])))==null?void 0:oa.compData;la==null||la.forEach(on=>{var Sa;(on==null?void 0:on.key)==="formContent"&&((Sa=on==null?void 0:on.contents)==null||Sa.forEach(Vn=>{(Vn==null?void 0:Vn.key)===(dn==null?void 0:dn[1])&&(Yn=Vn==null?void 0:Vn.value)}))}),((ha=Ne.contentTransArrayToAll(bt,"/"))==null?void 0:ha.length)-1!==zt?Dt=Dt===""?Dt+Yn.replaceAll("/",""):Dt+"/"+Yn.replaceAll("/",""):Dt=Dt+r.value+Yn.replaceAll("/","")}}),(je=b.value)!=null&&je.includes(Dt)?bt=b.value:bt=Dt}let Kt=V.cloneDeep((It=Object.keys($))==null?void 0:It[0]);if(((Te=D==null?void 0:D.data)==null?void 0:Te.statusCode)===200||((Ge=D==null?void 0:D.data)==null?void 0:Ge.code)===200){if(((Ze=(Fe=D==null?void 0:D.data)==null?void 0:Fe.data)!=null&&Ze[Kt]||(fe=(E=D==null?void 0:D.data)==null?void 0:E.result)!=null&&fe[Kt])&&(Ot==null?void 0:Ot.length)===1)return await re(((he=(Ke=D==null?void 0:D.data)==null?void 0:Ke.data)==null?void 0:he[Kt])||((st=(ut=D==null?void 0:D.data)==null?void 0:ut.result)==null?void 0:st[Kt]),V.cloneDeep(bt),Ot,S);if((pt=(xt=D==null?void 0:D.data)==null?void 0:xt.data)!=null&&pt[Kt]||(ft=(ct=D==null?void 0:D.data)==null?void 0:ct.result)!=null&&ft[Kt]){let Dt=await Pe(((Tt=(wt=D==null?void 0:D.data)==null?void 0:wt.data)==null?void 0:Tt[Kt])||((vt=(jt=D==null?void 0:D.data)==null?void 0:jt.result)==null?void 0:vt[Kt]),V.cloneDeep(bt),Ot);return Dt&&(B=[...B,...Dt]),Dt}else{if(!((Mt=D==null?void 0:D.data)!=null&&Mt.data)){let Dt=await Ne.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,"","",qe);Dt=Dt==null?void 0:Dt.map(zt=>{var Vt;return(zt==null?void 0:zt.name)===(Ot==null?void 0:Ot[0])&&(zt.compData=(Vt=zt.compData)==null?void 0:Vt.map(Ft=>{var Ht;return(Ft==null?void 0:Ft.key)==="formContent"&&(Ft.contents=(Ht=Ft.contents)==null?void 0:Ht.map(an=>{var Nn,Gn;return(an==null?void 0:an.key)===(Ot==null?void 0:Ot[1])&&(an.value=(Gn=(Nn=D==null?void 0:D.data)==null?void 0:Nn.result)==null?void 0:Gn[Kt==null?void 0:Kt.replaceAll(":","")]),an})),Ft})),zt});let Ct=[];(Lt=Dt==null?void 0:Dt.filter(zt=>(zt==null?void 0:zt.comp)==="Form"))==null||Lt.forEach(async zt=>{let Vt={};for(let Ft in zt)Ft!=="id"&&(Vt[Ft]=zt[Ft]);Ct.push({id:zt==null?void 0:zt.id,value:{pageData:Vt}})}),(Ct==null?void 0:Ct.length)>0&&await xe.batchUpdateInsofDataApi({dataList:Ct});return}if((Ot==null?void 0:Ot.length)===1){const Dt=(Jt=(Wt=(Ut=D==null?void 0:D.data)==null?void 0:Ut.data)==null?void 0:Wt.path)==null?void 0:Jt.path;let Ct="";(Fn=(gn=(zn=(En=(Pt=Dt==null?void 0:Dt.split("("))==null?void 0:Pt[1])==null?void 0:En.split(")"))==null?void 0:zn[0])==null?void 0:gn.split(":"))==null||Fn.forEach(Ft=>{var Ht,an;Ct=Ct===""?Ct+((Ht=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:Ht.trim()):Ct+"/"+((an=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:an.trim())});let zt=[($n=(Ln=(Pn=(Rn=(yn=Dt==null?void 0:Dt.split("<"))==null?void 0:yn[1])==null?void 0:Rn.split(">"))==null?void 0:Pn[0])==null?void 0:Ln.replaceAll("'",""))==null?void 0:$n.trim()],Vt;return(hn=(Sn=(jn=D==null?void 0:D.data)==null?void 0:jn.data)==null?void 0:Sn.data)!=null&&hn[Ot==null?void 0:Ot[0]]?Vt=await re((vn=(bn=(un=D==null?void 0:D.data)==null?void 0:un.data)==null?void 0:bn.data)==null?void 0:vn[Ot==null?void 0:Ot[0]],Ct,Ot,S):Vt=await Le((pn=(nn=D==null?void 0:D.data)==null?void 0:nn.data)==null?void 0:pn.data,Ct,zt,qe),Vt}else{const Dt=(Bn=(Tn=(Un=D==null?void 0:D.data)==null?void 0:Un.data)==null?void 0:Tn.path)==null?void 0:Bn.path;let Ct="";return(Hn=(In=(Wn=(Kn=(kn=Dt==null?void 0:Dt.split("("))==null?void 0:kn[1])==null?void 0:Kn.split(")"))==null?void 0:Wn[0])==null?void 0:In.split(":"))==null||Hn.forEach(Vt=>{var Ft,Ht;Ct=Ct===""?Ct+((Ft=Vt==null?void 0:Vt.replaceAll("'",""))==null?void 0:Ft.trim()):Ct+"/"+((Ht=Vt==null?void 0:Vt.replaceAll("'",""))==null?void 0:Ht.trim())}),await Pe((Yt=(_t=(qn=D==null?void 0:D.data)==null?void 0:qn.data)==null?void 0:_t.data)==null?void 0:Yt[Ot==null?void 0:Ot[0]],Ct,Ot)}}}}});if(await Promise.all(ee),(B==null?void 0:B.length)>0){let $=[];B==null||B.forEach(ie=>{$!=null&&$.find(q=>{var Z,de,me,Ce;return((de=(Z=q==null?void 0:q.value)==null?void 0:Z.pageData)==null?void 0:de.name)===((Ce=(me=ie==null?void 0:ie.value)==null?void 0:me.pageData)==null?void 0:Ce.name)})||$.push(ie)});let W=[];$==null||$.forEach(ie=>{var de,me,Ce,be;let q=V.cloneDeep(ie);q.value.pageData.compData=(de=q.value.pageData.compData)==null?void 0:de.map(j=>{var Me;return(j==null?void 0:j.key)==="formContent"&&(j.contents=(Me=j.contents)==null?void 0:Me.map(ge=>{var rt,$e,nt,Be;let Ue=(rt=V.cloneDeep(B))==null?void 0:rt.find(mt=>(mt==null?void 0:mt.keyType)===(ge==null?void 0:ge.key));if(Ue){let mt=(Be=(nt=($e=Ue.value.pageData.compData)==null?void 0:$e.find(et=>(et==null?void 0:et.key)==="formContent"))==null?void 0:nt.contents)==null?void 0:Be.find(et=>(et==null?void 0:et.key)===(ge==null?void 0:ge.key));ge.value=mt==null?void 0:mt.value}return ge})),j}),W.push({id:q==null?void 0:q.id,value:q==null?void 0:q.value});let Z=[];(be=(Ce=(me=q==null?void 0:q.value)==null?void 0:me.pageData)==null?void 0:Ce.compData)==null||be.forEach(j=>{var Me;(j==null?void 0:j.key)==="formContent"&&((Me=j==null?void 0:j.contents)==null||Me.forEach(ge=>{var Ue,rt,$e,nt,Be,mt;if((rt=(Ue=ge==null?void 0:ge.optionUrl)==null?void 0:Ue.menuSelect)!=null&&rt.find(et=>et==null?void 0:et.includes("[")))if(Z!=null&&Z.find(et=>{var Oe,it,gt;return((Oe=et==null?void 0:et.key)==null?void 0:Oe.join(","))===((gt=(it=ge==null?void 0:ge.optionUrl)==null?void 0:it.menuSelect)==null?void 0:gt.join(","))})){let et=($e=Z==null?void 0:Z.find(Oe=>{var it,gt,Je;return((it=Oe==null?void 0:Oe.key)==null?void 0:it.join(","))===((Je=(gt=ge==null?void 0:ge.optionUrl)==null?void 0:gt.menuSelect)==null?void 0:Je.join(","))}))==null?void 0:$e.value;et.push({key:ge==null?void 0:ge.prop,groups:(nt=ge==null?void 0:ge.optionUrl)==null?void 0:nt.groupSelect,value:ge==null?void 0:ge.value}),Z=Z==null?void 0:Z.map(Oe=>{var it,gt,Je;return((it=Oe==null?void 0:Oe.key)==null?void 0:it.join(","))===((Je=(gt=ge==null?void 0:ge.optionUrl)==null?void 0:gt.menuSelect)==null?void 0:Je.join(","))&&(Oe.value=et),Oe})}else Z.push({key:(Be=ge==null?void 0:ge.optionUrl)==null?void 0:Be.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(mt=ge==null?void 0:ge.optionUrl)==null?void 0:mt.groupSelect,value:ge==null?void 0:ge.value}]})}))}),(Z==null?void 0:Z.length)>0&&(Z=Z==null?void 0:Z.map(j=>{var ge;let Me="";return(ge=j==null?void 0:j.key)==null||ge.forEach(Ue=>{var rt;if(!(Ue!=null&&Ue.includes("[")))Me=Me===""?Me+Ue:Me+"/"+Ue;else{let $e="",nt=(rt=Ue==null?void 0:Ue.replaceAll("[","").replaceAll("]",""))==null?void 0:rt.split(":");m==null||m.forEach(Be=>{var mt;(Be==null?void 0:Be.name)===(nt==null?void 0:nt[0])&&((mt=Be==null?void 0:Be.compData)==null||mt.forEach(et=>{var Oe;(et==null?void 0:et.key)==="formContent"&&((Oe=et==null?void 0:et.contents)==null||Oe.forEach(it=>{(it==null?void 0:it.prop)===(nt==null?void 0:nt[1])&&($e=it==null?void 0:it.value)}))}))}),Me=Me+r.value+$e}}),j.key=Me,j})),Z==null||Z.forEach(j=>{var rt,$e,nt;let Me=(rt=qe[j.key])==null?void 0:rt.find(Be=>{var mt,et,Oe,it,gt,Je,je;return((et=(mt=Be==null?void 0:Be.value)==null?void 0:mt.pageData)==null?void 0:et.name)===((gt=(it=(Oe=j==null?void 0:j.value)==null?void 0:Oe[0])==null?void 0:it.groups)==null?void 0:gt[0])&&((je=(Je=Be==null?void 0:Be.value)==null?void 0:Je.pageData)==null?void 0:je.name)!==void 0}),ge=Me==null?void 0:Me.id,Ue=($e=Me==null?void 0:Me.value)==null?void 0:$e.pageData;Ue.compData=(nt=Ue.compData)==null?void 0:nt.map(Be=>{var mt;return(Be==null?void 0:Be.key)==="formContent"&&(Be.contents=(mt=Be.contents)==null?void 0:mt.map(et=>{var it;let Oe=(it=j.value)==null?void 0:it.find(gt=>(gt==null?void 0:gt.key)===(et==null?void 0:et.prop));return Oe&&(et.value=Oe.value),et})),Be}),W.push({id:ge,value:{pageData:Ue}})})});let Se=(Ee=V.cloneDeep(B))==null?void 0:Ee[0];(W==null?void 0:W.length)>0&&await xe.batchUpdateInsofDataApi({dataList:W})}C.setFreshContent(!0)}F.setImportLoading(!1)}catch{xe.ElMessage.error("方法执行错误,请查看方法!"),F.setImportLoading(!1)}h.value=!0},pe=["createInsofDataApi"],He=dr(async X=>{ne(X)},100),ot=async X=>{var ae,_e,I,Xe,Ye;const A=V.cloneDeep(X);let te,ye=new WeakMap,ue=await xe.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:G.value});(_e=(ae=ue.data.result)==null?void 0:ae.filter(Ie=>{var le,Q;return((le=Ie==null?void 0:Ie.key)==null?void 0:le.pageKey)!=="menu"&&((Q=Ie==null?void 0:Ie.key)==null?void 0:Q.pageKey)!=="secret"}))==null||_e.forEach(Ie=>{ye[Ie.key.pageKey]?ye[Ie.key.pageKey]=[...ye[Ie.key.pageKey],Ie]:ye[Ie.key.pageKey]=[Ie]}),X!=null&&X[0].path&&(te=await(A==null?void 0:A.map(async(Ie,le)=>{var U,J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce;const se=(U=ye[Ie==null?void 0:Ie.path])==null?void 0:U.filter(be=>{var j;return((j=be==null?void 0:be.key)==null?void 0:j.type)==="data"});let Ee="";const qe=await Ne.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye);se==null||se.forEach(be=>{var j,Me,ge,Ue,rt;((Me=(j=be==null?void 0:be.value)==null?void 0:j.tableData)==null?void 0:Me.算法名称)===((ge=A==null?void 0:A[le])==null?void 0:ge.method)&&(Ee=(rt=(Ue=be==null?void 0:be.value)==null?void 0:Ue.tableData)==null?void 0:rt.算法体)});const dt=await Ne.getItemData(Ie==null?void 0:Ie.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye);let m="",S=(Ve=(oe=(D=(J=dt==null?void 0:dt[0])==null?void 0:J.compData)==null?void 0:D.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:oe.contents)==null?void 0:Ve.findIndex(be=>(be==null?void 0:be.prop)==="算法体");return(ee=(B=dt==null?void 0:dt[0])==null?void 0:B.compData)==null||ee.forEach(be=>{var j;(be==null?void 0:be.key)==="tableContents"&&((j=be==null?void 0:be.contents)==null||j.forEach(Me=>{Me!=null&&Me.find(ge=>ge===(Ie==null?void 0:Ie.method))&&(m=Me[S])}))}),{buttonName:(($=A==null?void 0:A[le])==null?void 0:$.method)||((ie=(Se=(W=se==null?void 0:se[0])==null?void 0:W.value)==null?void 0:Se.tableData)==null?void 0:ie.算法名称),api:(Ee===""?(de=(Z=(q=se==null?void 0:se[0])==null?void 0:q.value)==null?void 0:Z.tableData)==null?void 0:de.算法体:Ee)||m,content:qe==null?void 0:qe.filter(be=>be.comp!=="methodButton"),extraContent:(me=V.cloneDeep(Ie.value))==null?void 0:me.slice(1),methodName:(Ie==null?void 0:Ie.path)??"",extraValues:(Ce=A==null?void 0:A[le])==null?void 0:Ce.data}})));const De=A==null?void 0:A.map(async Ie=>{var dt,m,S,U,J,D;const le=(dt=ue.data.result)==null?void 0:dt.filter(oe=>{var Ve,B,ee;return((Ve=oe==null?void 0:oe.key)==null?void 0:Ve.parentTable)===""&&((B=oe==null?void 0:oe.key)==null?void 0:B.type)==="method"&&((ee=oe==null?void 0:oe.key)==null?void 0:ee.methodName)===oe.method}),Q=le==null?void 0:le[0],se=(m=ue.data.result)==null?void 0:m.filter(oe=>{var Ve,B;return((Ve=oe==null?void 0:oe.key)==null?void 0:Ve.type)==="methodData"&&((B=oe==null?void 0:oe.key)==null?void 0:B.tableId)===(Q==null?void 0:Q.id)}),Ee=await Ne.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye),qe=se==null?void 0:se[0];return{buttonName:(S=Q==null?void 0:Q.key)==null?void 0:S.methodKey,api:(J=(U=qe==null?void 0:qe.value)==null?void 0:U.tableData)==null?void 0:J[0],content:Ee==null?void 0:Ee.filter(oe=>oe.comp!=="methodButton"),extraContent:(D=V.cloneDeep(Ie.value))==null?void 0:D.slice(1),methodName:(Ie==null?void 0:Ie.method)??""}}),Qe=(I=X==null?void 0:X[0])!=null&&I.path&&((Xe=X==null?void 0:X[0])==null?void 0:Xe.path)!==""?await Promise.all(te):await Promise.all(De);l.value=Qe==null?void 0:Qe.filter(Ie=>Ie==null?void 0:Ie.extraContent),(Ye=l.value)==null||Ye.forEach(Ie=>{var le;Ie.api===""&&((le=Ie.content)==null||le.forEach(Q=>{var se;Q.comp=="Table"&&C.setExtraContents(Ne.methodTableToContent(Q.compData,(se=Ie.extraContent)==null?void 0:se[0]))}))})};return e.watch(()=>d.itemData,async()=>{M.value=="view"&&!h.value&&await ot(V.cloneDeep(d.itemData)),h.value=!1},{immediate:!0,deep:!0}),(X,A)=>{var te,ye,ue;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((te=l.value)==null?void 0:te.filter(De=>(De==null?void 0:De.buttonName)!=="保存"),De=>{var Qe;return e.openBlock(),e.createElementBlock("div",null,[De.api!==""?(e.openBlock(),e.createBlock(e.unref(_o._sfc_main),{key:0,disabled:e.unref(O)===e.unref(b)&&!((Qe=De==null?void 0:De.buttonName)!=null&&Qe.includes("预览")),class:"calculator-content",modelValue:De.buttonName,onClickTrigger:ae=>e.unref(He)(De),loading:w.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ve)!==""&&((ue=e.unref(b))==null?void 0:ue[((ye=e.unref(b))==null?void 0:ye.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(_o._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ce,modelValue:"保存"})):e.createCommentVNode("",!0)]),c.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:Ae},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},yc=Rt._export_sfc(gc,[["__scopeId","data-v-11fca7e0"]]),bc={};function kc(a,l){return" 567 "}const xc=Rt._export_sfc(bc,[["render",kc]]),wc={class:"module content"},Cc={class:"module data"},Dc={class:"module layout"},_c={class:"form-content"},Ec=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),c=e.ref("create"),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),C=e.ref({}),w=e.ref([]),F=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:w.value},{key:"signConfig",contents:C.value}]}),R=K=>{var O;C.value=V.cloneDeep(K),r("change",(O=F())==null?void 0:O.compData)},H=K=>{var O,G;if((K==null?void 0:K.buttonName)==="确认"){const b=V.cloneDeep(K==null?void 0:K.content);switch(c.value){case"create":w.value.push({...b,index:((O=w.value)==null?void 0:O.length)+1});break}r("change",(G=F())==null?void 0:G.compData),d.visible=!1}else d.visible=!1},M=(K,O)=>{var G,b;switch(K){case"create":(G=f.value)==null||G.forEach(_=>{_.value=""}),c.value="create",d.visible=!0;break;case"update":(b=f.value)==null||b.forEach(_=>{_.value=O[_==null?void 0:_.prop]}),c.value="update",d.visible=!0;break;case"delete":w.value.splice(O,1),c.value="delete";break}},ve=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var O,G;K&&(C.value=((O=K==null?void 0:K.find(b=>b.key==="signConfig"))==null?void 0:O.contents)??{},w.value=((G=K==null?void 0:K.find(b=>b.key==="signTypeList"))==null?void 0:G.contents)??[])},{immediate:!0}),(K,O)=>{const G=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",wc,[O[2]||(O[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(b,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=_=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[O[1]||(O[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(_,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(_==null?void 0:_.label),1),e.createElementVNode("div",null,[e.createVNode(b,{type:"primary",size:"small",onClick:T=>M("update",{..._,index:y+1})},{default:e.withCtx(()=>O[3]||(O[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(b,{type:"danger",size:"small",onClick:T=>M("delete",y)},{default:e.withCtx(()=>O[4]||(O[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Dc,[e.createVNode(Bt.ssForm,{rowContents:v.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:ve,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",_c,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Sc=Rt._export_sfc(Ec,[["__scopeId","data-v-487e0536"]]),Tc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const s=a,r=l,d=e.ref(1),c=e.computed(()=>{var F,R;return(F=s==null?void 0:s.stepConfig)!=null&&F.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),x=(F,R)=>{d.value=R,r("clickStep",F,R)},v=F=>Bt.getComponent(F),f=()=>{var R;const F=(R=s==null?void 0:s.stepList)==null?void 0:R.find((H,M)=>M+1===c.value);return console.log("findStep",F),F?F==null?void 0:F.children:[]},C=F=>{r("clickTrigger",F)},w=F=>{r("changeTrigger",F)};return(F,R)=>{var ve,K,O,G,b;const H=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(ve=a.stepConfig)==null?void 0:ve.direction,active:c.value,"finish-status":"success",simple:(K=a.stepConfig)==null?void 0:K.simple,"align-center":((O=a.stepConfig)==null?void 0:O.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(_,y)=>(e.openBlock(),e.createBlock(H,{key:y,class:"step-item",onClick:T=>x(_,y+1)},{title:e.withCtx(()=>[e.renderSlot(F.$slots,"title",{title:_==null?void 0:_.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(F.$slots,"description",{description:_==null?void 0:_.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(G=a.stepConfig)!=null&&G.allowTrigger&&((b=a.stepConfig)!=null&&b.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(_,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(_==null?void 0:_.type)),{modelValue:_.value,"onUpdate:modelValue":T=>_.value=T,onClickTrigger:C,onChangeTrigger:w,content:_==null?void 0:_.content},e.createSlots({_:2},[e.renderList(F.$slots,(T,h)=>({name:h,fn:e.withCtx(ce=>[e.renderSlot(F.$slots,h,e.mergeProps({ref_for:!0},ce||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Bc=Rt._export_sfc(Tc,[["__scopeId","data-v-d7c99969"]]),Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const s=a,r=l,d=e.ref({}),c=e.ref([]),x=(v,f)=>{r("clickStep",v,f)};return e.watch(()=>s==null?void 0:s.itemData,v=>{var f,C;c.value=(f=v==null?void 0:v.find(w=>(w==null?void 0:w.key)==="stepList"))==null?void 0:f.contents,d.value=(C=v==null?void 0:v.find(w=>(w==null?void 0:w.key)==="stepConfig"))==null?void 0:C.contents},{immediate:!0,deep:!0}),(v,f)=>{const C=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Bc,{stepConfig:d.value,stepList:c.value,onClickStep:x},{icon:e.withCtx(()=>[e.createVNode(C,{name:"import"})]),title:e.withCtx(({title:w})=>[e.createTextVNode(e.toDisplayString(w),1)]),description:e.withCtx(({description:w})=>[e.createTextVNode(e.toDisplayString(w),1)]),_:1},8,["stepConfig","stepList"])}}}),Nc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(c,x)=>(e.openBlock(),e.createBlock(r,{key:x,timestamp:c.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:c==null?void 0:c.content,timestamp:c==null?void 0:c.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ac=Rt._export_sfc(Nc,[["__scopeId","data-v-4172a886"]]),Vc={class:"line-content"},Oc={class:"line-time"},Mc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,s=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,d=>{var c,x;r.value=(c=d==null?void 0:d.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:c.contents,s.value=(x=d==null?void 0:d.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(d,c)=>(e.openBlock(),e.createBlock(Ac,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:x,timestamp:v})=>[e.createElementVNode("span",Vc,e.toDisplayString(x),1),e.createElementVNode("span",Oc,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),zc=Rt._export_sfc(Mc,[["__scopeId","data-v-b4d9deed"]]),Fc={class:"tabs-content"},Rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const l=a,s=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,r=>{const d=r.find(c=>(c==null?void 0:c.key)=="stepList");d?s.value=d.contents.map(c=>({value:c.value||c.title,label:c.label||c.title,children:c.children||[]})):s.value=l==null?void 0:l.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Fc,[e.createVNode(Bt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Pc=Rt._export_sfc(Rc,[["__scopeId","data-v-40865f68"]]),Ga=xe.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}}}),Lc={class:"type-select"},$c=["onClick"],jc={class:"list-icon"},Uc={__name:"modelSelect",setup(a){const l=Ga(xe.pinia),{itemData:s}=xe.storeToRefs(l),r=d=>{const c=V.cloneDeep(s.value);c.push({comp:d.comp,name:d.name,compData:[]}),l.setItemData(c)};return(d,c)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Lc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ol),(v,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:C=>r(v)},[e.createElementVNode("div",jc,[e.createVNode(x,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,$c)]))),128))])}}},Kc=Rt._export_sfc(Uc,[["__scopeId","data-v-91799bf8"]]),Wc={class:"fill-content"},Hc={class:"operate-content"},qc={class:"collapse-title-content"},Gc={class:"collapse-title-item"},Xc={key:1},Yc=["onClick"],Jc={class:"icon-content"},Zc={key:0,class:"edit-content"},Qc=["onClick"],eu={class:"comp-child"},tu={__name:"modelFill",setup(a){const l=Ga(xe.pinia),{itemData:s,originalData:r}=xe.storeToRefs(l),d=e.ref([]);e.ref([]);const c=e.ref([]),x=e.ref([]),v=H=>{var ve;let M=(ve=V.cloneDeep(x.value))==null?void 0:ve.map((K,O)=>(H===O&&(K.content=!0),K));x.value=M},f=H=>{var ve;let M=(ve=V.cloneDeep(x.value))==null?void 0:ve.map((K,O)=>(H===O&&(K.content=!1),K));x.value=M,d.value=V.cloneDeep(s.value)},C=(H,M)=>{var G;let ve=(G=V.cloneDeep(x.value))==null?void 0:G.map((b,_)=>(H===_&&(b.content=!1),b));x.value=ve;const K=V.cloneDeep(s.value),O=K==null?void 0:K.filter((b,_)=>(_===H&&(b.name=M),b));l.setOriginalData(O),l.setItemData(O)};e.watch(()=>s.value,()=>{var H,M,ve;!s.value||((H=s.value)==null?void 0:H.length)===0?d.value=[]:d.value=(M=V.cloneDeep(s.value))==null?void 0:M.filter(K=>(K==null?void 0:K.comp)!=="methodButton"),c.value=d.value,x.value=(ve=V.cloneDeep(c.value))==null?void 0:ve.map((K,O)=>({id:O,content:!1}))},{deep:!0,immediate:!0});const w=H=>aa(H),F=(H,M,ve)=>{var O,G;if(!H)return;let K=V.cloneDeep(s.value);K=(O=K==null?void 0:K.map((b,_)=>(_===ve&&(b.compData=H),b)))==null?void 0:O.filter(b=>(b==null?void 0:b.comp)!=="methodButton"),x.value=(G=V.cloneDeep(K))==null?void 0:G.map((b,_)=>({id:_,content:!1})),l.setOriginalData(K),l.setItemData(K)},R=H=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=V.cloneDeep(s.value),ve=M==null?void 0:M.filter((K,O)=>O!==H);l.setOriginalData(ve),l.setItemData(ve),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(H,M)=>{const ve=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Wc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Hc,[e.createVNode(ur.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:K,index:O})=>{var G,b,_,y,T,h,ce,Ae,at,we;return[e.createElementVNode("div",qc,[e.createElementVNode("div",Gc,[(b=(G=x.value)==null?void 0:G.find(Pe=>Pe.id===O))!=null&&b.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:K.name&&K.name!==""?"8px":"0px"})},e.toDisplayString(K.name),5)),(y=(_=x.value)==null?void 0:_.find(Pe=>Pe.id===O))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",Xc,[e.createVNode(Bt._sfc_main$2,{modelValue:K.name,"onUpdate:modelValue":Pe=>K.name=Pe,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(h=(T=x.value)==null?void 0:T.find(Pe=>Pe.id===O))!=null&&h.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Pe=>v(O),["stop"]),class:"icon-content"},[e.createVNode(ve,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Yc))]),e.createElementVNode("div",Jc,[(Ae=(ce=x.value)==null?void 0:ce.find(Pe=>Pe.id===O))!=null&&Ae.content?(e.openBlock(),e.createElementBlock("div",Zc,[e.createVNode(ve,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Pe=>f(O),["stop"])},null,8,["onClick"]),e.createVNode(ve,{name:"Save",onClick:e.withModifiers(Pe=>C(O,K.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(we=(at=x.value)==null?void 0:at.find(Pe=>Pe.id===O))!=null&&we.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Pe=>R(O),["stop"]),class:"icon-content"},[e.createVNode(ve,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Qc))])])]}),content:e.withCtx(({item:K,index:O})=>{var G,b;return[e.createElementVNode("div",eu,[e.createTextVNode(e.toDisplayString(w(K.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(K.comp+"Operate")),{itemContents:K==null?void 0:K.compData,originalItemContents:(b=(G=c.value)==null?void 0:G.find((_,y)=>y===O))==null?void 0:b.compData,onChange:_=>F(_,K,O)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},nu=Rt._export_sfc(tu,[["__scopeId","data-v-a46a44b9"]]),au={key:0,class:"show-content"},ou={style:{display:"flex"}},ru={__name:"modelShow",setup(a){const l=Ga(xe.pinia),{itemData:s}=xe.storeToRefs(l),r=e.ref([]);e.watch(()=>s.value,()=>{var c;!s.value||((c=s.value)==null?void 0:c.length)===0?r.value=[]:r.value=V.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=c=>aa(c);return(c,x)=>{var v;return((v=r.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:C},[e.createElementVNode("div",ou,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:C},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},lu=Rt._export_sfc(ru,[["__scopeId","data-v-3f3e863e"]]),iu={class:"tabs-header"},su={class:"tabs-list"},cu={class:"tab-name"},uu={class:"tab-actions"},du=["onClick"],pu=["onClick"],fu=["onClick"],hu={class:"model-operate"},vu={class:"model-select",style:{display:"unset"}},mu={class:"existing-components"},gu={class:"component-list"},yu=["onClick"],bu={class:"component-info"},ku={class:"component-type"},xu={class:"component-name"},wu={class:"model-fill"},Cu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref([]),c=e.ref(!1),x=e.ref(""),v=e.ref({title:""}),f=e.ref(-1),C=e.ref(!1),w=e.ref(-1),F=e.ref(new WeakMap),R=e.ref(null),H=Ga(xe.pinia),{itemData:M}=xe.storeToRefs(H),ve=()=>{x.value="新增标签页",v.value.title="",f.value=-1,c.value=!0},K=X=>{x.value="修改标签页",v.value.title=d.value[X].title,f.value=X,c.value=!0},O=X=>{const A=_(X);F.value.delete(A),d.value.splice(X,1),ot()},G=()=>{if(v.value.title.trim()){if(f.value===-1){const X={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:b()};d.value.push(X)}else d.value[f.value].title=v.value.title,d.value[f.value].value=v.value.title,d.value[f.value].label=v.value.title;c.value=!1,ot()}},b=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,_=X=>{const A=d.value[X];return A.id||(A.id=b()),A.id},y=X=>{var ye;w.value=X;const A=_(X);R.value=V.cloneDeep(M.value);let te=F.value.get(A);!te&&((ye=d.value[X].children)==null?void 0:ye.length)>0&&(te=Ae(d.value[X].children)),te?H.setItemData(V.cloneDeep(te)):H.setItemData([]),C.value=!0},T=e.computed(()=>{const X=V.useModelComp(xe.pinia),A=xe.storeToRefs(X).itemData.value;return console.log("可用组件数据",A),!A||!Array.isArray(A)?[]:A.filter(te=>{var ye;if(te.comp==="Tabs"&&w.value>=0){const ue=_(w.value);if((ye=te.compData)==null?void 0:ye.some(Qe=>{var ae;return Qe.key==="stepList"&&((ae=Qe.contents)==null?void 0:ae.some(_e=>_e.id===ue))}))return!1}return!0})}),h=X=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[X]||X,ce=X=>{var A;try{const te=V.cloneDeep(X);te.id=Date.now()+Math.random(),te.comp==="Tabs"&&((A=te.compData)==null||A.forEach(ue=>{ue.key==="stepList"&&ue.contents&&ue.contents.forEach(De=>{De.id=b()})}));const ye=V.cloneDeep(M.value);ye.push(te),H.setItemData(ye)}catch(te){console.error("添加组件失败:",te)}},Ae=X=>X.map(A=>{var te;switch(A.type){case"form":return{comp:"Form",name:A.value||"表单",compData:at(A.content)};case"table":return{comp:"Table",name:A.value||"表格",compData:we(A.content)};default:return{comp:"Unknown",name:A.value||"",compData:((te=A.content)==null?void 0:te.originalData)||[]}}}),at=X=>{if(!X)return[];const A=[];return X.rowContents&&A.push({key:"formContent",contents:X.rowContents}),X.buttonValue&&A.push({key:"formButton",contents:X.buttonValue}),typeof X.isEnableWrap<"u"&&A.push({key:"enableWrap",contents:X.isEnableWrap}),A},we=X=>[],Pe=()=>{if(w.value>=0&&w.value<d.value.length){const X=_(w.value);F.value.set(X,V.cloneDeep(M.value)),d.value[w.value].children=re(M.value),console.log("保存后的数据",re(M.value))}C.value=!1,w.value=-1,R.value=null,ot()},Le=()=>{R.value&&H.setItemData(V.cloneDeep(R.value)),C.value=!1,w.value=-1,R.value=null},P=()=>{C.value&&Le()},re=X=>{if(!Array.isArray(X))throw new Error("sourceData must be an array");return X.map((A,te)=>{if(!A||typeof A!="object")return A;const{comp:ye,name:ue,compData:De}=A;switch(ye){case"Form":return{type:"form",content:ne(De||[]),value:"表单"};case"Table":return{type:"table",content:pe(De||[]),value:"表格"};default:return{type:"xxx",content:He(De||[]),value:""}}})},ne=X=>{const A={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},te={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return X.forEach((ye,ue)=>{if(!ye||typeof ye!="object"){console.warn(`Invalid config at index ${ue}:`,ye);return}const{key:De,contents:Qe}=ye,ae=te[De];if(!ae){console.warn(`Unknown Form config key: ${De}`);return}De==="enableWrap"?A[ae]=!!Qe:A[ae]=Array.isArray(Qe)?Qe:[]}),A},pe=X=>{const A={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},te={header:"columns",tableContents:"tableData"};return X.forEach((ye,ue)=>{if(!ye||typeof ye!="object"){console.warn(`Invalid config at index ${ue}:`,ye);return}const{key:De,contents:Qe}=ye,ae=te[De];if(!ae){console.warn(`Unknown Table config key: ${De}`);return}A[ae]=Array.isArray(Qe)?Qe:[]}),A},He=X=>(console.log("Default conversion logic - to be implemented"),{originalData:X,processed:!1,componentType:"unknown"}),ot=()=>{const X=[{key:"stepList",contents:d.value}];r("change",X)};return e.watch(()=>s.itemContents,X=>{if(X&&X.length>0){const A=X.find(te=>te.key==="stepList");A&&A.contents&&(d.value=A.contents.map(te=>({title:te.title||"",value:te.value||te.title||"",label:te.label||te.title||"",children:te.children||[],id:te.id||b()})))}},{immediate:!0,deep:!0}),(X,A)=>{const te=e.resolveComponent("svg-icon"),ye=e.resolveComponent("el-input"),ue=e.resolveComponent("el-form-item"),De=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",iu,[A[6]||(A[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ve},[e.createVNode(te,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),A[5]||(A[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Qe,ae)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ae},[e.createElementVNode("span",cu,e.toDisplayString(Qe.title),1),e.createElementVNode("div",uu,[e.createElementVNode("button",{onClick:_e=>K(ae)},"修改标题",8,du),e.createElementVNode("button",{onClick:_e=>y(ae)},"布局调整",8,pu),e.createElementVNode("button",{onClick:_e=>O(ae)},"删除",8,fu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:c.value,"onUpdate:modelValue":A[2]||(A[2]=Qe=>c.value=Qe),title:x.value,onBeforeDestroy:A[3]||(A[3]=Qe=>c.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:A[1]||(A[1]=Qe=>c.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:G},"确定")]),default:e.withCtx(()=>[e.createVNode(De,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ue,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ye,{modelValue:v.value.title,"onUpdate:modelValue":A[0]||(A[0]=Qe=>v.value.title=Qe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:C.value,"onUpdate:modelValue":A[4]||(A[4]=Qe=>C.value=Qe),title:"布局调整",fullScreen:"",onBeforeDestroy:P},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Le},"取消"),e.createElementVNode("button",{onClick:Pe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",hu,[e.createElementVNode("div",vu,[e.createVNode(Kc),e.createElementVNode("div",mu,[A[8]||(A[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",gu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,Qe=>(e.openBlock(),e.createElementBlock("div",{key:Qe.id,class:"component-item",onClick:ae=>ce(Qe)},[e.createElementVNode("div",bu,[e.createElementVNode("span",ku,e.toDisplayString(h(Qe.comp)),1),e.createElementVNode("span",xu,e.toDisplayString(Qe.name),1)]),A[7]||(A[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,yu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:X.innerWidth},[e.createVNode(lu)])),e.createElementVNode("div",wu,[e.createVNode(nu)])])]),_:1},8,["modelValue"])])}}},Du=Rt._export_sfc(Cu,[["__scopeId","data-v-9096ed0d"]]);function _u(){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 Eu(a){return{type:"line",...a}}function Su(){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 Tu(a){return{type:"bar",barWidth:"60%",...a}}function Bu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Iu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const _n={line:{initBaseoptions:_u,initSeries:Eu},bar:{initBaseoptions:Su,initSeries:Tu},pie:{initBaseoptions:Bu,initSeries:Iu}},No=V.useMenuState(xe.pinia),kr=(a,l)=>{var w;const s=[],r=[],{group:d,nameCol:c,valueCol:x}=l||{},v=a==null?void 0:a.find(F=>{const{name:R}=F;return R===d});if(!v)return{names:s,values:r};const f=(w=v==null?void 0:v.compData)==null?void 0:w.find(F=>{const{key:R}=F;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(F=>{const R=F==null?void 0:F[0];let H=!1;xe.isObject(R)&&(R!=null&&R.id)&&(H=!0);let M=c,ve=x;H&&(M=M+1,ve=ve+1);const K=F==null?void 0:F[M],O=F==null?void 0:F[ve];s.push(K),r.push(O)}),{names:s,values:r}},Nu=async a=>{const{menu:l,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:c,isSelfDetail:x}=a||{};let v=null;const f=sessionStorage.getItem("systemKey");if(x&&No.activeMenuPath&&(v=await Ne.getItemData(`${No.activeMenuPath}`,f,"")),!x){const C=l==null?void 0:l.join("/");v=await Ne.getItemData(`${C}^${s}`,f,"")}return kr(v,{group:r,nameCol:d,valueCol:c})},Au=async a=>{const{menu:l,group:s,nameCol:r,valueCol:d}=a||{},c=l==null?void 0:l.join("/"),x=sessionStorage.getItem("systemKey"),v=await Ne.getItemData(c,x,"");return kr(v,{group:s,nameCol:r,valueCol:d})},po=async(a,l)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:c,valueCol:x}=a||{};if(!r.length||!d)return s;const{mainKey:v,group:f,nameCol:C,valueCol:w,isSelfDetail:F}=l||{};return v&&f&&Bt.isNumber(C)&&Bt.isNumber(w)?await Nu({menu:r,mainKey:v,detailGroup:f,detailNameCol:C,detailValueCol:w,isSelfDetail:F}):Bt.isNumber(c)&&Bt.isNumber(x)?await Au({menu:r,group:d,nameCol:c,valueCol:x}):s},Vu=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=a||{},c=_n==null?void 0:_n[r];if(!c)return;const{initBaseoptions:x,initSeries:v}=c,f=x();f.title.text=d??"";const{names:C,values:w}=await po(l,s);if(!C||!w)return f;f.xAxis.data=C;const F=v({data:w});return f.series.push(F),f},Ou=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=a||{},c=_n==null?void 0:_n[r];if(!c)return;const{initBaseoptions:x,initSeries:v}=c,f=x();f.title.text=d??"";const{names:C,values:w}=await po(l,s);if(!C||!w)return f;f.xAxis.data=C;const F=v({data:w});return f.series.push(F),f},Mu=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=a||{},c=_n==null?void 0:_n[r];if(!c)return;const{initBaseoptions:x,initSeries:v}=c,f=x();f.title.text=d??"";const{names:C,values:w}=await po(l,s);if(!C||!w)return f;const F=[];for(let H=0;H<C.length;H++){const M=C[H],ve=w[H];F.push({name:M,value:ve})}const R=v({data:F});return f.series.push(R),f},zu=async(a=[])=>{var x,v,f;const l=((x=a==null?void 0:a.find(C=>C.key==="chartBaseConfig"))==null?void 0:x.contents)??{},s=((v=a==null?void 0:a.find(C=>C.key==="chartDataConfig"))==null?void 0:v.contents)??{},r=((f=a==null?void 0:a.find(C=>C.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=l;let c={};return d==="line"&&(c=await Vu({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(c=await Ou({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(c=await Mu({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),c},Fu=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 l=a,s=e.ref({});e.onMounted(async()=>{const d=l==null?void 0:l.itemData;s.value=await zu(d)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Ru=Rt._export_sfc(Fu,[["__scopeId","data-v-d4c081e8"]]),Pu={class:"chart-module layout"},Lu={class:"chart-module content"},$u={class:"chart-module content"},ju={class:"form-content"},Uu={class:"dialog-footer"},Ku={class:"form-content"},Wu={class:"dialog-footer"},Hu={class:"form-content"},qu={class:"dialog-footer"},Gu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),c=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:""}],v=e.ref({}),f=()=>{var le;c.value=x(),(le=c.value)==null||le.forEach(Q=>{var Ee;const se=Q==null?void 0:Q.prop;Q.value=(Ee=v==null?void 0:v.value)==null?void 0:Ee[se]}),d.visible=!0},C=le=>{v.value=le},w=()=>{var le;d.visible=!1,r("change",(le=Ye())==null?void 0:le.compData)},F=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=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:[]}],M=e.ref({}),ve=()=>{const le=R.value,Q=V.cloneDeep(le);return Q==null||Q.forEach(se=>{var qe;const Ee=se==null?void 0:se.prop;se.value=(qe=M.value)==null?void 0:qe[Ee]}),Q},K=le=>{var se;M.value=le;const Q=ve();R.value=Q,r("change",(se=Ye())==null?void 0:se.compData)},O=async()=>{const le=await Ne.getMenusContent(),Q=ve();Q==null||Q.forEach(se=>{(se==null?void 0:se.prop)==="menu"&&(se.contents=le)}),R.value=Q,F.visible=!0,await Qe(M.value.menu),await I(M.value.group)},G=e.reactive({visible:!1,width:"840",title:"详情页配置"}),b=e.ref([]),_=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),T=()=>{const le=b.value,Q=V.cloneDeep(le);return Q==null||Q.forEach(se=>{var qe;const Ee=se==null?void 0:se.prop;se.value=(qe=y.value)==null?void 0:qe[Ee]}),Q},h=le=>{var se;y.value=le;const Q=T();b.value=Q,r("change",(se=Ye())==null?void 0:se.compData)},ce=async()=>{await P();const le=V.cloneDeep(Ae.value),Q=T();Q==null||Q.forEach(se=>{var qe;const Ee=se==null?void 0:se.prop;se.value=(qe=y==null?void 0:y.value)==null?void 0:qe[Ee],Ee==="mainKey"&&(se.contents=le)}),b.value=Q,G.visible=!0},Ae=e.ref([]),at=e.ref([]),we=e.ref({}),Pe=e.ref({}),Le=()=>{const{compData:le}=ye.value||{},Q=le==null?void 0:le.find(U=>{const{key:J}=U;return J==="header"}),se=(Q==null?void 0:Q.contents)||[],Ee=se==null?void 0:se.filter((U,J)=>{const{label:D}=U;return D!=="操作"}),qe=Ee==null?void 0:Ee.findIndex((U,J)=>{const{isMainKey:D}=U;return D});if(qe<0)return[];const dt=le==null?void 0:le.find(U=>{const{key:J}=U;return J==="tableContents"}),m=(dt==null?void 0:dt.contents)||[];return m==null?void 0:m.map(U=>{const J=U==null?void 0:U[0];let D=qe;xe.isObject(J)&&(J!=null&&J.id)&&(D=D+1);const oe=U==null?void 0:U[D];return{label:oe,value:oe}})},P=async()=>{const le=await Le();Ae.value=le},re=async le=>{const Q=sessionStorage.getItem("systemKey");return await Ne.getItemData(le,Q,"")},ne=async le=>{const Q=le;at.value=Q==null?void 0:Q.map(se=>{const{name:Ee}=se;return we.value[Ee]=se,{label:Ee,value:Ee}})},pe=le=>{const{comp:Q,compData:se}=Pe.value||{};if(Q==="Table"){let Ee=T();Ee=Ee.filter(qe=>{const{prop:dt}=qe;return dt!=="formItems"}),ae(Ee,se),b.value=Ee}},He=async()=>{var se,Ee;const le=(se=y==null?void 0:y.value)==null?void 0:se.mainKey,Q=(Ee=M==null?void 0:M.value)==null?void 0:Ee.menu;if(le){const dt=`${Q==null?void 0:Q.join("/")}^${le}`,m=await re(dt);await ne(m);const S=T();S==null||S.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=at.value)}),b.value=S}};e.watch(()=>{var le;return(le=y==null?void 0:y.value)==null?void 0:le.mainKey},async(le,Q)=>{le!=Q&&le&&await He()});const ot=async le=>{const Q=we.value[le];Pe.value=Q,await pe()};e.watch(()=>{var le;return(le=y==null?void 0:y.value)==null?void 0:le.group},async(le,Q)=>{le!=Q&&le&&ot(le)});const X=async()=>{var Q;await He();const le=(Q=y.value)==null?void 0:Q.group;await ot(le)},A=e.ref([]),te=e.ref({}),ye=e.ref({}),ue=async le=>{const Q=le==null?void 0:le.join("/"),se=sessionStorage.getItem("systemKey");return await Ne.getItemData(Q,se,"")},De=async le=>{const Q=await ue(le);A.value=Q==null?void 0:Q.map(se=>{const{name:Ee}=se;return te.value[Ee]=se,{label:Ee,value:Ee}})},Qe=async(le,Q)=>{await De(le);const se=ve();se==null||se.forEach(Ee=>{(Ee==null?void 0:Ee.prop)==="group"&&(Ee.contents=A.value)}),R.value=se};e.watch(()=>{var le;return(le=M==null?void 0:M.value)==null?void 0:le.menu},async(le,Q)=>{const se=le==null?void 0:le.join("/"),Ee=Q==null?void 0:Q.join("/");se!=Ee&&await Qe(le)});const ae=(le,Q)=>{const se=Q==null?void 0:Q.find(m=>{const{key:S}=m;return S==="header"}),Ee=(se==null?void 0:se.contents)||[],qe=Ee==null?void 0:Ee.filter((m,S)=>{const{label:U}=m;return U!=="操作"}),dt=qe==null?void 0:qe.map((m,S)=>{const{label:U}=m;return{label:U,value:S}});le==null||le.forEach(m=>{const S=m==null?void 0:m.prop;(S==="nameCol"||S==="valueCol")&&(m.contents=dt)})},_e=le=>{const{comp:Q,compData:se}=ye.value||{};if(Q==="Table"){M.value.formItems=[];let Ee=ve();Ee=Ee.filter(qe=>{const{prop:dt}=qe;return dt!=="formItems"}),ae(Ee,se),R.value=Ee}},I=async le=>{const Q=te.value[le];ye.value=Q,await _e()};e.watch(()=>{var le;return(le=M==null?void 0:M.value)==null?void 0:le.group},async(le,Q)=>{le!=Q&&I(le)});const Xe=async()=>{var se,Ee;const le=(se=M.value)==null?void 0:se.menu;await Qe(le);const Q=(Ee=M.value)==null?void 0:Ee.group;await I(Q)},Ye=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:y.value}]}),Ie=()=>{d.visible=!1,F.visible=!1,G.visible=!1};return e.onMounted(async()=>{var Q,se,Ee;R.value=H(),b.value=_();const le=s==null?void 0:s.itemContents;v.value=((Q=le==null?void 0:le.find(qe=>qe.key==="chartBaseConfig"))==null?void 0:Q.contents)??{},M.value=((se=le==null?void 0:le.find(qe=>qe.key==="chartDataConfig"))==null?void 0:se.contents)??{},await Xe(),y.value=((Ee=le==null?void 0:le.find(qe=>qe.key==="chartDetailConfig"))==null?void 0:Ee.contents)??{},await X()}),(le,Q)=>{const se=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Pu,[Q[4]||(Q[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[0]||(Q[0]=Ee=>f())},{default:e.withCtx(()=>Q[3]||(Q[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Lu,[Q[6]||(Q[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[1]||(Q[1]=Ee=>O())},{default:e.withCtx(()=>Q[5]||(Q[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",$u,[Q[8]||(Q[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[2]||(Q[2]=Ee=>ce())},{default:e.withCtx(()=>Q[7]||(Q[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:Ie,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",ju,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:C},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(se,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>Q[9]||(Q[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(se,{class:"ok-button button",onClick:w,id:"themeButton"},{default:e.withCtx(()=>Q[10]||(Q[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:F.visible,title:F.title,onBeforeDestroy:Ie,width:F.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ku,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:K},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wu,[e.createVNode(se,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>Q[11]||(Q[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(se,{class:"ok-button button",onClick:Ie,id:"themeButton"},{default:e.withCtx(()=>Q[12]||(Q[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:G.visible,title:G.title,onBeforeDestroy:Ie,width:G.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:h},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",qu,[e.createVNode(se,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>Q[13]||(Q[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(se,{class:"ok-button button",onClick:Ie,id:"themeButton"},{default:e.withCtx(()=>Q[14]||(Q[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Xu=Rt._export_sfc(Gu,[["__scopeId","data-v-fe119645"]]),Yu=(a,l)=>{let s;a.replaceAll(" ",`\r
1
+ "use strict";const ba=require("./index-BhpB-M-v.cjs"),e=require("vue"),xe=require("./index-pSTYzLRc.cjs"),Bt=require("./index-CiO2uT4E.cjs"),Ne=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BDXu7acs.cjs"),Xt=require("./index-DU4iimmS.cjs"),Co=require("./threeViewerHost-e0FA2tJj.cjs"),V=require("./index-Bc85VROV.cjs");require("./index.vue_vue_type_style_index_1_lang-OiQttjIF.cjs");const Rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Do=require("./isString-DDsphIfV.cjs"),_o=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Eo=require("./index-uN57qZre.cjs"),ur=require("./index-BVaHwt5f.cjs"),Fl=require("./index-CRhbl-Xs.cjs"),ua=require("./index-CkUnZ2se.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),ya=require("./index-9hspBVrQ.cjs"),Ll=require("./menuIndex-bwSbtzjl.cjs");var $l=/\s/;function jl(a){for(var l=a.length;l--&&$l.test(a.charAt(l)););return l}var Ul=/^\s+/;function Kl(a){return a&&a.slice(0,jl(a)+1).replace(Ul,"")}var So=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function To(a){if(typeof a=="number")return a;if(xe.isSymbol(a))return So;if(xe.isObject(a)){var l=typeof a.valueOf=="function"?a.valueOf():a;a=xe.isObject(l)?l+"":l}if(typeof a!="string")return a===0?a:+a;a=Kl(a);var s=Hl.test(a);return s||ql.test(a)?Gl(a.slice(2),s?2:8):Wl.test(a)?So:+a}var Qa=function(){return xe.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function dr(a,l,s){var r,d,c,x,v,f,C=0,w=!1,F=!1,R=!0;if(typeof a!="function")throw new TypeError(Xl);l=To(l)||0,xe.isObject(s)&&(w=!!s.leading,F="maxWait"in s,c=F?Yl(To(s.maxWait)||0,l):c,R="trailing"in s?!!s.trailing:R);function H(T){var h=r,ce=d;return r=d=void 0,C=T,x=a.apply(ce,h),x}function M(T){return C=T,v=setTimeout(O,l),w?H(T):x}function ve(T){var h=T-f,ce=T-C,Ae=l-h;return F?Jl(Ae,c-ce):Ae}function K(T){var h=T-f,ce=T-C;return f===void 0||h>=l||h<0||F&&ce>=c}function O(){var T=Qa();if(K(T))return G(T);v=setTimeout(O,ve(T))}function G(T){return v=void 0,R&&r?H(T):(r=d=void 0,x)}function b(){v!==void 0&&clearTimeout(v),C=0,r=f=d=v=void 0}function _(){return v===void 0?x:G(Qa())}function y(){var T=Qa(),h=K(T);if(r=arguments,d=this,f=T,h){if(v===void 0)return M(f);if(F)return clearTimeout(v),v=setTimeout(O,l),H(f)}return v===void 0&&(v=setTimeout(O,l)),x}return y.cancel=b,y.flush=_,y}var Zl="[object Boolean]";function pr(a){return a===!0||a===!1||xe.isObjectLike(a)&&xe.baseGetTag(a)==Zl}function Ql(a){return a===void 0}const ei={class:"statistics-cards-container"},ti={class:"statistics-label"},ni={class:"statistics-value"},ai=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(a){return(l,s)=>(e.openBlock(),e.createElementBlock("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:d},[e.createElementVNode("div",ti,e.toDisplayString(r==null?void 0:r.label),1),e.createElementVNode("div",ni,e.toDisplayString((r==null?void 0:r.value)??0),1)]))),128))]))}}),oi=Rt._export_sfc(ai,[["__scopeId","data-v-d399b1f3"]]),ri={class:"form-content"},li={title:"选择标签"},ii={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},si={class:"col-operate-wrap"},ci={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ui={__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:l}){const s=()=>{x.value=!1,v.value=!1,f.value=[]},r=a;e.computed(()=>{var $;const B=($=A.value)==null?void 0:$.split("/");return(B==null?void 0:B.some(W=>(W==null?void 0:W.includes("updateLoading"))||(W==null?void 0:W.includes("loading"))))?!1:P.value==="view"});const d=l,c=e.ref([]),x=e.ref(!1),v=e.ref(!1),f=e.ref([]),{getFileExtension:C}=Co.useThreeSystem(),w=e.ref(),F=e.ref(!1),R=e.ref(!1),H=Ne.useUnit(xe.pinia),{chooseTitle:M}=xe.storeToRefs(H),ve=e.ref([]),K=e.ref(),O=e.ref(!1),G=e.ref([]),b=ba.useFormToTableComp(xe.pinia),_=ba.useFormComp(xe.pinia),y=e.ref(!1),T=e.ref(),h=V.useLoginState(xe.pinia),{loginUserInfo:ce}=xe.storeToRefs(h),Ae=e.ref(),at=e.ref(!0),we=V.useModelComp(xe.pinia),{tableViewContents:Pe,itemData:Le,isEdit:P,routeToChildPath:re,lockingPage:ne}=xe.storeToRefs(we),pe=e.ref(null),He=e.ref(!1),ot=e.ref(!1),X=V.useMenuState(),{activeMenuPath:A}=xe.storeToRefs(X),te=Ne.useOriginalState(xe.pinia),{originalPath:ye}=xe.storeToRefs(te),ue=e.ref([]),De=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Qe=async B=>{ot.value=B,await le("disabled",null,B,!0)},ae=async B=>{await le("operable",null,B,!0)};e.watch(()=>A.value,async()=>{c.value=[],f.value=[]},{deep:!0,immediate:!0});const _e=()=>{e.nextTick(()=>{Ie()})},I=B=>{var ee;c.value=(ee=c.value)==null?void 0:ee.map($=>({...$,isFormColHidden:!(B!=null&&B.includes($.label))}))};e.onUnmounted(()=>{pe.value=null});const Xe=B=>{d("clickTrigger",B)},Ye=async B=>{var ee,$,W,Se,ie,q;if(B===""){let Z="";(ee=c.value)==null||ee.forEach(be=>{be!=null&&be.isMain&&(Z=be==null?void 0:be.value)});let de=await Ne.getItemData(re.value,sessionStorage.getItem("systemKey"),"");Z=((q=(ie=(Se=(W=($=de==null?void 0:de[0])==null?void 0:$.compData)==null?void 0:W.find(be=>(be==null?void 0:be.key)==="mainRouters"))==null?void 0:Se.contents)==null?void 0:ie[0])==null?void 0:q.routerContent)+ye.value+Z;let Ce=await Ne.getItemData(Z,sessionStorage.getItem("systemKey"),"");O.value=!0,G.value=Ce==null?void 0:Ce.filter(be=>(be==null?void 0:be.comp)!=="methodButton"),d("routeUrl",G.value)}},Ie=()=>{var ee;const B=(ee=pe.value)==null?void 0:ee.$el;B&&Ne.Sortable.create(B,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:$=>{const{oldIndex:W,newIndex:Se}=$;if(W===Se)return;const ie=c.value.splice(W,1)[0];c.value.splice(Se,0,ie)}})},le=async(B,ee,$,W=!1)=>{try{we.setRefreshCurStructure(!1)}catch{xe.ElMessage.error("编辑处理失败")}},Q=async(B,ee)=>{await le()},se=async(B,ee)=>{B&&await le()},Ee=async(B,ee,$)=>{await le(ee,$,B,!1)},qe=(B,ee)=>{Ae.value===ee?at.value=!1:at.value=!0,Ae.value=ee==null?void 0:ee.changeProp},dt=async B=>{var $,W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt;let ee=[];if(($=B==null?void 0:B.toString())!=null&&$.includes(".urdf")){if(B.includes(",")){xe.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:B,extension:C(B)}],v.value=!0,x.value=!0;return}if((W=B==null?void 0:B.toString())!=null&&W.includes(".stl")||(Se=B==null?void 0:B.toString())!=null&&Se.includes(".STL")||(ie=B==null?void 0:B.toString())!=null&&ie.includes(".obj")||(q=B==null?void 0:B.toString())!=null&&q.includes(".mtl")){const nt=((Z=B==null?void 0:B.toString())==null?void 0:Z.split(",")).map(Be=>({url:Be,extension:C(Be)}));f.value=nt,v.value=!1,x.value=!0;return}if((de=B==null?void 0:B.toString())!=null&&de.includes(".stl")||(me=B==null?void 0:B.toString())!=null&&me.includes(".STL")||(Ce=B==null?void 0:B.toString())!=null&&Ce.includes(".obj")||(be=B==null?void 0:B.toString())!=null&&be.includes(".mtl")){let $e,nt=[],Be={};if(Array.isArray(B)?$e=B:$e=B==null?void 0:B.split(","),$e==null||$e.forEach(mt=>{mt.includes(".mtl")?nt.push(mt):Be.blob=Be.blob?Be.blob+","+mt:mt}),(nt==null?void 0:nt.length)>0&&(Be.mtlBlobs=nt),(Me=(j=Object.values(Be))==null?void 0:j[0])!=null&&Me.includes("http:"))ee.push(Be);else{const mt=new Blob([Be.blob],{type:"application/octet-stream;charset=UTF-8"});let et=URL.createObjectURL(mt),Oe="";(ge=B==null?void 0:B.split("/"))==null||ge.forEach((it,gt)=>{var Je;gt===((Je=B==null?void 0:B.split("/"))==null?void 0:Je.length)-1&&(Oe=it)}),(Ue=Be.blob)!=null&&Ue.includes(".stl")&&(Oe=(Oe==null?void 0:Oe.replaceAll(">",""))+".urdf"),K.value=[{name:Oe,blobUrl:et}],R.value=!0}}else{const $e=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),nt=await xe.axios.get(B,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{$e.close()}),Be=new Blob([nt.data],{type:"application/octet-stream;charset=UTF-8"});let mt=URL.createObjectURL(Be),et="";(rt=B==null?void 0:B.split("/"))==null||rt.forEach((Oe,it)=>{var gt;it===((gt=B==null?void 0:B.split("/"))==null?void 0:gt.length)-1&&(et=Oe)}),K.value=[{name:et,blobUrl:mt}],R.value=!0}(ee==null?void 0:ee.length)>0&&_.setBlobUrls(ee)},m=()=>{R.value=!1},S=B=>{var ie,q,Z,de;const ee=(q=(ie=V.cloneDeep(r.itemData))==null?void 0:ie.find(me=>(me==null?void 0:me.key)==="formContent"))==null?void 0:q.contents,$=V.cloneDeep(B.content);let W={};$&&((Z=Object.values($))==null?void 0:Z.length)>0&&((de=Object.values($))==null||de.forEach((me,Ce)=>{W[ee[Ce].key]=me}));const Se={content:W,index:r==null?void 0:r.index,buttonName:B==null?void 0:B.buttonName};d("change",Se)},U=e.computed(()=>"http://222.92.178.198:62001"),J=async B=>{var j,Me,ge,Ue,rt,$e,nt,Be,mt,et,Oe,it,gt,Je,je,It;if(!B)return;(Me=(j=r==null?void 0:r.itemData)==null?void 0:j.find(Te=>(Te==null?void 0:Te.key)==="parentFormPath"))==null||Me.contents;let ee=Pe.value;(ee==null?void 0:ee.length)>0&&(ee=ee==null?void 0:ee.map(Te=>{var Fe,Ze,E,fe;let Ge=(Fe=Te==null?void 0:Te.key)==null?void 0:Fe.split("/");return(r==null?void 0:r.compName)===(Ge==null?void 0:Ge[0])&&(Ze=c.value)!=null&&Ze.find(Ke=>(Ke==null?void 0:Ke.prop)===(Ge==null?void 0:Ge[1]))&&(Te.value=(fe=(E=c.value)==null?void 0:E.find(Ke=>(Ke==null?void 0:Ke.prop)===(Ge==null?void 0:Ge[1])))==null?void 0:fe.value),Te}),we.setTableViewContents(ee));const $=V.cloneDeep(r.itemData);let W=$==null?void 0:$.map(Te=>{var Ge;return(Te==null?void 0:Te.key)==="formContent"&&((Ge=Te.contents)==null||Ge.map((Fe,Ze)=>{var E,fe,Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt,vt,Mt,Lt,Ut,Wt,Jt;return Fe.type=(fe=(E=c.value)==null?void 0:E.find(Pt=>(Pt==null?void 0:Pt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:fe.type,Fe.options=Fe!=null&&Fe.options?Fe.options:((ut=(he=(Ke=Fe==null?void 0:Fe.key)==null?void 0:Ke.split("$"))==null?void 0:he[1])==null?void 0:ut.length)>0?(ct=(pt=ba.formGetOptions((xt=(st=Fe==null?void 0:Fe.key)==null?void 0:st.split("$"))==null?void 0:xt[1]))==null?void 0:pt.split(","))==null?void 0:ct.map(Pt=>({label:Pt,value:Pt})):[],(ft=Fe==null?void 0:Fe.key)!=null&&ft.includes("$")&&(Fe.key=(Tt=(wt=Fe==null?void 0:Fe.key)==null?void 0:wt.split("$"))==null?void 0:Tt[0]),Fe.signature=(vt=(jt=c.value)==null?void 0:jt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:vt.signature,Fe.isLoginUser=(Lt=(Mt=c.value)==null?void 0:Mt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Lt.isLoginUser,Fe.value=(Ut=Object.values(B))==null?void 0:Ut[Ze],Fe.isFormColHidden=(Jt=(Wt=c.value)==null?void 0:Wt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Jt.isFormColHidden,Fe})),Te}),Se=c.value,ie=(Ue=(ge=V.cloneDeep(W))==null?void 0:ge.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:Ue.contents;if(Se=Se==null?void 0:Se.map(Te=>{var Ge;return Te.value=(Ge=ie==null?void 0:ie.find((Fe,Ze)=>((Fe==null?void 0:Fe.id)??Ze)===(Te==null?void 0:Te.id)))==null?void 0:Ge.value,Te}),!at.value){d("contentChange",{contents:W,index:r.index});return}let q="",Z=(nt=($e=(rt=V.cloneDeep(W))==null?void 0:rt.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:$e.contents)==null?void 0:nt.find((Te,Ge)=>{var Fe,Ze,E;return(Te==null?void 0:Te.label)===Ae.value||Ge.toString()===((E=(Ze=(Fe=Ae.value)==null?void 0:Fe.split("t"))==null?void 0:Ze[1])==null?void 0:E.toString())}),de=(Be=Z==null?void 0:Z.optionUrl)==null?void 0:Be.menuSelect,me=!0;if((Oe=(et=(mt=V.cloneDeep(W))==null?void 0:mt.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:et.contents)==null||Oe.forEach(Te=>{var Ge,Fe,Ze,E,fe,Ke;me&&((Ze=(Fe=(Ge=Te==null?void 0:Te.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Fe[1])!=null&&Ze.includes("["))&&(q=(fe=(E=Te==null?void 0:Te.optionUrl)==null?void 0:E.groupSelect)==null?void 0:fe[1],JSON.stringify(de)===JSON.stringify((Ke=Te==null?void 0:Te.optionUrl)==null?void 0:Ke.menuSelect)&&(me=!1))}),(it=Z==null?void 0:Z.optionUrl)!=null&&it.menuSelect&&at.value){let Te=await ba.getSelectRow(Z),Ge,Fe=(gt=Z==null?void 0:Z.optionUrl)==null?void 0:gt.menuSelect;if(Te==null||Te.forEach(Ze=>{var E,fe,Ke,he,ut,st,xt,pt,ct,ft;q===((fe=(E=Z==null?void 0:Z.optionUrl)==null?void 0:E.groupSelect)==null?void 0:fe[1])&&((ut=(he=(Ke=Z==null?void 0:Z.optionUrl)==null?void 0:Ke.groupSelect)==null?void 0:he[1])!=null&&ut.includes("["))&&((ft=V.cloneDeep(Ze))==null?void 0:ft[(ct=(pt=(xt=(st=Z==null?void 0:Z.optionUrl)==null?void 0:st.groupSelect)==null?void 0:xt[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(Z==null?void 0:Z.value)&&(Ge=Ze)}),Ge){let Ze=V.cloneDeep(Se);Ze=Ze==null?void 0:Ze.map(fe=>{var Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt;return(Ge!=null&&Ge[fe==null?void 0:fe.label]||Ge!=null&&Ge[(st=(ut=(he=(Ke=fe==null?void 0:fe.optionUrl)==null?void 0:Ke.groupSelect)==null?void 0:he[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])&&((ct=(pt=(xt=fe==null?void 0:fe.optionUrl)==null?void 0:xt.groupSelect)==null?void 0:pt[1])!=null&&ct.includes("["))&&Fe!=null&&Fe.every(vt=>{var Mt,Lt;return(Lt=(Mt=fe==null?void 0:fe.optionUrl)==null?void 0:Mt.menuSelect)==null?void 0:Lt.includes(vt)})&&(fe.value=(Ge==null?void 0:Ge[fe==null?void 0:fe.label])||(Ge==null?void 0:Ge[(jt=(Tt=(wt=(ft=fe==null?void 0:fe.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:wt[1])==null?void 0:Tt.replaceAll("[",""))==null?void 0:jt.replaceAll("]","")]),Array.isArray(fe.value)&&fe.value.every(vt=>(vt==null?void 0:vt.url)&&(vt==null?void 0:vt.name))&&(fe.type="Upload")),fe}),Ze=Ze==null?void 0:Ze.map(fe=>{var Ke,he,ut;return(Ke=fe==null?void 0:fe.optionUrl)!=null&&Ke.oldMenuSelect&&(fe.optionUrl.menuSelect=(ut=(he=V.cloneDeep(fe))==null?void 0:he.optionUrl)==null?void 0:ut.oldMenuSelect),fe}),c.value=V.cloneDeep(Ze);let E=V.cloneDeep(Ze);E=E==null?void 0:E.map(fe=>{var Ke,he,ut,st,xt,pt;return(he=(Ke=fe==null?void 0:fe.optionUrl)==null?void 0:Ke.menuSelect)!=null&&he.some(ct=>ct==null?void 0:ct.includes("["))&&(fe.optionUrl.oldMenuSelect=(st=(ut=V.cloneDeep(fe))==null?void 0:ut.optionUrl)==null?void 0:st.menuSelect,fe.optionUrl.menuSelect=(pt=(xt=fe==null?void 0:fe.optionUrl)==null?void 0:xt.menuSelect)==null?void 0:pt.map(ct=>{var ft,wt,Tt,jt;if(ct!=null&&ct.includes("[")){let vt=(wt=(ft=ct==null?void 0:ct.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:wt[1];ct=(jt=(Tt=V.cloneDeep(Ze))==null?void 0:Tt.find(Mt=>(Mt==null?void 0:Mt.label)===vt))==null?void 0:jt.value}return ct})),fe}),c.value=E}else c.value=Se;W=W==null?void 0:W.map(Ze=>{var E;return(Ze==null?void 0:Ze.key)==="formContent"&&(Ze.contents=(E=Ze.contents)==null?void 0:E.map(fe=>{var Ke,he,ut,st;return fe.value=((he=(Ke=c.value)==null?void 0:Ke.find(xt=>(xt==null?void 0:xt.label)===(fe==null?void 0:fe.key)))==null?void 0:he.value)??(fe==null?void 0:fe.value),fe.type=((st=(ut=c.value)==null?void 0:ut.find(xt=>(xt==null?void 0:xt.prop)===(fe==null?void 0:fe.key)))==null?void 0:st.type)??(fe==null?void 0:fe.type),fe})),Ze})}at.value=!1,d("contentChange",{contents:W,index:r.index});let Ce=[],be=[];if((je=V.cloneDeep((Je=W==null?void 0:W.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:Je.contents))==null||je.forEach(Te=>{var Ge;Array.isArray(Te==null?void 0:Te.value)&&((Ge=Te==null?void 0:Te.value)!=null&&Ge.find(Fe=>{var Ze;return(Ze=Fe==null?void 0:Fe.url)==null?void 0:Ze.includes(".obj")}))&&(be=Te==null?void 0:Te.value)}),(be==null?void 0:be.length)>0){const Te=(It=V.cloneDeep(be))==null?void 0:It.filter(Ge=>{var Fe;return(Fe=Ge==null?void 0:Ge.url)==null?void 0:Fe.includes(".obj")});Te==null||Te.forEach(Ge=>{var Ze,E,fe,Ke;const Fe=(Ze=be==null?void 0:be.filter(he=>{var ut;return(he==null?void 0:he.name)===(Ge==null?void 0:Ge.name)&&((ut=he==null?void 0:he.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:Ze.map(he=>he==null?void 0:he.url);Ce.push({objUrl:Ge==null?void 0:Ge.url,mtlUrls:((E=be==null?void 0:be.filter(he=>{var ut;return(he==null?void 0:he.name)===(Ge==null?void 0:Ge.name)&&((ut=he==null?void 0:he.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:E.length)===1?(Ke=(fe=be==null?void 0:be.filter(he=>{var ut;return(he==null?void 0:he.name)===(Ge==null?void 0:Ge.name)&&((ut=he==null?void 0:he.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:fe[0])==null?void 0:Ke.url:Fe})}),_.setObjUrl(Ce)}},D=B=>{if(!B)return;const ee=[];let $="";for(let W of B)(W.includes("[")||$.includes("["))&&($+=W.trim(),V.cloneDeep($).split("【").length-1===V.cloneDeep($).split("】").length-1&&V.cloneDeep($).split("[").length-1===V.cloneDeep($).split("]").length-1&&(ee.push($.replace(/\/\*[\s\S]*?\*\//g,"")),$=""));return ee},oe=(B,ee,$)=>{let W="";const Se=ee==null?void 0:ee.map(ie=>{var q;return(q=ie==null?void 0:ie.value)==null?void 0:q.pageData});return Se==null||Se.forEach(ie=>{var q;(ie==null?void 0:ie.name)===(B==null?void 0:B[0])&&((q=ie==null?void 0:ie.compData)==null||q.forEach(Z=>{var de;(Z==null?void 0:Z.key)==="formContent"&&((de=Z==null?void 0:Z.contents)==null||de.forEach(me=>{var Ce;(me==null?void 0:me.prop)===(B==null?void 0:B[1])&&(W=(me==null?void 0:me.value)===""?Ne.judgeContents((Ce=V.cloneDeep(me))==null?void 0:Ce.optionUrl,$):me==null?void 0:me.value)}))}))}),W},Ve=(B,ee,$,W)=>{var Z,de;let Se="",ie="";(Z=V.cloneDeep(ee))==null||Z.forEach((me,Ce)=>{me!=null&&me.includes("[")?ie=ie+ye.value+B[Ce]:ie=ie===""?ie+me:ie+"/"+me});let q=(de=W[ie])==null?void 0:de.map(me=>{var Ce;return(Ce=me==null?void 0:me.value)==null?void 0:Ce.pageData});return q==null||q.forEach(me=>{var Ce;(me==null?void 0:me.name)===($==null?void 0:$[0])&&((Ce=me==null?void 0:me.compData)==null||Ce.forEach(be=>{var j;(be==null?void 0:be.key)==="formContent"&&((j=be==null?void 0:be.contents)==null||j.forEach(Me=>{(Me==null?void 0:Me.prop)===($==null?void 0:$[1])&&(Se=Me==null?void 0:Me.value)}))}))}),Se};return e.watch(()=>r.itemData,async()=>{var q,Z,de,me,Ce,be,j,Me,ge,Ue,rt,$e,nt,Be,mt,et,Oe,it,gt;const B=(q=r.itemData)==null?void 0:q.find(Je=>(Je==null?void 0:Je.key)==="formContent"),ee=(Z=V.cloneDeep(r.itemData))==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="formButton"),$=(de=V.cloneDeep(r.itemData))==null?void 0:de.find(Je=>(Je==null?void 0:Je.key)==="formFlex"),W=(me=V.cloneDeep(r.itemData))==null?void 0:me.find(Je=>(Je==null?void 0:Je.key)==="formWrap"),Se=(Ce=V.cloneDeep(r.itemData))==null?void 0:Ce.find(Je=>(Je==null?void 0:Je.key)==="enableWrap");if((W==null?void 0:W.contents)==="纵向"?F.value=!1:F.value=!0,y.value=(Se==null?void 0:Se.contents)===void 0?!1:Se==null?void 0:Se.contents,T.value=typeof($==null?void 0:$.contents)!="boolean"?!(!($!=null&&$.contents)===""||((be=$==null?void 0:$.contents)==null?void 0:be.toUpperCase())==="VERTICAL"):$==null?void 0:$.contents,((j=B==null?void 0:B.contents)==null?void 0:j.length)>0&&Array.isArray(B==null?void 0:B.contents)){let Je=r.allMapContents;const je=(ge=(Me=V.cloneDeep(B))==null?void 0:Me.contents)==null?void 0:ge.map((E,fe)=>{var vt,Mt,Lt,Ut,Wt,Jt,Pt,En,zn,gn,Fn,yn,Rn,Pn,Ln,$n,jn,Sn,hn,un,bn,vn,nn,pn,Un,Tn,Bn,kn,Kn,Wn,In,Hn,qn;let Ke=(E==null?void 0:E.label)??(E==null?void 0:E.key)??"",he=(E==null?void 0:E.type)??"",ut=(E==null?void 0:E.options)??[];if((vt=E==null?void 0:E.key)!=null&&vt.includes("$")&&(Ke=(Mt=V.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:Mt[0],((Ut=(Lt=V.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:Lt[1])==null?void 0:Ut.length)>0)){const[_t,Yt]=(Jt=(Wt=V.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:Wt[1])==null?void 0:Jt.split(/[()]/);he=((Pt=Ne.FormType.find(yt=>(yt==null?void 0:yt.key)===_t))==null?void 0:Pt.value)??"",((En=Yt==null?void 0:Yt.split(","))==null?void 0:En.length)>0&&(ut=(zn=Yt==null?void 0:Yt.split(","))==null?void 0:zn.map(yt=>({label:yt,value:yt})))}let st=[];E!=null&&E.contents&&!Array.isArray(E==null?void 0:E.contents)&&(st=(Fn=(gn=E==null?void 0:E.contents)==null?void 0:gn.split(","))==null?void 0:Fn.map(_t=>({label:_t,value:_t}))),((yn=E==null?void 0:E.optionUrl)==null?void 0:yn.selectRelateType)==="自定义绑定"&&(st=(Pn=(Rn=E==null?void 0:E.optionUrl)==null?void 0:Rn.defaultSelect)==null?void 0:Pn.map(_t=>({label:_t,value:_t})));let xt=!1,pt=(E==null?void 0:E.isFormColHidden)??!1,ct=Ne.judgeContents((Ln=V.cloneDeep(E))==null?void 0:Ln.optionUrl,Je),ft=ct!==void 0&&ct!==""?ct:E!=null&&E.originalContent&&(E==null?void 0:E.originalContent)!==""?E.originalContent:E!=null&&E.value?E.value:(ut==null?void 0:ut.length)>0?($n=ut==null?void 0:ut[0])==null?void 0:$n.value:(E==null?void 0:E.value)??"",wt=!1,Tt=ct!==void 0||he===""?"Input":he;if((Array.isArray(ct)&&(ct!=null&&ct.every(_t=>(_t==null?void 0:_t.name)&&(_t==null?void 0:_t.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(_t=>(_t==null?void 0:_t.name)&&(_t==null?void 0:_t.url))))&&(Tt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||E!=null&&E.isLoginUser)xt=!0,ft=((jn=ce.value)==null?void 0:jn.姓名)||((Sn=ce.value)==null?void 0:Sn.account)||((hn=ce.value)==null?void 0:hn.账号)||((un=ce.value)==null?void 0:un.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||E!=null&&E.signature||E!=null&&E.isShow)if(wt=!0,(E==null?void 0:E.isShow)==="originalSignature")Tt="image",ft=U.value+"/"+((bn=ce.value)==null?void 0:bn.signature);else{let _t=[...new Set(D(E.isShow))].map(bt=>{var Dt,Ct,zt,Vt;return{key:(Vt=(zt=(Ct=(Dt=bt==null?void 0:bt.split("["))==null?void 0:Dt[1])==null?void 0:Ct.split("]"))==null?void 0:zt[0])==null?void 0:Vt.split(":"),value:""}});(vn=Le.value)==null||vn.forEach(bt=>{_t==null||_t.forEach((Kt,Dt)=>{var zt;let Ct=Kt==null?void 0:Kt.key;(bt==null?void 0:bt.name)===(Ct==null?void 0:Ct[0].replaceAll("'",""))&&((zt=bt==null?void 0:bt.compData)==null||zt.forEach(Vt=>{var Ft;(Vt==null?void 0:Vt.key)==="formContent"&&((Ft=Vt==null?void 0:Vt.contents)==null||Ft.forEach(Ht=>{(Ht==null?void 0:Ht.prop)===(Ct==null?void 0:Ct[1].replaceAll("'",""))&&(_t[Dt].value=Ht==null?void 0:Ht.value)}))}))})});let Yt=_t==null?void 0:_t.map(bt=>{var Kt;return bt.key="["+((Kt=bt.key)==null?void 0:Kt.join(":"))+"]",bt}),yt=E==null?void 0:E.isShow;Yt==null||Yt.forEach(bt=>{bt!=null&&bt.value?yt=yt.replaceAll(bt==null?void 0:bt.key,"'"+(bt==null?void 0:bt.value)+"'"):yt=yt.replaceAll(bt==null?void 0:bt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((nn=yt==null?void 0:yt.split("==="))==null?void 0:nn[0])+"==='"+((pn=yt==null?void 0:yt.split("==="))==null?void 0:pn[1])+"'":yt=((Un=yt==null?void 0:yt.split("="))==null?void 0:Un[0])+"='"+((Tn=yt==null?void 0:yt.split("="))==null?void 0:Tn[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(pt=!1,Tt="image",ft=U.value+"/"+((Bn=ce.value)==null?void 0:Bn.signature)):ft=""}return Array.isArray(ft)&&ft.every(_t=>(_t==null?void 0:_t.url)&&(_t==null?void 0:_t.name))&&(E.type="Upload"),E!=null&&E.isMainUrl&&(Tt="Url"),{label:Ke??"",name:"t"+fe,prop:V.cloneDeep(E==null?void 0:E.key),type:Tt,value:E!=null&&E.isSync?((Kn=(kn=M.value)==null?void 0:kn[0])==null?void 0:Kn.value)??((qn=(Wn=A==null?void 0:A.value)==null?void 0:Wn.split("/"))==null?void 0:qn[((Hn=(In=A==null?void 0:A.value)==null?void 0:In.split("/"))==null?void 0:Hn.length)-1]):E!=null&&E.isNewDate&&ft===""?new Date:ft,id:(E==null?void 0:E.id)??fe,contents:(st==null?void 0:st.length)>0?st:ut??[],width:(E==null?void 0:E.width)??1,isLoginUser:xt,config:E==null?void 0:E.config,optionUrl:(E==null?void 0:E.optionUrl)??E,isFormColHidden:pt,signature:wt,isMain:E==null?void 0:E.isMain,isMainUrl:E==null?void 0:E.isMainUrl,operable:(E==null?void 0:E.operable)??!1,disabled:(E==null?void 0:E.disabled)??!1,isSync:E==null?void 0:E.isSync}}),It=je==null?void 0:je.map(E=>E==null?void 0:E.value);let Te="";It==null||It.forEach(E=>{E!==""&&E!==void 0&&(Te=Te===""?E:Te+"/"+E)}),b.setSelectArray(It),b.setSelectString(Te);let Ge=(Ue=V.cloneDeep(je))==null?void 0:Ue.map(E=>(E!=null&&E.value&&Ne.IsJson(E==null?void 0:E.value)&&Array.isArray(JSON.parse(E==null?void 0:E.value))&&(E.value=JSON.parse(E.value)),E));Ge=Ge==null?void 0:Ge.map(E=>{var fe,Ke,he,ut,st,xt,pt,ct;if((Ke=(fe=E==null?void 0:E.optionUrl)==null?void 0:fe.menuSelect)!=null&&Ke.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";E.optionUrl.oldMenuSelect=(ut=(he=V.cloneDeep(E))==null?void 0:he.optionUrl)==null?void 0:ut.menuSelect,E.optionUrl.menuSelect=(xt=(st=E==null?void 0:E.optionUrl)==null?void 0:st.menuSelect)==null?void 0:xt.map(wt=>{var Tt,jt,vt,Mt,Lt,Ut;if(wt!=null&&wt.includes("[")){let Wt=(jt=(Tt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Tt.split(":"))==null?void 0:jt[1];ft=oe((vt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"),Je==null?void 0:Je[A.value],Je),wt=((Lt=(Mt=V.cloneDeep(Ge))==null?void 0:Mt.find(Jt=>(Jt==null?void 0:Jt.label)===Wt))==null?void 0:Lt.value)||oe((Ut=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Ut.split(":"),Je==null?void 0:Je[A.value],Je)}return wt}),ft!==""&&E.value===""&&(E.value=Ve(E.optionUrl.menuSelect,E.optionUrl.oldMenuSelect,(pt=E==null?void 0:E.optionUrl)==null?void 0:pt.groupSelect,Je),Array.isArray(E.value)&&((ct=E.value)!=null&&ct.every(wt=>wt==null?void 0:wt.url))&&(E.type="UPLOAD"))}return E}),c.value=Ge,ot.value=((rt=c.value)==null?void 0:rt.every(E=>E==null?void 0:E.disabled))||ne.value===A.value,He.value=($e=c.value)==null?void 0:$e.every(E=>E==null?void 0:E.operable),ue.value=(nt=c.value)==null?void 0:nt.map(E=>E==null?void 0:E.label);let Fe=[],Ze=[];if((Be=V.cloneDeep(c.value))==null||Be.forEach(E=>{var fe;Array.isArray(E==null?void 0:E.value)&&((fe=E==null?void 0:E.value)!=null&&fe.find(Ke=>{var he;return(he=Ke==null?void 0:Ke.url)==null?void 0:he.includes(".obj")}))&&(Ze=E==null?void 0:E.value)}),(Ze==null?void 0:Ze.length)>0){const E=(mt=V.cloneDeep(Ze))==null?void 0:mt.filter(fe=>{var Ke;return(Ke=fe==null?void 0:fe.url)==null?void 0:Ke.includes(".obj")});E==null||E.forEach(fe=>{var he,ut,st,xt;const Ke=(he=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(fe==null?void 0:fe.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:he.map(pt=>pt==null?void 0:pt.url);Fe.push({objUrl:fe==null?void 0:fe.url,mtlUrls:((ut=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(fe==null?void 0:fe.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:ut.length)===1?(xt=(st=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(fe==null?void 0:fe.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:st[0])==null?void 0:xt.url:Ke})}),_.setObjUrl(Fe)}(et=V.cloneDeep(c.value))==null||et.forEach(E=>{var fe,Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt,vt;if((Ke=(fe=E==null?void 0:E.value)==null?void 0:fe.toString())!=null&&Ke.includes(".stl")||(ut=(he=E==null?void 0:E.value)==null?void 0:he.toString())!=null&&ut.includes(".STL")||(xt=(st=E==null?void 0:E.value)==null?void 0:st.toString())!=null&&xt.includes(".obj")||(ct=(pt=E==null?void 0:E.value)==null?void 0:pt.toString())!=null&&ct.includes(".mtl")||(wt=(ft=E==null?void 0:E.value)==null?void 0:ft.toString())!=null&&wt.includes(".urdf")){let Mt={},Lt=[],Ut;Array.isArray(E==null?void 0:E.value)?Ut=E==null?void 0:E.value:Ut=(Tt=E==null?void 0:E.value)==null?void 0:Tt.split(","),Ut==null||Ut.forEach(Wt=>{Wt.includes(".mtl")?Lt.push(Wt):Mt.blob=Mt.blob==="undefined"?Wt:Mt.blob+","+Wt}),(Lt==null?void 0:Lt.length)>0&&(Mt.mtlBlobs=Lt),(vt=(jt=Object.values(Mt))==null?void 0:jt[0])!=null&&vt.includes("http:")}})}else c.value=[];let ie=Pe.value;if((ie==null?void 0:ie.length)>0&&(ie=ie==null?void 0:ie.map(Je=>{var It,Te,Ge,Fe;let je=(It=Je==null?void 0:Je.key)==null?void 0:It.split("/");return(r==null?void 0:r.compName)===(je==null?void 0:je[0])&&(Te=c.value)!=null&&Te.find(Ze=>(Ze==null?void 0:Ze.prop)===(je==null?void 0:je[1]))&&(Je.value=(Fe=(Ge=c.value)==null?void 0:Ge.find(Ze=>(Ze==null?void 0:Ze.prop)===(je==null?void 0:je[1])))==null?void 0:Fe.value),Je}),we.setTableViewContents(ie)),r!=null&&r.formRules)w.value=r==null?void 0:r.formRules;else{let Je={};(Oe=V.cloneDeep(c).value)==null||Oe.forEach(je=>{(je==null?void 0:je.isMain)===!0&&(Je[(je==null?void 0:je.prop)??(je==null?void 0:je.name)]=[{required:!0,message:`${(je==null?void 0:je.prop)||(je==null?void 0:je.name)}不能为空`}])}),w.value=Je}if(((it=ee==null?void 0:ee.contents)==null?void 0:it.length)>0){const Je=[];(gt=ee==null?void 0:ee.contents)==null||gt.forEach((je,It)=>{(je==null?void 0:je.label)!==""&&Je.push({label:(je==null?void 0:je.label)??"",id:(je==null?void 0:je.id)??It,type:(je==null?void 0:je.type)??"",background:je==null?void 0:je.background})}),ve.value=Je}else ve.value=[]},{deep:!0,immediate:!0}),e.watch(()=>ne.value,B=>{ot.value=B===A.value},{immediate:!0}),(B,ee)=>{var Z,de;const $=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-switch"),Se=e.resolveComponent("el-checkbox"),ie=e.resolveComponent("el-popover"),q=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",ri,[y.value===!1?(e.openBlock(),e.createBlock(oi,{key:0,items:(de=(Z=c.value)==null?void 0:Z.filter(me=>!(me!=null&&me.isFormColHidden)))==null?void 0:de.map(me=>({label:me==null?void 0:me.label,value:me==null?void 0:me.value}))},null,8,["items"])):(e.openBlock(),e.createBlock(Bt.ssForm,{key:1,rowContents:c.value,formRules:w.value,buttonValue:ve.value,isRowFlex:!1,isEnableWrap:y.value,onOnButtonClick:S,onChange:J,formDisabled:ot.value,formLabelsOperable:He.value,isButtonRow:F.value,onPreview:dt,onBlurChange:qe,onHandleColEditChange:Q,onHandleColTypeChange:se,onRouteUrl:Ye,onClickTrigger:Xe},{operateCol:e.withCtx(({renderColumns:me,formDisabled:Ce,formLabelsOperable:be})=>[e.createVNode(ie,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:_e},{reference:e.withCtx(()=>[e.createElementVNode("span",li,[e.createVNode($,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ii,[ee[1]||(ee[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(W,{"model-value":Ce,"active-text":"禁用","inactive-text":"",onChange:Qe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(W,{"model-value":be,"active-text":"编辑所有标签","inactive-text":"",onChange:ae},null,8,["model-value"]),ee[2]||(ee[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(q,{modelValue:ue.value,"onUpdate:modelValue":ee[0]||(ee[0]=j=>ue.value=j),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:pe,onChange:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me,j=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:j.label},[e.createVNode(Se,{value:j.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(j.label),1)]),_:2},1032,["value"]),e.createVNode(ie,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode($,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Me;return[e.createElementVNode("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Me=Object.keys(j))==null?void 0:Me.filter(ge=>{var Ue;return(Ue=De.value)==null?void 0:Ue.find(rt=>(rt==null?void 0:rt.value)===ge)}),ge=>{var Ue,rt;return e.openBlock(),e.createElementBlock("div",{key:ge},[e.createVNode(Bt._sfc_main$1,{value:j==null?void 0:j[ge],"active-text":(rt=(Ue=De.value)==null?void 0:Ue.find($e=>($e==null?void 0:$e.value)===ge))==null?void 0:rt.label,inactiveText:"",onChange:$e=>Ee($e,ge,j)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ci,[e.createVNode($,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"])),R.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:2,fileDataList:K.value,onDestroy:m},null,8,["fileDataList"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:3,visible:x.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Co.ThreeViewerHost,{files:f.value,onGetAnimationData:B.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Bo=Rt._export_sfc(ui,[["__scopeId","data-v-8040f4ad"]]),Pa=e.ref(0),fr=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=V.cloneDeep(a))==null?void 0:l.map(r=>(Pa.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Pa.value,children:fr(r==null?void 0:r.children)},r))},di=a=>{var s;return(s=V.cloneDeep(a))==null?void 0:s.map(r=>(Pa.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Pa.value,children:fr(r==null?void 0:r.children)},r))},hr=(a,l)=>{var s;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(s=V.cloneDeep(a))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=hr(r==null?void 0:r.children,l),r)),a)},vr=(a,l)=>{var s;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(s=V.cloneDeep(a))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(l==null?void 0:l.id)&&(d=l),d)):(a=a==null?void 0:a.map(r=>(r.children=vr(r==null?void 0:r.children,l),r)),a)},mr=(a,l)=>{var s;return a!=null&&a.find(r=>{var d;return(r==null?void 0:r.id)===((d=l==null?void 0:l.contents)==null?void 0:d.id)})?(s=V.cloneDeep(a))==null?void 0:s.map(d=>{var c;return(d==null?void 0:d.id)===((c=l==null?void 0:l.contents)==null?void 0:c.id)&&(d=l==null?void 0:l.contents),d}):(a=a==null?void 0:a.map(r=>(r.children=mr(r==null?void 0:r.children,l),r)),a)},gr=(a,l)=>{var s;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(s=V.cloneDeep(a))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(l==null?void 0:l.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(l.contents)),d)):(a=a==null?void 0:a.map(r=>(r.children=gr(r==null?void 0:r.children,l),r)),a)},At=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],pi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],fi=[{label:"新增",value:"add"}],wn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:fi},{key:"background",label:"按钮背景色",type:"Color"}],Cn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:pi},{key:"textColor",label:"按钮颜色",type:"Color"}],hi={class:"table-header-child"},vi={class:"table-header-child-main"},mi={class:"table-header-child-content"},gi={class:"table-header-child-content-item"},yi={class:"fix-button"},bi={key:0},ki={class:"form-content"},xi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const s=a,r=l,d=e.ref(!1),c=e.ref(""),x=Ne.useTableComp(xe.pinia),{tableIndex:v}=xe.storeToRefs(x);e.ref(0);const f=e.ref(""),C=e.ref([]),w=e.ref([]),F=b=>{var y;d.value=!0;let _=[];At==null||At.forEach(T=>{let h=V.cloneDeep(v.value)+1;x.setTableIndex(h),_.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:b[T.key],id:v.value,contents:T==null?void 0:T.options})}),b!=null&&b.children&&((y=b==null?void 0:b.children)==null?void 0:y.length)>0&&_.push({children:b==null?void 0:b.children,isFormColHidden:!0}),f.value=b==null?void 0:b.id,C.value=_,w.value=_},R=b=>{r("fixChange",V.cloneDeep(b))},H=b=>{r("deleteChange",V.cloneDeep(b))},M=b=>{d.value=!0;let _=[];At==null||At.forEach(y=>{let T=V.cloneDeep(v.value)+1;x.setTableIndex(T),_.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:v.value,contents:y==null?void 0:y.options})}),c.value=b==null?void 0:b.id,C.value=_,w.value=_},ve=b=>{let _=V.cloneDeep(w.value);_=_==null?void 0:_.map(y=>(y.children||(y.value=b==null?void 0:b[y.name]),y)),w.value=_},K=()=>{var _,y;C.value=w.value;let b={};if(f.value!=="")b.id=f.value,(_=C.value)==null||_.forEach(T=>{const h=At==null?void 0:At.find(ce=>(ce==null?void 0:ce.label)===(T==null?void 0:T.label));h?b[h.key]=T.value:T!=null&&T.children&&T.children.length>0&&(b.children=T.children)}),d.value=!1,r("fixChange",{contents:V.cloneDeep(b),id:c.value,type:"fix"});else{let T=V.cloneDeep(v.value)+1;x.setTableIndex(T),b.id="id"+v.value,(y=C.value)==null||y.forEach(h=>{const ce=At==null?void 0:At.find(Ae=>(Ae==null?void 0:Ae.label)===(h==null?void 0:h.label));ce?b[ce.key]=h.value:h!=null&&h.children&&h.children.length>0&&(b.children=h.children)}),d.value=!1,r("fixChange",{contents:V.cloneDeep(b),id:c.value,type:"add"})}f.value="",C.value=[],w.value=[]},O=()=>{d.value=!1,f.value="",c.value="",C.value=[],w.value=[]},G=b=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",b),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(b,_)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",hi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,h)=>(e.openBlock(),e.createElementBlock("div",vi,[e.createElementVNode("div",mi,[e.createElementVNode("div",gi,e.toDisplayString(T.label),1),e.createElementVNode("div",yi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>M(T)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>F(T)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ce=>G(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(yr,{tableChildContents:T==null?void 0:T.children,onDeleteChange:H,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:O,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ki,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:O,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:K},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},wi=Rt._export_sfc(xi,[["__scopeId","data-v-e0fef72d"]]),Ci={class:"table-header-child"},Di={class:"table-header-child-main"},_i={class:"table-header-child-content"},Ei={class:"table-header-child-content-item"},Si={class:"fix-button"},Ti={key:0},Bi={class:"form-content"},Ii={class:"dialog-footer"},Ni={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const s=a,r=l,d=e.ref(!1),c=e.ref(""),x=Ne.useTableComp(xe.pinia),{tableIndex:v}=xe.storeToRefs(x),f=e.ref(""),C=e.ref([]),w=e.ref([]),F=b=>{r("fixChange",V.cloneDeep(b))},R=b=>{var y;d.value=!0;let _=[];At==null||At.forEach(T=>{let h=V.cloneDeep(v.value)+1;x.setTableIndex(h),_.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:b[T.key],id:v.value,contents:T==null?void 0:T.options})}),b!=null&&b.children&&((y=b==null?void 0:b.children)==null?void 0:y.length)>0&&_.push({children:b==null?void 0:b.children,isFormColHidden:!0}),f.value=b==null?void 0:b.id,C.value=_,w.value=_},H=b=>{d.value=!0;let _=[];At==null||At.forEach(y=>{let T=V.cloneDeep(v.value)+1;x.setTableIndex(T),_.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:v.value,contents:y==null?void 0:y.options})}),c.value=b==null?void 0:b.id,C.value=_,w.value=_},M=b=>{let _=V.cloneDeep(w.value);_=_==null?void 0:_.map(y=>(y.children||(y.value=b==null?void 0:b[y.name]),y)),w.value=_},ve=()=>{var _,y;C.value=w.value;let b={};if(f.value!=="")b.id=f.value,(_=C.value)==null||_.forEach(T=>{const h=At==null?void 0:At.find(ce=>(ce==null?void 0:ce.label)===(T==null?void 0:T.label));h?b[h.key]=T.value:T!=null&&T.children&&T.children.length>0&&(b.children=T.children)}),d.value=!1,r("fixChange",{contents:V.cloneDeep(b),id:c.value,type:"fix"});else{let T=V.cloneDeep(v.value)+1;x.setTableIndex(T),b.id="idChild"+v.value,(y=C.value)==null||y.forEach(h=>{const ce=At==null?void 0:At.find(Ae=>(Ae==null?void 0:Ae.label)===(h==null?void 0:h.label));ce?b[ce.key]=h.value:h!=null&&h.children&&h.children.length>0&&(b.children=h.children)}),d.value=!1,r("fixChange",{contents:V.cloneDeep(b),id:c.value,type:"add"})}f.value="",C.value=[],w.value=[]},K=()=>{d.value=!1,f.value="",c.value="",C.value=[],w.value=[]},O=b=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",b),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},G=b=>{r("deleteChange",b)};return(b,_)=>{const y=e.resolveComponent("svg-icon"),T=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(h,ce)=>(e.openBlock(),e.createElementBlock("div",Di,[e.createElementVNode("div",_i,[e.createElementVNode("div",Ei,e.toDisplayString(h.label),1),e.createElementVNode("div",Si,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ae=>H(h)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ae=>R(h)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ae=>O(h)},null,8,["onClick"])])]),h!=null&&h.children&&h.children.length>0?(e.openBlock(),e.createElementBlock("div",Ti,[e.createVNode(wi,{tableChildContents:h==null?void 0:h.children,onDeleteChange:G,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Bi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ii,[e.createVNode(T,{onClick:K,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[0]||(_[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(T,{class:"ok-button button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>_[1]||(_[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},yr=Rt._export_sfc(Ni,[["__scopeId","data-v-ebd68fa1"]]),Ai={class:"table-operate-content"},Vi={class:"table-operate-item"},Oi={class:"operate-title"},Mi={class:"operate-content"},zi={class:"fix-content"},Fi={class:"fix-content-label"},Ri={class:"fix-button"},Pi={key:0},Li={class:"operate-title"},$i={class:"operate-content"},ji={class:"fix-content"},Ui={class:"fix-content-label"},Ki={class:"fix-button"},Wi={class:"operate-title"},Hi={class:"operate-content"},qi={class:"fix-content"},Gi={class:"fix-content-label"},Xi={class:"fix-button"},Yi={class:"operate-title"},Ji={class:"operate-content"},Zi={class:"fix-content"},Qi={class:"fix-content-label"},es={class:"fix-button"},ts={class:"operate-content"},ns={style:{display:"flex","justify-content":"space-between"}},as={class:"form-content"},os={class:"dialog-footer"},rs={class:"form-content"},ls={class:"dialog-footer"},is={class:"form-content"},ss={class:"dialog-footer"},cs={class:"form-content"},us={class:"dialog-footer"},ds={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref([]),c=e.ref(!1),x=e.ref(!1),v=e.ref([]),f=e.ref(!1),C=e.ref([]),w=e.ref(!1),F=e.ref([]),R=e.ref(""),H=e.ref(""),M=e.ref([]),ve=e.ref([]),K=e.ref([]),O=e.ref([]),G=e.ref(!1),b=e.ref([]),_=e.ref([]),y=e.ref(0),T=e.ref([]),h=e.ref([]),ce=e.ref([]),Ae=()=>{G.value=!0;let m=[];wn==null||wn.forEach(S=>{y.value++,m.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:(S==null?void 0:S.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:S==null?void 0:S.options})}),b.value=m,_.value=m},at=()=>{var S,U,J;x.value=!0;let m=[];(J=(U=(S=Ne.FormContent)==null?void 0:S.find(D=>(D==null?void 0:D.key)==="Input"))==null?void 0:U.value)==null||J.forEach(D=>{y.value++,m.push({label:D==null?void 0:D.label,name:(D==null?void 0:D.name)||(D==null?void 0:D.label),type:D.type,value:(D==null?void 0:D.label)==="类型"?"Input":"",id:y.value,contents:D==null?void 0:D.options})}),T.value=m,h.value=m},we=m=>{m||(T.value=h.value)},Pe=async m=>{var S,U,J,D,oe,Ve,B,ee,$,W,Se,ie;if((m==null?void 0:m.类型)!==((U=(S=h.value)==null?void 0:S.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:U.value)){let q=[],Z=await((oe=(D=(J=Ne.FormContent)==null?void 0:J.find(de=>(de==null?void 0:de.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:D.value)==null?void 0:oe.value)?await((W=($=(ee=Ne.FormContent)==null?void 0:ee.find(de=>(de==null?void 0:de.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:$.value)==null?void 0:W.value):(B=(Ve=Ne.FormContent)==null?void 0:Ve.find(de=>(de==null?void 0:de.key)===((m==null?void 0:m.类型)===""?"Input":m==null?void 0:m.类型)))==null?void 0:B.value;if(Z==null||Z.forEach(de=>{y.value++,q.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:de!=null&&de.属性名?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):(m==null?void 0:m[de.label])??"",id:y.value,contents:de==null?void 0:de.options,prop:(de==null?void 0:de.prop)||(de==null?void 0:de.name)||(de==null?void 0:de.label)})}),m!=null&&m.菜单选项&&((Se=m==null?void 0:m.菜单选项)==null?void 0:Se.length)>0){const de=await Ne.menuToContentType(m==null?void 0:m.菜单选项);q=q==null?void 0:q.map(me=>((me==null?void 0:me.name)==="组信息选项"&&(me.contents=de),me))}h.value=await Ne.selectToBase(V.cloneDeep(q)),T.value=await Ne.selectToBase(V.cloneDeep(q))}else{let q=V.cloneDeep(T.value);if(q=q==null?void 0:q.map(Z=>(Z.value=m==null?void 0:m[Z.name],Z)),m!=null&&m.菜单选项&&((ie=m==null?void 0:m.菜单选项)==null?void 0:ie.length)>0){const Z=await Ne.menuToContentType(m==null?void 0:m.菜单选项);q=q==null?void 0:q.map(de=>((de==null?void 0:de.name)==="组信息选项"&&(de.contents=Z),de))}q=Ne.formToOptionsContents(q),h.value=await Ne.selectToBase(V.cloneDeep(q))}},Le=async m=>{await Pe(m),T.value=h.value},P=(m,S)=>{if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="selectRelateType"){const U=S==null?void 0:S.optionUrl;return(U==null?void 0:U.selectRelateType)||S[m.key]}if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="menuSelect"){const U=S==null?void 0:S.optionUrl;return(U==null?void 0:U.menuSelect)||S[m.key]}if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="groupSelect"){const U=S==null?void 0:S.optionUrl;return(U==null?void 0:U.groupSelect)||S[m.key]}if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="originalContent")return(S==null?void 0:S.value)||S[m.key];if((S==null?void 0:S.type)=="Select"&&(m==null?void 0:m.key)==="multiple"){const U=S[m.key];return pr(U)?U:m.default}return(m==null?void 0:m.label)==="类型"&&S[m.key]===""?"Input":(m==null?void 0:m.key)==="isFormColHidden"&&!S[m.key]?!1:S[m.key]},re=async m=>{var J,D,oe,Ve,B,ee,$,W,Se;x.value=!0;let S=[];const U=await((oe=(D=(J=Ne.FormContent)==null?void 0:J.find(ie=>(ie==null?void 0:ie.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:D.value)==null?void 0:oe.value)?await((W=($=(ee=Ne.FormContent)==null?void 0:ee.find(ie=>(ie==null?void 0:ie.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:$.value)==null?void 0:W.value):(B=(Ve=Ne.FormContent)==null?void 0:Ve.find(ie=>(ie==null?void 0:ie.key)===((m==null?void 0:m.type)===""?"Input":m==null?void 0:m.type)))==null?void 0:B.value;if(U==null||U.forEach(ie=>{y.value++,S.push({label:ie==null?void 0:ie.label,name:(ie==null?void 0:ie.name)||(ie==null?void 0:ie.label),type:ie.type,value:(ie==null?void 0:ie.label)==="属性名"?(m==null?void 0:m.prop)||(m==null?void 0:m.name)||(m==null?void 0:m.label):P(ie,m),id:y.value,contents:ie==null?void 0:ie.options})}),m!=null&&m.menuSelect&&((Se=m==null?void 0:m.menuSelect)==null?void 0:Se.length)>0){const ie=await Ne.menuToContentType(m==null?void 0:m.menuSelect);S=S==null?void 0:S.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=ie),q))}R.value=m==null?void 0:m.id,T.value=await Ne.selectToBase(Ne.formToOptionsContents(S)),h.value=await Ne.selectToBase(Ne.formToOptionsContents(S))},ne=m=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var S,U;ce.value=(S=V.cloneDeep(ce.value))==null?void 0:S.filter(J=>(J==null?void 0:J.id)!==(m==null?void 0:m.id)),r("change",(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="tableToForm"&&(J.contents=ce.value),J))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},pe=()=>{x.value=!1,T.value=[],R.value=""},He=async()=>{var J,D,oe,Ve,B,ee,$,W,Se,ie;T.value=h.value;let m={};R.value!==""?m.id=R.value:(y.value++,m.id="id"+y.value);let S=await((oe=(D=(J=Ne.FormContent)==null?void 0:J.find(q=>{var Z,de;return(q==null?void 0:q.key)===(((de=(Z=T.value)==null?void 0:Z.find(me=>(me==null?void 0:me.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:D.value)==null?void 0:oe.value)??((B=(Ve=Ne.FormContent)==null?void 0:Ve.find(q=>{var Z,de;return(q==null?void 0:q.key)===(((de=(Z=T.value)==null?void 0:Z.find(me=>(me==null?void 0:me.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:B.value);if((ee=T.value)==null||ee.forEach(q=>{const Z=S==null?void 0:S.find(de=>(de==null?void 0:de.label)===(q==null?void 0:q.label));Z&&(m[Z.key]=q.value)}),m.name=m.label,($=ce.value)!=null&&$.find(q=>q.id===m.id))ce.value=(W=ce.value)==null?void 0:W.map(q=>(q.id===m.id&&(q=m),q));else{let q=V.cloneDeep(ce.value);ce.value||(ce.value=[]),q.push(m),ce.value=q}ce.value=ce.value.map(({id:q,...Z})=>Z),x.value=!1,R.value="";let U=V.cloneDeep(s.originalItemContents);(Se=V.cloneDeep(s.originalItemContents))!=null&&Se.find(q=>(q==null?void 0:q.key)==="tableToForm")?U=(ie=V.cloneDeep(s.originalItemContents))==null?void 0:ie.map(q=>((q==null?void 0:q.key)==="tableToForm"&&(q.contents=ce.value),q)):U.push({key:"tableToForm",contents:ce.value}),r("change",U)},ot=m=>{G.value=!0;let S=[];wn==null||wn.forEach(U=>{y.value++,S.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:m[U.key],id:y.value,contents:U==null?void 0:U.options})}),R.value=m==null?void 0:m.id,b.value=S,_.value=S};e.watch(()=>w.value,()=>{var S,U;let m=V.cloneDeep(s.originalItemContents);(S=V.cloneDeep(s.originalItemContents))!=null&&S.find(J=>(J==null?void 0:J.key)==="page")?m=(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="page"&&(J.contents=w.value),J)):m.push({key:"page",contents:w.value}),r("change",m)},{deep:!0});const X=m=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var S,U;ve.value=(S=V.cloneDeep(ve.value))==null?void 0:S.filter(J=>(J==null?void 0:J.id)!==(m==null?void 0:m.id)),r("change",(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="extraButton"&&(J.contents=ve.value),J))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},A=()=>{var U,J,D,oe,Ve;b.value=_.value;let m={};if(R.value!==""?m.id=R.value:(y.value++,m.id="id"+y.value),(U=b.value)==null||U.forEach(B=>{const ee=wn==null?void 0:wn.find($=>($==null?void 0:$.label)===(B==null?void 0:B.label));ee?m[ee.key]=B.value:B!=null&&B.children&&B.children.length>0&&(m.children=B.children)}),(J=ve.value)!=null&&J.find(B=>B.id===m.id))ve.value=(D=ve.value)==null?void 0:D.map(B=>(B.id===m.id&&(B=m),B));else{let B=V.cloneDeep(ve.value)??[];B.push(m),ve.value=B}G.value=!1,R.value="";let S=V.cloneDeep(s.originalItemContents);(oe=V.cloneDeep(s.originalItemContents))!=null&&oe.find(B=>(B==null?void 0:B.key)==="extraButton")?S=(Ve=V.cloneDeep(s.originalItemContents))==null?void 0:Ve.map(B=>((B==null?void 0:B.key)==="extraButton"&&(B.contents=ve.value),B)):S.push({key:"extraButton",contents:ve.value}),r("change",S)},te=m=>{let S=V.cloneDeep(_.value);S=S==null?void 0:S.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),_.value=S},ye=()=>{G.value=!1,b.value=[],R.value=""},ue=m=>{f.value=!0;let S=[];Cn==null||Cn.forEach(U=>{y.value++,S.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:m[U.key],id:y.value,contents:U==null?void 0:U.options})}),R.value=m==null?void 0:m.id,K.value=S,O.value=S},De=m=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var S,U;M.value=(S=V.cloneDeep(M.value))==null?void 0:S.filter(J=>(J==null?void 0:J.id)!==(m==null?void 0:m.id)),r("change",(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>((J==null?void 0:J.key)==="rowButton"&&(J.contents=M.value),J))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Qe=()=>{c.value=!0;let m=[];At==null||At.forEach(S=>{y.value++,m.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:"",id:y.value,contents:S==null?void 0:S.options})}),C.value=m,F.value=m},ae=()=>{f.value=!0;let m=[];Cn==null||Cn.forEach(S=>{y.value++,m.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:"",id:y.value,contents:S==null?void 0:S.options})}),K.value=m,O.value=m},_e=m=>{let S=V.cloneDeep(O.value);S=S==null?void 0:S.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),O.value=S},I=()=>{var U,J,D,oe,Ve;K.value=O.value;let m={};if(R.value!==""?m.id=R.value:(y.value++,m.id="id"+y.value),(U=K.value)==null||U.forEach(B=>{const ee=Cn==null?void 0:Cn.find($=>($==null?void 0:$.label)===(B==null?void 0:B.label));ee?m[ee.key]=B.value:B!=null&&B.children&&B.children.length>0&&(m.children=B.children)}),(J=M.value)!=null&&J.find(B=>B.id===m.id))M.value=(D=M.value)==null?void 0:D.map(B=>(B.id===m.id&&(B=m),B));else{let B=V.cloneDeep(M.value);B.push(m),M.value=B}f.value=!1,R.value="";let S=V.cloneDeep(s.originalItemContents);(oe=V.cloneDeep(s.originalItemContents))!=null&&oe.find(B=>(B==null?void 0:B.key)==="rowButton")?S=(Ve=V.cloneDeep(s.originalItemContents))==null?void 0:Ve.map(B=>((B==null?void 0:B.key)==="rowButton"&&(B.contents=M.value),B)):S.push({key:"rowButton",contents:M.value}),r("change",S)},Xe=()=>{f.value=!1,R.value="",O.value=[],K.value=[]},Ye=m=>{c.value=!0;let S=[];At==null||At.forEach(U=>{y.value++,S.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:y.value,contents:U==null?void 0:U.options})}),C.value=S,H.value=m==null?void 0:m.id,F.value=S},Ie=m=>{var S;v.value=hr(V.cloneDeep(v.value),m==null?void 0:m.id),r("change",(S=V.cloneDeep(s.originalItemContents))==null?void 0:S.map(U=>{var J;return(U==null?void 0:U.key)==="header"&&(U.contents=(J=v.value)!=null&&J.some(D=>D==null?void 0:D.children)?[v.value]:v.value),U}))},le=m=>{var U,J,D;m.type==="fix"?m.id!==""?v.value=mr(v.value,m):v.value=vr(v.value,m==null?void 0:m.contents):v.value=gr(v.value,m),v.value=(U=v.value)!=null&&U.some(oe=>oe==null?void 0:oe.children)?[v.value]:v.value,R.value="";let S=V.cloneDeep(s.originalItemContents);(J=V.cloneDeep(s.originalItemContents))!=null&&J.find(oe=>(oe==null?void 0:oe.key)==="header")?S=(D=V.cloneDeep(s.originalItemContents))==null?void 0:D.map(oe=>((oe==null?void 0:oe.key)==="header"&&(oe.contents=v.value),oe)):S.push({key:"header",contents:v.value}),r("change",S)},Q=m=>{var U;c.value=!0;let S=[];At==null||At.forEach(J=>{y.value++,S.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:m[J.key],id:y.value,contents:J==null?void 0:J.options})}),m!=null&&m.children&&((U=m==null?void 0:m.children)==null?void 0:U.length)>0&&S.push({children:m==null?void 0:m.children,isFormColHidden:!0}),R.value=m==null?void 0:m.id,H.value="",C.value=S,F.value=S},se=m=>{let S=V.cloneDeep(F.value);S=S==null?void 0:S.map(U=>(U.children||(U.value=m==null?void 0:m[U.name]),U)),F.value=S},Ee=()=>{c.value=!1,R.value="",H.value="",F.value=[]},qe=()=>{var U,J,D,oe,Ve,B;C.value=F.value;let m={};if(R.value!==""?m.id=R.value:(y.value++,m.id="id"+y.value),(U=C.value)==null||U.forEach(ee=>{const $=At==null?void 0:At.find(W=>(W==null?void 0:W.label)===(ee==null?void 0:ee.label));$?m[$.key]=ee.value:ee!=null&&ee.children&&ee.children.length>0&&(m.children=ee.children)}),(J=v.value)!=null&&J.find(ee=>ee.id===m.id))v.value=(D=v.value)==null?void 0:D.map(ee=>(ee.id===m.id&&(ee=m),ee));else{let ee=V.cloneDeep(v.value)??[];H.value===""?ee.push(m):ee=ee==null?void 0:ee.map($=>($.id===H.value&&($.children||($.children=[]),$.children.push(m)),$)),v.value=ee}v.value=(oe=v.value)!=null&&oe.some(ee=>ee==null?void 0:ee.children)?[v.value]:v.value,c.value=!1,R.value="",H.value="";let S=V.cloneDeep(s.originalItemContents);(Ve=V.cloneDeep(s.originalItemContents))!=null&&Ve.find(ee=>(ee==null?void 0:ee.key)==="header")?S=(B=V.cloneDeep(s.originalItemContents))==null?void 0:B.map(ee=>((ee==null?void 0:ee.key)==="header"&&(ee.contents=v.value),ee)):S.push({key:"header",contents:v.value}),r("change",S)},dt=m=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var S,U;v.value=(S=V.cloneDeep(v.value))==null?void 0:S.filter(J=>(J==null?void 0:J.id)!==(m==null?void 0:m.id)),r("change",(U=V.cloneDeep(s.originalItemContents))==null?void 0:U.map(J=>{var D;return(J==null?void 0:J.key)==="header"&&(J.contents=(D=v.value)!=null&&D.some(oe=>oe==null?void 0:oe.children)?[v.value]:v.value),J})),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var m,S,U,J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce,be;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=V.cloneDeep(s.originalItemContents),v.value=(S=(m=d.value)==null?void 0:m.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:S.contents,M.value=(J=(U=d.value)==null?void 0:U.find(j=>(j==null?void 0:j.key)==="rowButton"))==null?void 0:J.contents,ve.value=(oe=(D=d.value)==null?void 0:D.find(j=>(j==null?void 0:j.key)==="extraButton"))==null?void 0:oe.contents,w.value=(B=(Ve=d.value)==null?void 0:Ve.find(j=>(j==null?void 0:j.key)==="page"))!=null&&B.contents?!!(($=(ee=d.value)==null?void 0:ee.find(j=>(j==null?void 0:j.key)==="page"))!=null&&$.contents):!1,ce.value=(Se=(W=d.value)==null?void 0:W.find(j=>(j==null?void 0:j.key)==="tableToForm"))==null?void 0:Se.contents,v.value=(ie=v.value)==null?void 0:ie.map((j,Me)=>(Array.isArray(j)?j=di(j):j={label:(j==null?void 0:j.label)??"",prop:(j==null?void 0:j.label)==="操作"?"operate":j==null?void 0:j.prop,width:j!=null&&j.width?parseInt(j.width):"",fixed:(j==null?void 0:j.fixed)??void 0,sortable:(j==null?void 0:j.sortable)??!1,align:(j==null?void 0:j.align)??"left",showOverflowTooltip:(j==null?void 0:j.showOverflowTooltip)??!0,isNotDrag:(j==null?void 0:j.isNotDrag)??!1,isEditCol:(j==null?void 0:j.isEditCol)??!1,isOperate:(j==null?void 0:j.isOperate)??!1,id:(j==null?void 0:j.id)??Me,formMenuSelect:(j==null?void 0:j.formMenuSelect)??void 0,groupSelect:(j==null?void 0:j.groupSelect)??void 0},j)),v.value=(q=v.value)!=null&&q.every(j=>Array.isArray(j))?(Z=v.value)==null?void 0:Z[0]:v.value,M.value=(de=M.value)==null?void 0:de.map((j,Me)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",textColor:(j==null?void 0:j.textColor)??"#000000",id:(j==null?void 0:j.id)??Me}),ve.value=(me=ve.value)==null?void 0:me.map((j,Me)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",background:(j==null?void 0:j.background)??"var(--ssComponent-primary-color)",id:(j==null?void 0:j.id)??Me}),ce.value)ce.value=(be=ce.value)==null?void 0:be.map(j=>{y.value++;let Me=j;return Me.id=y.value,Me});else{let j=[];const Me=(Ce=Ne.getColumnChild(V.cloneDeep(v.value)))==null?void 0:Ce.filter(ge=>(ge==null?void 0:ge.prop)!=="operate");Me==null||Me.forEach(ge=>{var Ue;y.value++,j.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label),type:ge!=null&&ge.groupSelect?"Select":"Input",value:"",id:y.value,contents:ge==null?void 0:ge.options,menuSelect:ge==null?void 0:ge.formMenuSelect,groupSelect:(Ue=ge==null?void 0:ge.groupSelect)==null?void 0:Ue.split(":"),selectRelateType:"关联绑定列"})}),ce.value=j}},{deep:!0,immediate:!0}),(m,S)=>{const U=e.resolveComponent("svg-icon"),J=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("div",Vi,[e.createElementVNode("div",Oi,[S[2]||(S[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(J,{class:"icon-content",onClick:Qe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[S[1]||(S[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",zi,[e.createElementVNode("div",Fi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Ri,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>Ye(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>Q(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>dt(D)},null,8,["onClick"])])]),D!=null&&D.children&&D.children.length>0?(e.openBlock(),e.createElementBlock("div",Pi,[e.createVNode(yr,{tableChildContents:D==null?void 0:D.children,onDeleteChange:Ie,onFixChange:le},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Li,[S[4]||(S[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[S[3]||(S[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",$i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",ji,[e.createElementVNode("div",Ui,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Ki,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ve=>ue(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>De(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Wi,[S[6]||(S[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:Ae},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[S[5]||(S[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Hi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ve.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Xi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ve=>ot(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>X(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Yi,[S[8]||(S[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(J,{class:"icon-content",id:"themeButton",onClick:at},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[S[7]||(S[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(D,oe)=>(e.openBlock(),e.createElementBlock("div",{key:oe},[e.createElementVNode("div",Zi,[e.createElementVNode("div",Qi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",es,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ve=>re(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ve=>ne(D)},null,8,["onClick"])])])]))),128))]),S[10]||(S[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",ts,[e.createElementVNode("div",ns,[S[9]||(S[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:w.value,"onUpdate:modelValue":S[0]||(S[0]=D=>w.value=D)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:Ee,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",as,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(J,{onClick:Ee,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[11]||(S[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(J,{class:"ok-button button",onClick:qe,id:"themeButton"},{default:e.withCtx(()=>S[12]||(S[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:Xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",rs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:K.value,key:K.value,isEnableWrap:!0,onChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ls,[e.createVNode(J,{onClick:Xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[13]||(S[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(J,{class:"ok-button button",onClick:I,id:"themeButton"},{default:e.withCtx(()=>S[14]||(S[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:G.value,onBeforeDestroy:ye,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",is,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ss,[e.createVNode(J,{onClick:ye,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[15]||(S[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(J,{class:"ok-button button",onClick:A,id:"themeButton"},{default:e.withCtx(()=>S[16]||(S[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:x.value,onBeforeDestroy:pe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",cs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:T.value,key:T.value,isEnableWrap:!0,onChange:Pe,onChangeVisible:we,onBlurChange:Le},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",us,[e.createVNode(J,{onClick:pe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[17]||(S[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(J,{class:"ok-button button",onClick:He,id:"themeButton"},{default:e.withCtx(()=>S[18]||(S[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ps=Rt._export_sfc(ds,[["__scopeId","data-v-7a6b87b5"]]),fs=V.useModelComp(xe.pinia),{pageMapState:hs}=xe.storeToRefs(fs),vs=V.useMenuState(xe.pinia),{activeMenuPath:ms}=xe.storeToRefs(vs),gs=e.ref(24),ys=e.ref(6),bs=e.ref(70),ks=e.ref(.18),xs=e.ref(45),ws=(a,l,s,r)=>{var d,c,x,v,f,C,w,F,R,H,M,ve,K,O,G,b;return{x:((c=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:c.x)||l%2*12,y:((v=(x=a==null?void 0:a.value)==null?void 0:x.tableData)==null?void 0:v.y)||l,w:((C=(f=a==null?void 0:a.value)==null?void 0:f.tableData)==null?void 0:C.w)||gs.value,h:((F=(w=a==null?void 0:a.value)==null?void 0:w.tableData)==null?void 0:F.h)||s,minW:((H=(R=a==null?void 0:a.value)==null?void 0:R.tableData)==null?void 0:H.minW)||ys.value,minH:((ve=(M=a==null?void 0:a.value)==null?void 0:M.tableData)==null?void 0:ve.minH)||ks.value,maxH:((O=(K=a==null?void 0:a.value)==null?void 0:K.tableData)==null?void 0:O.maxH)||xs.value,i:((b=(G=a==null?void 0:a.value)==null?void 0:G.tableData)==null?void 0:b.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},Cs=(a,l)=>{var r,d,c,x,v,f,C,w;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((x=(c=(d=a==null?void 0:a.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:x.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(s=((w=(C=(f=a==null?void 0:a.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:C.contents)==null?void 0:w.length)/5);return s*2},br=(a,l,s)=>{var x,v;const r=(v=(x=hs.value)==null?void 0:x[ms.value])==null?void 0:v.filter(f=>{var C;return((C=f==null?void 0:f.key)==null?void 0:C.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var C,w,F;return((F=(w=(C=f==null?void 0:f.value)==null?void 0:C.tableData)==null?void 0:w.component)==null?void 0:F.id)===a.id}),c=Cs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((f,C)=>br(f,C))),{...ws(d,l,c,a)}},Ds=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const s=V.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((r,d)=>br(r,d)):[]},_s=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}]}]}}),Es=(a,l)=>a==null?void 0:a.map(s=>{for(const r in l)if(r===(s==null?void 0:s.prop))return{...s,value:l[r]};return s}),Ss=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref([]);e.watch(()=>s.compType,v=>{var w;const f=_s(s==null?void 0:s.optionItems),C=v?(w=f[v==null?void 0:v.toUpperCase()])==null?void 0:w[s==null?void 0:s.target]:[];d.value=C==null?void 0:C.map(F=>{for(const[R,H]of Object.entries((s==null?void 0:s.comp)||{}))if((F==null?void 0:F.prop)===R)return{...F,value:H};return F})},{immediate:!0});const c=v=>Bt.getComponent(v),x=v=>{var f,C;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(w=>{var F;return(w==null?void 0:w.prop)==="isStepLayout"?{...w,options:(F=w==null?void 0:w.options)==null?void 0:F.map(R=>({...R,disabled:!0}))}:(w==null?void 0:w.prop)==="isGridLayout"?{...w,disabled:!0}:w}):d.value=(C=d.value)==null?void 0:C.map(w=>{var F;return(w==null?void 0:w.prop)==="isStepLayout"?{...w,options:(F=w==null?void 0:w.options)==null?void 0:F.map(R=>({...R,disabled:!1}))}:(w==null?void 0:w.prop)==="isGridLayout"?{...w,disabled:!1}:w}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:v==null?void 0:v.prop})};return(v,f)=>{const C=e.resolveComponent("el-col"),w=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,F=>(e.openBlock(),e.createBlock(w,{class:"style-row",key:F==null?void 0:F.prop},{default:e.withCtx(()=>[e.createVNode(C,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(F==null?void 0:F.label)+":",1)]),_:2},1024),e.createVNode(C,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(F.type)),{modelValue:F.value,"onUpdate:modelValue":R=>F.value=R,content:F==null?void 0:F.options,optionUrl:F==null?void 0:F.optionUrl,disabled:F==null?void 0:F.disabled,activeText:F==null?void 0:F.activeText,inactiveText:F==null?void 0:F.inactiveText,onChange:R=>x(F)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ts=Rt._export_sfc(Ss,[["__scopeId","data-v-6c233914"]]),Bs=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:l}){const s=a,r=l,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=e.ref([]),x=O=>O==null?void 0:O.reduce((G,b)=>(G[b==null?void 0:b.prop]=b==null?void 0:b.rule,G),{}),v=e.computed(()=>({formRules:x(c.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),C=e.ref(""),w=(O,G,b)=>{var T;let _=[];(s==null?void 0:s.activeTabName)==="任务配置"?(_=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:O},{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:"暂停"}]}],c.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(_=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(T=s==null?void 0:s.relatedData)==null?void 0:T.map(h=>({label:h==null?void 0:h.任务名称,value:h==null?void 0:h.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return b&&(b==null?void 0:b.length)>0?y=[..._,...F(O,G,b)]:y=_,y},F=(O,G,b)=>{const _=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return b?_==null?void 0:_.filter(y=>b==null?void 0:b.includes(y==null?void 0:y.prop)):_},R=(O,G)=>{var h,ce,Ae,at,we,Pe,Le,P,re;const b=((we=(at=(Ae=(ce=(h=s==null?void 0:s.comp)==null?void 0:h.compData)==null?void 0:ce.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:Ae.contents)==null?void 0:at.filter(ne=>(ne==null?void 0:ne.label)!=="操作"))==null?void 0:we.map(ne=>({value:ne==null?void 0:ne.prop,label:ne.label})))||[],_=/button/i,y=((re=(P=(Le=(Pe=s==null?void 0:s.comp)==null?void 0:Pe.compData)==null?void 0:Le.filter(ne=>_.test(ne==null?void 0:ne.key)))==null?void 0:P.flatMap(ne=>ne==null?void 0:ne.contents))==null?void 0:re.map(ne=>({value:ne==null?void 0:ne.label,label:ne.label})))||[],T=w(b,y,O);f.value=G?Es(T,G):T,O&&(O==null?void 0:O.length)>0&&c.value.push(...O==null?void 0:O.map(ne=>({prop:ne,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const H=O=>{const G=O==null?void 0:O[C.value];if(C.value==="执行任务"){if(!(G!=null&&G.join("/")))return;const b=G==null?void 0:G.join("/");R(b==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:b==="进度设置/进度条"?["进度关键词"]:null,O)}},M=O=>{r("change",{target:s==null?void 0:s.target,extendConfigs:O})},ve=(O,G)=>{C.value=G==null?void 0:G.changeProp,H(O)},K=O=>{r("onButtonClick",O)};return(O,G)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:M,onBlurChange:ve,onOnButtonClick:K},null,8,["rowContents","formRules","buttonValue"]))}}),Is=Rt._export_sfc(Bs,[["__scopeId","data-v-7c660c1f"]]),Ns={};function As(a,l){return null}const Vs=Rt._export_sfc(Ns,[["render",As]]),Os={class:"form-operate-content"},Ms={class:"form-operate-item"},zs={class:"operate-title"},Fs={class:"operate-content"},Rs={class:"fix-content"},Ps={class:"fix-button"},Ls={class:"operate-title"},$s={class:"operate-content"},js={class:"fix-content"},Us={class:"fix-button"},Ks={style:{display:"flex","justify-content":"space-between"}},Ws={class:"form-content"},Hs={class:"dialog-footer"},qs={class:"form-content"},Gs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref(!1),c=e.ref([]),x=e.ref([]),v=e.ref(!1),f=e.ref([]),C=e.ref([]),w=e.ref(""),F=e.ref(!1),R=e.ref(0),H=e.ref([]),M=e.ref([]),ve=(P,re)=>{if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const ne=re==null?void 0:re.optionUrl;return(ne==null?void 0:ne.selectRelateType)||re[P.key]}if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const ne=re==null?void 0:re.optionUrl;return(ne==null?void 0:ne.menuSelect)||re[P.key]}if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const ne=re==null?void 0:re.optionUrl;return(ne==null?void 0:ne.groupSelect)||re[P.key]}if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(re==null?void 0:re.value)||re[P.key];if((re==null?void 0:re.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const ne=re[P.key];return pr(ne)?ne:P.default}return(P==null?void 0:P.label)==="类型"&&re[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!re[P.key]?!1:re[P.key]},K=async P=>{var pe,He,ot,X,A,te;d.value=!0;let re=[];const ne=await((ot=(He=(pe=Ne.FormContent)==null?void 0:pe.find(ye=>(ye==null?void 0:ye.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:He.value)==null?void 0:ot.value)??((A=(X=Ne.FormContent)==null?void 0:X.find(ye=>(ye==null?void 0:ye.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:A.value);if(ne==null||ne.forEach(ye=>{R.value++,re.push({label:ye==null?void 0:ye.label,name:ye==null?void 0:ye.label,type:ye.type,prop:ye==null?void 0:ye.prop,value:ve(ye,P),id:R.value,contents:ye==null?void 0:ye.options,width:(P==null?void 0:P.width)??1})}),P!=null&&P.menuSelect&&((te=P==null?void 0:P.menuSelect)==null?void 0:te.length)>0){const ye=await Ne.menuToContentType(P==null?void 0:P.menuSelect);re=re==null?void 0:re.map(ue=>((ue==null?void 0:ue.name)==="组信息选项"&&(ue.contents=ye),ue))}w.value=P==null?void 0:P.id,c.value=await Ne.selectToBase(Ne.formToOptionsContents(re)),x.value=await Ne.selectToBase(Ne.formToOptionsContents(re))},O=P=>{var ne;v.value=!0;let re=[];(ne=Ne.FormButton)==null||ne.forEach(pe=>{R.value++,re.push({label:pe==null?void 0:pe.label,name:pe==null?void 0:pe.label,type:pe.type,value:(pe==null?void 0:pe.label)==="类型"&&P[pe.key]===""?"normal":P[pe.key],id:R.value,contents:pe==null?void 0:pe.options})}),H.value=re,M.value=re,w.value=P==null?void 0:P.id};e.watch(()=>F.value,()=>{var re,ne;let P=V.cloneDeep(s.originalItemContents);(re=V.cloneDeep(s.originalItemContents))!=null&&re.find(pe=>(pe==null?void 0:pe.key)==="enableWrap")?P=(ne=V.cloneDeep(s.originalItemContents))==null?void 0:ne.map(pe=>((pe==null?void 0:pe.key)==="enableWrap"&&(pe.contents=!F.value),pe)):P.push({key:"enableWrap",contents:!F.value}),r("change",P)},{deep:!0});const G=()=>{var ne,pe,He,ot,X;H.value=M.value;let P={};if(w.value!==""?P.id=w.value:(R.value++,P.id="id"+R.value),(ne=H.value)==null||ne.forEach(A=>{var ye;const te=(ye=Ne.FormButton)==null?void 0:ye.find(ue=>(ue==null?void 0:ue.label)===(A==null?void 0:A.label));te&&(P[te.key]=A.value)}),(pe=f.value)!=null&&pe.find(A=>A.id===P.id))f.value=(He=f.value)==null?void 0:He.map(A=>(A.id===P.id&&(A=P),A));else{let A=V.cloneDeep(f.value);f.value||(f.value=[]),A.push(P),f.value=A}v.value=!1,w.value="";let re=V.cloneDeep(s.originalItemContents);(ot=V.cloneDeep(s.originalItemContents))!=null&&ot.find(A=>(A==null?void 0:A.key)==="formButton")?re=(X=V.cloneDeep(s.originalItemContents))==null?void 0:X.map(A=>((A==null?void 0:A.key)==="formButton"&&(A.contents=f.value),A)):re.push({key:"formButton",contents:f.value}),r("change",re)},b=P=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var re,ne;C.value=(re=V.cloneDeep(C.value))==null?void 0:re.filter(pe=>(pe==null?void 0:pe.id)!==(P==null?void 0:P.id)),r("change",(ne=V.cloneDeep(s.originalItemContents))==null?void 0:ne.map(pe=>((pe==null?void 0:pe.key)==="formContent"&&(pe.contents=C.value),pe))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_=P=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var re,ne;f.value=(re=V.cloneDeep(f.value))==null?void 0:re.filter(pe=>(pe==null?void 0:pe.id)!==(P==null?void 0:P.id)),r("change",(ne=V.cloneDeep(s.originalItemContents))==null?void 0:ne.map(pe=>((pe==null?void 0:pe.key)==="formButton"&&(pe.contents=f.value),pe))),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var re;v.value=!0;let P=[];(re=Ne.FormButton)==null||re.forEach(ne=>{R.value++,P.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:(ne==null?void 0:ne.label)==="类型"?"normal":"",id:R.value,contents:ne==null?void 0:ne.options})}),H.value=P,M.value=P},T=()=>{var re,ne,pe;d.value=!0;let P=[];(pe=(ne=(re=Ne.FormContent)==null?void 0:re.find(He=>(He==null?void 0:He.key)==="Input"))==null?void 0:ne.value)==null||pe.forEach(He=>{R.value++,P.push({label:He==null?void 0:He.label,name:He==null?void 0:He.label,type:He.type,value:(He==null?void 0:He.label)==="类型"?"Input":"",id:R.value,contents:He==null?void 0:He.options})}),c.value=P,x.value=P},h=P=>{let re=V.cloneDeep(M.value);re=re==null?void 0:re.map(ne=>(ne.value=P==null?void 0:P[ne.name],ne)),M.value=re},ce=P=>{const re=P.find(He=>(He==null?void 0:He.name)==="类型");if((re==null?void 0:re.value)!="Select")return;const ne=P.find(He=>(He==null?void 0:He.name)==="多选"),pe=P.find(He=>(He==null?void 0:He.name)==="初始值");ne!=null&&ne.value&&Do.isString(pe.value)&&(pe.value=[pe.value]),!(ne!=null&&ne.value)&&!Do.isString(pe.value)&&(pe.value="")},Ae=async P=>{var re,ne,pe,He,ot,X,A,te,ye,ue,De,Qe;if((P==null?void 0:P.类型)!==((ne=(re=x.value)==null?void 0:re.find(ae=>(ae==null?void 0:ae.label)==="类型"))==null?void 0:ne.value)){let ae=[];const _e=await((ot=(He=(pe=Ne.FormContent)==null?void 0:pe.find(I=>(I==null?void 0:I.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:He.value)==null?void 0:ot.value)?await((ue=(ye=(te=Ne.FormContent)==null?void 0:te.find(I=>(I==null?void 0:I.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:ye.value)==null?void 0:ue.value):(A=(X=Ne.FormContent)==null?void 0:X.find(I=>(I==null?void 0:I.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:A.value;if(_e==null||_e.forEach(I=>{var Ye,Ie;R.value++;const Xe=Ql(I==null?void 0:I.default)?(P==null?void 0:P[I.label])??I.value??"":I==null?void 0:I.default;ae.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:Xe,prop:I==null?void 0:I.prop,id:R.value,contents:I==null?void 0:I.options,width:((Ie=(Ye=x.value)==null?void 0:Ye[0])==null?void 0:Ie.width)??1})}),P!=null&&P.菜单选项&&((De=P==null?void 0:P.菜单选项)==null?void 0:De.length)>0){const I=await Ne.menuToContentType(P==null?void 0:P.菜单选项);ae=ae==null?void 0:ae.map(Xe=>((Xe==null?void 0:Xe.name)==="组信息选项"&&(Xe.contents=I),Xe))}ce(ae),x.value=await Ne.selectToBase(V.cloneDeep(ae)),c.value=await Ne.selectToBase(V.cloneDeep(ae))}else{let ae=V.cloneDeep(x.value);if(ae=ae==null?void 0:ae.map(_e=>(_e.value=P==null?void 0:P[_e.name],_e)),P!=null&&P.菜单选项&&((Qe=P==null?void 0:P.菜单选项)==null?void 0:Qe.length)>0){const _e=await Ne.menuToContentType(P==null?void 0:P.菜单选项);ae=ae==null?void 0:ae.map(I=>((I==null?void 0:I.name)==="组信息选项"&&(I.contents=_e),I))}ae=Ne.formToOptionsContents(ae),ce(ae),x.value=await Ne.selectToBase(V.cloneDeep(ae))}},at=P=>{P||(c.value=x.value)},we=async P=>{await Ae(P),c.value=x.value},Pe=dr(async()=>{var pe,He,ot,X,A,te,ye,ue,De,Qe,ae,_e;c.value=x.value;let P={};P.width=((He=(pe=c.value)==null?void 0:pe[0])==null?void 0:He.width)??1,w.value!==""?P.id=w.value:(R.value++,P.id="id"+R.value);let re=await((A=(X=(ot=Ne.FormContent)==null?void 0:ot.find(I=>{var Xe,Ye;return(I==null?void 0:I.key)===(((Ye=(Xe=c.value)==null?void 0:Xe.find(Ie=>(Ie==null?void 0:Ie.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:X.value)==null?void 0:A.value)??((ye=(te=Ne.FormContent)==null?void 0:te.find(I=>{var Xe,Ye;return(I==null?void 0:I.key)===(((Ye=(Xe=c.value)==null?void 0:Xe.find(Ie=>(Ie==null?void 0:Ie.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:ye.value);if((ue=c.value)==null||ue.forEach(I=>{const Xe=re==null?void 0:re.find(Ye=>(Ye==null?void 0:Ye.label)===(I==null?void 0:I.label));Xe&&(P[Xe.key]=I.value)}),P.width=P.width?P.width:1,P.key=P==null?void 0:P.label,P.isFormColHidden=P==null?void 0:P.isFormColHidden,(De=C.value)!=null&&De.find(I=>I.id===P.id))C.value=(Qe=C.value)==null?void 0:Qe.map(I=>(I.id===P.id&&(I=P),I));else{let I=V.cloneDeep(C.value);I.push(P),C.value=I}C.value=C.value.map(({id:I,...Xe})=>Xe),d.value=!1,w.value="";let ne=V.cloneDeep(s.originalItemContents);(ae=V.cloneDeep(s.originalItemContents))!=null&&ae.find(I=>(I==null?void 0:I.key)==="formContent")?ne=(_e=V.cloneDeep(s.originalItemContents))==null?void 0:_e.map(I=>((I==null?void 0:I.key)==="formContent"&&(I.contents=C.value),I)):ne.push({key:"formContent",contents:C.value}),r("change",ne)},300),Le=()=>{d.value=!1,v.value=!1,w.value="",x.value=[],M.value=[]};return e.watch(()=>s.originalItemContents,()=>{var re,ne,pe,He,ot,X;if(!s.originalItemContents||s.originalItemContents.length===0)return;const P=V.cloneDeep(s.originalItemContents);C.value=((re=P==null?void 0:P.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:re.contents)??[],f.value=((ne=P==null?void 0:P.find(A=>(A==null?void 0:A.key)==="formButton"))==null?void 0:ne.contents)??[],F.value=(pe=P==null?void 0:P.find(A=>(A==null?void 0:A.key)==="enableWrap"))!=null&&pe.contents?!((He=P==null?void 0:P.find(A=>(A==null?void 0:A.key)==="enableWrap"))!=null&&He.contents):!0,C.value=(ot=V.cloneDeep(C.value))==null?void 0:ot.map((A,te)=>{var ue;let ye=A;return ye.id=(A==null?void 0:A.id)??te,A!=null&&A.label||(A.label=(A==null?void 0:A.key)??(A==null?void 0:A.label)??""),A!=null&&A.type||(A.type=(A==null?void 0:A.type)??""),A.contents=((ue=A==null?void 0:A.options)==null?void 0:ue.length)===0?(A==null?void 0:A.contents)??"":A==null?void 0:A.options,ye}),C.value=Ne.formToOptionsContents(C.value),f.value=(X=f.value)==null?void 0:X.map((A,te)=>A={label:(A==null?void 0:A.label)??"",type:(A==null?void 0:A.type)??"",background:(A==null?void 0:A.background)??"var(--ssComponent-primary-color)",id:te})},{deep:!0,immediate:!0}),(P,re)=>{const ne=e.resolveComponent("svg-icon"),pe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Os,[e.createElementVNode("div",Ms,[e.createElementVNode("div",zs,[re[2]||(re[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:T},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[re[1]||(re[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(He,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",Rs,[e.createElementVNode("div",null,e.toDisplayString(He.label),1),e.createElementVNode("div",Ps,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>K(He)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>b(He)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ls,[re[4]||(re[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[re[3]||(re[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",$s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(He,ot)=>(e.openBlock(),e.createElementBlock("div",{key:ot},[e.createElementVNode("div",js,[e.createElementVNode("div",null,e.toDisplayString(He.label),1),e.createElementVNode("div",Us,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>O(He)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>_(He)},null,8,["onClick"])])])]))),128))]),re[6]||(re[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Ks,[re[5]||(re[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:F.value,"onUpdate:modelValue":re[0]||(re[0]=He=>F.value=He)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Le,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ws,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:Ae,onChangeVisible:at,onBlurChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hs,[e.createVNode(pe,{onClick:Le,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(pe,{class:"ok-button button",onClick:e.unref(Pe),id:"themeButton"},{default:e.withCtx(()=>re[8]||(re[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:v.value,onBeforeDestroy:Le,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:h},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Le,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:G},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Io=Rt._export_sfc(Gs,[["__scopeId","data-v-20850524"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),c=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"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),C=e.ref({}),w=e.ref([]),F=K=>{var O;C.value=K,r("change",(O=M())==null?void 0:O.compData)},R=(K,O)=>{var G,b;switch(K){case"create":(G=c.value)==null||G.forEach(_=>{_.value=""}),f.value="create",v.visible=!0;break;case"update":(b=c.value)==null||b.forEach(_=>{_.value=O[_==null?void 0:_.prop]}),f.value="update",v.visible=!0;break;case"delete":w.value.splice(O,1),f.value="delete";break}},H=K=>{var O,G,b;if((K==null?void 0:K.buttonName)==="确认"){const _=V.cloneDeep(K==null?void 0:K.content);switch(Object.keys(_).forEach(y=>{_[y]===""&&delete _[y]}),f.value){case"create":w.value.push({..._,index:((O=w.value)==null?void 0:O.length)+1});break;case"update":w.value=(G=w.value)==null?void 0:G.map(y=>y.index===(_==null?void 0:_.index)?{...y,title:_==null?void 0:_.title,description:_==null?void 0:_.description}:y);break}r("change",(b=M())==null?void 0:b.compData),v.visible=!1}else v.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:w.value},{key:"stepConfig",contents:C.value}]}),ve=()=>{v.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var O,G;K&&(C.value=((O=K==null?void 0:K.find(b=>b.key==="stepConfig"))==null?void 0:O.contents)??{},w.value=((G=K==null?void 0:K.find(b=>b.key==="stepList"))==null?void 0:G.contents)??[])},{immediate:!0}),(K,O)=>{const G=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[O[2]||(O[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(b,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=_=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[O[1]||(O[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(_,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(_==null?void 0:_.title),1),e.createElementVNode("div",null,[e.createVNode(b,{type:"primary",size:"small",onClick:T=>R("update",{..._,index:y+1})},{default:e.withCtx(()=>O[3]||(O[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(b,{type:"danger",size:"small",onClick:T=>R("delete",y)},{default:e.withCtx(()=>O[4]||(O[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[O[5]||(O[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:d.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:ve,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=Rt._export_sfc(Qs,[["__scopeId","data-v-7dbd17f2"]]),tc={class:"step-module content"},nc={class:"module-data"},ac={class:"step-module layout"},oc={class:"form-content"},rc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref("create"),c=e.ref({}),x=e.ref([]),v=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),C=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),w=e.reactive({visible:!1,width:"40%",title:"时间线"}),F=K=>{var O;c.value=K,r("change",(O=M())==null?void 0:O.compData)},R=(K,O)=>{var G,b;switch(K){case"create":(G=f.value)==null||G.forEach(_=>{_.value=""}),d.value="create",w.visible=!0;break;case"update":(b=f.value)==null||b.forEach(_=>{_.value=O[_==null?void 0:_.prop]}),d.value="update",w.visible=!0;break;case"delete":x.value.splice(O,1),d.value="delete";break}},H=K=>{var O,G,b,_;if((K==null?void 0:K.buttonName)==="确认"){const y=V.cloneDeep(K==null?void 0:K.content);switch(Object.keys(y).forEach(T=>{y[T]===""&&delete y[T]}),d.value){case"create":(G=x.value)==null||G.push({...y,index:((O=x.value)==null?void 0:O.length)+1});break;case"update":x.value=(b=x.value)==null?void 0:b.map(T=>T.index===(y==null?void 0:y.index)?{...T,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:T);break}r("change",(_=M())==null?void 0:_.compData),w.visible=!1}else w.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:x.value},{key:"timeLineConfig",contents:c.value}]}),ve=()=>{w.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var O,G;K&&(c.value=((O=K==null?void 0:K.find(b=>b.key==="timeLineConfig"))==null?void 0:O.contents)??{},x.value=((G=K==null?void 0:K.find(b=>b.key==="timeLineList"))==null?void 0:G.contents)??[])},{immediate:!0}),(K,O)=>{const G=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",tc,[O[2]||(O[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(b,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=_=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[O[1]||(O[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(_,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(_==null?void 0:_.content),1),e.createElementVNode("div",null,[e.createVNode(b,{type:"primary",size:"small",onClick:T=>R("update",{..._,index:y+1})},{default:e.withCtx(()=>O[3]||(O[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(b,{type:"danger",size:"small",onClick:T=>R("delete",y)},{default:e.withCtx(()=>O[4]||(O[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",ac,[O[5]||(O[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:v.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:w.visible,title:w.title,onBeforeDestroy:ve,width:w.width},{default:e.withCtx(()=>[e.createElementVNode("div",oc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:C.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),lc=Rt._export_sfc(rc,[["__scopeId","data-v-39ffc861"]]),ic={};function sc(a,l){return e.openBlock(),e.createElementBlock("div")}const cc=Rt._export_sfc(ic,[["render",sc]]),uc={class:"extra-content"},dc={key:0},pc={key:1},fc={class:"dialog-footer"},hc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const s=a,r=e.ref(0),d=e.ref(),c=e.ref(),x=l,v=e.ref(!1),f=e.ref({}),C=e.ref({}),w=e.ref();e.watch(()=>[s.itemData],()=>{var _;const b=V.cloneDeep(s.itemData);d.value=(_=V.cloneDeep(b))==null?void 0:_.map(y=>{var T;if(y.key==="extra"){let h=[];(T=y.value)==null||T.forEach(ce=>{var Ae;h.push((Ae=Object.values(ce))==null?void 0:Ae[0])}),y.value=h}return y})},{deep:!0,immediate:!0});const F=(b,_,y,T)=>{var ce;let h={};((ce=b==null?void 0:b[0])==null?void 0:ce.contents)==="详情"&&(v.value=!0,h[_]=b,c.value=b==null?void 0:b.filter(Ae=>(Ae==null?void 0:Ae.key)!=="tableContentName"),f.value=h,C.value=y,w.value=T.id)},R=b=>{var Ae,at,we,Pe;const _=(at=(Ae=Object.values(V.cloneDeep(f.value)))==null?void 0:Ae[0])==null?void 0:at.filter(Le=>(Le==null?void 0:Le.key)==="tableContentName"),y=(Pe=(we=Object.values(V.cloneDeep(f.value)))==null?void 0:we[0])==null?void 0:Pe.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),T=y==null?void 0:y.map((Le,P)=>{var re;return P===b.index&&(Le==null?void 0:Le.comp)==="Table"&&(Le.compData=(re=Le.compData)==null?void 0:re.map(ne=>{var pe,He;return(ne==null?void 0:ne.key)==="tableContents"&&(ne.contents=(He=(pe=b.content)==null?void 0:pe.map(ot=>{let X={};for(let A in ot)A!=="id"&&(X[A]=ot[A]);return X}))==null?void 0:He.map(ot=>Object.values(ot))),ne})),Le});T.unshift(_==null?void 0:_[0]);let h=V.cloneDeep(f.value),ce={};for(let Le in h)ce[Le]=T;f.value=ce},H=()=>{v.value=!1,f.value={},C.value={},w.value=void 0,r.value++},M=b=>{var Ae,at,we,Pe;const _=(at=(Ae=Object.values(V.cloneDeep(f.value)))==null?void 0:Ae[0])==null?void 0:at.filter(Le=>(Le==null?void 0:Le.key)==="tableContentName"),y=(Pe=(we=Object.values(V.cloneDeep(f.value)))==null?void 0:we[0])==null?void 0:Pe.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),T=y==null?void 0:y.map((Le,P)=>(P===b.index&&(Le.compData=b.contents),Le));T.unshift(_==null?void 0:_[0]);let h=V.cloneDeep(f.value),ce={};for(let Le in h)ce[Le]=T;f.value=ce},ve=()=>{var _,y;let b={};for(let T in C.value)T===((_=Object.keys(f.value))==null?void 0:_[0])?b[T]=(y=Object.values(f.value))==null?void 0:y[0]:b[T]=C.value[T];x("change",{buttonName:"编辑",index:w.value,singleContent:b},"methodData"),v.value=!1,f.value={},C.value={},w.value=void 0},K=()=>{v.value=!1,f.value={},C.value={},w.value=void 0},O=b=>{x("change",b,"methodData")},G=b=>aa(b);return(b,_)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(T,h)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(T==null?void 0:T.key)==="extra"?(e.openBlock(),e.createElementBlock("div",dc)):(e.openBlock(),e.createElementBlock("div",pc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(T.comp)),{itemData:T==null?void 0:T.compData,childItemData:T==null?void 0:T.itemChildData,key:h,index:(T==null?void 0:T.id)??h,onContentClick:F,onChange:O},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:v.value,onBeforeDestroy:K},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(T,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(T.comp)),{itemData:T==null?void 0:T.compData,onChange:R,childItemData:T==null?void 0:T.itemChildData,key:h,onContentChange:M,index:(T==null?void 0:T.id)??h,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",fc,[e.createVNode(y,{class:"cancel-button footer-button",onClick:H,id:"themeBorderButton"},{default:e.withCtx(()=>_[0]||(_[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>_[1]||(_[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},vc=Rt._export_sfc(hc,[["__scopeId","data-v-2d9c5ab2"]]),mc={key:0,class:"method-content"},gc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),s=Ne.useOriginalState(xe.pinia),{originalPath:r}=xe.storeToRefs(s),d=a,c=e.ref(!1),x=e.ref(),v=Ne.useTableComp(xe.pinia),{multipleTableConst:f}=xe.storeToRefs(v),C=V.useModelComp(xe.pinia),w=e.ref(!1),F=V.useMenuState(xe.pinia),R=V.useLoginState(xe.pinia),{itemData:H,isEdit:M,routeToChildPath:ve,tableViewContents:K,lockingPage:O,payloadTypes:G}=xe.storeToRefs(C),{activeMenuPath:b,platform:_,childMenu:y}=xe.storeToRefs(F),{loginUserInfo:T}=xe.storeToRefs(R),h=e.ref(!1),ce=async()=>{var X,A;(X=l.value)!=null&&X.find(te=>(te==null?void 0:te.buttonName)==="保存")&&await ne((A=l.value)==null?void 0:A.find(te=>(te==null?void 0:te.buttonName)==="保存")),await Ne.onSaveBack()};e.watch(()=>H.value,async()=>{M.value==="view"&&!h.value&&await ot(V.cloneDeep(d.itemData)),h.value=!1},{deep:!0});const Ae=()=>{c.value=!1,x.value=void 0},at=X=>X.map(A=>{const te={};for(const ye in A){const ue=A[ye];if(ye.includes(f.value)){const De=ye.split(f.value);let Qe=te;De.forEach((ae,_e)=>{_e===De.length-1?Qe[ae]=ue:(Qe[ae]||(Qe[ae]={}),Qe=Qe[ae])})}else te[ye]=ue}return te}),we=async(X,A,te=[])=>{var ue,De,Qe,ae,_e,I,Xe,Ye,Ie,le,Q,se,Ee,qe,dt;let ye=(ue=V.cloneDeep(A))==null?void 0:ue.filter(m=>(m==null?void 0:m.comp)!=="methodButton");if(X!=null&&X.includes("[")){let m=(I=(_e=(ae=(Qe=(De=V.cloneDeep(X))==null?void 0:De.split("["))==null?void 0:Qe[1])==null?void 0:ae.split("]"))==null?void 0:_e[0])==null?void 0:I.split(":"),S="";if(m!=null&&m[0]){let U=(Xe=ye==null?void 0:ye.find(J=>(J==null?void 0:J.name)===(m==null?void 0:m[0])))==null?void 0:Xe.compData;if(!U){let J=(Ye=X==null?void 0:X.split("["))==null?void 0:Ye[0],D=await Ne.getItemData(J,sessionStorage.getItem("systemKey"),"",!1,"","",te);U=(Ie=D==null?void 0:D.find(oe=>(oe==null?void 0:oe.name)===(m==null?void 0:m[0])))==null?void 0:Ie.compData}U==null||U.forEach(J=>{var D,oe,Ve,B,ee,$;if((J==null?void 0:J.key)==="formContent")(D=J==null?void 0:J.contents)==null||D.forEach(W=>{var Se;(W==null?void 0:W.key)===(m==null?void 0:m[1])&&(Array.isArray(W==null?void 0:W.value)?S=W==null?void 0:W.value:S=(Se=W==null?void 0:W.value)==null?void 0:Se.toString())});else if((J==null?void 0:J.key)==="tableContents"){let W=[],Se=(oe=U==null?void 0:U.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:oe.contents,ie=(m==null?void 0:m[1])??"";if(Se!=null&&Se.every(q=>Array.isArray(q))){let q=Ne.getColumnChild((ee=Se==null?void 0:Se[0])==null?void 0:ee.filter(Z=>(Z==null?void 0:Z.label)!=="操作"));($=J.contents)==null||$.forEach(Z=>{let de={};Z=Z==null?void 0:Z.filter(me=>!(me!=null&&me.id)),q==null||q.forEach((me,Ce)=>{let be=Z[Ce];typeof Z[Ce]=="number"&&(be=Z[Ce].toString()),(ie===""||ie===me.prop)&&(de[me.prop]=be)}),W.push(de)}),W=at(W)}else{let q=(Ve=Se==null?void 0:Se.map(Z=>Z==null?void 0:Z.label))==null?void 0:Ve.filter(Z=>Z!=="操作");(B=J.contents)==null||B.forEach(Z=>{let de={};Z=Z==null?void 0:Z.filter(me=>!(me!=null&&me.id)),q==null||q.forEach((me,Ce)=>{let be=Z[Ce];typeof Z[Ce]=="number"&&(be=Z[Ce].toString()),(ie===""||ie===me)&&(de[me]=be)}),W.push(de)})}S=W}})}return S}else if(X!=null&&X.includes("/")){let m={};return(le=V.cloneDeep(ye))==null||le.forEach((S,U)=>{var J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge;if((S==null?void 0:S.comp)==="Table"){let Ue=Array.isArray((oe=(D=(J=S==null?void 0:S.compData)==null?void 0:J.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:D.contents)==null?void 0:oe[0])?($=(ee=(B=(Ve=S==null?void 0:S.compData)==null?void 0:Ve.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:B.contents)==null?void 0:ee[0])==null?void 0:$.some(Be=>Be==null?void 0:Be.children):[],rt=(ie=(Se=(W=S==null?void 0:S.compData)==null?void 0:W.find(Be=>(Be==null?void 0:Be.key)==="tableContents"))==null?void 0:Se.contents)==null?void 0:ie.map(Be=>(Be!=null&&Be.find(mt=>mt==null?void 0:mt.id)&&(Be=Be.slice(1)),Be)),$e=(Ce=(me=(de=(Z=(q=S==null?void 0:S.compData)==null?void 0:q.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:Z.contents)==null?void 0:de[0])==null?void 0:me[0])==null?void 0:Ce.label,nt=(j=(be=S==null?void 0:S.compData)==null?void 0:be.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:j.contents;if(Ue)(Ue==null?void 0:Ue.length)===0?m[S.name]=m!=null&&m[S.name]?m[S.name]:Ne.tableToForm(rt,nt):m[$e]=Ne.tableToForm(rt,nt);else{const Be=[];nt=nt.slice(1,nt.length-1),nt==null||nt.forEach((mt,et)=>{rt==null||rt.forEach(Oe=>{Be.push({key:mt.label+Oe[0],value:Oe[et+1]})})}),m["form"+U]=Be}}else{const Ue=(ge=(Me=S.compData)==null?void 0:Me.find($e=>($e==null?void 0:$e.key)==="formContent"))==null?void 0:ge.contents;m!=null&&m.form||(m.form=[]);const rt=[];Ue==null||Ue.forEach($e=>{$e.key!==""&&($e={key:($e==null?void 0:$e.key)??($e==null?void 0:$e.label),value:$e==null?void 0:$e.value},rt.push($e))}),m.form=[...rt,...V.cloneDeep(m==null?void 0:m.form)]}}),m}else{if(X==="createInsofDataApi"){let m=(Q=V.cloneDeep(A))==null?void 0:Q[0];return m={comp:(se=V.cloneDeep(m))==null?void 0:se.comp,compData:(Ee=V.cloneDeep(m))==null?void 0:Ee.compData,name:(qe=V.cloneDeep(m))==null?void 0:qe.name,isShow:(dt=V.cloneDeep(m))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:b.value},value:{pageData:m}}}return X}},Pe=async(X,A,te)=>{var De,Qe,ae;let ye=await Ne.getItemData(A,sessionStorage.getItem("systemKey"),""),ue=ye==null?void 0:ye.find(_e=>(_e==null?void 0:_e.name)===(te==null?void 0:te[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let _e={};for(let se in V.cloneDeep(X))V.cloneDeep(X)[se]!=="loginUser"?_e[se]=V.cloneDeep(X)[se]:_e[se]=((De=T.value)==null?void 0:De.account)||((Qe=T.value)==null?void 0:Qe.账号);let I=[],Xe=_e;Array.isArray(X)||(Xe=[_e]),Xe==null||Xe.forEach(se=>{I.push({[se[te[1]]]:se})});let Ye=[],Ie=I==null?void 0:I.map(se=>{var Ee;return(Ee=Object.keys(se))==null?void 0:Ee[0]});ye==null||ye.forEach(se=>{var Ee;(se==null?void 0:se.name)===(te==null?void 0:te[0])&&((Ee=se==null?void 0:se.compData)==null||Ee.forEach(qe=>{var dt;(qe==null?void 0:qe.key)==="tableContents"&&((dt=qe==null?void 0:qe.contents)==null||dt.forEach(m=>{m!=null&&m.some(S=>Ie.includes(S))&&Ye.push({[m.find(S=>S.id).id]:m.find(S=>Ie.includes(S))})}))}))});let le=Ye==null?void 0:Ye.map(se=>{var Ee;return(Ee=Object.keys(se))==null?void 0:Ee[0]}),Q=[];if(le==null||le.forEach(se=>{var dt;let Ee=(dt=Ye==null?void 0:Ye.find(m=>{var S;return((S=Object.keys(m))==null?void 0:S[0].toString())===se.toString()}))==null?void 0:dt[se],qe=I==null?void 0:I.find(m=>{var S;return((S=Object.keys(m))==null?void 0:S[0])===Ee});Q.push({id:parseInt(se),value:{tableData:qe[Ee]}})}),(Q==null?void 0:Q.length)>0)return Q}else if((ue==null?void 0:ue.comp)==="Form"){let _e=V.cloneDeep(ue);_e.compData=(ae=_e.compData)==null?void 0:ae.map(Ye=>{var Ie;return(Ye==null?void 0:Ye.key)==="formContent"&&(Ye.contents=(Ie=Ye.contents)==null?void 0:Ie.map(le=>((le==null?void 0:le.key)===(te==null?void 0:te[1])&&(le.value=(X==null?void 0:X[le==null?void 0:le.prop])||X),le))),Ye});let I={};for(let Ye in _e)Ye!=="id"&&(I[Ye]=_e[Ye]);let Xe=[];if(Xe.push({id:ue==null?void 0:ue.id,keyType:te==null?void 0:te[1],value:{pageData:I}}),(Xe==null?void 0:Xe.length)>0)return Xe}}},Le=async(X,A,te)=>{var De,Qe,ae,_e,I,Xe,Ye,Ie,le,Q;let ye=await Ne.getItemData(A,sessionStorage.getItem("systemKey"),""),ue=ye==null?void 0:ye.find(se=>(se==null?void 0:se.name)===(te==null?void 0:te[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let se={};for(let Ee in V.cloneDeep(X))V.cloneDeep(X)[Ee]!=="loginUser"?se[Ee]=V.cloneDeep(X)[Ee]:se[Ee]=((De=T.value)==null?void 0:De.account)||((Qe=T.value)==null?void 0:Qe.账号);await xe.createInsofDataApi({key:{type:"data",pageKey:A,tableId:ue==null?void 0:ue.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:se}})}else if((ue==null?void 0:ue.comp)==="Form"){let se=V.cloneDeep(ue),Ee=Object.keys(X),qe="";(_e=(ae=V.cloneDeep(se))==null?void 0:ae.compData)==null||_e.forEach(D=>{var oe,Ve;(D==null?void 0:D.key)==="formContent"&&((Ve=(oe=V.cloneDeep(D))==null?void 0:oe.contents)==null||Ve.forEach(B=>{var ee;Ee.includes(B==null?void 0:B.key)&&(B==null?void 0:B.value)===((ee=T.value)==null?void 0:ee.姓名)&&(qe=B==null?void 0:B.key)}))});let dt=[];(I=Object.values(X[qe]))==null||I.forEach(D=>{D!=null&&D.includes("(")&&dt.push(D)}),dt=[...new Set(dt)];const m=dt==null?void 0:dt.map(async D=>{var $,W,Se,ie,q,Z,de,me,Ce,be,j,Me;let oe="";(Z=(q=(ie=(Se=(W=($=V.cloneDeep(D))==null?void 0:$.split("("))==null?void 0:W[1])==null?void 0:Se.split(")"))==null?void 0:ie[0])==null?void 0:q.split(":"))==null||Z.forEach(ge=>{oe=oe===""?oe+ge.replaceAll("'",""):oe+"/"+ge.replaceAll("'","")});let Ve=[];(Me=(j=(be=(Ce=(me=(de=V.cloneDeep(D))==null?void 0:de.split("<"))==null?void 0:me[1])==null?void 0:Ce.split(">"))==null?void 0:be[0])==null?void 0:j.split(":"))==null||Me.forEach(ge=>{Ve.push(ge.replaceAll("'",""))});const B=await Ne.getItemData(oe,sessionStorage.getItem("systemKey"),"");let ee="";return B==null||B.forEach(ge=>{var Ue;ge.name===(Ve==null?void 0:Ve[0])&&((Ue=ge==null?void 0:ge.compData)==null||Ue.forEach(rt=>{var $e;(rt==null?void 0:rt.key)==="formContent"&&(($e=rt.contents)==null||$e.forEach(nt=>{(nt==null?void 0:nt.key)===(Ve==null?void 0:Ve[1])&&(ee=nt==null?void 0:nt.value)}))}))}),{[D]:ee}}),S=await Promise.all(m);se.compData=(Ye=(Xe=V.cloneDeep(se))==null?void 0:Xe.compData)==null?void 0:Ye.map(D=>{var oe,Ve;return(D==null?void 0:D.key)==="formContent"&&(D.contents=(Ve=(oe=V.cloneDeep(D))==null?void 0:oe.contents)==null?void 0:Ve.map(B=>{var ee,$,W,Se;return(ee=X[qe])!=null&&ee[B==null?void 0:B.key]&&(X[qe][B==null?void 0:B.key].includes("(")?B.value=($=S==null?void 0:S.find(ie=>{var q;return((q=Object.keys(ie))==null?void 0:q[0])===X[qe][B==null?void 0:B.key]}))==null?void 0:$[X[qe][B==null?void 0:B.key]]:B.value=(Se=(W=V.cloneDeep(X))==null?void 0:W[qe])==null?void 0:Se[B==null?void 0:B.key]),B})),D});const U=await xe.getInsofDataApi({key:{type:"structure",pageKey:A,systemKey:sessionStorage.getItem("systemKey")}});let J="";((Ie=U==null?void 0:U.data)==null?void 0:Ie.type)==="success"&&((Q=(le=U==null?void 0:U.data)==null?void 0:le.result)==null||Q.forEach(D=>{var oe,Ve;((Ve=(oe=D==null?void 0:D.value)==null?void 0:oe.pageData)==null?void 0:Ve.name)===(te==null?void 0:te[0])&&(J=D.id)}),await xe.updateInsofDataApi({id:J,value:{pageData:se}}))}}},P=(X,A="",te={})=>{for(const[ye,ue]of Object.entries(X)){const De=A?`${A}.${ye}`:ye;ue!==null&&typeof ue=="object"&&!Array.isArray(ue)&&Object.prototype.toString.call(ue)!=="[object Date]"?P(ue,De,te):te[De]=ue}return te},re=async(X,A,te,ye)=>{var Qe,ae,_e,I,Xe,Ye,Ie,le,Q,se,Ee,qe,dt,m,S,U,J,D,oe,Ve,B,ee,$,W,Se;let ue=await Ne.getItemData(A,sessionStorage.getItem("systemKey"),""),De=ue==null?void 0:ue.find(ie=>(ie==null?void 0:ie.name)===(te==null?void 0:te[0]));if(De){if(!(te!=null&&te[1])&&(De==null?void 0:De.comp)==="Table"){let ie={},q=[],Z=(ae=(Qe=De==null?void 0:De.compData)==null?void 0:Qe.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:ae.contents;Z!=null&&Z.every(Ce=>Array.isArray(Ce))?q=(I=Ne.getColumnChild((_e=Z==null?void 0:Z[0])==null?void 0:_e.filter(Ce=>(Ce==null?void 0:Ce.label)!=="操作")))==null?void 0:I.map(Ce=>Ce==null?void 0:Ce.prop):q=Z==null?void 0:Z.map(Ce=>Ce==null?void 0:Ce.label);for(let Ce in V.cloneDeep(X))if(V.cloneDeep(X)[Ce]!=="loginUser"){let be=P(V.cloneDeep(X)[Ce]),j={};for(let Me in be)if(q!=null&&q.find(ge=>ge===Me))j[Me]=be[Me];else if(q!=null&&q.find(ge=>(ge==null?void 0:ge.toUpperCase())===(Me==null?void 0:Me.toUpperCase()))){let ge=q==null?void 0:q.find(Ue=>(Ue==null?void 0:Ue.toUpperCase())===(Me==null?void 0:Me.toUpperCase()));j[ge]=be[Me]}ie[Ce]=j}else ie[Ce]=((Xe=T.value)==null?void 0:Xe.account)||((Ye=T.value)==null?void 0:Ye.账号);let de=await xe.getInsofDataApi({keyLikes:{tableId:De==null?void 0:De.id}});if(((le=(Ie=de==null?void 0:de.data)==null?void 0:Ie.result)==null?void 0:le.length)>0){let Ce=(se=(Q=de==null?void 0:de.data)==null?void 0:Q.result)==null?void 0:se.map(be=>be==null?void 0:be.id);(Ce==null?void 0:Ce.length)>0&&await xe.batchDeleteInsofDataApi({ids:Ce})}let me=[];if((Ee=De==null?void 0:De.compData)!=null&&Ee.find(Ce=>(Ce==null?void 0:Ce.key)==="pageColumn")&&((m=(dt=(qe=De==null?void 0:De.compData)==null?void 0:qe.find(Ce=>(Ce==null?void 0:Ce.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&m.includes("["))){const Ce=await xe.getInsofDataApi({id:De==null?void 0:De.tableId});let be=((D=(J=(U=(S=Ce==null?void 0:Ce.data)==null?void 0:S.result)==null?void 0:U[0])==null?void 0:J.key)==null?void 0:D.pageKey)??"";(oe=Object.values(ie))==null||oe.forEach(j=>{me.push({key:{type:"data",pageKey:be,tableId:De==null?void 0:De.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:j}})})}else(Ve=Object.values(ie))==null||Ve.forEach(Ce=>{me.push({key:{type:"data",pageKey:A,tableId:De==null?void 0:De.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ce}})});(me==null?void 0:me.length)>0&&await xe.batchAddInsofDataApi({dataList:me})}else if(!(te!=null&&te[1])&&(De==null?void 0:De.comp)==="Form"){let ie=V.cloneDeep(De);ie.compData=(ee=(B=V.cloneDeep(ie))==null?void 0:B.compData)==null?void 0:ee.map(de=>{var me,Ce;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(Ce=(me=V.cloneDeep(de))==null?void 0:me.contents)==null?void 0:Ce.map(be=>{var j,Me;return(j=V.cloneDeep(X))!=null&&j[be==null?void 0:be.key]&&(be.value=(Me=V.cloneDeep(X))==null?void 0:Me[be==null?void 0:be.key]),be})),de});const q=await xe.getInsofDataApi({key:{type:"structure",pageKey:A,systemKey:sessionStorage.getItem("systemKey")}});let Z="";(($=q==null?void 0:q.data)==null?void 0:$.type)==="success"&&((Se=(W=q==null?void 0:q.data)==null?void 0:W.result)==null||Se.forEach(de=>{var me,Ce;((Ce=(me=de==null?void 0:de.value)==null?void 0:me.pageData)==null?void 0:Ce.name)===(te==null?void 0:te[0])&&(Z=de.id)}),await xe.updateInsofDataApi({id:Z,value:{pageData:ie}}))}}},ne=async X=>{var A,te,ye,ue,De,Qe,ae,_e,I,Xe,Ye,Ie,le,Q,se,Ee;F.setImportLoading(!0);try{if(X.api){let qe=new WeakMap;(te=(A=(await xe.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:G.value})).data.result)==null?void 0:A.filter($=>{var W,Se;return((W=$==null?void 0:$.key)==null?void 0:W.pageKey)!=="menu"&&((Se=$==null?void 0:$.key)==null?void 0:Se.pageKey)!=="secret"}))==null||te.forEach($=>{qe[$.key.pageKey]?qe[$.key.pageKey]=[...qe[$.key.pageKey],$]:qe[$.key.pageKey]=[$]});let m=await Ne.getItemData((y==null?void 0:y.value)===""?b.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",qe),S="";if(m=m==null?void 0:m.map($=>{var W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge;if(($==null?void 0:$.comp)==="Form")$.compData=(W=$.compData)==null?void 0:W.map(Ue=>{var rt;return(Ue==null?void 0:Ue.key)==="formContent"&&(Ue.contents=(rt=Ue.contents)==null?void 0:rt.map($e=>{var nt;if(($e==null?void 0:$e.value)===""&&($e==null?void 0:$e.type)==="Select"){let Be=Ne.judgeContents((nt=V.cloneDeep($e))==null?void 0:nt.optionUrl,qe);$e.value=$e.value||Be}return $e})),Ue});else if(($==null?void 0:$.comp)==="Table"&&(Se=$.compData)!=null&&Se.find(Ue=>(Ue==null?void 0:Ue.key)==="pageColumn")){let Ue=(q=(ie=$.compData)==null?void 0:ie.find(Be=>(Be==null?void 0:Be.key)==="pageColumn"))==null?void 0:q.contents,rt=((de=(Z=$.compData)==null?void 0:Z.find(Be=>(Be==null?void 0:Be.key)==="pageGroup"))==null?void 0:de.contents)??"",$e=(be=(Ce=(me=Ue==null?void 0:Ue.split("["))==null?void 0:me[1])==null?void 0:Ce.split("]"))==null?void 0:be[0];S=((j=Ue==null?void 0:Ue.split("["))==null?void 0:j[0])+((ge=(Me=K.value)==null?void 0:Me.find(Be=>(Be==null?void 0:Be.key)===$e))==null?void 0:ge.value)}return $}),!(S===""||S==="")){const $=await Ne.getItemData(S,sessionStorage.getItem("systemKey"),"",!1,"","",qe);m=m==null?void 0:m.map(W=>{var Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt;if((W==null?void 0:W.comp)==="Table"&&(Se=W.compData)!=null&&Se.find($e=>($e==null?void 0:$e.key)==="pageColumn")){let $e=(q=(ie=W.compData)==null?void 0:ie.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn"))==null?void 0:q.contents,nt=((de=(Z=W.compData)==null?void 0:Z.find(Oe=>(Oe==null?void 0:Oe.key)==="pageGroup"))==null?void 0:de.contents)??"",Be=(be=(Ce=(me=$e==null?void 0:$e.split("["))==null?void 0:me[1])==null?void 0:Ce.split("]"))==null?void 0:be[0],mt=((j=$e==null?void 0:$e.split("["))==null?void 0:j[0])+((ge=(Me=K.value)==null?void 0:Me.find(Oe=>(Oe==null?void 0:Oe.key)===Be))==null?void 0:ge.value),et=(Ue=$==null?void 0:$.find(Oe=>(Oe==null?void 0:Oe.name)===(nt===""?d==null?void 0:d.compName:nt)))==null?void 0:Ue.compData;W.compData=(rt=W.compData)==null?void 0:rt.map(Oe=>{var it;return(Oe==null?void 0:Oe.key)==="tableContents"&&(Oe.contents=(it=et==null?void 0:et.find(gt=>(gt==null?void 0:gt.key)==="tableContents"))==null?void 0:it.contents),Oe})}return W})}let U={};if(((ue=(ye=X==null?void 0:X.extraValues)==null?void 0:ye.input)==null?void 0:ue.length)>0){const $=(Qe=(De=X==null?void 0:X.extraValues)==null?void 0:De.input)==null?void 0:Qe.map(async W=>{var Se;pe!=null&&pe.find(ie=>ie===W)?U=await we(W,m):U[Object.keys(W)[0]]=await we((Se=Object.values(W))==null?void 0:Se[0],m,qe)});await Promise.all($)}else U=await we("/",m);let J=!1;(_e=(ae=X==null?void 0:X.extraValues)==null?void 0:ae.output)==null||_e.forEach($=>{var W,Se;(Se=(W=Object.values($))==null?void 0:W[0])!=null&&Se.includes(".doc")&&(J=!0)});let D;if(J){const $=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});D=await xe.axios.post(X.api,U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{$.close()})}else D=await xe.axios.post(X.api,U,{headers:{"Content-Type":"application/json"}});let oe=(Ie=(Ye=(Xe=(I=V.cloneDeep(X))==null?void 0:I.extraValues)==null?void 0:Xe.output)==null?void 0:Ye.map($=>{var W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt,$e,nt;if(!((Se=(W=Object.values($))==null?void 0:W[0])!=null&&Se.includes(".doc"))){let Be=(j=(be=(Ce=(q=V.cloneDeep((ie=Object.values($))==null?void 0:ie[0]))==null?void 0:q.split("["))==null?void 0:Ce[((me=(de=V.cloneDeep((Z=Object.values($))==null?void 0:Z[0]))==null?void 0:de.split("["))==null?void 0:me.length)-1])==null?void 0:be.split("]"))==null?void 0:j[0],mt=Be==null?void 0:Be.split(":"),et=(Ue=V.cloneDeep((Me=Object.values($))==null?void 0:Me[0]))==null?void 0:Ue.substring(0,V.cloneDeep((ge=Object.values($))==null?void 0:ge[0]).lastIndexOf("["));if(et=($e=V.cloneDeep(et))==null?void 0:$e.slice(0,((rt=V.cloneDeep(et))==null?void 0:rt.length)-1),et!=null&&et.includes("[")){let Oe="";if((nt=Ne.contentTransArrayToAll(et,"/"))==null||nt.forEach(it=>{var gt,Je,je,It,Te,Ge,Fe;if(!(it!=null&&it.includes("[")))Oe=Oe===""?Oe+it.replaceAll("/",""):Oe+"/"+it.replaceAll("/","");else{let Ze=V.cloneDeep(it).slice(1,((gt=V.cloneDeep(it))==null?void 0:gt.length)-1),E=(Ge=(Te=(It=(je=(Je=V.cloneDeep(Ze))==null?void 0:Je.split("["))==null?void 0:je[1])==null?void 0:It.split("]"))==null?void 0:Te[0])==null?void 0:Ge.split(":"),fe="",Ke=(Fe=m==null?void 0:m.find(he=>(he==null?void 0:he.name)===(E==null?void 0:E[0])))==null?void 0:Fe.compData;Ke==null||Ke.forEach(he=>{var ut;(he==null?void 0:he.key)==="formContent"&&((ut=he==null?void 0:he.contents)==null||ut.forEach(st=>{(st==null?void 0:st.key)===(E==null?void 0:E[1])&&(fe=st==null?void 0:st.value)}))}),Oe=Oe===""?Oe+fe.replaceAll("/",""):Oe+"/"+fe.replaceAll("/","")}}),et=Oe,et[(et==null?void 0:et.length)-1]!=="/")return et}}}))==null?void 0:Ie.filter($=>$);oe=[...new Set(V.cloneDeep(oe))];let Ve=oe==null?void 0:oe.map(async $=>{let W=await Ne.getItemData($,sessionStorage.getItem("systemKey"),"",!1,"","",qe);if((W==null?void 0:W.length)===0)return await Ne.getParentContents($)});await Promise.all(Ve);let B=[],ee=(se=(Q=(le=V.cloneDeep(X))==null?void 0:le.extraValues)==null?void 0:Q.output)==null?void 0:se.map(async $=>{var Ce,be,j,Me,ge,Ue,rt,$e,nt,Be,mt,et,Oe,it,gt,Je,je,It,Te,Ge,Fe,Ze,E,fe,Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt,vt,Mt,Lt,Ut,Wt,Jt,Pt,En,zn,gn,Fn,yn,Rn,Pn,Ln,$n,jn,Sn,hn,un,bn,vn,nn,pn,Un,Tn,Bn,kn,Kn,Wn,In,Hn,qn,_t,Yt;if((be=(Ce=Object.values($))==null?void 0:Ce[0])!=null&&be.includes(".doc")){var W=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"}),Se=D.headers["content-disposition"],ie=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),q=ie.exec(Se),Z=q==null?void 0:q[1],de=document.createElement("a"),me=window.URL.createObjectURL(W);x.value=[{name:Z,blobUrl:me}],c.value=!0}else{let yt=(Be=(nt=($e=(Me=V.cloneDeep((j=Object.values($))==null?void 0:j[0]))==null?void 0:Me.split("["))==null?void 0:$e[((rt=(Ue=V.cloneDeep((ge=Object.values($))==null?void 0:ge[0]))==null?void 0:Ue.split("["))==null?void 0:rt.length)-1])==null?void 0:nt.split("]"))==null?void 0:Be[0],Ot=yt==null?void 0:yt.split(":"),bt=(Oe=V.cloneDeep((mt=Object.values($))==null?void 0:mt[0]))==null?void 0:Oe.substring(0,V.cloneDeep((et=Object.values($))==null?void 0:et[0]).lastIndexOf("["));if(bt!=null&&bt.includes("[")?bt=(gt=V.cloneDeep(bt))==null?void 0:gt.slice(0,((it=V.cloneDeep(bt))==null?void 0:it.length)-1):bt===""&&(bt=b.value),bt=bt.replaceAll("<","[").replaceAll(">","]"),bt!=null&&bt.includes("[")){let Dt="";(Je=Ne.contentTransArrayToAll(bt,"/"))==null||Je.forEach((Ct,zt)=>{var Vt,Ft,Ht,an,Nn,Gn,An,Xn,Ea,oa,ha;if(!(Ct!=null&&Ct.includes("[")))Dt=Dt===""?Dt+Ct.replaceAll("/",""):Dt+"/"+Ct.replaceAll("/","");else{let ra="",dn="";(Vt=V.cloneDeep(Ct))!=null&&Vt.includes("]")?(ra=V.cloneDeep(Ct).slice(1,((Ft=V.cloneDeep(Ct))==null?void 0:Ft.length)-1),dn=(An=(Gn=(Nn=(an=(Ht=V.cloneDeep(ra))==null?void 0:Ht.split("["))==null?void 0:an[1])==null?void 0:Nn.split("]"))==null?void 0:Gn[0])==null?void 0:An.split(":")):(ra=V.cloneDeep(Ct).slice(1,(Xn=V.cloneDeep(Ct))==null?void 0:Xn.length),dn=(Ea=V.cloneDeep(ra))==null?void 0:Ea.split("/"));let Yn="",la=(oa=m==null?void 0:m.find(on=>(on==null?void 0:on.name)===(dn==null?void 0:dn[0])))==null?void 0:oa.compData;la==null||la.forEach(on=>{var Sa;(on==null?void 0:on.key)==="formContent"&&((Sa=on==null?void 0:on.contents)==null||Sa.forEach(Vn=>{(Vn==null?void 0:Vn.key)===(dn==null?void 0:dn[1])&&(Yn=Vn==null?void 0:Vn.value)}))}),((ha=Ne.contentTransArrayToAll(bt,"/"))==null?void 0:ha.length)-1!==zt?Dt=Dt===""?Dt+Yn.replaceAll("/",""):Dt+"/"+Yn.replaceAll("/",""):Dt=Dt+r.value+Yn.replaceAll("/","")}}),(je=b.value)!=null&&je.includes(Dt)?bt=b.value:bt=Dt}let Kt=V.cloneDeep((It=Object.keys($))==null?void 0:It[0]);if(((Te=D==null?void 0:D.data)==null?void 0:Te.statusCode)===200||((Ge=D==null?void 0:D.data)==null?void 0:Ge.code)===200){if(((Ze=(Fe=D==null?void 0:D.data)==null?void 0:Fe.data)!=null&&Ze[Kt]||(fe=(E=D==null?void 0:D.data)==null?void 0:E.result)!=null&&fe[Kt])&&(Ot==null?void 0:Ot.length)===1)return await re(((he=(Ke=D==null?void 0:D.data)==null?void 0:Ke.data)==null?void 0:he[Kt])||((st=(ut=D==null?void 0:D.data)==null?void 0:ut.result)==null?void 0:st[Kt]),V.cloneDeep(bt),Ot,S);if((pt=(xt=D==null?void 0:D.data)==null?void 0:xt.data)!=null&&pt[Kt]||(ft=(ct=D==null?void 0:D.data)==null?void 0:ct.result)!=null&&ft[Kt]){let Dt=await Pe(((Tt=(wt=D==null?void 0:D.data)==null?void 0:wt.data)==null?void 0:Tt[Kt])||((vt=(jt=D==null?void 0:D.data)==null?void 0:jt.result)==null?void 0:vt[Kt]),V.cloneDeep(bt),Ot);return Dt&&(B=[...B,...Dt]),Dt}else{if(!((Mt=D==null?void 0:D.data)!=null&&Mt.data)){let Dt=await Ne.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,"","",qe);Dt=Dt==null?void 0:Dt.map(zt=>{var Vt;return(zt==null?void 0:zt.name)===(Ot==null?void 0:Ot[0])&&(zt.compData=(Vt=zt.compData)==null?void 0:Vt.map(Ft=>{var Ht;return(Ft==null?void 0:Ft.key)==="formContent"&&(Ft.contents=(Ht=Ft.contents)==null?void 0:Ht.map(an=>{var Nn,Gn;return(an==null?void 0:an.key)===(Ot==null?void 0:Ot[1])&&(an.value=(Gn=(Nn=D==null?void 0:D.data)==null?void 0:Nn.result)==null?void 0:Gn[Kt==null?void 0:Kt.replaceAll(":","")]),an})),Ft})),zt});let Ct=[];(Lt=Dt==null?void 0:Dt.filter(zt=>(zt==null?void 0:zt.comp)==="Form"))==null||Lt.forEach(async zt=>{let Vt={};for(let Ft in zt)Ft!=="id"&&(Vt[Ft]=zt[Ft]);Ct.push({id:zt==null?void 0:zt.id,value:{pageData:Vt}})}),(Ct==null?void 0:Ct.length)>0&&await xe.batchUpdateInsofDataApi({dataList:Ct});return}if((Ot==null?void 0:Ot.length)===1){const Dt=(Jt=(Wt=(Ut=D==null?void 0:D.data)==null?void 0:Ut.data)==null?void 0:Wt.path)==null?void 0:Jt.path;let Ct="";(Fn=(gn=(zn=(En=(Pt=Dt==null?void 0:Dt.split("("))==null?void 0:Pt[1])==null?void 0:En.split(")"))==null?void 0:zn[0])==null?void 0:gn.split(":"))==null||Fn.forEach(Ft=>{var Ht,an;Ct=Ct===""?Ct+((Ht=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:Ht.trim()):Ct+"/"+((an=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:an.trim())});let zt=[($n=(Ln=(Pn=(Rn=(yn=Dt==null?void 0:Dt.split("<"))==null?void 0:yn[1])==null?void 0:Rn.split(">"))==null?void 0:Pn[0])==null?void 0:Ln.replaceAll("'",""))==null?void 0:$n.trim()],Vt;return(hn=(Sn=(jn=D==null?void 0:D.data)==null?void 0:jn.data)==null?void 0:Sn.data)!=null&&hn[Ot==null?void 0:Ot[0]]?Vt=await re((vn=(bn=(un=D==null?void 0:D.data)==null?void 0:un.data)==null?void 0:bn.data)==null?void 0:vn[Ot==null?void 0:Ot[0]],Ct,Ot,S):Vt=await Le((pn=(nn=D==null?void 0:D.data)==null?void 0:nn.data)==null?void 0:pn.data,Ct,zt,qe),Vt}else{const Dt=(Bn=(Tn=(Un=D==null?void 0:D.data)==null?void 0:Un.data)==null?void 0:Tn.path)==null?void 0:Bn.path;let Ct="";return(Hn=(In=(Wn=(Kn=(kn=Dt==null?void 0:Dt.split("("))==null?void 0:kn[1])==null?void 0:Kn.split(")"))==null?void 0:Wn[0])==null?void 0:In.split(":"))==null||Hn.forEach(Vt=>{var Ft,Ht;Ct=Ct===""?Ct+((Ft=Vt==null?void 0:Vt.replaceAll("'",""))==null?void 0:Ft.trim()):Ct+"/"+((Ht=Vt==null?void 0:Vt.replaceAll("'",""))==null?void 0:Ht.trim())}),await Pe((Yt=(_t=(qn=D==null?void 0:D.data)==null?void 0:qn.data)==null?void 0:_t.data)==null?void 0:Yt[Ot==null?void 0:Ot[0]],Ct,Ot)}}}}});if(await Promise.all(ee),(B==null?void 0:B.length)>0){let $=[];B==null||B.forEach(ie=>{$!=null&&$.find(q=>{var Z,de,me,Ce;return((de=(Z=q==null?void 0:q.value)==null?void 0:Z.pageData)==null?void 0:de.name)===((Ce=(me=ie==null?void 0:ie.value)==null?void 0:me.pageData)==null?void 0:Ce.name)})||$.push(ie)});let W=[];$==null||$.forEach(ie=>{var de,me,Ce,be;let q=V.cloneDeep(ie);q.value.pageData.compData=(de=q.value.pageData.compData)==null?void 0:de.map(j=>{var Me;return(j==null?void 0:j.key)==="formContent"&&(j.contents=(Me=j.contents)==null?void 0:Me.map(ge=>{var rt,$e,nt,Be;let Ue=(rt=V.cloneDeep(B))==null?void 0:rt.find(mt=>(mt==null?void 0:mt.keyType)===(ge==null?void 0:ge.key));if(Ue){let mt=(Be=(nt=($e=Ue.value.pageData.compData)==null?void 0:$e.find(et=>(et==null?void 0:et.key)==="formContent"))==null?void 0:nt.contents)==null?void 0:Be.find(et=>(et==null?void 0:et.key)===(ge==null?void 0:ge.key));ge.value=mt==null?void 0:mt.value}return ge})),j}),W.push({id:q==null?void 0:q.id,value:q==null?void 0:q.value});let Z=[];(be=(Ce=(me=q==null?void 0:q.value)==null?void 0:me.pageData)==null?void 0:Ce.compData)==null||be.forEach(j=>{var Me;(j==null?void 0:j.key)==="formContent"&&((Me=j==null?void 0:j.contents)==null||Me.forEach(ge=>{var Ue,rt,$e,nt,Be,mt;if((rt=(Ue=ge==null?void 0:ge.optionUrl)==null?void 0:Ue.menuSelect)!=null&&rt.find(et=>et==null?void 0:et.includes("[")))if(Z!=null&&Z.find(et=>{var Oe,it,gt;return((Oe=et==null?void 0:et.key)==null?void 0:Oe.join(","))===((gt=(it=ge==null?void 0:ge.optionUrl)==null?void 0:it.menuSelect)==null?void 0:gt.join(","))})){let et=($e=Z==null?void 0:Z.find(Oe=>{var it,gt,Je;return((it=Oe==null?void 0:Oe.key)==null?void 0:it.join(","))===((Je=(gt=ge==null?void 0:ge.optionUrl)==null?void 0:gt.menuSelect)==null?void 0:Je.join(","))}))==null?void 0:$e.value;et.push({key:ge==null?void 0:ge.prop,groups:(nt=ge==null?void 0:ge.optionUrl)==null?void 0:nt.groupSelect,value:ge==null?void 0:ge.value}),Z=Z==null?void 0:Z.map(Oe=>{var it,gt,Je;return((it=Oe==null?void 0:Oe.key)==null?void 0:it.join(","))===((Je=(gt=ge==null?void 0:ge.optionUrl)==null?void 0:gt.menuSelect)==null?void 0:Je.join(","))&&(Oe.value=et),Oe})}else Z.push({key:(Be=ge==null?void 0:ge.optionUrl)==null?void 0:Be.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(mt=ge==null?void 0:ge.optionUrl)==null?void 0:mt.groupSelect,value:ge==null?void 0:ge.value}]})}))}),(Z==null?void 0:Z.length)>0&&(Z=Z==null?void 0:Z.map(j=>{var ge;let Me="";return(ge=j==null?void 0:j.key)==null||ge.forEach(Ue=>{var rt;if(!(Ue!=null&&Ue.includes("[")))Me=Me===""?Me+Ue:Me+"/"+Ue;else{let $e="",nt=(rt=Ue==null?void 0:Ue.replaceAll("[","").replaceAll("]",""))==null?void 0:rt.split(":");m==null||m.forEach(Be=>{var mt;(Be==null?void 0:Be.name)===(nt==null?void 0:nt[0])&&((mt=Be==null?void 0:Be.compData)==null||mt.forEach(et=>{var Oe;(et==null?void 0:et.key)==="formContent"&&((Oe=et==null?void 0:et.contents)==null||Oe.forEach(it=>{(it==null?void 0:it.prop)===(nt==null?void 0:nt[1])&&($e=it==null?void 0:it.value)}))}))}),Me=Me+r.value+$e}}),j.key=Me,j})),Z==null||Z.forEach(j=>{var rt,$e,nt;let Me=(rt=qe[j.key])==null?void 0:rt.find(Be=>{var mt,et,Oe,it,gt,Je,je;return((et=(mt=Be==null?void 0:Be.value)==null?void 0:mt.pageData)==null?void 0:et.name)===((gt=(it=(Oe=j==null?void 0:j.value)==null?void 0:Oe[0])==null?void 0:it.groups)==null?void 0:gt[0])&&((je=(Je=Be==null?void 0:Be.value)==null?void 0:Je.pageData)==null?void 0:je.name)!==void 0}),ge=Me==null?void 0:Me.id,Ue=($e=Me==null?void 0:Me.value)==null?void 0:$e.pageData;Ue.compData=(nt=Ue.compData)==null?void 0:nt.map(Be=>{var mt;return(Be==null?void 0:Be.key)==="formContent"&&(Be.contents=(mt=Be.contents)==null?void 0:mt.map(et=>{var it;let Oe=(it=j.value)==null?void 0:it.find(gt=>(gt==null?void 0:gt.key)===(et==null?void 0:et.prop));return Oe&&(et.value=Oe.value),et})),Be}),W.push({id:ge,value:{pageData:Ue}})})});let Se=(Ee=V.cloneDeep(B))==null?void 0:Ee[0];(W==null?void 0:W.length)>0&&await xe.batchUpdateInsofDataApi({dataList:W})}C.setFreshContent(!0)}F.setImportLoading(!1)}catch{xe.ElMessage.error("方法执行错误,请查看方法!"),F.setImportLoading(!1)}h.value=!0},pe=["createInsofDataApi"],He=dr(async X=>{ne(X)},100),ot=async X=>{var ae,_e,I,Xe,Ye;const A=V.cloneDeep(X);let te,ye=new WeakMap,ue=await xe.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:G.value});(_e=(ae=ue.data.result)==null?void 0:ae.filter(Ie=>{var le,Q;return((le=Ie==null?void 0:Ie.key)==null?void 0:le.pageKey)!=="menu"&&((Q=Ie==null?void 0:Ie.key)==null?void 0:Q.pageKey)!=="secret"}))==null||_e.forEach(Ie=>{ye[Ie.key.pageKey]?ye[Ie.key.pageKey]=[...ye[Ie.key.pageKey],Ie]:ye[Ie.key.pageKey]=[Ie]}),X!=null&&X[0].path&&(te=await(A==null?void 0:A.map(async(Ie,le)=>{var U,J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce;const se=(U=ye[Ie==null?void 0:Ie.path])==null?void 0:U.filter(be=>{var j;return((j=be==null?void 0:be.key)==null?void 0:j.type)==="data"});let Ee="";const qe=await Ne.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye);se==null||se.forEach(be=>{var j,Me,ge,Ue,rt;((Me=(j=be==null?void 0:be.value)==null?void 0:j.tableData)==null?void 0:Me.算法名称)===((ge=A==null?void 0:A[le])==null?void 0:ge.method)&&(Ee=(rt=(Ue=be==null?void 0:be.value)==null?void 0:Ue.tableData)==null?void 0:rt.算法体)});const dt=await Ne.getItemData(Ie==null?void 0:Ie.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye);let m="",S=(Ve=(oe=(D=(J=dt==null?void 0:dt[0])==null?void 0:J.compData)==null?void 0:D.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:oe.contents)==null?void 0:Ve.findIndex(be=>(be==null?void 0:be.prop)==="算法体");return(ee=(B=dt==null?void 0:dt[0])==null?void 0:B.compData)==null||ee.forEach(be=>{var j;(be==null?void 0:be.key)==="tableContents"&&((j=be==null?void 0:be.contents)==null||j.forEach(Me=>{Me!=null&&Me.find(ge=>ge===(Ie==null?void 0:Ie.method))&&(m=Me[S])}))}),{buttonName:(($=A==null?void 0:A[le])==null?void 0:$.method)||((ie=(Se=(W=se==null?void 0:se[0])==null?void 0:W.value)==null?void 0:Se.tableData)==null?void 0:ie.算法名称),api:(Ee===""?(de=(Z=(q=se==null?void 0:se[0])==null?void 0:q.value)==null?void 0:Z.tableData)==null?void 0:de.算法体:Ee)||m,content:qe==null?void 0:qe.filter(be=>be.comp!=="methodButton"),extraContent:(me=V.cloneDeep(Ie.value))==null?void 0:me.slice(1),methodName:(Ie==null?void 0:Ie.path)??"",extraValues:(Ce=A==null?void 0:A[le])==null?void 0:Ce.data}})));const De=A==null?void 0:A.map(async Ie=>{var dt,m,S,U,J,D;const le=(dt=ue.data.result)==null?void 0:dt.filter(oe=>{var Ve,B,ee;return((Ve=oe==null?void 0:oe.key)==null?void 0:Ve.parentTable)===""&&((B=oe==null?void 0:oe.key)==null?void 0:B.type)==="method"&&((ee=oe==null?void 0:oe.key)==null?void 0:ee.methodName)===oe.method}),Q=le==null?void 0:le[0],se=(m=ue.data.result)==null?void 0:m.filter(oe=>{var Ve,B;return((Ve=oe==null?void 0:oe.key)==null?void 0:Ve.type)==="methodData"&&((B=oe==null?void 0:oe.key)==null?void 0:B.tableId)===(Q==null?void 0:Q.id)}),Ee=await Ne.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye),qe=se==null?void 0:se[0];return{buttonName:(S=Q==null?void 0:Q.key)==null?void 0:S.methodKey,api:(J=(U=qe==null?void 0:qe.value)==null?void 0:U.tableData)==null?void 0:J[0],content:Ee==null?void 0:Ee.filter(oe=>oe.comp!=="methodButton"),extraContent:(D=V.cloneDeep(Ie.value))==null?void 0:D.slice(1),methodName:(Ie==null?void 0:Ie.method)??""}}),Qe=(I=X==null?void 0:X[0])!=null&&I.path&&((Xe=X==null?void 0:X[0])==null?void 0:Xe.path)!==""?await Promise.all(te):await Promise.all(De);l.value=Qe==null?void 0:Qe.filter(Ie=>Ie==null?void 0:Ie.extraContent),(Ye=l.value)==null||Ye.forEach(Ie=>{var le;Ie.api===""&&((le=Ie.content)==null||le.forEach(Q=>{var se;Q.comp=="Table"&&C.setExtraContents(Ne.methodTableToContent(Q.compData,(se=Ie.extraContent)==null?void 0:se[0]))}))})};return e.watch(()=>d.itemData,async()=>{M.value=="view"&&!h.value&&await ot(V.cloneDeep(d.itemData)),h.value=!1},{immediate:!0,deep:!0}),(X,A)=>{var te,ye,ue;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((te=l.value)==null?void 0:te.filter(De=>(De==null?void 0:De.buttonName)!=="保存"),De=>{var Qe;return e.openBlock(),e.createElementBlock("div",null,[De.api!==""?(e.openBlock(),e.createBlock(e.unref(_o._sfc_main),{key:0,disabled:e.unref(O)===e.unref(b)&&!((Qe=De==null?void 0:De.buttonName)!=null&&Qe.includes("预览")),class:"calculator-content",modelValue:De.buttonName,onClickTrigger:ae=>e.unref(He)(De),loading:w.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ve)!==""&&((ue=e.unref(b))==null?void 0:ue[((ye=e.unref(b))==null?void 0:ye.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(_o._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ce,modelValue:"保存"})):e.createCommentVNode("",!0)]),c.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:x.value,onDestroy:Ae},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},yc=Rt._export_sfc(gc,[["__scopeId","data-v-11fca7e0"]]),bc={};function kc(a,l){return" 567 "}const xc=Rt._export_sfc(bc,[["render",kc]]),wc={class:"module content"},Cc={class:"module data"},Dc={class:"module layout"},_c={class:"form-content"},Ec=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),c=e.ref("create"),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),C=e.ref({}),w=e.ref([]),F=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:w.value},{key:"signConfig",contents:C.value}]}),R=K=>{var O;C.value=V.cloneDeep(K),r("change",(O=F())==null?void 0:O.compData)},H=K=>{var O,G;if((K==null?void 0:K.buttonName)==="确认"){const b=V.cloneDeep(K==null?void 0:K.content);switch(c.value){case"create":w.value.push({...b,index:((O=w.value)==null?void 0:O.length)+1});break}r("change",(G=F())==null?void 0:G.compData),d.visible=!1}else d.visible=!1},M=(K,O)=>{var G,b;switch(K){case"create":(G=f.value)==null||G.forEach(_=>{_.value=""}),c.value="create",d.visible=!0;break;case"update":(b=f.value)==null||b.forEach(_=>{_.value=O[_==null?void 0:_.prop]}),c.value="update",d.visible=!0;break;case"delete":w.value.splice(O,1),c.value="delete";break}},ve=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,K=>{var O,G;K&&(C.value=((O=K==null?void 0:K.find(b=>b.key==="signConfig"))==null?void 0:O.contents)??{},w.value=((G=K==null?void 0:K.find(b=>b.key==="signTypeList"))==null?void 0:G.contents)??[])},{immediate:!0}),(K,O)=>{const G=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",wc,[O[2]||(O[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(b,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=_=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(G,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[O[1]||(O[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(_,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(_==null?void 0:_.label),1),e.createElementVNode("div",null,[e.createVNode(b,{type:"primary",size:"small",onClick:T=>M("update",{..._,index:y+1})},{default:e.withCtx(()=>O[3]||(O[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(b,{type:"danger",size:"small",onClick:T=>M("delete",y)},{default:e.withCtx(()=>O[4]||(O[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Dc,[e.createVNode(Bt.ssForm,{rowContents:v.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:ve,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",_c,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Sc=Rt._export_sfc(Ec,[["__scopeId","data-v-487e0536"]]),Tc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const s=a,r=l,d=e.ref(1),c=e.computed(()=>{var F,R;return(F=s==null?void 0:s.stepConfig)!=null&&F.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),x=(F,R)=>{d.value=R,r("clickStep",F,R)},v=F=>Bt.getComponent(F),f=()=>{var R;const F=(R=s==null?void 0:s.stepList)==null?void 0:R.find((H,M)=>M+1===c.value);return console.log("findStep",F),F?F==null?void 0:F.children:[]},C=F=>{r("clickTrigger",F)},w=F=>{r("changeTrigger",F)};return(F,R)=>{var ve,K,O,G,b;const H=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(ve=a.stepConfig)==null?void 0:ve.direction,active:c.value,"finish-status":"success",simple:(K=a.stepConfig)==null?void 0:K.simple,"align-center":((O=a.stepConfig)==null?void 0:O.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(_,y)=>(e.openBlock(),e.createBlock(H,{key:y,class:"step-item",onClick:T=>x(_,y+1)},{title:e.withCtx(()=>[e.renderSlot(F.$slots,"title",{title:_==null?void 0:_.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(F.$slots,"description",{description:_==null?void 0:_.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(G=a.stepConfig)!=null&&G.allowTrigger&&((b=a.stepConfig)!=null&&b.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(_,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(_==null?void 0:_.type)),{modelValue:_.value,"onUpdate:modelValue":T=>_.value=T,onClickTrigger:C,onChangeTrigger:w,content:_==null?void 0:_.content},e.createSlots({_:2},[e.renderList(F.$slots,(T,h)=>({name:h,fn:e.withCtx(ce=>[e.renderSlot(F.$slots,h,e.mergeProps({ref_for:!0},ce||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Bc=Rt._export_sfc(Tc,[["__scopeId","data-v-d7c99969"]]),Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const s=a,r=l,d=e.ref({}),c=e.ref([]),x=(v,f)=>{r("clickStep",v,f)};return e.watch(()=>s==null?void 0:s.itemData,v=>{var f,C;c.value=(f=v==null?void 0:v.find(w=>(w==null?void 0:w.key)==="stepList"))==null?void 0:f.contents,d.value=(C=v==null?void 0:v.find(w=>(w==null?void 0:w.key)==="stepConfig"))==null?void 0:C.contents},{immediate:!0,deep:!0}),(v,f)=>{const C=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Bc,{stepConfig:d.value,stepList:c.value,onClickStep:x},{icon:e.withCtx(()=>[e.createVNode(C,{name:"import"})]),title:e.withCtx(({title:w})=>[e.createTextVNode(e.toDisplayString(w),1)]),description:e.withCtx(({description:w})=>[e.createTextVNode(e.toDisplayString(w),1)]),_:1},8,["stepConfig","stepList"])}}}),Nc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(c,x)=>(e.openBlock(),e.createBlock(r,{key:x,timestamp:c.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:c==null?void 0:c.content,timestamp:c==null?void 0:c.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ac=Rt._export_sfc(Nc,[["__scopeId","data-v-4172a886"]]),Vc={class:"line-content"},Oc={class:"line-time"},Mc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,s=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,d=>{var c,x;r.value=(c=d==null?void 0:d.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:c.contents,s.value=(x=d==null?void 0:d.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:x.contents},{immediate:!0}),(d,c)=>(e.openBlock(),e.createBlock(Ac,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:x,timestamp:v})=>[e.createElementVNode("span",Vc,e.toDisplayString(x),1),e.createElementVNode("span",Oc,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),zc=Rt._export_sfc(Mc,[["__scopeId","data-v-b4d9deed"]]),Fc={class:"tabs-content"},Rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const l=a,s=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,r=>{const d=r.find(c=>(c==null?void 0:c.key)=="stepList");d?s.value=d.contents.map(c=>({value:c.value||c.title,label:c.label||c.title,children:c.children||[]})):s.value=l==null?void 0:l.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Fc,[e.createVNode(Bt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Pc=Rt._export_sfc(Rc,[["__scopeId","data-v-40865f68"]]),Ga=xe.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}}}),Lc={class:"type-select"},$c=["onClick"],jc={class:"list-icon"},Uc={__name:"modelSelect",setup(a){const l=Ga(xe.pinia),{itemData:s}=xe.storeToRefs(l),r=d=>{const c=V.cloneDeep(s.value);c.push({comp:d.comp,name:d.name,compData:[]}),l.setItemData(c)};return(d,c)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Lc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ol),(v,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:C=>r(v)},[e.createElementVNode("div",jc,[e.createVNode(x,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,$c)]))),128))])}}},Kc=Rt._export_sfc(Uc,[["__scopeId","data-v-91799bf8"]]),Wc={class:"fill-content"},Hc={class:"operate-content"},qc={class:"collapse-title-content"},Gc={class:"collapse-title-item"},Xc={key:1},Yc=["onClick"],Jc={class:"icon-content"},Zc={key:0,class:"edit-content"},Qc=["onClick"],eu={class:"comp-child"},tu={__name:"modelFill",setup(a){const l=Ga(xe.pinia),{itemData:s,originalData:r}=xe.storeToRefs(l),d=e.ref([]);e.ref([]);const c=e.ref([]),x=e.ref([]),v=H=>{var ve;let M=(ve=V.cloneDeep(x.value))==null?void 0:ve.map((K,O)=>(H===O&&(K.content=!0),K));x.value=M},f=H=>{var ve;let M=(ve=V.cloneDeep(x.value))==null?void 0:ve.map((K,O)=>(H===O&&(K.content=!1),K));x.value=M,d.value=V.cloneDeep(s.value)},C=(H,M)=>{var G;let ve=(G=V.cloneDeep(x.value))==null?void 0:G.map((b,_)=>(H===_&&(b.content=!1),b));x.value=ve;const K=V.cloneDeep(s.value),O=K==null?void 0:K.filter((b,_)=>(_===H&&(b.name=M),b));l.setOriginalData(O),l.setItemData(O)};e.watch(()=>s.value,()=>{var H,M,ve;!s.value||((H=s.value)==null?void 0:H.length)===0?d.value=[]:d.value=(M=V.cloneDeep(s.value))==null?void 0:M.filter(K=>(K==null?void 0:K.comp)!=="methodButton"),c.value=d.value,x.value=(ve=V.cloneDeep(c.value))==null?void 0:ve.map((K,O)=>({id:O,content:!1}))},{deep:!0,immediate:!0});const w=H=>aa(H),F=(H,M,ve)=>{var O,G;if(!H)return;let K=V.cloneDeep(s.value);K=(O=K==null?void 0:K.map((b,_)=>(_===ve&&(b.compData=H),b)))==null?void 0:O.filter(b=>(b==null?void 0:b.comp)!=="methodButton"),x.value=(G=V.cloneDeep(K))==null?void 0:G.map((b,_)=>({id:_,content:!1})),l.setOriginalData(K),l.setItemData(K)},R=H=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=V.cloneDeep(s.value),ve=M==null?void 0:M.filter((K,O)=>O!==H);l.setOriginalData(ve),l.setItemData(ve),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(H,M)=>{const ve=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Wc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Hc,[e.createVNode(ur.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:K,index:O})=>{var G,b,_,y,T,h,ce,Ae,at,we;return[e.createElementVNode("div",qc,[e.createElementVNode("div",Gc,[(b=(G=x.value)==null?void 0:G.find(Pe=>Pe.id===O))!=null&&b.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:K.name&&K.name!==""?"8px":"0px"})},e.toDisplayString(K.name),5)),(y=(_=x.value)==null?void 0:_.find(Pe=>Pe.id===O))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",Xc,[e.createVNode(Bt._sfc_main$2,{modelValue:K.name,"onUpdate:modelValue":Pe=>K.name=Pe,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(h=(T=x.value)==null?void 0:T.find(Pe=>Pe.id===O))!=null&&h.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Pe=>v(O),["stop"]),class:"icon-content"},[e.createVNode(ve,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Yc))]),e.createElementVNode("div",Jc,[(Ae=(ce=x.value)==null?void 0:ce.find(Pe=>Pe.id===O))!=null&&Ae.content?(e.openBlock(),e.createElementBlock("div",Zc,[e.createVNode(ve,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Pe=>f(O),["stop"])},null,8,["onClick"]),e.createVNode(ve,{name:"Save",onClick:e.withModifiers(Pe=>C(O,K.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(we=(at=x.value)==null?void 0:at.find(Pe=>Pe.id===O))!=null&&we.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Pe=>R(O),["stop"]),class:"icon-content"},[e.createVNode(ve,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Qc))])])]}),content:e.withCtx(({item:K,index:O})=>{var G,b;return[e.createElementVNode("div",eu,[e.createTextVNode(e.toDisplayString(w(K.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(K.comp+"Operate")),{itemContents:K==null?void 0:K.compData,originalItemContents:(b=(G=c.value)==null?void 0:G.find((_,y)=>y===O))==null?void 0:b.compData,onChange:_=>F(_,K,O)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},nu=Rt._export_sfc(tu,[["__scopeId","data-v-a46a44b9"]]),au={key:0,class:"show-content"},ou={style:{display:"flex"}},ru={__name:"modelShow",setup(a){const l=Ga(xe.pinia),{itemData:s}=xe.storeToRefs(l),r=e.ref([]);e.watch(()=>s.value,()=>{var c;!s.value||((c=s.value)==null?void 0:c.length)===0?r.value=[]:r.value=V.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=c=>aa(c);return(c,x)=>{var v;return((v=r.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:C},[e.createElementVNode("div",ou,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:C},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},lu=Rt._export_sfc(ru,[["__scopeId","data-v-3f3e863e"]]),iu={class:"tabs-header"},su={class:"tabs-list"},cu={class:"tab-name"},uu={class:"tab-actions"},du=["onClick"],pu=["onClick"],fu=["onClick"],hu={class:"model-operate"},vu={class:"model-select",style:{display:"unset"}},mu={class:"existing-components"},gu={class:"component-list"},yu=["onClick"],bu={class:"component-info"},ku={class:"component-type"},xu={class:"component-name"},wu={class:"model-fill"},Cu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.ref([]),c=e.ref(!1),x=e.ref(""),v=e.ref({title:""}),f=e.ref(-1),C=e.ref(!1),w=e.ref(-1),F=e.ref(new WeakMap),R=e.ref(null),H=Ga(xe.pinia),{itemData:M}=xe.storeToRefs(H),ve=()=>{x.value="新增标签页",v.value.title="",f.value=-1,c.value=!0},K=X=>{x.value="修改标签页",v.value.title=d.value[X].title,f.value=X,c.value=!0},O=X=>{const A=_(X);F.value.delete(A),d.value.splice(X,1),ot()},G=()=>{if(v.value.title.trim()){if(f.value===-1){const X={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:b()};d.value.push(X)}else d.value[f.value].title=v.value.title,d.value[f.value].value=v.value.title,d.value[f.value].label=v.value.title;c.value=!1,ot()}},b=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,_=X=>{const A=d.value[X];return A.id||(A.id=b()),A.id},y=X=>{var ye;w.value=X;const A=_(X);R.value=V.cloneDeep(M.value);let te=F.value.get(A);!te&&((ye=d.value[X].children)==null?void 0:ye.length)>0&&(te=Ae(d.value[X].children)),te?H.setItemData(V.cloneDeep(te)):H.setItemData([]),C.value=!0},T=e.computed(()=>{const X=V.useModelComp(xe.pinia),A=xe.storeToRefs(X).itemData.value;return console.log("可用组件数据",A),!A||!Array.isArray(A)?[]:A.filter(te=>{var ye;if(te.comp==="Tabs"&&w.value>=0){const ue=_(w.value);if((ye=te.compData)==null?void 0:ye.some(Qe=>{var ae;return Qe.key==="stepList"&&((ae=Qe.contents)==null?void 0:ae.some(_e=>_e.id===ue))}))return!1}return!0})}),h=X=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[X]||X,ce=X=>{var A;try{const te=V.cloneDeep(X);te.id=Date.now()+Math.random(),te.comp==="Tabs"&&((A=te.compData)==null||A.forEach(ue=>{ue.key==="stepList"&&ue.contents&&ue.contents.forEach(De=>{De.id=b()})}));const ye=V.cloneDeep(M.value);ye.push(te),H.setItemData(ye)}catch(te){console.error("添加组件失败:",te)}},Ae=X=>X.map(A=>{var te;switch(A.type){case"form":return{comp:"Form",name:A.value||"表单",compData:at(A.content)};case"table":return{comp:"Table",name:A.value||"表格",compData:we(A.content)};default:return{comp:"Unknown",name:A.value||"",compData:((te=A.content)==null?void 0:te.originalData)||[]}}}),at=X=>{if(!X)return[];const A=[];return X.rowContents&&A.push({key:"formContent",contents:X.rowContents}),X.buttonValue&&A.push({key:"formButton",contents:X.buttonValue}),typeof X.isEnableWrap<"u"&&A.push({key:"enableWrap",contents:X.isEnableWrap}),A},we=X=>[],Pe=()=>{if(w.value>=0&&w.value<d.value.length){const X=_(w.value);F.value.set(X,V.cloneDeep(M.value)),d.value[w.value].children=re(M.value),console.log("保存后的数据",re(M.value))}C.value=!1,w.value=-1,R.value=null,ot()},Le=()=>{R.value&&H.setItemData(V.cloneDeep(R.value)),C.value=!1,w.value=-1,R.value=null},P=()=>{C.value&&Le()},re=X=>{if(!Array.isArray(X))throw new Error("sourceData must be an array");return X.map((A,te)=>{if(!A||typeof A!="object")return A;const{comp:ye,name:ue,compData:De}=A;switch(ye){case"Form":return{type:"form",content:ne(De||[]),value:"表单"};case"Table":return{type:"table",content:pe(De||[]),value:"表格"};default:return{type:"xxx",content:He(De||[]),value:""}}})},ne=X=>{const A={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},te={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return X.forEach((ye,ue)=>{if(!ye||typeof ye!="object"){console.warn(`Invalid config at index ${ue}:`,ye);return}const{key:De,contents:Qe}=ye,ae=te[De];if(!ae){console.warn(`Unknown Form config key: ${De}`);return}De==="enableWrap"?A[ae]=!!Qe:A[ae]=Array.isArray(Qe)?Qe:[]}),A},pe=X=>{const A={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},te={header:"columns",tableContents:"tableData"};return X.forEach((ye,ue)=>{if(!ye||typeof ye!="object"){console.warn(`Invalid config at index ${ue}:`,ye);return}const{key:De,contents:Qe}=ye,ae=te[De];if(!ae){console.warn(`Unknown Table config key: ${De}`);return}A[ae]=Array.isArray(Qe)?Qe:[]}),A},He=X=>(console.log("Default conversion logic - to be implemented"),{originalData:X,processed:!1,componentType:"unknown"}),ot=()=>{const X=[{key:"stepList",contents:d.value}];r("change",X)};return e.watch(()=>s.itemContents,X=>{if(X&&X.length>0){const A=X.find(te=>te.key==="stepList");A&&A.contents&&(d.value=A.contents.map(te=>({title:te.title||"",value:te.value||te.title||"",label:te.label||te.title||"",children:te.children||[],id:te.id||b()})))}},{immediate:!0,deep:!0}),(X,A)=>{const te=e.resolveComponent("svg-icon"),ye=e.resolveComponent("el-input"),ue=e.resolveComponent("el-form-item"),De=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",iu,[A[6]||(A[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ve},[e.createVNode(te,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),A[5]||(A[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Qe,ae)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ae},[e.createElementVNode("span",cu,e.toDisplayString(Qe.title),1),e.createElementVNode("div",uu,[e.createElementVNode("button",{onClick:_e=>K(ae)},"修改标题",8,du),e.createElementVNode("button",{onClick:_e=>y(ae)},"布局调整",8,pu),e.createElementVNode("button",{onClick:_e=>O(ae)},"删除",8,fu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:c.value,"onUpdate:modelValue":A[2]||(A[2]=Qe=>c.value=Qe),title:x.value,onBeforeDestroy:A[3]||(A[3]=Qe=>c.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:A[1]||(A[1]=Qe=>c.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:G},"确定")]),default:e.withCtx(()=>[e.createVNode(De,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ue,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ye,{modelValue:v.value.title,"onUpdate:modelValue":A[0]||(A[0]=Qe=>v.value.title=Qe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:C.value,"onUpdate:modelValue":A[4]||(A[4]=Qe=>C.value=Qe),title:"布局调整",fullScreen:"",onBeforeDestroy:P},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Le},"取消"),e.createElementVNode("button",{onClick:Pe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",hu,[e.createElementVNode("div",vu,[e.createVNode(Kc),e.createElementVNode("div",mu,[A[8]||(A[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",gu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,Qe=>(e.openBlock(),e.createElementBlock("div",{key:Qe.id,class:"component-item",onClick:ae=>ce(Qe)},[e.createElementVNode("div",bu,[e.createElementVNode("span",ku,e.toDisplayString(h(Qe.comp)),1),e.createElementVNode("span",xu,e.toDisplayString(Qe.name),1)]),A[7]||(A[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,yu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:X.innerWidth},[e.createVNode(lu)])),e.createElementVNode("div",wu,[e.createVNode(nu)])])]),_:1},8,["modelValue"])])}}},Du=Rt._export_sfc(Cu,[["__scopeId","data-v-9096ed0d"]]);function _u(){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 Eu(a){return{type:"line",...a}}function Su(){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 Tu(a){return{type:"bar",barWidth:"60%",...a}}function Bu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Iu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const _n={line:{initBaseoptions:_u,initSeries:Eu},bar:{initBaseoptions:Su,initSeries:Tu},pie:{initBaseoptions:Bu,initSeries:Iu}},No=V.useMenuState(xe.pinia),kr=(a,l)=>{var w;const s=[],r=[],{group:d,nameCol:c,valueCol:x}=l||{},v=a==null?void 0:a.find(F=>{const{name:R}=F;return R===d});if(!v)return{names:s,values:r};const f=(w=v==null?void 0:v.compData)==null?void 0:w.find(F=>{const{key:R}=F;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(F=>{const R=F==null?void 0:F[0];let H=!1;xe.isObject(R)&&(R!=null&&R.id)&&(H=!0);let M=c,ve=x;H&&(M=M+1,ve=ve+1);const K=F==null?void 0:F[M],O=F==null?void 0:F[ve];s.push(K),r.push(O)}),{names:s,values:r}},Nu=async a=>{const{menu:l,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:c,isSelfDetail:x}=a||{};let v=null;const f=sessionStorage.getItem("systemKey");if(x&&No.activeMenuPath&&(v=await Ne.getItemData(`${No.activeMenuPath}`,f,"")),!x){const C=l==null?void 0:l.join("/");v=await Ne.getItemData(`${C}^${s}`,f,"")}return kr(v,{group:r,nameCol:d,valueCol:c})},Au=async a=>{const{menu:l,group:s,nameCol:r,valueCol:d}=a||{},c=l==null?void 0:l.join("/"),x=sessionStorage.getItem("systemKey"),v=await Ne.getItemData(c,x,"");return kr(v,{group:s,nameCol:r,valueCol:d})},po=async(a,l)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:c,valueCol:x}=a||{};if(!r.length||!d)return s;const{mainKey:v,group:f,nameCol:C,valueCol:w,isSelfDetail:F}=l||{};return v&&f&&Bt.isNumber(C)&&Bt.isNumber(w)?await Nu({menu:r,mainKey:v,detailGroup:f,detailNameCol:C,detailValueCol:w,isSelfDetail:F}):Bt.isNumber(c)&&Bt.isNumber(x)?await Au({menu:r,group:d,nameCol:c,valueCol:x}):s},Vu=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=a||{},c=_n==null?void 0:_n[r];if(!c)return;const{initBaseoptions:x,initSeries:v}=c,f=x();f.title.text=d??"";const{names:C,values:w}=await po(l,s);if(!C||!w)return f;f.xAxis.data=C;const F=v({data:w});return f.series.push(F),f},Ou=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=a||{},c=_n==null?void 0:_n[r];if(!c)return;const{initBaseoptions:x,initSeries:v}=c,f=x();f.title.text=d??"";const{names:C,values:w}=await po(l,s);if(!C||!w)return f;f.xAxis.data=C;const F=v({data:w});return f.series.push(F),f},Mu=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:s})=>{const{type:r,title:d}=a||{},c=_n==null?void 0:_n[r];if(!c)return;const{initBaseoptions:x,initSeries:v}=c,f=x();f.title.text=d??"";const{names:C,values:w}=await po(l,s);if(!C||!w)return f;const F=[];for(let H=0;H<C.length;H++){const M=C[H],ve=w[H];F.push({name:M,value:ve})}const R=v({data:F});return f.series.push(R),f},zu=async(a=[])=>{var x,v,f;const l=((x=a==null?void 0:a.find(C=>C.key==="chartBaseConfig"))==null?void 0:x.contents)??{},s=((v=a==null?void 0:a.find(C=>C.key==="chartDataConfig"))==null?void 0:v.contents)??{},r=((f=a==null?void 0:a.find(C=>C.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=l;let c={};return d==="line"&&(c=await Vu({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(c=await Ou({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(c=await Mu({chartBaseConfig:l,chartDataConfig:s,chartDetailConfig:r})),c},Fu=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 l=a,s=e.ref({});e.onMounted(async()=>{const d=l==null?void 0:l.itemData;s.value=await zu(d)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(d,c)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Ru=Rt._export_sfc(Fu,[["__scopeId","data-v-d4c081e8"]]),Pu={class:"chart-module layout"},Lu={class:"chart-module content"},$u={class:"chart-module content"},ju={class:"form-content"},Uu={class:"dialog-footer"},Ku={class:"form-content"},Wu={class:"dialog-footer"},Hu={class:"form-content"},qu={class:"dialog-footer"},Gu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),c=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:""}],v=e.ref({}),f=()=>{var le;c.value=x(),(le=c.value)==null||le.forEach(Q=>{var Ee;const se=Q==null?void 0:Q.prop;Q.value=(Ee=v==null?void 0:v.value)==null?void 0:Ee[se]}),d.visible=!0},C=le=>{v.value=le},w=()=>{var le;d.visible=!1,r("change",(le=Ye())==null?void 0:le.compData)},F=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=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:[]}],M=e.ref({}),ve=()=>{const le=R.value,Q=V.cloneDeep(le);return Q==null||Q.forEach(se=>{var qe;const Ee=se==null?void 0:se.prop;se.value=(qe=M.value)==null?void 0:qe[Ee]}),Q},K=le=>{var se;M.value=le;const Q=ve();R.value=Q,r("change",(se=Ye())==null?void 0:se.compData)},O=async()=>{const le=await Ne.getMenusContent(),Q=ve();Q==null||Q.forEach(se=>{(se==null?void 0:se.prop)==="menu"&&(se.contents=le)}),R.value=Q,F.visible=!0,await Qe(M.value.menu),await I(M.value.group)},G=e.reactive({visible:!1,width:"840",title:"详情页配置"}),b=e.ref([]),_=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),T=()=>{const le=b.value,Q=V.cloneDeep(le);return Q==null||Q.forEach(se=>{var qe;const Ee=se==null?void 0:se.prop;se.value=(qe=y.value)==null?void 0:qe[Ee]}),Q},h=le=>{var se;y.value=le;const Q=T();b.value=Q,r("change",(se=Ye())==null?void 0:se.compData)},ce=async()=>{await P();const le=V.cloneDeep(Ae.value),Q=T();Q==null||Q.forEach(se=>{var qe;const Ee=se==null?void 0:se.prop;se.value=(qe=y==null?void 0:y.value)==null?void 0:qe[Ee],Ee==="mainKey"&&(se.contents=le)}),b.value=Q,G.visible=!0},Ae=e.ref([]),at=e.ref([]),we=e.ref({}),Pe=e.ref({}),Le=()=>{const{compData:le}=ye.value||{},Q=le==null?void 0:le.find(U=>{const{key:J}=U;return J==="header"}),se=(Q==null?void 0:Q.contents)||[],Ee=se==null?void 0:se.filter((U,J)=>{const{label:D}=U;return D!=="操作"}),qe=Ee==null?void 0:Ee.findIndex((U,J)=>{const{isMainKey:D}=U;return D});if(qe<0)return[];const dt=le==null?void 0:le.find(U=>{const{key:J}=U;return J==="tableContents"}),m=(dt==null?void 0:dt.contents)||[];return m==null?void 0:m.map(U=>{const J=U==null?void 0:U[0];let D=qe;xe.isObject(J)&&(J!=null&&J.id)&&(D=D+1);const oe=U==null?void 0:U[D];return{label:oe,value:oe}})},P=async()=>{const le=await Le();Ae.value=le},re=async le=>{const Q=sessionStorage.getItem("systemKey");return await Ne.getItemData(le,Q,"")},ne=async le=>{const Q=le;at.value=Q==null?void 0:Q.map(se=>{const{name:Ee}=se;return we.value[Ee]=se,{label:Ee,value:Ee}})},pe=le=>{const{comp:Q,compData:se}=Pe.value||{};if(Q==="Table"){let Ee=T();Ee=Ee.filter(qe=>{const{prop:dt}=qe;return dt!=="formItems"}),ae(Ee,se),b.value=Ee}},He=async()=>{var se,Ee;const le=(se=y==null?void 0:y.value)==null?void 0:se.mainKey,Q=(Ee=M==null?void 0:M.value)==null?void 0:Ee.menu;if(le){const dt=`${Q==null?void 0:Q.join("/")}^${le}`,m=await re(dt);await ne(m);const S=T();S==null||S.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=at.value)}),b.value=S}};e.watch(()=>{var le;return(le=y==null?void 0:y.value)==null?void 0:le.mainKey},async(le,Q)=>{le!=Q&&le&&await He()});const ot=async le=>{const Q=we.value[le];Pe.value=Q,await pe()};e.watch(()=>{var le;return(le=y==null?void 0:y.value)==null?void 0:le.group},async(le,Q)=>{le!=Q&&le&&ot(le)});const X=async()=>{var Q;await He();const le=(Q=y.value)==null?void 0:Q.group;await ot(le)},A=e.ref([]),te=e.ref({}),ye=e.ref({}),ue=async le=>{const Q=le==null?void 0:le.join("/"),se=sessionStorage.getItem("systemKey");return await Ne.getItemData(Q,se,"")},De=async le=>{const Q=await ue(le);A.value=Q==null?void 0:Q.map(se=>{const{name:Ee}=se;return te.value[Ee]=se,{label:Ee,value:Ee}})},Qe=async(le,Q)=>{await De(le);const se=ve();se==null||se.forEach(Ee=>{(Ee==null?void 0:Ee.prop)==="group"&&(Ee.contents=A.value)}),R.value=se};e.watch(()=>{var le;return(le=M==null?void 0:M.value)==null?void 0:le.menu},async(le,Q)=>{const se=le==null?void 0:le.join("/"),Ee=Q==null?void 0:Q.join("/");se!=Ee&&await Qe(le)});const ae=(le,Q)=>{const se=Q==null?void 0:Q.find(m=>{const{key:S}=m;return S==="header"}),Ee=(se==null?void 0:se.contents)||[],qe=Ee==null?void 0:Ee.filter((m,S)=>{const{label:U}=m;return U!=="操作"}),dt=qe==null?void 0:qe.map((m,S)=>{const{label:U}=m;return{label:U,value:S}});le==null||le.forEach(m=>{const S=m==null?void 0:m.prop;(S==="nameCol"||S==="valueCol")&&(m.contents=dt)})},_e=le=>{const{comp:Q,compData:se}=ye.value||{};if(Q==="Table"){M.value.formItems=[];let Ee=ve();Ee=Ee.filter(qe=>{const{prop:dt}=qe;return dt!=="formItems"}),ae(Ee,se),R.value=Ee}},I=async le=>{const Q=te.value[le];ye.value=Q,await _e()};e.watch(()=>{var le;return(le=M==null?void 0:M.value)==null?void 0:le.group},async(le,Q)=>{le!=Q&&I(le)});const Xe=async()=>{var se,Ee;const le=(se=M.value)==null?void 0:se.menu;await Qe(le);const Q=(Ee=M.value)==null?void 0:Ee.group;await I(Q)},Ye=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:y.value}]}),Ie=()=>{d.visible=!1,F.visible=!1,G.visible=!1};return e.onMounted(async()=>{var Q,se,Ee;R.value=H(),b.value=_();const le=s==null?void 0:s.itemContents;v.value=((Q=le==null?void 0:le.find(qe=>qe.key==="chartBaseConfig"))==null?void 0:Q.contents)??{},M.value=((se=le==null?void 0:le.find(qe=>qe.key==="chartDataConfig"))==null?void 0:se.contents)??{},await Xe(),y.value=((Ee=le==null?void 0:le.find(qe=>qe.key==="chartDetailConfig"))==null?void 0:Ee.contents)??{},await X()}),(le,Q)=>{const se=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Pu,[Q[4]||(Q[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[0]||(Q[0]=Ee=>f())},{default:e.withCtx(()=>Q[3]||(Q[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Lu,[Q[6]||(Q[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[1]||(Q[1]=Ee=>O())},{default:e.withCtx(()=>Q[5]||(Q[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",$u,[Q[8]||(Q[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(se,{id:"themeButton",onClick:Q[2]||(Q[2]=Ee=>ce())},{default:e.withCtx(()=>Q[7]||(Q[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:Ie,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",ju,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:C},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(se,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>Q[9]||(Q[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(se,{class:"ok-button button",onClick:w,id:"themeButton"},{default:e.withCtx(()=>Q[10]||(Q[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:F.visible,title:F.title,onBeforeDestroy:Ie,width:F.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ku,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:K},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wu,[e.createVNode(se,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>Q[11]||(Q[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(se,{class:"ok-button button",onClick:Ie,id:"themeButton"},{default:e.withCtx(()=>Q[12]||(Q[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:G.visible,title:G.title,onBeforeDestroy:Ie,width:G.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:h},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",qu,[e.createVNode(se,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>Q[13]||(Q[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(se,{class:"ok-button button",onClick:Ie,id:"themeButton"},{default:e.withCtx(()=>Q[14]||(Q[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Xu=Rt._export_sfc(Gu,[["__scopeId","data-v-fe119645"]]),Yu=(a,l)=>{let s;a.replaceAll(" ",`\r
2
2
  `).replaceAll(`
3
3
  `,`\r
4
4
  `).includes(`\r
@@ -8,4 +8,4 @@
8
8
  `).split(`\r
9
9
  `).filter(c=>c.trim()!==""):s=a.replaceAll(" ",`\r
10
10
  `).split(`
11
- `).filter(c=>c.trim()!==""),s=s==null?void 0:s.map(c=>(c=c==null?void 0:c.replaceAll("\r",""),c));const r=[];let d="";for(const c of s)c.includes("{")||d.includes("{")||c.includes("[")||d.includes("[")||c.includes("【")||d.includes("【")||c.includes("(")||d.includes("(")||c.includes("(")||d.includes("(")||c.includes("/*")||d.includes("/*")?(d+=c.trim(),d.split("{").length-1===d.split("}").length-1&&d.split("【").length-1===d.split("】").length-1&&d.split("[").length-1===d.split("]").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("/*").length-1===d.split("*/").length-1&&!(l!=null&&l.find(x=>x===d[d.length-1]))?(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""):d!=null&&d.includes("*/")&&(d=d.replace(/\/\*[\s\S]*?\*\//g,""))):l!=null&&l.find(x=>x===c[c.length-1])?d+=c.trim():r.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return r},fo=(a,l)=>{let s=a;const r=[];let d="",c=0;for(const x of s)c++,x.includes("{")||d.includes("{")||x.includes("[")||d.includes("[")||x.includes("【")||d.includes("【")||x.includes("(")||d.includes("(")||x.includes("(")||d.includes("(")||x.includes("/*")||d.includes("/*")?(d+=x.trim(),d.split("{").length-1===d.split("}").length-1&&d.split("【").length-1===d.split("】").length-1&&d.split("[").length-1===d.split("]").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("/*").length-1===d.split("*/").length-1&&d[d.length-1]===l?(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""):c===(a==null?void 0:a.length)&&(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d="")):(d+=x.trim(),(d==null?void 0:d[(d==null?void 0:d.length)-1])===l&&(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""));return(d==null?void 0:d.length)!==0&&r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),r},Ju=(a,l)=>a===l||a.length===l.length&&a.every((s,r)=>s===l[r]),Zu=a=>a.reduce((l,s)=>{var d;const r=(((d=l.at(-1))==null?void 0:d.total)??0)+s;return l.push({key:s,total:r}),l},[]),Qu=a=>{for(let l=a.length-1;l>0;l--){const s=Math.floor(Math.random()*(l+1));[a[l],a[s]]=[a[s],a[l]]}return a};let qt="$R";const ed=Ne.useUnit(xe.pinia),{chooseTitle:ia}=xe.storeToRefs(ed),da=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@ProButton",value:"onButtonContents",order:1},{key:"@PamButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@Related",value:"onRelated",order:1}],td=a=>{var s;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(s=a==null?void 0:a.contents)==null?void 0:s.map(r=>{var d;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(d=r.contents)==null?void 0:d.slice(0,parseInt(a==null?void 0:a.filter))),r})},nd=a=>{var l;return(a==null?void 0:a.filter)==="Random"?(l=a==null?void 0:a.contents)==null?void 0:l.map(r=>((r==null?void 0:r.key)==="tableContents"&&(r.contents=Qu(r.contents)),r)):a==null?void 0:a.contents},ad=a=>{var r,d,c,x,v;let l=(c=(d=(r=a==null?void 0:a.filter)==null?void 0:r.replace("*",""))==null?void 0:d.replaceAll("{",""))==null?void 0:c.replaceAll("}","");if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let s=Ne.calculatorAndToOr(l);if((s==null?void 0:s.length)>0){let f=[];return s==null||s.forEach(w=>{let F={};for(let R in w){let H=R;H!=null&&H.includes("[")||(F[H]=w[R])}f.push(F)}),(v=(x=V.cloneDeep(a))==null?void 0:x.contents)==null?void 0:v.map(w=>{var R,H,M,ve;let F=(M=(H=(R=V.cloneDeep(a))==null?void 0:R.contents)==null?void 0:H.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:M.contents;if(F=(ve=Ne.getEqualChild(F))==null?void 0:ve.filter(K=>(K==null?void 0:K.label)!=="操作"),(w==null?void 0:w.key)==="tableContents"){let O=Ne.tableToForm(w==null?void 0:w.contents,F);f==null||f.forEach(G=>{var b,_;for(let y in G)!((b=O==null?void 0:O[0])!=null&&b.find(T=>{var h;return(T==null?void 0:T.key)===y||((h=T==null?void 0:T.key)==null?void 0:h.includes(y))}))&&!(O!=null&&O.find(T=>{var h;return(T==null?void 0:T.key)===y||((h=T==null?void 0:T.key)==null?void 0:h.includes(y))}))||(((_=G[y])==null?void 0:_[0])!=="!"?O=O==null?void 0:O.filter(T=>{var h,ce;return((h=T==null?void 0:T.find(Ae=>{var at;return(Ae==null?void 0:Ae.key)===y||((at=Ae==null?void 0:Ae.key)==null?void 0:at.includes(y))}))==null?void 0:h.value)===G[y]&&!Array.isArray(G==null?void 0:G[y])||Array.isArray(G==null?void 0:G[y])&&((ce=G==null?void 0:G[y])==null?void 0:ce.find(Ae=>{var at;return((at=T==null?void 0:T.find(we=>{var Pe;return(we==null?void 0:we.key)===y||((Pe=we==null?void 0:we.key)==null?void 0:Pe.includes(y))}))==null?void 0:at.value)===Ae}))}):O=O==null?void 0:O.filter(T=>{var h;return((h=T==null?void 0:T.find(ce=>{var Ae;return(ce==null?void 0:ce.key)===y||((Ae=ce==null?void 0:ce.key)==null?void 0:Ae.includes(y))}))==null?void 0:h.value)!==G[y]}))}),(O==null?void 0:O.length)===0?w.contents=[]:w.contents=O==null?void 0:O.map(G=>{let b={};return G==null||G.forEach(_=>{b[_==null?void 0:_.key]=_==null?void 0:_.value}),b})}return w})}return a==null?void 0:a.contents},od=a=>a==null?void 0:a.contents,rd=a=>a==null?void 0:a.contents,ld=a=>a==null?void 0:a.contents,id=a=>a==null?void 0:a.contents,sd=a=>a==null?void 0:a.contents,cd=a=>a==null?void 0:a.contents,ud=async a=>{var l,s,r,d,c,x,v,f,C,w,F;if((a==null?void 0:a.filter)==="true"){let R=await Xa((s=(l=ia==null?void 0:ia.value)==null?void 0:l[0])==null?void 0:s.parentContent,!1),H=(d=(r=ia==null?void 0:ia.value)==null?void 0:r[0])==null?void 0:d.value;R=(c=R==null?void 0:R[0])==null?void 0:c.compData;let M=(x=R==null?void 0:R.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:x.contents;M=((v=M==null?void 0:M.find(O=>O==null?void 0:O.isMainKey))==null?void 0:v.prop)??((f=M==null?void 0:M[0])==null?void 0:f.prop);let ve=(w=(C=R==null?void 0:R.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:C.contents)==null?void 0:w.find(O=>(O==null?void 0:O[M])===H);return(F=a==null?void 0:a.contents)==null?void 0:F.map(O=>{var G;return(O==null?void 0:O.key)==="formContent"&&(O.contents=(G=O.contents)==null?void 0:G.map(b=>(b.value=ve==null?void 0:ve[b==null?void 0:b.prop],b))),O})}return a==null?void 0:a.contents},xr={onNumSlice:td,onRandomContents:nd,onConditionContents:ad,onFatherPaceContents:od,onPaceContents:rd,onMainTagContents:ld,onButtonContents:id,onPamButtonContents:sd,onRowButtonContents:cd,onRelated:ud},dd=async a=>{var d,c,x,v,f,C,w,F,R,H,M,ve,K,O,G,b,_,y,T;let l="";if(((d=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="filter"))==null?void 0:d.contents)!==""&&(l=(c=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="filter"))==null?void 0:c.contents),l===""||!l)return a;(l==null?void 0:l[0])==="("?l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1):(l=(v=(x=l==null?void 0:l.replace("(",qt))==null?void 0:x.split(qt))==null?void 0:v[1],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1));let s=(f=fo(l,","))==null?void 0:f.map(h=>((h==null?void 0:h[(h==null?void 0:h.length)-1])===","&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),h!=null&&h.includes("(")||(h=h==null?void 0:h.replaceAll(":","=")),h)),r=a;for(let h in s){let ce,Ae="";(C=s==null?void 0:s[h])!=null&&C.includes("(")?(ce=(R=(F=(w=s==null?void 0:s[h])==null?void 0:w.replace("(",qt))==null?void 0:F.split(qt))==null?void 0:R[0],Ae="("+((ve=(M=(H=s==null?void 0:s[h])==null?void 0:H.replace("(",qt))==null?void 0:M.split(qt))==null?void 0:ve[1])):(ce=(G=(O=(K=s==null?void 0:s[h])==null?void 0:K.replace("=",qt))==null?void 0:O.split(qt))==null?void 0:G[0],Ae=(y=(_=(b=s==null?void 0:s[h])==null?void 0:b.replace("=",qt))==null?void 0:_.split(qt))==null?void 0:y[1]);let at=(T=da==null?void 0:da.find(we=>(we==null?void 0:we.key)===ce))==null?void 0:T.value;if(at){const we=xr[at];await new Function("return ")(),r=we({contents:r,filter:Ae})}}return r},pd=async a=>{var d,c,x,v,f,C,w,F,R,H,M,ve,K,O,G,b,_,y,T;let l="";if(((d=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="filter"))==null?void 0:d.contents)!==""&&(l=(c=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="filter"))==null?void 0:c.contents),l==="")return a;(l==null?void 0:l[0])==="("?l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1):(l=(v=(x=l==null?void 0:l.replace("(",qt))==null?void 0:x.split(qt))==null?void 0:v[1],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1));let s=(f=fo(l,","))==null?void 0:f.map(h=>((h==null?void 0:h[(h==null?void 0:h.length)-1])===","&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),h!=null&&h.includes("(")||(h=h==null?void 0:h.replaceAll(":","=")),h)),r=a;for(let h in s){let ce,Ae="";(C=s==null?void 0:s[h])!=null&&C.includes("(")?(ce=(R=(F=(w=s==null?void 0:s[h])==null?void 0:w.replace("(",qt))==null?void 0:F.split(qt))==null?void 0:R[0],Ae="("+((ve=(M=(H=s==null?void 0:s[h])==null?void 0:H.replace("(",qt))==null?void 0:M.split(qt))==null?void 0:ve[1])):(ce=(G=(O=(K=s==null?void 0:s[h])==null?void 0:K.replace("=",qt))==null?void 0:O.split(qt))==null?void 0:G[0],Ae=(y=(_=(b=s==null?void 0:s[h])==null?void 0:b.replace("=",qt))==null?void 0:_.split(qt))==null?void 0:y[1]);let at=(T=da==null?void 0:da.find(we=>(we==null?void 0:we.key)===ce))==null?void 0:T.value;if(at){const we=xr[at];await new Function("return ")(),r=we({contents:r,filter:Ae})}}return r},fd=V.useLoginState(xe.pinia),{loginUserInfo:Dn}=xe.storeToRefs(fd),hd=V.useMenuState(xe.pinia),{activeMenuPath:Ao}=xe.storeToRefs(hd),ro=Ne.useUnit(xe.pinia),{selectTitle:eo}=xe.storeToRefs(ro),vd=async(a,l)=>{var x,v,f,C,w,F,R,H,M,ve,K,O,G;let s=Ao.value,r="",d=((x=eo==null?void 0:eo.value)==null?void 0:x.find(b=>(b==null?void 0:b.condition)==="child"))??void 0;ro.setSelectTitle([]),(a==null?void 0:a.length)===0||(s=l?s:(v=a==null?void 0:a[0])==null?void 0:v.object_name,r=(f=a==null?void 0:a[0])==null?void 0:f.father_name);let c=[];if(r!==""){let b=r;(b==null?void 0:b[(b==null?void 0:b.length)-1])==="/"&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1));let _=await Xa(b,!1);_=(C=_==null?void 0:_[0])==null?void 0:C.compData;let y=(w=_==null?void 0:_.find(h=>(h==null?void 0:h.key)==="header"))==null?void 0:w.contents;y=((F=y==null?void 0:y.find(h=>h==null?void 0:h.isMainKey))==null?void 0:F.prop)??((R=y==null?void 0:y[0])==null?void 0:R.prop);let T=(M=(H=_==null?void 0:_.find(h=>(h==null?void 0:h.key)==="tableContents"))==null?void 0:H.contents)==null?void 0:M.map(h=>({label:h==null?void 0:h[y],value:h==null?void 0:h[y]}));c=(ve=r==null?void 0:r.split("/"))==null?void 0:ve.map(h=>(h===""?d?(d.isShow=!0,h=d):h={value:h,condition:"child",options:T,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:h={condition:"parent",value:h.trim(),isShow:!0},h))}if(s!==""){let b=(K=s==null?void 0:s.split("/"))==null?void 0:K.map(_=>(_={condition:"normal",value:_.trim(),isShow:!0},_));((O=b==null?void 0:b[0])==null?void 0:O.value)===((G=c==null?void 0:c[0])==null?void 0:G.value)&&(b=b==null?void 0:b.filter((_,y)=>y!==0)),c=[...c,...b]}r===""&&d&&((d==null?void 0:d.parentContent)!==Ao.value&&(d.isShow=!1),(d==null?void 0:d.value)!==""&&c.push(d)),ro.setSelectTitle(c)},Vo=async a=>{let l=[],s=a==null?void 0:a.map(async r=>{var v,f,C,w,F,R,H,M,ve,K,O,G,b,_,y,T,h,ce,Ae,at,we,Pe,Le,P,re,ne,pe,He,ot,X;let d=(w=(C=(f=(v=r==null?void 0:r.contents)==null?void 0:v.find(A=>{var te;return(te=A==null?void 0:A.key)==null?void 0:te.includes("struct")}))==null?void 0:f.value)==null?void 0:C[0])==null?void 0:w.类型,c=Object.values(r==null?void 0:r.name);c=c==null?void 0:c.reverse();let x={comp:d,isShow:!0,name:c==null?void 0:c[0],id:r==null?void 0:r.object_id};for(let A in c)parseInt(A)>=1&&(x[`name${parseInt(A)-1}`]=c[A]);if(d==="Table"){let A=(F=r==null?void 0:r.contents)==null?void 0:F.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("content")}),te=[];A.value=(R=A==null?void 0:A.value)==null?void 0:R.sort((ue,De)=>parseInt(ue)-parseInt(De)),te.push({key:"tableContents",contents:A==null?void 0:A.value});let ye=(O=(K=(ve=(M=(H=r==null?void 0:r.contents)==null?void 0:H.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("struct")}))==null?void 0:M.value)==null?void 0:ve[0])==null?void 0:K.结构)==null?void 0:O.contents;te.push({key:"header",contents:ye}),te.push({key:"filter",contents:(T=(y=(_=(b=(G=r==null?void 0:r.contents)==null?void 0:G.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("struct")}))==null?void 0:b.value)==null?void 0:_[0])==null?void 0:y.引用)==null?void 0:T.contents}),x.compData=await pd(te)}else if(d==="Form"){let A=[],te=(Ae=(ce=(h=r==null?void 0:r.contents)==null?void 0:h.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("content")}))==null?void 0:ce.value)==null?void 0:Ae[0],ye=(re=(P=(Le=(Pe=(we=(at=r==null?void 0:r.contents)==null?void 0:at.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("struct")}))==null?void 0:we.value)==null?void 0:Pe[0])==null?void 0:Le.结构)==null?void 0:P.contents)==null?void 0:re.map(ue=>(ue.value=te==null?void 0:te[ue==null?void 0:ue.prop],ue));A.push({key:"filter",contents:(X=(ot=(He=(pe=(ne=r==null?void 0:r.contents)==null?void 0:ne.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("struct")}))==null?void 0:pe.value)==null?void 0:He[0])==null?void 0:ot.引用)==null?void 0:X.contents}),A.push({key:"formContent",contents:ye}),x.compData=await dd(A)}return x});return l=await Promise.all(s),l},Xa=async(a,l,s={})=>{var x,v,f,C,w,F,R,H,M,ve,K;let r=await ua.getPageDataApi({platId:parseInt((x=Dn==null?void 0:Dn.value)==null?void 0:x.plat_id),pageName:a}),d=(v=r==null?void 0:r.data)==null?void 0:v.result;if((d==null?void 0:d.length)===0&&(s!=null&&s.originPath)&&(s==null?void 0:s.originPath)!==a){let O=await ua.getPageDataApi({platId:parseInt((f=Dn==null?void 0:Dn.value)==null?void 0:f.plat_id),pageName:s==null?void 0:s.originPath});if(((w=(C=O==null?void 0:O.data)==null?void 0:C.result)==null?void 0:w.length)>0){let G=await Vo((F=O==null?void 0:O.data)==null?void 0:F.result);G=G==null?void 0:G.map(_=>{var h,ce,Ae,at,we,Pe,Le,P,re,ne,pe,He,ot,X,A;let y=[],T=(h=Object.keys(_))==null?void 0:h.filter(te=>te==null?void 0:te.includes("name"));for(let te in _)T!=null&&T.find(ye=>ye===te)&&y.push(_==null?void 0:_[te]);if(y=y.reverse(),(_==null?void 0:_.comp)==="Table")_={filter:(Ae=(ce=_==null?void 0:_.compData)==null?void 0:ce.find(te=>(te==null?void 0:te.key)==="filter"))==null?void 0:Ae.contents,key:_==null?void 0:_.comp,name:y,tableColumns:(we=(at=_==null?void 0:_.compData)==null?void 0:at.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:we.contents,tableContents:(Le=(Pe=_==null?void 0:_.compData)==null?void 0:Pe.find(te=>(te==null?void 0:te.key)==="tableContents"))==null?void 0:Le.contents};else{let te=(ne=(re=(P=_==null?void 0:_.compData)==null?void 0:P.find(ue=>(ue==null?void 0:ue.key)==="formContent"))==null?void 0:re.contents)==null?void 0:ne.map(ue=>(ue==null?void 0:ue.value)??"");te=[te];let ye=(ot=(He=(pe=_==null?void 0:_.compData)==null?void 0:pe.find(ue=>(ue==null?void 0:ue.key)==="formContent"))==null?void 0:He.contents)==null?void 0:ot.map(ue=>(ue.value="",ue));_={contents:te,filter:(A=(X=_==null?void 0:_.compData)==null?void 0:X.find(ue=>(ue==null?void 0:ue.key)==="filter"))==null?void 0:A.contents,key:_==null?void 0:_.comp,name:y,value:ye}}return _});let b=[{key:"menuPath",contents:[{path:a,fatherPath:(M=(H=(R=O==null?void 0:O.data)==null?void 0:R.result)==null?void 0:H[0])==null?void 0:M.father_name,isShow:!1}]},{key:a,contents:G}];await ua.createPlatFormDataApi({platId:parseInt((ve=Dn==null?void 0:Dn.value)==null?void 0:ve.plat_id),changeData:b}),d=(K=O==null?void 0:O.data)==null?void 0:K.result}}return l&&await vd(d,!!(s!=null&&s.originPath)),await Vo(d)};var za={exports:{}},md=za.exports,Oo;function gd(){return Oo||(Oo=1,function(a,l){(function(s,r){r()})(md,function(){function s(C,w){return typeof w>"u"?w={autoBom:!1}:typeof w!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),w={autoBom:!w}),w.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(C.type)?new Blob(["\uFEFF",C],{type:C.type}):C}function r(C,w,F){var R=new XMLHttpRequest;R.open("GET",C),R.responseType="blob",R.onload=function(){f(R.response,w,F)},R.onerror=function(){console.error("could not download file")},R.send()}function d(C){var w=new XMLHttpRequest;w.open("HEAD",C,!1);try{w.send()}catch{}return 200<=w.status&&299>=w.status}function c(C){try{C.dispatchEvent(new MouseEvent("click"))}catch{var w=document.createEvent("MouseEvents");w.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),C.dispatchEvent(w)}}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,v=x.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=x.saveAs||(typeof window!="object"||window!==x?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(C,w,F){var R=x.URL||x.webkitURL,H=document.createElement("a");w=w||C.name||"download",H.download=w,H.rel="noopener",typeof C=="string"?(H.href=C,H.origin===location.origin?c(H):d(H.href)?r(C,w,F):c(H,H.target="_blank")):(H.href=R.createObjectURL(C),setTimeout(function(){R.revokeObjectURL(H.href)},4e4),setTimeout(function(){c(H)},0))}:"msSaveOrOpenBlob"in navigator?function(C,w,F){if(w=w||C.name||"download",typeof C!="string")navigator.msSaveOrOpenBlob(s(C,F),w);else if(d(C))r(C,w,F);else{var R=document.createElement("a");R.href=C,R.target="_blank",setTimeout(function(){c(R)})}}:function(C,w,F,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof C=="string")return r(C,w,F);var H=C.type==="application/octet-stream",M=/constructor/i.test(x.HTMLElement)||x.safari,ve=/CriOS\/[\d]+/.test(navigator.userAgent);if((ve||H&&M||v)&&typeof FileReader<"u"){var K=new FileReader;K.onloadend=function(){var b=K.result;b=ve?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=b:location=b,R=null},K.readAsDataURL(C)}else{var O=x.URL||x.webkitURL,G=O.createObjectURL(C);R?R.location=G:location.href=G,R=null,setTimeout(function(){O.revokeObjectURL(G)},4e4)}});x.saveAs=f.saveAs=f,a.exports=f})}(za)),za.exports}gd();const La=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DJu4bXem.cjs")).then(a=>a.index));La.install=a=>{a.component("ssMenu",La)};const wr={__name:"index",props:{name:String},setup(a){const l=a,s=e.computed(()=>xe.ElIcons[l.name]);return e.onMounted(()=>{}),(r,d)=>{const c=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Cr=(a,l,s=0)=>{let r=a;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(l==null?void 0:l[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(c=>c===(l==null?void 0:l[s]))&&(l==null?void 0:l.length)!==1){let c=V.cloneDeep(l),x=d==null?void 0:d.filter(w=>w!==(c==null?void 0:c[s])),v=s+1,f=Cr(x,c,v),C=[];C.push(d==null?void 0:d[0]),f==null||f.forEach(w=>{C.push(w)}),d=C}return d})),r},Dr=(a,l,s,r=0)=>{let d=a;return d!=null&&d.every(c=>Array.isArray(c))&&(d!=null&&d.every(c=>Array.isArray(c)&&c.length===1)?d.push([s]):d=d==null?void 0:d.map(c=>{if(c!=null&&c.find(x=>x===(l==null?void 0:l[r]))&&(l==null?void 0:l.length)!==1){let x=V.cloneDeep(l),v=c==null?void 0:c.filter(F=>F!==(x==null?void 0:x[r])),f=r+1,C=Dr(v,x,s,f),w=[];w.push(c==null?void 0:c[0]),C==null||C.forEach(F=>{w.push(F)}),c=w}return c})),d},_r=(a,l,s,r,d=0)=>{let c=a;return c!=null&&c.every(x=>Array.isArray(x))&&(c!=null&&c.every(x=>Array.isArray(x)&&x.length===1)?c=c==null?void 0:c.map(x=>((x==null?void 0:x[0])===s&&(x=[r]),x)):c=c==null?void 0:c.map(x=>{if(x!=null&&x.find(v=>v===(l==null?void 0:l[d]))&&(l==null?void 0:l.length)!==1){let v=V.cloneDeep(l),f=x==null?void 0:x.filter(R=>R!==(v==null?void 0:v[d])),C=d+1,w=_r(f,v,s,r,C),F=[];F.push(x==null?void 0:x[0]),w==null||w.forEach(R=>{F.push(R)}),x=F}return x})),c};function Er(a="menu"){return{name:a,components:{SvgIcon:Rl.SvgIcon,ssMenu:La,DynamicIcon:wr,ssDialog:Xt.ssDialog,ssInput:Bt._sfc_main$2},setup(l,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),c=V.useMenuState(),x=V.useModelComp(xe.pinia),v=V.useLoginState(xe.pinia),{loginUserInfo:f}=xe.storeToRefs(v),C=e.ref(0),w=Pl.useRouter(),F=e.ref(),{asideMenus:R,menuTriggerType:H,platform:M}=xe.storeToRefs(c),{fixMenuStatus:ve}=xe.storeToRefs(x),K=e.computed(()=>r==null?void 0:r.mode),O=ae=>ae==null?void 0:ae.map(I=>{var Xe,Ye;return!(I!=null&&I.children)||((Xe=I==null?void 0:I.children)==null?void 0:Xe.length)===0?I.config=d.value:I!=null&&I.children&&((Ye=I==null?void 0:I.children)==null?void 0:Ye.length)>0&&(I.children=O(I.children)),I}),G=e.computed(()=>{let ae=[...R.value];if((ae==null?void 0:ae.length)===0)return w.push("/"),[];const _e=ce(ae,h.value);return _e.isFlag||(ae=_e==null?void 0:_e.data),ae=ae==null?void 0:ae.map(I=>{var Xe,Ye;return!(I!=null&&I.children)||((Xe=I==null?void 0:I.children)==null?void 0:Xe.length)===0?I.config=d.value:I!=null&&I.children&&((Ye=I==null?void 0:I.children)==null?void 0:Ye.length)>0&&(I.children=O(I.children)),I}),ae}),b=async(ae,_e)=>{x.setRouteToChildPath(""),c.setMenuTriggerType("click"),c.setActiveMenuPath(ae==null?void 0:ae.path),c.setActiveAsideMenu(ae),ae.isRouter?w.push(ae.path):w.push("/"),s("node-click",ae,_e)},_=async ae=>{const _e=Ll.findNodeByPropInTree(G.value,"path",ae);c.setActiveAsideMenu(_e),x.setRouteToChildPath(""),ve.value?x.setFixMenuStatus(!1):(De.value&&(H.value="open"),H.value==="click"?C.value===1?c.setActiveMenuPath(sessionStorage.getItem("pageKey")):c.setActiveMenuPath(ae):De.value||(c.setMenuTriggerType("click"),c.setActiveMenuPath(ae))),ae!=null&&ae.startsWith("/")?w.push(ae):w.push("/"),C.value++},y=ae=>{De.value||c.setActiveMenuPath(ae)},T=ae=>{const _e=document.documentElement;ae==null||ae.forEach(I=>{_e.style.setProperty(I.name,I.value)})};e.onMounted(()=>{C.value=1});const h=e.computed(()=>{const ae=sessionStorage.getItem("authority");return ae?JSON.parse(ae):[]});e.watch(()=>M.value,ae=>{ae==="browser"?T(ya.browserVerticalMenuClasses):ae==="client"?(T(ya.clientHorizontalMenuClasses),T(ya.clientVerticalMenuClasses)):ae==="three"&&(T(ya.threeHorizontalMenuClasses),T(ya.threeVerticalMenuClasses))},{immediate:!0});const ce=(ae,_e)=>({isFlag:!0}),Ae=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),at=ae=>aa(ae),we=e.ref({}),Pe=e.ref([]),Le=e.ref({}),P=e.ref({}),re=ae=>{switch(ae){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},ne=e.ref({}),pe=ae=>{c.setCacheInputMenu({type:Ae.type,data:ae}),c.setIsRefreshMenus(!0)},He=async(ae,_e,I)=>{var Xe,Ye,Ie,le,Q,se,Ee,qe,dt,m,S,U,J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt,$e,nt,Be,mt,et,Oe,it,gt,Je;if(_e==="create"){let je=(I==null?void 0:I.title)+"(1)",It=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Te=(Ye=(Xe=It==null?void 0:It.data)==null?void 0:Xe.result)==null?void 0:Ye[0],Ge=(Ie=Te==null?void 0:Te.value)==null?void 0:Ie.pageData;Ge.compData=(le=Ge.compData)==null?void 0:le.map(E=>{var fe;return(E==null?void 0:E.key)==="menuContents"&&(E.contents=Dr(E.contents,(fe=I==null?void 0:I.path)==null?void 0:fe.split("/"),je)),E}),await xe.updateInsofDataApi({id:Te==null?void 0:Te.id,value:{pageData:Ge}});let Fe=(se=(Q=I==null?void 0:I.path)==null?void 0:Q.split("/"))==null?void 0:se.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}),Ze=await Ne.getItemData((dt=(qe=(Ee=I==null?void 0:I.path)==null?void 0:Ee.split("/"))==null?void 0:qe.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(Fe.push(je),Fe=Fe==null?void 0:Fe.join("/"),(Ze==null?void 0:Ze.length)>0){let E=Ze==null?void 0:Ze[0],fe=(S=(m=E==null?void 0:E.compData)==null?void 0:m.find(Ke=>(Ke==null?void 0:Ke.key)==="header"))==null?void 0:S.contents;if(((U=fe==null?void 0:fe[0])==null?void 0:U.directiveLabel)==="#isMain"){let Ke=(J=fe==null?void 0:fe[0])==null?void 0:J.prop,he=(oe=(D=E==null?void 0:E.compData)==null?void 0:D.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:oe.contents,ut;he==null||he.forEach(st=>{var xt,pt;if(st.length===1)((xt=st==null?void 0:st[0])==null?void 0:xt[Ke])===(I==null?void 0:I.title)&&(ut=st==null?void 0:st[0],ut[Ke]=je);else{let ct=(pt=fe==null?void 0:fe.filter(Tt=>Tt!=="操作"))==null?void 0:pt.map(Tt=>Tt==null?void 0:Tt.prop),ft=st==null?void 0:st.filter(Tt=>!(Tt!=null&&Tt.id)),wt=Ne.getValueToObjectValue(ft,ct);wt[Ke]=je,ut=wt}}),await xe.createInsofDataApi({key:{type:"data",pageKey:(ee=(B=(Ve=I==null?void 0:I.path)==null?void 0:Ve.split("/"))==null?void 0:B.filter((st,xt)=>{var pt,ct;return xt!==((ct=(pt=I==null?void 0:I.path)==null?void 0:pt.split("/"))==null?void 0:ct.length)-1}))==null?void 0:ee.join("/"),tableId:E==null?void 0:E.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:($=f.value)==null?void 0:$.id,createUserLayer:((W=f.value)==null?void 0:W.dept)||((Se=f.value)==null?void 0:Se.部门名称)},value:{tableData:ut}})}}await Ne.newLoadingConstruct(I==null?void 0:I.path,Fe),c.setUpdateMenuStatus(!1),await ua.verifyStructureDataToStore(),c.setActiveMenuPath((Z=(q=(ie=I==null?void 0:I.path)==null?void 0:ie.split("/"))==null?void 0:q.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}))==null?void 0:Z.join("/")),c.setActiveTopMenuPath((me=(de=I==null?void 0:I.path)==null?void 0:de.split("/"))==null?void 0:me[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0)}else if(_e==="update")F.value=I;else if(_e==="delete"){let je=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:I==null?void 0:I.path}}),It=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Te=(be=(Ce=It==null?void 0:It.data)==null?void 0:Ce.result)==null?void 0:be[0],Ge=(j=Te==null?void 0:Te.value)==null?void 0:j.pageData;if(Ge.compData=(Me=Ge.compData)==null?void 0:Me.map(E=>{var fe;return(E==null?void 0:E.key)==="menuContents"&&(E.contents=Cr(E.contents,(fe=I==null?void 0:I.path)==null?void 0:fe.split("/"))),E}),await xe.updateInsofDataApi({id:Te==null?void 0:Te.id,value:{pageData:Ge}}),((Ue=(ge=je==null?void 0:je.data)==null?void 0:ge.result)==null?void 0:Ue.length)>0){let E=($e=(rt=je==null?void 0:je.data)==null?void 0:rt.result)==null?void 0:$e.map(fe=>fe==null?void 0:fe.id);(E==null?void 0:E.length)>0&&await xe.batchDeleteInsofDataApi({ids:E})}let Fe=await Ne.getItemData((mt=(Be=(nt=I==null?void 0:I.path)==null?void 0:nt.split("/"))==null?void 0:Be.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}))==null?void 0:mt.join("/"),sessionStorage.getItem("systemKey"),""),Ze=[];(Fe==null?void 0:Fe.length)>0&&(Fe==null||Fe.forEach(E=>{var Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt;let fe=(st=(ut=(he=(Ke=E==null?void 0:E.compData)==null?void 0:Ke.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:he.contents)==null?void 0:ut[0])==null?void 0:st.prop;((ft=(ct=(pt=(xt=E==null?void 0:E.compData)==null?void 0:xt.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:pt.contents)==null?void 0:ct[0])==null?void 0:ft.directiveLabel)==="#isMain"&&((jt=(Tt=(wt=E==null?void 0:E.compData)==null?void 0:wt.find(vt=>(vt==null?void 0:vt.key)==="tableContents"))==null?void 0:Tt.contents)==null||jt.forEach(vt=>{var Mt,Lt,Ut;(vt==null?void 0:vt.length)>1?(vt==null?void 0:vt[1])===(I==null?void 0:I.title)&&Ze.push((Mt=vt==null?void 0:vt[0])==null?void 0:Mt.id):((Lt=vt==null?void 0:vt[0])==null?void 0:Lt[fe])===(I==null?void 0:I.title)&&Ze.push((Ut=vt==null?void 0:vt[0])==null?void 0:Ut.id)}))})),(Ze==null?void 0:Ze.length)>0&&await xe.batchDeleteInsofDataApi({ids:Ze}),c.setUpdateMenuStatus(!1),await ua.verifyStructureDataToStore(),c.setActiveMenuPath((it=(Oe=(et=I==null?void 0:I.path)==null?void 0:et.split("/"))==null?void 0:Oe.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}))==null?void 0:it.join("/")),c.setActiveTopMenuPath((Je=(gt=I==null?void 0:I.path)==null?void 0:gt.split("/"))==null?void 0:Je[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0)}},ot=async(ae,_e)=>{var qe,dt,m,S,U,J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt,$e,nt,Be,mt,et;let I=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Xe=(dt=(qe=I==null?void 0:I.data)==null?void 0:qe.result)==null?void 0:dt[0],Ye=(m=Xe==null?void 0:Xe.value)==null?void 0:m.pageData;Ye.compData=(S=Ye.compData)==null?void 0:S.map(Oe=>{var it,gt;return(Oe==null?void 0:Oe.key)==="menuContents"&&(Oe.contents=_r(Oe.contents,(it=_e==null?void 0:_e.path)==null?void 0:it.split("/"),_e==null?void 0:_e.title,(gt=ae==null?void 0:ae.target)==null?void 0:gt.value)),Oe}),Xe!=null&&Xe.id&&await xe.updateInsofDataApi({id:Xe==null?void 0:Xe.id,value:{pageData:Ye}});let Ie=(J=(U=_e==null?void 0:_e.path)==null?void 0:U.split("/"))==null?void 0:J.filter((Oe,it)=>{var gt,Je;return it!==((Je=(gt=_e==null?void 0:_e.path)==null?void 0:gt.split("/"))==null?void 0:Je.length)-1}),le=Ie==null?void 0:Ie.join("/");Ie.push((D=ae==null?void 0:ae.target)==null?void 0:D.value),Ie=Ie==null?void 0:Ie.join("/");let Q=await Ne.getItemData(le,sessionStorage.getItem("systemKey"),"");if((($=(ee=(B=(Ve=(oe=Q==null?void 0:Q[0])==null?void 0:oe.compData)==null?void 0:Ve.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:B.contents)==null?void 0:ee[0])==null?void 0:$.directiveLabel)==="#isMain"){let Oe=(Z=(q=(ie=(Se=(W=Q==null?void 0:Q[0])==null?void 0:W.compData)==null?void 0:Se.find(je=>(je==null?void 0:je.key)==="header"))==null?void 0:ie.contents)==null?void 0:q[0])==null?void 0:Z.prop,it=(Ce=(me=(de=Q==null?void 0:Q[0])==null?void 0:de.compData)==null?void 0:me.find(je=>(je==null?void 0:je.key)==="tableContents"))==null?void 0:Ce.contents,gt=(ge=(Me=(j=(be=Q==null?void 0:Q[0])==null?void 0:be.compData)==null?void 0:j.find(je=>(je==null?void 0:je.key)==="header"))==null?void 0:Me.contents)==null?void 0:ge.map(je=>je==null?void 0:je.prop),Je;if(it==null||it.forEach(je=>{var Te;let It=Ne.getValueToObjectValue(je,gt);(It==null?void 0:It[Oe])===_e.title&&(Je=It,Je[Oe]=(Te=ae==null?void 0:ae.target)==null?void 0:Te.value)}),Je){let je={};for(let Te in Je)Te!=="id"&&(je[Te]=Je==null?void 0:Je[Te]);let It=[{id:Je==null?void 0:Je.id,value:{tableData:je}}];await xe.batchUpdateInsofDataApi({dataList:It})}}let se=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:_e==null?void 0:_e.path}}),Ee=(rt=(Ue=se==null?void 0:se.data)==null?void 0:Ue.result)==null?void 0:rt.map(Oe=>({id:Oe==null?void 0:Oe.id,key:Oe==null?void 0:Oe.key}));Ee=Ee==null?void 0:Ee.map(Oe=>(Oe.key.pageKey=Ie,Oe)),(Ee==null?void 0:Ee.length)>0&&await xe.batchUpdateInsofDataApi({dataList:Ee}),c.setUpdateMenuStatus(!1),await ua.verifyStructureDataToStore(),c.setActiveMenuPath((Be=(nt=($e=_e==null?void 0:_e.path)==null?void 0:$e.split("/"))==null?void 0:nt.filter((Oe,it)=>{var gt,Je;return it!==((Je=(gt=_e==null?void 0:_e.path)==null?void 0:gt.split("/"))==null?void 0:Je.length)-1}))==null?void 0:Be.join("/")),c.setActiveTopMenuPath((et=(mt=_e==null?void 0:_e.path)==null?void 0:mt.split("/"))==null?void 0:et[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0),F.value=void 0},X=async(ae,_e)=>{Ae.type=re(_e==null?void 0:_e.operateType),await He(_e,Ae.type,ae),P.value=ae,ne.value=_e},A=()=>{Ae.show=!1},te=ae=>ae==null?void 0:ae.filter(_e=>_e.allowInherit),ye=()=>{var I,Xe,Ye,Ie,le;let ae;Ae.type==="create"&&(ae=((I=P.value)==null?void 0:I.path)+"/"+Le.value[(Xe=Le.value)==null?void 0:Xe.prop]),Ae.type==="update"&&(ae=(Ye=P.value)==null?void 0:Ye.path);const _e={...P.value,config:te((Ie=P.value)==null?void 0:Ie.config),children:[],childMenus:[],title:Le.value[(le=Le.value)==null?void 0:le.prop],path:ae};console.log("clickSubmitForm",ne.value,P.value,_e),pe(_e),Ae.show=!1},ue=ae=>{var I,Xe;const _e=(I=ae==null?void 0:ae.contents)==null?void 0:I.find(Ye=>Ye.key==="formContent");_e&&(Le.value=(Xe=_e==null?void 0:_e.contents)==null?void 0:Xe.reduce((Ye,Ie)=>(Ye[Ie.key]=Ie.value,Ye.prop=Ie.key,Ye),{}))},De=e.ref(!1);return{isCollapse:De,handleMenuCollapse:()=>{De.value=!De.value},handleCompChange:ue,dialogForm:we,dialogRenderComps:Pe,getComponents:at,clickSubmitForm:ye,dialogInfo:Ae,beforeDialogDestroy:A,clickMenuIcon:X,mode:K,renderMenuList:G,clickMenu:b,openMenu:_,closeMenu:y,changeMenuStyle:T,fixElement:F,onBlur:ot}}}}e.defineComponent(Er());const yd=V.useLoginState(),{loginUserInfo:df}=xe.storeToRefs(yd),rn=V.useModelComp(xe.pinia),Sr=e.ref(!1),{itemData:bd,itemGridData:Zn,curStructureCompIds:Mo,isSubmitCurStructure:kd,isRefreshCurStructure:xd,freshContent:pf,routeToChildPath:wd,payloadTypes:ff,pageMapState:lo,itemExtendData:Aa}=xe.storeToRefs(rn),tn=V.useMenuState(xe.pinia),{activeTopMenuPath:Cd,activeMenuPath:ln,platform:hf,activeAsideMenu:vf,buttonTriggerType:Dd,menus:mf}=xe.storeToRefs(tn),ta=Ne.useUnit(xe.pinia),{selectTitle:Tr,chooseTitle:zo}=xe.storeToRefs(ta),_d=Ne.useOriginalState(xe.pinia),{originalPath:Ed}=xe.storeToRefs(_d);e.ref();V.useAuthorityState(xe.pinia);const $a=e.ref(!0),fa=e.ref(0),io=e.ref([]);e.ref(!1);e.computed(async()=>{var l,s;const a=(l=ln.value)!=null&&l.startsWith("/")?(s=ln.value)==null?void 0:s.substring(1):ln.value;return(a==null?void 0:a.includes(Ed.value))||await Od(a)});const Sd=()=>{rn.setItemGridData([]),rn.setIsEdit("edit"),rn.setSubmitCurStructure(ln.value!=="/平台管理/菜单管理")},Td=()=>{rn.setIsEdit("view"),rn.setRefreshCurStructure(!0)},Bd=async a=>{const l=sessionStorage.getItem("systemKey"),s=await Ne.getItemData(a,l,"");return s&&s.length>0},Id=async a=>{var v,f,C;let l=Tr.value,s=l==null?void 0:l.findIndex(w=>(w==null?void 0:w.value)===(a==null?void 0:a.value)),r=(v=l==null?void 0:l.filter(w=>(w==null?void 0:w.condition)==="parent"))==null?void 0:v.map(w=>w==null?void 0:w.value),d=r==null?void 0:r[0],c=(C=(f=l==null?void 0:l.filter((w,F)=>!(w!=null&&w.condition)&&F<=s))==null?void 0:f.map(w=>w.value))==null?void 0:C.join("/");d?(c==null?void 0:c.length)>0?d=d+"/"+c:d=r==null?void 0:r.join("/"):(c==null?void 0:c.length)>0&&(d=c,l=l==null?void 0:l.filter(w=>(w==null?void 0:w.condition)!=="child"),ta.setSelectTitle(l),ta.setChooseTitle([])),await Bd(d)&&tn.setActiveMenuPath(d)},to=async(a,l,s,r="contentConfig")=>{var d;try{if(!Array.isArray(a))return;let c,x;l==="create"?(c={dataList:a==null?void 0:a.map(f=>{var C;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(C=f==null?void 0:f.compData)==null?void 0:C.filter(w=>(w==null?void 0:w.key)!=="tableContents")}}}})},x=xe.batchAddInsofDataApi):l==="update"?(c={dataList:a==null?void 0:a.map(f=>{var C;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(C=f==null?void 0:f.compData)==null?void 0:C.filter(w=>(w==null?void 0:w.key)!=="tableContents")}}}})},x=xe.batchUpdateInsofDataApi):l==="delete"&&(c={ids:a},x=xe.batchDeleteInsofDataApi);const v=await x(c);if(((d=v==null?void 0:v.data)==null?void 0:d.code)===200)return v.data.result;throw xe.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{xe.ElMessage.error("保存响应失败")}},Fo=async(a,l,s,r)=>{var d,c,x,v,f,C,w,F,R,H,M;try{const ve=(c=(d=a==null?void 0:a.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:c.map(y=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:s},value:{tableData:y}})),K=(v=(x=a==null?void 0:a.results)==null?void 0:x.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:v.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),O=JSON.parse(V.cloneDeep(JSON.stringify(a))),G=(f=O==null?void 0:O.results)==null?void 0:f.map(y=>y.id);let b;s?b=(F=(w=(C=lo.value)==null?void 0:C[ln.value])==null?void 0:w.filter(y=>{var T,h,ce;return((T=y==null?void 0:y.key)==null?void 0:T.type)===l&&((ce=(h=y==null?void 0:y.key)==null?void 0:h.relatedInfo)==null?void 0:ce.target)===r}))==null?void 0:F.map(y=>y==null?void 0:y.id):b=(M=(H=(R=lo.value)==null?void 0:R[ln.value])==null?void 0:H.filter(y=>{var T;return((T=y==null?void 0:y.key)==null?void 0:T.type)===l}))==null?void 0:M.map(y=>y==null?void 0:y.id);const _=b==null?void 0:b.filter(y=>!(G!=null&&G.includes(y))&&typeof y=="number");(ve==null?void 0:ve.length)>0&&await xe.batchAddInsofDataApi({dataList:ve}),(K==null?void 0:K.length)>0&&await xe.batchUpdateInsofDataApi({dataList:K}),(_==null?void 0:_.length)>0&&await xe.batchDeleteInsofDataApi({ids:_})}catch(ve){throw new Error(ve)}},Nd=async a=>{var C,w,F,R,H,M,ve,K,O,G;tn.setContentLoading(!0);const l=JSON.parse(V.cloneDeep(JSON.stringify(bd.value)));if(!kd.value)return tn.setCacheStructures({key:Dd.value,data:l}),xe.ElMessage.success("已暂存");const s=l==null?void 0:l.map(b=>b.id),r=s.filter(b=>{var _;return!((_=Mo.value)!=null&&_.includes(b))}),d=(C=Mo.value)==null?void 0:C.filter(b=>!s.includes(b)),c=[...r,...d].filter(b=>typeof b!==null&&typeof b<"u"),x=l==null?void 0:l.filter(b=>!b.id),v=l==null?void 0:l.filter(b=>b.id);let f=[];if(c&&(c==null?void 0:c.length)>0&&f.push(to(c,"delete",a)),x&&(x==null?void 0:x.length)>0&&f.push(to(x,"create",a)),v&&(v==null?void 0:v.length)>0&&f.push(to(v,"update",a)),Zn.value&&((w=Zn.value)!=null&&w.isDelete&&((R=(F=Zn.value)==null?void 0:F.results)==null?void 0:R.length)>0&&((M=(H=Zn.value)==null?void 0:H.results)!=null&&M.every(b=>typeof b=="number"))?await xe.batchDeleteInsofDataApi({ids:(ve=Zn.value)==null?void 0:ve.results}):(console.log("itemGridData.value",Zn.value),f.push(await Fo(Zn.value,"gridLayout")))),Aa.value)for(const b in Aa.value)f.push(await Fo((K=Aa.value)==null?void 0:K[b],"extend",{target:b,compId:(G=(O=Aa.value)==null?void 0:O[b])==null?void 0:G.compId},b));await Promise.all(f).then(()=>{xe.ElMessage.success("保存成功"),rn.setRefreshCurStructure(!0)}).catch(b=>{xe.ElMessage.success(b)}),tn.setContentLoading(!1)},ja=a=>aa(a),Gt=e.ref([]),Ad=e.computed(()=>{var a;return(a=Gt.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Br=e.computed(()=>{var a;return(a=Gt.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix)||(l==null?void 0:l.affix)==="default")}),Ir=e.ref(0),Nr=e.ref(null),Ua=async(a,l="data",s)=>{},Vd=async a=>{var s,r,d;const l=await xe.getInsofDataApi({id:a});return(d=(r=(s=l==null?void 0:l.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Ka=async(a,l)=>{var d,c,x;if(Sr.value||typeof(a==null?void 0:a.index)=="string")return;const s=await Vd(a==null?void 0:a.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Ne.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(c=V.cloneDeep(a==null?void 0:a.contents))==null?void 0:c.filter(v=>v.contents),name:r,isShow:(x=s==null?void 0:s.pageData)==null?void 0:x.isShow}),l&&(tn.setActiveMenuPath(null),tn.setActiveMenuPath(l))},Wa=async a=>{Gt.value=await Ne.getDeepDiffItems(a),rn.setItemData(Gt.value),rn.setOriginalData(Gt.value)},Od=async a=>{var l,s;return(l=a==null?void 0:a.split("/"))==null||l.forEach((r,d)=>{var c;((c=a==null?void 0:a.split("/"))==null?void 0:c.length)-2>d}),(s=a==null?void 0:a.split("/"))==null||s.forEach((r,d)=>{var c;((c=a==null?void 0:a.split("/"))==null?void 0:c.length)-1>d}),!1};e.ref();const ka=e.ref(null),Md=()=>{var a,l;console.log("倒计时结束时"),V.ElMessageBox.alert(`超时未提交,【${(l=(a=ln.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ar=e.ref([]),zd=e.computed(()=>{var a,l;return(l=(a=lo.value)==null?void 0:a[ln.value])==null?void 0:l.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Cd.value],()=>{ta.setSelectTitle([]),ta.setChooseTitle([])},{deep:!0});e.watch(()=>[zo.value],async()=>{var l,s;let a=(l=zo.value)==null?void 0:l.filter(r=>(r==null?void 0:r.condition)==="child"&&(r==null?void 0:r.value)!==""&&(r==null?void 0:r.parentContent)!==ln.value);if((a==null?void 0:a.length)>0){tn.setContentLoading(!0);let r=ln.value+"/"+((s=a==null?void 0:a[0])==null?void 0:s.value),d=await Xa(r,!0,{originPath:ln.value});Gt.value=await Ne.getDeepDiffItems(d),tn.setContentLoading(!1)}});e.watch(()=>[ln.value,xd.value],async a=>{var x,v,f;if(!ln.value)return;rn.setLockingPage(""),Gt.value=[];let l=e.getCurrentInstance();(x=l==null?void 0:l.scope)==null||x.stop(),l=null,$a.value=!1,tn.setContentLoading(!0),Sr.value=!0;let s=a==null?void 0:a[0],r=s,d=(v=Tr.value)==null?void 0:v.filter(C=>(C==null?void 0:C.condition)==="child"&&(C==null?void 0:C.value)!==""&&(C==null?void 0:C.parentContent)!==ln.value);(d==null?void 0:d.length)>0&&(s=s+"/"+((f=d==null?void 0:d[0])==null?void 0:f.value));let c=await Xa(s,!0,{originPath:r});Gt.value=await Ne.getDeepDiffItems(c),tn.setContentLoading(!1),rn.setExtraContents([]),ta.setSelectIndex(""),ta.setSelectMenu(""),rn.setItemData(Gt.value),rn.setOriginalData(Gt.value),e.nextTick(()=>{fa.value=fa.value++,$a.value=!0})},{immediate:!0});const Fd=async()=>{tn.setLinkMenuInfo(null),tn.setActiveMenuPath(wd.value),Gt.value=null,rn.setRouteToChildPath(""),tn.setChildMenu("")},Rd=a=>new RegExp("button","i").test(a),Pd=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Vr=a=>{if(Pd(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&tn.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Or=a=>{var l;ka.value&&(ka.value={...ka.value,mainKeyPropValue:a==null?void 0:a[(l=ka.value)==null?void 0:l.mainKeyProp]})},Ld=a=>{Ir.value=a},ca=e.reactive({index:0,comp:null}),$d=e.computed(()=>{var a;return(a=Gt.value)==null?void 0:a.map((l,s)=>({id:l.id,name:l.name,status:jd(l,s)}))}),Mr=(a,l)=>{var f,C,w,F,R;const s=l?a:a-2,r=(f=Gt.value)==null?void 0:f[s],d=(w=(C=r==null?void 0:r.compData)==null?void 0:C.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:w.contents,c=d==null?void 0:d.findIndex(H=>(H==null?void 0:H.isMainKey)&&(H==null?void 0:H.label)!=="操作"),x=c===-1?0:c,v=(R=(F=r==null?void 0:r.compData)==null?void 0:F.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:R.contents;return{valid:v==null?void 0:v.every(H=>H==null?void 0:H[x+1]),length:(v==null?void 0:v.length)||0}},jd=(a,l)=>{var r;let s="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:c}=Mr(l,!0);ca.index===l?s="process":c===0?s="wait":s=d?"success":"error"}return s},zr=a=>{var s,r,d,c,x;const l=a+1;if(l>1&&((d=(r=(s=Gt.value)==null?void 0:s[a])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:v}=Mr(l);v?(ca.index=l,ca.comp=(c=Gt.value)==null?void 0:c[a]):xe.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ca.index=l,ca.comp=(x=Gt.value)==null?void 0:x[a]},Fr=e.computed(()=>{var a,l;return(l=(a=Br.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Fr.value,a=>{a&&zr(0)},{immediate:!0});const Ud={class:"layout"},Kd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const s=l,r=a;e.onMounted(async()=>{});const d=e.computed(()=>V.cloneDeep(r==null?void 0:r.itemData)||[]),c=e.computed(()=>{var w;const C=(w=d==null?void 0:d.value)==null?void 0:w.find(F=>{const{key:R}=F;return R==="baseConfig"});return C==null?void 0:C.contents}),x=e.computed(()=>{var w;const C=(w=d==null?void 0:d.value)==null?void 0:w.find(F=>{const{key:R}=F;return R==="children"});return C==null?void 0:C.contents}),v=e.computed(()=>{let C=V.cloneDeep(x.value)||[];const w=C.length;let F=0;const R=[];if(C=C.map(H=>{const M=H.span;return M?(H.span=Number(M),F=F+H.span):R.push(H),H}),F<24){const H=Math.floor((24-F)/w);R.forEach(M=>{M.span=H})}return C}),f=C=>{s("rowClick",C)};return(C,w)=>{var H;const F=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Ud,[e.createVNode(R,{style:e.normalizeStyle({height:(H=c.value)==null?void 0:H.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(M,ve)=>(e.openBlock(),e.createBlock(F,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var K;return[e.unref($a)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ja)(M.comp)),{key:e.unref(fa),compName:M.name,index:(M==null?void 0:M.id)??ve,height:(K=c.value)==null?void 0:K.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(Ua),onContentChange:e.unref(Ka),onPageChange:e.unref(Wa),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Wd=Rt._export_sfc(Kd,[["__scopeId","data-v-ab9a36ed"]]),Hd={class:"layout-operate"},qd={class:"layout-module"},Gd={class:"collapse-title-item"},Xd={class:"collapse-title"},Yd={class:"icon-content"},Jd=["onClick"],Zd={class:"comp-child"},Qd=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l;e.onMounted(()=>{ve()});const d=e.ref({}),c=e.ref({}),x=e.ref([]),v=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{c.value=y,r("change",_(),!0)},C=e.ref([]),w=e.ref([]),F=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return V.cloneDeep(y)}),H=e.computed(()=>{const y=R==null?void 0:R.value,T=y==null?void 0:y.find(h=>{const{key:ce}=h;return ce==="baseConfig"});return T==null?void 0:T.contents}),M=e.computed(()=>{const y=R==null?void 0:R.value,T=y==null?void 0:y.find(h=>{const{key:ce}=h;return ce==="children"});return T==null?void 0:T.contents}),ve=()=>{var y;d.value=R.value||{},C.value=(M==null?void 0:M.value)||[],x.value=v(),x.value=(y=x.value)==null?void 0:y.map(T=>{var ce;const{prop:h}=T;return T.value=(ce=H.value)==null?void 0:ce[h],T})};e.watch(()=>{var y;return(y=M==null?void 0:M.value)==null?void 0:y.length},()=>{var y;C.value=(M==null?void 0:M.value)||[],w.value=(y=M.value)==null?void 0:y.map(T=>F(T))},{immediate:!0});const K=(y,T)=>{const h=V.cloneDeep(M==null?void 0:M.value);h[T].span=y.span,C.value=h,r("change",_(),!0)},O=y=>aa(y),G=(y,T,h)=>{if(!y)return;const ce=V.cloneDeep(M==null?void 0:M.value);ce[h]&&(ce[h].compData=y,C.value=ce,r("change",_(),!0))},b=y=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let T=V.cloneDeep(M==null?void 0:M.value);T=T==null?void 0:T.filter((h,ce)=>y!==ce),C.value=T,r("change",_(),!0),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:C==null?void 0:C.value}]});return(y,T)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Hd,[e.createElementVNode("div",qd,[T[1]||(T[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:T[0]||(T[0]=ce=>f(ce))},null,8,["rowContents"])])]),e.createVNode(ur.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:ce,index:Ae})=>[e.createElementVNode("div",Gd,[e.createElementVNode("div",Xd,e.toDisplayString(ce.name),1),e.createElementVNode("div",Yd,[e.createElementVNode("div",{onClick:e.withModifiers(at=>b(Ae),["stop"]),class:"icon-content"},[e.createVNode(h,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Jd)])])]),content:e.withCtx(({item:ce,index:Ae})=>[e.createElementVNode("div",Zd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value[Ae],key:Ae,isEnableWrap:!0,onChange:at=>K(at,Ae)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(ce.comp+"Operate")),{itemContents:ce==null?void 0:ce.compData,originalItemContents:ce.compData,onChange:at=>G(at,ce,Ae)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),ep=Rt._export_sfc(Qd,[["__scopeId","data-v-ba05456e"]]),tp=typeof window<"u";var Ro;tp&&((Ro=window==null?void 0:window.navigator)!=null&&Ro.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cn(a){return a==null}function Rr(){}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 ap(){const a=new Map;return{on(l,s){const r=a.get(l);r!=null&&r.add(s)||a.set(l,new Set([s]))},off(l,s){const r=a.get(l);r&&r.delete(s)},clear(l){const s=a.get(l);s&&s.clear()},clearAll(){a.clear()},emit(l,...s){const r=a.get(l);r&&r.forEach(d=>{d(...s)})}}}function Po(a,l=16){if(typeof a!="function")return Rr;const s=(...c)=>{a(...c)};if(l<=0)return Pr(s);let r=0,d;return function(...c){const x=Date.now(),v=x-r;clearTimeout(d),v>=l?(r=x,s(...c)):d=setTimeout(()=>{r=Date.now(),s(...c)},Math.max(0,l-v))}}function op(a,l=100){if(typeof a!="function")return Rr;const s=(...d)=>{a(...d)};if(l<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},l)}}function Pr(a){if(typeof a!="function")return a;let l=!1,s,r;return function(...d){return s=d,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...s)))),r}}const wa=new Set,Lr=new WeakMap;function rp(){wa.forEach(a=>{a(...Lr.get(a))}),wa.clear()}function en(a,...l){if(typeof a!="function")return a;Lr.set(a,l),!wa.has(a)&&(wa.add(a),wa.size===1&&Promise.resolve().then(rp))}const $r=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function lp(a){let l=0,s;for(let r=0,d=a.length;r<d;r++)s=a[r].y+a[r].h,s>l&&(l=s);return l}function so(a){const l=Array(a.length);for(let s=0,r=a.length;s<r;s++)l[s]=ip(a[s]);return l}function ip(a){return{...a}}function Ur(a,l){return!(a===l||a.x+a.w<=l.x||a.x>=l.x+l.w||a.y+a.h<=l.y||a.y>=l.y+l.h)}function sa(a,l,s){const r=Wr(a),d=Hr(a),c=Array(a.length);for(let x=0,v=d.length;x<v;x++){let f=d[x];f.static||(f=sp(r,f,l,s),r.push(f)),c[a.findIndex(C=>C.i===f.i)]=f,f.moved=!1}return c}function sp(a,l,s,r){if(s)for(;l.y>0&&!Ca(a,l);)l.y--;else if(r){const c=r[l.i].y;for(;l.y>c&&!Ca(a,l);)l.y--}let d;for(;d=Ca(a,l);)l.y=d.y+d.h;return l}function cp(a,l){const s=Wr(a);for(let r=0,d=a.length;r<d;r++){const c=a[r];if(c.x+c.w>l.cols&&(c.x=l.cols-c.w),c.x<0&&(c.x=0,c.w=l.cols),!c.static)s.push(c);else for(;Ca(s,c);)c.y++}return a}function Lo(a,l){for(let s=0,r=a.length;s<r;s++)if(a[s].i===l)return a[s]}function Ca(a,l){for(let s=0,r=a.length;s<r;s++)if(Ur(a[s],l))return a[s]}function Kr(a,l){return a.filter(s=>Ur(s,l))}function Wr(a){return a.filter(l=>l.static)}function co(a,l,s,r,d=!1,c=!1){if(l.static)return a;const x=l.x,v=l.y,f=r&&l.y>r;typeof s=="number"&&(l.x=s),typeof r=="number"&&(l.y=r),l.moved=!0;let C=Hr(a);f&&(C=C.reverse());const w=Kr(C,l);if(c&&w.length)return l.x=x,l.y=v,l.moved=!1,a;for(let F=0,R=w.length;F<R;F++){const H=w[F];H.moved||l.y>H.y&&l.y-H.y>H.h/4||(H.static?a=$o(a,H,l,d):a=$o(a,l,H,d))}return a}function $o(a,l,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(l.y-s.h,0),!Ca(a,d))return co(a,s,void 0,d.y,!1)}return co(a,s,void 0,s.y+1,!1)}function up(a,l,s,r){const d="translate3d("+l+"px,"+a+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function dp(a,l,s,r){const d="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function pp(a,l,s,r){return{top:a+"px",left:l+"px",width:s+"px",height:r+"px",position:"absolute"}}function fp(a,l,s,r){return{top:a+"px",right:l+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hr(a){return Array.from(a).sort(function(l,s){return l.y===s.y&&l.x===s.x?0:l.y>s.y||l.y===s.y&&l.x>s.x?1:-1})}function hp(a,l){l=l||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let d=0,c=a.length;d<c;d++){const x=a[d];for(let v=0;v<s.length;v++)if(typeof x[s[v]]!="number")throw new Error("VueGridLayout: "+l+"["+d+"]."+s[v]+" must be a number!");if(x.i===void 0||x.i===null)throw new Error("VueGridLayout: "+l+"["+d+"].i cannot be null!");if(typeof x.i!="number"&&typeof x.i!="string")throw new Error("VueGridLayout: "+l+"["+d+"].i must be a string or number!");if(r.indexOf(x.i)>=0)throw new Error("VueGridLayout: "+l+"["+d+"].i must be unique!");if(r.push(x.i),x.static!==void 0&&typeof x.static!="boolean")throw new Error("VueGridLayout: "+l+"["+d+"].static must be a boolean!")}}function vp(a,l="vgl"){const s=()=>`${l}-${a}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function jo(a){return mp(a)}function mp(a){var l;const s=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=a.clientX+s.scrollLeft-r.left,c=a.clientY+s.scrollTop-r.top;return{x:d,y:c}}function Uo(a,l,s,r){return gp(a)?{deltaX:s-a,deltaY:r-l,lastX:a,lastY:l,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function gp(a){return typeof a=="number"&&!Number.isNaN(a)}function yp(a,l){const s=Gr(a);let r=s[0];for(let d=1,c=s.length;d<c;d++){const x=s[d];l>a[x]&&(r=x)}return r}function qr(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function bp(a,l,s,r,d,c,x){if(l[r])return so(l[r]);let v=a;const f=Gr(s),C=f.slice(f.indexOf(r));for(let w=0,F=C.length;w<F;w++){const R=C[w];if(l[R]){v=l[R];break}}return v=so(v||[]),sa(cp(v,{cols:c}),x)}function Gr(a){return Object.keys(a).sort((l,s)=>a[l]-a[s])}let kp="auto";function xp(){return typeof document<"u"}function Ko(){return xp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):kp}var xa={exports:{}},wp=xa.exports,Wo;function Cp(){return Wo||(Wo=1,function(a,l){(function(s,r){a.exports=r()})(wp,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,i)}return o}function r(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(i){f(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function d(n){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(n)}function c(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 i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,ve(i.key),i)}}function v(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function f(n,t,o){return(t=ve(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function C(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&F(n,t)}function w(n){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(n)}function F(n,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},F(n,t)}function R(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,i=w(n);if(t){var u=w(this).constructor;o=Reflect.construct(i,arguments,u)}else o=i.apply(this,arguments);return function(p,g){if(g&&(typeof g=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var i=function(p,g){for(;!Object.prototype.hasOwnProperty.call(p,g)&&(p=w(p))!==null;);return p}(n,t);if(i){var u=Object.getOwnPropertyDescriptor(i,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},M.apply(this,arguments)}function ve(n){var t=function(o,i){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var p=u.call(o,i);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var K=function(n){return!(!n||!n.Window)&&n instanceof n.Window},O=void 0,G=void 0;function b(n){O=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 _(n){return K(n)?n:(n.ownerDocument||n).defaultView||G.window}typeof window<"u"&&window&&b(window);var y=function(n){return!!n&&d(n)==="object"},T=function(n){return typeof n=="function"},h={window:function(n){return n===G||K(n)},docFrag:function(n){return y(n)&&n.nodeType===11},object:y,func:T,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||d(n)!=="object")return!1;var t=_(n)||G;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return y(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return y(n)&&n.length!==void 0&&T(n.splice)}};function ce(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 Ae(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var i=o.prepared.axis;if(i==="x"||i==="y"){var u=i==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var at={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,i=n.defaults;o.prototype.draggable=at.draggable,t.map.drag=at,t.methodDict.drag="draggable",i.actions.drag=at.defaults},listeners:{"interactions:before-action-move":ce,"interactions:action-resume":ce,"interactions:action-move":Ae,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,i=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(i&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return h.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):h.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:ce,move:Ae,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},we=at,Pe={init:function(n){var t=n;Pe.document=t.document,Pe.DocumentFragment=t.DocumentFragment||Le,Pe.SVGElement=t.SVGElement||Le,Pe.SVGSVGElement=t.SVGSVGElement||Le,Pe.SVGElementInstance=t.SVGElementInstance||Le,Pe.Element=t.Element||Le,Pe.HTMLElement=t.HTMLElement||Pe.Element,Pe.Event=t.Event,Pe.Touch=t.Touch||Le,Pe.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Le(){}var P=Pe,re={init:function(n){var t=P.Element,o=n.navigator||{};re.supportsTouch="ontouchstart"in n||h.func(n.DocumentTouch)&&P.document instanceof n.DocumentTouch,re.supportsPointerEvent=o.pointerEnabled!==!1&&!!P.PointerEvent,re.isIOS=/iP(hone|od|ad)/.test(o.platform),re.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),re.isIe9=/MSIE 9/.test(o.userAgent),re.isOperaMobile=o.appName==="Opera"&&re.supportsTouch&&/Presto/.test(o.userAgent),re.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",re.pEventTypes=re.supportsPointerEvent?P.PointerEvent===n.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,re.wheelEvent=P.document&&"onmousewheel"in P.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ne=re;function pe(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function He(n,t){for(;h.element(n);){if(X(n,t))return n;n=ot(n)}return null}function ot(n){var t=n.parentNode;if(h.docFrag(t)){for(;(t=t.host)&&h.docFrag(t););return t}return t}function X(n,t){return G!==O&&(t=t.replace(/\/deep\//g," ")),n[ne.prefixedMatchesSelector](t)}var A=function(n){return n.parentNode||n.host};function te(n,t){for(var o,i=[],u=n;(o=A(u))&&u!==t&&o!==u.ownerDocument;)i.unshift(u),u=o;return i}function ye(n,t,o){for(;h.element(n);){if(X(n,t))return!0;if((n=ot(n))===o)return X(n,t)}return!1}function ue(n){return n.correspondingUseElement||n}function De(n){var t=n instanceof P.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 Qe(n){var t,o=De(n);if(!ne.isIOS7&&o){var i={x:(t=(t=_(n))||G).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=i.x,o.right+=i.x,o.top+=i.y,o.bottom+=i.y}return o}function ae(n){for(var t=[];n;)t.push(n),n=ot(n);return t}function _e(n){return!!h.string(n)&&(P.document.querySelector(n),!0)}function I(n,t){for(var o in t)n[o]=t[o];return n}function Xe(n,t,o){return n==="parent"?ot(o):n==="self"?t.getRect(o):He(o,n)}function Ye(n,t,o,i){var u=n;return h.string(u)?u=Xe(u,t,o):h.func(u)&&(u=u.apply(void 0,i)),h.element(u)&&(u=Qe(u)),u}function Ie(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function le(n){return!n||"x"in n&&"y"in n||((n=I({},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 Q(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 se(n,t,o){var i=o&&n.options[o];return Ie(Ye(i&&i.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Ee(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(N){return!0},i=arguments.length>3?arguments[3]:void 0;if(i=i||{},h.string(n)&&n.search(" ")!==-1&&(n=qe(n)),h.array(n))return n.forEach(function(N){return Ee(N,t,o,i)}),i;if(h.object(n)&&(t=n,n=""),h.func(t)&&o(n))i[n]=i[n]||[],i[n].push(t);else if(h.array(t))for(var u=0,p=t;u<p.length;u++){var g=p[u];Ee(n,g,o,i)}else if(h.object(t))for(var k in t)Ee(qe(k).map(function(N){return"".concat(n).concat(N)}),t[k],o,i);return i}function qe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},m=["webkit","moz"];function S(n,t){n.__set||(n.__set={});var o=function(u){if(m.some(function(p){return u.indexOf(p)===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(p){n.__set[u]=p},configurable:!0})};for(var i in t)o(i);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 D(n){return n instanceof P.Event||n instanceof P.Touch}function oe(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Ve(n,t){return t=t||{x:0,y:0},ne.isOperaMobile&&D(n)?(oe("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):oe("page",n,t),t}function B(n){return h.number(n.pointerId)?n.pointerId:n.identifier}function ee(n,t,o){var i=t.length>1?W(t):t[0];Ve(i,n.page),function(u,p){p=p||{},ne.isOperaMobile&&D(u)?oe("screen",u,p):oe("client",u,p)}(i,n.client),n.timeStamp=o}function $(n){var t=[];return h.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 W(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var i=n[o];for(var u in t)t[u]+=i[u]}for(var p in t)t[p]/=n.length;return t}function Se(n){if(!n.length)return null;var t=$(n),o=Math.min(t[0].pageX,t[1].pageX),i=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:i,left:o,top:i,right:u,bottom:p,width:u-o,height:p-i}}function ie(n,t){var o=t+"X",i=t+"Y",u=$(n),p=u[0][o]-u[1][o],g=u[0][i]-u[1][i];return dt(p,g)}function q(n,t){var o=t+"X",i=t+"Y",u=$(n),p=u[1][o]-u[0][o],g=u[1][i]-u[0][i];return 180*Math.atan2(g,p)/Math.PI}function Z(n){return h.string(n.pointerType)?n.pointerType:h.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof P.Touch?"touch":"mouse"}function de(n){var t=h.func(n.composedPath)?n.composedPath():n.path;return[ue(t?t[0]:n.target),ue(n.currentTarget)]}var me=function(){function n(t){c(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return v(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(me.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Ce=function(n,t){for(var o=0;o<t.length;o++){var i=t[o];n.push(i)}return n},be=function(n){return Ce([],n)},j=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},Me=function(n,t){return n[j(n,t)]},ge=function(n){C(o,n);var t=H(o);function o(i,u,p){var g;c(this,o),(g=t.call(this,u._interaction)).dropzone=void 0,g.dragEvent=void 0,g.relatedTarget=void 0,g.draggable=void 0,g.propagationStopped=!1,g.immediatePropagationStopped=!1;var k=p==="dragleave"?i.prev:i.cur,N=k.element,L=k.dropzone;return g.type=p,g.target=N,g.currentTarget=N,g.dropzone=L,g.dragEvent=u,g.relatedTarget=u.target,g.draggable=u.interactable,g.timeStamp=u.timeStamp,g}return v(o,[{key:"reject",value:function(){var i=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 p=u.activeDrops,g=j(p,function(N){var L=N.dropzone,z=N.element;return L===i.dropzone&&z===i.target});u.activeDrops.splice(g,1);var k=new o(u,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}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}(me);function Ue(n,t){for(var o=0,i=n.slice();o<i.length;o++){var u=i[o],p=u.dropzone,g=u.element;t.dropzone=p,t.target=g,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function rt(n,t){for(var o=function(p,g){for(var k=[],N=0,L=p.interactables.list;N<L.length;N++){var z=L[N];if(z.options.drop.enabled){var Y=z.options.drop.accept;if(!(h.element(Y)&&Y!==g||h.string(Y)&&!X(g,Y)||h.func(Y)&&!Y({dropzone:z,draggableElement:g})))for(var ke=0,Re=z.getAllElements();ke<Re.length;ke++){var ze=Re[ke];ze!==g&&k.push({dropzone:z,element:ze,rect:z.getRect(ze)})}}}return k}(n,t),i=0;i<o.length;i++){var u=o[i];u.rect=u.dropzone.getRect(u.element)}return o}function $e(n,t,o){for(var i=n.dropState,u=n.interactable,p=n.element,g=[],k=0,N=i.activeDrops;k<N.length;k++){var L=N[k],z=L.dropzone,Y=L.element,ke=L.rect,Re=z.dropCheck(t,o,u,p,Y,ke);g.push(Re?Y:null)}var ze=function(We){for(var lt,tt,ht,Et=[],Nt=0;Nt<We.length;Nt++){var kt=We[Nt],St=We[lt];if(kt&&Nt!==lt)if(St){var Qt=A(kt),$t=A(St);if(Qt!==kt.ownerDocument)if($t!==kt.ownerDocument)if(Qt!==$t){Et=Et.length?Et:te(St);var sn=void 0;if(St instanceof P.HTMLElement&&kt instanceof P.SVGElement&&!(kt instanceof P.SVGSVGElement)){if(kt===$t)continue;sn=kt.ownerSVGElement}else sn=kt;for(var fn=te(sn,St.ownerDocument),xn=0;fn[xn]&&fn[xn]===Et[xn];)xn++;var Na=[fn[xn-1],fn[xn],Et[xn]];if(Na[0])for(var ga=Na[0].lastChild;ga;){if(ga===Na[1]){lt=Nt,Et=fn;break}if(ga===Na[2])break;ga=ga.previousSibling}}else ht=St,(parseInt(_(tt=kt).getComputedStyle(tt).zIndex,10)||0)>=(parseInt(_(ht).getComputedStyle(ht).zIndex,10)||0)&&(lt=Nt);else lt=Nt}else lt=Nt}return lt}(g);return i.activeDrops[ze]||null}function nt(n,t,o){var i=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ge(i,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ge(i,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),i.rejected||(i.cur.element!==i.prev.element&&(i.prev.dropzone&&(u.leave=new ge(i,o,"dragleave"),o.dragLeave=u.leave.target=i.prev.element,o.prevDropzone=u.leave.dropzone=i.prev.dropzone),i.cur.dropzone&&(u.enter=new ge(i,o,"dragenter"),o.dragEnter=i.cur.element,o.dropzone=i.cur.dropzone)),o.type==="dragend"&&i.cur.dropzone&&(u.drop=new ge(i,o,"drop"),o.dropzone=i.cur.dropzone,o.relatedTarget=i.cur.element),o.type==="dragmove"&&i.cur.dropzone&&(u.move=new ge(i,o,"dropmove"),o.dropzone=i.cur.dropzone)),u}function Be(n,t){var o=n.dropState,i=o.activeDrops,u=o.cur,p=o.prev;t.leave&&p.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&&Ue(i,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function mt(n,t){var o=n.interaction,i=n.iEvent,u=n.event;if(i.type==="dragmove"||i.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=rt(t,o.element));var g=i,k=$e(o,g,u);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=nt(o,0,g)}}var et={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,i=n.Interactable,u=n.defaults;n.usePlugin(we),i.prototype.dropzone=function(p){return function(g,k){if(h.object(k)){if(g.options.drop.enabled=k.enabled!==!1,k.listeners){var N=Ee(k.listeners),L=Object.keys(N).reduce(function(Y,ke){return Y[/^(enter|leave)/.test(ke)?"drag".concat(ke):/^(activate|deactivate|move)/.test(ke)?"drop".concat(ke):ke]=N[ke],Y},{}),z=g.options.drop.listeners;z&&g.off(z),g.on(L),g.options.drop.listeners=L}return h.func(k.ondrop)&&g.on("drop",k.ondrop),h.func(k.ondropactivate)&&g.on("dropactivate",k.ondropactivate),h.func(k.ondropdeactivate)&&g.on("dropdeactivate",k.ondropdeactivate),h.func(k.ondragenter)&&g.on("dragenter",k.ondragenter),h.func(k.ondragleave)&&g.on("dragleave",k.ondragleave),h.func(k.ondropmove)&&g.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?g.options.drop.overlap=k.overlap:h.number(k.overlap)&&(g.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(g.options.drop.accept=k.accept),"checker"in k&&(g.options.drop.checker=k.checker),g}return h.bool(k)?(g.options.drop.enabled=k,g):g.options.drop}(this,p)},i.prototype.dropCheck=function(p,g,k,N,L,z){return function(Y,ke,Re,ze,We,lt,tt){var ht=!1;if(!(tt=tt||Y.getRect(lt)))return!!Y.options.drop.checker&&Y.options.drop.checker(ke,Re,ht,Y,lt,ze,We);var Et=Y.options.drop.overlap;if(Et==="pointer"){var Nt=se(ze,We,"drag"),kt=Ve(ke);kt.x+=Nt.x,kt.y+=Nt.y;var St=kt.x>tt.left&&kt.x<tt.right,Qt=kt.y>tt.top&&kt.y<tt.bottom;ht=St&&Qt}var $t=ze.getRect(We);if($t&&Et==="center"){var sn=$t.left+$t.width/2,fn=$t.top+$t.height/2;ht=sn>=tt.left&&sn<=tt.right&&fn>=tt.top&&fn<=tt.bottom}return $t&&h.number(Et)&&(ht=Math.max(0,Math.min(tt.right,$t.right)-Math.max(tt.left,$t.left))*Math.max(0,Math.min(tt.bottom,$t.bottom)-Math.max(tt.top,$t.top))/($t.width*$t.height)>=Et),Y.options.drop.checker&&(ht=Y.options.drop.checker(ke,Re,ht,Y,lt,ze,We)),ht}(this,p,g,k,N,L,z)},o.dynamicDrop=function(p){return h.bool(p)?(n.dynamicDrop=p,o):n.dynamicDrop},I(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=et.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,i=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=rt(t,o.element),u.events=nt(o,0,i),u.events.activate&&(Ue(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:i}))}},"interactions:action-move":mt,"interactions:after-action-move":function(n,t){var o=n.interaction,i=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;Be(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:i}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,i=n.iEvent;mt(n,t),Be(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:i})}},"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:rt,getDrop:$e,getDropEvents:nt,fireDropEvents:Be,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Oe=et;function it(n){var t=n.interaction,o=n.iEvent,i=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(L){return L.pointer}),p=i==="start",g=i==="end",k=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],p)o.distance=ie(u,k),o.box=Se(u),o.scale=1,o.ds=0,o.angle=q(u,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(g||t.pointers.length<2){var N=t.prevEvent;o.distance=N.distance,o.box=N.box,o.scale=N.scale,o.ds=0,o.angle=N.angle,o.da=0}else o.distance=ie(u,k),o.box=Se(u),o.scale=o.distance/t.gesture.startDistance,o.angle=q(u,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,h.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var gt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,i=n.defaults;o.prototype.gesturable=function(u){return h.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):h.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=gt,t.methodDict.gesture="gesturable",i.actions.gesture=gt.defaults},listeners:{"interactions:action-start":it,"interactions:action-move":it,"interactions:action-end":it,"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}},Je=gt;function je(n,t,o,i,u,p,g){if(!t)return!1;if(t===!0){var k=h.number(p.width)?p.width:p.right-p.left,N=h.number(p.height)?p.height:p.bottom-p.top;if(g=Math.min(g,Math.abs((n==="left"||n==="right"?k:N)/2)),k<0&&(n==="left"?n="right":n==="right"&&(n="left")),N<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var L=k>=0?p.left:p.right;return o.x<L+g}if(n==="top"){var z=N>=0?p.top:p.bottom;return o.y<z+g}if(n==="right")return o.x>(k>=0?p.right:p.left)-g;if(n==="bottom")return o.y>(N>=0?p.bottom:p.top)-g}return!!h.element(i)&&(h.element(t)?t===i:ye(i,t,u))}function It(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var i=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?i.delta.x=i.delta.y:i.delta.y=i.delta.x,i.axes="xy"):(i.axes=o.resizeAxes,o.resizeAxes==="x"?i.delta.y=0:o.resizeAxes==="y"&&(i.delta.x=0))}}var Te,Ge,Fe={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,i=n.Interactable,u=n.defaults;Fe.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Fe.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,i.prototype.resizable=function(p){return function(g,k,N){return h.object(k)?(g.options.resize.enabled=k.enabled!==!1,g.setPerAction("resize",k),g.setOnEvents("resize",k),h.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?g.options.resize.axis=k.axis:k.axis===null&&(g.options.resize.axis=N.defaults.actions.resize.axis),h.bool(k.preserveAspectRatio)?g.options.resize.preserveAspectRatio=k.preserveAspectRatio:h.bool(k.square)&&(g.options.resize.square=k.square),g):h.bool(k)?(g.options.resize.enabled=k,g):g.options.resize}(this,p,n)},t.map.resize=Fe,t.methodDict.resize="resizable",u.actions.resize=Fe.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var u=o,p=i.rect;i._rects={start:I({},p),corrected:I({},p),previous:I({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=i.prepared.edges,u.rect=i._rects.corrected,u.deltaRect=i._rects.delta}})(n),It(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var u=o,p=i.interactable.options.resize.invert,g=p==="reposition"||p==="negate",k=i.rect,N=i._rects,L=N.start,z=N.corrected,Y=N.delta,ke=N.previous;if(I(ke,z),g){if(I(z,k),p==="reposition"){if(z.top>z.bottom){var Re=z.top;z.top=z.bottom,z.bottom=Re}if(z.left>z.right){var ze=z.left;z.left=z.right,z.right=ze}}}else z.top=Math.min(k.top,L.bottom),z.bottom=Math.max(k.bottom,L.top),z.left=Math.min(k.left,L.right),z.right=Math.max(k.right,L.left);for(var We in z.width=z.right-z.left,z.height=z.bottom-z.top,z)Y[We]=z[We]-ke[We];u.edges=i.prepared.edges,u.rect=z,u.deltaRect=Y}})(n),It(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var i=t;i.edges=o.prepared.edges,i.rect=o._rects.corrected,i.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,i=n.element,u=n.rect,p=n.buttons;if(u){var g=I({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(h.object(k.edges)){var N={left:!1,right:!1,top:!1,bottom:!1};for(var L in N)N[L]=je(L,k.edges[L],g,t._latestPointer.eventTarget,i,u,k.margin||Fe.defaultMargin);N.left=N.left&&!N.right,N.top=N.top&&!N.bottom,(N.left||N.right||N.top||N.bottom)&&(n.action={name:"resize",edges:N})}else{var z=k.axis!=="y"&&g.x>u.right-Fe.defaultMargin,Y=k.axis!=="x"&&g.y>u.bottom-Fe.defaultMargin;(z||Y)&&(n.action={name:"resize",axes:(z?"x":"")+(Y?"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,i=n.name,u=Fe.cursors,p=null;if(o)p=u[i+o];else if(t){for(var g="",k=0,N=["top","bottom","left","right"];k<N.length;k++){var L=N[k];t[L]&&(g+=L)}p=u[g]}return p},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Ze=Fe,E={id:"actions",install:function(n){n.usePlugin(Je),n.usePlugin(Ze),n.usePlugin(we),n.usePlugin(Oe)}},fe=0,Ke={request:function(n){return Te(n)},cancel:function(n){return Ge(n)},init:function(n){if(Te=n.requestAnimationFrame,Ge=n.cancelAnimationFrame,!Te)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var i=t[o];Te=n["".concat(i,"RequestAnimationFrame")],Ge=n["".concat(i,"CancelAnimationFrame")]||n["".concat(i,"CancelRequestAnimationFrame")]}Te=Te&&Te.bind(n),Ge=Ge&&Ge.bind(n),Te||(Te=function(u){var p=Date.now(),g=Math.max(0,16-(p-fe)),k=n.setTimeout(function(){u(p+g)},g);return fe=p+g,k},Ge=function(u){return clearTimeout(u)})}},he={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){he.isScrolling=!0,Ke.cancel(he.i),n.autoScroll=he,he.interaction=n,he.prevTime=he.now(),he.i=Ke.request(he.scroll)},stop:function(){he.isScrolling=!1,he.interaction&&(he.interaction.autoScroll=null),Ke.cancel(he.i)},scroll:function(){var n=he.interaction,t=n.interactable,o=n.element,i=n.prepared.name,u=t.options[i].autoScroll,p=ut(u.container,t,o),g=he.now(),k=(g-he.prevTime)/1e3,N=u.speed*k;if(N>=1){var L={x:he.x*N,y:he.y*N};if(L.x||L.y){var z=st(p);h.window(p)?p.scrollBy(L.x,L.y):p&&(p.scrollLeft+=L.x,p.scrollTop+=L.y);var Y=st(p),ke={x:Y.x-z.x,y:Y.y-z.y};(ke.x||ke.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:ke,interaction:n,container:p})}he.prevTime=g}he.isScrolling&&(Ke.cancel(he.i),he.i=Ke.request(he.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()&&he.check(t.interactable,t.prepared.name))if(t.simulation)he.x=he.y=0;else{var i,u,p,g,k=t.interactable,N=t.element,L=t.prepared.name,z=k.options[L].autoScroll,Y=ut(z.container,k,N);if(h.window(Y))g=o.clientX<he.margin,i=o.clientY<he.margin,u=o.clientX>Y.innerWidth-he.margin,p=o.clientY>Y.innerHeight-he.margin;else{var ke=De(Y);g=o.clientX<ke.left+he.margin,i=o.clientY<ke.top+he.margin,u=o.clientX>ke.right-he.margin,p=o.clientY>ke.bottom-he.margin}he.x=u?1:g?-1:0,he.y=p?1:i?-1:0,he.isScrolling||(he.margin=z.margin,he.speed=z.speed,he.start(t))}}};function ut(n,t,o){return(h.string(n)?Xe(n,t,o):n)||_(o)}function st(n){return h.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var xt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=he,he.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=he.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,he.stop(),he.interaction&&(he.interaction=null)},"interactions:stop":he.stop,"interactions:action-move":function(n){return he.onInteractionMove(n)}}},pt=xt;function ct(n,t){var o=!1;return function(){return o||(G.console.warn(t),o=!0),n.apply(this,arguments)}}function ft(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function wt(n){return h.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Tt(n){return h.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var jt={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,i,u,p){var g=function(k,N,L,z,Y){var ke=k.getRect(z),Re=N.buttons||{0:1,1:4,3:8,4:16}[N.button],ze={action:null,interactable:k,interaction:L,element:z,rect:ke,buttons:Re};return Y.fire("auto-start:check",ze),ze.action}(this,i,u,p,n);return this.options.actionChecker?this.options.actionChecker(o,i,g,this,p,u):g},t.prototype.ignoreFrom=ct(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=ct(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Tt,t.prototype.styleCursor=wt}};function vt(n,t,o,i,u){return t.testIgnoreAllow(t.options[n.name],o,i)&&t.options[n.name].enabled&&Wt(t,o,n,u)?n:null}function Mt(n,t,o,i,u,p,g){for(var k=0,N=i.length;k<N;k++){var L=i[k],z=u[k],Y=L.getAction(t,o,n,z);if(Y){var ke=vt(Y,L,z,p,g);if(ke)return{action:ke,interactable:L,element:z}}}return{action:null,interactable:null,element:null}}function Lt(n,t,o,i,u){var p=[],g=[],k=i;function N(z){p.push(z),g.push(k)}for(;h.element(k);){p=[],g=[],u.interactables.forEachMatch(k,N);var L=Mt(n,t,o,p,g,i,u);if(L.action&&!L.interactable.options[L.action.name].manualStart)return L;k=ot(k)}return{action:null,interactable:null,element:null}}function Ut(n,t,o){var i=t.action,u=t.interactable,p=t.element;i=i||{name:null},n.interactable=u,n.element=p,ft(n.prepared,i),n.rect=u&&i.name?u.getRect(p):null,En(n,o),o.fire("autoStart:prepared",{interaction:n})}function Wt(n,t,o,i){var u=n.options,p=u[o.name].max,g=u[o.name].maxPerElement,k=i.autoStart.maxInteractions,N=0,L=0,z=0;if(!(p&&g&&k))return!1;for(var Y=0,ke=i.interactions.list;Y<ke.length;Y++){var Re=ke[Y],ze=Re.prepared.name;if(Re.interacting()&&(++N>=k||Re.interactable===n&&((L+=ze===o.name?1:0)>=p||Re.element===t&&(z++,ze===o.name&&z>=g))))return!1}return k>0}function Jt(n,t){return h.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function Pt(n,t,o){var i=o.autoStart.cursorElement;i&&i!==n&&(i.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function En(n,t){var o=n.interactable,i=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(u.name){var g=o.options[u.name].cursorChecker;p=h.func(g)?g(u,o,i,n._interacting):t.actions.map[u.name].getCursor(u)}Pt(n.element,p||"",t)}else t.autoStart.cursorElement&&Pt(t.autoStart.cursorElement,"",t)}var zn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(jt),o.base.actionChecker=null,o.base.styleCursor=!0,I(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(i){return Jt(i,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Wt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,i=n.pointer,u=n.event,p=n.eventTarget;o.interacting()||Ut(o,Lt(o,i,u,p,t),t)},"interactions:move":function(n,t){(function(o,i){var u=o.interaction,p=o.pointer,g=o.event,k=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Ut(u,Lt(u,p,g,k,i),i)})(n,t),function(o,i){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){i.fire("autoStart:before-start",o);var p=u.interactable,g=u.prepared.name;g&&p&&(p.options[g].manualStart||!Wt(p,u.element,u.prepared,i)?u.stop():(u.start(u.prepared,p,u.element),En(u,i)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,i=o.interactable;i&&i.options.styleCursor&&Pt(o.element,"",t)}},maxInteractions:Jt,withinInteractionLimit:Wt,validateAction:vt},gn=zn,Fn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,i=n.eventTarget,u=n.dx,p=n.dy;if(o.prepared.name==="drag"){var g=Math.abs(u),k=Math.abs(p),N=o.interactable.options.drag,L=N.startAxis,z=g>k?"x":g<k?"y":"xy";if(o.prepared.axis=N.lockAxis==="start"?z[0]:N.lockAxis,z!=="xy"&&L!=="xy"&&L!==z){o.prepared.name=null;for(var Y=i,ke=function(ze){if(ze!==o.interactable){var We=o.interactable.options.drag;if(!We.manualStart&&ze.testIgnoreAllow(We,Y,i)){var lt=ze.getAction(o.downPointer,o.downEvent,o,Y);if(lt&&lt.name==="drag"&&function(tt,ht){if(!ht)return!1;var Et=ht.options.drag.startAxis;return tt==="xy"||Et==="xy"||Et===tt}(z,ze)&&gn.validateAction(lt,ze,Y,i,t))return ze}}};h.element(Y);){var Re=t.interactables.forEachMatch(Y,ke);if(Re){o.prepared.name="drag",o.interactable=Re,o.element=Y;break}Y=ot(Y)}}}}}};function yn(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 Rn={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(gn),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=yn(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;yn(t)>0&&(t.prepared.name=null)}},getHoldDuration:yn},Pn=Rn,Ln={id:"auto-start",install:function(n){n.usePlugin(gn),n.usePlugin(Pn),n.usePlugin(Fn)}},$n=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):h.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 Sn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=$n,t.prototype.checkAndPreventDefault=function(o){return function(i,u,p){var g=i.options.preventDefault;if(g!=="never")if(g!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=_(p.target).document,N=u.getDocOptions(k);if(!N||!N.events||N.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||h.element(p.target)&&X(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var i=0,u=n.interactions.list;i<u.length;i++){var p=u[i];if(p.element&&(p.element===o.target||pe(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=jn,n},{})};function hn(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 un(n){var t={};for(var o in n){var i=n[o];h.plainObject(i)?t[o]=un(i):h.array(i)?t[o]=be(i):t[o]=i}return t}var bn=function(){function n(t){c(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=vn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var i,u,p=t.phase,g=this.interaction,k=function(L){var z=L.interactable.options[L.prepared.name],Y=z.modifiers;return Y&&Y.length?Y:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(ke){var Re=z[ke];return Re&&Re.enabled&&{options:Re,methods:Re._methods}}).filter(function(ke){return!!ke})}(g);this.prepareStates(k),this.startEdges=I({},g.edges),this.edges=I({},this.startEdges),this.startOffset=(i=g.rect,u=o,i?{left:u.x-i.left,top:u.y-i.top,right:i.right-u.x,bottom:i.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var N=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=vn(),this.startAll(N),this.result=this.setAll(N)}},{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,i=this.states;o<i.length;o++){var u=i[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,i=t.preEnd,u=t.skipModifiers,p=t.rect,g=t.edges;t.coords=I({},t.pageCoords),t.rect=I({},p),t.edges=I({},g);for(var k=u?this.states.slice(u):this.states,N=vn(t.coords,t.rect),L=0;L<k.length;L++){var z,Y=k[L],ke=Y.options,Re=I({},t.coords),ze=null;(z=Y.methods)!=null&&z.set&&this.shouldDo(ke,i,o)&&(t.state=Y,ze=Y.methods.set(t),Q(t.edges,t.rect,{x:t.coords.x-Re.x,y:t.coords.y-Re.y})),N.eventProps.push(ze)}I(this.edges,t.edges),N.delta.x=t.coords.x-t.pageCoords.x,N.delta.y=t.coords.y-t.pageCoords.y,N.rectDelta.left=t.rect.left-p.left,N.rectDelta.right=t.rect.right-p.right,N.rectDelta.top=t.rect.top-p.top,N.rectDelta.bottom=t.rect.bottom-p.bottom;var We=this.result.coords,lt=this.result.rect;if(We&&lt){var tt=N.rect.left!==lt.left||N.rect.right!==lt.right||N.rect.top!==lt.top||N.rect.bottom!==lt.bottom;N.changed=tt||We.x!==N.coords.x||We.y!==N.coords.y}return N}},{key:"applyToInteraction",value:function(t){var o=this.interaction,i=t.phase,u=o.coords.cur,p=o.coords.start,g=this.result,k=this.startDelta,N=g.delta;i==="start"&&I(this.startDelta,g.delta);for(var L=0,z=[[p,k],[u,N]];L<z.length;L++){var Y=z[L],ke=Y[0],Re=Y[1];ke.page.x+=Re.x,ke.page.y+=Re.y,ke.client.x+=Re.x,ke.client.y+=Re.y}var ze=this.result.rectDelta,We=t.rect||o.rect;We.left+=ze.left,We.right+=ze.right,We.top+=ze.top,We.bottom+=ze.bottom,We.width=We.right-We.left,We.height=We.bottom-We.top}},{key:"setAndApply",value:function(t){var o=this.interaction,i=t.phase,u=t.preEnd,p=t.skipModifiers,g=this.setAll(this.fillArg({preEnd:u,phase:i,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=g,!g.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,N={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};g.coords.x+=N.x,g.coords.y+=N.y,g.delta.x+=N.x,g.delta.y+=N.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,i=t.event,u=this.states;if(u&&u.length){for(var p=!1,g=0;g<u.length;g++){var k=u[g];t.state=k;var N=k.options,L=k.methods,z=L.beforeEnd&&L.beforeEnd(t);if(z)return this.endResult=z,!1;p=p||!p&&this.shouldDo(N,!0,t.phase,!0)}p&&o.move({event:i,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var i=I({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(i);for(var u=0,p=this.states;u<p.length;u++){var g=p[u];i.state=g,g.methods.stop&&g.methods.stop(i)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var i=t[o],u=i.options,p=i.methods,g=i.name;this.states.push({options:u,methods:p,index:o,name:g})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,i=o.coords,u=o.rect,p=o.modification;if(p.result){for(var g=p.startDelta,k=p.result,N=k.delta,L=k.rectDelta,z=0,Y=[[i.start,g],[i.cur,N]];z<Y.length;z++){var ke=Y[z],Re=ke[0],ze=ke[1];Re.page.x-=ze.x,Re.page.y-=ze.y,Re.client.x-=ze.x,Re.client.y-=ze.y}u.left-=L.left,u.right-=L.right,u.top-=L.top,u.bottom-=L.bottom}}},{key:"shouldDo",value:function(t,o,i,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||i==="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 un(o)}),this.result=vn(I({},t.result.coords),I({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function vn(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 nn(n,t){var o=n.defaults,i={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(p){var g=p||{};for(var k in g.enabled=g.enabled!==!1,o)k in g||(g[k]=o[k]);var N={options:g,methods:i,name:t,enable:function(){return g.enabled=!0,N},disable:function(){return g.enabled=!1,N}};return N};return t&&typeof t=="string"&&(u._defaults=o,u._methods=i),u}function pn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Un={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new bn(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,i=o.setAndApply(n);return t.edges=o.edges,i},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,i=o.beforeEnd(n);return t.edges=o.startEdges,i},"interactions:action-start":pn,"interactions:action-move":pn,"interactions:action-end":pn,"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)}}},Tn=Un,Bn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},kn=function(n){C(o,n);var t=H(o);function o(i,u,p,g,k,N,L){var z;c(this,o),(z=t.call(this,i)).relatedTarget=null,z.screenX=void 0,z.screenY=void 0,z.button=void 0,z.buttons=void 0,z.ctrlKey=void 0,z.shiftKey=void 0,z.altKey=void 0,z.metaKey=void 0,z.page=void 0,z.client=void 0,z.delta=void 0,z.rect=void 0,z.x0=void 0,z.y0=void 0,z.t0=void 0,z.dt=void 0,z.duration=void 0,z.clientX0=void 0,z.clientY0=void 0,z.velocity=void 0,z.speed=void 0,z.swipe=void 0,z.axes=void 0,z.preEnd=void 0,k=k||i.element;var Y=i.interactable,ke=(Y&&Y.options||Bn).deltaSource,Re=se(Y,k,p),ze=g==="start",We=g==="end",lt=ze?R(z):i.prevEvent,tt=ze?i.coords.start:We?{page:lt.page,client:lt.client,timeStamp:i.coords.cur.timeStamp}:i.coords.cur;return z.page=I({},tt.page),z.client=I({},tt.client),z.rect=I({},i.rect),z.timeStamp=tt.timeStamp,We||(z.page.x-=Re.x,z.page.y-=Re.y,z.client.x-=Re.x,z.client.y-=Re.y),z.ctrlKey=u.ctrlKey,z.altKey=u.altKey,z.shiftKey=u.shiftKey,z.metaKey=u.metaKey,z.button=u.button,z.buttons=u.buttons,z.target=k,z.currentTarget=k,z.preEnd=N,z.type=L||p+(g||""),z.interactable=Y,z.t0=ze?i.pointers[i.pointers.length-1].downTime:lt.t0,z.x0=i.coords.start.page.x-Re.x,z.y0=i.coords.start.page.y-Re.y,z.clientX0=i.coords.start.client.x-Re.x,z.clientY0=i.coords.start.client.y-Re.y,z.delta=ze||We?{x:0,y:0}:{x:z[ke].x-lt[ke].x,y:z[ke].y-lt[ke].y},z.dt=i.coords.delta.timeStamp,z.duration=z.timeStamp-z.t0,z.velocity=I({},i.coords.velocity[ke]),z.speed=dt(z.velocity.x,z.velocity.y),z.swipe=We||g==="inertiastart"?z.getSwipe():null,z}return v(o,[{key:"getSwipe",value:function(){var i=this._interaction;if(i.prevEvent.speed<600||this.timeStamp-i.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(i.prevEvent.velocityY,i.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var p=112.5<=u&&u<247.5,g=202.5<=u&&u<337.5;return{up:g,down:!g&&22.5<=u&&u<157.5,left:p,right:!p&&(292.5<=u||u<67.5),angle:u,speed:i.prevEvent.speed,velocity:{x:i.prevEvent.velocityX,y:i.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(me);Object.defineProperties(kn.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 Kn=v(function n(t,o,i,u,p){c(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=i,this.downTime=u,this.downTarget=p}),Wn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),In=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Hn=0,qn=function(){function n(t){var o=this,i=t.pointerType,u=t.scopeFire;c(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ct(function(z){this.move(z)},"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=Hn++,this._scopeFire=u,this.pointerType=i;var p=this;this._proxy={};var g=function(z){Object.defineProperty(o._proxy,z,{get:function(){return p[z]}})};for(var k in Wn)g(k);var N=function(z){Object.defineProperty(o._proxy,z,{value:function(){return p[z].apply(p,arguments)}})};for(var L in In)N(L);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,i){var u=this.updatePointer(t,o,i,!0),p=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:i,pointerIndex:u,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,i){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(ft(this.prepared,t),this.interactable=o,this.element=i,this.rect=o.getRect(i),this.edges=this.prepared.edges?I({},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,i){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,i,!1);var u,p,g=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(u=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(u,p)>this.pointerMoveTolerance);var k,N,L,z=this.getPointerIndex(t),Y={pointer:t,pointerIndex:z,pointerInfo:this.pointers[z],event:o,type:"move",eventTarget:i,dx:u,dy:p,duplicate:g,interaction:this};g||(k=this.coords.velocity,N=this.coords.delta,L=Math.max(N.timeStamp/1e3,.001),k.page.x=N.page.x/L,k.page.y=N.page.y/L,k.client.x=N.client.x/L,k.client.y=N.client.y/L,k.timeStamp=L),this._scopeFire("interactions:move",Y),g||this.simulation||(this.interacting()&&(Y.type=null,this.move(Y)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||J(this.coords.delta),(t=I({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,i,u){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,i,!1));var g=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:i,type:g,curEventTarget:u,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=B(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:j(this.pointers,function(i){return i.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,i,u){var p,g,k,N=B(t),L=this.getPointerIndex(t),z=this.pointers[L];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),z?z.pointer=t:(z=new Kn(N,t,o,null,null),L=this.pointers.length,this.pointers.push(z)),ee(this.coords.cur,this.pointers.map(function(Y){return Y.pointer}),this._now()),p=this.coords.delta,g=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-g.page.x,p.page.y=k.page.y-g.page.y,p.client.x=k.client.x-g.client.x,p.client.y=k.client.y-g.client.y,p.timeStamp=k.timeStamp-g.timeStamp,u&&(this.pointerIsDown=!0,z.downTime=this.coords.cur.timeStamp,z.downTarget=i,S(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,i),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:i,down:u,pointerInfo:z,pointerIndex:L,interaction:this}),L}},{key:"removePointer",value:function(t,o){var i=this.getPointerIndex(t);if(i!==-1){var u=this.pointers[i];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:i,pointerInfo:u,interaction:this}),this.pointers.splice(i,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,i){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=i}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,i,u){return new kn(this,t,this.prepared.name,o,this.element,i,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,i=t.phase,u=t.preEnd,p=t.type,g=this.rect;if(g&&i==="move"&&(Q(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(i),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,i,u,p);return this._scopeFire("interactions:action-".concat(i),t),i==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(i),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function _t(n){Yt(n.interaction)}function Yt(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Ot(n.coords.cur,t),Ot(n.coords.delta,t),Q(n.edges,n.rect,t),t.x=0,t.y=0,!0}function yt(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 Ot(n,t){var o=n.page,i=n.client,u=t.x,p=t.y;o.x+=u,o.y+=p,i.x+=u,i.y+=p}In.offsetBy="";var bt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=yt},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&&(Ot(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":_t,"interactions:before-action-move":_t,"interactions:before-action-end":function(n){var t=n.interaction;if(Yt(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}}},Kt=bt,Dt=function(){function n(t){c(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return v(n,[{key:"start",value:function(t){var o=this.interaction,i=Ct(o);if(!i||!i.enabled)return!1;var u=o.coords.velocity.client,p=dt(u.x,u.y),g=this.modification||(this.modification=new bn(o));if(g.copyFrom(o.modification),this.t0=o._now(),this.allowResume=i.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=g.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>i.minSpeed&&p>i.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,i=Ct(this.interaction),u=i.resistance,p=-Math.log(i.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-p)/u,y:(o.y-p)/u},this.te=p,this.lambda_v0=u/this.v0,this.one_ve_v0=1-i.endSpeed/this.v0;var g=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(k),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=Ke.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,i,u,p,g,k,N=this,L=this.interaction,z=Ct(L).resistance,Y=(L._now()-this.t0)/1e3;if(Y<this.te){var ke,Re=1-(Math.exp(-z*Y)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,i=this.targetOffset.x,u=this.targetOffset.y,p=this.modifiedOffset.x,g=this.modifiedOffset.y,ke={x:Vt(k=Re,t,i,p),y:Vt(k,o,u,g)}):ke={x:this.targetOffset.x*Re,y:this.targetOffset.y*Re};var ze={x:ke.x-this.currentOffset.x,y:ke.y-this.currentOffset.y};this.currentOffset.x+=ze.x,this.currentOffset.y+=ze.y,L.offsetBy(ze),L.move(),this.onNextFrame(function(){return N.inertiaTick()})}else L.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,i=o._now()-this.t0,u=Ct(o).smoothEndDuration;if(i<u){var p={x:Ft(i,0,this.targetOffset.x,u),y:Ft(i,0,this.targetOffset.y,u)},g={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=g.x,this.currentOffset.y+=g.y,o.offsetBy(g),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,i=t.event,u=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,i,u,!0),p._doPhase({interaction:p,event:i,phase:"resume"}),U(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ke.cancel(this.timeout)}}]),n}();function Ct(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var zt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(Kt),n.usePlugin(Tn),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new Dt(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,i=t.inertia;if(i.active)for(var u=o;h.element(u);){if(u===t.element){i.resume(n);break}u=ot(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":pn,"interactions:action-inertiastart":pn,"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 Vt(n,t,o,i){var u=1-n;return u*u*t+2*u*n*o+n*n*i}function Ft(n,t,o,i){return-o*(n/=i)*(n-2)+t}var Ht=zt;function an(n,t){for(var o=0;o<t.length;o++){var i=t[o];if(n.immediatePropagationStopped)break;i(n)}}var Nn=function(){function n(t){c(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=I({},t||{})}return v(n,[{key:"fire",value:function(t){var o,i=this.global;(o=this.types[t.type])&&an(t,o),!t.propagationStopped&&i&&(o=i[t.type])&&an(t,o)}},{key:"on",value:function(t,o){var i=Ee(t,o);for(t in i)this.types[t]=Ce(this.types[t]||[],i[t])}},{key:"off",value:function(t,o){var i=Ee(t,o);for(t in i){var u=this.types[t];if(u&&u.length)for(var p=0,g=i[t];p<g.length;p++){var k=g[p],N=u.indexOf(k);N!==-1&&u.splice(N,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Gn=function(){function n(t){c(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,S(this,t)}return v(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function An(n){return h.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Xn(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Ea={id:"events",install:function(n){var t,o=[],i={},u=[],p={add:g,remove:k,addDelegate:function(z,Y,ke,Re,ze){var We=An(ze);if(!i[ke]){i[ke]=[];for(var lt=0;lt<u.length;lt++){var tt=u[lt];g(tt,ke,N),g(tt,ke,L,!0)}}var ht=i[ke],Et=Me(ht,function(Nt){return Nt.selector===z&&Nt.context===Y});Et||(Et={selector:z,context:Y,listeners:[]},ht.push(Et)),Et.listeners.push({func:Re,options:We})},removeDelegate:function(z,Y,ke,Re,ze){var We,lt=An(ze),tt=i[ke],ht=!1;if(tt)for(We=tt.length-1;We>=0;We--){var Et=tt[We];if(Et.selector===z&&Et.context===Y){for(var Nt=Et.listeners,kt=Nt.length-1;kt>=0;kt--){var St=Nt[kt];if(St.func===Re&&Xn(St.options,lt)){Nt.splice(kt,1),Nt.length||(tt.splice(We,1),k(Y,ke,N),k(Y,ke,L,!0)),ht=!0;break}}if(ht)break}}},delegateListener:N,delegateUseCapture:L,delegatedEvents:i,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function g(z,Y,ke,Re){if(z.addEventListener){var ze=An(Re),We=Me(o,function(lt){return lt.eventTarget===z});We||(We={eventTarget:z,events:{}},o.push(We)),We.events[Y]||(We.events[Y]=[]),Me(We.events[Y],function(lt){return lt.func===ke&&Xn(lt.options,ze)})||(z.addEventListener(Y,ke,p.supportsOptions?ze:ze.capture),We.events[Y].push({func:ke,options:ze}))}}function k(z,Y,ke,Re){if(z.addEventListener&&z.removeEventListener){var ze=j(o,function(Qt){return Qt.eventTarget===z}),We=o[ze];if(We&&We.events)if(Y!=="all"){var lt=!1,tt=We.events[Y];if(tt){if(ke==="all"){for(var ht=tt.length-1;ht>=0;ht--){var Et=tt[ht];k(z,Y,Et.func,Et.options)}return}for(var Nt=An(Re),kt=0;kt<tt.length;kt++){var St=tt[kt];if(St.func===ke&&Xn(St.options,Nt)){z.removeEventListener(Y,ke,p.supportsOptions?Nt:Nt.capture),tt.splice(kt,1),tt.length===0&&(delete We.events[Y],lt=!0);break}}}lt&&!Object.keys(We.events).length&&o.splice(ze,1)}else for(Y in We.events)We.events.hasOwnProperty(Y)&&k(z,Y,"all")}}function N(z,Y){for(var ke=An(Y),Re=new Gn(z),ze=i[z.type],We=de(z)[0],lt=We;h.element(lt);){for(var tt=0;tt<ze.length;tt++){var ht=ze[tt],Et=ht.selector,Nt=ht.context;if(X(lt,Et)&&pe(Nt,We)&&pe(Nt,lt)){var kt=ht.listeners;Re.currentTarget=lt;for(var St=0;St<kt.length;St++){var Qt=kt[St];Xn(Qt.options,ke)&&Qt.func(Re)}}}lt=ot(lt)}}function L(z){return N(z,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),n.events=p,p}},oa={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=oa.methodOrder;t<o.length;t++){var i=o[t],u=oa[i](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,i=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var p=0,g=u.interactions.list;p<g.length;p++){var k=g[p],N=i;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;N;){if(N===k.element)return k;N=ot(N)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,i=n.pointerType,u=n.eventType,p=n.scope;if(i!=="mouse"&&i!=="pen")return null;for(var g=0,k=p.interactions.list;g<k.length;g++){var N=k[g];if(N.pointerType===i){if(N.simulation&&!ha(N,o))continue;if(N.interacting())return N;t||(t=N)}}if(t)return t;for(var L=0,z=p.interactions.list;L<z.length;L++){var Y=z[L];if(!(Y.pointerType!==i||/down/i.test(u)&&Y.simulation))return Y}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,i=n.scope.interactions.list;o<i.length;o++){var u=i[o];if(ha(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,i=n.scope.interactions.list;o<i.length;o++){var u=i[o];if(u.pointers.length===1){var p=u.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ha(n,t){return n.pointers.some(function(o){return o.id===t})}var ra=oa,dn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Yn(n,t){return function(o){var i=t.interactions.list,u=Z(o),p=de(o),g=p[0],k=p[1],N=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var L=0,z=o.changedTouches;L<z.length;L++){var Y=z[L],ke={pointer:Y,pointerId:B(Y),pointerType:u,eventType:o.type,eventTarget:g,curEventTarget:k,scope:t},Re=la(ke);N.push([ke.pointer,ke.eventTarget,ke.curEventTarget,Re])}}else{var ze=!1;if(!ne.supportsPointerEvent&&/mouse/.test(o.type)){for(var We=0;We<i.length&&!ze;We++)ze=i[We].pointerType!=="mouse"&&i[We].pointerIsDown;ze=ze||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!ze){var lt={pointer:o,pointerId:B(o),pointerType:u,eventType:o.type,curEventTarget:k,eventTarget:g,scope:t},tt=la(lt);N.push([lt.pointer,lt.eventTarget,lt.curEventTarget,tt])}}for(var ht=0;ht<N.length;ht++){var Et=N[ht],Nt=Et[0],kt=Et[1],St=Et[2];Et[3][n](Nt,o,kt,St)}}}function la(n){var t=n.pointerType,o=n.scope,i={interaction:ra.search(n),searchDetails:n};return o.fire("interactions:find",i),i.interaction||o.interactions.new({pointerType:t})}function on(n,t){var o=n.doc,i=n.scope,u=n.options,p=i.interactions.docEvents,g=i.events,k=g[t];for(var N in i.browser.isIOS&&!u.events&&(u.events={passive:!1}),g.delegatedEvents)k(o,N,g.delegateListener),k(o,N,g.delegateUseCapture,!0);for(var L=u&&u.events,z=0;z<p.length;z++){var Y=p[z];k(o,Y.type,Y.listener,L)}}var Sa={id:"core/interactions",install:function(n){for(var t={},o=0;o<dn.length;o++){var i=dn[o];t[i]=Yn(i,n)}var u,p=ne.pEventTypes;function g(){for(var k=0,N=n.interactions.list;k<N.length;k++){var L=N[k];if(L.pointerIsDown&&L.pointerType==="touch"&&!L._interacting)for(var z=function(){var Re=ke[Y];n.documents.some(function(ze){return pe(ze.doc,Re.downTarget)})||L.removePointer(Re.pointer,Re.event)},Y=0,ke=L.pointers;Y<ke.length;Y++)z()}}(u=P.PointerEvent?[{type:p.down,listener:g},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:g},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var N=0,L=n.interactions.list;N<L.length;N++)L[N].documentBlur(k)}}),n.prevTouchTime=0,n.Interaction=function(k){C(L,k);var N=H(L);function L(){return c(this,L),N.apply(this,arguments)}return v(L,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(z){n.interactions.pointerMoveTolerance=z}},{key:"_now",value:function(){return n.now()}}]),L}(qn),n.interactions={list:[],new:function(k){k.scopeFire=function(L,z){return n.fire(L,z)};var N=new n.Interaction(k);return n.interactions.list.push(N),N},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(Sn)},listeners:{"scope:add-document":function(n){return on(n,"add")},"scope:remove-document":function(n){return on(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,i=t.interactions.list.length-1;i>=0;i--){var u=t.interactions.list[i];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(i,1))}}},onDocSignal:on,doOnInteractions:Yn,methodNames:dn},Vn=Sa,On=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(On||{}),rl=function(){function n(t,o,i,u){c(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Nn,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||i,this._win=_(_e(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return h.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),h.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),h.func(o.onend)&&this.on("".concat(t,"end"),o.onend),h.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,i){var u,p=this,g=(u=this._actions.map[t])==null?void 0:u.filterEventType,k=function(N){return(g==null||g(N))&&hn(N,p._actions)};(h.array(o)||h.object(o))&&this._onOff(On.Off,t,o,void 0,k),(h.array(i)||h.object(i))&&this._onOff(On.On,t,i,void 0,k)}},{key:"setPerAction",value:function(t,o){var i=this._defaults;for(var u in o){var p=u,g=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,g.listeners,k),h.array(k)?g[p]=be(k):h.plainObject(k)?(g[p]=I(g[p]||{},un(k)),h.object(i.perAction[p])&&"enabled"in i.perAction[p]&&(g[p].enabled=k.enabled!==!1)):h.bool(k)&&h.object(i.perAction[p])?g[p].enabled=k:g[p]=k}}},{key:"getRect",value:function(t){return t=t||(h.element(this.target)?this.target:null),h.string(this.target)&&(t=t||this._context.querySelector(this.target)),Qe(t)}},{key:"rectChecker",value:function(t){var o=this;return h.func(t)?(this.getRect=function(i){var u=I({},t.apply(o,i));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(_e(o)||h.object(o)){for(var i in this.options[t]=o,this._actions.map)this.options[i][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 h.string(t)?Array.from(this._context.querySelectorAll(t)):h.func(t)&&t.getAllElements?t.getAllElements():h.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||pe(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,i){return!this.testIgnore(t.ignoreFrom,o,i)&&this.testAllow(t.allowFrom,o,i)}},{key:"testAllow",value:function(t,o,i){return!t||!!h.element(i)&&(h.string(t)?ye(i,t,o):!!h.element(t)&&pe(t,i))}},{key:"testIgnore",value:function(t,o,i){return!(!t||!h.element(i))&&(h.string(t)?ye(i,t,o):!!h.element(t)&&pe(t,i))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,i,u,p){h.object(o)&&!h.array(o)&&(u=i,i=null);var g=Ee(o,i,p);for(var k in g){k==="wheel"&&(k=ne.wheelEvent);for(var N=0,L=g[k];N<L.length;N++){var z=L[N];hn(k,this._actions)?this.events[t===On.On?"on":"off"](k,z):h.string(this.target)?this._scopeEvents[t===On.On?"addDelegate":"removeDelegate"](this.target,this._context,k,z,u):this._scopeEvents[t===On.On?"add":"remove"](this.target,k,z,u)}}return this}},{key:"on",value:function(t,o,i){return this._onOff(On.On,t,o,i)}},{key:"off",value:function(t,o,i){return this._onOff(On.Off,t,o,i)}},{key:"set",value:function(t){var o=this._defaults;for(var i in h.object(t)||(t={}),this.options=un(o.base),this._actions.methodDict){var u=i,p=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,I(I({},o.perAction),o.actions[u])),this[p](t[u])}for(var g in t)g!=="getRect"?h.func(this[g])&&this[g](t[g]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(h.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],i=o.length-1;i>=0;i--){var u=o[i],p=u.selector,g=u.context,k=u.listeners;p===this.target&&g===this._context&&o.splice(i,1);for(var N=k.length-1;N>=0;N--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[N][0],k[N][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),ll=function(){function n(t){var o=this;c(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(i){var u=i.interactable,p=u.target,g=h.string(p)?o.selectorMap[p]:p[o.scope.id],k=j(g,function(N){return N===u});g.splice(k,1)}})}return v(n,[{key:"new",value:function(t,o){o=I(o||{},{actions:this.scope.actions});var i=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(i._doc),this.list.push(i),h.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(i)):(i.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:t,options:o,interactable:i,win:this.scope._win}),i}},{key:"getExisting",value:function(t,o){var i=o&&o.context||this.scope.document,u=h.string(t),p=u?this.selectorMap[t]:t[this.scope.id];if(p)return Me(p,function(g){return g._context===i&&(u||g.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var i=0,u=this.list;i<u.length;i++){var p=u[i],g=void 0;if((h.string(p.target)?h.element(t)&&X(t,p.target):t===p.target)&&p.inContext(t)&&(g=o(p)),g!==void 0)return g}}}]),n}(),il=function(){function n(){var t=this;c(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ne,this.defaults=un(Bn),this.Eventable=Nn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(i){var u=function p(g,k){var N=i.interactables.getExisting(g,k);return N||((N=i.interactables.new(g,k)).events.global=p.globalEvents),N};return u.getPointerAverage=W,u.getTouchBBox=Se,u.getTouchDistance=ie,u.getTouchAngle=q,u.getElementRect=Qe,u.getElementClientRect=De,u.matchesSelector=X,u.closest=He,u.globalEvents={},u.version="1.10.27",u.scope=i,u.use=function(p,g){return this.scope.usePlugin(p,g),this},u.isSet=function(p,g){return!!this.scope.interactables.get(p,g&&g.context)},u.on=ct(function(p,g,k){if(h.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),h.array(p)){for(var N=0,L=p;N<L.length;N++){var z=L[N];this.on(z,g,k)}return this}if(h.object(p)){for(var Y in p)this.on(Y,p[Y],g);return this}return hn(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(g):this.globalEvents[p]=[g]:this.scope.events.add(this.scope.document,p,g,{options:k}),this},"The interact.on() method is being deprecated"),u.off=ct(function(p,g,k){if(h.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),h.array(p)){for(var N=0,L=p;N<L.length;N++){var z=L[N];this.off(z,g,k)}return this}if(h.object(p)){for(var Y in p)this.off(Y,p[Y],g);return this}var ke;return hn(p,this.scope.actions)?p in this.globalEvents&&(ke=this.globalEvents[p].indexOf(g))!==-1&&this.globalEvents[p].splice(ke,1):this.scope.events.remove(this.scope.document,p,g,k),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ne.supportsTouch},u.supportsPointerEvent=function(){return ne.supportsPointerEvent},u.stop=function(){for(var p=0,g=this.scope.interactions.list;p<g.length;p++)g[p].stop();return this},u.pointerMoveTolerance=function(p){return h.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(p,g){this.scope.addDocument(p,g)},u.removeDocument=function(p){this.scope.removeDocument(p)},u}(this),this.InteractEvent=kn,this.Interactable=void 0,this.interactables=new ll(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(i){return t.removeDocument(i.target)};var o=this;this.Interactable=function(i){C(p,i);var u=H(p);function p(){return c(this,p),u.apply(this,arguments)}return v(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(g){return M(w(p.prototype),"set",this).call(this,g),o.fire("interactable:set",{options:g,interactable:this}),this}},{key:"unset",value:function(){M(w(p.prototype),"unset",this).call(this);var g=o.interactables.list.indexOf(this);g<0||(o.interactables.list.splice(g,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(rl)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var i=0,u=this.listenerMaps;i<u.length;i++){var p=u[i].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,i){return o.isInitialized=!0,h.window(i)&&b(i),P.init(i),ne.init(i),Ke.init(i),o.window=i,o.document=i.document,o.usePlugin(Vn),o.usePlugin(Ea),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 i=0,u=this.listenerMaps.length,p=t.before.reduce(function(k,N){return k[N]=!0,k[vo(N)]=!0,k},{});i<u;i++){var g=this.listenerMaps[i].id;if(g&&(p[g]||p[vo(g)]))break}this.listenerMaps.splice(i,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 i=_(t);o=o?I({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(i,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:i,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),i=_(t),u=this.documents[o].options;this.events.remove(i,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:i,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 vo(n){return n&&n.replace(/\/.*$/,"")}var mo=new il,Zt=mo.interactStatic,sl=typeof globalThis<"u"?globalThis:window;mo.init(sl);var cl=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(i){var u=i[0],p=i[1];return u in n||p in n}),o=function(i,u){for(var p=n.range,g=n.limits,k=g===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:g,N=n.offset,L=N===void 0?{x:0,y:0}:N,z={range:p,grid:n,x:null,y:null},Y=0;Y<t.length;Y++){var ke=t[Y],Re=ke[0],ze=ke[1],We=Math.round((i-L.x)/n[Re]),lt=Math.round((u-L.y)/n[ze]);z[Re]=Math.max(k.left,Math.min(k.right,We*n[Re]+L.x)),z[ze]=Math.max(k.top,Math.min(k.bottom,lt*n[ze]+L.y))}return z};return o.grid=n,o.coordFields=t,o}}),ul={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=I(t.snappers||{},cl),t.createSnapGrid=t.snappers.grid}},dl=ul,pl={start:function(n){var t=n.state,o=n.rect,i=n.edges,u=n.pageCoords,p=t.options,g=p.ratio,k=p.enabled,N=t.options,L=N.equalDelta,z=N.modifiers;g==="preserve"&&(g=o.width/o.height),t.startCoords=I({},u),t.startRect=I({},o),t.ratio=g,t.equalDelta=L;var Y=t.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(t.xIsPrimaryAxis=!(!i.left&&!i.right),t.equalDelta){var ke=(Y.left?1:-1)*(Y.top?1:-1);t.edgeSign={x:ke,y:ke}}else t.edgeSign={x:Y.left?-1:1,y:Y.top?-1:1};if(k!==!1&&I(i,Y),z!=null&&z.length){var Re=new bn(n.interaction);Re.copyFrom(n.interaction.modification),Re.prepareStates(z),t.subModification=Re,Re.startAll(r({},n))}},set:function(n){var t=n.state,o=n.rect,i=n.coords,u=t.linkedEdges,p=I({},i),g=t.equalDelta?fl:hl;if(I(n.edges,u),g(t,t.xIsPrimaryAxis,i,o),!t.subModification)return null;var k=I({},o);Q(u,k,{x:i.x-p.x,y:i.y-p.y});var N=t.subModification.setAll(r(r({},n),{},{rect:k,edges:u,pageCoords:i,prevCoords:i,prevRect:k})),L=N.delta;return N.changed&&(g(t,Math.abs(L.x)>Math.abs(L.y),N.coords,N.rect),I(i,N.coords)),N.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function fl(n,t,o){var i=n.startCoords,u=n.edgeSign;t?o.y=i.y+(o.x-i.x)*u.y:o.x=i.x+(o.y-i.y)*u.x}function hl(n,t,o,i){var u=n.startRect,p=n.startCoords,g=n.ratio,k=n.edgeSign;if(t){var N=i.width/g;o.y=p.y+(N-u.height)*k.y}else{var L=i.height*g;o.x=p.x+(L-u.width)*k.x}}var vl=nn(pl,"aspectRatio"),go=function(){};go._defaults={};var Ta=go;function Jn(n,t,o){return h.func(n)?Ye(n,t.interactable,t.element,[o.x,o.y,t]):Ye(n,t.interactable,t.element)}var Ba={start:function(n){var t=n.rect,o=n.startOffset,i=n.state,u=n.interaction,p=n.pageCoords,g=i.options,k=g.elementRect,N=I({left:0,top:0,right:0,bottom:0},g.offset||{});if(t&&k){var L=Jn(g.restriction,u,p);if(L){var z=L.right-L.left-t.width,Y=L.bottom-L.top-t.height;z<0&&(N.left+=z,N.right+=z),Y<0&&(N.top+=Y,N.bottom+=Y)}N.left+=o.left-t.width*k.left,N.top+=o.top-t.height*k.top,N.right+=o.right-t.width*(1-k.right),N.bottom+=o.bottom-t.height*(1-k.bottom)}i.offset=N},set:function(n){var t=n.coords,o=n.interaction,i=n.state,u=i.options,p=i.offset,g=Jn(u.restriction,o,t);if(g){var k=function(N){return!N||"left"in N&&"top"in N||((N=I({},N)).left=N.x||0,N.top=N.y||0,N.right=N.right||N.left+N.width,N.bottom=N.bottom||N.top+N.height),N}(g);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=nn(Ba,"restrict"),yo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},bo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function ko(n,t){for(var o=0,i=["top","left","bottom","right"];o<i.length;o++){var u=i[o];u in n||(n[u]=t[u])}return n}var va={noInner:yo,noOuter:bo,start:function(n){var t,o=n.interaction,i=n.startOffset,u=n.state,p=u.options;p&&(t=Ie(Jn(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+i.top,left:t.x+i.left,bottom:t.y-i.bottom,right:t.x-i.right}},set:function(n){var t=n.coords,o=n.edges,i=n.interaction,u=n.state,p=u.offset,g=u.options;if(o){var k=I({},t),N=Jn(g.inner,i,k)||{},L=Jn(g.outer,i,k)||{};ko(N,yo),ko(L,bo),o.top?t.y=Math.min(Math.max(L.top+p.top,k.y),N.top+p.top):o.bottom&&(t.y=Math.max(Math.min(L.bottom+p.bottom,k.y),N.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(L.left+p.left,k.x),N.left+p.left):o.right&&(t.x=Math.max(Math.min(L.right+p.right,k.x),N.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},gl=nn(va,"restrictEdges"),yl=I({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ba.defaults),bl=nn({start:Ba.start,set:Ba.set,defaults:yl},"restrictRect"),kl={width:-1/0,height:-1/0},xl={width:1/0,height:1/0},wl=nn({start:function(n){return va.start(n)},set:function(n){var t=n.interaction,o=n.state,i=n.rect,u=n.edges,p=o.options;if(u){var g=le(Jn(p.min,t,n.coords))||kl,k=le(Jn(p.max,t,n.coords))||xl;o.options={endOnly:p.endOnly,inner:I({},va.noInner),outer:I({},va.noOuter)},u.top?(o.options.inner.top=i.bottom-g.height,o.options.outer.top=i.bottom-k.height):u.bottom&&(o.options.inner.bottom=i.top+g.height,o.options.outer.bottom=i.top+k.height),u.left?(o.options.inner.left=i.right-g.width,o.options.outer.left=i.right-k.width):u.right&&(o.options.inner.right=i.left+g.width,o.options.outer.right=i.left+k.width),va.set(n),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ya={start:function(n){var t,o=n.interaction,i=n.interactable,u=n.element,p=n.rect,g=n.state,k=n.startOffset,N=g.options,L=N.offsetWithOrigin?function(ke){var Re=ke.interaction.element,ze=Ie(Ye(ke.state.options.origin,null,null,[Re])),We=ze||se(ke.interactable,Re,ke.interaction.prepared.name);return We}(n):{x:0,y:0};if(N.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var z=Ye(N.offset,i,u,[o]);(t=Ie(z)||{x:0,y:0}).x+=L.x,t.y+=L.y}var Y=N.relativePoints;g.offsets=p&&Y&&Y.length?Y.map(function(ke,Re){return{index:Re,relativePoint:ke,x:k.left-p.width*ke.x+t.x,y:k.top-p.height*ke.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,i=n.state,u=i.options,p=i.offsets,g=se(t.interactable,t.element,t.prepared.name),k=I({},o),N=[];u.offsetWithOrigin||(k.x-=g.x,k.y-=g.y);for(var L=0,z=p;L<z.length;L++)for(var Y=z[L],ke=k.x-Y.x,Re=k.y-Y.y,ze=0,We=u.targets.length;ze<We;ze++){var lt=u.targets[ze],tt=void 0;(tt=h.func(lt)?lt(ke,Re,t._proxy,Y,ze):lt)&&N.push({x:(h.number(tt.x)?tt.x:ke)+Y.x,y:(h.number(tt.y)?tt.y:Re)+Y.y,range:h.number(tt.range)?tt.range:u.range,source:lt,index:ze,offset:Y})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Et=0;Et<N.length;Et++){var Nt=N[Et],kt=Nt.range,St=Nt.x-k.x,Qt=Nt.y-k.y,$t=dt(St,Qt),sn=$t<=kt;kt===1/0&&ht.inRange&&ht.range!==1/0&&(sn=!1),ht.target&&!(sn?ht.inRange&&kt!==1/0?$t/kt<ht.distance/ht.range:kt===1/0&&ht.range!==1/0||$t<ht.distance:!ht.inRange&&$t<ht.distance)||(ht.target=Nt,ht.distance=$t,ht.range=kt,ht.inRange=sn,ht.delta.x=St,ht.delta.y=Qt)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),i.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=nn(Ya,"snap"),Ia={start:function(n){var t=n.state,o=n.edges,i=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Ya.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,i=n.coords,u=o.options,p=o.offsets,g={x:i.x-p[0].x,y:i.y-p[0].y};o.options=I({},u),o.options.targets=[];for(var k=0,N=u.targets||[];k<N.length;k++){var L=N[k],z=void 0;if(z=h.func(L)?L(g.x,g.y,t):L){for(var Y=0,ke=o.targetFields;Y<ke.length;Y++){var Re=ke[Y],ze=Re[0],We=Re[1];if(ze in z||We in z){z.x=z[ze],z.y=z[We];break}}o.options.targets.push(z)}}var lt=Ya.set(n);return o.options=u,lt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Dl=nn(Ia,"snapSize"),Ja={aspectRatio:vl,restrictEdges:gl,restrict:ml,restrictRect:bl,restrictSize:wl,snapEdges:nn({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Ia.start(n)):null},set:Ia.set,defaults:I(un(Ia.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:Dl,spring:Ta,avoid:Ta,transform:Ta,rubberband:Ta},_l={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Tn),n.usePlugin(dl),t.modifiers=Ja,Ja){var i=Ja[o],u=i._defaults,p=i._methods;u._methods=p,n.defaults.perAction[o]=u}}},El=_l,xo=function(n){C(o,n);var t=H(o);function o(i,u,p,g,k,N){var L;if(c(this,o),S(R(L=t.call(this,k)),p),p!==u&&S(R(L),u),L.timeStamp=N,L.originalEvent=p,L.type=i,L.pointerId=B(u),L.pointerType=Z(u),L.target=g,L.currentTarget=null,i==="tap"){var z=k.getPointerIndex(u);L.dt=L.timeStamp-k.pointers[z].downTime;var Y=L.timeStamp-k.tapTime;L.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===L.target&&Y<500}else i==="doubletap"&&(L.dt=u.timeStamp-k.tapTime,L.double=!0);return L}return v(o,[{key:"_subtractOrigin",value:function(i){var u=i.x,p=i.y;return this.pageX-=u,this.pageY-=p,this.clientX-=u,this.clientY-=p,this}},{key:"_addOrigin",value:function(i){var u=i.x,p=i.y;return this.pageX+=u,this.pageY+=p,this.clientX+=u,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(me),ma={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ma,n.defaults.actions.pointerEvents=ma.defaults,I(n.actions.phaselessTypes,ma.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,i=n.pointer,u=n.event,p=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&Za(n),Mn({interaction:o,pointer:i,event:u,eventTarget:p,type:"move"},t))},"interactions:down":function(n,t){(function(o,i){for(var u=o.interaction,p=o.pointer,g=o.event,k=o.eventTarget,N=o.pointerIndex,L=u.pointers[N].hold,z=ae(k),Y={interaction:u,pointer:p,event:g,eventTarget:k,type:"hold",targets:[],path:z,node:null},ke=0;ke<z.length;ke++){var Re=z[ke];Y.node=Re,i.fire("pointerEvents:collect-targets",Y)}if(Y.targets.length){for(var ze=1/0,We=0,lt=Y.targets;We<lt.length;We++){var tt=lt[We].eventable.options.holdDuration;tt<ze&&(ze=tt)}L.duration=ze,L.timeout=setTimeout(function(){Mn({interaction:u,eventTarget:k,pointer:p,event:g,type:"hold"},i)},ze)}})(n,t),Mn(n,t)},"interactions:up":function(n,t){Za(n),Mn(n,t),function(o,i){var u=o.interaction,p=o.pointer,g=o.event,k=o.eventTarget;u.pointerWasMoved||Mn({interaction:u,eventTarget:k,pointer:p,event:g,type:"tap"},i)}(n,t)},"interactions:cancel":function(n,t){Za(n),Mn(n,t)}},PointerEvent:xo,fire:Mn,collectEventTargets:wo,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 Mn(n,t){var o=n.interaction,i=n.pointer,u=n.event,p=n.eventTarget,g=n.type,k=n.targets,N=k===void 0?wo(n,t):k,L=new xo(g,i,u,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:L});for(var z={interaction:o,pointer:i,event:u,eventTarget:p,targets:N,type:g,pointerEvent:L},Y=0;Y<N.length;Y++){var ke=N[Y];for(var Re in ke.props||{})L[Re]=ke.props[Re];var ze=se(ke.eventable,ke.node);if(L._subtractOrigin(ze),L.eventable=ke.eventable,L.currentTarget=ke.node,ke.eventable.fire(L),L._addOrigin(ze),L.immediatePropagationStopped||L.propagationStopped&&Y+1<N.length&&N[Y+1].node!==L.currentTarget)break}if(t.fire("pointerEvents:fired",z),g==="tap"){var We=L.double?Mn({interaction:o,pointer:i,event:u,eventTarget:p,type:"doubletap"},t):L;o.prevTap=We,o.tapTime=We.timeStamp}return L}function wo(n,t){var o=n.interaction,i=n.pointer,u=n.event,p=n.eventTarget,g=n.type,k=o.getPointerIndex(i),N=o.pointers[k];if(g==="tap"&&(o.pointerWasMoved||!N||N.downTarget!==p))return[];for(var L=ae(p),z={interaction:o,pointer:i,event:u,eventTarget:p,type:g,path:L,targets:[],node:null},Y=0;Y<L.length;Y++){var ke=L[Y];z.node=ke,t.fire("pointerEvents:collect-targets",z)}return g==="hold"&&(z.targets=z.targets.filter(function(Re){var ze,We;return Re.eventable.options.holdDuration===((ze=o.pointers[k])==null||(We=ze.hold)==null?void 0:We.duration)})),z.targets}function Za(n){var t=n.interaction,o=n.pointerIndex,i=t.pointers[o].hold;i&&i.timeout&&(clearTimeout(i.timeout),i.timeout=null)}var Sl=Object.freeze({__proto__:null,default:ma});function Tl(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ma);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)]=Tl,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,i=n.pointerEvent,u=n.eventTarget,p=n.targets;if(i.type==="hold"&&p.length){var g=p[0].eventable.options.holdRepeatInterval;g<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:i,event:i},t)},g))}}})},Il=Bl,Nl={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(i){return I(this.events.options,i),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(i,u){var p=o.call(this,i,u);return p===this&&(this.events.options[i]=u),p}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,i=n.node,u=n.type,p=n.eventTarget;t.interactables.forEachMatch(i,function(g){var k=g.events,N=k.options;k.types[u]&&k.types[u].length&&g.testIgnoreAllow(N,i,p)&&o.push({node:i,eventable:k,props:{interactable:g}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,i=n.options;I(o.events.options,t.pointerEvents.defaults),I(o.events.options,i.pointerEvents||{})}}},Al=Nl,Vl={id:"pointer-events",install:function(n){n.usePlugin(Sl),n.usePlugin(Il),n.usePlugin(Al)}},Ol=Vl,Ml={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(i,u,p){for(var g=i.getAllElements(),k=p.window.Promise,N=k?[]:null,L=function(){var Y=g[z],ke=i.getRect(Y);if(!ke)return 1;var Re,ze=Me(p.interactions.list,function(tt){return tt.interacting()&&tt.interactable===i&&tt.element===Y&&tt.prepared.name===u.name});if(ze)ze.move(),N&&(Re=ze._reflowPromise||new k(function(tt){ze._reflowResolve=tt}));else{var We=le(ke),lt=function(tt){return{coords:tt,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:We.x,y:We.y},client:{x:We.x,y:We.y},timeStamp:p.now()});Re=function(tt,ht,Et,Nt,kt){var St=tt.interactions.new({pointerType:"reflow"}),Qt={interaction:St,event:kt,pointer:kt,eventTarget:Et,phase:"reflow"};St.interactable=ht,St.element=Et,St.prevEvent=kt,St.updatePointer(kt,kt,Et,!0),J(St.coords.delta),ft(St.prepared,Nt),St._doPhase(Qt);var $t=tt.window,sn=$t.Promise,fn=sn?new sn(function(xn){St._reflowResolve=xn}):void 0;return St._reflowPromise=fn,St.start(Nt,ht,Et),St._interacting?(St.move(Qt),St.end(kt)):(St.stop(),St._reflowResolve()),St.removePointer(kt,kt),fn}(p,i,Y,u,lt)}N&&N.push(Re)},z=0;z<g.length&&!L();z++);return N&&k.all(N).then(function(){return i})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(i,u){i.splice(i.indexOf(u),1)}(t.interactions.list,o))}}},zl=Ml;if(Zt.use(Sn),Zt.use(Kt),Zt.use(Ol),Zt.use(Ht),Zt.use(El),Zt.use(Ln),Zt.use(E),Zt.use(pt),Zt.use(zl),Zt.default=Zt,d(a)==="object"&&a)try{a.exports=Zt}catch{}return Zt.default=Zt,Zt})}(xa,xa.exports)),xa.exports}var Dp=Cp();const Ho=Ne.getDefaultExportFromCjs(Dp),Ha=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:l,emit:s}){const r=a,d=s,c=e.inject($r),x=e.inject(jr);if(!c)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let C=!1,w=!1,F=NaN,R=NaN,H=NaN,M=NaN,ve=-1,K=-1,O=-1,G=-1,b=r.x,_=r.y,y=r.w,T=r.h;const h=e.ref(),ce=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:h,calcXY:Ye});function Ae(D){Ee(D)}function at(){qe()}function we(D){cn(r.isDraggable)&&(f.draggable=D)}function Pe(D){cn(r.isResizable)&&(f.resizable=D)}function Le(D){cn(r.isBounded)&&(f.bounded=D)}function P(D){f.transformScale=D}function re(D){f.rowHeight=D}function ne(D){f.maxRows=D}function pe(){f.rtl=Ko()==="rtl",qe()}function He(D){f.cols=Math.floor(D)}c.increaseItem(ce),e.onBeforeMount(()=>{f.rtl=Ko()==="rtl"}),e.onMounted(()=>{c.responsive&&c.lastBreakpoint?f.cols=qr(c.lastBreakpoint,c.cols):f.cols=c.colNum,f.rowHeight=c.rowHeight,f.containerWidth=c.width!==null?c.width:100,f.margin=c.margin!==void 0?c.margin.map(Number):[10,10],f.maxRows=c.maxRows,cn(r.isDraggable)?f.draggable=c.isDraggable:f.draggable=r.isDraggable,cn(r.isResizable)?f.resizable=c.isResizable:f.resizable=r.isResizable,cn(r.isBounded)?f.bounded=c.isBounded:f.bounded=r.isBounded,f.transformScale=c.transformScale,f.useCssTransforms=c.useCssTransforms,f.useStyleCursor=c.useStyleCursor,e.watchEffect(()=>{b=r.x,_=r.y,T=r.h,y=r.w,en(Qe)}),x.on("updateWidth",Ae),x.on("compact",at),x.on("setDraggable",we),x.on("setResizable",Pe),x.on("setBounded",Le),x.on("setTransformScale",P),x.on("setRowHeight",re),x.on("setMaxRows",ne),x.on("directionchange",pe),x.on("setColNum",He)}),e.onBeforeUnmount(()=>{x.off("updateWidth",Ae),x.off("compact",at),x.off("setDraggable",we),x.off("setResizable",Pe),x.off("setBounded",Le),x.off("setTransformScale",P),x.off("setRowHeight",re),x.off("setMaxRows",ne),x.off("directionchange",pe),x.off("setColNum",He),v.value&&(v.value.unset(),v.value=null),c.decreaseItem(ce)}),l({state:f,wrapper:h});const ot=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,X=e.computed(()=>f.resizable&&!r.static),A=e.computed(()=>c.isMirrored?!f.rtl:f.rtl),te=e.computed(()=>(f.draggable||f.resizable)&&!r.static),ye=vp("item"),ue=e.computed(()=>({[ye.b()]:!0,[ye.bm("resizable")]:X.value,[ye.bm("static")]:r.static,[ye.bm("resizing")]:f.isResizing,[ye.bm("dragging")]:f.isDragging,[ye.bm("transform")]:f.useCssTransforms,[ye.bm("rtl")]:A.value,[ye.bm("no-touch")]:ot&&te.value})),De=e.computed(()=>[ye.be("resizer"),A.value&&ye.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,D=>{f.draggable=D}),e.watch(()=>r.static,()=>{en(S),en(J)}),e.watch(()=>f.draggable,()=>{en(S)}),e.watch(()=>r.isResizable,D=>{f.resizable=D}),e.watch(()=>r.isBounded,D=>{f.bounded=D}),e.watch(()=>f.resizable,()=>{en(J)}),e.watch(()=>f.rowHeight,()=>{en(Qe),en(ae)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{en(J),en(Qe),en(ae)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{en(J)}),e.watch(A,()=>{en(J),en(Qe)}),e.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const D=c.margin;!D||D[0]===f.margin[0]&&D[1]===f.margin[1]||(f.margin=D.map(Number),en(Qe),en(ae))});function Qe(){r.x+r.w>f.cols?(b=0,y=r.w>f.cols?f.cols:r.w):(b=r.x,y=r.w);const D=Xe(b,_,y,T);f.isDragging&&(D.top=f.dragging.top,A.value?D.right=f.dragging.left:D.left=f.dragging.left),f.isResizing&&(D.width=f.resizing.width,D.height=f.resizing.height);let oe;f.useCssTransforms?A.value?oe=dp(D.top,D.right,D.width,D.height):oe=up(D.top,D.left,D.width,D.height):A.value?oe=fp(D.top,D.right,D.width,D.height):oe=pp(D.top,D.left,D.width,D.height),f.style=oe}function ae(){const D={};for(const oe of["width","height"]){const Ve=f.style[oe].match(/^(\d+)px$/);if(!Ve)return;D[oe]=Ve[1]}d("container-resized",r.i,r.h,r.w,D.height,D.width)}function _e(D){if(r.static)return;const oe=D.type;if(oe==="resizestart"&&f.isResizing||oe!=="resizestart"&&!f.isResizing)return;const Ve=jo(D);if(cn(Ve))return;const{x:B,y:ee}=Ve,$={width:0,height:0};let W;switch(oe){case"resizestart":{J(),ve=y,K=T,W=Xe(b,_,y,T),$.width=W.width,$.height=W.height,f.resizing=$,f.isResizing=!0;break}case"resizemove":{!D.edges.right&&!D.edges.left&&(H=B),!D.edges.top&&!D.edges.bottom&&(M=ee);const Se=Uo(H,M,B,ee);A.value?$.width=f.resizing.width-Se.deltaX/f.transformScale:$.width=f.resizing.width+Se.deltaX/f.transformScale,$.height=f.resizing.height+Se.deltaY/f.transformScale,f.resizing=$;break}case"resizeend":{W=Xe(b,_,y,T),$.width=W.width,$.height=W.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}W=se($.height,$.width),W.w<r.minW&&(W.w=r.minW),W.w>r.maxW&&(W.w=r.maxW),W.h<r.minH&&(W.h=r.minH),W.h>r.maxH&&(W.h=r.maxH),W.h<1&&(W.h=1),W.w<1&&(W.w=1),H=B,M=ee,(y!==W.w||T!==W.h)&&d("resize",r.i,W.h,W.w,$.height,$.width),D.type==="resizeend"&&(ve!==y||K!==T)&&d("resized",r.i,W.h,W.w,$.height,$.width),x.emit("resizeEvent",D.type,r.i,b,_,W.h,W.w)}function I(D){if(r.static||f.isResizing)return;const oe=D.type;if(oe==="dragstart"&&f.isDragging||oe!=="dragstart"&&!f.isDragging)return;const Ve=jo(D);if(cn(Ve))return;const{x:B,y:ee}=Ve,$=D.target;if(!$.offsetParent)return;const W={top:0,left:0};switch(oe){case"dragstart":{O=b,G=_;const ie=$.offsetParent.getBoundingClientRect(),q=$.getBoundingClientRect(),Z=q.left/f.transformScale,de=ie.left/f.transformScale,me=q.right/f.transformScale,Ce=ie.right/f.transformScale,be=q.top/f.transformScale,j=ie.top/f.transformScale;A.value?W.left=(me-Ce)*-1:W.left=Z-de,W.top=be-j,f.dragging=W,f.isDragging=!0;break}case"dragmove":{const ie=Uo(F,R,B,ee);if(A.value?W.left=f.dragging.left-ie.deltaX/f.transformScale:W.left=f.dragging.left+ie.deltaX/f.transformScale,W.top=f.dragging.top+ie.deltaY/f.transformScale,f.bounded){const q=$.offsetParent.clientHeight-le(r.h,f.rowHeight,f.margin[1]);W.top=Q(W.top,0,q);const Z=Ie(),de=f.containerWidth-le(r.w,Z,f.margin[0]);W.left=Q(W.left,0,de)}f.dragging=W;break}case"dragend":{const ie=$.offsetParent.getBoundingClientRect(),q=$.getBoundingClientRect(),Z=q.left/f.transformScale,de=ie.left/f.transformScale,me=q.right/f.transformScale,Ce=ie.right/f.transformScale,be=q.top/f.transformScale,j=ie.top/f.transformScale;A.value?W.left=(me-Ce)*-1:W.left=Z-de,W.top=be-j,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Se;A.value,Se=Ye(W.top,W.left),F=B,R=ee,(b!==Se.x||_!==Se.y)&&d("move",r.i,Se.x,Se.y),D.type==="dragend"&&(O!==b||G!==_)&&d("moved",r.i,Se.x,Se.y),x.emit("dragEvent",D.type,r.i,Se.x,Se.y,T,y)}function Xe(D,oe,Ve,B){const ee=Ie();let $;return A.value?$={right:Math.round(ee*D+(D+1)*f.margin[0]),top:Math.round(f.rowHeight*oe+(oe+1)*f.margin[1]),width:Ve===1/0?Ve:Math.round(ee*Ve+Math.max(0,Ve-1)*f.margin[0]),height:B===1/0?B:Math.round(f.rowHeight*B+Math.max(0,B-1)*f.margin[1])}:$={left:Math.round(ee*D+(D+1)*f.margin[0]),top:Math.round(f.rowHeight*oe+(oe+1)*f.margin[1]),width:Ve===1/0?Ve:Math.round(ee*Ve+Math.max(0,Ve-1)*f.margin[0]),height:B===1/0?B:Math.round(f.rowHeight*B+Math.max(0,B-1)*f.margin[1])},$}function Ye(D,oe){const Ve=Ie();let B=Math.round((oe-f.margin[0])/(Ve+f.margin[0])),ee=Math.round((D-f.margin[1])/(f.rowHeight+f.margin[1]));return B=Math.max(Math.min(B,f.cols-y),0),ee=Math.max(Math.min(ee,f.maxRows-T),0),{x:B,y:ee}}function Ie(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function le(D,oe,Ve){return Number.isFinite(D)?Math.round(oe*D+Math.max(0,D-1)*Ve):D}function Q(D,oe,Ve){return Math.max(Math.min(D,Ve),oe)}function se(D,oe,Ve=!1){const B=Ie();let ee=Math.round((oe+f.margin[0])/(B+f.margin[0])),$=0;return Ve?$=Math.ceil((D+f.margin[1])/(f.rowHeight+f.margin[1])):$=Math.round((D+f.margin[1])/(f.rowHeight+f.margin[1])),ee=Math.max(Math.min(ee,f.cols-b),0),$=Math.max(Math.min($,f.maxRows-_),0),{w:ee,h:$}}function Ee(D,oe){f.containerWidth=D}function qe(){Qe()}function dt(){!v.value&&h.value&&(v.value=Ho(h.value),f.useStyleCursor||v.value.styleCursor(!1))}const m=Po(I);function S(){if(dt(),!!v.value)if(f.draggable&&!r.static){const D={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};v.value.draggable(D),C||(C=!0,v.value.on("dragstart dragmove dragend",oe=>{oe.type==="dragmove"?m(oe):I(oe)}))}else v.value.draggable({enabled:!1})}const U=Po(_e);function J(){if(dt(),!!v.value)if(f.resizable&&!r.static){const D=Xe(0,0,r.maxW,r.maxH),oe=Xe(0,0,r.minW,r.minH),Ve={edges:{left:A.value?`.${De.value[0]}`:!1,right:A.value?!1:`.${De.value[0]}`,bottom:`.${De.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:oe.height*f.transformScale,width:oe.width*f.transformScale},max:{height:D.height*f.transformScale,width:D.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(Ve.modifiers=[Ho.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(Ve),w||(w=!0,v.value.on("resizestart resizemove resizeend",B=>{B.type==="resizemove"?U(B):_e(B)}))}else v.value.resizable({enabled:!1})}return(D,oe)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:h,class:e.normalizeClass(ue.value),style:e.normalizeStyle(f.style)},[e.renderSlot(D.$slots,"default"),X.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(De.value)},null,2)):e.createCommentVNode("",!0)],6))}}),na=typeof window<"u";var qo;na&&(qo=window==null?void 0:window.navigator)!=null&&qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Go(a){return a!=null}function Xo(){}const _p=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(_p)));const Ep=na&&("ontouchstart"in window||Tp()>0),Sp=Ep?"pointerdown":"click";function Tp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Bp(a,l,s=window.Event){const{type:r,bubbles:d=!1,cancelable:c=!1,...x}=l;if(!Go(r)||r==="")return!1;let v;return Go(s)?v=new s(r,{bubbles:d,cancelable:c}):(v=document.createEvent("HTMLEvents"),v.initEvent(r,d,c)),Object.assign(v,x),a.dispatchEvent(v)}const Ip="clickoutside",Np=new Set;na&&document.addEventListener(Sp,a=>{const l=a.target,s=a.composedPath&&a.composedPath();Np.forEach(r=>{r!==l&&(s?!s.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&Bp(r,{type:Ip})})},!0);const Ap=[["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 Fa;if(na){for(const a of Ap)if(a[1]in document){Fa=a;break}}e.computed(()=>!1);const Vp=new Set,Op=new WeakMap;if(na&&Fa){const a=Fa[2],l=Fa[4];document.addEventListener(l,()=>{if(Vp.forEach(s=>{s.value=!1}),document[a]){const s=Op.get(document[a]);s&&(s.value=!0)}},!1)}const Xr=new Map;Xr.set("x",0);Xr.set("y",0);var Qn=[],Mp=function(){return Qn.some(function(a){return a.activeTargets.length>0})},zp=function(){return Qn.some(function(a){return a.skippedTargets.length>0})},Yo="ResizeObserver loop completed with undelivered notifications.",Fp=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Yo}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Yo),window.dispatchEvent(a)},_a;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_a||(_a={}));var ea=function(a){return Object.freeze(a)},Rp=function(){function a(l,s){this.inlineSize=l,this.blockSize=s,ea(this)}return a}(),Yr=function(){function a(l,s,r,d){return this.x=l,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ea(this)}return a.prototype.toJSON=function(){var l=this,s=l.x,r=l.y,d=l.top,c=l.right,x=l.bottom,v=l.left,f=l.width,C=l.height;return{x:s,y:r,top:d,right:c,bottom:x,left:v,width:f,height:C}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),ho=function(a){return a instanceof SVGElement&&"getBBox"in a},Jr=function(a){if(ho(a)){var l=a.getBBox(),s=l.width,r=l.height;return!s&&!r}var d=a,c=d.offsetWidth,x=d.offsetHeight;return!(c||x||a.getClientRects().length)},Jo=function(a){var l;if(a instanceof Element)return!0;var s=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(s&&a instanceof s.Element)},Pp=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},Da=typeof window<"u"?window:{},Va=new WeakMap,Zo=/auto|scroll/,Lp=/^tb|vertical/,$p=/msie|trident/i.test(Da.navigator&&Da.navigator.userAgent),mn=function(a){return parseFloat(a||"0")},pa=function(a,l,s){return a===void 0&&(a=0),l===void 0&&(l=0),s===void 0&&(s=!1),new Rp((s?l:a)||0,(s?a:l)||0)},Qo=ea({devicePixelContentBoxSize:pa(),borderBoxSize:pa(),contentBoxSize:pa(),contentRect:new Yr(0,0,0,0)}),Zr=function(a,l){if(l===void 0&&(l=!1),Va.has(a)&&!l)return Va.get(a);if(Jr(a))return Va.set(a,Qo),Qo;var s=getComputedStyle(a),r=ho(a)&&a.ownerSVGElement&&a.getBBox(),d=!$p&&s.boxSizing==="border-box",c=Lp.test(s.writingMode||""),x=!r&&Zo.test(s.overflowY||""),v=!r&&Zo.test(s.overflowX||""),f=r?0:mn(s.paddingTop),C=r?0:mn(s.paddingRight),w=r?0:mn(s.paddingBottom),F=r?0:mn(s.paddingLeft),R=r?0:mn(s.borderTopWidth),H=r?0:mn(s.borderRightWidth),M=r?0:mn(s.borderBottomWidth),ve=r?0:mn(s.borderLeftWidth),K=F+C,O=f+w,G=ve+H,b=R+M,_=v?a.offsetHeight-b-a.clientHeight:0,y=x?a.offsetWidth-G-a.clientWidth:0,T=d?K+G:0,h=d?O+b:0,ce=r?r.width:mn(s.width)-T-y,Ae=r?r.height:mn(s.height)-h-_,at=ce+K+y+G,we=Ae+O+_+b,Pe=ea({devicePixelContentBoxSize:pa(Math.round(ce*devicePixelRatio),Math.round(Ae*devicePixelRatio),c),borderBoxSize:pa(at,we,c),contentBoxSize:pa(ce,Ae,c),contentRect:new Yr(F,f,ce,Ae)});return Va.set(a,Pe),Pe},Qr=function(a,l,s){var r=Zr(a,s),d=r.borderBoxSize,c=r.contentBoxSize,x=r.devicePixelContentBoxSize;switch(l){case _a.DEVICE_PIXEL_CONTENT_BOX:return x;case _a.BORDER_BOX:return d;default:return c}},jp=function(){function a(l){var s=Zr(l);this.target=l,this.contentRect=s.contentRect,this.borderBoxSize=ea([s.borderBoxSize]),this.contentBoxSize=ea([s.contentBoxSize]),this.devicePixelContentBoxSize=ea([s.devicePixelContentBoxSize])}return a}(),el=function(a){if(Jr(a))return 1/0;for(var l=0,s=a.parentNode;s;)l+=1,s=s.parentNode;return l},Up=function(){var a=1/0,l=[];Qn.forEach(function(c){if(c.activeTargets.length!==0){var x=[];c.activeTargets.forEach(function(v){var f=new jp(v.target),C=el(v.target);x.push(f),v.lastReportedSize=Qr(v.target,v.observedBox),C<a&&(a=C)}),l.push(function(){c.callback.call(c.observer,x,c.observer)}),c.activeTargets.splice(0,c.activeTargets.length)}});for(var s=0,r=l;s<r.length;s++){var d=r[s];d()}return a},er=function(a){Qn.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(s){s.isActive()&&(el(s.target)>a?l.activeTargets.push(s):l.skippedTargets.push(s))})})},Kp=function(){var a=0;for(er(a);Mp();)a=Up(),er(a);return zp()&&Fp(),a>0},no,tl=[],Wp=function(){return tl.splice(0).forEach(function(a){return a()})},Hp=function(a){if(!no){var l=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Wp()}).observe(s,r),no=function(){s.textContent="".concat(l?l--:l++)}}tl.push(a),no()},qp=function(a){Hp(function(){requestAnimationFrame(a)})},Ra=0,Gp=function(){return!!Ra},Xp=250,Yp={attributes:!0,characterData:!0,childList:!0,subtree:!0},tr=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],nr=function(a){return a===void 0&&(a=0),Date.now()+a},ao=!1,Jp=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var s=this;if(l===void 0&&(l=Xp),!ao){ao=!0;var r=nr(l);qp(function(){var d=!1;try{d=Kp()}finally{if(ao=!1,l=r-nr(),!Gp())return;d?s.run(1e3):l>0?s.run(l):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,s=function(){return l.observer&&l.observer.observe(document.body,Yp)};document.body?s():Da.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),tr.forEach(function(s){return Da.addEventListener(s,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),tr.forEach(function(s){return Da.removeEventListener(s,l.listener,!0)}),this.stopped=!0)},a}(),uo=new Jp,ar=function(a){!Ra&&a>0&&uo.start(),Ra+=a,!Ra&&uo.stop()},Zp=function(a){return!ho(a)&&!Pp(a)&&getComputedStyle(a).display==="inline"},Qp=function(){function a(l,s){this.target=l,this.observedBox=s||_a.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=Qr(this.target,this.observedBox,!0);return Zp(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),ef=function(){function a(l,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=s}return a}(),Oa=new WeakMap,or=function(a,l){for(var s=0;s<a.length;s+=1)if(a[s].target===l)return s;return-1},Ma=function(){function a(){}return a.connect=function(l,s){var r=new ef(l,s);Oa.set(l,r)},a.observe=function(l,s,r){var d=Oa.get(l),c=d.observationTargets.length===0;or(d.observationTargets,s)<0&&(c&&Qn.push(d),d.observationTargets.push(new Qp(s,r&&r.box)),ar(1),uo.schedule())},a.unobserve=function(l,s){var r=Oa.get(l),d=or(r.observationTargets,s),c=r.observationTargets.length===1;d>=0&&(c&&Qn.splice(Qn.indexOf(r),1),r.observationTargets.splice(d,1),ar(-1))},a.disconnect=function(l){var s=this,r=Oa.get(l);r.observationTargets.slice().forEach(function(d){return s.unobserve(l,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),tf=function(){function a(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ma.connect(this,l)}return a.prototype.observe=function(l,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Jo(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ma.observe(this,l,s)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Jo(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ma.unobserve(this,l)},a.prototype.disconnect=function(){Ma.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const qa=new WeakMap;function nf(a){var l;for(let s=0,r=a.length;s<r;++s){const d=a[s],c=qa.get(d.target);if(typeof c=="function"){const{inlineSize:x,blockSize:v}=((l=d.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:f,offsetHeight:C}=d.target;c(Object.assign(d,{offsetWidth:f,offsetHeight:C,width:x??f,height:v??C}))}}}const nl=new(na&&window.ResizeObserver||tf)(nf);function rr(a,l){qa.set(a,l),nl.observe(a)}function lr(a){qa.has(a)&&(nl.unobserve(a),qa.delete(a))}function af(a={}){let l=Xo;const s=e.watch(()=>e.unref(a.target),d=>{l(),!(!d||typeof a.onResize!="function")&&(rr(d,a.onResize),l=()=>{lr(d),l=Xo})},{immediate:!0}),r=()=>{s(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:rr,unobserveResize:lr,unobserve:r}}const of=e.ref(!1);e.computed(()=>of.value);const ir="__theme_style__",oo="__theme_observer__",sr=e.reactive(new Map),cr=new Map;e.watch(sr,()=>{if(!na)return;cr.clear();const a=document.head.querySelector(`#${ir}`);a&&document.head.removeChild(a);const l=document.createElement("style");let s=`.${oo} { width: 1px }`,r=1;for(const[d,[c,x]]of sr.entries())s+=` html.${c} .${oo}, .${x} .${oo} { width: ${++r}px }`,cr.set(r,d);l.textContent=s,l.id=ir,document.head.appendChild(l)});const al=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:l,emit:s}){const r=a,d=s,c=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),x=new Map,v=e.ref(r.layout),f=e.ref(),{observeResize:C,unobserveResize:w}=af(),F=ap();F.on("resizeEvent",R),F.on("dragEvent",H),e.onBeforeMount(()=>{d("layout-before-mount",v.value)}),e.onMounted(()=>{d("layout-mounted",v.value),e.nextTick(()=>{hp(v.value),c.originalLayout=v.value,e.nextTick(()=>{Ae(),f.value&&C(f.value,op(b,16)),sa(v.value,r.verticalCompact),d("layout-updated",v.value),G(),b()})})}),e.onBeforeUnmount(()=>{F.clearAll(),f.value&&w(f.value)});function R(we,Pe,Le,P,re,ne){h(we,Pe,Le,P,re,ne)}function H(we,Pe,Le,P,re,ne){T(we,Pe,Le,P,re,ne)}e.watch(()=>c.width,(we,Pe)=>{e.nextTick(()=>{F.emit("updateWidth",we),Pe===-1&&e.nextTick(()=>{d("layout-ready",v.value)}),G()})}),e.watch(()=>[r.layout,r.layout.length],()=>{v.value=r.layout,O()}),e.watch(()=>r.colNum,we=>{F.emit("setColNum",we)}),e.watch(()=>r.rowHeight,we=>{F.emit("setRowHeight",we)}),e.watch(()=>r.isDraggable,we=>{F.emit("setDraggable",we)}),e.watch(()=>r.isResizable,we=>{F.emit("setResizable",we)}),e.watch(()=>r.isBounded,we=>{F.emit("setBounded",we)}),e.watch(()=>r.transformScale,we=>{F.emit("setTransformScale",we)}),e.watch(()=>r.responsive,we=>{we||(d("update:layout",c.originalLayout),F.emit("setColNum",r.colNum)),b()}),e.watch(()=>r.maxRows,we=>{F.emit("setMaxRows",we)}),e.watch([()=>r.margin,()=>r.margin[1]],G),e.provide($r,e.reactive({...e.toRefs(r),...e.toRefs(c),increaseItem:M,decreaseItem:ve})),e.provide(jr,F),l({state:c,getItem:K,resizeEvent:h,dragEvent:T,layoutUpdate:O});function M(we){x.set(we.i,we)}function ve(we){x.delete(we.i)}function K(we){return x.get(we)}function O(){if(!cn(v.value)&&!cn(c.originalLayout)){if(v.value.length!==c.originalLayout.length){const we=at(v.value,c.originalLayout);if(we.length>0)if(v.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(we);else{const Pe=new Set(we.map(Le=>Le.i));c.originalLayout=c.originalLayout.filter(Le=>!Pe.has(Le.i))}c.lastLayoutLength=v.value.length,Ae()}sa(v.value,r.verticalCompact),F.emit("updateWidth",c.width),G(),d("layout-updated",v.value)}}function G(){c.mergedStyle={height:_()}}function b(){f.value&&(c.width=f.value.offsetWidth),F.emit("resizeEvent")}function _(){if(!r.autoSize)return;const we=parseFloat(r.margin[1]);return lp(v.value)*(r.rowHeight+we)+we+"px"}let y;function T(we,Pe,Le,P,re,ne){let pe=Lo(v.value,Pe);cn(pe)&&(pe={h:0,w:0,x:0,y:0,i:""}),we==="dragstart"&&!r.verticalCompact&&(y=v.value.reduce((He,{i:ot,x:X,y:A})=>({...He,[ot]:{x:X,y:A}}),{})),we==="dragmove"||we==="dragstart"?(c.placeholder.i=Pe,c.placeholder.x=pe.x,c.placeholder.y=pe.y,c.placeholder.w=ne,c.placeholder.h=re,e.nextTick(()=>{c.isDragging=!0}),F.emit("updateWidth",c.width)):e.nextTick(()=>{c.isDragging=!1}),v.value=co(v.value,pe,Le,P,!0,r.preventCollision),r.restoreOnDrag?(pe.static=!0,sa(v.value,r.verticalCompact,y),pe.static=!1):sa(v.value,r.verticalCompact),F.emit("compact"),G(),we==="dragend"&&(y=void 0,d("layout-updated",v.value))}function h(we,Pe,Le,P,re,ne){let pe=Lo(v.value,Pe);cn(pe)&&(pe={h:0,w:0,x:0,y:0,i:""});let He;if(r.preventCollision){const ot=Kr(v.value,{...pe,w:ne,h:re}).filter(X=>X.i!==pe.i);if(He=ot.length>0,He){let X=1/0,A=1/0;ot.forEach(te=>{te.x>pe.x&&(X=Math.min(X,te.x)),te.y>pe.y&&(A=Math.min(A,te.y))}),Number.isFinite(X)&&(pe.w=X-pe.x),Number.isFinite(A)&&(pe.h=A-pe.y)}}He||(pe.w=ne,pe.h=re),we==="resizestart"||we==="resizemove"?(c.placeholder.i=Pe,c.placeholder.x=Le,c.placeholder.y=P,c.placeholder.w=pe.w,c.placeholder.h=pe.h,e.nextTick(()=>{c.isDragging=!0}),F.emit("updateWidth",c.width)):we&&e.nextTick(()=>{c.isDragging=!1}),r.responsive&&ce(),sa(v.value,r.verticalCompact),F.emit("compact"),G(),we==="resizeend"&&d("layout-updated",v.value)}function ce(){const we=yp(r.breakpoints,c.width);if(we===c.lastBreakpoint)return;const Pe=qr(we,r.cols);!cn(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=so(v.value));const Le=bp(c.originalLayout,c.layouts,r.breakpoints,we,c.lastBreakpoint,Pe,r.verticalCompact);c.layouts[we]=Le,c.lastBreakpoint!==we&&d("breakpoint-changed",we,Le),v.value=Le,d("update:layout",Le),c.lastBreakpoint=we,F.emit("setColNum",Pe)}function Ae(){c.layouts=Object.assign({},r.responsiveLayouts)}function at(we,Pe){const Le=new Set(Pe.map(pe=>pe.i)),P=new Set(we.map(pe=>pe.i)),re=we.filter(pe=>!Le.has(pe.i)),ne=Pe.filter(pe=>!P.has(pe.i));return re.concat(ne)}return(we,Pe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(c.mergedStyle)},[we.$slots.default?e.renderSlot(we.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,Le=>(e.openBlock(),e.createBlock(Ha,e.mergeProps({key:Le.i,ref_for:!0},Le),{default:e.withCtx(()=>[e.renderSlot(we.$slots,"item",{item:Le})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Ha,{class:"vgl-item--placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:c.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,c.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const rf={key:0,class:"item-view-group"},lf={key:0,class:"item-view-group"},sf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:l}){const s=V.useModelComp(xe.pinia),{isEdit:r}=xe.storeToRefs(s),d=l,c=a,x=e.computed(()=>c==null?void 0:c.children),v=e.computed(()=>{var R,H,M,ve;return((R=c==null?void 0:c.children)==null?void 0:R.length)>0&&((H=c==null?void 0:c.children)!=null&&H.every(K=>K==null?void 0:K.layout))?(ve=(M=c==null?void 0:c.children)==null?void 0:M[0])==null?void 0:ve.layout:"vertical"}),f=e.computed(()=>{var R,H;return((H=(R=c==null?void 0:c.children)==null?void 0:R[0])==null?void 0:H.isGridLayout)||!1}),C=e.ref((c==null?void 0:c.level)+1),w=R=>{d("rowClick",R)},F=(R,H)=>{d("routeUrl",R,H)};return(R,H)=>f.value?(e.openBlock(),e.createBlock(e.unref(al),{key:0,layout:x.value,"onUpdate:layout":H[0]||(H[0]=M=>x.value=M),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(M,ve)=>(e.openBlock(),e.createBlock(e.unref(Ha),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var K,O,G,b,_,y,T,h,ce,Ae,at,we,Pe;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ve===((K=c==null?void 0:c.children)==null?void 0:K.length)-1?"0px":"24px"})},[((G=(O=M==null?void 0:M.component)==null?void 0:O.comp)==null?void 0:G.toUpperCase())!=="TABLE"&&((b=M==null?void 0:M.component)!=null&&b.name)?(e.openBlock(),e.createElementBlock("div",rf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((_=M==null?void 0:M.component)==null?void 0:_.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ja)((y=M==null?void 0:M.component)==null?void 0:y.comp)),{pageLayout:v.value,config:{showIndex:(T=e.unref(Gt)[ve])==null?void 0:T.showIndex,allowMove:(h=e.unref(Gt)[ve])==null?void 0:h.allowMove,viewport:(ce=e.unref(Gt)[ve])==null?void 0:ce.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(Ar),itemData:(Ae=M==null?void 0:M.component)==null?void 0:Ae.compData,childItemData:(at=M==null?void 0:M.component)==null?void 0:at.itemChildData,key:e.unref(fa),cacheNewData:e.unref(Nr),onChange:e.unref(Ua),index:(M==null?void 0:M.id)??ve,onContentChange:e.unref(Ka),onPageChange:e.unref(Wa),parentTableId:(we=M==null?void 0:M.component)==null?void 0:we.tableId,allMapContents:e.unref(io),children:(Pe=M==null?void 0:M.component)==null?void 0:Pe.children,level:C.value,onRowClick:w,onRouteUrl:F,onClickTrigger:e.unref(Vr),onClickMainKey:e.unref(Or)},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(c==null?void 0:c.children,(M,ve)=>{var K,O;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ve)===((K=c==null?void 0:c.children)==null?void 0:K.length)-1?"0px":"24px"})},[((O=M==null?void 0:M.comp)==null?void 0:O.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",lf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ja)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(fa),onChange:e.unref(Ua),index:(M==null?void 0:M.id)??ve,onContentChange:e.unref(Ka),onPageChange:e.unref(Wa),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(io),children:M==null?void 0:M.children,level:C.value,onRowClick:w,onRouteUrl:F},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),cf=Rt._export_sfc(sf,[["__scopeId","data-v-e672653d"]]),ol=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"}]),uf={TABLE:ba.ssTable,FORM:Bo,TABLEOPERATE:ps,TABLESTYLE:Ts,TABLEEXTEND:Is,TABLEINTERACTION:Vs,FORMOPERATE:Io,FOLD:cc,CALCULATOR:vc,METHODBUTTON:yc,AVATARUPLOAD:Eo.ssAvatar,SIGNATURE:Eo.ssSignature,FORMTOP:Bo,STEP:Ic,STEPOPERATE:ec,TIMELINE:zc,TIMELINEOPERATE:lc,FORMTOPOPERATE:Io,SIGNATUREOPERATE:Sc,AVATARUPLOADOPERATE:xc,TABS:Pc,TABSOPERATE:Du,CHART:Ru,CHARTOPERATE:Xu,LAYOUT:Wd,LAYOUTOPERATE:ep,PARENTITEM:cf};function aa(a){return uf[a==null?void 0:a.toUpperCase()]||null}exports.De=al;exports._sfc_main=wr;exports.activeStepInfo=ca;exports.affixItems=Ad;exports.allMapContents=io;exports.analyzeSplitToContent=fo;exports.analyzerStringToArray=Yu;exports.cacheNewData=Nr;exports.clickMainKey=Or;exports.clickSavePage=Nd;exports.clickStep=zr;exports.clickTrigger=Vr;exports.compId=fa;exports.compNames=Ar;exports.compShow=$a;exports.existLayouts=zd;exports.generateLayouts=Ds;exports.getComponent=aa;exports.getComponents=ja;exports.getSliceContLength=Ld;exports.gridRowHeight=bs;exports.isStepLayout=Fr;exports.onBack=Td;exports.onChange=Ua;exports.onClick=Id;exports.onContentChange=Ka;exports.onExtendTaskEnd=Md;exports.onPageBack=Fd;exports.onPageChange=Wa;exports.onSelectFixContent=Sd;exports.prefixSum=Zu;exports.renderShowItems=Br;exports.same=Ju;exports.setComponent=Er;exports.showItems=Gt;exports.sliceTableLength=Ir;exports.slotContent=ol;exports.ssMenu=La;exports.st=Ha;exports.stepItems=$d;exports.toolBar=ka;exports.verifyButton=Rd;
11
+ `).filter(c=>c.trim()!==""),s=s==null?void 0:s.map(c=>(c=c==null?void 0:c.replaceAll("\r",""),c));const r=[];let d="";for(const c of s)c.includes("{")||d.includes("{")||c.includes("[")||d.includes("[")||c.includes("【")||d.includes("【")||c.includes("(")||d.includes("(")||c.includes("(")||d.includes("(")||c.includes("/*")||d.includes("/*")?(d+=c.trim(),d.split("{").length-1===d.split("}").length-1&&d.split("【").length-1===d.split("】").length-1&&d.split("[").length-1===d.split("]").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("/*").length-1===d.split("*/").length-1&&!(l!=null&&l.find(x=>x===d[d.length-1]))?(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""):d!=null&&d.includes("*/")&&(d=d.replace(/\/\*[\s\S]*?\*\//g,""))):l!=null&&l.find(x=>x===c[c.length-1])?d+=c.trim():r.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return r},fo=(a,l)=>{let s=a;const r=[];let d="",c=0;for(const x of s)c++,x.includes("{")||d.includes("{")||x.includes("[")||d.includes("[")||x.includes("【")||d.includes("【")||x.includes("(")||d.includes("(")||x.includes("(")||d.includes("(")||x.includes("/*")||d.includes("/*")?(d+=x.trim(),d.split("{").length-1===d.split("}").length-1&&d.split("【").length-1===d.split("】").length-1&&d.split("[").length-1===d.split("]").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("(").length-1===d.split(")").length-1&&d.split("/*").length-1===d.split("*/").length-1&&d[d.length-1]===l?(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""):c===(a==null?void 0:a.length)&&(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d="")):(d+=x.trim(),(d==null?void 0:d[(d==null?void 0:d.length)-1])===l&&(r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),d=""));return(d==null?void 0:d.length)!==0&&r.push(d.replace(/\/\*[\s\S]*?\*\//g,"")),r},Ju=(a,l)=>a===l||a.length===l.length&&a.every((s,r)=>s===l[r]),Zu=a=>a.reduce((l,s)=>{var d;const r=(((d=l.at(-1))==null?void 0:d.total)??0)+s;return l.push({key:s,total:r}),l},[]),Qu=a=>{for(let l=a.length-1;l>0;l--){const s=Math.floor(Math.random()*(l+1));[a[l],a[s]]=[a[s],a[l]]}return a};let qt="$R";const ed=Ne.useUnit(xe.pinia),{chooseTitle:ia}=xe.storeToRefs(ed),da=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@ProButton",value:"onButtonContents",order:1},{key:"@PamButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@Related",value:"onRelated",order:1}],td=a=>{var s;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(s=a==null?void 0:a.contents)==null?void 0:s.map(r=>{var d;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(d=r.contents)==null?void 0:d.slice(0,parseInt(a==null?void 0:a.filter))),r})},nd=a=>{var l;return(a==null?void 0:a.filter)==="Random"?(l=a==null?void 0:a.contents)==null?void 0:l.map(r=>((r==null?void 0:r.key)==="tableContents"&&(r.contents=Qu(r.contents)),r)):a==null?void 0:a.contents},ad=a=>{var r,d,c,x,v;let l=(c=(d=(r=a==null?void 0:a.filter)==null?void 0:r.replace("*",""))==null?void 0:d.replaceAll("{",""))==null?void 0:c.replaceAll("}","");if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let s=Ne.calculatorAndToOr(l);if((s==null?void 0:s.length)>0){let f=[];return s==null||s.forEach(w=>{let F={};for(let R in w){let H=R;H!=null&&H.includes("[")||(F[H]=w[R])}f.push(F)}),(v=(x=V.cloneDeep(a))==null?void 0:x.contents)==null?void 0:v.map(w=>{var R,H,M,ve;let F=(M=(H=(R=V.cloneDeep(a))==null?void 0:R.contents)==null?void 0:H.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:M.contents;if(F=(ve=Ne.getEqualChild(F))==null?void 0:ve.filter(K=>(K==null?void 0:K.label)!=="操作"),(w==null?void 0:w.key)==="tableContents"){let O=Ne.tableToForm(w==null?void 0:w.contents,F);f==null||f.forEach(G=>{var b,_;for(let y in G)!((b=O==null?void 0:O[0])!=null&&b.find(T=>{var h;return(T==null?void 0:T.key)===y||((h=T==null?void 0:T.key)==null?void 0:h.includes(y))}))&&!(O!=null&&O.find(T=>{var h;return(T==null?void 0:T.key)===y||((h=T==null?void 0:T.key)==null?void 0:h.includes(y))}))||(((_=G[y])==null?void 0:_[0])!=="!"?O=O==null?void 0:O.filter(T=>{var h,ce;return((h=T==null?void 0:T.find(Ae=>{var at;return(Ae==null?void 0:Ae.key)===y||((at=Ae==null?void 0:Ae.key)==null?void 0:at.includes(y))}))==null?void 0:h.value)===G[y]&&!Array.isArray(G==null?void 0:G[y])||Array.isArray(G==null?void 0:G[y])&&((ce=G==null?void 0:G[y])==null?void 0:ce.find(Ae=>{var at;return((at=T==null?void 0:T.find(we=>{var Pe;return(we==null?void 0:we.key)===y||((Pe=we==null?void 0:we.key)==null?void 0:Pe.includes(y))}))==null?void 0:at.value)===Ae}))}):O=O==null?void 0:O.filter(T=>{var h;return((h=T==null?void 0:T.find(ce=>{var Ae;return(ce==null?void 0:ce.key)===y||((Ae=ce==null?void 0:ce.key)==null?void 0:Ae.includes(y))}))==null?void 0:h.value)!==G[y]}))}),(O==null?void 0:O.length)===0?w.contents=[]:w.contents=O==null?void 0:O.map(G=>{let b={};return G==null||G.forEach(_=>{b[_==null?void 0:_.key]=_==null?void 0:_.value}),b})}return w})}return a==null?void 0:a.contents},od=a=>a==null?void 0:a.contents,rd=a=>a==null?void 0:a.contents,ld=a=>a==null?void 0:a.contents,id=a=>a==null?void 0:a.contents,sd=a=>a==null?void 0:a.contents,cd=a=>a==null?void 0:a.contents,ud=async a=>{var l,s,r,d,c,x,v,f,C,w,F;if((a==null?void 0:a.filter)==="true"){let R=await Xa((s=(l=ia==null?void 0:ia.value)==null?void 0:l[0])==null?void 0:s.parentContent,!1),H=(d=(r=ia==null?void 0:ia.value)==null?void 0:r[0])==null?void 0:d.value;R=(c=R==null?void 0:R[0])==null?void 0:c.compData;let M=(x=R==null?void 0:R.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:x.contents;M=((v=M==null?void 0:M.find(O=>O==null?void 0:O.isMainKey))==null?void 0:v.prop)??((f=M==null?void 0:M[0])==null?void 0:f.prop);let ve=(w=(C=R==null?void 0:R.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:C.contents)==null?void 0:w.find(O=>(O==null?void 0:O[M])===H);return(F=a==null?void 0:a.contents)==null?void 0:F.map(O=>{var G;return(O==null?void 0:O.key)==="formContent"&&(O.contents=(G=O.contents)==null?void 0:G.map(b=>(b.value=ve==null?void 0:ve[b==null?void 0:b.prop],b))),O})}return a==null?void 0:a.contents},xr={onNumSlice:td,onRandomContents:nd,onConditionContents:ad,onFatherPaceContents:od,onPaceContents:rd,onMainTagContents:ld,onButtonContents:id,onPamButtonContents:sd,onRowButtonContents:cd,onRelated:ud},dd=async a=>{var d,c,x,v,f,C,w,F,R,H,M,ve,K,O,G,b,_,y,T;let l="";if(((d=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="filter"))==null?void 0:d.contents)!==""&&(l=(c=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="filter"))==null?void 0:c.contents),l===""||!l)return a;(l==null?void 0:l[0])==="("?l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1):(l=(v=(x=l==null?void 0:l.replace("(",qt))==null?void 0:x.split(qt))==null?void 0:v[1],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1));let s=(f=fo(l,","))==null?void 0:f.map(h=>((h==null?void 0:h[(h==null?void 0:h.length)-1])===","&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),h!=null&&h.includes("(")||(h=h==null?void 0:h.replaceAll(":","=")),h)),r=a;for(let h in s){let ce,Ae="";(C=s==null?void 0:s[h])!=null&&C.includes("(")?(ce=(R=(F=(w=s==null?void 0:s[h])==null?void 0:w.replace("(",qt))==null?void 0:F.split(qt))==null?void 0:R[0],Ae="("+((ve=(M=(H=s==null?void 0:s[h])==null?void 0:H.replace("(",qt))==null?void 0:M.split(qt))==null?void 0:ve[1])):(ce=(G=(O=(K=s==null?void 0:s[h])==null?void 0:K.replace("=",qt))==null?void 0:O.split(qt))==null?void 0:G[0],Ae=(y=(_=(b=s==null?void 0:s[h])==null?void 0:b.replace("=",qt))==null?void 0:_.split(qt))==null?void 0:y[1]);let at=(T=da==null?void 0:da.find(we=>(we==null?void 0:we.key)===ce))==null?void 0:T.value;if(at){const we=xr[at];await new Function("return ")(),r=we({contents:r,filter:Ae})}}return r},pd=async a=>{var d,c,x,v,f,C,w,F,R,H,M,ve,K,O,G,b,_,y,T;let l="";if(((d=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="filter"))==null?void 0:d.contents)!==""&&(l=(c=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="filter"))==null?void 0:c.contents),l==="")return a;(l==null?void 0:l[0])==="("?l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1):(l=(v=(x=l==null?void 0:l.replace("(",qt))==null?void 0:x.split(qt))==null?void 0:v[1],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1));let s=(f=fo(l,","))==null?void 0:f.map(h=>((h==null?void 0:h[(h==null?void 0:h.length)-1])===","&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),h!=null&&h.includes("(")||(h=h==null?void 0:h.replaceAll(":","=")),h)),r=a;for(let h in s){let ce,Ae="";(C=s==null?void 0:s[h])!=null&&C.includes("(")?(ce=(R=(F=(w=s==null?void 0:s[h])==null?void 0:w.replace("(",qt))==null?void 0:F.split(qt))==null?void 0:R[0],Ae="("+((ve=(M=(H=s==null?void 0:s[h])==null?void 0:H.replace("(",qt))==null?void 0:M.split(qt))==null?void 0:ve[1])):(ce=(G=(O=(K=s==null?void 0:s[h])==null?void 0:K.replace("=",qt))==null?void 0:O.split(qt))==null?void 0:G[0],Ae=(y=(_=(b=s==null?void 0:s[h])==null?void 0:b.replace("=",qt))==null?void 0:_.split(qt))==null?void 0:y[1]);let at=(T=da==null?void 0:da.find(we=>(we==null?void 0:we.key)===ce))==null?void 0:T.value;if(at){const we=xr[at];await new Function("return ")(),r=we({contents:r,filter:Ae})}}return r},fd=V.useLoginState(xe.pinia),{loginUserInfo:Dn}=xe.storeToRefs(fd),hd=V.useMenuState(xe.pinia),{activeMenuPath:Ao}=xe.storeToRefs(hd),ro=Ne.useUnit(xe.pinia),{selectTitle:eo}=xe.storeToRefs(ro),vd=async(a,l)=>{var x,v,f,C,w,F,R,H,M,ve,K,O,G;let s=Ao.value,r="",d=((x=eo==null?void 0:eo.value)==null?void 0:x.find(b=>(b==null?void 0:b.condition)==="child"))??void 0;ro.setSelectTitle([]),(a==null?void 0:a.length)===0||(s=l?s:(v=a==null?void 0:a[0])==null?void 0:v.object_name,r=(f=a==null?void 0:a[0])==null?void 0:f.father_name);let c=[];if(r!==""){let b=r;(b==null?void 0:b[(b==null?void 0:b.length)-1])==="/"&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1));let _=await Xa(b,!1);_=(C=_==null?void 0:_[0])==null?void 0:C.compData;let y=(w=_==null?void 0:_.find(h=>(h==null?void 0:h.key)==="header"))==null?void 0:w.contents;y=((F=y==null?void 0:y.find(h=>h==null?void 0:h.isMainKey))==null?void 0:F.prop)??((R=y==null?void 0:y[0])==null?void 0:R.prop);let T=(M=(H=_==null?void 0:_.find(h=>(h==null?void 0:h.key)==="tableContents"))==null?void 0:H.contents)==null?void 0:M.map(h=>({label:h==null?void 0:h[y],value:h==null?void 0:h[y]}));c=(ve=r==null?void 0:r.split("/"))==null?void 0:ve.map(h=>(h===""?d?(d.isShow=!0,h=d):h={value:h,condition:"child",options:T,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:h={condition:"parent",value:h.trim(),isShow:!0},h))}if(s!==""){let b=(K=s==null?void 0:s.split("/"))==null?void 0:K.map(_=>(_={condition:"normal",value:_.trim(),isShow:!0},_));((O=b==null?void 0:b[0])==null?void 0:O.value)===((G=c==null?void 0:c[0])==null?void 0:G.value)&&(b=b==null?void 0:b.filter((_,y)=>y!==0)),c=[...c,...b]}r===""&&d&&((d==null?void 0:d.parentContent)!==Ao.value&&(d.isShow=!1),(d==null?void 0:d.value)!==""&&c.push(d)),ro.setSelectTitle(c)},Vo=async a=>{let l=[],s=a==null?void 0:a.map(async r=>{var v,f,C,w,F,R,H,M,ve,K,O,G,b,_,y,T,h,ce,Ae,at,we,Pe,Le,P,re,ne,pe,He,ot,X;let d=(w=(C=(f=(v=r==null?void 0:r.contents)==null?void 0:v.find(A=>{var te;return(te=A==null?void 0:A.key)==null?void 0:te.includes("struct")}))==null?void 0:f.value)==null?void 0:C[0])==null?void 0:w.类型,c=Object.values(r==null?void 0:r.name);c=c==null?void 0:c.reverse();let x={comp:d,isShow:!0,name:c==null?void 0:c[0],id:r==null?void 0:r.object_id};for(let A in c)parseInt(A)>=1&&(x[`name${parseInt(A)-1}`]=c[A]);if(d==="Table"){let A=(F=r==null?void 0:r.contents)==null?void 0:F.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("content")}),te=[];A.value=(R=A==null?void 0:A.value)==null?void 0:R.sort((ue,De)=>parseInt(ue)-parseInt(De)),te.push({key:"tableContents",contents:A==null?void 0:A.value});let ye=(O=(K=(ve=(M=(H=r==null?void 0:r.contents)==null?void 0:H.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("struct")}))==null?void 0:M.value)==null?void 0:ve[0])==null?void 0:K.结构)==null?void 0:O.contents;te.push({key:"header",contents:ye}),te.push({key:"filter",contents:(T=(y=(_=(b=(G=r==null?void 0:r.contents)==null?void 0:G.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("struct")}))==null?void 0:b.value)==null?void 0:_[0])==null?void 0:y.引用)==null?void 0:T.contents}),x.compData=await pd(te)}else if(d==="Form"){let A=[],te=(Ae=(ce=(h=r==null?void 0:r.contents)==null?void 0:h.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("content")}))==null?void 0:ce.value)==null?void 0:Ae[0],ye=(re=(P=(Le=(Pe=(we=(at=r==null?void 0:r.contents)==null?void 0:at.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("struct")}))==null?void 0:we.value)==null?void 0:Pe[0])==null?void 0:Le.结构)==null?void 0:P.contents)==null?void 0:re.map(ue=>(ue.value=te==null?void 0:te[ue==null?void 0:ue.prop],ue));A.push({key:"filter",contents:(X=(ot=(He=(pe=(ne=r==null?void 0:r.contents)==null?void 0:ne.find(ue=>{var De;return(De=ue==null?void 0:ue.key)==null?void 0:De.includes("struct")}))==null?void 0:pe.value)==null?void 0:He[0])==null?void 0:ot.引用)==null?void 0:X.contents}),A.push({key:"formContent",contents:ye}),x.compData=await dd(A)}return x});return l=await Promise.all(s),l},Xa=async(a,l,s={})=>{var x,v,f,C,w,F,R,H,M,ve,K;let r=await ua.getPageDataApi({platId:parseInt((x=Dn==null?void 0:Dn.value)==null?void 0:x.plat_id),pageName:a}),d=(v=r==null?void 0:r.data)==null?void 0:v.result;if((d==null?void 0:d.length)===0&&(s!=null&&s.originPath)&&(s==null?void 0:s.originPath)!==a){let O=await ua.getPageDataApi({platId:parseInt((f=Dn==null?void 0:Dn.value)==null?void 0:f.plat_id),pageName:s==null?void 0:s.originPath});if(((w=(C=O==null?void 0:O.data)==null?void 0:C.result)==null?void 0:w.length)>0){let G=await Vo((F=O==null?void 0:O.data)==null?void 0:F.result);G=G==null?void 0:G.map(_=>{var h,ce,Ae,at,we,Pe,Le,P,re,ne,pe,He,ot,X,A;let y=[],T=(h=Object.keys(_))==null?void 0:h.filter(te=>te==null?void 0:te.includes("name"));for(let te in _)T!=null&&T.find(ye=>ye===te)&&y.push(_==null?void 0:_[te]);if(y=y.reverse(),(_==null?void 0:_.comp)==="Table")_={filter:(Ae=(ce=_==null?void 0:_.compData)==null?void 0:ce.find(te=>(te==null?void 0:te.key)==="filter"))==null?void 0:Ae.contents,key:_==null?void 0:_.comp,name:y,tableColumns:(we=(at=_==null?void 0:_.compData)==null?void 0:at.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:we.contents,tableContents:(Le=(Pe=_==null?void 0:_.compData)==null?void 0:Pe.find(te=>(te==null?void 0:te.key)==="tableContents"))==null?void 0:Le.contents};else{let te=(ne=(re=(P=_==null?void 0:_.compData)==null?void 0:P.find(ue=>(ue==null?void 0:ue.key)==="formContent"))==null?void 0:re.contents)==null?void 0:ne.map(ue=>(ue==null?void 0:ue.value)??"");te=[te];let ye=(ot=(He=(pe=_==null?void 0:_.compData)==null?void 0:pe.find(ue=>(ue==null?void 0:ue.key)==="formContent"))==null?void 0:He.contents)==null?void 0:ot.map(ue=>(ue.value="",ue));_={contents:te,filter:(A=(X=_==null?void 0:_.compData)==null?void 0:X.find(ue=>(ue==null?void 0:ue.key)==="filter"))==null?void 0:A.contents,key:_==null?void 0:_.comp,name:y,value:ye}}return _});let b=[{key:"menuPath",contents:[{path:a,fatherPath:(M=(H=(R=O==null?void 0:O.data)==null?void 0:R.result)==null?void 0:H[0])==null?void 0:M.father_name,isShow:!1}]},{key:a,contents:G}];await ua.createPlatFormDataApi({platId:parseInt((ve=Dn==null?void 0:Dn.value)==null?void 0:ve.plat_id),changeData:b}),d=(K=O==null?void 0:O.data)==null?void 0:K.result}}return l&&await vd(d,!!(s!=null&&s.originPath)),await Vo(d)};var za={exports:{}},md=za.exports,Oo;function gd(){return Oo||(Oo=1,function(a,l){(function(s,r){r()})(md,function(){function s(C,w){return typeof w>"u"?w={autoBom:!1}:typeof w!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),w={autoBom:!w}),w.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(C.type)?new Blob(["\uFEFF",C],{type:C.type}):C}function r(C,w,F){var R=new XMLHttpRequest;R.open("GET",C),R.responseType="blob",R.onload=function(){f(R.response,w,F)},R.onerror=function(){console.error("could not download file")},R.send()}function d(C){var w=new XMLHttpRequest;w.open("HEAD",C,!1);try{w.send()}catch{}return 200<=w.status&&299>=w.status}function c(C){try{C.dispatchEvent(new MouseEvent("click"))}catch{var w=document.createEvent("MouseEvents");w.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),C.dispatchEvent(w)}}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,v=x.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=x.saveAs||(typeof window!="object"||window!==x?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(C,w,F){var R=x.URL||x.webkitURL,H=document.createElement("a");w=w||C.name||"download",H.download=w,H.rel="noopener",typeof C=="string"?(H.href=C,H.origin===location.origin?c(H):d(H.href)?r(C,w,F):c(H,H.target="_blank")):(H.href=R.createObjectURL(C),setTimeout(function(){R.revokeObjectURL(H.href)},4e4),setTimeout(function(){c(H)},0))}:"msSaveOrOpenBlob"in navigator?function(C,w,F){if(w=w||C.name||"download",typeof C!="string")navigator.msSaveOrOpenBlob(s(C,F),w);else if(d(C))r(C,w,F);else{var R=document.createElement("a");R.href=C,R.target="_blank",setTimeout(function(){c(R)})}}:function(C,w,F,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof C=="string")return r(C,w,F);var H=C.type==="application/octet-stream",M=/constructor/i.test(x.HTMLElement)||x.safari,ve=/CriOS\/[\d]+/.test(navigator.userAgent);if((ve||H&&M||v)&&typeof FileReader<"u"){var K=new FileReader;K.onloadend=function(){var b=K.result;b=ve?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=b:location=b,R=null},K.readAsDataURL(C)}else{var O=x.URL||x.webkitURL,G=O.createObjectURL(C);R?R.location=G:location.href=G,R=null,setTimeout(function(){O.revokeObjectURL(G)},4e4)}});x.saveAs=f.saveAs=f,a.exports=f})}(za)),za.exports}gd();const La=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CiO2uT4E.cjs")).then(a=>a.index));La.install=a=>{a.component("ssMenu",La)};const wr={__name:"index",props:{name:String},setup(a){const l=a,s=e.computed(()=>xe.ElIcons[l.name]);return e.onMounted(()=>{}),(r,d)=>{const c=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Cr=(a,l,s=0)=>{let r=a;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(l==null?void 0:l[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(c=>c===(l==null?void 0:l[s]))&&(l==null?void 0:l.length)!==1){let c=V.cloneDeep(l),x=d==null?void 0:d.filter(w=>w!==(c==null?void 0:c[s])),v=s+1,f=Cr(x,c,v),C=[];C.push(d==null?void 0:d[0]),f==null||f.forEach(w=>{C.push(w)}),d=C}return d})),r},Dr=(a,l,s,r=0)=>{let d=a;return d!=null&&d.every(c=>Array.isArray(c))&&(d!=null&&d.every(c=>Array.isArray(c)&&c.length===1)?d.push([s]):d=d==null?void 0:d.map(c=>{if(c!=null&&c.find(x=>x===(l==null?void 0:l[r]))&&(l==null?void 0:l.length)!==1){let x=V.cloneDeep(l),v=c==null?void 0:c.filter(F=>F!==(x==null?void 0:x[r])),f=r+1,C=Dr(v,x,s,f),w=[];w.push(c==null?void 0:c[0]),C==null||C.forEach(F=>{w.push(F)}),c=w}return c})),d},_r=(a,l,s,r,d=0)=>{let c=a;return c!=null&&c.every(x=>Array.isArray(x))&&(c!=null&&c.every(x=>Array.isArray(x)&&x.length===1)?c=c==null?void 0:c.map(x=>((x==null?void 0:x[0])===s&&(x=[r]),x)):c=c==null?void 0:c.map(x=>{if(x!=null&&x.find(v=>v===(l==null?void 0:l[d]))&&(l==null?void 0:l.length)!==1){let v=V.cloneDeep(l),f=x==null?void 0:x.filter(R=>R!==(v==null?void 0:v[d])),C=d+1,w=_r(f,v,s,r,C),F=[];F.push(x==null?void 0:x[0]),w==null||w.forEach(R=>{F.push(R)}),x=F}return x})),c};function Er(a="menu"){return{name:a,components:{SvgIcon:Rl.SvgIcon,ssMenu:La,DynamicIcon:wr,ssDialog:Xt.ssDialog,ssInput:Bt._sfc_main$2},setup(l,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),c=V.useMenuState(),x=V.useModelComp(xe.pinia),v=V.useLoginState(xe.pinia),{loginUserInfo:f}=xe.storeToRefs(v),C=e.ref(0),w=Pl.useRouter(),F=e.ref(),{asideMenus:R,menuTriggerType:H,platform:M}=xe.storeToRefs(c),{fixMenuStatus:ve}=xe.storeToRefs(x),K=e.computed(()=>r==null?void 0:r.mode),O=ae=>ae==null?void 0:ae.map(I=>{var Xe,Ye;return!(I!=null&&I.children)||((Xe=I==null?void 0:I.children)==null?void 0:Xe.length)===0?I.config=d.value:I!=null&&I.children&&((Ye=I==null?void 0:I.children)==null?void 0:Ye.length)>0&&(I.children=O(I.children)),I}),G=e.computed(()=>{let ae=[...R.value];if((ae==null?void 0:ae.length)===0)return w.push("/"),[];const _e=ce(ae,h.value);return _e.isFlag||(ae=_e==null?void 0:_e.data),ae=ae==null?void 0:ae.map(I=>{var Xe,Ye;return!(I!=null&&I.children)||((Xe=I==null?void 0:I.children)==null?void 0:Xe.length)===0?I.config=d.value:I!=null&&I.children&&((Ye=I==null?void 0:I.children)==null?void 0:Ye.length)>0&&(I.children=O(I.children)),I}),ae}),b=async(ae,_e)=>{x.setRouteToChildPath(""),c.setMenuTriggerType("click"),c.setActiveMenuPath(ae==null?void 0:ae.path),c.setActiveAsideMenu(ae),ae.isRouter?w.push(ae.path):w.push("/"),s("node-click",ae,_e)},_=async ae=>{const _e=Ll.findNodeByPropInTree(G.value,"path",ae);c.setActiveAsideMenu(_e),x.setRouteToChildPath(""),ve.value?x.setFixMenuStatus(!1):(De.value&&(H.value="open"),H.value==="click"?C.value===1?c.setActiveMenuPath(sessionStorage.getItem("pageKey")):c.setActiveMenuPath(ae):De.value||(c.setMenuTriggerType("click"),c.setActiveMenuPath(ae))),ae!=null&&ae.startsWith("/")?w.push(ae):w.push("/"),C.value++},y=ae=>{De.value||c.setActiveMenuPath(ae)},T=ae=>{const _e=document.documentElement;ae==null||ae.forEach(I=>{_e.style.setProperty(I.name,I.value)})};e.onMounted(()=>{C.value=1});const h=e.computed(()=>{const ae=sessionStorage.getItem("authority");return ae?JSON.parse(ae):[]});e.watch(()=>M.value,ae=>{ae==="browser"?T(ya.browserVerticalMenuClasses):ae==="client"?(T(ya.clientHorizontalMenuClasses),T(ya.clientVerticalMenuClasses)):ae==="three"&&(T(ya.threeHorizontalMenuClasses),T(ya.threeVerticalMenuClasses))},{immediate:!0});const ce=(ae,_e)=>({isFlag:!0}),Ae=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),at=ae=>aa(ae),we=e.ref({}),Pe=e.ref([]),Le=e.ref({}),P=e.ref({}),re=ae=>{switch(ae){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},ne=e.ref({}),pe=ae=>{c.setCacheInputMenu({type:Ae.type,data:ae}),c.setIsRefreshMenus(!0)},He=async(ae,_e,I)=>{var Xe,Ye,Ie,le,Q,se,Ee,qe,dt,m,S,U,J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt,$e,nt,Be,mt,et,Oe,it,gt,Je;if(_e==="create"){let je=(I==null?void 0:I.title)+"(1)",It=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Te=(Ye=(Xe=It==null?void 0:It.data)==null?void 0:Xe.result)==null?void 0:Ye[0],Ge=(Ie=Te==null?void 0:Te.value)==null?void 0:Ie.pageData;Ge.compData=(le=Ge.compData)==null?void 0:le.map(E=>{var fe;return(E==null?void 0:E.key)==="menuContents"&&(E.contents=Dr(E.contents,(fe=I==null?void 0:I.path)==null?void 0:fe.split("/"),je)),E}),await xe.updateInsofDataApi({id:Te==null?void 0:Te.id,value:{pageData:Ge}});let Fe=(se=(Q=I==null?void 0:I.path)==null?void 0:Q.split("/"))==null?void 0:se.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}),Ze=await Ne.getItemData((dt=(qe=(Ee=I==null?void 0:I.path)==null?void 0:Ee.split("/"))==null?void 0:qe.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(Fe.push(je),Fe=Fe==null?void 0:Fe.join("/"),(Ze==null?void 0:Ze.length)>0){let E=Ze==null?void 0:Ze[0],fe=(S=(m=E==null?void 0:E.compData)==null?void 0:m.find(Ke=>(Ke==null?void 0:Ke.key)==="header"))==null?void 0:S.contents;if(((U=fe==null?void 0:fe[0])==null?void 0:U.directiveLabel)==="#isMain"){let Ke=(J=fe==null?void 0:fe[0])==null?void 0:J.prop,he=(oe=(D=E==null?void 0:E.compData)==null?void 0:D.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:oe.contents,ut;he==null||he.forEach(st=>{var xt,pt;if(st.length===1)((xt=st==null?void 0:st[0])==null?void 0:xt[Ke])===(I==null?void 0:I.title)&&(ut=st==null?void 0:st[0],ut[Ke]=je);else{let ct=(pt=fe==null?void 0:fe.filter(Tt=>Tt!=="操作"))==null?void 0:pt.map(Tt=>Tt==null?void 0:Tt.prop),ft=st==null?void 0:st.filter(Tt=>!(Tt!=null&&Tt.id)),wt=Ne.getValueToObjectValue(ft,ct);wt[Ke]=je,ut=wt}}),await xe.createInsofDataApi({key:{type:"data",pageKey:(ee=(B=(Ve=I==null?void 0:I.path)==null?void 0:Ve.split("/"))==null?void 0:B.filter((st,xt)=>{var pt,ct;return xt!==((ct=(pt=I==null?void 0:I.path)==null?void 0:pt.split("/"))==null?void 0:ct.length)-1}))==null?void 0:ee.join("/"),tableId:E==null?void 0:E.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:($=f.value)==null?void 0:$.id,createUserLayer:((W=f.value)==null?void 0:W.dept)||((Se=f.value)==null?void 0:Se.部门名称)},value:{tableData:ut}})}}await Ne.newLoadingConstruct(I==null?void 0:I.path,Fe),c.setUpdateMenuStatus(!1),await ua.verifyStructureDataToStore(),c.setActiveMenuPath((Z=(q=(ie=I==null?void 0:I.path)==null?void 0:ie.split("/"))==null?void 0:q.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}))==null?void 0:Z.join("/")),c.setActiveTopMenuPath((me=(de=I==null?void 0:I.path)==null?void 0:de.split("/"))==null?void 0:me[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0)}else if(_e==="update")F.value=I;else if(_e==="delete"){let je=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:I==null?void 0:I.path}}),It=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Te=(be=(Ce=It==null?void 0:It.data)==null?void 0:Ce.result)==null?void 0:be[0],Ge=(j=Te==null?void 0:Te.value)==null?void 0:j.pageData;if(Ge.compData=(Me=Ge.compData)==null?void 0:Me.map(E=>{var fe;return(E==null?void 0:E.key)==="menuContents"&&(E.contents=Cr(E.contents,(fe=I==null?void 0:I.path)==null?void 0:fe.split("/"))),E}),await xe.updateInsofDataApi({id:Te==null?void 0:Te.id,value:{pageData:Ge}}),((Ue=(ge=je==null?void 0:je.data)==null?void 0:ge.result)==null?void 0:Ue.length)>0){let E=($e=(rt=je==null?void 0:je.data)==null?void 0:rt.result)==null?void 0:$e.map(fe=>fe==null?void 0:fe.id);(E==null?void 0:E.length)>0&&await xe.batchDeleteInsofDataApi({ids:E})}let Fe=await Ne.getItemData((mt=(Be=(nt=I==null?void 0:I.path)==null?void 0:nt.split("/"))==null?void 0:Be.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}))==null?void 0:mt.join("/"),sessionStorage.getItem("systemKey"),""),Ze=[];(Fe==null?void 0:Fe.length)>0&&(Fe==null||Fe.forEach(E=>{var Ke,he,ut,st,xt,pt,ct,ft,wt,Tt,jt;let fe=(st=(ut=(he=(Ke=E==null?void 0:E.compData)==null?void 0:Ke.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:he.contents)==null?void 0:ut[0])==null?void 0:st.prop;((ft=(ct=(pt=(xt=E==null?void 0:E.compData)==null?void 0:xt.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:pt.contents)==null?void 0:ct[0])==null?void 0:ft.directiveLabel)==="#isMain"&&((jt=(Tt=(wt=E==null?void 0:E.compData)==null?void 0:wt.find(vt=>(vt==null?void 0:vt.key)==="tableContents"))==null?void 0:Tt.contents)==null||jt.forEach(vt=>{var Mt,Lt,Ut;(vt==null?void 0:vt.length)>1?(vt==null?void 0:vt[1])===(I==null?void 0:I.title)&&Ze.push((Mt=vt==null?void 0:vt[0])==null?void 0:Mt.id):((Lt=vt==null?void 0:vt[0])==null?void 0:Lt[fe])===(I==null?void 0:I.title)&&Ze.push((Ut=vt==null?void 0:vt[0])==null?void 0:Ut.id)}))})),(Ze==null?void 0:Ze.length)>0&&await xe.batchDeleteInsofDataApi({ids:Ze}),c.setUpdateMenuStatus(!1),await ua.verifyStructureDataToStore(),c.setActiveMenuPath((it=(Oe=(et=I==null?void 0:I.path)==null?void 0:et.split("/"))==null?void 0:Oe.filter((E,fe)=>{var Ke,he;return fe!==((he=(Ke=I==null?void 0:I.path)==null?void 0:Ke.split("/"))==null?void 0:he.length)-1}))==null?void 0:it.join("/")),c.setActiveTopMenuPath((Je=(gt=I==null?void 0:I.path)==null?void 0:gt.split("/"))==null?void 0:Je[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0)}},ot=async(ae,_e)=>{var qe,dt,m,S,U,J,D,oe,Ve,B,ee,$,W,Se,ie,q,Z,de,me,Ce,be,j,Me,ge,Ue,rt,$e,nt,Be,mt,et;let I=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Xe=(dt=(qe=I==null?void 0:I.data)==null?void 0:qe.result)==null?void 0:dt[0],Ye=(m=Xe==null?void 0:Xe.value)==null?void 0:m.pageData;Ye.compData=(S=Ye.compData)==null?void 0:S.map(Oe=>{var it,gt;return(Oe==null?void 0:Oe.key)==="menuContents"&&(Oe.contents=_r(Oe.contents,(it=_e==null?void 0:_e.path)==null?void 0:it.split("/"),_e==null?void 0:_e.title,(gt=ae==null?void 0:ae.target)==null?void 0:gt.value)),Oe}),Xe!=null&&Xe.id&&await xe.updateInsofDataApi({id:Xe==null?void 0:Xe.id,value:{pageData:Ye}});let Ie=(J=(U=_e==null?void 0:_e.path)==null?void 0:U.split("/"))==null?void 0:J.filter((Oe,it)=>{var gt,Je;return it!==((Je=(gt=_e==null?void 0:_e.path)==null?void 0:gt.split("/"))==null?void 0:Je.length)-1}),le=Ie==null?void 0:Ie.join("/");Ie.push((D=ae==null?void 0:ae.target)==null?void 0:D.value),Ie=Ie==null?void 0:Ie.join("/");let Q=await Ne.getItemData(le,sessionStorage.getItem("systemKey"),"");if((($=(ee=(B=(Ve=(oe=Q==null?void 0:Q[0])==null?void 0:oe.compData)==null?void 0:Ve.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:B.contents)==null?void 0:ee[0])==null?void 0:$.directiveLabel)==="#isMain"){let Oe=(Z=(q=(ie=(Se=(W=Q==null?void 0:Q[0])==null?void 0:W.compData)==null?void 0:Se.find(je=>(je==null?void 0:je.key)==="header"))==null?void 0:ie.contents)==null?void 0:q[0])==null?void 0:Z.prop,it=(Ce=(me=(de=Q==null?void 0:Q[0])==null?void 0:de.compData)==null?void 0:me.find(je=>(je==null?void 0:je.key)==="tableContents"))==null?void 0:Ce.contents,gt=(ge=(Me=(j=(be=Q==null?void 0:Q[0])==null?void 0:be.compData)==null?void 0:j.find(je=>(je==null?void 0:je.key)==="header"))==null?void 0:Me.contents)==null?void 0:ge.map(je=>je==null?void 0:je.prop),Je;if(it==null||it.forEach(je=>{var Te;let It=Ne.getValueToObjectValue(je,gt);(It==null?void 0:It[Oe])===_e.title&&(Je=It,Je[Oe]=(Te=ae==null?void 0:ae.target)==null?void 0:Te.value)}),Je){let je={};for(let Te in Je)Te!=="id"&&(je[Te]=Je==null?void 0:Je[Te]);let It=[{id:Je==null?void 0:Je.id,value:{tableData:je}}];await xe.batchUpdateInsofDataApi({dataList:It})}}let se=await xe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:_e==null?void 0:_e.path}}),Ee=(rt=(Ue=se==null?void 0:se.data)==null?void 0:Ue.result)==null?void 0:rt.map(Oe=>({id:Oe==null?void 0:Oe.id,key:Oe==null?void 0:Oe.key}));Ee=Ee==null?void 0:Ee.map(Oe=>(Oe.key.pageKey=Ie,Oe)),(Ee==null?void 0:Ee.length)>0&&await xe.batchUpdateInsofDataApi({dataList:Ee}),c.setUpdateMenuStatus(!1),await ua.verifyStructureDataToStore(),c.setActiveMenuPath((Be=(nt=($e=_e==null?void 0:_e.path)==null?void 0:$e.split("/"))==null?void 0:nt.filter((Oe,it)=>{var gt,Je;return it!==((Je=(gt=_e==null?void 0:_e.path)==null?void 0:gt.split("/"))==null?void 0:Je.length)-1}))==null?void 0:Be.join("/")),c.setActiveTopMenuPath((et=(mt=_e==null?void 0:_e.path)==null?void 0:mt.split("/"))==null?void 0:et[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0),F.value=void 0},X=async(ae,_e)=>{Ae.type=re(_e==null?void 0:_e.operateType),await He(_e,Ae.type,ae),P.value=ae,ne.value=_e},A=()=>{Ae.show=!1},te=ae=>ae==null?void 0:ae.filter(_e=>_e.allowInherit),ye=()=>{var I,Xe,Ye,Ie,le;let ae;Ae.type==="create"&&(ae=((I=P.value)==null?void 0:I.path)+"/"+Le.value[(Xe=Le.value)==null?void 0:Xe.prop]),Ae.type==="update"&&(ae=(Ye=P.value)==null?void 0:Ye.path);const _e={...P.value,config:te((Ie=P.value)==null?void 0:Ie.config),children:[],childMenus:[],title:Le.value[(le=Le.value)==null?void 0:le.prop],path:ae};console.log("clickSubmitForm",ne.value,P.value,_e),pe(_e),Ae.show=!1},ue=ae=>{var I,Xe;const _e=(I=ae==null?void 0:ae.contents)==null?void 0:I.find(Ye=>Ye.key==="formContent");_e&&(Le.value=(Xe=_e==null?void 0:_e.contents)==null?void 0:Xe.reduce((Ye,Ie)=>(Ye[Ie.key]=Ie.value,Ye.prop=Ie.key,Ye),{}))},De=e.ref(!1);return{isCollapse:De,handleMenuCollapse:()=>{De.value=!De.value},handleCompChange:ue,dialogForm:we,dialogRenderComps:Pe,getComponents:at,clickSubmitForm:ye,dialogInfo:Ae,beforeDialogDestroy:A,clickMenuIcon:X,mode:K,renderMenuList:G,clickMenu:b,openMenu:_,closeMenu:y,changeMenuStyle:T,fixElement:F,onBlur:ot}}}}e.defineComponent(Er());const yd=V.useLoginState(),{loginUserInfo:df}=xe.storeToRefs(yd),rn=V.useModelComp(xe.pinia),Sr=e.ref(!1),{itemData:bd,itemGridData:Zn,curStructureCompIds:Mo,isSubmitCurStructure:kd,isRefreshCurStructure:xd,freshContent:pf,routeToChildPath:wd,payloadTypes:ff,pageMapState:lo,itemExtendData:Aa}=xe.storeToRefs(rn),tn=V.useMenuState(xe.pinia),{activeTopMenuPath:Cd,activeMenuPath:ln,platform:hf,activeAsideMenu:vf,buttonTriggerType:Dd,menus:mf}=xe.storeToRefs(tn),ta=Ne.useUnit(xe.pinia),{selectTitle:Tr,chooseTitle:zo}=xe.storeToRefs(ta),_d=Ne.useOriginalState(xe.pinia),{originalPath:Ed}=xe.storeToRefs(_d);e.ref();V.useAuthorityState(xe.pinia);const $a=e.ref(!0),fa=e.ref(0),io=e.ref([]);e.ref(!1);e.computed(async()=>{var l,s;const a=(l=ln.value)!=null&&l.startsWith("/")?(s=ln.value)==null?void 0:s.substring(1):ln.value;return(a==null?void 0:a.includes(Ed.value))||await Od(a)});const Sd=()=>{rn.setItemGridData([]),rn.setIsEdit("edit"),rn.setSubmitCurStructure(ln.value!=="/平台管理/菜单管理")},Td=()=>{rn.setIsEdit("view"),rn.setRefreshCurStructure(!0)},Bd=async a=>{const l=sessionStorage.getItem("systemKey"),s=await Ne.getItemData(a,l,"");return s&&s.length>0},Id=async a=>{var v,f,C;let l=Tr.value,s=l==null?void 0:l.findIndex(w=>(w==null?void 0:w.value)===(a==null?void 0:a.value)),r=(v=l==null?void 0:l.filter(w=>(w==null?void 0:w.condition)==="parent"))==null?void 0:v.map(w=>w==null?void 0:w.value),d=r==null?void 0:r[0],c=(C=(f=l==null?void 0:l.filter((w,F)=>!(w!=null&&w.condition)&&F<=s))==null?void 0:f.map(w=>w.value))==null?void 0:C.join("/");d?(c==null?void 0:c.length)>0?d=d+"/"+c:d=r==null?void 0:r.join("/"):(c==null?void 0:c.length)>0&&(d=c,l=l==null?void 0:l.filter(w=>(w==null?void 0:w.condition)!=="child"),ta.setSelectTitle(l),ta.setChooseTitle([])),await Bd(d)&&tn.setActiveMenuPath(d)},to=async(a,l,s,r="contentConfig")=>{var d;try{if(!Array.isArray(a))return;let c,x;l==="create"?(c={dataList:a==null?void 0:a.map(f=>{var C;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(C=f==null?void 0:f.compData)==null?void 0:C.filter(w=>(w==null?void 0:w.key)!=="tableContents")}}}})},x=xe.batchAddInsofDataApi):l==="update"?(c={dataList:a==null?void 0:a.map(f=>{var C;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(C=f==null?void 0:f.compData)==null?void 0:C.filter(w=>(w==null?void 0:w.key)!=="tableContents")}}}})},x=xe.batchUpdateInsofDataApi):l==="delete"&&(c={ids:a},x=xe.batchDeleteInsofDataApi);const v=await x(c);if(((d=v==null?void 0:v.data)==null?void 0:d.code)===200)return v.data.result;throw xe.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{xe.ElMessage.error("保存响应失败")}},Fo=async(a,l,s,r)=>{var d,c,x,v,f,C,w,F,R,H,M;try{const ve=(c=(d=a==null?void 0:a.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:c.map(y=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:s},value:{tableData:y}})),K=(v=(x=a==null?void 0:a.results)==null?void 0:x.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:v.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),O=JSON.parse(V.cloneDeep(JSON.stringify(a))),G=(f=O==null?void 0:O.results)==null?void 0:f.map(y=>y.id);let b;s?b=(F=(w=(C=lo.value)==null?void 0:C[ln.value])==null?void 0:w.filter(y=>{var T,h,ce;return((T=y==null?void 0:y.key)==null?void 0:T.type)===l&&((ce=(h=y==null?void 0:y.key)==null?void 0:h.relatedInfo)==null?void 0:ce.target)===r}))==null?void 0:F.map(y=>y==null?void 0:y.id):b=(M=(H=(R=lo.value)==null?void 0:R[ln.value])==null?void 0:H.filter(y=>{var T;return((T=y==null?void 0:y.key)==null?void 0:T.type)===l}))==null?void 0:M.map(y=>y==null?void 0:y.id);const _=b==null?void 0:b.filter(y=>!(G!=null&&G.includes(y))&&typeof y=="number");(ve==null?void 0:ve.length)>0&&await xe.batchAddInsofDataApi({dataList:ve}),(K==null?void 0:K.length)>0&&await xe.batchUpdateInsofDataApi({dataList:K}),(_==null?void 0:_.length)>0&&await xe.batchDeleteInsofDataApi({ids:_})}catch(ve){throw new Error(ve)}},Nd=async a=>{var C,w,F,R,H,M,ve,K,O,G;tn.setContentLoading(!0);const l=JSON.parse(V.cloneDeep(JSON.stringify(bd.value)));if(!kd.value)return tn.setCacheStructures({key:Dd.value,data:l}),xe.ElMessage.success("已暂存");const s=l==null?void 0:l.map(b=>b.id),r=s.filter(b=>{var _;return!((_=Mo.value)!=null&&_.includes(b))}),d=(C=Mo.value)==null?void 0:C.filter(b=>!s.includes(b)),c=[...r,...d].filter(b=>typeof b!==null&&typeof b<"u"),x=l==null?void 0:l.filter(b=>!b.id),v=l==null?void 0:l.filter(b=>b.id);let f=[];if(c&&(c==null?void 0:c.length)>0&&f.push(to(c,"delete",a)),x&&(x==null?void 0:x.length)>0&&f.push(to(x,"create",a)),v&&(v==null?void 0:v.length)>0&&f.push(to(v,"update",a)),Zn.value&&((w=Zn.value)!=null&&w.isDelete&&((R=(F=Zn.value)==null?void 0:F.results)==null?void 0:R.length)>0&&((M=(H=Zn.value)==null?void 0:H.results)!=null&&M.every(b=>typeof b=="number"))?await xe.batchDeleteInsofDataApi({ids:(ve=Zn.value)==null?void 0:ve.results}):(console.log("itemGridData.value",Zn.value),f.push(await Fo(Zn.value,"gridLayout")))),Aa.value)for(const b in Aa.value)f.push(await Fo((K=Aa.value)==null?void 0:K[b],"extend",{target:b,compId:(G=(O=Aa.value)==null?void 0:O[b])==null?void 0:G.compId},b));await Promise.all(f).then(()=>{xe.ElMessage.success("保存成功"),rn.setRefreshCurStructure(!0)}).catch(b=>{xe.ElMessage.success(b)}),tn.setContentLoading(!1)},ja=a=>aa(a),Gt=e.ref([]),Ad=e.computed(()=>{var a;return(a=Gt.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Br=e.computed(()=>{var a;return(a=Gt.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix)||(l==null?void 0:l.affix)==="default")}),Ir=e.ref(0),Nr=e.ref(null),Ua=async(a,l="data",s)=>{},Vd=async a=>{var s,r,d;const l=await xe.getInsofDataApi({id:a});return(d=(r=(s=l==null?void 0:l.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Ka=async(a,l)=>{var d,c,x;if(Sr.value||typeof(a==null?void 0:a.index)=="string")return;const s=await Vd(a==null?void 0:a.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Ne.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(c=V.cloneDeep(a==null?void 0:a.contents))==null?void 0:c.filter(v=>v.contents),name:r,isShow:(x=s==null?void 0:s.pageData)==null?void 0:x.isShow}),l&&(tn.setActiveMenuPath(null),tn.setActiveMenuPath(l))},Wa=async a=>{Gt.value=await Ne.getDeepDiffItems(a),rn.setItemData(Gt.value),rn.setOriginalData(Gt.value)},Od=async a=>{var l,s;return(l=a==null?void 0:a.split("/"))==null||l.forEach((r,d)=>{var c;((c=a==null?void 0:a.split("/"))==null?void 0:c.length)-2>d}),(s=a==null?void 0:a.split("/"))==null||s.forEach((r,d)=>{var c;((c=a==null?void 0:a.split("/"))==null?void 0:c.length)-1>d}),!1};e.ref();const ka=e.ref(null),Md=()=>{var a,l;console.log("倒计时结束时"),V.ElMessageBox.alert(`超时未提交,【${(l=(a=ln.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Ar=e.ref([]),zd=e.computed(()=>{var a,l;return(l=(a=lo.value)==null?void 0:a[ln.value])==null?void 0:l.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Cd.value],()=>{ta.setSelectTitle([]),ta.setChooseTitle([])},{deep:!0});e.watch(()=>[zo.value],async()=>{var l,s;let a=(l=zo.value)==null?void 0:l.filter(r=>(r==null?void 0:r.condition)==="child"&&(r==null?void 0:r.value)!==""&&(r==null?void 0:r.parentContent)!==ln.value);if((a==null?void 0:a.length)>0){tn.setContentLoading(!0);let r=ln.value+"/"+((s=a==null?void 0:a[0])==null?void 0:s.value),d=await Xa(r,!0,{originPath:ln.value});Gt.value=await Ne.getDeepDiffItems(d),tn.setContentLoading(!1)}});e.watch(()=>[ln.value,xd.value],async a=>{var x,v,f;if(!ln.value)return;rn.setLockingPage(""),Gt.value=[];let l=e.getCurrentInstance();(x=l==null?void 0:l.scope)==null||x.stop(),l=null,$a.value=!1,tn.setContentLoading(!0),Sr.value=!0;let s=a==null?void 0:a[0],r=s,d=(v=Tr.value)==null?void 0:v.filter(C=>(C==null?void 0:C.condition)==="child"&&(C==null?void 0:C.value)!==""&&(C==null?void 0:C.parentContent)!==ln.value);(d==null?void 0:d.length)>0&&(s=s+"/"+((f=d==null?void 0:d[0])==null?void 0:f.value));let c=await Xa(s,!0,{originPath:r});Gt.value=await Ne.getDeepDiffItems(c),tn.setContentLoading(!1),rn.setExtraContents([]),ta.setSelectIndex(""),ta.setSelectMenu(""),rn.setItemData(Gt.value),rn.setOriginalData(Gt.value),e.nextTick(()=>{fa.value=fa.value++,$a.value=!0})},{immediate:!0});const Fd=async()=>{tn.setLinkMenuInfo(null),tn.setActiveMenuPath(wd.value),Gt.value=null,rn.setRouteToChildPath(""),tn.setChildMenu("")},Rd=a=>new RegExp("button","i").test(a),Pd=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Vr=a=>{if(Pd(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&tn.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Or=a=>{var l;ka.value&&(ka.value={...ka.value,mainKeyPropValue:a==null?void 0:a[(l=ka.value)==null?void 0:l.mainKeyProp]})},Ld=a=>{Ir.value=a},ca=e.reactive({index:0,comp:null}),$d=e.computed(()=>{var a;return(a=Gt.value)==null?void 0:a.map((l,s)=>({id:l.id,name:l.name,status:jd(l,s)}))}),Mr=(a,l)=>{var f,C,w,F,R;const s=l?a:a-2,r=(f=Gt.value)==null?void 0:f[s],d=(w=(C=r==null?void 0:r.compData)==null?void 0:C.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:w.contents,c=d==null?void 0:d.findIndex(H=>(H==null?void 0:H.isMainKey)&&(H==null?void 0:H.label)!=="操作"),x=c===-1?0:c,v=(R=(F=r==null?void 0:r.compData)==null?void 0:F.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:R.contents;return{valid:v==null?void 0:v.every(H=>H==null?void 0:H[x+1]),length:(v==null?void 0:v.length)||0}},jd=(a,l)=>{var r;let s="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:c}=Mr(l,!0);ca.index===l?s="process":c===0?s="wait":s=d?"success":"error"}return s},zr=a=>{var s,r,d,c,x;const l=a+1;if(l>1&&((d=(r=(s=Gt.value)==null?void 0:s[a])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:v}=Mr(l);v?(ca.index=l,ca.comp=(c=Gt.value)==null?void 0:c[a]):xe.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ca.index=l,ca.comp=(x=Gt.value)==null?void 0:x[a]},Fr=e.computed(()=>{var a,l;return(l=(a=Br.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Fr.value,a=>{a&&zr(0)},{immediate:!0});const Ud={class:"layout"},Kd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const s=l,r=a;e.onMounted(async()=>{});const d=e.computed(()=>V.cloneDeep(r==null?void 0:r.itemData)||[]),c=e.computed(()=>{var w;const C=(w=d==null?void 0:d.value)==null?void 0:w.find(F=>{const{key:R}=F;return R==="baseConfig"});return C==null?void 0:C.contents}),x=e.computed(()=>{var w;const C=(w=d==null?void 0:d.value)==null?void 0:w.find(F=>{const{key:R}=F;return R==="children"});return C==null?void 0:C.contents}),v=e.computed(()=>{let C=V.cloneDeep(x.value)||[];const w=C.length;let F=0;const R=[];if(C=C.map(H=>{const M=H.span;return M?(H.span=Number(M),F=F+H.span):R.push(H),H}),F<24){const H=Math.floor((24-F)/w);R.forEach(M=>{M.span=H})}return C}),f=C=>{s("rowClick",C)};return(C,w)=>{var H;const F=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Ud,[e.createVNode(R,{style:e.normalizeStyle({height:(H=c.value)==null?void 0:H.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(M,ve)=>(e.openBlock(),e.createBlock(F,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var K;return[e.unref($a)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ja)(M.comp)),{key:e.unref(fa),compName:M.name,index:(M==null?void 0:M.id)??ve,height:(K=c.value)==null?void 0:K.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(Ua),onContentChange:e.unref(Ka),onPageChange:e.unref(Wa),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Wd=Rt._export_sfc(Kd,[["__scopeId","data-v-ab9a36ed"]]),Hd={class:"layout-operate"},qd={class:"layout-module"},Gd={class:"collapse-title-item"},Xd={class:"collapse-title"},Yd={class:"icon-content"},Jd=["onClick"],Zd={class:"comp-child"},Qd=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const s=a,r=l;e.onMounted(()=>{ve()});const d=e.ref({}),c=e.ref({}),x=e.ref([]),v=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{c.value=y,r("change",_(),!0)},C=e.ref([]),w=e.ref([]),F=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return V.cloneDeep(y)}),H=e.computed(()=>{const y=R==null?void 0:R.value,T=y==null?void 0:y.find(h=>{const{key:ce}=h;return ce==="baseConfig"});return T==null?void 0:T.contents}),M=e.computed(()=>{const y=R==null?void 0:R.value,T=y==null?void 0:y.find(h=>{const{key:ce}=h;return ce==="children"});return T==null?void 0:T.contents}),ve=()=>{var y;d.value=R.value||{},C.value=(M==null?void 0:M.value)||[],x.value=v(),x.value=(y=x.value)==null?void 0:y.map(T=>{var ce;const{prop:h}=T;return T.value=(ce=H.value)==null?void 0:ce[h],T})};e.watch(()=>{var y;return(y=M==null?void 0:M.value)==null?void 0:y.length},()=>{var y;C.value=(M==null?void 0:M.value)||[],w.value=(y=M.value)==null?void 0:y.map(T=>F(T))},{immediate:!0});const K=(y,T)=>{const h=V.cloneDeep(M==null?void 0:M.value);h[T].span=y.span,C.value=h,r("change",_(),!0)},O=y=>aa(y),G=(y,T,h)=>{if(!y)return;const ce=V.cloneDeep(M==null?void 0:M.value);ce[h]&&(ce[h].compData=y,C.value=ce,r("change",_(),!0))},b=y=>{V.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let T=V.cloneDeep(M==null?void 0:M.value);T=T==null?void 0:T.filter((h,ce)=>y!==ce),C.value=T,r("change",_(),!0),xe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:C==null?void 0:C.value}]});return(y,T)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Hd,[e.createElementVNode("div",qd,[T[1]||(T[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:x.value,isEnableWrap:!0,onChange:T[0]||(T[0]=ce=>f(ce))},null,8,["rowContents"])])]),e.createVNode(ur.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:ce,index:Ae})=>[e.createElementVNode("div",Gd,[e.createElementVNode("div",Xd,e.toDisplayString(ce.name),1),e.createElementVNode("div",Yd,[e.createElementVNode("div",{onClick:e.withModifiers(at=>b(Ae),["stop"]),class:"icon-content"},[e.createVNode(h,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Jd)])])]),content:e.withCtx(({item:ce,index:Ae})=>[e.createElementVNode("div",Zd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value[Ae],key:Ae,isEnableWrap:!0,onChange:at=>K(at,Ae)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(ce.comp+"Operate")),{itemContents:ce==null?void 0:ce.compData,originalItemContents:ce.compData,onChange:at=>G(at,ce,Ae)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),ep=Rt._export_sfc(Qd,[["__scopeId","data-v-ba05456e"]]),tp=typeof window<"u";var Ro;tp&&((Ro=window==null?void 0:window.navigator)!=null&&Ro.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cn(a){return a==null}function Rr(){}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 ap(){const a=new Map;return{on(l,s){const r=a.get(l);r!=null&&r.add(s)||a.set(l,new Set([s]))},off(l,s){const r=a.get(l);r&&r.delete(s)},clear(l){const s=a.get(l);s&&s.clear()},clearAll(){a.clear()},emit(l,...s){const r=a.get(l);r&&r.forEach(d=>{d(...s)})}}}function Po(a,l=16){if(typeof a!="function")return Rr;const s=(...c)=>{a(...c)};if(l<=0)return Pr(s);let r=0,d;return function(...c){const x=Date.now(),v=x-r;clearTimeout(d),v>=l?(r=x,s(...c)):d=setTimeout(()=>{r=Date.now(),s(...c)},Math.max(0,l-v))}}function op(a,l=100){if(typeof a!="function")return Rr;const s=(...d)=>{a(...d)};if(l<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},l)}}function Pr(a){if(typeof a!="function")return a;let l=!1,s,r;return function(...d){return s=d,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...s)))),r}}const wa=new Set,Lr=new WeakMap;function rp(){wa.forEach(a=>{a(...Lr.get(a))}),wa.clear()}function en(a,...l){if(typeof a!="function")return a;Lr.set(a,l),!wa.has(a)&&(wa.add(a),wa.size===1&&Promise.resolve().then(rp))}const $r=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function lp(a){let l=0,s;for(let r=0,d=a.length;r<d;r++)s=a[r].y+a[r].h,s>l&&(l=s);return l}function so(a){const l=Array(a.length);for(let s=0,r=a.length;s<r;s++)l[s]=ip(a[s]);return l}function ip(a){return{...a}}function Ur(a,l){return!(a===l||a.x+a.w<=l.x||a.x>=l.x+l.w||a.y+a.h<=l.y||a.y>=l.y+l.h)}function sa(a,l,s){const r=Wr(a),d=Hr(a),c=Array(a.length);for(let x=0,v=d.length;x<v;x++){let f=d[x];f.static||(f=sp(r,f,l,s),r.push(f)),c[a.findIndex(C=>C.i===f.i)]=f,f.moved=!1}return c}function sp(a,l,s,r){if(s)for(;l.y>0&&!Ca(a,l);)l.y--;else if(r){const c=r[l.i].y;for(;l.y>c&&!Ca(a,l);)l.y--}let d;for(;d=Ca(a,l);)l.y=d.y+d.h;return l}function cp(a,l){const s=Wr(a);for(let r=0,d=a.length;r<d;r++){const c=a[r];if(c.x+c.w>l.cols&&(c.x=l.cols-c.w),c.x<0&&(c.x=0,c.w=l.cols),!c.static)s.push(c);else for(;Ca(s,c);)c.y++}return a}function Lo(a,l){for(let s=0,r=a.length;s<r;s++)if(a[s].i===l)return a[s]}function Ca(a,l){for(let s=0,r=a.length;s<r;s++)if(Ur(a[s],l))return a[s]}function Kr(a,l){return a.filter(s=>Ur(s,l))}function Wr(a){return a.filter(l=>l.static)}function co(a,l,s,r,d=!1,c=!1){if(l.static)return a;const x=l.x,v=l.y,f=r&&l.y>r;typeof s=="number"&&(l.x=s),typeof r=="number"&&(l.y=r),l.moved=!0;let C=Hr(a);f&&(C=C.reverse());const w=Kr(C,l);if(c&&w.length)return l.x=x,l.y=v,l.moved=!1,a;for(let F=0,R=w.length;F<R;F++){const H=w[F];H.moved||l.y>H.y&&l.y-H.y>H.h/4||(H.static?a=$o(a,H,l,d):a=$o(a,l,H,d))}return a}function $o(a,l,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(l.y-s.h,0),!Ca(a,d))return co(a,s,void 0,d.y,!1)}return co(a,s,void 0,s.y+1,!1)}function up(a,l,s,r){const d="translate3d("+l+"px,"+a+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function dp(a,l,s,r){const d="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function pp(a,l,s,r){return{top:a+"px",left:l+"px",width:s+"px",height:r+"px",position:"absolute"}}function fp(a,l,s,r){return{top:a+"px",right:l+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hr(a){return Array.from(a).sort(function(l,s){return l.y===s.y&&l.x===s.x?0:l.y>s.y||l.y===s.y&&l.x>s.x?1:-1})}function hp(a,l){l=l||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let d=0,c=a.length;d<c;d++){const x=a[d];for(let v=0;v<s.length;v++)if(typeof x[s[v]]!="number")throw new Error("VueGridLayout: "+l+"["+d+"]."+s[v]+" must be a number!");if(x.i===void 0||x.i===null)throw new Error("VueGridLayout: "+l+"["+d+"].i cannot be null!");if(typeof x.i!="number"&&typeof x.i!="string")throw new Error("VueGridLayout: "+l+"["+d+"].i must be a string or number!");if(r.indexOf(x.i)>=0)throw new Error("VueGridLayout: "+l+"["+d+"].i must be unique!");if(r.push(x.i),x.static!==void 0&&typeof x.static!="boolean")throw new Error("VueGridLayout: "+l+"["+d+"].static must be a boolean!")}}function vp(a,l="vgl"){const s=()=>`${l}-${a}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function jo(a){return mp(a)}function mp(a){var l;const s=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=a.clientX+s.scrollLeft-r.left,c=a.clientY+s.scrollTop-r.top;return{x:d,y:c}}function Uo(a,l,s,r){return gp(a)?{deltaX:s-a,deltaY:r-l,lastX:a,lastY:l,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function gp(a){return typeof a=="number"&&!Number.isNaN(a)}function yp(a,l){const s=Gr(a);let r=s[0];for(let d=1,c=s.length;d<c;d++){const x=s[d];l>a[x]&&(r=x)}return r}function qr(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function bp(a,l,s,r,d,c,x){if(l[r])return so(l[r]);let v=a;const f=Gr(s),C=f.slice(f.indexOf(r));for(let w=0,F=C.length;w<F;w++){const R=C[w];if(l[R]){v=l[R];break}}return v=so(v||[]),sa(cp(v,{cols:c}),x)}function Gr(a){return Object.keys(a).sort((l,s)=>a[l]-a[s])}let kp="auto";function xp(){return typeof document<"u"}function Ko(){return xp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):kp}var xa={exports:{}},wp=xa.exports,Wo;function Cp(){return Wo||(Wo=1,function(a,l){(function(s,r){a.exports=r()})(wp,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,i)}return o}function r(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(i){f(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function d(n){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(n)}function c(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 i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,ve(i.key),i)}}function v(n,t,o){return t&&x(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function f(n,t,o){return(t=ve(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function C(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&F(n,t)}function w(n){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(n)}function F(n,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},F(n,t)}function R(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,i=w(n);if(t){var u=w(this).constructor;o=Reflect.construct(i,arguments,u)}else o=i.apply(this,arguments);return function(p,g){if(g&&(typeof g=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var i=function(p,g){for(;!Object.prototype.hasOwnProperty.call(p,g)&&(p=w(p))!==null;);return p}(n,t);if(i){var u=Object.getOwnPropertyDescriptor(i,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},M.apply(this,arguments)}function ve(n){var t=function(o,i){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var p=u.call(o,i);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var K=function(n){return!(!n||!n.Window)&&n instanceof n.Window},O=void 0,G=void 0;function b(n){O=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 _(n){return K(n)?n:(n.ownerDocument||n).defaultView||G.window}typeof window<"u"&&window&&b(window);var y=function(n){return!!n&&d(n)==="object"},T=function(n){return typeof n=="function"},h={window:function(n){return n===G||K(n)},docFrag:function(n){return y(n)&&n.nodeType===11},object:y,func:T,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||d(n)!=="object")return!1;var t=_(n)||G;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return y(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return y(n)&&n.length!==void 0&&T(n.splice)}};function ce(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 Ae(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var i=o.prepared.axis;if(i==="x"||i==="y"){var u=i==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var at={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,i=n.defaults;o.prototype.draggable=at.draggable,t.map.drag=at,t.methodDict.drag="draggable",i.actions.drag=at.defaults},listeners:{"interactions:before-action-move":ce,"interactions:action-resume":ce,"interactions:action-move":Ae,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,i=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(i&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return h.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):h.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:ce,move:Ae,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},we=at,Pe={init:function(n){var t=n;Pe.document=t.document,Pe.DocumentFragment=t.DocumentFragment||Le,Pe.SVGElement=t.SVGElement||Le,Pe.SVGSVGElement=t.SVGSVGElement||Le,Pe.SVGElementInstance=t.SVGElementInstance||Le,Pe.Element=t.Element||Le,Pe.HTMLElement=t.HTMLElement||Pe.Element,Pe.Event=t.Event,Pe.Touch=t.Touch||Le,Pe.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Le(){}var P=Pe,re={init:function(n){var t=P.Element,o=n.navigator||{};re.supportsTouch="ontouchstart"in n||h.func(n.DocumentTouch)&&P.document instanceof n.DocumentTouch,re.supportsPointerEvent=o.pointerEnabled!==!1&&!!P.PointerEvent,re.isIOS=/iP(hone|od|ad)/.test(o.platform),re.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),re.isIe9=/MSIE 9/.test(o.userAgent),re.isOperaMobile=o.appName==="Opera"&&re.supportsTouch&&/Presto/.test(o.userAgent),re.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",re.pEventTypes=re.supportsPointerEvent?P.PointerEvent===n.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,re.wheelEvent=P.document&&"onmousewheel"in P.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ne=re;function pe(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function He(n,t){for(;h.element(n);){if(X(n,t))return n;n=ot(n)}return null}function ot(n){var t=n.parentNode;if(h.docFrag(t)){for(;(t=t.host)&&h.docFrag(t););return t}return t}function X(n,t){return G!==O&&(t=t.replace(/\/deep\//g," ")),n[ne.prefixedMatchesSelector](t)}var A=function(n){return n.parentNode||n.host};function te(n,t){for(var o,i=[],u=n;(o=A(u))&&u!==t&&o!==u.ownerDocument;)i.unshift(u),u=o;return i}function ye(n,t,o){for(;h.element(n);){if(X(n,t))return!0;if((n=ot(n))===o)return X(n,t)}return!1}function ue(n){return n.correspondingUseElement||n}function De(n){var t=n instanceof P.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 Qe(n){var t,o=De(n);if(!ne.isIOS7&&o){var i={x:(t=(t=_(n))||G).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=i.x,o.right+=i.x,o.top+=i.y,o.bottom+=i.y}return o}function ae(n){for(var t=[];n;)t.push(n),n=ot(n);return t}function _e(n){return!!h.string(n)&&(P.document.querySelector(n),!0)}function I(n,t){for(var o in t)n[o]=t[o];return n}function Xe(n,t,o){return n==="parent"?ot(o):n==="self"?t.getRect(o):He(o,n)}function Ye(n,t,o,i){var u=n;return h.string(u)?u=Xe(u,t,o):h.func(u)&&(u=u.apply(void 0,i)),h.element(u)&&(u=Qe(u)),u}function Ie(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function le(n){return!n||"x"in n&&"y"in n||((n=I({},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 Q(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 se(n,t,o){var i=o&&n.options[o];return Ie(Ye(i&&i.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Ee(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(N){return!0},i=arguments.length>3?arguments[3]:void 0;if(i=i||{},h.string(n)&&n.search(" ")!==-1&&(n=qe(n)),h.array(n))return n.forEach(function(N){return Ee(N,t,o,i)}),i;if(h.object(n)&&(t=n,n=""),h.func(t)&&o(n))i[n]=i[n]||[],i[n].push(t);else if(h.array(t))for(var u=0,p=t;u<p.length;u++){var g=p[u];Ee(n,g,o,i)}else if(h.object(t))for(var k in t)Ee(qe(k).map(function(N){return"".concat(n).concat(N)}),t[k],o,i);return i}function qe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},m=["webkit","moz"];function S(n,t){n.__set||(n.__set={});var o=function(u){if(m.some(function(p){return u.indexOf(p)===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(p){n.__set[u]=p},configurable:!0})};for(var i in t)o(i);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 D(n){return n instanceof P.Event||n instanceof P.Touch}function oe(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Ve(n,t){return t=t||{x:0,y:0},ne.isOperaMobile&&D(n)?(oe("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):oe("page",n,t),t}function B(n){return h.number(n.pointerId)?n.pointerId:n.identifier}function ee(n,t,o){var i=t.length>1?W(t):t[0];Ve(i,n.page),function(u,p){p=p||{},ne.isOperaMobile&&D(u)?oe("screen",u,p):oe("client",u,p)}(i,n.client),n.timeStamp=o}function $(n){var t=[];return h.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 W(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var i=n[o];for(var u in t)t[u]+=i[u]}for(var p in t)t[p]/=n.length;return t}function Se(n){if(!n.length)return null;var t=$(n),o=Math.min(t[0].pageX,t[1].pageX),i=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:i,left:o,top:i,right:u,bottom:p,width:u-o,height:p-i}}function ie(n,t){var o=t+"X",i=t+"Y",u=$(n),p=u[0][o]-u[1][o],g=u[0][i]-u[1][i];return dt(p,g)}function q(n,t){var o=t+"X",i=t+"Y",u=$(n),p=u[1][o]-u[0][o],g=u[1][i]-u[0][i];return 180*Math.atan2(g,p)/Math.PI}function Z(n){return h.string(n.pointerType)?n.pointerType:h.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof P.Touch?"touch":"mouse"}function de(n){var t=h.func(n.composedPath)?n.composedPath():n.path;return[ue(t?t[0]:n.target),ue(n.currentTarget)]}var me=function(){function n(t){c(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return v(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(me.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Ce=function(n,t){for(var o=0;o<t.length;o++){var i=t[o];n.push(i)}return n},be=function(n){return Ce([],n)},j=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},Me=function(n,t){return n[j(n,t)]},ge=function(n){C(o,n);var t=H(o);function o(i,u,p){var g;c(this,o),(g=t.call(this,u._interaction)).dropzone=void 0,g.dragEvent=void 0,g.relatedTarget=void 0,g.draggable=void 0,g.propagationStopped=!1,g.immediatePropagationStopped=!1;var k=p==="dragleave"?i.prev:i.cur,N=k.element,L=k.dropzone;return g.type=p,g.target=N,g.currentTarget=N,g.dropzone=L,g.dragEvent=u,g.relatedTarget=u.target,g.draggable=u.interactable,g.timeStamp=u.timeStamp,g}return v(o,[{key:"reject",value:function(){var i=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 p=u.activeDrops,g=j(p,function(N){var L=N.dropzone,z=N.element;return L===i.dropzone&&z===i.target});u.activeDrops.splice(g,1);var k=new o(u,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}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}(me);function Ue(n,t){for(var o=0,i=n.slice();o<i.length;o++){var u=i[o],p=u.dropzone,g=u.element;t.dropzone=p,t.target=g,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function rt(n,t){for(var o=function(p,g){for(var k=[],N=0,L=p.interactables.list;N<L.length;N++){var z=L[N];if(z.options.drop.enabled){var Y=z.options.drop.accept;if(!(h.element(Y)&&Y!==g||h.string(Y)&&!X(g,Y)||h.func(Y)&&!Y({dropzone:z,draggableElement:g})))for(var ke=0,Re=z.getAllElements();ke<Re.length;ke++){var ze=Re[ke];ze!==g&&k.push({dropzone:z,element:ze,rect:z.getRect(ze)})}}}return k}(n,t),i=0;i<o.length;i++){var u=o[i];u.rect=u.dropzone.getRect(u.element)}return o}function $e(n,t,o){for(var i=n.dropState,u=n.interactable,p=n.element,g=[],k=0,N=i.activeDrops;k<N.length;k++){var L=N[k],z=L.dropzone,Y=L.element,ke=L.rect,Re=z.dropCheck(t,o,u,p,Y,ke);g.push(Re?Y:null)}var ze=function(We){for(var lt,tt,ht,Et=[],Nt=0;Nt<We.length;Nt++){var kt=We[Nt],St=We[lt];if(kt&&Nt!==lt)if(St){var Qt=A(kt),$t=A(St);if(Qt!==kt.ownerDocument)if($t!==kt.ownerDocument)if(Qt!==$t){Et=Et.length?Et:te(St);var sn=void 0;if(St instanceof P.HTMLElement&&kt instanceof P.SVGElement&&!(kt instanceof P.SVGSVGElement)){if(kt===$t)continue;sn=kt.ownerSVGElement}else sn=kt;for(var fn=te(sn,St.ownerDocument),xn=0;fn[xn]&&fn[xn]===Et[xn];)xn++;var Na=[fn[xn-1],fn[xn],Et[xn]];if(Na[0])for(var ga=Na[0].lastChild;ga;){if(ga===Na[1]){lt=Nt,Et=fn;break}if(ga===Na[2])break;ga=ga.previousSibling}}else ht=St,(parseInt(_(tt=kt).getComputedStyle(tt).zIndex,10)||0)>=(parseInt(_(ht).getComputedStyle(ht).zIndex,10)||0)&&(lt=Nt);else lt=Nt}else lt=Nt}return lt}(g);return i.activeDrops[ze]||null}function nt(n,t,o){var i=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ge(i,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ge(i,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),i.rejected||(i.cur.element!==i.prev.element&&(i.prev.dropzone&&(u.leave=new ge(i,o,"dragleave"),o.dragLeave=u.leave.target=i.prev.element,o.prevDropzone=u.leave.dropzone=i.prev.dropzone),i.cur.dropzone&&(u.enter=new ge(i,o,"dragenter"),o.dragEnter=i.cur.element,o.dropzone=i.cur.dropzone)),o.type==="dragend"&&i.cur.dropzone&&(u.drop=new ge(i,o,"drop"),o.dropzone=i.cur.dropzone,o.relatedTarget=i.cur.element),o.type==="dragmove"&&i.cur.dropzone&&(u.move=new ge(i,o,"dropmove"),o.dropzone=i.cur.dropzone)),u}function Be(n,t){var o=n.dropState,i=o.activeDrops,u=o.cur,p=o.prev;t.leave&&p.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&&Ue(i,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function mt(n,t){var o=n.interaction,i=n.iEvent,u=n.event;if(i.type==="dragmove"||i.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=rt(t,o.element));var g=i,k=$e(o,g,u);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=nt(o,0,g)}}var et={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,i=n.Interactable,u=n.defaults;n.usePlugin(we),i.prototype.dropzone=function(p){return function(g,k){if(h.object(k)){if(g.options.drop.enabled=k.enabled!==!1,k.listeners){var N=Ee(k.listeners),L=Object.keys(N).reduce(function(Y,ke){return Y[/^(enter|leave)/.test(ke)?"drag".concat(ke):/^(activate|deactivate|move)/.test(ke)?"drop".concat(ke):ke]=N[ke],Y},{}),z=g.options.drop.listeners;z&&g.off(z),g.on(L),g.options.drop.listeners=L}return h.func(k.ondrop)&&g.on("drop",k.ondrop),h.func(k.ondropactivate)&&g.on("dropactivate",k.ondropactivate),h.func(k.ondropdeactivate)&&g.on("dropdeactivate",k.ondropdeactivate),h.func(k.ondragenter)&&g.on("dragenter",k.ondragenter),h.func(k.ondragleave)&&g.on("dragleave",k.ondragleave),h.func(k.ondropmove)&&g.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?g.options.drop.overlap=k.overlap:h.number(k.overlap)&&(g.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(g.options.drop.accept=k.accept),"checker"in k&&(g.options.drop.checker=k.checker),g}return h.bool(k)?(g.options.drop.enabled=k,g):g.options.drop}(this,p)},i.prototype.dropCheck=function(p,g,k,N,L,z){return function(Y,ke,Re,ze,We,lt,tt){var ht=!1;if(!(tt=tt||Y.getRect(lt)))return!!Y.options.drop.checker&&Y.options.drop.checker(ke,Re,ht,Y,lt,ze,We);var Et=Y.options.drop.overlap;if(Et==="pointer"){var Nt=se(ze,We,"drag"),kt=Ve(ke);kt.x+=Nt.x,kt.y+=Nt.y;var St=kt.x>tt.left&&kt.x<tt.right,Qt=kt.y>tt.top&&kt.y<tt.bottom;ht=St&&Qt}var $t=ze.getRect(We);if($t&&Et==="center"){var sn=$t.left+$t.width/2,fn=$t.top+$t.height/2;ht=sn>=tt.left&&sn<=tt.right&&fn>=tt.top&&fn<=tt.bottom}return $t&&h.number(Et)&&(ht=Math.max(0,Math.min(tt.right,$t.right)-Math.max(tt.left,$t.left))*Math.max(0,Math.min(tt.bottom,$t.bottom)-Math.max(tt.top,$t.top))/($t.width*$t.height)>=Et),Y.options.drop.checker&&(ht=Y.options.drop.checker(ke,Re,ht,Y,lt,ze,We)),ht}(this,p,g,k,N,L,z)},o.dynamicDrop=function(p){return h.bool(p)?(n.dynamicDrop=p,o):n.dynamicDrop},I(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=et.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,i=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=rt(t,o.element),u.events=nt(o,0,i),u.events.activate&&(Ue(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:i}))}},"interactions:action-move":mt,"interactions:after-action-move":function(n,t){var o=n.interaction,i=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;Be(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:i}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,i=n.iEvent;mt(n,t),Be(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:i})}},"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:rt,getDrop:$e,getDropEvents:nt,fireDropEvents:Be,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Oe=et;function it(n){var t=n.interaction,o=n.iEvent,i=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(L){return L.pointer}),p=i==="start",g=i==="end",k=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],p)o.distance=ie(u,k),o.box=Se(u),o.scale=1,o.ds=0,o.angle=q(u,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(g||t.pointers.length<2){var N=t.prevEvent;o.distance=N.distance,o.box=N.box,o.scale=N.scale,o.ds=0,o.angle=N.angle,o.da=0}else o.distance=ie(u,k),o.box=Se(u),o.scale=o.distance/t.gesture.startDistance,o.angle=q(u,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,h.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var gt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,i=n.defaults;o.prototype.gesturable=function(u){return h.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):h.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=gt,t.methodDict.gesture="gesturable",i.actions.gesture=gt.defaults},listeners:{"interactions:action-start":it,"interactions:action-move":it,"interactions:action-end":it,"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}},Je=gt;function je(n,t,o,i,u,p,g){if(!t)return!1;if(t===!0){var k=h.number(p.width)?p.width:p.right-p.left,N=h.number(p.height)?p.height:p.bottom-p.top;if(g=Math.min(g,Math.abs((n==="left"||n==="right"?k:N)/2)),k<0&&(n==="left"?n="right":n==="right"&&(n="left")),N<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var L=k>=0?p.left:p.right;return o.x<L+g}if(n==="top"){var z=N>=0?p.top:p.bottom;return o.y<z+g}if(n==="right")return o.x>(k>=0?p.right:p.left)-g;if(n==="bottom")return o.y>(N>=0?p.bottom:p.top)-g}return!!h.element(i)&&(h.element(t)?t===i:ye(i,t,u))}function It(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var i=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?i.delta.x=i.delta.y:i.delta.y=i.delta.x,i.axes="xy"):(i.axes=o.resizeAxes,o.resizeAxes==="x"?i.delta.y=0:o.resizeAxes==="y"&&(i.delta.x=0))}}var Te,Ge,Fe={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,i=n.Interactable,u=n.defaults;Fe.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Fe.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,i.prototype.resizable=function(p){return function(g,k,N){return h.object(k)?(g.options.resize.enabled=k.enabled!==!1,g.setPerAction("resize",k),g.setOnEvents("resize",k),h.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?g.options.resize.axis=k.axis:k.axis===null&&(g.options.resize.axis=N.defaults.actions.resize.axis),h.bool(k.preserveAspectRatio)?g.options.resize.preserveAspectRatio=k.preserveAspectRatio:h.bool(k.square)&&(g.options.resize.square=k.square),g):h.bool(k)?(g.options.resize.enabled=k,g):g.options.resize}(this,p,n)},t.map.resize=Fe,t.methodDict.resize="resizable",u.actions.resize=Fe.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var u=o,p=i.rect;i._rects={start:I({},p),corrected:I({},p),previous:I({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=i.prepared.edges,u.rect=i._rects.corrected,u.deltaRect=i._rects.delta}})(n),It(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var u=o,p=i.interactable.options.resize.invert,g=p==="reposition"||p==="negate",k=i.rect,N=i._rects,L=N.start,z=N.corrected,Y=N.delta,ke=N.previous;if(I(ke,z),g){if(I(z,k),p==="reposition"){if(z.top>z.bottom){var Re=z.top;z.top=z.bottom,z.bottom=Re}if(z.left>z.right){var ze=z.left;z.left=z.right,z.right=ze}}}else z.top=Math.min(k.top,L.bottom),z.bottom=Math.max(k.bottom,L.top),z.left=Math.min(k.left,L.right),z.right=Math.max(k.right,L.left);for(var We in z.width=z.right-z.left,z.height=z.bottom-z.top,z)Y[We]=z[We]-ke[We];u.edges=i.prepared.edges,u.rect=z,u.deltaRect=Y}})(n),It(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var i=t;i.edges=o.prepared.edges,i.rect=o._rects.corrected,i.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,i=n.element,u=n.rect,p=n.buttons;if(u){var g=I({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(h.object(k.edges)){var N={left:!1,right:!1,top:!1,bottom:!1};for(var L in N)N[L]=je(L,k.edges[L],g,t._latestPointer.eventTarget,i,u,k.margin||Fe.defaultMargin);N.left=N.left&&!N.right,N.top=N.top&&!N.bottom,(N.left||N.right||N.top||N.bottom)&&(n.action={name:"resize",edges:N})}else{var z=k.axis!=="y"&&g.x>u.right-Fe.defaultMargin,Y=k.axis!=="x"&&g.y>u.bottom-Fe.defaultMargin;(z||Y)&&(n.action={name:"resize",axes:(z?"x":"")+(Y?"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,i=n.name,u=Fe.cursors,p=null;if(o)p=u[i+o];else if(t){for(var g="",k=0,N=["top","bottom","left","right"];k<N.length;k++){var L=N[k];t[L]&&(g+=L)}p=u[g]}return p},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Ze=Fe,E={id:"actions",install:function(n){n.usePlugin(Je),n.usePlugin(Ze),n.usePlugin(we),n.usePlugin(Oe)}},fe=0,Ke={request:function(n){return Te(n)},cancel:function(n){return Ge(n)},init:function(n){if(Te=n.requestAnimationFrame,Ge=n.cancelAnimationFrame,!Te)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var i=t[o];Te=n["".concat(i,"RequestAnimationFrame")],Ge=n["".concat(i,"CancelAnimationFrame")]||n["".concat(i,"CancelRequestAnimationFrame")]}Te=Te&&Te.bind(n),Ge=Ge&&Ge.bind(n),Te||(Te=function(u){var p=Date.now(),g=Math.max(0,16-(p-fe)),k=n.setTimeout(function(){u(p+g)},g);return fe=p+g,k},Ge=function(u){return clearTimeout(u)})}},he={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){he.isScrolling=!0,Ke.cancel(he.i),n.autoScroll=he,he.interaction=n,he.prevTime=he.now(),he.i=Ke.request(he.scroll)},stop:function(){he.isScrolling=!1,he.interaction&&(he.interaction.autoScroll=null),Ke.cancel(he.i)},scroll:function(){var n=he.interaction,t=n.interactable,o=n.element,i=n.prepared.name,u=t.options[i].autoScroll,p=ut(u.container,t,o),g=he.now(),k=(g-he.prevTime)/1e3,N=u.speed*k;if(N>=1){var L={x:he.x*N,y:he.y*N};if(L.x||L.y){var z=st(p);h.window(p)?p.scrollBy(L.x,L.y):p&&(p.scrollLeft+=L.x,p.scrollTop+=L.y);var Y=st(p),ke={x:Y.x-z.x,y:Y.y-z.y};(ke.x||ke.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:ke,interaction:n,container:p})}he.prevTime=g}he.isScrolling&&(Ke.cancel(he.i),he.i=Ke.request(he.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()&&he.check(t.interactable,t.prepared.name))if(t.simulation)he.x=he.y=0;else{var i,u,p,g,k=t.interactable,N=t.element,L=t.prepared.name,z=k.options[L].autoScroll,Y=ut(z.container,k,N);if(h.window(Y))g=o.clientX<he.margin,i=o.clientY<he.margin,u=o.clientX>Y.innerWidth-he.margin,p=o.clientY>Y.innerHeight-he.margin;else{var ke=De(Y);g=o.clientX<ke.left+he.margin,i=o.clientY<ke.top+he.margin,u=o.clientX>ke.right-he.margin,p=o.clientY>ke.bottom-he.margin}he.x=u?1:g?-1:0,he.y=p?1:i?-1:0,he.isScrolling||(he.margin=z.margin,he.speed=z.speed,he.start(t))}}};function ut(n,t,o){return(h.string(n)?Xe(n,t,o):n)||_(o)}function st(n){return h.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var xt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=he,he.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=he.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,he.stop(),he.interaction&&(he.interaction=null)},"interactions:stop":he.stop,"interactions:action-move":function(n){return he.onInteractionMove(n)}}},pt=xt;function ct(n,t){var o=!1;return function(){return o||(G.console.warn(t),o=!0),n.apply(this,arguments)}}function ft(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function wt(n){return h.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Tt(n){return h.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var jt={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,i,u,p){var g=function(k,N,L,z,Y){var ke=k.getRect(z),Re=N.buttons||{0:1,1:4,3:8,4:16}[N.button],ze={action:null,interactable:k,interaction:L,element:z,rect:ke,buttons:Re};return Y.fire("auto-start:check",ze),ze.action}(this,i,u,p,n);return this.options.actionChecker?this.options.actionChecker(o,i,g,this,p,u):g},t.prototype.ignoreFrom=ct(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=ct(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Tt,t.prototype.styleCursor=wt}};function vt(n,t,o,i,u){return t.testIgnoreAllow(t.options[n.name],o,i)&&t.options[n.name].enabled&&Wt(t,o,n,u)?n:null}function Mt(n,t,o,i,u,p,g){for(var k=0,N=i.length;k<N;k++){var L=i[k],z=u[k],Y=L.getAction(t,o,n,z);if(Y){var ke=vt(Y,L,z,p,g);if(ke)return{action:ke,interactable:L,element:z}}}return{action:null,interactable:null,element:null}}function Lt(n,t,o,i,u){var p=[],g=[],k=i;function N(z){p.push(z),g.push(k)}for(;h.element(k);){p=[],g=[],u.interactables.forEachMatch(k,N);var L=Mt(n,t,o,p,g,i,u);if(L.action&&!L.interactable.options[L.action.name].manualStart)return L;k=ot(k)}return{action:null,interactable:null,element:null}}function Ut(n,t,o){var i=t.action,u=t.interactable,p=t.element;i=i||{name:null},n.interactable=u,n.element=p,ft(n.prepared,i),n.rect=u&&i.name?u.getRect(p):null,En(n,o),o.fire("autoStart:prepared",{interaction:n})}function Wt(n,t,o,i){var u=n.options,p=u[o.name].max,g=u[o.name].maxPerElement,k=i.autoStart.maxInteractions,N=0,L=0,z=0;if(!(p&&g&&k))return!1;for(var Y=0,ke=i.interactions.list;Y<ke.length;Y++){var Re=ke[Y],ze=Re.prepared.name;if(Re.interacting()&&(++N>=k||Re.interactable===n&&((L+=ze===o.name?1:0)>=p||Re.element===t&&(z++,ze===o.name&&z>=g))))return!1}return k>0}function Jt(n,t){return h.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function Pt(n,t,o){var i=o.autoStart.cursorElement;i&&i!==n&&(i.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function En(n,t){var o=n.interactable,i=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(u.name){var g=o.options[u.name].cursorChecker;p=h.func(g)?g(u,o,i,n._interacting):t.actions.map[u.name].getCursor(u)}Pt(n.element,p||"",t)}else t.autoStart.cursorElement&&Pt(t.autoStart.cursorElement,"",t)}var zn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(jt),o.base.actionChecker=null,o.base.styleCursor=!0,I(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(i){return Jt(i,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Wt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,i=n.pointer,u=n.event,p=n.eventTarget;o.interacting()||Ut(o,Lt(o,i,u,p,t),t)},"interactions:move":function(n,t){(function(o,i){var u=o.interaction,p=o.pointer,g=o.event,k=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Ut(u,Lt(u,p,g,k,i),i)})(n,t),function(o,i){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){i.fire("autoStart:before-start",o);var p=u.interactable,g=u.prepared.name;g&&p&&(p.options[g].manualStart||!Wt(p,u.element,u.prepared,i)?u.stop():(u.start(u.prepared,p,u.element),En(u,i)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,i=o.interactable;i&&i.options.styleCursor&&Pt(o.element,"",t)}},maxInteractions:Jt,withinInteractionLimit:Wt,validateAction:vt},gn=zn,Fn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,i=n.eventTarget,u=n.dx,p=n.dy;if(o.prepared.name==="drag"){var g=Math.abs(u),k=Math.abs(p),N=o.interactable.options.drag,L=N.startAxis,z=g>k?"x":g<k?"y":"xy";if(o.prepared.axis=N.lockAxis==="start"?z[0]:N.lockAxis,z!=="xy"&&L!=="xy"&&L!==z){o.prepared.name=null;for(var Y=i,ke=function(ze){if(ze!==o.interactable){var We=o.interactable.options.drag;if(!We.manualStart&&ze.testIgnoreAllow(We,Y,i)){var lt=ze.getAction(o.downPointer,o.downEvent,o,Y);if(lt&&lt.name==="drag"&&function(tt,ht){if(!ht)return!1;var Et=ht.options.drag.startAxis;return tt==="xy"||Et==="xy"||Et===tt}(z,ze)&&gn.validateAction(lt,ze,Y,i,t))return ze}}};h.element(Y);){var Re=t.interactables.forEachMatch(Y,ke);if(Re){o.prepared.name="drag",o.interactable=Re,o.element=Y;break}Y=ot(Y)}}}}}};function yn(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 Rn={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(gn),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=yn(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;yn(t)>0&&(t.prepared.name=null)}},getHoldDuration:yn},Pn=Rn,Ln={id:"auto-start",install:function(n){n.usePlugin(gn),n.usePlugin(Pn),n.usePlugin(Fn)}},$n=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):h.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 Sn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=$n,t.prototype.checkAndPreventDefault=function(o){return function(i,u,p){var g=i.options.preventDefault;if(g!=="never")if(g!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=_(p.target).document,N=u.getDocOptions(k);if(!N||!N.events||N.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||h.element(p.target)&&X(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var i=0,u=n.interactions.list;i<u.length;i++){var p=u[i];if(p.element&&(p.element===o.target||pe(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=jn,n},{})};function hn(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 un(n){var t={};for(var o in n){var i=n[o];h.plainObject(i)?t[o]=un(i):h.array(i)?t[o]=be(i):t[o]=i}return t}var bn=function(){function n(t){c(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=vn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var i,u,p=t.phase,g=this.interaction,k=function(L){var z=L.interactable.options[L.prepared.name],Y=z.modifiers;return Y&&Y.length?Y:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(ke){var Re=z[ke];return Re&&Re.enabled&&{options:Re,methods:Re._methods}}).filter(function(ke){return!!ke})}(g);this.prepareStates(k),this.startEdges=I({},g.edges),this.edges=I({},this.startEdges),this.startOffset=(i=g.rect,u=o,i?{left:u.x-i.left,top:u.y-i.top,right:i.right-u.x,bottom:i.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var N=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=vn(),this.startAll(N),this.result=this.setAll(N)}},{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,i=this.states;o<i.length;o++){var u=i[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,i=t.preEnd,u=t.skipModifiers,p=t.rect,g=t.edges;t.coords=I({},t.pageCoords),t.rect=I({},p),t.edges=I({},g);for(var k=u?this.states.slice(u):this.states,N=vn(t.coords,t.rect),L=0;L<k.length;L++){var z,Y=k[L],ke=Y.options,Re=I({},t.coords),ze=null;(z=Y.methods)!=null&&z.set&&this.shouldDo(ke,i,o)&&(t.state=Y,ze=Y.methods.set(t),Q(t.edges,t.rect,{x:t.coords.x-Re.x,y:t.coords.y-Re.y})),N.eventProps.push(ze)}I(this.edges,t.edges),N.delta.x=t.coords.x-t.pageCoords.x,N.delta.y=t.coords.y-t.pageCoords.y,N.rectDelta.left=t.rect.left-p.left,N.rectDelta.right=t.rect.right-p.right,N.rectDelta.top=t.rect.top-p.top,N.rectDelta.bottom=t.rect.bottom-p.bottom;var We=this.result.coords,lt=this.result.rect;if(We&&lt){var tt=N.rect.left!==lt.left||N.rect.right!==lt.right||N.rect.top!==lt.top||N.rect.bottom!==lt.bottom;N.changed=tt||We.x!==N.coords.x||We.y!==N.coords.y}return N}},{key:"applyToInteraction",value:function(t){var o=this.interaction,i=t.phase,u=o.coords.cur,p=o.coords.start,g=this.result,k=this.startDelta,N=g.delta;i==="start"&&I(this.startDelta,g.delta);for(var L=0,z=[[p,k],[u,N]];L<z.length;L++){var Y=z[L],ke=Y[0],Re=Y[1];ke.page.x+=Re.x,ke.page.y+=Re.y,ke.client.x+=Re.x,ke.client.y+=Re.y}var ze=this.result.rectDelta,We=t.rect||o.rect;We.left+=ze.left,We.right+=ze.right,We.top+=ze.top,We.bottom+=ze.bottom,We.width=We.right-We.left,We.height=We.bottom-We.top}},{key:"setAndApply",value:function(t){var o=this.interaction,i=t.phase,u=t.preEnd,p=t.skipModifiers,g=this.setAll(this.fillArg({preEnd:u,phase:i,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=g,!g.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,N={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};g.coords.x+=N.x,g.coords.y+=N.y,g.delta.x+=N.x,g.delta.y+=N.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,i=t.event,u=this.states;if(u&&u.length){for(var p=!1,g=0;g<u.length;g++){var k=u[g];t.state=k;var N=k.options,L=k.methods,z=L.beforeEnd&&L.beforeEnd(t);if(z)return this.endResult=z,!1;p=p||!p&&this.shouldDo(N,!0,t.phase,!0)}p&&o.move({event:i,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var i=I({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(i);for(var u=0,p=this.states;u<p.length;u++){var g=p[u];i.state=g,g.methods.stop&&g.methods.stop(i)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var i=t[o],u=i.options,p=i.methods,g=i.name;this.states.push({options:u,methods:p,index:o,name:g})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,i=o.coords,u=o.rect,p=o.modification;if(p.result){for(var g=p.startDelta,k=p.result,N=k.delta,L=k.rectDelta,z=0,Y=[[i.start,g],[i.cur,N]];z<Y.length;z++){var ke=Y[z],Re=ke[0],ze=ke[1];Re.page.x-=ze.x,Re.page.y-=ze.y,Re.client.x-=ze.x,Re.client.y-=ze.y}u.left-=L.left,u.right-=L.right,u.top-=L.top,u.bottom-=L.bottom}}},{key:"shouldDo",value:function(t,o,i,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||i==="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 un(o)}),this.result=vn(I({},t.result.coords),I({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function vn(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 nn(n,t){var o=n.defaults,i={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(p){var g=p||{};for(var k in g.enabled=g.enabled!==!1,o)k in g||(g[k]=o[k]);var N={options:g,methods:i,name:t,enable:function(){return g.enabled=!0,N},disable:function(){return g.enabled=!1,N}};return N};return t&&typeof t=="string"&&(u._defaults=o,u._methods=i),u}function pn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Un={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new bn(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,i=o.setAndApply(n);return t.edges=o.edges,i},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,i=o.beforeEnd(n);return t.edges=o.startEdges,i},"interactions:action-start":pn,"interactions:action-move":pn,"interactions:action-end":pn,"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)}}},Tn=Un,Bn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},kn=function(n){C(o,n);var t=H(o);function o(i,u,p,g,k,N,L){var z;c(this,o),(z=t.call(this,i)).relatedTarget=null,z.screenX=void 0,z.screenY=void 0,z.button=void 0,z.buttons=void 0,z.ctrlKey=void 0,z.shiftKey=void 0,z.altKey=void 0,z.metaKey=void 0,z.page=void 0,z.client=void 0,z.delta=void 0,z.rect=void 0,z.x0=void 0,z.y0=void 0,z.t0=void 0,z.dt=void 0,z.duration=void 0,z.clientX0=void 0,z.clientY0=void 0,z.velocity=void 0,z.speed=void 0,z.swipe=void 0,z.axes=void 0,z.preEnd=void 0,k=k||i.element;var Y=i.interactable,ke=(Y&&Y.options||Bn).deltaSource,Re=se(Y,k,p),ze=g==="start",We=g==="end",lt=ze?R(z):i.prevEvent,tt=ze?i.coords.start:We?{page:lt.page,client:lt.client,timeStamp:i.coords.cur.timeStamp}:i.coords.cur;return z.page=I({},tt.page),z.client=I({},tt.client),z.rect=I({},i.rect),z.timeStamp=tt.timeStamp,We||(z.page.x-=Re.x,z.page.y-=Re.y,z.client.x-=Re.x,z.client.y-=Re.y),z.ctrlKey=u.ctrlKey,z.altKey=u.altKey,z.shiftKey=u.shiftKey,z.metaKey=u.metaKey,z.button=u.button,z.buttons=u.buttons,z.target=k,z.currentTarget=k,z.preEnd=N,z.type=L||p+(g||""),z.interactable=Y,z.t0=ze?i.pointers[i.pointers.length-1].downTime:lt.t0,z.x0=i.coords.start.page.x-Re.x,z.y0=i.coords.start.page.y-Re.y,z.clientX0=i.coords.start.client.x-Re.x,z.clientY0=i.coords.start.client.y-Re.y,z.delta=ze||We?{x:0,y:0}:{x:z[ke].x-lt[ke].x,y:z[ke].y-lt[ke].y},z.dt=i.coords.delta.timeStamp,z.duration=z.timeStamp-z.t0,z.velocity=I({},i.coords.velocity[ke]),z.speed=dt(z.velocity.x,z.velocity.y),z.swipe=We||g==="inertiastart"?z.getSwipe():null,z}return v(o,[{key:"getSwipe",value:function(){var i=this._interaction;if(i.prevEvent.speed<600||this.timeStamp-i.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(i.prevEvent.velocityY,i.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var p=112.5<=u&&u<247.5,g=202.5<=u&&u<337.5;return{up:g,down:!g&&22.5<=u&&u<157.5,left:p,right:!p&&(292.5<=u||u<67.5),angle:u,speed:i.prevEvent.speed,velocity:{x:i.prevEvent.velocityX,y:i.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(me);Object.defineProperties(kn.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 Kn=v(function n(t,o,i,u,p){c(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=i,this.downTime=u,this.downTarget=p}),Wn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),In=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Hn=0,qn=function(){function n(t){var o=this,i=t.pointerType,u=t.scopeFire;c(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ct(function(z){this.move(z)},"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=Hn++,this._scopeFire=u,this.pointerType=i;var p=this;this._proxy={};var g=function(z){Object.defineProperty(o._proxy,z,{get:function(){return p[z]}})};for(var k in Wn)g(k);var N=function(z){Object.defineProperty(o._proxy,z,{value:function(){return p[z].apply(p,arguments)}})};for(var L in In)N(L);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,i){var u=this.updatePointer(t,o,i,!0),p=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:i,pointerIndex:u,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,i){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(ft(this.prepared,t),this.interactable=o,this.element=i,this.rect=o.getRect(i),this.edges=this.prepared.edges?I({},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,i){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,i,!1);var u,p,g=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(u=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(u,p)>this.pointerMoveTolerance);var k,N,L,z=this.getPointerIndex(t),Y={pointer:t,pointerIndex:z,pointerInfo:this.pointers[z],event:o,type:"move",eventTarget:i,dx:u,dy:p,duplicate:g,interaction:this};g||(k=this.coords.velocity,N=this.coords.delta,L=Math.max(N.timeStamp/1e3,.001),k.page.x=N.page.x/L,k.page.y=N.page.y/L,k.client.x=N.client.x/L,k.client.y=N.client.y/L,k.timeStamp=L),this._scopeFire("interactions:move",Y),g||this.simulation||(this.interacting()&&(Y.type=null,this.move(Y)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||J(this.coords.delta),(t=I({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,i,u){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,i,!1));var g=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:i,type:g,curEventTarget:u,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=B(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:j(this.pointers,function(i){return i.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,i,u){var p,g,k,N=B(t),L=this.getPointerIndex(t),z=this.pointers[L];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),z?z.pointer=t:(z=new Kn(N,t,o,null,null),L=this.pointers.length,this.pointers.push(z)),ee(this.coords.cur,this.pointers.map(function(Y){return Y.pointer}),this._now()),p=this.coords.delta,g=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-g.page.x,p.page.y=k.page.y-g.page.y,p.client.x=k.client.x-g.client.x,p.client.y=k.client.y-g.client.y,p.timeStamp=k.timeStamp-g.timeStamp,u&&(this.pointerIsDown=!0,z.downTime=this.coords.cur.timeStamp,z.downTarget=i,S(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,i),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:i,down:u,pointerInfo:z,pointerIndex:L,interaction:this}),L}},{key:"removePointer",value:function(t,o){var i=this.getPointerIndex(t);if(i!==-1){var u=this.pointers[i];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:i,pointerInfo:u,interaction:this}),this.pointers.splice(i,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,i){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=i}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,i,u){return new kn(this,t,this.prepared.name,o,this.element,i,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,i=t.phase,u=t.preEnd,p=t.type,g=this.rect;if(g&&i==="move"&&(Q(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(i),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,i,u,p);return this._scopeFire("interactions:action-".concat(i),t),i==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(i),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function _t(n){Yt(n.interaction)}function Yt(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Ot(n.coords.cur,t),Ot(n.coords.delta,t),Q(n.edges,n.rect,t),t.x=0,t.y=0,!0}function yt(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 Ot(n,t){var o=n.page,i=n.client,u=t.x,p=t.y;o.x+=u,o.y+=p,i.x+=u,i.y+=p}In.offsetBy="";var bt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=yt},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&&(Ot(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":_t,"interactions:before-action-move":_t,"interactions:before-action-end":function(n){var t=n.interaction;if(Yt(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}}},Kt=bt,Dt=function(){function n(t){c(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return v(n,[{key:"start",value:function(t){var o=this.interaction,i=Ct(o);if(!i||!i.enabled)return!1;var u=o.coords.velocity.client,p=dt(u.x,u.y),g=this.modification||(this.modification=new bn(o));if(g.copyFrom(o.modification),this.t0=o._now(),this.allowResume=i.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=g.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>i.minSpeed&&p>i.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,i=Ct(this.interaction),u=i.resistance,p=-Math.log(i.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-p)/u,y:(o.y-p)/u},this.te=p,this.lambda_v0=u/this.v0,this.one_ve_v0=1-i.endSpeed/this.v0;var g=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(k),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=Ke.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,i,u,p,g,k,N=this,L=this.interaction,z=Ct(L).resistance,Y=(L._now()-this.t0)/1e3;if(Y<this.te){var ke,Re=1-(Math.exp(-z*Y)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,i=this.targetOffset.x,u=this.targetOffset.y,p=this.modifiedOffset.x,g=this.modifiedOffset.y,ke={x:Vt(k=Re,t,i,p),y:Vt(k,o,u,g)}):ke={x:this.targetOffset.x*Re,y:this.targetOffset.y*Re};var ze={x:ke.x-this.currentOffset.x,y:ke.y-this.currentOffset.y};this.currentOffset.x+=ze.x,this.currentOffset.y+=ze.y,L.offsetBy(ze),L.move(),this.onNextFrame(function(){return N.inertiaTick()})}else L.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,i=o._now()-this.t0,u=Ct(o).smoothEndDuration;if(i<u){var p={x:Ft(i,0,this.targetOffset.x,u),y:Ft(i,0,this.targetOffset.y,u)},g={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=g.x,this.currentOffset.y+=g.y,o.offsetBy(g),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,i=t.event,u=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,i,u,!0),p._doPhase({interaction:p,event:i,phase:"resume"}),U(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ke.cancel(this.timeout)}}]),n}();function Ct(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var zt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(Kt),n.usePlugin(Tn),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new Dt(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,i=t.inertia;if(i.active)for(var u=o;h.element(u);){if(u===t.element){i.resume(n);break}u=ot(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":pn,"interactions:action-inertiastart":pn,"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 Vt(n,t,o,i){var u=1-n;return u*u*t+2*u*n*o+n*n*i}function Ft(n,t,o,i){return-o*(n/=i)*(n-2)+t}var Ht=zt;function an(n,t){for(var o=0;o<t.length;o++){var i=t[o];if(n.immediatePropagationStopped)break;i(n)}}var Nn=function(){function n(t){c(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=I({},t||{})}return v(n,[{key:"fire",value:function(t){var o,i=this.global;(o=this.types[t.type])&&an(t,o),!t.propagationStopped&&i&&(o=i[t.type])&&an(t,o)}},{key:"on",value:function(t,o){var i=Ee(t,o);for(t in i)this.types[t]=Ce(this.types[t]||[],i[t])}},{key:"off",value:function(t,o){var i=Ee(t,o);for(t in i){var u=this.types[t];if(u&&u.length)for(var p=0,g=i[t];p<g.length;p++){var k=g[p],N=u.indexOf(k);N!==-1&&u.splice(N,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Gn=function(){function n(t){c(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,S(this,t)}return v(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function An(n){return h.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Xn(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Ea={id:"events",install:function(n){var t,o=[],i={},u=[],p={add:g,remove:k,addDelegate:function(z,Y,ke,Re,ze){var We=An(ze);if(!i[ke]){i[ke]=[];for(var lt=0;lt<u.length;lt++){var tt=u[lt];g(tt,ke,N),g(tt,ke,L,!0)}}var ht=i[ke],Et=Me(ht,function(Nt){return Nt.selector===z&&Nt.context===Y});Et||(Et={selector:z,context:Y,listeners:[]},ht.push(Et)),Et.listeners.push({func:Re,options:We})},removeDelegate:function(z,Y,ke,Re,ze){var We,lt=An(ze),tt=i[ke],ht=!1;if(tt)for(We=tt.length-1;We>=0;We--){var Et=tt[We];if(Et.selector===z&&Et.context===Y){for(var Nt=Et.listeners,kt=Nt.length-1;kt>=0;kt--){var St=Nt[kt];if(St.func===Re&&Xn(St.options,lt)){Nt.splice(kt,1),Nt.length||(tt.splice(We,1),k(Y,ke,N),k(Y,ke,L,!0)),ht=!0;break}}if(ht)break}}},delegateListener:N,delegateUseCapture:L,delegatedEvents:i,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function g(z,Y,ke,Re){if(z.addEventListener){var ze=An(Re),We=Me(o,function(lt){return lt.eventTarget===z});We||(We={eventTarget:z,events:{}},o.push(We)),We.events[Y]||(We.events[Y]=[]),Me(We.events[Y],function(lt){return lt.func===ke&&Xn(lt.options,ze)})||(z.addEventListener(Y,ke,p.supportsOptions?ze:ze.capture),We.events[Y].push({func:ke,options:ze}))}}function k(z,Y,ke,Re){if(z.addEventListener&&z.removeEventListener){var ze=j(o,function(Qt){return Qt.eventTarget===z}),We=o[ze];if(We&&We.events)if(Y!=="all"){var lt=!1,tt=We.events[Y];if(tt){if(ke==="all"){for(var ht=tt.length-1;ht>=0;ht--){var Et=tt[ht];k(z,Y,Et.func,Et.options)}return}for(var Nt=An(Re),kt=0;kt<tt.length;kt++){var St=tt[kt];if(St.func===ke&&Xn(St.options,Nt)){z.removeEventListener(Y,ke,p.supportsOptions?Nt:Nt.capture),tt.splice(kt,1),tt.length===0&&(delete We.events[Y],lt=!0);break}}}lt&&!Object.keys(We.events).length&&o.splice(ze,1)}else for(Y in We.events)We.events.hasOwnProperty(Y)&&k(z,Y,"all")}}function N(z,Y){for(var ke=An(Y),Re=new Gn(z),ze=i[z.type],We=de(z)[0],lt=We;h.element(lt);){for(var tt=0;tt<ze.length;tt++){var ht=ze[tt],Et=ht.selector,Nt=ht.context;if(X(lt,Et)&&pe(Nt,We)&&pe(Nt,lt)){var kt=ht.listeners;Re.currentTarget=lt;for(var St=0;St<kt.length;St++){var Qt=kt[St];Xn(Qt.options,ke)&&Qt.func(Re)}}}lt=ot(lt)}}function L(z){return N(z,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),n.events=p,p}},oa={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=oa.methodOrder;t<o.length;t++){var i=o[t],u=oa[i](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,i=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var p=0,g=u.interactions.list;p<g.length;p++){var k=g[p],N=i;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;N;){if(N===k.element)return k;N=ot(N)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,i=n.pointerType,u=n.eventType,p=n.scope;if(i!=="mouse"&&i!=="pen")return null;for(var g=0,k=p.interactions.list;g<k.length;g++){var N=k[g];if(N.pointerType===i){if(N.simulation&&!ha(N,o))continue;if(N.interacting())return N;t||(t=N)}}if(t)return t;for(var L=0,z=p.interactions.list;L<z.length;L++){var Y=z[L];if(!(Y.pointerType!==i||/down/i.test(u)&&Y.simulation))return Y}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,i=n.scope.interactions.list;o<i.length;o++){var u=i[o];if(ha(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,i=n.scope.interactions.list;o<i.length;o++){var u=i[o];if(u.pointers.length===1){var p=u.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ha(n,t){return n.pointers.some(function(o){return o.id===t})}var ra=oa,dn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Yn(n,t){return function(o){var i=t.interactions.list,u=Z(o),p=de(o),g=p[0],k=p[1],N=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var L=0,z=o.changedTouches;L<z.length;L++){var Y=z[L],ke={pointer:Y,pointerId:B(Y),pointerType:u,eventType:o.type,eventTarget:g,curEventTarget:k,scope:t},Re=la(ke);N.push([ke.pointer,ke.eventTarget,ke.curEventTarget,Re])}}else{var ze=!1;if(!ne.supportsPointerEvent&&/mouse/.test(o.type)){for(var We=0;We<i.length&&!ze;We++)ze=i[We].pointerType!=="mouse"&&i[We].pointerIsDown;ze=ze||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!ze){var lt={pointer:o,pointerId:B(o),pointerType:u,eventType:o.type,curEventTarget:k,eventTarget:g,scope:t},tt=la(lt);N.push([lt.pointer,lt.eventTarget,lt.curEventTarget,tt])}}for(var ht=0;ht<N.length;ht++){var Et=N[ht],Nt=Et[0],kt=Et[1],St=Et[2];Et[3][n](Nt,o,kt,St)}}}function la(n){var t=n.pointerType,o=n.scope,i={interaction:ra.search(n),searchDetails:n};return o.fire("interactions:find",i),i.interaction||o.interactions.new({pointerType:t})}function on(n,t){var o=n.doc,i=n.scope,u=n.options,p=i.interactions.docEvents,g=i.events,k=g[t];for(var N in i.browser.isIOS&&!u.events&&(u.events={passive:!1}),g.delegatedEvents)k(o,N,g.delegateListener),k(o,N,g.delegateUseCapture,!0);for(var L=u&&u.events,z=0;z<p.length;z++){var Y=p[z];k(o,Y.type,Y.listener,L)}}var Sa={id:"core/interactions",install:function(n){for(var t={},o=0;o<dn.length;o++){var i=dn[o];t[i]=Yn(i,n)}var u,p=ne.pEventTypes;function g(){for(var k=0,N=n.interactions.list;k<N.length;k++){var L=N[k];if(L.pointerIsDown&&L.pointerType==="touch"&&!L._interacting)for(var z=function(){var Re=ke[Y];n.documents.some(function(ze){return pe(ze.doc,Re.downTarget)})||L.removePointer(Re.pointer,Re.event)},Y=0,ke=L.pointers;Y<ke.length;Y++)z()}}(u=P.PointerEvent?[{type:p.down,listener:g},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:g},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var N=0,L=n.interactions.list;N<L.length;N++)L[N].documentBlur(k)}}),n.prevTouchTime=0,n.Interaction=function(k){C(L,k);var N=H(L);function L(){return c(this,L),N.apply(this,arguments)}return v(L,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(z){n.interactions.pointerMoveTolerance=z}},{key:"_now",value:function(){return n.now()}}]),L}(qn),n.interactions={list:[],new:function(k){k.scopeFire=function(L,z){return n.fire(L,z)};var N=new n.Interaction(k);return n.interactions.list.push(N),N},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(Sn)},listeners:{"scope:add-document":function(n){return on(n,"add")},"scope:remove-document":function(n){return on(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,i=t.interactions.list.length-1;i>=0;i--){var u=t.interactions.list[i];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(i,1))}}},onDocSignal:on,doOnInteractions:Yn,methodNames:dn},Vn=Sa,On=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(On||{}),rl=function(){function n(t,o,i,u){c(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Nn,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||i,this._win=_(_e(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return h.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),h.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),h.func(o.onend)&&this.on("".concat(t,"end"),o.onend),h.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,i){var u,p=this,g=(u=this._actions.map[t])==null?void 0:u.filterEventType,k=function(N){return(g==null||g(N))&&hn(N,p._actions)};(h.array(o)||h.object(o))&&this._onOff(On.Off,t,o,void 0,k),(h.array(i)||h.object(i))&&this._onOff(On.On,t,i,void 0,k)}},{key:"setPerAction",value:function(t,o){var i=this._defaults;for(var u in o){var p=u,g=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,g.listeners,k),h.array(k)?g[p]=be(k):h.plainObject(k)?(g[p]=I(g[p]||{},un(k)),h.object(i.perAction[p])&&"enabled"in i.perAction[p]&&(g[p].enabled=k.enabled!==!1)):h.bool(k)&&h.object(i.perAction[p])?g[p].enabled=k:g[p]=k}}},{key:"getRect",value:function(t){return t=t||(h.element(this.target)?this.target:null),h.string(this.target)&&(t=t||this._context.querySelector(this.target)),Qe(t)}},{key:"rectChecker",value:function(t){var o=this;return h.func(t)?(this.getRect=function(i){var u=I({},t.apply(o,i));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(_e(o)||h.object(o)){for(var i in this.options[t]=o,this._actions.map)this.options[i][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 h.string(t)?Array.from(this._context.querySelectorAll(t)):h.func(t)&&t.getAllElements?t.getAllElements():h.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||pe(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,i){return!this.testIgnore(t.ignoreFrom,o,i)&&this.testAllow(t.allowFrom,o,i)}},{key:"testAllow",value:function(t,o,i){return!t||!!h.element(i)&&(h.string(t)?ye(i,t,o):!!h.element(t)&&pe(t,i))}},{key:"testIgnore",value:function(t,o,i){return!(!t||!h.element(i))&&(h.string(t)?ye(i,t,o):!!h.element(t)&&pe(t,i))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,i,u,p){h.object(o)&&!h.array(o)&&(u=i,i=null);var g=Ee(o,i,p);for(var k in g){k==="wheel"&&(k=ne.wheelEvent);for(var N=0,L=g[k];N<L.length;N++){var z=L[N];hn(k,this._actions)?this.events[t===On.On?"on":"off"](k,z):h.string(this.target)?this._scopeEvents[t===On.On?"addDelegate":"removeDelegate"](this.target,this._context,k,z,u):this._scopeEvents[t===On.On?"add":"remove"](this.target,k,z,u)}}return this}},{key:"on",value:function(t,o,i){return this._onOff(On.On,t,o,i)}},{key:"off",value:function(t,o,i){return this._onOff(On.Off,t,o,i)}},{key:"set",value:function(t){var o=this._defaults;for(var i in h.object(t)||(t={}),this.options=un(o.base),this._actions.methodDict){var u=i,p=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,I(I({},o.perAction),o.actions[u])),this[p](t[u])}for(var g in t)g!=="getRect"?h.func(this[g])&&this[g](t[g]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(h.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],i=o.length-1;i>=0;i--){var u=o[i],p=u.selector,g=u.context,k=u.listeners;p===this.target&&g===this._context&&o.splice(i,1);for(var N=k.length-1;N>=0;N--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[N][0],k[N][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),ll=function(){function n(t){var o=this;c(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(i){var u=i.interactable,p=u.target,g=h.string(p)?o.selectorMap[p]:p[o.scope.id],k=j(g,function(N){return N===u});g.splice(k,1)}})}return v(n,[{key:"new",value:function(t,o){o=I(o||{},{actions:this.scope.actions});var i=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(i._doc),this.list.push(i),h.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(i)):(i.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:t,options:o,interactable:i,win:this.scope._win}),i}},{key:"getExisting",value:function(t,o){var i=o&&o.context||this.scope.document,u=h.string(t),p=u?this.selectorMap[t]:t[this.scope.id];if(p)return Me(p,function(g){return g._context===i&&(u||g.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var i=0,u=this.list;i<u.length;i++){var p=u[i],g=void 0;if((h.string(p.target)?h.element(t)&&X(t,p.target):t===p.target)&&p.inContext(t)&&(g=o(p)),g!==void 0)return g}}}]),n}(),il=function(){function n(){var t=this;c(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ne,this.defaults=un(Bn),this.Eventable=Nn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(i){var u=function p(g,k){var N=i.interactables.getExisting(g,k);return N||((N=i.interactables.new(g,k)).events.global=p.globalEvents),N};return u.getPointerAverage=W,u.getTouchBBox=Se,u.getTouchDistance=ie,u.getTouchAngle=q,u.getElementRect=Qe,u.getElementClientRect=De,u.matchesSelector=X,u.closest=He,u.globalEvents={},u.version="1.10.27",u.scope=i,u.use=function(p,g){return this.scope.usePlugin(p,g),this},u.isSet=function(p,g){return!!this.scope.interactables.get(p,g&&g.context)},u.on=ct(function(p,g,k){if(h.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),h.array(p)){for(var N=0,L=p;N<L.length;N++){var z=L[N];this.on(z,g,k)}return this}if(h.object(p)){for(var Y in p)this.on(Y,p[Y],g);return this}return hn(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(g):this.globalEvents[p]=[g]:this.scope.events.add(this.scope.document,p,g,{options:k}),this},"The interact.on() method is being deprecated"),u.off=ct(function(p,g,k){if(h.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),h.array(p)){for(var N=0,L=p;N<L.length;N++){var z=L[N];this.off(z,g,k)}return this}if(h.object(p)){for(var Y in p)this.off(Y,p[Y],g);return this}var ke;return hn(p,this.scope.actions)?p in this.globalEvents&&(ke=this.globalEvents[p].indexOf(g))!==-1&&this.globalEvents[p].splice(ke,1):this.scope.events.remove(this.scope.document,p,g,k),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ne.supportsTouch},u.supportsPointerEvent=function(){return ne.supportsPointerEvent},u.stop=function(){for(var p=0,g=this.scope.interactions.list;p<g.length;p++)g[p].stop();return this},u.pointerMoveTolerance=function(p){return h.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(p,g){this.scope.addDocument(p,g)},u.removeDocument=function(p){this.scope.removeDocument(p)},u}(this),this.InteractEvent=kn,this.Interactable=void 0,this.interactables=new ll(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(i){return t.removeDocument(i.target)};var o=this;this.Interactable=function(i){C(p,i);var u=H(p);function p(){return c(this,p),u.apply(this,arguments)}return v(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(g){return M(w(p.prototype),"set",this).call(this,g),o.fire("interactable:set",{options:g,interactable:this}),this}},{key:"unset",value:function(){M(w(p.prototype),"unset",this).call(this);var g=o.interactables.list.indexOf(this);g<0||(o.interactables.list.splice(g,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(rl)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var i=0,u=this.listenerMaps;i<u.length;i++){var p=u[i].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,i){return o.isInitialized=!0,h.window(i)&&b(i),P.init(i),ne.init(i),Ke.init(i),o.window=i,o.document=i.document,o.usePlugin(Vn),o.usePlugin(Ea),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 i=0,u=this.listenerMaps.length,p=t.before.reduce(function(k,N){return k[N]=!0,k[vo(N)]=!0,k},{});i<u;i++){var g=this.listenerMaps[i].id;if(g&&(p[g]||p[vo(g)]))break}this.listenerMaps.splice(i,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 i=_(t);o=o?I({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(i,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:i,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),i=_(t),u=this.documents[o].options;this.events.remove(i,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:i,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 vo(n){return n&&n.replace(/\/.*$/,"")}var mo=new il,Zt=mo.interactStatic,sl=typeof globalThis<"u"?globalThis:window;mo.init(sl);var cl=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(i){var u=i[0],p=i[1];return u in n||p in n}),o=function(i,u){for(var p=n.range,g=n.limits,k=g===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:g,N=n.offset,L=N===void 0?{x:0,y:0}:N,z={range:p,grid:n,x:null,y:null},Y=0;Y<t.length;Y++){var ke=t[Y],Re=ke[0],ze=ke[1],We=Math.round((i-L.x)/n[Re]),lt=Math.round((u-L.y)/n[ze]);z[Re]=Math.max(k.left,Math.min(k.right,We*n[Re]+L.x)),z[ze]=Math.max(k.top,Math.min(k.bottom,lt*n[ze]+L.y))}return z};return o.grid=n,o.coordFields=t,o}}),ul={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=I(t.snappers||{},cl),t.createSnapGrid=t.snappers.grid}},dl=ul,pl={start:function(n){var t=n.state,o=n.rect,i=n.edges,u=n.pageCoords,p=t.options,g=p.ratio,k=p.enabled,N=t.options,L=N.equalDelta,z=N.modifiers;g==="preserve"&&(g=o.width/o.height),t.startCoords=I({},u),t.startRect=I({},o),t.ratio=g,t.equalDelta=L;var Y=t.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(t.xIsPrimaryAxis=!(!i.left&&!i.right),t.equalDelta){var ke=(Y.left?1:-1)*(Y.top?1:-1);t.edgeSign={x:ke,y:ke}}else t.edgeSign={x:Y.left?-1:1,y:Y.top?-1:1};if(k!==!1&&I(i,Y),z!=null&&z.length){var Re=new bn(n.interaction);Re.copyFrom(n.interaction.modification),Re.prepareStates(z),t.subModification=Re,Re.startAll(r({},n))}},set:function(n){var t=n.state,o=n.rect,i=n.coords,u=t.linkedEdges,p=I({},i),g=t.equalDelta?fl:hl;if(I(n.edges,u),g(t,t.xIsPrimaryAxis,i,o),!t.subModification)return null;var k=I({},o);Q(u,k,{x:i.x-p.x,y:i.y-p.y});var N=t.subModification.setAll(r(r({},n),{},{rect:k,edges:u,pageCoords:i,prevCoords:i,prevRect:k})),L=N.delta;return N.changed&&(g(t,Math.abs(L.x)>Math.abs(L.y),N.coords,N.rect),I(i,N.coords)),N.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function fl(n,t,o){var i=n.startCoords,u=n.edgeSign;t?o.y=i.y+(o.x-i.x)*u.y:o.x=i.x+(o.y-i.y)*u.x}function hl(n,t,o,i){var u=n.startRect,p=n.startCoords,g=n.ratio,k=n.edgeSign;if(t){var N=i.width/g;o.y=p.y+(N-u.height)*k.y}else{var L=i.height*g;o.x=p.x+(L-u.width)*k.x}}var vl=nn(pl,"aspectRatio"),go=function(){};go._defaults={};var Ta=go;function Jn(n,t,o){return h.func(n)?Ye(n,t.interactable,t.element,[o.x,o.y,t]):Ye(n,t.interactable,t.element)}var Ba={start:function(n){var t=n.rect,o=n.startOffset,i=n.state,u=n.interaction,p=n.pageCoords,g=i.options,k=g.elementRect,N=I({left:0,top:0,right:0,bottom:0},g.offset||{});if(t&&k){var L=Jn(g.restriction,u,p);if(L){var z=L.right-L.left-t.width,Y=L.bottom-L.top-t.height;z<0&&(N.left+=z,N.right+=z),Y<0&&(N.top+=Y,N.bottom+=Y)}N.left+=o.left-t.width*k.left,N.top+=o.top-t.height*k.top,N.right+=o.right-t.width*(1-k.right),N.bottom+=o.bottom-t.height*(1-k.bottom)}i.offset=N},set:function(n){var t=n.coords,o=n.interaction,i=n.state,u=i.options,p=i.offset,g=Jn(u.restriction,o,t);if(g){var k=function(N){return!N||"left"in N&&"top"in N||((N=I({},N)).left=N.x||0,N.top=N.y||0,N.right=N.right||N.left+N.width,N.bottom=N.bottom||N.top+N.height),N}(g);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=nn(Ba,"restrict"),yo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},bo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function ko(n,t){for(var o=0,i=["top","left","bottom","right"];o<i.length;o++){var u=i[o];u in n||(n[u]=t[u])}return n}var va={noInner:yo,noOuter:bo,start:function(n){var t,o=n.interaction,i=n.startOffset,u=n.state,p=u.options;p&&(t=Ie(Jn(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+i.top,left:t.x+i.left,bottom:t.y-i.bottom,right:t.x-i.right}},set:function(n){var t=n.coords,o=n.edges,i=n.interaction,u=n.state,p=u.offset,g=u.options;if(o){var k=I({},t),N=Jn(g.inner,i,k)||{},L=Jn(g.outer,i,k)||{};ko(N,yo),ko(L,bo),o.top?t.y=Math.min(Math.max(L.top+p.top,k.y),N.top+p.top):o.bottom&&(t.y=Math.max(Math.min(L.bottom+p.bottom,k.y),N.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(L.left+p.left,k.x),N.left+p.left):o.right&&(t.x=Math.max(Math.min(L.right+p.right,k.x),N.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},gl=nn(va,"restrictEdges"),yl=I({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ba.defaults),bl=nn({start:Ba.start,set:Ba.set,defaults:yl},"restrictRect"),kl={width:-1/0,height:-1/0},xl={width:1/0,height:1/0},wl=nn({start:function(n){return va.start(n)},set:function(n){var t=n.interaction,o=n.state,i=n.rect,u=n.edges,p=o.options;if(u){var g=le(Jn(p.min,t,n.coords))||kl,k=le(Jn(p.max,t,n.coords))||xl;o.options={endOnly:p.endOnly,inner:I({},va.noInner),outer:I({},va.noOuter)},u.top?(o.options.inner.top=i.bottom-g.height,o.options.outer.top=i.bottom-k.height):u.bottom&&(o.options.inner.bottom=i.top+g.height,o.options.outer.bottom=i.top+k.height),u.left?(o.options.inner.left=i.right-g.width,o.options.outer.left=i.right-k.width):u.right&&(o.options.inner.right=i.left+g.width,o.options.outer.right=i.left+k.width),va.set(n),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ya={start:function(n){var t,o=n.interaction,i=n.interactable,u=n.element,p=n.rect,g=n.state,k=n.startOffset,N=g.options,L=N.offsetWithOrigin?function(ke){var Re=ke.interaction.element,ze=Ie(Ye(ke.state.options.origin,null,null,[Re])),We=ze||se(ke.interactable,Re,ke.interaction.prepared.name);return We}(n):{x:0,y:0};if(N.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var z=Ye(N.offset,i,u,[o]);(t=Ie(z)||{x:0,y:0}).x+=L.x,t.y+=L.y}var Y=N.relativePoints;g.offsets=p&&Y&&Y.length?Y.map(function(ke,Re){return{index:Re,relativePoint:ke,x:k.left-p.width*ke.x+t.x,y:k.top-p.height*ke.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,i=n.state,u=i.options,p=i.offsets,g=se(t.interactable,t.element,t.prepared.name),k=I({},o),N=[];u.offsetWithOrigin||(k.x-=g.x,k.y-=g.y);for(var L=0,z=p;L<z.length;L++)for(var Y=z[L],ke=k.x-Y.x,Re=k.y-Y.y,ze=0,We=u.targets.length;ze<We;ze++){var lt=u.targets[ze],tt=void 0;(tt=h.func(lt)?lt(ke,Re,t._proxy,Y,ze):lt)&&N.push({x:(h.number(tt.x)?tt.x:ke)+Y.x,y:(h.number(tt.y)?tt.y:Re)+Y.y,range:h.number(tt.range)?tt.range:u.range,source:lt,index:ze,offset:Y})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Et=0;Et<N.length;Et++){var Nt=N[Et],kt=Nt.range,St=Nt.x-k.x,Qt=Nt.y-k.y,$t=dt(St,Qt),sn=$t<=kt;kt===1/0&&ht.inRange&&ht.range!==1/0&&(sn=!1),ht.target&&!(sn?ht.inRange&&kt!==1/0?$t/kt<ht.distance/ht.range:kt===1/0&&ht.range!==1/0||$t<ht.distance:!ht.inRange&&$t<ht.distance)||(ht.target=Nt,ht.distance=$t,ht.range=kt,ht.inRange=sn,ht.delta.x=St,ht.delta.y=Qt)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),i.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=nn(Ya,"snap"),Ia={start:function(n){var t=n.state,o=n.edges,i=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Ya.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,i=n.coords,u=o.options,p=o.offsets,g={x:i.x-p[0].x,y:i.y-p[0].y};o.options=I({},u),o.options.targets=[];for(var k=0,N=u.targets||[];k<N.length;k++){var L=N[k],z=void 0;if(z=h.func(L)?L(g.x,g.y,t):L){for(var Y=0,ke=o.targetFields;Y<ke.length;Y++){var Re=ke[Y],ze=Re[0],We=Re[1];if(ze in z||We in z){z.x=z[ze],z.y=z[We];break}}o.options.targets.push(z)}}var lt=Ya.set(n);return o.options=u,lt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Dl=nn(Ia,"snapSize"),Ja={aspectRatio:vl,restrictEdges:gl,restrict:ml,restrictRect:bl,restrictSize:wl,snapEdges:nn({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Ia.start(n)):null},set:Ia.set,defaults:I(un(Ia.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:Dl,spring:Ta,avoid:Ta,transform:Ta,rubberband:Ta},_l={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Tn),n.usePlugin(dl),t.modifiers=Ja,Ja){var i=Ja[o],u=i._defaults,p=i._methods;u._methods=p,n.defaults.perAction[o]=u}}},El=_l,xo=function(n){C(o,n);var t=H(o);function o(i,u,p,g,k,N){var L;if(c(this,o),S(R(L=t.call(this,k)),p),p!==u&&S(R(L),u),L.timeStamp=N,L.originalEvent=p,L.type=i,L.pointerId=B(u),L.pointerType=Z(u),L.target=g,L.currentTarget=null,i==="tap"){var z=k.getPointerIndex(u);L.dt=L.timeStamp-k.pointers[z].downTime;var Y=L.timeStamp-k.tapTime;L.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===L.target&&Y<500}else i==="doubletap"&&(L.dt=u.timeStamp-k.tapTime,L.double=!0);return L}return v(o,[{key:"_subtractOrigin",value:function(i){var u=i.x,p=i.y;return this.pageX-=u,this.pageY-=p,this.clientX-=u,this.clientY-=p,this}},{key:"_addOrigin",value:function(i){var u=i.x,p=i.y;return this.pageX+=u,this.pageY+=p,this.clientX+=u,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(me),ma={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ma,n.defaults.actions.pointerEvents=ma.defaults,I(n.actions.phaselessTypes,ma.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,i=n.pointer,u=n.event,p=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&Za(n),Mn({interaction:o,pointer:i,event:u,eventTarget:p,type:"move"},t))},"interactions:down":function(n,t){(function(o,i){for(var u=o.interaction,p=o.pointer,g=o.event,k=o.eventTarget,N=o.pointerIndex,L=u.pointers[N].hold,z=ae(k),Y={interaction:u,pointer:p,event:g,eventTarget:k,type:"hold",targets:[],path:z,node:null},ke=0;ke<z.length;ke++){var Re=z[ke];Y.node=Re,i.fire("pointerEvents:collect-targets",Y)}if(Y.targets.length){for(var ze=1/0,We=0,lt=Y.targets;We<lt.length;We++){var tt=lt[We].eventable.options.holdDuration;tt<ze&&(ze=tt)}L.duration=ze,L.timeout=setTimeout(function(){Mn({interaction:u,eventTarget:k,pointer:p,event:g,type:"hold"},i)},ze)}})(n,t),Mn(n,t)},"interactions:up":function(n,t){Za(n),Mn(n,t),function(o,i){var u=o.interaction,p=o.pointer,g=o.event,k=o.eventTarget;u.pointerWasMoved||Mn({interaction:u,eventTarget:k,pointer:p,event:g,type:"tap"},i)}(n,t)},"interactions:cancel":function(n,t){Za(n),Mn(n,t)}},PointerEvent:xo,fire:Mn,collectEventTargets:wo,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 Mn(n,t){var o=n.interaction,i=n.pointer,u=n.event,p=n.eventTarget,g=n.type,k=n.targets,N=k===void 0?wo(n,t):k,L=new xo(g,i,u,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:L});for(var z={interaction:o,pointer:i,event:u,eventTarget:p,targets:N,type:g,pointerEvent:L},Y=0;Y<N.length;Y++){var ke=N[Y];for(var Re in ke.props||{})L[Re]=ke.props[Re];var ze=se(ke.eventable,ke.node);if(L._subtractOrigin(ze),L.eventable=ke.eventable,L.currentTarget=ke.node,ke.eventable.fire(L),L._addOrigin(ze),L.immediatePropagationStopped||L.propagationStopped&&Y+1<N.length&&N[Y+1].node!==L.currentTarget)break}if(t.fire("pointerEvents:fired",z),g==="tap"){var We=L.double?Mn({interaction:o,pointer:i,event:u,eventTarget:p,type:"doubletap"},t):L;o.prevTap=We,o.tapTime=We.timeStamp}return L}function wo(n,t){var o=n.interaction,i=n.pointer,u=n.event,p=n.eventTarget,g=n.type,k=o.getPointerIndex(i),N=o.pointers[k];if(g==="tap"&&(o.pointerWasMoved||!N||N.downTarget!==p))return[];for(var L=ae(p),z={interaction:o,pointer:i,event:u,eventTarget:p,type:g,path:L,targets:[],node:null},Y=0;Y<L.length;Y++){var ke=L[Y];z.node=ke,t.fire("pointerEvents:collect-targets",z)}return g==="hold"&&(z.targets=z.targets.filter(function(Re){var ze,We;return Re.eventable.options.holdDuration===((ze=o.pointers[k])==null||(We=ze.hold)==null?void 0:We.duration)})),z.targets}function Za(n){var t=n.interaction,o=n.pointerIndex,i=t.pointers[o].hold;i&&i.timeout&&(clearTimeout(i.timeout),i.timeout=null)}var Sl=Object.freeze({__proto__:null,default:ma});function Tl(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ma);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)]=Tl,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,i=n.pointerEvent,u=n.eventTarget,p=n.targets;if(i.type==="hold"&&p.length){var g=p[0].eventable.options.holdRepeatInterval;g<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:i,event:i},t)},g))}}})},Il=Bl,Nl={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(i){return I(this.events.options,i),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(i,u){var p=o.call(this,i,u);return p===this&&(this.events.options[i]=u),p}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,i=n.node,u=n.type,p=n.eventTarget;t.interactables.forEachMatch(i,function(g){var k=g.events,N=k.options;k.types[u]&&k.types[u].length&&g.testIgnoreAllow(N,i,p)&&o.push({node:i,eventable:k,props:{interactable:g}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,i=n.options;I(o.events.options,t.pointerEvents.defaults),I(o.events.options,i.pointerEvents||{})}}},Al=Nl,Vl={id:"pointer-events",install:function(n){n.usePlugin(Sl),n.usePlugin(Il),n.usePlugin(Al)}},Ol=Vl,Ml={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(i,u,p){for(var g=i.getAllElements(),k=p.window.Promise,N=k?[]:null,L=function(){var Y=g[z],ke=i.getRect(Y);if(!ke)return 1;var Re,ze=Me(p.interactions.list,function(tt){return tt.interacting()&&tt.interactable===i&&tt.element===Y&&tt.prepared.name===u.name});if(ze)ze.move(),N&&(Re=ze._reflowPromise||new k(function(tt){ze._reflowResolve=tt}));else{var We=le(ke),lt=function(tt){return{coords:tt,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:We.x,y:We.y},client:{x:We.x,y:We.y},timeStamp:p.now()});Re=function(tt,ht,Et,Nt,kt){var St=tt.interactions.new({pointerType:"reflow"}),Qt={interaction:St,event:kt,pointer:kt,eventTarget:Et,phase:"reflow"};St.interactable=ht,St.element=Et,St.prevEvent=kt,St.updatePointer(kt,kt,Et,!0),J(St.coords.delta),ft(St.prepared,Nt),St._doPhase(Qt);var $t=tt.window,sn=$t.Promise,fn=sn?new sn(function(xn){St._reflowResolve=xn}):void 0;return St._reflowPromise=fn,St.start(Nt,ht,Et),St._interacting?(St.move(Qt),St.end(kt)):(St.stop(),St._reflowResolve()),St.removePointer(kt,kt),fn}(p,i,Y,u,lt)}N&&N.push(Re)},z=0;z<g.length&&!L();z++);return N&&k.all(N).then(function(){return i})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(i,u){i.splice(i.indexOf(u),1)}(t.interactions.list,o))}}},zl=Ml;if(Zt.use(Sn),Zt.use(Kt),Zt.use(Ol),Zt.use(Ht),Zt.use(El),Zt.use(Ln),Zt.use(E),Zt.use(pt),Zt.use(zl),Zt.default=Zt,d(a)==="object"&&a)try{a.exports=Zt}catch{}return Zt.default=Zt,Zt})}(xa,xa.exports)),xa.exports}var Dp=Cp();const Ho=Ne.getDefaultExportFromCjs(Dp),Ha=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:l,emit:s}){const r=a,d=s,c=e.inject($r),x=e.inject(jr);if(!c)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let C=!1,w=!1,F=NaN,R=NaN,H=NaN,M=NaN,ve=-1,K=-1,O=-1,G=-1,b=r.x,_=r.y,y=r.w,T=r.h;const h=e.ref(),ce=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:h,calcXY:Ye});function Ae(D){Ee(D)}function at(){qe()}function we(D){cn(r.isDraggable)&&(f.draggable=D)}function Pe(D){cn(r.isResizable)&&(f.resizable=D)}function Le(D){cn(r.isBounded)&&(f.bounded=D)}function P(D){f.transformScale=D}function re(D){f.rowHeight=D}function ne(D){f.maxRows=D}function pe(){f.rtl=Ko()==="rtl",qe()}function He(D){f.cols=Math.floor(D)}c.increaseItem(ce),e.onBeforeMount(()=>{f.rtl=Ko()==="rtl"}),e.onMounted(()=>{c.responsive&&c.lastBreakpoint?f.cols=qr(c.lastBreakpoint,c.cols):f.cols=c.colNum,f.rowHeight=c.rowHeight,f.containerWidth=c.width!==null?c.width:100,f.margin=c.margin!==void 0?c.margin.map(Number):[10,10],f.maxRows=c.maxRows,cn(r.isDraggable)?f.draggable=c.isDraggable:f.draggable=r.isDraggable,cn(r.isResizable)?f.resizable=c.isResizable:f.resizable=r.isResizable,cn(r.isBounded)?f.bounded=c.isBounded:f.bounded=r.isBounded,f.transformScale=c.transformScale,f.useCssTransforms=c.useCssTransforms,f.useStyleCursor=c.useStyleCursor,e.watchEffect(()=>{b=r.x,_=r.y,T=r.h,y=r.w,en(Qe)}),x.on("updateWidth",Ae),x.on("compact",at),x.on("setDraggable",we),x.on("setResizable",Pe),x.on("setBounded",Le),x.on("setTransformScale",P),x.on("setRowHeight",re),x.on("setMaxRows",ne),x.on("directionchange",pe),x.on("setColNum",He)}),e.onBeforeUnmount(()=>{x.off("updateWidth",Ae),x.off("compact",at),x.off("setDraggable",we),x.off("setResizable",Pe),x.off("setBounded",Le),x.off("setTransformScale",P),x.off("setRowHeight",re),x.off("setMaxRows",ne),x.off("directionchange",pe),x.off("setColNum",He),v.value&&(v.value.unset(),v.value=null),c.decreaseItem(ce)}),l({state:f,wrapper:h});const ot=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,X=e.computed(()=>f.resizable&&!r.static),A=e.computed(()=>c.isMirrored?!f.rtl:f.rtl),te=e.computed(()=>(f.draggable||f.resizable)&&!r.static),ye=vp("item"),ue=e.computed(()=>({[ye.b()]:!0,[ye.bm("resizable")]:X.value,[ye.bm("static")]:r.static,[ye.bm("resizing")]:f.isResizing,[ye.bm("dragging")]:f.isDragging,[ye.bm("transform")]:f.useCssTransforms,[ye.bm("rtl")]:A.value,[ye.bm("no-touch")]:ot&&te.value})),De=e.computed(()=>[ye.be("resizer"),A.value&&ye.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,D=>{f.draggable=D}),e.watch(()=>r.static,()=>{en(S),en(J)}),e.watch(()=>f.draggable,()=>{en(S)}),e.watch(()=>r.isResizable,D=>{f.resizable=D}),e.watch(()=>r.isBounded,D=>{f.bounded=D}),e.watch(()=>f.resizable,()=>{en(J)}),e.watch(()=>f.rowHeight,()=>{en(Qe),en(ae)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{en(J),en(Qe),en(ae)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{en(J)}),e.watch(A,()=>{en(J),en(Qe)}),e.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const D=c.margin;!D||D[0]===f.margin[0]&&D[1]===f.margin[1]||(f.margin=D.map(Number),en(Qe),en(ae))});function Qe(){r.x+r.w>f.cols?(b=0,y=r.w>f.cols?f.cols:r.w):(b=r.x,y=r.w);const D=Xe(b,_,y,T);f.isDragging&&(D.top=f.dragging.top,A.value?D.right=f.dragging.left:D.left=f.dragging.left),f.isResizing&&(D.width=f.resizing.width,D.height=f.resizing.height);let oe;f.useCssTransforms?A.value?oe=dp(D.top,D.right,D.width,D.height):oe=up(D.top,D.left,D.width,D.height):A.value?oe=fp(D.top,D.right,D.width,D.height):oe=pp(D.top,D.left,D.width,D.height),f.style=oe}function ae(){const D={};for(const oe of["width","height"]){const Ve=f.style[oe].match(/^(\d+)px$/);if(!Ve)return;D[oe]=Ve[1]}d("container-resized",r.i,r.h,r.w,D.height,D.width)}function _e(D){if(r.static)return;const oe=D.type;if(oe==="resizestart"&&f.isResizing||oe!=="resizestart"&&!f.isResizing)return;const Ve=jo(D);if(cn(Ve))return;const{x:B,y:ee}=Ve,$={width:0,height:0};let W;switch(oe){case"resizestart":{J(),ve=y,K=T,W=Xe(b,_,y,T),$.width=W.width,$.height=W.height,f.resizing=$,f.isResizing=!0;break}case"resizemove":{!D.edges.right&&!D.edges.left&&(H=B),!D.edges.top&&!D.edges.bottom&&(M=ee);const Se=Uo(H,M,B,ee);A.value?$.width=f.resizing.width-Se.deltaX/f.transformScale:$.width=f.resizing.width+Se.deltaX/f.transformScale,$.height=f.resizing.height+Se.deltaY/f.transformScale,f.resizing=$;break}case"resizeend":{W=Xe(b,_,y,T),$.width=W.width,$.height=W.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}W=se($.height,$.width),W.w<r.minW&&(W.w=r.minW),W.w>r.maxW&&(W.w=r.maxW),W.h<r.minH&&(W.h=r.minH),W.h>r.maxH&&(W.h=r.maxH),W.h<1&&(W.h=1),W.w<1&&(W.w=1),H=B,M=ee,(y!==W.w||T!==W.h)&&d("resize",r.i,W.h,W.w,$.height,$.width),D.type==="resizeend"&&(ve!==y||K!==T)&&d("resized",r.i,W.h,W.w,$.height,$.width),x.emit("resizeEvent",D.type,r.i,b,_,W.h,W.w)}function I(D){if(r.static||f.isResizing)return;const oe=D.type;if(oe==="dragstart"&&f.isDragging||oe!=="dragstart"&&!f.isDragging)return;const Ve=jo(D);if(cn(Ve))return;const{x:B,y:ee}=Ve,$=D.target;if(!$.offsetParent)return;const W={top:0,left:0};switch(oe){case"dragstart":{O=b,G=_;const ie=$.offsetParent.getBoundingClientRect(),q=$.getBoundingClientRect(),Z=q.left/f.transformScale,de=ie.left/f.transformScale,me=q.right/f.transformScale,Ce=ie.right/f.transformScale,be=q.top/f.transformScale,j=ie.top/f.transformScale;A.value?W.left=(me-Ce)*-1:W.left=Z-de,W.top=be-j,f.dragging=W,f.isDragging=!0;break}case"dragmove":{const ie=Uo(F,R,B,ee);if(A.value?W.left=f.dragging.left-ie.deltaX/f.transformScale:W.left=f.dragging.left+ie.deltaX/f.transformScale,W.top=f.dragging.top+ie.deltaY/f.transformScale,f.bounded){const q=$.offsetParent.clientHeight-le(r.h,f.rowHeight,f.margin[1]);W.top=Q(W.top,0,q);const Z=Ie(),de=f.containerWidth-le(r.w,Z,f.margin[0]);W.left=Q(W.left,0,de)}f.dragging=W;break}case"dragend":{const ie=$.offsetParent.getBoundingClientRect(),q=$.getBoundingClientRect(),Z=q.left/f.transformScale,de=ie.left/f.transformScale,me=q.right/f.transformScale,Ce=ie.right/f.transformScale,be=q.top/f.transformScale,j=ie.top/f.transformScale;A.value?W.left=(me-Ce)*-1:W.left=Z-de,W.top=be-j,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Se;A.value,Se=Ye(W.top,W.left),F=B,R=ee,(b!==Se.x||_!==Se.y)&&d("move",r.i,Se.x,Se.y),D.type==="dragend"&&(O!==b||G!==_)&&d("moved",r.i,Se.x,Se.y),x.emit("dragEvent",D.type,r.i,Se.x,Se.y,T,y)}function Xe(D,oe,Ve,B){const ee=Ie();let $;return A.value?$={right:Math.round(ee*D+(D+1)*f.margin[0]),top:Math.round(f.rowHeight*oe+(oe+1)*f.margin[1]),width:Ve===1/0?Ve:Math.round(ee*Ve+Math.max(0,Ve-1)*f.margin[0]),height:B===1/0?B:Math.round(f.rowHeight*B+Math.max(0,B-1)*f.margin[1])}:$={left:Math.round(ee*D+(D+1)*f.margin[0]),top:Math.round(f.rowHeight*oe+(oe+1)*f.margin[1]),width:Ve===1/0?Ve:Math.round(ee*Ve+Math.max(0,Ve-1)*f.margin[0]),height:B===1/0?B:Math.round(f.rowHeight*B+Math.max(0,B-1)*f.margin[1])},$}function Ye(D,oe){const Ve=Ie();let B=Math.round((oe-f.margin[0])/(Ve+f.margin[0])),ee=Math.round((D-f.margin[1])/(f.rowHeight+f.margin[1]));return B=Math.max(Math.min(B,f.cols-y),0),ee=Math.max(Math.min(ee,f.maxRows-T),0),{x:B,y:ee}}function Ie(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function le(D,oe,Ve){return Number.isFinite(D)?Math.round(oe*D+Math.max(0,D-1)*Ve):D}function Q(D,oe,Ve){return Math.max(Math.min(D,Ve),oe)}function se(D,oe,Ve=!1){const B=Ie();let ee=Math.round((oe+f.margin[0])/(B+f.margin[0])),$=0;return Ve?$=Math.ceil((D+f.margin[1])/(f.rowHeight+f.margin[1])):$=Math.round((D+f.margin[1])/(f.rowHeight+f.margin[1])),ee=Math.max(Math.min(ee,f.cols-b),0),$=Math.max(Math.min($,f.maxRows-_),0),{w:ee,h:$}}function Ee(D,oe){f.containerWidth=D}function qe(){Qe()}function dt(){!v.value&&h.value&&(v.value=Ho(h.value),f.useStyleCursor||v.value.styleCursor(!1))}const m=Po(I);function S(){if(dt(),!!v.value)if(f.draggable&&!r.static){const D={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};v.value.draggable(D),C||(C=!0,v.value.on("dragstart dragmove dragend",oe=>{oe.type==="dragmove"?m(oe):I(oe)}))}else v.value.draggable({enabled:!1})}const U=Po(_e);function J(){if(dt(),!!v.value)if(f.resizable&&!r.static){const D=Xe(0,0,r.maxW,r.maxH),oe=Xe(0,0,r.minW,r.minH),Ve={edges:{left:A.value?`.${De.value[0]}`:!1,right:A.value?!1:`.${De.value[0]}`,bottom:`.${De.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:oe.height*f.transformScale,width:oe.width*f.transformScale},max:{height:D.height*f.transformScale,width:D.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(Ve.modifiers=[Ho.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(Ve),w||(w=!0,v.value.on("resizestart resizemove resizeend",B=>{B.type==="resizemove"?U(B):_e(B)}))}else v.value.resizable({enabled:!1})}return(D,oe)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:h,class:e.normalizeClass(ue.value),style:e.normalizeStyle(f.style)},[e.renderSlot(D.$slots,"default"),X.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(De.value)},null,2)):e.createCommentVNode("",!0)],6))}}),na=typeof window<"u";var qo;na&&(qo=window==null?void 0:window.navigator)!=null&&qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Go(a){return a!=null}function Xo(){}const _p=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(_p)));const Ep=na&&("ontouchstart"in window||Tp()>0),Sp=Ep?"pointerdown":"click";function Tp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Bp(a,l,s=window.Event){const{type:r,bubbles:d=!1,cancelable:c=!1,...x}=l;if(!Go(r)||r==="")return!1;let v;return Go(s)?v=new s(r,{bubbles:d,cancelable:c}):(v=document.createEvent("HTMLEvents"),v.initEvent(r,d,c)),Object.assign(v,x),a.dispatchEvent(v)}const Ip="clickoutside",Np=new Set;na&&document.addEventListener(Sp,a=>{const l=a.target,s=a.composedPath&&a.composedPath();Np.forEach(r=>{r!==l&&(s?!s.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&Bp(r,{type:Ip})})},!0);const Ap=[["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 Fa;if(na){for(const a of Ap)if(a[1]in document){Fa=a;break}}e.computed(()=>!1);const Vp=new Set,Op=new WeakMap;if(na&&Fa){const a=Fa[2],l=Fa[4];document.addEventListener(l,()=>{if(Vp.forEach(s=>{s.value=!1}),document[a]){const s=Op.get(document[a]);s&&(s.value=!0)}},!1)}const Xr=new Map;Xr.set("x",0);Xr.set("y",0);var Qn=[],Mp=function(){return Qn.some(function(a){return a.activeTargets.length>0})},zp=function(){return Qn.some(function(a){return a.skippedTargets.length>0})},Yo="ResizeObserver loop completed with undelivered notifications.",Fp=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Yo}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Yo),window.dispatchEvent(a)},_a;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_a||(_a={}));var ea=function(a){return Object.freeze(a)},Rp=function(){function a(l,s){this.inlineSize=l,this.blockSize=s,ea(this)}return a}(),Yr=function(){function a(l,s,r,d){return this.x=l,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ea(this)}return a.prototype.toJSON=function(){var l=this,s=l.x,r=l.y,d=l.top,c=l.right,x=l.bottom,v=l.left,f=l.width,C=l.height;return{x:s,y:r,top:d,right:c,bottom:x,left:v,width:f,height:C}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),ho=function(a){return a instanceof SVGElement&&"getBBox"in a},Jr=function(a){if(ho(a)){var l=a.getBBox(),s=l.width,r=l.height;return!s&&!r}var d=a,c=d.offsetWidth,x=d.offsetHeight;return!(c||x||a.getClientRects().length)},Jo=function(a){var l;if(a instanceof Element)return!0;var s=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(s&&a instanceof s.Element)},Pp=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},Da=typeof window<"u"?window:{},Va=new WeakMap,Zo=/auto|scroll/,Lp=/^tb|vertical/,$p=/msie|trident/i.test(Da.navigator&&Da.navigator.userAgent),mn=function(a){return parseFloat(a||"0")},pa=function(a,l,s){return a===void 0&&(a=0),l===void 0&&(l=0),s===void 0&&(s=!1),new Rp((s?l:a)||0,(s?a:l)||0)},Qo=ea({devicePixelContentBoxSize:pa(),borderBoxSize:pa(),contentBoxSize:pa(),contentRect:new Yr(0,0,0,0)}),Zr=function(a,l){if(l===void 0&&(l=!1),Va.has(a)&&!l)return Va.get(a);if(Jr(a))return Va.set(a,Qo),Qo;var s=getComputedStyle(a),r=ho(a)&&a.ownerSVGElement&&a.getBBox(),d=!$p&&s.boxSizing==="border-box",c=Lp.test(s.writingMode||""),x=!r&&Zo.test(s.overflowY||""),v=!r&&Zo.test(s.overflowX||""),f=r?0:mn(s.paddingTop),C=r?0:mn(s.paddingRight),w=r?0:mn(s.paddingBottom),F=r?0:mn(s.paddingLeft),R=r?0:mn(s.borderTopWidth),H=r?0:mn(s.borderRightWidth),M=r?0:mn(s.borderBottomWidth),ve=r?0:mn(s.borderLeftWidth),K=F+C,O=f+w,G=ve+H,b=R+M,_=v?a.offsetHeight-b-a.clientHeight:0,y=x?a.offsetWidth-G-a.clientWidth:0,T=d?K+G:0,h=d?O+b:0,ce=r?r.width:mn(s.width)-T-y,Ae=r?r.height:mn(s.height)-h-_,at=ce+K+y+G,we=Ae+O+_+b,Pe=ea({devicePixelContentBoxSize:pa(Math.round(ce*devicePixelRatio),Math.round(Ae*devicePixelRatio),c),borderBoxSize:pa(at,we,c),contentBoxSize:pa(ce,Ae,c),contentRect:new Yr(F,f,ce,Ae)});return Va.set(a,Pe),Pe},Qr=function(a,l,s){var r=Zr(a,s),d=r.borderBoxSize,c=r.contentBoxSize,x=r.devicePixelContentBoxSize;switch(l){case _a.DEVICE_PIXEL_CONTENT_BOX:return x;case _a.BORDER_BOX:return d;default:return c}},jp=function(){function a(l){var s=Zr(l);this.target=l,this.contentRect=s.contentRect,this.borderBoxSize=ea([s.borderBoxSize]),this.contentBoxSize=ea([s.contentBoxSize]),this.devicePixelContentBoxSize=ea([s.devicePixelContentBoxSize])}return a}(),el=function(a){if(Jr(a))return 1/0;for(var l=0,s=a.parentNode;s;)l+=1,s=s.parentNode;return l},Up=function(){var a=1/0,l=[];Qn.forEach(function(c){if(c.activeTargets.length!==0){var x=[];c.activeTargets.forEach(function(v){var f=new jp(v.target),C=el(v.target);x.push(f),v.lastReportedSize=Qr(v.target,v.observedBox),C<a&&(a=C)}),l.push(function(){c.callback.call(c.observer,x,c.observer)}),c.activeTargets.splice(0,c.activeTargets.length)}});for(var s=0,r=l;s<r.length;s++){var d=r[s];d()}return a},er=function(a){Qn.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(s){s.isActive()&&(el(s.target)>a?l.activeTargets.push(s):l.skippedTargets.push(s))})})},Kp=function(){var a=0;for(er(a);Mp();)a=Up(),er(a);return zp()&&Fp(),a>0},no,tl=[],Wp=function(){return tl.splice(0).forEach(function(a){return a()})},Hp=function(a){if(!no){var l=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Wp()}).observe(s,r),no=function(){s.textContent="".concat(l?l--:l++)}}tl.push(a),no()},qp=function(a){Hp(function(){requestAnimationFrame(a)})},Ra=0,Gp=function(){return!!Ra},Xp=250,Yp={attributes:!0,characterData:!0,childList:!0,subtree:!0},tr=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],nr=function(a){return a===void 0&&(a=0),Date.now()+a},ao=!1,Jp=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var s=this;if(l===void 0&&(l=Xp),!ao){ao=!0;var r=nr(l);qp(function(){var d=!1;try{d=Kp()}finally{if(ao=!1,l=r-nr(),!Gp())return;d?s.run(1e3):l>0?s.run(l):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,s=function(){return l.observer&&l.observer.observe(document.body,Yp)};document.body?s():Da.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),tr.forEach(function(s){return Da.addEventListener(s,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),tr.forEach(function(s){return Da.removeEventListener(s,l.listener,!0)}),this.stopped=!0)},a}(),uo=new Jp,ar=function(a){!Ra&&a>0&&uo.start(),Ra+=a,!Ra&&uo.stop()},Zp=function(a){return!ho(a)&&!Pp(a)&&getComputedStyle(a).display==="inline"},Qp=function(){function a(l,s){this.target=l,this.observedBox=s||_a.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=Qr(this.target,this.observedBox,!0);return Zp(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),ef=function(){function a(l,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=s}return a}(),Oa=new WeakMap,or=function(a,l){for(var s=0;s<a.length;s+=1)if(a[s].target===l)return s;return-1},Ma=function(){function a(){}return a.connect=function(l,s){var r=new ef(l,s);Oa.set(l,r)},a.observe=function(l,s,r){var d=Oa.get(l),c=d.observationTargets.length===0;or(d.observationTargets,s)<0&&(c&&Qn.push(d),d.observationTargets.push(new Qp(s,r&&r.box)),ar(1),uo.schedule())},a.unobserve=function(l,s){var r=Oa.get(l),d=or(r.observationTargets,s),c=r.observationTargets.length===1;d>=0&&(c&&Qn.splice(Qn.indexOf(r),1),r.observationTargets.splice(d,1),ar(-1))},a.disconnect=function(l){var s=this,r=Oa.get(l);r.observationTargets.slice().forEach(function(d){return s.unobserve(l,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),tf=function(){function a(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ma.connect(this,l)}return a.prototype.observe=function(l,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Jo(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ma.observe(this,l,s)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Jo(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ma.unobserve(this,l)},a.prototype.disconnect=function(){Ma.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const qa=new WeakMap;function nf(a){var l;for(let s=0,r=a.length;s<r;++s){const d=a[s],c=qa.get(d.target);if(typeof c=="function"){const{inlineSize:x,blockSize:v}=((l=d.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:f,offsetHeight:C}=d.target;c(Object.assign(d,{offsetWidth:f,offsetHeight:C,width:x??f,height:v??C}))}}}const nl=new(na&&window.ResizeObserver||tf)(nf);function rr(a,l){qa.set(a,l),nl.observe(a)}function lr(a){qa.has(a)&&(nl.unobserve(a),qa.delete(a))}function af(a={}){let l=Xo;const s=e.watch(()=>e.unref(a.target),d=>{l(),!(!d||typeof a.onResize!="function")&&(rr(d,a.onResize),l=()=>{lr(d),l=Xo})},{immediate:!0}),r=()=>{s(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:rr,unobserveResize:lr,unobserve:r}}const of=e.ref(!1);e.computed(()=>of.value);const ir="__theme_style__",oo="__theme_observer__",sr=e.reactive(new Map),cr=new Map;e.watch(sr,()=>{if(!na)return;cr.clear();const a=document.head.querySelector(`#${ir}`);a&&document.head.removeChild(a);const l=document.createElement("style");let s=`.${oo} { width: 1px }`,r=1;for(const[d,[c,x]]of sr.entries())s+=` html.${c} .${oo}, .${x} .${oo} { width: ${++r}px }`,cr.set(r,d);l.textContent=s,l.id=ir,document.head.appendChild(l)});const al=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:l,emit:s}){const r=a,d=s,c=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),x=new Map,v=e.ref(r.layout),f=e.ref(),{observeResize:C,unobserveResize:w}=af(),F=ap();F.on("resizeEvent",R),F.on("dragEvent",H),e.onBeforeMount(()=>{d("layout-before-mount",v.value)}),e.onMounted(()=>{d("layout-mounted",v.value),e.nextTick(()=>{hp(v.value),c.originalLayout=v.value,e.nextTick(()=>{Ae(),f.value&&C(f.value,op(b,16)),sa(v.value,r.verticalCompact),d("layout-updated",v.value),G(),b()})})}),e.onBeforeUnmount(()=>{F.clearAll(),f.value&&w(f.value)});function R(we,Pe,Le,P,re,ne){h(we,Pe,Le,P,re,ne)}function H(we,Pe,Le,P,re,ne){T(we,Pe,Le,P,re,ne)}e.watch(()=>c.width,(we,Pe)=>{e.nextTick(()=>{F.emit("updateWidth",we),Pe===-1&&e.nextTick(()=>{d("layout-ready",v.value)}),G()})}),e.watch(()=>[r.layout,r.layout.length],()=>{v.value=r.layout,O()}),e.watch(()=>r.colNum,we=>{F.emit("setColNum",we)}),e.watch(()=>r.rowHeight,we=>{F.emit("setRowHeight",we)}),e.watch(()=>r.isDraggable,we=>{F.emit("setDraggable",we)}),e.watch(()=>r.isResizable,we=>{F.emit("setResizable",we)}),e.watch(()=>r.isBounded,we=>{F.emit("setBounded",we)}),e.watch(()=>r.transformScale,we=>{F.emit("setTransformScale",we)}),e.watch(()=>r.responsive,we=>{we||(d("update:layout",c.originalLayout),F.emit("setColNum",r.colNum)),b()}),e.watch(()=>r.maxRows,we=>{F.emit("setMaxRows",we)}),e.watch([()=>r.margin,()=>r.margin[1]],G),e.provide($r,e.reactive({...e.toRefs(r),...e.toRefs(c),increaseItem:M,decreaseItem:ve})),e.provide(jr,F),l({state:c,getItem:K,resizeEvent:h,dragEvent:T,layoutUpdate:O});function M(we){x.set(we.i,we)}function ve(we){x.delete(we.i)}function K(we){return x.get(we)}function O(){if(!cn(v.value)&&!cn(c.originalLayout)){if(v.value.length!==c.originalLayout.length){const we=at(v.value,c.originalLayout);if(we.length>0)if(v.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(we);else{const Pe=new Set(we.map(Le=>Le.i));c.originalLayout=c.originalLayout.filter(Le=>!Pe.has(Le.i))}c.lastLayoutLength=v.value.length,Ae()}sa(v.value,r.verticalCompact),F.emit("updateWidth",c.width),G(),d("layout-updated",v.value)}}function G(){c.mergedStyle={height:_()}}function b(){f.value&&(c.width=f.value.offsetWidth),F.emit("resizeEvent")}function _(){if(!r.autoSize)return;const we=parseFloat(r.margin[1]);return lp(v.value)*(r.rowHeight+we)+we+"px"}let y;function T(we,Pe,Le,P,re,ne){let pe=Lo(v.value,Pe);cn(pe)&&(pe={h:0,w:0,x:0,y:0,i:""}),we==="dragstart"&&!r.verticalCompact&&(y=v.value.reduce((He,{i:ot,x:X,y:A})=>({...He,[ot]:{x:X,y:A}}),{})),we==="dragmove"||we==="dragstart"?(c.placeholder.i=Pe,c.placeholder.x=pe.x,c.placeholder.y=pe.y,c.placeholder.w=ne,c.placeholder.h=re,e.nextTick(()=>{c.isDragging=!0}),F.emit("updateWidth",c.width)):e.nextTick(()=>{c.isDragging=!1}),v.value=co(v.value,pe,Le,P,!0,r.preventCollision),r.restoreOnDrag?(pe.static=!0,sa(v.value,r.verticalCompact,y),pe.static=!1):sa(v.value,r.verticalCompact),F.emit("compact"),G(),we==="dragend"&&(y=void 0,d("layout-updated",v.value))}function h(we,Pe,Le,P,re,ne){let pe=Lo(v.value,Pe);cn(pe)&&(pe={h:0,w:0,x:0,y:0,i:""});let He;if(r.preventCollision){const ot=Kr(v.value,{...pe,w:ne,h:re}).filter(X=>X.i!==pe.i);if(He=ot.length>0,He){let X=1/0,A=1/0;ot.forEach(te=>{te.x>pe.x&&(X=Math.min(X,te.x)),te.y>pe.y&&(A=Math.min(A,te.y))}),Number.isFinite(X)&&(pe.w=X-pe.x),Number.isFinite(A)&&(pe.h=A-pe.y)}}He||(pe.w=ne,pe.h=re),we==="resizestart"||we==="resizemove"?(c.placeholder.i=Pe,c.placeholder.x=Le,c.placeholder.y=P,c.placeholder.w=pe.w,c.placeholder.h=pe.h,e.nextTick(()=>{c.isDragging=!0}),F.emit("updateWidth",c.width)):we&&e.nextTick(()=>{c.isDragging=!1}),r.responsive&&ce(),sa(v.value,r.verticalCompact),F.emit("compact"),G(),we==="resizeend"&&d("layout-updated",v.value)}function ce(){const we=yp(r.breakpoints,c.width);if(we===c.lastBreakpoint)return;const Pe=qr(we,r.cols);!cn(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=so(v.value));const Le=bp(c.originalLayout,c.layouts,r.breakpoints,we,c.lastBreakpoint,Pe,r.verticalCompact);c.layouts[we]=Le,c.lastBreakpoint!==we&&d("breakpoint-changed",we,Le),v.value=Le,d("update:layout",Le),c.lastBreakpoint=we,F.emit("setColNum",Pe)}function Ae(){c.layouts=Object.assign({},r.responsiveLayouts)}function at(we,Pe){const Le=new Set(Pe.map(pe=>pe.i)),P=new Set(we.map(pe=>pe.i)),re=we.filter(pe=>!Le.has(pe.i)),ne=Pe.filter(pe=>!P.has(pe.i));return re.concat(ne)}return(we,Pe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(c.mergedStyle)},[we.$slots.default?e.renderSlot(we.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,Le=>(e.openBlock(),e.createBlock(Ha,e.mergeProps({key:Le.i,ref_for:!0},Le),{default:e.withCtx(()=>[e.renderSlot(we.$slots,"item",{item:Le})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Ha,{class:"vgl-item--placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:c.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,c.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const rf={key:0,class:"item-view-group"},lf={key:0,class:"item-view-group"},sf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:l}){const s=V.useModelComp(xe.pinia),{isEdit:r}=xe.storeToRefs(s),d=l,c=a,x=e.computed(()=>c==null?void 0:c.children),v=e.computed(()=>{var R,H,M,ve;return((R=c==null?void 0:c.children)==null?void 0:R.length)>0&&((H=c==null?void 0:c.children)!=null&&H.every(K=>K==null?void 0:K.layout))?(ve=(M=c==null?void 0:c.children)==null?void 0:M[0])==null?void 0:ve.layout:"vertical"}),f=e.computed(()=>{var R,H;return((H=(R=c==null?void 0:c.children)==null?void 0:R[0])==null?void 0:H.isGridLayout)||!1}),C=e.ref((c==null?void 0:c.level)+1),w=R=>{d("rowClick",R)},F=(R,H)=>{d("routeUrl",R,H)};return(R,H)=>f.value?(e.openBlock(),e.createBlock(e.unref(al),{key:0,layout:x.value,"onUpdate:layout":H[0]||(H[0]=M=>x.value=M),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(M,ve)=>(e.openBlock(),e.createBlock(e.unref(Ha),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var K,O,G,b,_,y,T,h,ce,Ae,at,we,Pe;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ve===((K=c==null?void 0:c.children)==null?void 0:K.length)-1?"0px":"24px"})},[((G=(O=M==null?void 0:M.component)==null?void 0:O.comp)==null?void 0:G.toUpperCase())!=="TABLE"&&((b=M==null?void 0:M.component)!=null&&b.name)?(e.openBlock(),e.createElementBlock("div",rf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((_=M==null?void 0:M.component)==null?void 0:_.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ja)((y=M==null?void 0:M.component)==null?void 0:y.comp)),{pageLayout:v.value,config:{showIndex:(T=e.unref(Gt)[ve])==null?void 0:T.showIndex,allowMove:(h=e.unref(Gt)[ve])==null?void 0:h.allowMove,viewport:(ce=e.unref(Gt)[ve])==null?void 0:ce.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(Ar),itemData:(Ae=M==null?void 0:M.component)==null?void 0:Ae.compData,childItemData:(at=M==null?void 0:M.component)==null?void 0:at.itemChildData,key:e.unref(fa),cacheNewData:e.unref(Nr),onChange:e.unref(Ua),index:(M==null?void 0:M.id)??ve,onContentChange:e.unref(Ka),onPageChange:e.unref(Wa),parentTableId:(we=M==null?void 0:M.component)==null?void 0:we.tableId,allMapContents:e.unref(io),children:(Pe=M==null?void 0:M.component)==null?void 0:Pe.children,level:C.value,onRowClick:w,onRouteUrl:F,onClickTrigger:e.unref(Vr),onClickMainKey:e.unref(Or)},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(c==null?void 0:c.children,(M,ve)=>{var K,O;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ve)===((K=c==null?void 0:c.children)==null?void 0:K.length)-1?"0px":"24px"})},[((O=M==null?void 0:M.comp)==null?void 0:O.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",lf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ja)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(fa),onChange:e.unref(Ua),index:(M==null?void 0:M.id)??ve,onContentChange:e.unref(Ka),onPageChange:e.unref(Wa),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(io),children:M==null?void 0:M.children,level:C.value,onRowClick:w,onRouteUrl:F},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),cf=Rt._export_sfc(sf,[["__scopeId","data-v-e672653d"]]),ol=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"}]),uf={TABLE:ba.ssTable,FORM:Bo,TABLEOPERATE:ps,TABLESTYLE:Ts,TABLEEXTEND:Is,TABLEINTERACTION:Vs,FORMOPERATE:Io,FOLD:cc,CALCULATOR:vc,METHODBUTTON:yc,AVATARUPLOAD:Eo.ssAvatar,SIGNATURE:Eo.ssSignature,FORMTOP:Bo,STEP:Ic,STEPOPERATE:ec,TIMELINE:zc,TIMELINEOPERATE:lc,FORMTOPOPERATE:Io,SIGNATUREOPERATE:Sc,AVATARUPLOADOPERATE:xc,TABS:Pc,TABSOPERATE:Du,CHART:Ru,CHARTOPERATE:Xu,LAYOUT:Wd,LAYOUTOPERATE:ep,PARENTITEM:cf};function aa(a){return uf[a==null?void 0:a.toUpperCase()]||null}exports.De=al;exports._sfc_main=wr;exports.activeStepInfo=ca;exports.affixItems=Ad;exports.allMapContents=io;exports.analyzeSplitToContent=fo;exports.analyzerStringToArray=Yu;exports.cacheNewData=Nr;exports.clickMainKey=Or;exports.clickSavePage=Nd;exports.clickStep=zr;exports.clickTrigger=Vr;exports.compId=fa;exports.compNames=Ar;exports.compShow=$a;exports.existLayouts=zd;exports.generateLayouts=Ds;exports.getComponent=aa;exports.getComponents=ja;exports.getSliceContLength=Ld;exports.gridRowHeight=bs;exports.isStepLayout=Fr;exports.onBack=Td;exports.onChange=Ua;exports.onClick=Id;exports.onContentChange=Ka;exports.onExtendTaskEnd=Md;exports.onPageBack=Fd;exports.onPageChange=Wa;exports.onSelectFixContent=Sd;exports.prefixSum=Zu;exports.renderShowItems=Br;exports.same=Ju;exports.setComponent=Er;exports.showItems=Gt;exports.sliceTableLength=Ir;exports.slotContent=ol;exports.ssMenu=La;exports.st=Ha;exports.stepItems=$d;exports.toolBar=ka;exports.verifyButton=Rd;