ss-component-new 1.3.21 → 1.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MTLLoader-YtHulNzU.cjs → MTLLoader-C_XCtjSi.cjs} +1 -1
- package/dist/{MTLLoader-CBRDqlja.js → MTLLoader-YR-bfx1D.js} +24 -24
- package/dist/{OrbitControls-CKR1ruPg.js → OrbitControls-BGsXD_A7.js} +1 -1
- package/dist/{OrbitControls-Bwzpfq8_.cjs → OrbitControls-CktvE4iE.cjs} +1 -1
- package/dist/{URDFLoader-DIvTWPgk.cjs → URDFLoader-10oVp_KW.cjs} +1 -1
- package/dist/{URDFLoader-D-0fnLWu.js → URDFLoader-m1gMdnSQ.js} +189 -189
- package/dist/{animationData-BBVNOO1d.js → animationData-CpK8d_Vm.js} +19 -19
- package/dist/{animationData-krmt7b15.cjs → animationData-Cr2ra7rm.cjs} +1 -1
- package/dist/{array-AvrqnNoJ.js → array-BmfCVZvi.js} +46 -46
- package/dist/{array-CMW4ey7w.cjs → array-COho2hZW.cjs} +1 -1
- package/dist/{iconfont-CSj9Ypb0.js → iconfont-0yJB130V.js} +29 -29
- package/dist/{iconfont-CUPzGSlt.cjs → iconfont-DsF7kuG5.cjs} +1 -1
- package/dist/{index-VF71yUkZ.js → index-5YbplPvi.js} +2 -2
- package/dist/{index-I09e-7nF.js → index-76YbJdM8.js} +2 -2
- package/dist/{index-BWb8IVmh.js → index-98Ogvz1v.js} +7 -7
- package/dist/{index-B7VKjUP4.cjs → index-B4LIBl-a.cjs} +1 -1
- package/dist/{index-NB4ig2Zg.js → index-B52TVCSg.js} +8 -8
- package/dist/{index-B1Zztqcr.cjs → index-BEBJWYp0.cjs} +1 -1
- package/dist/{index-Dx5UzB8t.js → index-BHjvJiFA.js} +5 -5
- package/dist/{index-BLxE_tkf.cjs → index-BJPBBWWH.cjs} +1 -1
- package/dist/{index-DEF8zy07.js → index-BLcFvu4u.js} +3 -3
- package/dist/{index-BPstNH4r.cjs → index-BPlHuTxE.cjs} +4 -4
- package/dist/index-BPu9kWR3.js +11883 -0
- package/dist/{index-snyYrfwK.cjs → index-BRJ1_Tfi.cjs} +1 -1
- package/dist/{index-vCTVD7cV.cjs → index-BWCv7zxy.cjs} +1 -1
- package/dist/{index-DWfxnemZ.js → index-BXUByyre.js} +2 -2
- package/dist/{index-DUt_5IeJ.js → index-Bnp6YMyE.js} +1461 -1455
- package/dist/{index-CGrJyKvT.cjs → index-BxMPyw-Y.cjs} +1 -1
- package/dist/{index-DWm4nu2G.cjs → index-CBqGrYej.cjs} +1 -1
- package/dist/{index-Dm67w52u.cjs → index-CC9drriV.cjs} +1 -1
- package/dist/{index-sMsCzNtW.js → index-COQpDVsv.js} +1570 -1535
- package/dist/{index-C4Ohl9vT.js → index-CRbfwrdV.js} +41 -41
- package/dist/{index-CuvQZsbE.cjs → index-CVXrjDFh.cjs} +1 -1
- package/dist/{index-CEzEaG0d.js → index-CXiOVgoz.js} +1 -1
- package/dist/{index-BzGHYxs2.cjs → index-CbBY3TG6.cjs} +1 -1
- package/dist/{index-DuGfBNM6.cjs → index-CgFSiyRX.cjs} +1 -1
- package/dist/{index-Cu-8pzHm.js → index-Chxt6xBv.js} +5 -5
- package/dist/{index-CIrXKpNl.cjs → index-Cjqg29ul.cjs} +1 -1
- package/dist/index-CpbBe_mV.cjs +1 -0
- package/dist/index-CuAHwR97.cjs +1 -0
- package/dist/{index-DHrb-D39.js → index-D-kqGA71.js} +7 -7
- package/dist/{index-euZWOilV.cjs → index-D3ixok8t.cjs} +1 -1
- package/dist/{index-D39AtL48.js → index-D8HD14bz.js} +1 -1
- package/dist/{index-DABBYx7H.js → index-DBh5Z73C.js} +1 -1
- package/dist/index-DIWralYr.js +67 -0
- package/dist/{index-C8fMwErX.cjs → index-DRTxe12U.cjs} +13 -13
- package/dist/{index-BFKUrR1o.cjs → index-DS-YTop9.cjs} +1 -1
- package/dist/{index-Cw4Pm2PQ.cjs → index-DU9e5EhS.cjs} +1 -1
- package/dist/{index-DN2waPoj.cjs → index-D_Yhv_HV.cjs} +1 -1
- package/dist/{index-d6tZBTSp.cjs → index-DaIE9uY1.cjs} +1 -1
- package/dist/{index-BT6DSXQW.js → index-Ddoq7kRQ.js} +9 -9
- package/dist/{index-CZKslfuq.js → index-Du1HuKYs.js} +2 -2
- package/dist/{index-Cxl9cpua.js → index-HgbCIoqo.js} +2 -2
- package/dist/index-MK7NdOmS.cjs +1 -0
- package/dist/{index-C7WQ1ky5.js → index-NaWMtdUV.js} +2 -2
- package/dist/{index-DTttfGgm.js → index-OX4hSXv6.js} +7 -7
- package/dist/{index-DXiGkaWi.cjs → index-TMUwtzAm.cjs} +1 -1
- package/dist/{index-DGRL8SEt.js → index-Va8AOLWi.js} +1 -1
- package/dist/{index-Bjsm8c8q.cjs → index-c4SVf22I.cjs} +1 -1
- package/dist/{index-CppJQDiT.js → index-gfdgTjvQ.js} +3 -3
- package/dist/{index-CEq2QX9L.js → index-nr6V1FzX.js} +7 -7
- package/dist/{index-ovqPs7X7.cjs → index-oMihgN5x.cjs} +1 -1
- package/dist/{index-DTuVgYze.cjs → index-r6HP72OA.cjs} +1 -1
- package/dist/{index-CBtxzh-u.js → index-tVVurbFz.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-n7J00Lcz.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-1pEFQ04s.js} +29074 -28413
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-ZMwIbmlN.cjs} +392 -382
- package/dist/{index.vue_vue_type_style_index_1_lang-DDedRKQj.cjs → index.vue_vue_type_style_index_1_lang--4T7j9qz.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-q8rMzh6x.js → index.vue_vue_type_style_index_1_lang-CNh42_ZH.js} +75 -75
- package/dist/{main-CmrBxQsF.cjs → main-BH4e9Of0.cjs} +1 -1
- package/dist/{main-ZLB6NnLd.js → main-DU0KTY9Z.js} +4 -4
- package/dist/{menuIndex-8RF_0N_y.cjs → menuIndex-D52EAwtb.cjs} +1 -1
- package/dist/{menuIndex-BwWrdu20.js → menuIndex-DYaogp2R.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-DpvPVwlN.js → threeModel-AsOY6mTs.js} +45 -45
- package/dist/{threeModel-D5UnPmV3.cjs → threeModel-rcCyHi_m.cjs} +1 -1
- package/dist/{threePreview-XQG7sQy9.js → threePreview-CkKl3frr.js} +125 -125
- package/dist/{threePreview-CBFQtSls.cjs → threePreview-DOD9HOZn.cjs} +1 -1
- package/dist/{threeSceneView-D97Sc8hd.cjs → threeSceneView-DZvOLWv6.cjs} +1 -1
- package/dist/{threeSceneView-CdZFIImJ.js → threeSceneView-DlL9pZlj.js} +38 -38
- package/dist/{threeSceneViewForCPMPIP-4Cjv1ZS4.cjs → threeSceneViewForCPMPIP-CZvKvfDx.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DH__ogKh.js → threeSceneViewForCPMPIP-DB0Eczbs.js} +8 -8
- package/dist/{threeTrackPathView-s17KavQX.cjs → threeTrackPathView-DgyAEYfV.cjs} +1 -1
- package/dist/{threeTrackPathView-BFQXaw-a.js → threeTrackPathView-Eb1bvUXJ.js} +78 -78
- package/dist/{threeViewerHost-C39tiQj-.cjs → threeViewerHost-BMU1tg9c.cjs} +1 -1
- package/dist/{threeViewerHost-BgPjA_94.js → threeViewerHost-Bdzv9iPb.js} +11 -11
- package/dist/{urdfTree-HdeBG5se.cjs → urdfTree-CoK2r17Y.cjs} +1 -1
- package/dist/{urdfTree-DM6uTeXj.js → urdfTree-hLtm0aFY.js} +10 -10
- package/dist/{workpieceTreePanel-C5qUdbmi.js → workpieceTreePanel-Ne_ACq86.js} +63 -63
- package/dist/{workpieceTreePanel-BKOHDm85.cjs → workpieceTreePanel-mWvCQyyw.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BteE57Nz.js +0 -103
- package/dist/index-C8FzkPpO.cjs +0 -1
- package/dist/index-CmctAnWR.cjs +0 -11
- package/dist/index-CsbDyIb2.cjs +0 -1
- package/dist/index-DdXtt1dh.js +0 -12544
package/dist/index-CmctAnWR.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";const xa=require("./index-DWm4nu2G.cjs"),e=require("vue"),D=require("./index-C8fMwErX.cjs"),It=require("./index-BPstNH4r.cjs"),rt=require("./index-C5pQXH0_.cjs"),Ve=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs"),Jt=require("./index-DN2waPoj.cjs"),To=require("./threeViewerHost-C39tiQj-.cjs");require("./index.vue_vue_type_style_index_1_lang-DDedRKQj.cjs");const Ft=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-Cdf6R00a.cjs"),Io=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),No=require("./index-Bjsm8c8q.cjs"),gl=require("./index-BVaHwt5f.cjs"),Kr=require("./index-CuvQZsbE.cjs"),Pn=require("./index-C8FzkPpO.cjs"),Wr=require("./index-BpPyaNFa.cjs"),Hr=require("vue-router"),ka=require("./index-9hspBVrQ.cjs"),qr=require("./menuIndex-8RF_0N_y.cjs");var Xr=/\s/;function Gr(a){for(var r=a.length;r--&&Xr.test(a.charAt(r)););return r}var Yr=/^\s+/;function Jr(a){return a&&a.slice(0,Gr(a)+1).replace(Yr,"")}var Ao=NaN,Zr=/^[-+]0x[0-9a-f]+$/i,Qr=/^0b[01]+$/i,ei=/^0o[0-7]+$/i,ti=parseInt;function Vo(a){if(typeof a=="number")return a;if(rt.isSymbol(a))return Ao;if(rt.isObject(a)){var r=typeof a.valueOf=="function"?a.valueOf():a;a=rt.isObject(r)?r+"":r}if(typeof a!="string")return a===0?a:+a;a=Jr(a);var i=Qr.test(a);return i||ei.test(a)?ti(a.slice(2),i?2:8):Zr.test(a)?Ao:+a}var no=function(){return rt.root.Date.now()},ni="Expected a function",ai=Math.max,oi=Math.min;function ml(a,r,i){var l,u,s,b,v,p,x=0,E=!1,O=!1,F=!0;if(typeof a!="function")throw new TypeError(ni);r=Vo(r)||0,rt.isObject(i)&&(E=!!i.leading,O="maxWait"in i,s=O?ai(Vo(i.maxWait)||0,r):s,F="trailing"in i?!!i.trailing:F);function W(w){var g=l,J=u;return l=u=void 0,x=w,b=a.apply(J,g),b}function N(w){return x=w,v=setTimeout(M,r),E?W(w):b}function pe(w){var g=w-p,J=w-x,Ee=r-g;return O?oi(Ee,s-J):Ee}function $(w){var g=w-p,J=w-x;return p===void 0||g>=r||g<0||O&&J>=s}function M(){var w=no();if($(w))return L(w);v=setTimeout(M,pe(w))}function L(w){return v=void 0,F&&l?W(w):(l=u=void 0,b)}function m(){v!==void 0&&clearTimeout(v),x=0,l=p=u=v=void 0}function C(){return v===void 0?b:L(no())}function h(){var w=no(),g=$(w);if(l=arguments,u=this,p=w,g){if(v===void 0)return N(p);if(O)return clearTimeout(v),v=setTimeout(M,r),W(p)}return v===void 0&&(v=setTimeout(M,r)),b}return h.cancel=m,h.flush=C,h}var li="[object Boolean]";function yl(a){return a===!0||a===!1||rt.isObjectLike(a)&&rt.baseGetTag(a)==li}function ri(a){return a===void 0}const ii={class:"statistics-cards-container"},si={class:"statistics-label"},ci={class:"statistics-value"},ui=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:u},[e.createElementVNode("div",si,e.toDisplayString(l==null?void 0:l.label),1),e.createElementVNode("div",ci,e.toDisplayString((l==null?void 0:l.value)??0),1)]))),128))]))}}),di=Ft._export_sfc(ui,[["__scopeId","data-v-d399b1f3"]]),pi={class:"form-content"},fi={title:"选择标签"},hi={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},vi={class:"col-operate-wrap"},gi={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},mi={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:r}){const i=()=>{b.value=!1,v.value=!1,p.value=[]},l=a;e.computed(()=>{var U;const A=(U=z.value)==null?void 0:U.split("/");return(A==null?void 0:A.some(q=>(q==null?void 0:q.includes("updateLoading"))||(q==null?void 0:q.includes("loading"))))?!1:R.value==="view"});const u=r,s=e.ref([]),b=e.ref(!1),v=e.ref(!1),p=e.ref([]),{getFileExtension:x}=To.useThreeSystem(),E=e.ref(),O=e.ref(!1),F=e.ref(!1),W=Ve.useUnit(D.pinia),{chooseTitle:N}=D.storeToRefs(W),pe=e.ref([]),$=e.ref(),M=e.ref(!1),L=e.ref([]),m=xa.useFormToTableComp(D.pinia),C=xa.useFormComp(D.pinia),h=e.ref(!1),w=e.ref(),g=D.useLoginState(D.pinia),{loginUserInfo:J}=D.storeToRefs(g),Ee=e.ref(),Qe=e.ref(!0),re=D.useModelComp(D.pinia),{tableViewContents:Be,itemData:Oe,isEdit:R,routeToChildPath:le,lockingPage:oe}=D.storeToRefs(re),fe=e.ref(null),$e=e.ref(!1),tt=e.ref(!1),X=D.useMenuState(),{activeMenuPath:z}=D.storeToRefs(X),ie=Ve.useOriginalState(D.pinia),{originalPath:Z}=D.storeToRefs(ie),ve=e.ref([]),we=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Ce=async A=>{tt.value=A,await ce("disabled",null,A,!0)},te=async A=>{await ce("operable",null,A,!0)};e.watch(()=>z.value,async()=>{s.value=[],p.value=[]},{deep:!0,immediate:!0});const ke=()=>{e.nextTick(()=>{Ae()})},T=A=>{var ae;s.value=(ae=s.value)==null?void 0:ae.map(U=>({...U,isFormColHidden:!(A!=null&&A.includes(U.label))}))};e.onUnmounted(()=>{fe.value=null});const Ge=A=>{u("clickTrigger",A)},Ye=async A=>{var ae,U,q,Te,ue,G;if(A===""){let ee="";(ae=s.value)==null||ae.forEach(xe=>{xe!=null&&xe.isMain&&(ee=xe==null?void 0:xe.value)});let he=await Ve.getItemData(le.value,sessionStorage.getItem("systemKey"),"");ee=((G=(ue=(Te=(q=(U=he==null?void 0:he[0])==null?void 0:U.compData)==null?void 0:q.find(xe=>(xe==null?void 0:xe.key)==="mainRouters"))==null?void 0:Te.contents)==null?void 0:ue[0])==null?void 0:G.routerContent)+Z.value+ee;let _e=await Ve.getItemData(ee,sessionStorage.getItem("systemKey"),"");M.value=!0,L.value=_e==null?void 0:_e.filter(xe=>(xe==null?void 0:xe.comp)!=="methodButton"),u("routeUrl",L.value)}},Ae=()=>{var ae;const A=(ae=fe.value)==null?void 0:ae.$el;A&&Ve.Sortable.create(A,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:U=>{const{oldIndex:q,newIndex:Te}=U;if(q===Te)return;const ue=s.value.splice(q,1)[0];s.value.splice(Te,0,ue)}})},ce=async(A,ae,U,q=!1)=>{try{re.setRefreshCurStructure(!1)}catch{rt.ElMessage.error("编辑处理失败")}},ne=async(A,ae)=>{await ce()},de=async(A,ae)=>{A&&await ce()},Se=async(A,ae,U)=>{await ce(ae,U,A,!1)},qe=(A,ae)=>{Ee.value===ae?Qe.value=!1:Qe.value=!0,Ee.value=ae==null?void 0:ae.changeProp},dt=async A=>{var U,q,Te,ue,G,ee,he,ye,_e,xe,K,Re,be,Ke,ot;let ae=[];if((U=A==null?void 0:A.toString())!=null&&U.includes(".urdf")){if(A.includes(",")){rt.ElMessage.error("当前版本仅允许单个urdf预览!");return}p.value=[{url:A,extension:x(A)}],v.value=!0,b.value=!0;return}if((q=A==null?void 0:A.toString())!=null&&q.includes(".stl")||(Te=A==null?void 0:A.toString())!=null&&Te.includes(".STL")||(ue=A==null?void 0:A.toString())!=null&&ue.includes(".obj")||(G=A==null?void 0:A.toString())!=null&&G.includes(".mtl")){const at=((ee=A==null?void 0:A.toString())==null?void 0:ee.split(",")).map(Ne=>({url:Ne,extension:x(Ne)}));p.value=at,v.value=!1,b.value=!0;return}if((he=A==null?void 0:A.toString())!=null&&he.includes(".stl")||(ye=A==null?void 0:A.toString())!=null&&ye.includes(".STL")||(_e=A==null?void 0:A.toString())!=null&&_e.includes(".obj")||(xe=A==null?void 0:A.toString())!=null&&xe.includes(".mtl")){let je,at=[],Ne={};if(Array.isArray(A)?je=A:je=A==null?void 0:A.split(","),je==null||je.forEach(gt=>{gt.includes(".mtl")?at.push(gt):Ne.blob=Ne.blob?Ne.blob+","+gt:gt}),(at==null?void 0:at.length)>0&&(Ne.mtlBlobs=at),(Re=(K=Object.values(Ne))==null?void 0:K[0])!=null&&Re.includes("http:"))ae.push(Ne);else{const gt=new Blob([Ne.blob],{type:"application/octet-stream;charset=UTF-8"});let et=URL.createObjectURL(gt),ze="";(be=A==null?void 0:A.split("/"))==null||be.forEach((it,mt)=>{var Je;mt===((Je=A==null?void 0:A.split("/"))==null?void 0:Je.length)-1&&(ze=it)}),(Ke=Ne.blob)!=null&&Ke.includes(".stl")&&(ze=(ze==null?void 0:ze.replaceAll(">",""))+".urdf"),$.value=[{name:ze,blobUrl:et}],F.value=!0}}else{const je=It.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),at=await rt.axios.get(A,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{je.close()}),Ne=new Blob([at.data],{type:"application/octet-stream;charset=UTF-8"});let gt=URL.createObjectURL(Ne),et="";(ot=A==null?void 0:A.split("/"))==null||ot.forEach((ze,it)=>{var mt;it===((mt=A==null?void 0:A.split("/"))==null?void 0:mt.length)-1&&(et=ze)}),$.value=[{name:et,blobUrl:gt}],F.value=!0}(ae==null?void 0:ae.length)>0&&C.setBlobUrls(ae)},y=()=>{F.value=!1},I=A=>{var ue,G,ee,he;const ae=(G=(ue=D.cloneDeep(l.itemData))==null?void 0:ue.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:G.contents,U=D.cloneDeep(A.content);let q={};U&&((ee=Object.values(U))==null?void 0:ee.length)>0&&((he=Object.values(U))==null||he.forEach((ye,_e)=>{q[ae[_e].key]=ye}));const Te={content:q,index:l==null?void 0:l.index,buttonName:A==null?void 0:A.buttonName};u("change",Te)},H=e.computed(()=>"http://222.92.178.198:62001"),Q=async A=>{var K,Re,be,Ke,ot,je,at,Ne,gt,et,ze,it,mt,Je,Ue,Nt;if(!A)return;(Re=(K=l==null?void 0:l.itemData)==null?void 0:K.find(Ie=>(Ie==null?void 0:Ie.key)==="parentFormPath"))==null||Re.contents;let ae=Be.value;(ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(Ie=>{var Fe,Ze,B,ge;let Xe=(Fe=Ie==null?void 0:Ie.key)==null?void 0:Fe.split("/");return(l==null?void 0:l.compName)===(Xe==null?void 0:Xe[0])&&(Ze=s.value)!=null&&Ze.find(We=>(We==null?void 0:We.prop)===(Xe==null?void 0:Xe[1]))&&(Ie.value=(ge=(B=s.value)==null?void 0:B.find(We=>(We==null?void 0:We.prop)===(Xe==null?void 0:Xe[1])))==null?void 0:ge.value),Ie}),re.setTableViewContents(ae));const U=D.cloneDeep(l.itemData);let q=U==null?void 0:U.map(Ie=>{var Xe;return(Ie==null?void 0:Ie.key)==="formContent"&&((Xe=Ie.contents)==null||Xe.map((Fe,Ze)=>{var B,ge,We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut,vt,zt,$t,Kt,qt,Qt;return Fe.type=(ge=(B=s.value)==null?void 0:B.find(Lt=>(Lt==null?void 0:Lt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:ge.type,Fe.options=Fe!=null&&Fe.options?Fe.options:((ut=(me=(We=Fe==null?void 0:Fe.key)==null?void 0:We.split("$"))==null?void 0:me[1])==null?void 0:ut.length)>0?(ct=(pt=xa.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(Lt=>({label:Lt,value:Lt})):[],(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=(Ut=s.value)==null?void 0:Ut.find(Lt=>(Lt==null?void 0:Lt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:vt.signature,Fe.isLoginUser=($t=(zt=s.value)==null?void 0:zt.find(Lt=>(Lt==null?void 0:Lt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:$t.isLoginUser,Fe.value=(Kt=Object.values(A))==null?void 0:Kt[Ze],Fe.isFormColHidden=(Qt=(qt=s.value)==null?void 0:qt.find(Lt=>(Lt==null?void 0:Lt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Qt.isFormColHidden,Fe})),Ie}),Te=s.value,ue=(Ke=(be=D.cloneDeep(q))==null?void 0:be.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Ke.contents;if(Te=Te==null?void 0:Te.map(Ie=>{var Xe;return Ie.value=(Xe=ue==null?void 0:ue.find((Fe,Ze)=>((Fe==null?void 0:Fe.id)??Ze)===(Ie==null?void 0:Ie.id)))==null?void 0:Xe.value,Ie}),!Qe.value){u("contentChange",{contents:q,index:l.index});return}let G="",ee=(at=(je=(ot=D.cloneDeep(q))==null?void 0:ot.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:je.contents)==null?void 0:at.find((Ie,Xe)=>{var Fe,Ze,B;return(Ie==null?void 0:Ie.label)===Ee.value||Xe.toString()===((B=(Ze=(Fe=Ee.value)==null?void 0:Fe.split("t"))==null?void 0:Ze[1])==null?void 0:B.toString())}),he=(Ne=ee==null?void 0:ee.optionUrl)==null?void 0:Ne.menuSelect,ye=!0;if((ze=(et=(gt=D.cloneDeep(q))==null?void 0:gt.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:et.contents)==null||ze.forEach(Ie=>{var Xe,Fe,Ze,B,ge,We;ye&&((Ze=(Fe=(Xe=Ie==null?void 0:Ie.optionUrl)==null?void 0:Xe.groupSelect)==null?void 0:Fe[1])!=null&&Ze.includes("["))&&(G=(ge=(B=Ie==null?void 0:Ie.optionUrl)==null?void 0:B.groupSelect)==null?void 0:ge[1],JSON.stringify(he)===JSON.stringify((We=Ie==null?void 0:Ie.optionUrl)==null?void 0:We.menuSelect)&&(ye=!1))}),(it=ee==null?void 0:ee.optionUrl)!=null&&it.menuSelect&&Qe.value){let Ie=await xa.getSelectRow(ee),Xe,Fe=(mt=ee==null?void 0:ee.optionUrl)==null?void 0:mt.menuSelect;if(Ie==null||Ie.forEach(Ze=>{var B,ge,We,me,ut,st,xt,pt,ct,ft;G===((ge=(B=ee==null?void 0:ee.optionUrl)==null?void 0:B.groupSelect)==null?void 0:ge[1])&&((ut=(me=(We=ee==null?void 0:ee.optionUrl)==null?void 0:We.groupSelect)==null?void 0:me[1])!=null&&ut.includes("["))&&((ft=D.cloneDeep(Ze))==null?void 0:ft[(ct=(pt=(xt=(st=ee==null?void 0:ee.optionUrl)==null?void 0:st.groupSelect)==null?void 0:xt[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(ee==null?void 0:ee.value)&&(Xe=Ze)}),Xe){let Ze=D.cloneDeep(Te);Ze=Ze==null?void 0:Ze.map(ge=>{var We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut;return(Xe!=null&&Xe[ge==null?void 0:ge.label]||Xe!=null&&Xe[(st=(ut=(me=(We=ge==null?void 0:ge.optionUrl)==null?void 0:We.groupSelect)==null?void 0:me[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])&&((ct=(pt=(xt=ge==null?void 0:ge.optionUrl)==null?void 0:xt.groupSelect)==null?void 0:pt[1])!=null&&ct.includes("["))&&Fe!=null&&Fe.every(vt=>{var zt,$t;return($t=(zt=ge==null?void 0:ge.optionUrl)==null?void 0:zt.menuSelect)==null?void 0:$t.includes(vt)})&&(ge.value=(Xe==null?void 0:Xe[ge==null?void 0:ge.label])||(Xe==null?void 0:Xe[(Ut=(Tt=(wt=(ft=ge==null?void 0:ge.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:wt[1])==null?void 0:Tt.replaceAll("[",""))==null?void 0:Ut.replaceAll("]","")]),Array.isArray(ge.value)&&ge.value.every(vt=>(vt==null?void 0:vt.url)&&(vt==null?void 0:vt.name))&&(ge.type="Upload")),ge}),Ze=Ze==null?void 0:Ze.map(ge=>{var We,me,ut;return(We=ge==null?void 0:ge.optionUrl)!=null&&We.oldMenuSelect&&(ge.optionUrl.menuSelect=(ut=(me=D.cloneDeep(ge))==null?void 0:me.optionUrl)==null?void 0:ut.oldMenuSelect),ge}),s.value=D.cloneDeep(Ze);let B=D.cloneDeep(Ze);B=B==null?void 0:B.map(ge=>{var We,me,ut,st,xt,pt;return(me=(We=ge==null?void 0:ge.optionUrl)==null?void 0:We.menuSelect)!=null&&me.some(ct=>ct==null?void 0:ct.includes("["))&&(ge.optionUrl.oldMenuSelect=(st=(ut=D.cloneDeep(ge))==null?void 0:ut.optionUrl)==null?void 0:st.menuSelect,ge.optionUrl.menuSelect=(pt=(xt=ge==null?void 0:ge.optionUrl)==null?void 0:xt.menuSelect)==null?void 0:pt.map(ct=>{var ft,wt,Tt,Ut;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=(Ut=(Tt=D.cloneDeep(Ze))==null?void 0:Tt.find(zt=>(zt==null?void 0:zt.label)===vt))==null?void 0:Ut.value}return ct})),ge}),s.value=B}else s.value=Te;q=q==null?void 0:q.map(Ze=>{var B;return(Ze==null?void 0:Ze.key)==="formContent"&&(Ze.contents=(B=Ze.contents)==null?void 0:B.map(ge=>{var We,me,ut,st;return ge.value=((me=(We=s.value)==null?void 0:We.find(xt=>(xt==null?void 0:xt.label)===(ge==null?void 0:ge.key)))==null?void 0:me.value)??(ge==null?void 0:ge.value),ge.type=((st=(ut=s.value)==null?void 0:ut.find(xt=>(xt==null?void 0:xt.prop)===(ge==null?void 0:ge.key)))==null?void 0:st.type)??(ge==null?void 0:ge.type),ge})),Ze})}Qe.value=!1,u("contentChange",{contents:q,index:l.index});let _e=[],xe=[];if((Ue=D.cloneDeep((Je=q==null?void 0:q.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Je.contents))==null||Ue.forEach(Ie=>{var Xe;Array.isArray(Ie==null?void 0:Ie.value)&&((Xe=Ie==null?void 0:Ie.value)!=null&&Xe.find(Fe=>{var Ze;return(Ze=Fe==null?void 0:Fe.url)==null?void 0:Ze.includes(".obj")}))&&(xe=Ie==null?void 0:Ie.value)}),(xe==null?void 0:xe.length)>0){const Ie=(Nt=D.cloneDeep(xe))==null?void 0:Nt.filter(Xe=>{var Fe;return(Fe=Xe==null?void 0:Xe.url)==null?void 0:Fe.includes(".obj")});Ie==null||Ie.forEach(Xe=>{var Ze,B,ge,We;const Fe=(Ze=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Xe==null?void 0:Xe.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:Ze.map(me=>me==null?void 0:me.url);_e.push({objUrl:Xe==null?void 0:Xe.url,mtlUrls:((B=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Xe==null?void 0:Xe.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:B.length)===1?(We=(ge=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Xe==null?void 0:Xe.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:ge[0])==null?void 0:We.url:Fe})}),C.setObjUrl(_e)}},S=A=>{if(!A)return;const ae=[];let U="";for(let q of A)(q.includes("[")||U.includes("["))&&(U+=q.trim(),D.cloneDeep(U).split("【").length-1===D.cloneDeep(U).split("】").length-1&&D.cloneDeep(U).split("[").length-1===D.cloneDeep(U).split("]").length-1&&(ae.push(U.replace(/\/\*[\s\S]*?\*\//g,"")),U=""));return ae},se=(A,ae,U)=>{let q="";const Te=ae==null?void 0:ae.map(ue=>{var G;return(G=ue==null?void 0:ue.value)==null?void 0:G.pageData});return Te==null||Te.forEach(ue=>{var G;(ue==null?void 0:ue.name)===(A==null?void 0:A[0])&&((G=ue==null?void 0:ue.compData)==null||G.forEach(ee=>{var he;(ee==null?void 0:ee.key)==="formContent"&&((he=ee==null?void 0:ee.contents)==null||he.forEach(ye=>{var _e;(ye==null?void 0:ye.prop)===(A==null?void 0:A[1])&&(q=(ye==null?void 0:ye.value)===""?Ve.judgeContents((_e=D.cloneDeep(ye))==null?void 0:_e.optionUrl,U):ye==null?void 0:ye.value)}))}))}),q},Me=(A,ae,U,q)=>{var ee,he;let Te="",ue="";(ee=D.cloneDeep(ae))==null||ee.forEach((ye,_e)=>{ye!=null&&ye.includes("[")?ue=ue+Z.value+A[_e]:ue=ue===""?ue+ye:ue+"/"+ye});let G=(he=q[ue])==null?void 0:he.map(ye=>{var _e;return(_e=ye==null?void 0:ye.value)==null?void 0:_e.pageData});return G==null||G.forEach(ye=>{var _e;(ye==null?void 0:ye.name)===(U==null?void 0:U[0])&&((_e=ye==null?void 0:ye.compData)==null||_e.forEach(xe=>{var K;(xe==null?void 0:xe.key)==="formContent"&&((K=xe==null?void 0:xe.contents)==null||K.forEach(Re=>{(Re==null?void 0:Re.prop)===(U==null?void 0:U[1])&&(Te=Re==null?void 0:Re.value)}))}))}),Te};return e.watch(()=>l.itemData,async()=>{var G,ee,he,ye,_e,xe,K,Re,be,Ke,ot,je,at,Ne,gt,et,ze,it,mt;const A=(G=l.itemData)==null?void 0:G.find(Je=>(Je==null?void 0:Je.key)==="formContent"),ae=(ee=D.cloneDeep(l.itemData))==null?void 0:ee.find(Je=>(Je==null?void 0:Je.key)==="formButton"),U=(he=D.cloneDeep(l.itemData))==null?void 0:he.find(Je=>(Je==null?void 0:Je.key)==="formFlex"),q=(ye=D.cloneDeep(l.itemData))==null?void 0:ye.find(Je=>(Je==null?void 0:Je.key)==="formWrap"),Te=(_e=D.cloneDeep(l.itemData))==null?void 0:_e.find(Je=>(Je==null?void 0:Je.key)==="enableWrap");if((q==null?void 0:q.contents)==="纵向"?O.value=!1:O.value=!0,h.value=(Te==null?void 0:Te.contents)===void 0?!1:Te==null?void 0:Te.contents,w.value=typeof(U==null?void 0:U.contents)!="boolean"?!(!(U!=null&&U.contents)===""||((xe=U==null?void 0:U.contents)==null?void 0:xe.toUpperCase())==="VERTICAL"):U==null?void 0:U.contents,((K=A==null?void 0:A.contents)==null?void 0:K.length)>0&&Array.isArray(A==null?void 0:A.contents)){let Je=l.allMapContents;const Ue=(be=(Re=D.cloneDeep(A))==null?void 0:Re.contents)==null?void 0:be.map((B,ge)=>{var vt,zt,$t,Kt,qt,Qt,Lt,Tn,Fn,kn,Ln,xn,$n,jn,Un,Kn,Wn,Bn,mn,dn,wn,yn,on,hn,Hn,In,Nn,Dn,qn,Xn,An,Gn,Yn;let We=(B==null?void 0:B.label)??(B==null?void 0:B.key)??"",me=(B==null?void 0:B.type)??"",ut=(B==null?void 0:B.options)??[];if((vt=B==null?void 0:B.key)!=null&&vt.includes("$")&&(We=(zt=D.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:zt[0],((Kt=($t=D.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:$t[1])==null?void 0:Kt.length)>0)){const[Et,Zt]=(Qt=(qt=D.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:qt[1])==null?void 0:Qt.split(/[()]/);me=((Lt=Ve.FormType.find(yt=>(yt==null?void 0:yt.key)===Et))==null?void 0:Lt.value)??"",((Tn=Zt==null?void 0:Zt.split(","))==null?void 0:Tn.length)>0&&(ut=(Fn=Zt==null?void 0:Zt.split(","))==null?void 0:Fn.map(yt=>({label:yt,value:yt})))}let st=[];B!=null&&B.contents&&!Array.isArray(B==null?void 0:B.contents)&&(st=(Ln=(kn=B==null?void 0:B.contents)==null?void 0:kn.split(","))==null?void 0:Ln.map(Et=>({label:Et,value:Et}))),((xn=B==null?void 0:B.optionUrl)==null?void 0:xn.selectRelateType)==="自定义绑定"&&(st=(jn=($n=B==null?void 0:B.optionUrl)==null?void 0:$n.defaultSelect)==null?void 0:jn.map(Et=>({label:Et,value:Et})));let xt=!1,pt=(B==null?void 0:B.isFormColHidden)??!1,ct=Ve.judgeContents((Un=D.cloneDeep(B))==null?void 0:Un.optionUrl,Je),ft=ct!==void 0&&ct!==""?ct:B!=null&&B.originalContent&&(B==null?void 0:B.originalContent)!==""?B.originalContent:B!=null&&B.value?B.value:(ut==null?void 0:ut.length)>0?(Kn=ut==null?void 0:ut[0])==null?void 0:Kn.value:(B==null?void 0:B.value)??"",wt=!1,Tt=ct!==void 0||me===""?"Input":me;if((Array.isArray(ct)&&(ct!=null&&ct.every(Et=>(Et==null?void 0:Et.name)&&(Et==null?void 0:Et.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(Et=>(Et==null?void 0:Et.name)&&(Et==null?void 0:Et.url))))&&(Tt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||B!=null&&B.isLoginUser)xt=!0,ft=((Wn=J.value)==null?void 0:Wn.姓名)||((Bn=J.value)==null?void 0:Bn.account)||((mn=J.value)==null?void 0:mn.账号)||((dn=J.value)==null?void 0:dn.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||B!=null&&B.signature||B!=null&&B.isShow)if(wt=!0,(B==null?void 0:B.isShow)==="originalSignature")Tt="image",ft=H.value+"/"+((wn=J.value)==null?void 0:wn.signature);else{let Et=[...new Set(S(B.isShow))].map(bt=>{var _t,Dt,Rt,Ot;return{key:(Ot=(Rt=(Dt=(_t=bt==null?void 0:bt.split("["))==null?void 0:_t[1])==null?void 0:Dt.split("]"))==null?void 0:Rt[0])==null?void 0:Ot.split(":"),value:""}});(yn=Oe.value)==null||yn.forEach(bt=>{Et==null||Et.forEach((Wt,_t)=>{var Rt;let Dt=Wt==null?void 0:Wt.key;(bt==null?void 0:bt.name)===(Dt==null?void 0:Dt[0].replaceAll("'",""))&&((Rt=bt==null?void 0:bt.compData)==null||Rt.forEach(Ot=>{var Pt;(Ot==null?void 0:Ot.key)==="formContent"&&((Pt=Ot==null?void 0:Ot.contents)==null||Pt.forEach(Xt=>{(Xt==null?void 0:Xt.prop)===(Dt==null?void 0:Dt[1].replaceAll("'",""))&&(Et[_t].value=Xt==null?void 0:Xt.value)}))}))})});let Zt=Et==null?void 0:Et.map(bt=>{var Wt;return bt.key="["+((Wt=bt.key)==null?void 0:Wt.join(":"))+"]",bt}),yt=B==null?void 0:B.isShow;Zt==null||Zt.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=((on=yt==null?void 0:yt.split("==="))==null?void 0:on[0])+"==='"+((hn=yt==null?void 0:yt.split("==="))==null?void 0:hn[1])+"'":yt=((Hn=yt==null?void 0:yt.split("="))==null?void 0:Hn[0])+"='"+((In=yt==null?void 0:yt.split("="))==null?void 0:In[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=H.value+"/"+((Nn=J.value)==null?void 0:Nn.signature)):ft=""}return Array.isArray(ft)&&ft.every(Et=>(Et==null?void 0:Et.url)&&(Et==null?void 0:Et.name))&&(B.type="Upload"),B!=null&&B.isMainUrl&&(Tt="Url"),{label:We??"",name:"t"+ge,prop:D.cloneDeep(B==null?void 0:B.key),type:Tt,value:B!=null&&B.isSync?((qn=(Dn=N.value)==null?void 0:Dn[0])==null?void 0:qn.value)??((Yn=(Xn=z==null?void 0:z.value)==null?void 0:Xn.split("/"))==null?void 0:Yn[((Gn=(An=z==null?void 0:z.value)==null?void 0:An.split("/"))==null?void 0:Gn.length)-1]):B!=null&&B.isNewDate&&ft===""?new Date:ft,id:(B==null?void 0:B.id)??ge,contents:(st==null?void 0:st.length)>0?st:ut??[],width:(B==null?void 0:B.width)??1,isLoginUser:xt,config:B==null?void 0:B.config,optionUrl:(B==null?void 0:B.optionUrl)??B,isFormColHidden:pt,signature:wt,isMain:B==null?void 0:B.isMain,isMainUrl:B==null?void 0:B.isMainUrl,operable:(B==null?void 0:B.operable)??!1,disabled:(B==null?void 0:B.disabled)??!1,isSync:B==null?void 0:B.isSync}}),Nt=Ue==null?void 0:Ue.map(B=>B==null?void 0:B.value);let Ie="";Nt==null||Nt.forEach(B=>{B!==""&&B!==void 0&&(Ie=Ie===""?B:Ie+"/"+B)}),m.setSelectArray(Nt),m.setSelectString(Ie);let Xe=(Ke=D.cloneDeep(Ue))==null?void 0:Ke.map(B=>(B!=null&&B.value&&Ve.IsJson(B==null?void 0:B.value)&&Array.isArray(JSON.parse(B==null?void 0:B.value))&&(B.value=JSON.parse(B.value)),B));Xe=Xe==null?void 0:Xe.map(B=>{var ge,We,me,ut,st,xt,pt,ct;if((We=(ge=B==null?void 0:B.optionUrl)==null?void 0:ge.menuSelect)!=null&&We.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";B.optionUrl.oldMenuSelect=(ut=(me=D.cloneDeep(B))==null?void 0:me.optionUrl)==null?void 0:ut.menuSelect,B.optionUrl.menuSelect=(xt=(st=B==null?void 0:B.optionUrl)==null?void 0:st.menuSelect)==null?void 0:xt.map(wt=>{var Tt,Ut,vt,zt,$t,Kt;if(wt!=null&&wt.includes("[")){let qt=(Ut=(Tt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Tt.split(":"))==null?void 0:Ut[1];ft=se((vt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"),Je==null?void 0:Je[z.value],Je),wt=(($t=(zt=D.cloneDeep(Xe))==null?void 0:zt.find(Qt=>(Qt==null?void 0:Qt.label)===qt))==null?void 0:$t.value)||se((Kt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Kt.split(":"),Je==null?void 0:Je[z.value],Je)}return wt}),ft!==""&&B.value===""&&(B.value=Me(B.optionUrl.menuSelect,B.optionUrl.oldMenuSelect,(pt=B==null?void 0:B.optionUrl)==null?void 0:pt.groupSelect,Je),Array.isArray(B.value)&&((ct=B.value)!=null&&ct.every(wt=>wt==null?void 0:wt.url))&&(B.type="UPLOAD"))}return B}),s.value=Xe,tt.value=((ot=s.value)==null?void 0:ot.every(B=>B==null?void 0:B.disabled))||oe.value===z.value,$e.value=(je=s.value)==null?void 0:je.every(B=>B==null?void 0:B.operable),ve.value=(at=s.value)==null?void 0:at.map(B=>B==null?void 0:B.label);let Fe=[],Ze=[];if((Ne=D.cloneDeep(s.value))==null||Ne.forEach(B=>{var ge;Array.isArray(B==null?void 0:B.value)&&((ge=B==null?void 0:B.value)!=null&&ge.find(We=>{var me;return(me=We==null?void 0:We.url)==null?void 0:me.includes(".obj")}))&&(Ze=B==null?void 0:B.value)}),(Ze==null?void 0:Ze.length)>0){const B=(gt=D.cloneDeep(Ze))==null?void 0:gt.filter(ge=>{var We;return(We=ge==null?void 0:ge.url)==null?void 0:We.includes(".obj")});B==null||B.forEach(ge=>{var me,ut,st,xt;const We=(me=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(ge==null?void 0:ge.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:me.map(pt=>pt==null?void 0:pt.url);Fe.push({objUrl:ge==null?void 0:ge.url,mtlUrls:((ut=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(ge==null?void 0:ge.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)===(ge==null?void 0:ge.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:st[0])==null?void 0:xt.url:We})}),C.setObjUrl(Fe)}(et=D.cloneDeep(s.value))==null||et.forEach(B=>{var ge,We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut,vt;if((We=(ge=B==null?void 0:B.value)==null?void 0:ge.toString())!=null&&We.includes(".stl")||(ut=(me=B==null?void 0:B.value)==null?void 0:me.toString())!=null&&ut.includes(".STL")||(xt=(st=B==null?void 0:B.value)==null?void 0:st.toString())!=null&&xt.includes(".obj")||(ct=(pt=B==null?void 0:B.value)==null?void 0:pt.toString())!=null&&ct.includes(".mtl")||(wt=(ft=B==null?void 0:B.value)==null?void 0:ft.toString())!=null&&wt.includes(".urdf")){let zt={},$t=[],Kt;Array.isArray(B==null?void 0:B.value)?Kt=B==null?void 0:B.value:Kt=(Tt=B==null?void 0:B.value)==null?void 0:Tt.split(","),Kt==null||Kt.forEach(qt=>{qt.includes(".mtl")?$t.push(qt):zt.blob=zt.blob==="undefined"?qt:zt.blob+","+qt}),($t==null?void 0:$t.length)>0&&(zt.mtlBlobs=$t),(vt=(Ut=Object.values(zt))==null?void 0:Ut[0])!=null&&vt.includes("http:")}})}else s.value=[];let ue=Be.value;if((ue==null?void 0:ue.length)>0&&(ue=ue==null?void 0:ue.map(Je=>{var Nt,Ie,Xe,Fe;let Ue=(Nt=Je==null?void 0:Je.key)==null?void 0:Nt.split("/");return(l==null?void 0:l.compName)===(Ue==null?void 0:Ue[0])&&(Ie=s.value)!=null&&Ie.find(Ze=>(Ze==null?void 0:Ze.prop)===(Ue==null?void 0:Ue[1]))&&(Je.value=(Fe=(Xe=s.value)==null?void 0:Xe.find(Ze=>(Ze==null?void 0:Ze.prop)===(Ue==null?void 0:Ue[1])))==null?void 0:Fe.value),Je}),re.setTableViewContents(ue)),l!=null&&l.formRules)E.value=l==null?void 0:l.formRules;else{let Je={};(ze=D.cloneDeep(s).value)==null||ze.forEach(Ue=>{(Ue==null?void 0:Ue.isMain)===!0&&(Je[(Ue==null?void 0:Ue.prop)??(Ue==null?void 0:Ue.name)]=[{required:!0,message:`${(Ue==null?void 0:Ue.prop)||(Ue==null?void 0:Ue.name)}不能为空`}])}),E.value=Je}if(((it=ae==null?void 0:ae.contents)==null?void 0:it.length)>0){const Je=[];(mt=ae==null?void 0:ae.contents)==null||mt.forEach((Ue,Nt)=>{(Ue==null?void 0:Ue.label)!==""&&Je.push({label:(Ue==null?void 0:Ue.label)??"",id:(Ue==null?void 0:Ue.id)??Nt,type:(Ue==null?void 0:Ue.type)??"",background:Ue==null?void 0:Ue.background})}),pe.value=Je}else pe.value=[]},{deep:!0,immediate:!0}),e.watch(()=>oe.value,A=>{tt.value=A===z.value},{immediate:!0}),(A,ae)=>{var ee,he;const U=e.resolveComponent("svg-icon"),q=e.resolveComponent("el-switch"),Te=e.resolveComponent("el-checkbox"),ue=e.resolveComponent("el-popover"),G=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",pi,[h.value===!1?(e.openBlock(),e.createBlock(di,{key:0,items:(he=(ee=s.value)==null?void 0:ee.filter(ye=>!(ye!=null&&ye.isFormColHidden)))==null?void 0:he.map(ye=>({label:ye==null?void 0:ye.label,value:ye==null?void 0:ye.value}))},null,8,["items"])):(e.openBlock(),e.createBlock(It.ssForm,{key:1,rowContents:s.value,formRules:E.value,buttonValue:pe.value,isRowFlex:!1,isEnableWrap:h.value,onOnButtonClick:I,onChange:Q,formDisabled:tt.value,formLabelsOperable:$e.value,isButtonRow:O.value,onPreview:dt,onBlurChange:qe,onHandleColEditChange:ne,onHandleColTypeChange:de,onRouteUrl:Ye,onClickTrigger:Ge},{operateCol:e.withCtx(({renderColumns:ye,formDisabled:_e,formLabelsOperable:xe})=>[e.createVNode(ue,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:ke},{reference:e.withCtx(()=>[e.createElementVNode("span",fi,[e.createVNode(U,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",hi,[ae[1]||(ae[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(q,{"model-value":_e,"active-text":"禁用","inactive-text":"",onChange:Ce,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(q,{"model-value":xe,"active-text":"编辑所有标签","inactive-text":"",onChange:te},null,8,["model-value"]),ae[2]||(ae[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(G,{modelValue:ve.value,"onUpdate:modelValue":ae[0]||(ae[0]=K=>ve.value=K),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:fe,onChange:T},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye,K=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:K.label},[e.createVNode(Te,{value:K.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(K.label),1)]),_:2},1032,["value"]),e.createVNode(ue,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(U,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Re;return[e.createElementVNode("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Re=Object.keys(K))==null?void 0:Re.filter(be=>{var Ke;return(Ke=we.value)==null?void 0:Ke.find(ot=>(ot==null?void 0:ot.value)===be)}),be=>{var Ke,ot;return e.openBlock(),e.createElementBlock("div",{key:be},[e.createVNode(It._sfc_main$1,{value:K==null?void 0:K[be],"active-text":(ot=(Ke=we.value)==null?void 0:Ke.find(je=>(je==null?void 0:je.value)===be))==null?void 0:ot.label,inactiveText:"",onChange:je=>Se(je,be,K)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",gi,[e.createVNode(U,{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"])),F.value?(e.openBlock(),e.createBlock(It.ssFilePreview,{key:2,fileDataList:$.value,onDestroy:y},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Jt.ssDialog,{key:3,visible:b.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(To.ThreeViewerHost,{files:p.value,onGetAnimationData:A.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Oo=Ft._export_sfc(mi,[["__scopeId","data-v-8040f4ad"]]),$a=e.ref(0),bl=a=>{var r;return!a||(a==null?void 0:a.length)===0?[]:(r=D.cloneDeep(a))==null?void 0:r.map(l=>($a.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??$a.value,children:bl(l==null?void 0:l.children)},l))},yi=a=>{var i;return(i=D.cloneDeep(a))==null?void 0:i.map(l=>($a.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??$a.value,children:bl(l==null?void 0:l.children)},l))},kl=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===r)?(i=D.cloneDeep(a))==null?void 0:i.filter(u=>(u==null?void 0:u.id)!==r):(a=a==null?void 0:a.map(l=>(l.children=kl(l==null?void 0:l.children,r),l)),a)},xl=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=D.cloneDeep(a))==null?void 0:i.map(u=>((u==null?void 0:u.id)===(r==null?void 0:r.id)&&(u=r),u)):(a=a==null?void 0:a.map(l=>(l.children=xl(l==null?void 0:l.children,r),l)),a)},wl=(a,r)=>{var i;return a!=null&&a.find(l=>{var u;return(l==null?void 0:l.id)===((u=r==null?void 0:r.contents)==null?void 0:u.id)})?(i=D.cloneDeep(a))==null?void 0:i.map(u=>{var s;return(u==null?void 0:u.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)&&(u=r==null?void 0:r.contents),u}):(a=a==null?void 0:a.map(l=>(l.children=wl(l==null?void 0:l.children,r),l)),a)},Dl=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=D.cloneDeep(a))==null?void 0:i.map(u=>((u==null?void 0:u.id)===(r==null?void 0:r.id)&&(u!=null&&u.children||(u.children=[]),u.children.push(r.contents)),u)):(a=a==null?void 0:a.map(l=>(l.children=Dl(l==null?void 0:l.children,r),l)),a)},Vt=[{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"}],bi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ki=[{label:"新增",value:"add"}],En=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ki},{key:"background",label:"按钮背景色",type:"Color"}],Cn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:bi},{key:"textColor",label:"按钮颜色",type:"Color"}],xi={class:"table-header-child"},wi={class:"table-header-child-main"},Di={class:"table-header-child-content"},_i={class:"table-header-child-content-item"},Ei={class:"fix-button"},Ci={key:0},Si={class:"form-content"},Ti={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:r}){const i=a,l=r,u=e.ref(!1),s=e.ref(""),b=Ve.useTableComp(D.pinia),{tableIndex:v}=D.storeToRefs(b);e.ref(0);const p=e.ref(""),x=e.ref([]),E=e.ref([]),O=m=>{var h;u.value=!0;let C=[];Vt==null||Vt.forEach(w=>{let g=D.cloneDeep(v.value)+1;b.setTableIndex(g),C.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:m[w.key],id:v.value,contents:w==null?void 0:w.options})}),m!=null&&m.children&&((h=m==null?void 0:m.children)==null?void 0:h.length)>0&&C.push({children:m==null?void 0:m.children,isFormColHidden:!0}),p.value=m==null?void 0:m.id,x.value=C,E.value=C},F=m=>{l("fixChange",D.cloneDeep(m))},W=m=>{l("deleteChange",D.cloneDeep(m))},N=m=>{u.value=!0;let C=[];Vt==null||Vt.forEach(h=>{let w=D.cloneDeep(v.value)+1;b.setTableIndex(w),C.push({label:h==null?void 0:h.label,name:h==null?void 0:h.label,type:h.type,value:"",id:v.value,contents:h==null?void 0:h.options})}),s.value=m==null?void 0:m.id,x.value=C,E.value=C},pe=m=>{let C=D.cloneDeep(E.value);C=C==null?void 0:C.map(h=>(h.children||(h.value=m==null?void 0:m[h.name]),h)),E.value=C},$=()=>{var C,h;x.value=E.value;let m={};if(p.value!=="")m.id=p.value,(C=x.value)==null||C.forEach(w=>{const g=Vt==null?void 0:Vt.find(J=>(J==null?void 0:J.label)===(w==null?void 0:w.label));g?m[g.key]=w.value:w!=null&&w.children&&w.children.length>0&&(m.children=w.children)}),u.value=!1,l("fixChange",{contents:D.cloneDeep(m),id:s.value,type:"fix"});else{let w=D.cloneDeep(v.value)+1;b.setTableIndex(w),m.id="id"+v.value,(h=x.value)==null||h.forEach(g=>{const J=Vt==null?void 0:Vt.find(Ee=>(Ee==null?void 0:Ee.label)===(g==null?void 0:g.label));J?m[J.key]=g.value:g!=null&&g.children&&g.children.length>0&&(m.children=g.children)}),u.value=!1,l("fixChange",{contents:D.cloneDeep(m),id:s.value,type:"add"})}p.value="",x.value=[],E.value=[]},M=()=>{u.value=!1,p.value="",s.value="",x.value=[],E.value=[]},L=m=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(m,C)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",xi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(w,g)=>(e.openBlock(),e.createElementBlock("div",wi,[e.createElementVNode("div",Di,[e.createElementVNode("div",_i,e.toDisplayString(w.label),1),e.createElementVNode("div",Ei,[e.createVNode(h,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>N(w)},null,8,["onClick"]),e.createVNode(h,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>O(w)},null,8,["onClick"]),e.createVNode(h,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>L(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Ci,[e.createVNode(_l,{tableChildContents:w==null?void 0:w.children,onDeleteChange:W,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:M,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Si,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:pe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:M,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:$},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Bi=Ft._export_sfc(Ti,[["__scopeId","data-v-e0fef72d"]]),Ii={class:"table-header-child"},Ni={class:"table-header-child-main"},Ai={class:"table-header-child-content"},Vi={class:"table-header-child-content-item"},Oi={class:"fix-button"},Mi={key:0},zi={class:"form-content"},Ri={class:"dialog-footer"},Pi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:r}){const i=a,l=r,u=e.ref(!1),s=e.ref(""),b=Ve.useTableComp(D.pinia),{tableIndex:v}=D.storeToRefs(b),p=e.ref(""),x=e.ref([]),E=e.ref([]),O=m=>{l("fixChange",D.cloneDeep(m))},F=m=>{var h;u.value=!0;let C=[];Vt==null||Vt.forEach(w=>{let g=D.cloneDeep(v.value)+1;b.setTableIndex(g),C.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:m[w.key],id:v.value,contents:w==null?void 0:w.options})}),m!=null&&m.children&&((h=m==null?void 0:m.children)==null?void 0:h.length)>0&&C.push({children:m==null?void 0:m.children,isFormColHidden:!0}),p.value=m==null?void 0:m.id,x.value=C,E.value=C},W=m=>{u.value=!0;let C=[];Vt==null||Vt.forEach(h=>{let w=D.cloneDeep(v.value)+1;b.setTableIndex(w),C.push({label:h==null?void 0:h.label,name:h==null?void 0:h.label,type:h.type,value:"",id:v.value,contents:h==null?void 0:h.options})}),s.value=m==null?void 0:m.id,x.value=C,E.value=C},N=m=>{let C=D.cloneDeep(E.value);C=C==null?void 0:C.map(h=>(h.children||(h.value=m==null?void 0:m[h.name]),h)),E.value=C},pe=()=>{var C,h;x.value=E.value;let m={};if(p.value!=="")m.id=p.value,(C=x.value)==null||C.forEach(w=>{const g=Vt==null?void 0:Vt.find(J=>(J==null?void 0:J.label)===(w==null?void 0:w.label));g?m[g.key]=w.value:w!=null&&w.children&&w.children.length>0&&(m.children=w.children)}),u.value=!1,l("fixChange",{contents:D.cloneDeep(m),id:s.value,type:"fix"});else{let w=D.cloneDeep(v.value)+1;b.setTableIndex(w),m.id="idChild"+v.value,(h=x.value)==null||h.forEach(g=>{const J=Vt==null?void 0:Vt.find(Ee=>(Ee==null?void 0:Ee.label)===(g==null?void 0:g.label));J?m[J.key]=g.value:g!=null&&g.children&&g.children.length>0&&(m.children=g.children)}),u.value=!1,l("fixChange",{contents:D.cloneDeep(m),id:s.value,type:"add"})}p.value="",x.value=[],E.value=[]},$=()=>{u.value=!1,p.value="",s.value="",x.value=[],E.value=[]},M=m=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=m=>{l("deleteChange",m)};return(m,C)=>{const h=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(g,J)=>(e.openBlock(),e.createElementBlock("div",Ni,[e.createElementVNode("div",Ai,[e.createElementVNode("div",Vi,e.toDisplayString(g.label),1),e.createElementVNode("div",Oi,[e.createVNode(h,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ee=>W(g)},null,8,["onClick"]),e.createVNode(h,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ee=>F(g)},null,8,["onClick"]),e.createVNode(h,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ee=>M(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",Mi,[e.createVNode(Bi,{tableChildContents:g==null?void 0:g.children,onDeleteChange:L,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:$,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zi,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:N},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ri,[e.createVNode(w,{onClick:$,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[0]||(C[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(w,{class:"ok-button button",onClick:pe,id:"themeButton"},{default:e.withCtx(()=>C[1]||(C[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},_l=Ft._export_sfc(Pi,[["__scopeId","data-v-ebd68fa1"]]),Fi={class:"table-operate-content"},Li={class:"table-operate-item"},$i={class:"operate-title"},ji={class:"operate-content"},Ui={class:"fix-content"},Ki={class:"fix-content-label"},Wi={class:"fix-button"},Hi={key:0},qi={class:"operate-title"},Xi={class:"operate-content"},Gi={class:"fix-content"},Yi={class:"fix-content-label"},Ji={class:"fix-button"},Zi={class:"operate-title"},Qi={class:"operate-content"},es={class:"fix-content"},ts={class:"fix-content-label"},ns={class:"fix-button"},as={class:"operate-title"},os={class:"operate-content"},ls={class:"fix-content"},rs={class:"fix-content-label"},is={class:"fix-button"},ss={class:"operate-content"},cs={style:{display:"flex","justify-content":"space-between"}},us={class:"form-content"},ds={class:"dialog-footer"},ps={class:"form-content"},fs={class:"dialog-footer"},hs={class:"form-content"},vs={class:"dialog-footer"},gs={class:"form-content"},ms={class:"dialog-footer"},ys={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref([]),s=e.ref(!1),b=e.ref(!1),v=e.ref([]),p=e.ref(!1),x=e.ref([]),E=e.ref(!1),O=e.ref([]),F=e.ref(""),W=e.ref(""),N=e.ref([]),pe=e.ref([]),$=e.ref([]),M=e.ref([]),L=e.ref(!1),m=e.ref([]),C=e.ref([]),h=e.ref(0),w=e.ref([]),g=e.ref([]),J=e.ref([]),Ee=()=>{L.value=!0;let y=[];En==null||En.forEach(I=>{h.value++,y.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:(I==null?void 0:I.key)==="background"?"var(--ssComponent-primary-color)":"",id:h.value,contents:I==null?void 0:I.options})}),m.value=y,C.value=y},Qe=()=>{var I,H,Q;b.value=!0;let y=[];(Q=(H=(I=Ve.FormContent)==null?void 0:I.find(S=>(S==null?void 0:S.key)==="Input"))==null?void 0:H.value)==null||Q.forEach(S=>{h.value++,y.push({label:S==null?void 0:S.label,name:(S==null?void 0:S.name)||(S==null?void 0:S.label),type:S.type,value:(S==null?void 0:S.label)==="类型"?"Input":"",id:h.value,contents:S==null?void 0:S.options})}),w.value=y,g.value=y},re=y=>{y||(w.value=g.value)},Be=async y=>{var I,H,Q,S,se,Me,A,ae,U,q,Te,ue;if((y==null?void 0:y.类型)!==((H=(I=g.value)==null?void 0:I.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:H.value)){let G=[],ee=await((se=(S=(Q=Ve.FormContent)==null?void 0:Q.find(he=>(he==null?void 0:he.key)===((y==null?void 0:y.类型)===""?"Input":y==null?void 0:y.类型)))==null?void 0:S.value)==null?void 0:se.value)?await((q=(U=(ae=Ve.FormContent)==null?void 0:ae.find(he=>(he==null?void 0:he.key)===((y==null?void 0:y.类型)===""?"Input":y==null?void 0:y.类型)))==null?void 0:U.value)==null?void 0:q.value):(A=(Me=Ve.FormContent)==null?void 0:Me.find(he=>(he==null?void 0:he.key)===((y==null?void 0:y.类型)===""?"Input":y==null?void 0:y.类型)))==null?void 0:A.value;if(ee==null||ee.forEach(he=>{h.value++,G.push({label:he==null?void 0:he.label,name:(he==null?void 0:he.name)||(he==null?void 0:he.label),type:he.type,value:he!=null&&he.属性名?(y==null?void 0:y.prop)||(y==null?void 0:y.name)||(y==null?void 0:y.label):(y==null?void 0:y[he.label])??"",id:h.value,contents:he==null?void 0:he.options,prop:(he==null?void 0:he.prop)||(he==null?void 0:he.name)||(he==null?void 0:he.label)})}),y!=null&&y.菜单选项&&((Te=y==null?void 0:y.菜单选项)==null?void 0:Te.length)>0){const he=await Ve.menuToContentType(y==null?void 0:y.菜单选项);G=G==null?void 0:G.map(ye=>((ye==null?void 0:ye.name)==="组信息选项"&&(ye.contents=he),ye))}g.value=await Ve.selectToBase(D.cloneDeep(G)),w.value=await Ve.selectToBase(D.cloneDeep(G))}else{let G=D.cloneDeep(w.value);if(G=G==null?void 0:G.map(ee=>(ee.value=y==null?void 0:y[ee.name],ee)),y!=null&&y.菜单选项&&((ue=y==null?void 0:y.菜单选项)==null?void 0:ue.length)>0){const ee=await Ve.menuToContentType(y==null?void 0:y.菜单选项);G=G==null?void 0:G.map(he=>((he==null?void 0:he.name)==="组信息选项"&&(he.contents=ee),he))}G=Ve.formToOptionsContents(G),g.value=await Ve.selectToBase(D.cloneDeep(G))}},Oe=async y=>{await Be(y),w.value=g.value},R=(y,I)=>{if((I==null?void 0:I.type)=="Select"&&(y==null?void 0:y.key)==="selectRelateType"){const H=I==null?void 0:I.optionUrl;return(H==null?void 0:H.selectRelateType)||I[y.key]}if((I==null?void 0:I.type)=="Select"&&(y==null?void 0:y.key)==="menuSelect"){const H=I==null?void 0:I.optionUrl;return(H==null?void 0:H.menuSelect)||I[y.key]}if((I==null?void 0:I.type)=="Select"&&(y==null?void 0:y.key)==="groupSelect"){const H=I==null?void 0:I.optionUrl;return(H==null?void 0:H.groupSelect)||I[y.key]}if((I==null?void 0:I.type)=="Select"&&(y==null?void 0:y.key)==="originalContent")return(I==null?void 0:I.value)||I[y.key];if((I==null?void 0:I.type)=="Select"&&(y==null?void 0:y.key)==="multiple"){const H=I[y.key];return yl(H)?H:y.default}return(y==null?void 0:y.label)==="类型"&&I[y.key]===""?"Input":(y==null?void 0:y.key)==="isFormColHidden"&&!I[y.key]?!1:I[y.key]},le=async y=>{var Q,S,se,Me,A,ae,U,q,Te;b.value=!0;let I=[];const H=await((se=(S=(Q=Ve.FormContent)==null?void 0:Q.find(ue=>(ue==null?void 0:ue.key)===((y==null?void 0:y.type)===""?"Input":y==null?void 0:y.type)))==null?void 0:S.value)==null?void 0:se.value)?await((q=(U=(ae=Ve.FormContent)==null?void 0:ae.find(ue=>(ue==null?void 0:ue.key)===((y==null?void 0:y.type)===""?"Input":y==null?void 0:y.type)))==null?void 0:U.value)==null?void 0:q.value):(A=(Me=Ve.FormContent)==null?void 0:Me.find(ue=>(ue==null?void 0:ue.key)===((y==null?void 0:y.type)===""?"Input":y==null?void 0:y.type)))==null?void 0:A.value;if(H==null||H.forEach(ue=>{h.value++,I.push({label:ue==null?void 0:ue.label,name:(ue==null?void 0:ue.name)||(ue==null?void 0:ue.label),type:ue.type,value:(ue==null?void 0:ue.label)==="属性名"?(y==null?void 0:y.prop)||(y==null?void 0:y.name)||(y==null?void 0:y.label):R(ue,y),id:h.value,contents:ue==null?void 0:ue.options})}),y!=null&&y.menuSelect&&((Te=y==null?void 0:y.menuSelect)==null?void 0:Te.length)>0){const ue=await Ve.menuToContentType(y==null?void 0:y.menuSelect);I=I==null?void 0:I.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ue),G))}F.value=y==null?void 0:y.id,w.value=await Ve.selectToBase(Ve.formToOptionsContents(I)),g.value=await Ve.selectToBase(Ve.formToOptionsContents(I))},oe=y=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,H;J.value=(I=D.cloneDeep(J.value))==null?void 0:I.filter(Q=>(Q==null?void 0:Q.id)!==(y==null?void 0:y.id)),l("change",(H=D.cloneDeep(i.originalItemContents))==null?void 0:H.map(Q=>((Q==null?void 0:Q.key)==="tableToForm"&&(Q.contents=J.value),Q))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},fe=()=>{b.value=!1,w.value=[],F.value=""},$e=async()=>{var Q,S,se,Me,A,ae,U,q,Te,ue;w.value=g.value;let y={};F.value!==""?y.id=F.value:(h.value++,y.id="id"+h.value);let I=await((se=(S=(Q=Ve.FormContent)==null?void 0:Q.find(G=>{var ee,he;return(G==null?void 0:G.key)===(((he=(ee=w.value)==null?void 0:ee.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:he.value)??"label")}))==null?void 0:S.value)==null?void 0:se.value)??((A=(Me=Ve.FormContent)==null?void 0:Me.find(G=>{var ee,he;return(G==null?void 0:G.key)===(((he=(ee=w.value)==null?void 0:ee.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:he.value)??"label")}))==null?void 0:A.value);if((ae=w.value)==null||ae.forEach(G=>{const ee=I==null?void 0:I.find(he=>(he==null?void 0:he.label)===(G==null?void 0:G.label));ee&&(y[ee.key]=G.value)}),y.name=y.label,(U=J.value)!=null&&U.find(G=>G.id===y.id))J.value=(q=J.value)==null?void 0:q.map(G=>(G.id===y.id&&(G=y),G));else{let G=D.cloneDeep(J.value);J.value||(J.value=[]),G.push(y),J.value=G}J.value=J.value.map(({id:G,...ee})=>ee),b.value=!1,F.value="";let H=D.cloneDeep(i.originalItemContents);(Te=D.cloneDeep(i.originalItemContents))!=null&&Te.find(G=>(G==null?void 0:G.key)==="tableToForm")?H=(ue=D.cloneDeep(i.originalItemContents))==null?void 0:ue.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=J.value),G)):H.push({key:"tableToForm",contents:J.value}),l("change",H)},tt=y=>{L.value=!0;let I=[];En==null||En.forEach(H=>{h.value++,I.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:y[H.key],id:h.value,contents:H==null?void 0:H.options})}),F.value=y==null?void 0:y.id,m.value=I,C.value=I};e.watch(()=>E.value,()=>{var I,H;let y=D.cloneDeep(i.originalItemContents);(I=D.cloneDeep(i.originalItemContents))!=null&&I.find(Q=>(Q==null?void 0:Q.key)==="page")?y=(H=D.cloneDeep(i.originalItemContents))==null?void 0:H.map(Q=>((Q==null?void 0:Q.key)==="page"&&(Q.contents=E.value),Q)):y.push({key:"page",contents:E.value}),l("change",y)},{deep:!0});const X=y=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,H;pe.value=(I=D.cloneDeep(pe.value))==null?void 0:I.filter(Q=>(Q==null?void 0:Q.id)!==(y==null?void 0:y.id)),l("change",(H=D.cloneDeep(i.originalItemContents))==null?void 0:H.map(Q=>((Q==null?void 0:Q.key)==="extraButton"&&(Q.contents=pe.value),Q))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>{var H,Q,S,se,Me;m.value=C.value;let y={};if(F.value!==""?y.id=F.value:(h.value++,y.id="id"+h.value),(H=m.value)==null||H.forEach(A=>{const ae=En==null?void 0:En.find(U=>(U==null?void 0:U.label)===(A==null?void 0:A.label));ae?y[ae.key]=A.value:A!=null&&A.children&&A.children.length>0&&(y.children=A.children)}),(Q=pe.value)!=null&&Q.find(A=>A.id===y.id))pe.value=(S=pe.value)==null?void 0:S.map(A=>(A.id===y.id&&(A=y),A));else{let A=D.cloneDeep(pe.value)??[];A.push(y),pe.value=A}L.value=!1,F.value="";let I=D.cloneDeep(i.originalItemContents);(se=D.cloneDeep(i.originalItemContents))!=null&&se.find(A=>(A==null?void 0:A.key)==="extraButton")?I=(Me=D.cloneDeep(i.originalItemContents))==null?void 0:Me.map(A=>((A==null?void 0:A.key)==="extraButton"&&(A.contents=pe.value),A)):I.push({key:"extraButton",contents:pe.value}),l("change",I)},ie=y=>{let I=D.cloneDeep(C.value);I=I==null?void 0:I.map(H=>(H.children||(H.value=y==null?void 0:y[H.name]),H)),C.value=I},Z=()=>{L.value=!1,m.value=[],F.value=""},ve=y=>{p.value=!0;let I=[];Cn==null||Cn.forEach(H=>{h.value++,I.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:y[H.key],id:h.value,contents:H==null?void 0:H.options})}),F.value=y==null?void 0:y.id,$.value=I,M.value=I},we=y=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,H;N.value=(I=D.cloneDeep(N.value))==null?void 0:I.filter(Q=>(Q==null?void 0:Q.id)!==(y==null?void 0:y.id)),l("change",(H=D.cloneDeep(i.originalItemContents))==null?void 0:H.map(Q=>((Q==null?void 0:Q.key)==="rowButton"&&(Q.contents=N.value),Q))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ce=()=>{s.value=!0;let y=[];Vt==null||Vt.forEach(I=>{h.value++,y.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:h.value,contents:I==null?void 0:I.options})}),x.value=y,O.value=y},te=()=>{p.value=!0;let y=[];Cn==null||Cn.forEach(I=>{h.value++,y.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:h.value,contents:I==null?void 0:I.options})}),$.value=y,M.value=y},ke=y=>{let I=D.cloneDeep(M.value);I=I==null?void 0:I.map(H=>(H.children||(H.value=y==null?void 0:y[H.name]),H)),M.value=I},T=()=>{var H,Q,S,se,Me;$.value=M.value;let y={};if(F.value!==""?y.id=F.value:(h.value++,y.id="id"+h.value),(H=$.value)==null||H.forEach(A=>{const ae=Cn==null?void 0:Cn.find(U=>(U==null?void 0:U.label)===(A==null?void 0:A.label));ae?y[ae.key]=A.value:A!=null&&A.children&&A.children.length>0&&(y.children=A.children)}),(Q=N.value)!=null&&Q.find(A=>A.id===y.id))N.value=(S=N.value)==null?void 0:S.map(A=>(A.id===y.id&&(A=y),A));else{let A=D.cloneDeep(N.value);A.push(y),N.value=A}p.value=!1,F.value="";let I=D.cloneDeep(i.originalItemContents);(se=D.cloneDeep(i.originalItemContents))!=null&&se.find(A=>(A==null?void 0:A.key)==="rowButton")?I=(Me=D.cloneDeep(i.originalItemContents))==null?void 0:Me.map(A=>((A==null?void 0:A.key)==="rowButton"&&(A.contents=N.value),A)):I.push({key:"rowButton",contents:N.value}),l("change",I)},Ge=()=>{p.value=!1,F.value="",M.value=[],$.value=[]},Ye=y=>{s.value=!0;let I=[];Vt==null||Vt.forEach(H=>{h.value++,I.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:h.value,contents:H==null?void 0:H.options})}),x.value=I,W.value=y==null?void 0:y.id,O.value=I},Ae=y=>{var I;v.value=kl(D.cloneDeep(v.value),y==null?void 0:y.id),l("change",(I=D.cloneDeep(i.originalItemContents))==null?void 0:I.map(H=>{var Q;return(H==null?void 0:H.key)==="header"&&(H.contents=(Q=v.value)!=null&&Q.some(S=>S==null?void 0:S.children)?[v.value]:v.value),H}))},ce=y=>{var H,Q,S;y.type==="fix"?y.id!==""?v.value=wl(v.value,y):v.value=xl(v.value,y==null?void 0:y.contents):v.value=Dl(v.value,y),v.value=(H=v.value)!=null&&H.some(se=>se==null?void 0:se.children)?[v.value]:v.value,F.value="";let I=D.cloneDeep(i.originalItemContents);(Q=D.cloneDeep(i.originalItemContents))!=null&&Q.find(se=>(se==null?void 0:se.key)==="header")?I=(S=D.cloneDeep(i.originalItemContents))==null?void 0:S.map(se=>((se==null?void 0:se.key)==="header"&&(se.contents=v.value),se)):I.push({key:"header",contents:v.value}),l("change",I)},ne=y=>{var H;s.value=!0;let I=[];Vt==null||Vt.forEach(Q=>{h.value++,I.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:y[Q.key],id:h.value,contents:Q==null?void 0:Q.options})}),y!=null&&y.children&&((H=y==null?void 0:y.children)==null?void 0:H.length)>0&&I.push({children:y==null?void 0:y.children,isFormColHidden:!0}),F.value=y==null?void 0:y.id,W.value="",x.value=I,O.value=I},de=y=>{let I=D.cloneDeep(O.value);I=I==null?void 0:I.map(H=>(H.children||(H.value=y==null?void 0:y[H.name]),H)),O.value=I},Se=()=>{s.value=!1,F.value="",W.value="",O.value=[]},qe=()=>{var H,Q,S,se,Me,A;x.value=O.value;let y={};if(F.value!==""?y.id=F.value:(h.value++,y.id="id"+h.value),(H=x.value)==null||H.forEach(ae=>{const U=Vt==null?void 0:Vt.find(q=>(q==null?void 0:q.label)===(ae==null?void 0:ae.label));U?y[U.key]=ae.value:ae!=null&&ae.children&&ae.children.length>0&&(y.children=ae.children)}),(Q=v.value)!=null&&Q.find(ae=>ae.id===y.id))v.value=(S=v.value)==null?void 0:S.map(ae=>(ae.id===y.id&&(ae=y),ae));else{let ae=D.cloneDeep(v.value)??[];W.value===""?ae.push(y):ae=ae==null?void 0:ae.map(U=>(U.id===W.value&&(U.children||(U.children=[]),U.children.push(y)),U)),v.value=ae}v.value=(se=v.value)!=null&&se.some(ae=>ae==null?void 0:ae.children)?[v.value]:v.value,s.value=!1,F.value="",W.value="";let I=D.cloneDeep(i.originalItemContents);(Me=D.cloneDeep(i.originalItemContents))!=null&&Me.find(ae=>(ae==null?void 0:ae.key)==="header")?I=(A=D.cloneDeep(i.originalItemContents))==null?void 0:A.map(ae=>((ae==null?void 0:ae.key)==="header"&&(ae.contents=v.value),ae)):I.push({key:"header",contents:v.value}),l("change",I)},dt=y=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,H;v.value=(I=D.cloneDeep(v.value))==null?void 0:I.filter(Q=>(Q==null?void 0:Q.id)!==(y==null?void 0:y.id)),l("change",(H=D.cloneDeep(i.originalItemContents))==null?void 0:H.map(Q=>{var S;return(Q==null?void 0:Q.key)==="header"&&(Q.contents=(S=v.value)!=null&&S.some(se=>se==null?void 0:se.children)?[v.value]:v.value),Q})),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var y,I,H,Q,S,se,Me,A,ae,U,q,Te,ue,G,ee,he,ye,_e,xe;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(u.value=D.cloneDeep(i.originalItemContents),v.value=(I=(y=u.value)==null?void 0:y.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:I.contents,N.value=(Q=(H=u.value)==null?void 0:H.find(K=>(K==null?void 0:K.key)==="rowButton"))==null?void 0:Q.contents,pe.value=(se=(S=u.value)==null?void 0:S.find(K=>(K==null?void 0:K.key)==="extraButton"))==null?void 0:se.contents,E.value=(A=(Me=u.value)==null?void 0:Me.find(K=>(K==null?void 0:K.key)==="page"))!=null&&A.contents?!!((U=(ae=u.value)==null?void 0:ae.find(K=>(K==null?void 0:K.key)==="page"))!=null&&U.contents):!1,J.value=(Te=(q=u.value)==null?void 0:q.find(K=>(K==null?void 0:K.key)==="tableToForm"))==null?void 0:Te.contents,v.value=(ue=v.value)==null?void 0:ue.map((K,Re)=>(Array.isArray(K)?K=yi(K):K={label:(K==null?void 0:K.label)??"",prop:(K==null?void 0:K.label)==="操作"?"operate":K==null?void 0:K.prop,width:K!=null&&K.width?parseInt(K.width):"",fixed:(K==null?void 0:K.fixed)??void 0,sortable:(K==null?void 0:K.sortable)??!1,align:(K==null?void 0:K.align)??"left",showOverflowTooltip:(K==null?void 0:K.showOverflowTooltip)??!0,isNotDrag:(K==null?void 0:K.isNotDrag)??!1,isEditCol:(K==null?void 0:K.isEditCol)??!1,isOperate:(K==null?void 0:K.isOperate)??!1,id:(K==null?void 0:K.id)??Re,formMenuSelect:(K==null?void 0:K.formMenuSelect)??void 0,groupSelect:(K==null?void 0:K.groupSelect)??void 0},K)),v.value=(G=v.value)!=null&&G.every(K=>Array.isArray(K))?(ee=v.value)==null?void 0:ee[0]:v.value,N.value=(he=N.value)==null?void 0:he.map((K,Re)=>K={label:(K==null?void 0:K.label)??"",type:(K==null?void 0:K.type)??"",textColor:(K==null?void 0:K.textColor)??"#000000",id:(K==null?void 0:K.id)??Re}),pe.value=(ye=pe.value)==null?void 0:ye.map((K,Re)=>K={label:(K==null?void 0:K.label)??"",type:(K==null?void 0:K.type)??"",background:(K==null?void 0:K.background)??"var(--ssComponent-primary-color)",id:(K==null?void 0:K.id)??Re}),J.value)J.value=(xe=J.value)==null?void 0:xe.map(K=>{h.value++;let Re=K;return Re.id=h.value,Re});else{let K=[];const Re=(_e=Ve.getColumnChild(D.cloneDeep(v.value)))==null?void 0:_e.filter(be=>(be==null?void 0:be.prop)!=="operate");Re==null||Re.forEach(be=>{var Ke;h.value++,K.push({label:be==null?void 0:be.label,name:(be==null?void 0:be.prop)||(be==null?void 0:be.label),type:be!=null&&be.groupSelect?"Select":"Input",value:"",id:h.value,contents:be==null?void 0:be.options,menuSelect:be==null?void 0:be.formMenuSelect,groupSelect:(Ke=be==null?void 0:be.groupSelect)==null?void 0:Ke.split(":"),selectRelateType:"关联绑定列"})}),J.value=K}},{deep:!0,immediate:!0}),(y,I)=>{const H=e.resolveComponent("svg-icon"),Q=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Fi,[e.createElementVNode("div",Li,[e.createElementVNode("div",$i,[I[2]||(I[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Q,{class:"icon-content",onClick:Ce,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(H,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[1]||(I[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(S,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",Ui,[e.createElementVNode("div",Ki,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",Wi,[e.createVNode(H,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>Ye(S)},null,8,["onClick"]),e.createVNode(H,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>ne(S)},null,8,["onClick"]),e.createVNode(H,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>dt(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",Hi,[e.createVNode(_l,{tableChildContents:S==null?void 0:S.children,onDeleteChange:Ae,onFixChange:ce},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",qi,[I[4]||(I[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Q,{class:"icon-content",id:"themeButton",onClick:te},{icon:e.withCtx(()=>[e.createVNode(H,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[3]||(I[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Xi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(S,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",Gi,[e.createElementVNode("div",Yi,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",Ji,[e.createVNode(H,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>ve(S)},null,8,["onClick"]),e.createVNode(H,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>we(S)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Zi,[I[6]||(I[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Q,{class:"icon-content",id:"themeButton",onClick:Ee},{icon:e.withCtx(()=>[e.createVNode(H,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[5]||(I[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Qi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe.value,(S,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",es,[e.createElementVNode("div",ts,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",ns,[e.createVNode(H,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>tt(S)},null,8,["onClick"]),e.createVNode(H,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>X(S)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",as,[I[8]||(I[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Q,{class:"icon-content",id:"themeButton",onClick:Qe},{icon:e.withCtx(()=>[e.createVNode(H,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[7]||(I[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.value,(S,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",ls,[e.createElementVNode("div",rs,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",is,[e.createVNode(H,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>le(S)},null,8,["onClick"]),e.createVNode(H,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>oe(S)},null,8,["onClick"])])])]))),128))]),I[10]||(I[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",ss,[e.createElementVNode("div",cs,[I[9]||(I[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(It._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":I[0]||(I[0]=S=>E.value=S)},null,8,["modelValue"])])])]),e.createVNode(Jt.ssDialog,{visible:s.value,onBeforeDestroy:Se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",us,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:de},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ds,[e.createVNode(Q,{onClick:Se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[11]||(I[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Q,{class:"ok-button button",onClick:qe,id:"themeButton"},{default:e.withCtx(()=>I[12]||(I[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:p.value,onBeforeDestroy:Ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ps,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:$.value,key:$.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",fs,[e.createVNode(Q,{onClick:Ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[13]||(I[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Q,{class:"ok-button button",onClick:T,id:"themeButton"},{default:e.withCtx(()=>I[14]||(I[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:L.value,onBeforeDestroy:Z,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",hs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",vs,[e.createVNode(Q,{onClick:Z,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[15]||(I[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Q,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>I[16]||(I[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:b.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",gs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:Be,onChangeVisible:re,onBlurChange:Oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ms,[e.createVNode(Q,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[17]||(I[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Q,{class:"ok-button button",onClick:$e,id:"themeButton"},{default:e.withCtx(()=>I[18]||(I[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},bs=Ft._export_sfc(ys,[["__scopeId","data-v-7a6b87b5"]]),ks=D.useModelComp(D.pinia),{pageMapState:xs}=D.storeToRefs(ks),ws=D.useMenuState(D.pinia),{activeMenuPath:Ds}=D.storeToRefs(ws),_s=e.ref(24),Es=e.ref(6),Cs=e.ref(70),Ss=e.ref(.18),Ts=e.ref(45),Bs=(a,r,i,l)=>{var u,s,b,v,p,x,E,O,F,W,N,pe,$,M,L,m;return{x:((s=(u=a==null?void 0:a.value)==null?void 0:u.tableData)==null?void 0:s.x)||r%2*12,y:((v=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:v.y)||r,w:((x=(p=a==null?void 0:a.value)==null?void 0:p.tableData)==null?void 0:x.w)||_s.value,h:((O=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:O.h)||i,minW:((W=(F=a==null?void 0:a.value)==null?void 0:F.tableData)==null?void 0:W.minW)||Es.value,minH:((pe=(N=a==null?void 0:a.value)==null?void 0:N.tableData)==null?void 0:pe.minH)||Ss.value,maxH:((M=($=a==null?void 0:a.value)==null?void 0:$.tableData)==null?void 0:M.maxH)||Ts.value,i:((m=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:m.i)||r,id:(a==null?void 0:a.id)||r+"",component:l}},Is=(a,r)=>{var l,u,s,b,v,p,x,E;let i=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((b=(s=(u=a==null?void 0:a.compData)==null?void 0:u.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:b.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(i=((E=(x=(p=a==null?void 0:a.compData)==null?void 0:p.find(F=>(F==null?void 0:F.key)==="formContent"))==null?void 0:x.contents)==null?void 0:E.length)/5);return i*2},El=(a,r,i)=>{var b,v;const l=(v=(b=xs.value)==null?void 0:b[Ds.value])==null?void 0:v.filter(p=>{var x;return((x=p==null?void 0:p.key)==null?void 0:x.type)==="gridLayout"}),u=l==null?void 0:l.find(p=>{var x,E,O;return((O=(E=(x=p==null?void 0:p.value)==null?void 0:x.tableData)==null?void 0:E.component)==null?void 0:O.id)===a.id}),s=Is(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((p,x)=>El(p,x))),{...Bs(u,r,s,a)}},Ns=(a,r)=>{if((a==null?void 0:a.length)===0)return[];const i=D.cloneDeep(a);return Array.isArray(a)?i==null?void 0:i.map((l,u)=>El(l,u)):[]},As=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}]}]}}),Vs=(a,r)=>a==null?void 0:a.map(i=>{for(const l in r)if(l===(i==null?void 0:i.prop))return{...i,value:r[l]};return i}),Os=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref([]);e.watch(()=>i.compType,v=>{var E;const p=As(i==null?void 0:i.optionItems),x=v?(E=p[v==null?void 0:v.toUpperCase()])==null?void 0:E[i==null?void 0:i.target]:[];u.value=x==null?void 0:x.map(O=>{for(const[F,W]of Object.entries((i==null?void 0:i.comp)||{}))if((O==null?void 0:O.prop)===F)return{...O,value:W};return O})},{immediate:!0});const s=v=>It.getComponent(v),b=v=>{var p,x;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?u.value=(p=u.value)==null?void 0:p.map(E=>{var O;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(O=E==null?void 0:E.options)==null?void 0:O.map(F=>({...F,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):u.value=(x=u.value)==null?void 0:x.map(E=>{var O;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(O=E==null?void 0:E.options)==null?void 0:O.map(F=>({...F,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:i==null?void 0:i.target,styleConfigs:u.value,prop:v==null?void 0:v.prop})};return(v,p)=>{const x=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,O=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:O==null?void 0:O.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O==null?void 0:O.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(O.type)),{modelValue:O.value,"onUpdate:modelValue":F=>O.value=F,content:O==null?void 0:O.options,optionUrl:O==null?void 0:O.optionUrl,disabled:O==null?void 0:O.disabled,activeText:O==null?void 0:O.activeText,inactiveText:O==null?void 0:O.inactiveText,onChange:F=>b(O)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ms=Ft._export_sfc(Os,[["__scopeId","data-v-6c233914"]]),zs=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:r}){const i=a,l=r,u=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),b=M=>M==null?void 0:M.reduce((L,m)=>(L[m==null?void 0:m.prop]=m==null?void 0:m.rule,L),{}),v=e.computed(()=>({formRules:b(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),p=e.ref([]),x=e.ref(""),E=(M,L,m)=>{var w;let C=[];(i==null?void 0:i.activeTabName)==="任务配置"?(C=[{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:M},{label:"按钮名称",value:"按钮名称",children:L}]},{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:"暂停"}]}],s.value=[{prop:"任务名称",rule:u},{prop:"任务关键词",rule:u},{prop:"执行任务",rule:u},{prop:"执行动作",rule:u},{prop:"执行交互",rule:u}]):(i==null?void 0:i.activeTabName)==="任务关联"&&(C=[{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:(w=i==null?void 0:i.relatedData)==null?void 0:w.map(g=>({label:g==null?void 0:g.任务名称,value:g==null?void 0:g.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:u},{prop:"关联状态",rule:u},{prop:"关联形式",rule:u},{prop:"关联任务集合",rule:u}]);let h;return m&&(m==null?void 0:m.length)>0?h=[...C,...O(M,L,m)]:h=C,h},O=(M,L,m)=>{const C=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return m?C==null?void 0:C.filter(h=>m==null?void 0:m.includes(h==null?void 0:h.prop)):C},F=(M,L)=>{var g,J,Ee,Qe,re,Be,Oe,R,le;const m=((re=(Qe=(Ee=(J=(g=i==null?void 0:i.comp)==null?void 0:g.compData)==null?void 0:J.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:Ee.contents)==null?void 0:Qe.filter(oe=>(oe==null?void 0:oe.label)!=="操作"))==null?void 0:re.map(oe=>({value:oe==null?void 0:oe.prop,label:oe.label})))||[],C=/button/i,h=((le=(R=(Oe=(Be=i==null?void 0:i.comp)==null?void 0:Be.compData)==null?void 0:Oe.filter(oe=>C.test(oe==null?void 0:oe.key)))==null?void 0:R.flatMap(oe=>oe==null?void 0:oe.contents))==null?void 0:le.map(oe=>({value:oe==null?void 0:oe.label,label:oe.label})))||[],w=E(m,h,M);p.value=L?Vs(w,L):w,M&&(M==null?void 0:M.length)>0&&s.value.push(...M==null?void 0:M.map(oe=>({prop:oe,rule:u})))};e.onMounted(()=>{F(null,i==null?void 0:i.extendItem)});const W=M=>{const L=M==null?void 0:M[x.value];if(x.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const m=L==null?void 0:L.join("/");F(m==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:m==="进度设置/进度条"?["进度关键词"]:null,M)}},N=M=>{l("change",{target:i==null?void 0:i.target,extendConfigs:M})},pe=(M,L)=>{x.value=L==null?void 0:L.changeProp,W(M)},$=M=>{l("onButtonClick",M)};return(M,L)=>(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:N,onBlurChange:pe,onOnButtonClick:$},null,8,["rowContents","formRules","buttonValue"]))}}),Rs=Ft._export_sfc(zs,[["__scopeId","data-v-7c660c1f"]]),Ps={};function Fs(a,r){return null}const Ls=Ft._export_sfc(Ps,[["render",Fs]]),$s={class:"form-operate-content"},js={class:"form-operate-item"},Us={class:"operate-title"},Ks={class:"operate-content"},Ws={class:"fix-content"},Hs={class:"fix-button"},qs={class:"operate-title"},Xs={class:"operate-content"},Gs={class:"fix-content"},Ys={class:"fix-button"},Js={style:{display:"flex","justify-content":"space-between"}},Zs={class:"form-content"},Qs={class:"dialog-footer"},ec={class:"form-content"},tc={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref(!1),s=e.ref([]),b=e.ref([]),v=e.ref(!1),p=e.ref([]),x=e.ref([]),E=e.ref(""),O=e.ref(!1),F=e.ref(0),W=e.ref([]),N=e.ref([]),pe=(R,le)=>{if((le==null?void 0:le.type)=="Select"&&(R==null?void 0:R.key)==="selectRelateType"){const oe=le==null?void 0:le.optionUrl;return(oe==null?void 0:oe.selectRelateType)||le[R.key]}if((le==null?void 0:le.type)=="Select"&&(R==null?void 0:R.key)==="menuSelect"){const oe=le==null?void 0:le.optionUrl;return(oe==null?void 0:oe.menuSelect)||le[R.key]}if((le==null?void 0:le.type)=="Select"&&(R==null?void 0:R.key)==="groupSelect"){const oe=le==null?void 0:le.optionUrl;return(oe==null?void 0:oe.groupSelect)||le[R.key]}if((le==null?void 0:le.type)=="Select"&&(R==null?void 0:R.key)==="originalContent")return(le==null?void 0:le.value)||le[R.key];if((le==null?void 0:le.type)=="Select"&&(R==null?void 0:R.key)==="multiple"){const oe=le[R.key];return yl(oe)?oe:R.default}return(R==null?void 0:R.label)==="类型"&&le[R.key]===""?"Input":(R==null?void 0:R.key)==="isFormColHidden"&&!le[R.key]?!1:le[R.key]},$=async R=>{var fe,$e,tt,X,z,ie;u.value=!0;let le=[];const oe=await((tt=($e=(fe=Ve.FormContent)==null?void 0:fe.find(Z=>(Z==null?void 0:Z.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:$e.value)==null?void 0:tt.value)??((z=(X=Ve.FormContent)==null?void 0:X.find(Z=>(Z==null?void 0:Z.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:z.value);if(oe==null||oe.forEach(Z=>{F.value++,le.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,prop:Z==null?void 0:Z.prop,value:pe(Z,R),id:F.value,contents:Z==null?void 0:Z.options,width:(R==null?void 0:R.width)??1})}),R!=null&&R.menuSelect&&((ie=R==null?void 0:R.menuSelect)==null?void 0:ie.length)>0){const Z=await Ve.menuToContentType(R==null?void 0:R.menuSelect);le=le==null?void 0:le.map(ve=>((ve==null?void 0:ve.name)==="组信息选项"&&(ve.contents=Z),ve))}E.value=R==null?void 0:R.id,s.value=await Ve.selectToBase(Ve.formToOptionsContents(le)),b.value=await Ve.selectToBase(Ve.formToOptionsContents(le))},M=R=>{var oe;v.value=!0;let le=[];(oe=Ve.FormButton)==null||oe.forEach(fe=>{F.value++,le.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:(fe==null?void 0:fe.label)==="类型"&&R[fe.key]===""?"normal":R[fe.key],id:F.value,contents:fe==null?void 0:fe.options})}),W.value=le,N.value=le,E.value=R==null?void 0:R.id};e.watch(()=>O.value,()=>{var le,oe;let R=D.cloneDeep(i.originalItemContents);(le=D.cloneDeep(i.originalItemContents))!=null&&le.find(fe=>(fe==null?void 0:fe.key)==="enableWrap")?R=(oe=D.cloneDeep(i.originalItemContents))==null?void 0:oe.map(fe=>((fe==null?void 0:fe.key)==="enableWrap"&&(fe.contents=!O.value),fe)):R.push({key:"enableWrap",contents:!O.value}),l("change",R)},{deep:!0});const L=()=>{var oe,fe,$e,tt,X;W.value=N.value;let R={};if(E.value!==""?R.id=E.value:(F.value++,R.id="id"+F.value),(oe=W.value)==null||oe.forEach(z=>{var Z;const ie=(Z=Ve.FormButton)==null?void 0:Z.find(ve=>(ve==null?void 0:ve.label)===(z==null?void 0:z.label));ie&&(R[ie.key]=z.value)}),(fe=p.value)!=null&&fe.find(z=>z.id===R.id))p.value=($e=p.value)==null?void 0:$e.map(z=>(z.id===R.id&&(z=R),z));else{let z=D.cloneDeep(p.value);p.value||(p.value=[]),z.push(R),p.value=z}v.value=!1,E.value="";let le=D.cloneDeep(i.originalItemContents);(tt=D.cloneDeep(i.originalItemContents))!=null&&tt.find(z=>(z==null?void 0:z.key)==="formButton")?le=(X=D.cloneDeep(i.originalItemContents))==null?void 0:X.map(z=>((z==null?void 0:z.key)==="formButton"&&(z.contents=p.value),z)):le.push({key:"formButton",contents:p.value}),l("change",le)},m=R=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var le,oe;x.value=(le=D.cloneDeep(x.value))==null?void 0:le.filter(fe=>(fe==null?void 0:fe.id)!==(R==null?void 0:R.id)),l("change",(oe=D.cloneDeep(i.originalItemContents))==null?void 0:oe.map(fe=>((fe==null?void 0:fe.key)==="formContent"&&(fe.contents=x.value),fe))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},C=R=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var le,oe;p.value=(le=D.cloneDeep(p.value))==null?void 0:le.filter(fe=>(fe==null?void 0:fe.id)!==(R==null?void 0:R.id)),l("change",(oe=D.cloneDeep(i.originalItemContents))==null?void 0:oe.map(fe=>((fe==null?void 0:fe.key)==="formButton"&&(fe.contents=p.value),fe))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},h=()=>{var le;v.value=!0;let R=[];(le=Ve.FormButton)==null||le.forEach(oe=>{F.value++,R.push({label:oe==null?void 0:oe.label,name:oe==null?void 0:oe.label,type:oe.type,value:(oe==null?void 0:oe.label)==="类型"?"normal":"",id:F.value,contents:oe==null?void 0:oe.options})}),W.value=R,N.value=R},w=()=>{var le,oe,fe;u.value=!0;let R=[];(fe=(oe=(le=Ve.FormContent)==null?void 0:le.find($e=>($e==null?void 0:$e.key)==="Input"))==null?void 0:oe.value)==null||fe.forEach($e=>{F.value++,R.push({label:$e==null?void 0:$e.label,name:$e==null?void 0:$e.label,type:$e.type,value:($e==null?void 0:$e.label)==="类型"?"Input":"",id:F.value,contents:$e==null?void 0:$e.options})}),s.value=R,b.value=R},g=R=>{let le=D.cloneDeep(N.value);le=le==null?void 0:le.map(oe=>(oe.value=R==null?void 0:R[oe.name],oe)),N.value=le},J=R=>{const le=R.find($e=>($e==null?void 0:$e.name)==="类型");if((le==null?void 0:le.value)!="Select")return;const oe=R.find($e=>($e==null?void 0:$e.name)==="多选"),fe=R.find($e=>($e==null?void 0:$e.name)==="初始值");oe!=null&&oe.value&&Bo.isString(fe.value)&&(fe.value=[fe.value]),!(oe!=null&&oe.value)&&!Bo.isString(fe.value)&&(fe.value="")},Ee=async R=>{var le,oe,fe,$e,tt,X,z,ie,Z,ve,we,Ce;if((R==null?void 0:R.类型)!==((oe=(le=b.value)==null?void 0:le.find(te=>(te==null?void 0:te.label)==="类型"))==null?void 0:oe.value)){let te=[];const ke=await((tt=($e=(fe=Ve.FormContent)==null?void 0:fe.find(T=>(T==null?void 0:T.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:$e.value)==null?void 0:tt.value)?await((ve=(Z=(ie=Ve.FormContent)==null?void 0:ie.find(T=>(T==null?void 0:T.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:Z.value)==null?void 0:ve.value):(z=(X=Ve.FormContent)==null?void 0:X.find(T=>(T==null?void 0:T.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:z.value;if(ke==null||ke.forEach(T=>{var Ye,Ae;F.value++;const Ge=ri(T==null?void 0:T.default)?(R==null?void 0:R[T.label])??T.value??"":T==null?void 0:T.default;te.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:Ge,prop:T==null?void 0:T.prop,id:F.value,contents:T==null?void 0:T.options,width:((Ae=(Ye=b.value)==null?void 0:Ye[0])==null?void 0:Ae.width)??1})}),R!=null&&R.菜单选项&&((we=R==null?void 0:R.菜单选项)==null?void 0:we.length)>0){const T=await Ve.menuToContentType(R==null?void 0:R.菜单选项);te=te==null?void 0:te.map(Ge=>((Ge==null?void 0:Ge.name)==="组信息选项"&&(Ge.contents=T),Ge))}J(te),b.value=await Ve.selectToBase(D.cloneDeep(te)),s.value=await Ve.selectToBase(D.cloneDeep(te))}else{let te=D.cloneDeep(b.value);if(te=te==null?void 0:te.map(ke=>(ke.value=R==null?void 0:R[ke.name],ke)),R!=null&&R.菜单选项&&((Ce=R==null?void 0:R.菜单选项)==null?void 0:Ce.length)>0){const ke=await Ve.menuToContentType(R==null?void 0:R.菜单选项);te=te==null?void 0:te.map(T=>((T==null?void 0:T.name)==="组信息选项"&&(T.contents=ke),T))}te=Ve.formToOptionsContents(te),J(te),b.value=await Ve.selectToBase(D.cloneDeep(te))}},Qe=R=>{R||(s.value=b.value)},re=async R=>{await Ee(R),s.value=b.value},Be=ml(async()=>{var fe,$e,tt,X,z,ie,Z,ve,we,Ce,te,ke;s.value=b.value;let R={};R.width=(($e=(fe=s.value)==null?void 0:fe[0])==null?void 0:$e.width)??1,E.value!==""?R.id=E.value:(F.value++,R.id="id"+F.value);let le=await((z=(X=(tt=Ve.FormContent)==null?void 0:tt.find(T=>{var Ge,Ye;return(T==null?void 0:T.key)===(((Ye=(Ge=s.value)==null?void 0:Ge.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:X.value)==null?void 0:z.value)??((Z=(ie=Ve.FormContent)==null?void 0:ie.find(T=>{var Ge,Ye;return(T==null?void 0:T.key)===(((Ye=(Ge=s.value)==null?void 0:Ge.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:Z.value);if((ve=s.value)==null||ve.forEach(T=>{const Ge=le==null?void 0:le.find(Ye=>(Ye==null?void 0:Ye.label)===(T==null?void 0:T.label));Ge&&(R[Ge.key]=T.value)}),R.width=R.width?R.width:1,R.key=R==null?void 0:R.label,R.isFormColHidden=R==null?void 0:R.isFormColHidden,(we=x.value)!=null&&we.find(T=>T.id===R.id))x.value=(Ce=x.value)==null?void 0:Ce.map(T=>(T.id===R.id&&(T=R),T));else{let T=D.cloneDeep(x.value);T.push(R),x.value=T}x.value=x.value.map(({id:T,...Ge})=>Ge),u.value=!1,E.value="";let oe=D.cloneDeep(i.originalItemContents);(te=D.cloneDeep(i.originalItemContents))!=null&&te.find(T=>(T==null?void 0:T.key)==="formContent")?oe=(ke=D.cloneDeep(i.originalItemContents))==null?void 0:ke.map(T=>((T==null?void 0:T.key)==="formContent"&&(T.contents=x.value),T)):oe.push({key:"formContent",contents:x.value}),l("change",oe)},300),Oe=()=>{u.value=!1,v.value=!1,E.value="",b.value=[],N.value=[]};return e.watch(()=>i.originalItemContents,()=>{var le,oe,fe,$e,tt,X;if(!i.originalItemContents||i.originalItemContents.length===0)return;const R=D.cloneDeep(i.originalItemContents);x.value=((le=R==null?void 0:R.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:le.contents)??[],p.value=((oe=R==null?void 0:R.find(z=>(z==null?void 0:z.key)==="formButton"))==null?void 0:oe.contents)??[],O.value=(fe=R==null?void 0:R.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&fe.contents?!(($e=R==null?void 0:R.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&$e.contents):!0,x.value=(tt=D.cloneDeep(x.value))==null?void 0:tt.map((z,ie)=>{var ve;let Z=z;return Z.id=(z==null?void 0:z.id)??ie,z!=null&&z.label||(z.label=(z==null?void 0:z.key)??(z==null?void 0:z.label)??""),z!=null&&z.type||(z.type=(z==null?void 0:z.type)??""),z.contents=((ve=z==null?void 0:z.options)==null?void 0:ve.length)===0?(z==null?void 0:z.contents)??"":z==null?void 0:z.options,Z}),x.value=Ve.formToOptionsContents(x.value),p.value=(X=p.value)==null?void 0:X.map((z,ie)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",background:(z==null?void 0:z.background)??"var(--ssComponent-primary-color)",id:ie})},{deep:!0,immediate:!0}),(R,le)=>{const oe=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$s,[e.createElementVNode("div",js,[e.createElementVNode("div",Us,[le[2]||(le[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(oe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[le[1]||(le[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,($e,tt)=>(e.openBlock(),e.createElementBlock("div",{key:tt},[e.createElementVNode("div",Ws,[e.createElementVNode("div",null,e.toDisplayString($e.label),1),e.createElementVNode("div",Hs,[e.createVNode(oe,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>$($e)},null,8,["onClick"]),e.createVNode(oe,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>m($e)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",qs,[le[4]||(le[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:h},{icon:e.withCtx(()=>[e.createVNode(oe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[le[3]||(le[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,($e,tt)=>(e.openBlock(),e.createElementBlock("div",{key:tt},[e.createElementVNode("div",Gs,[e.createElementVNode("div",null,e.toDisplayString($e.label),1),e.createElementVNode("div",Ys,[e.createVNode(oe,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>M($e)},null,8,["onClick"]),e.createVNode(oe,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>C($e)},null,8,["onClick"])])])]))),128))]),le[6]||(le[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Js,[le[5]||(le[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(It._sfc_main$1,{modelValue:O.value,"onUpdate:modelValue":le[0]||(le[0]=$e=>O.value=$e)},null,8,["modelValue"])])]),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:Oe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:Ee,onChangeVisible:Qe,onBlurChange:re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qs,[e.createVNode(fe,{onClick:Oe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>le[7]||(le[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(fe,{class:"ok-button button",onClick:e.unref(Be),id:"themeButton"},{default:e.withCtx(()=>le[8]||(le[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:v.value,onBeforeDestroy:Oe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ec,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:W.value,key:W.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Oe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Mo=Ft._export_sfc(tc,[["__scopeId","data-v-20850524"]]),nc={class:"step-module content"},ac={class:"module-data"},oc={class:"step-module layout"},lc={class:"form-content"},rc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=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}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),p=e.ref("create"),x=e.ref({}),E=e.ref([]),O=$=>{var M;x.value=$,l("change",(M=N())==null?void 0:M.compData)},F=($,M)=>{var L,m;switch($){case"create":(L=s.value)==null||L.forEach(C=>{C.value=""}),p.value="create",v.visible=!0;break;case"update":(m=s.value)==null||m.forEach(C=>{C.value=M[C==null?void 0:C.prop]}),p.value="update",v.visible=!0;break;case"delete":E.value.splice(M,1),p.value="delete";break}},W=$=>{var M,L,m;if(($==null?void 0:$.buttonName)==="确认"){const C=D.cloneDeep($==null?void 0:$.content);switch(Object.keys(C).forEach(h=>{C[h]===""&&delete C[h]}),p.value){case"create":E.value.push({...C,index:((M=E.value)==null?void 0:M.length)+1});break;case"update":E.value=(L=E.value)==null?void 0:L.map(h=>h.index===(C==null?void 0:C.index)?{...h,title:C==null?void 0:C.title,description:C==null?void 0:C.description}:h);break}l("change",(m=N())==null?void 0:m.compData),v.visible=!1}else v.visible=!1},N=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:x.value}]}),pe=()=>{v.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,$=>{var M,L;$&&(x.value=((M=$==null?void 0:$.find(m=>m.key==="stepConfig"))==null?void 0:M.contents)??{},E.value=((L=$==null?void 0:$.find(m=>m.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),($,M)=>{const L=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",nc,[M[2]||(M[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:M[0]||(M[0]=C=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[M[1]||(M[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(C,h)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:h},[e.createElementVNode("span",null,e.toDisplayString(C==null?void 0:C.title),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:w=>F("update",{...C,index:h+1})},{default:e.withCtx(()=>M[3]||(M[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:w=>F("delete",h)},{default:e.withCtx(()=>M[4]||(M[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",oc,[M[5]||(M[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(It.ssForm,{rowContents:u.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:pe,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",lc,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:W},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ic=Ft._export_sfc(rc,[["__scopeId","data-v-7dbd17f2"]]),sc={class:"step-module content"},cc={class:"module-data"},uc={class:"step-module layout"},dc={class:"form-content"},pc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref("create"),s=e.ref({}),b=e.ref([]),v=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),p=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),O=$=>{var M;s.value=$,l("change",(M=N())==null?void 0:M.compData)},F=($,M)=>{var L,m;switch($){case"create":(L=p.value)==null||L.forEach(C=>{C.value=""}),u.value="create",E.visible=!0;break;case"update":(m=p.value)==null||m.forEach(C=>{C.value=M[C==null?void 0:C.prop]}),u.value="update",E.visible=!0;break;case"delete":b.value.splice(M,1),u.value="delete";break}},W=$=>{var M,L,m,C;if(($==null?void 0:$.buttonName)==="确认"){const h=D.cloneDeep($==null?void 0:$.content);switch(Object.keys(h).forEach(w=>{h[w]===""&&delete h[w]}),u.value){case"create":(L=b.value)==null||L.push({...h,index:((M=b.value)==null?void 0:M.length)+1});break;case"update":b.value=(m=b.value)==null?void 0:m.map(w=>w.index===(h==null?void 0:h.index)?{...w,content:h==null?void 0:h.content,timestamp:h==null?void 0:h.timestamp}:w);break}l("change",(C=N())==null?void 0:C.compData),E.visible=!1}else E.visible=!1},N=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:s.value}]}),pe=()=>{E.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,$=>{var M,L;$&&(s.value=((M=$==null?void 0:$.find(m=>m.key==="timeLineConfig"))==null?void 0:M.contents)??{},b.value=((L=$==null?void 0:$.find(m=>m.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),($,M)=>{const L=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",sc,[M[2]||(M[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:M[0]||(M[0]=C=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[M[1]||(M[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(C,h)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:h},[e.createElementVNode("span",null,e.toDisplayString(C==null?void 0:C.content),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:w=>F("update",{...C,index:h+1})},{default:e.withCtx(()=>M[3]||(M[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:w=>F("delete",h)},{default:e.withCtx(()=>M[4]||(M[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",uc,[M[5]||(M[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(It.ssForm,{rowContents:v.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:pe,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",dc,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:W},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),fc=Ft._export_sfc(pc,[["__scopeId","data-v-39ffc861"]]),hc={};function vc(a,r){return e.openBlock(),e.createElementBlock("div")}const gc=Ft._export_sfc(hc,[["render",vc]]),mc={class:"extra-content"},yc={key:0},bc={key:1},kc={class:"dialog-footer"},xc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:r}){const i=a,l=e.ref(0),u=e.ref(),s=e.ref(),b=r,v=e.ref(!1),p=e.ref({}),x=e.ref({}),E=e.ref();e.watch(()=>[i.itemData],()=>{var C;const m=D.cloneDeep(i.itemData);u.value=(C=D.cloneDeep(m))==null?void 0:C.map(h=>{var w;if(h.key==="extra"){let g=[];(w=h.value)==null||w.forEach(J=>{var Ee;g.push((Ee=Object.values(J))==null?void 0:Ee[0])}),h.value=g}return h})},{deep:!0,immediate:!0});const O=(m,C,h,w)=>{var J;let g={};((J=m==null?void 0:m[0])==null?void 0:J.contents)==="详情"&&(v.value=!0,g[C]=m,s.value=m==null?void 0:m.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),p.value=g,x.value=h,E.value=w.id)},F=m=>{var Ee,Qe,re,Be;const C=(Qe=(Ee=Object.values(D.cloneDeep(p.value)))==null?void 0:Ee[0])==null?void 0:Qe.filter(Oe=>(Oe==null?void 0:Oe.key)==="tableContentName"),h=(Be=(re=Object.values(D.cloneDeep(p.value)))==null?void 0:re[0])==null?void 0:Be.filter(Oe=>(Oe==null?void 0:Oe.key)!=="tableContentName"),w=h==null?void 0:h.map((Oe,R)=>{var le;return R===m.index&&(Oe==null?void 0:Oe.comp)==="Table"&&(Oe.compData=(le=Oe.compData)==null?void 0:le.map(oe=>{var fe,$e;return(oe==null?void 0:oe.key)==="tableContents"&&(oe.contents=($e=(fe=m.content)==null?void 0:fe.map(tt=>{let X={};for(let z in tt)z!=="id"&&(X[z]=tt[z]);return X}))==null?void 0:$e.map(tt=>Object.values(tt))),oe})),Oe});w.unshift(C==null?void 0:C[0]);let g=D.cloneDeep(p.value),J={};for(let Oe in g)J[Oe]=w;p.value=J},W=()=>{v.value=!1,p.value={},x.value={},E.value=void 0,l.value++},N=m=>{var Ee,Qe,re,Be;const C=(Qe=(Ee=Object.values(D.cloneDeep(p.value)))==null?void 0:Ee[0])==null?void 0:Qe.filter(Oe=>(Oe==null?void 0:Oe.key)==="tableContentName"),h=(Be=(re=Object.values(D.cloneDeep(p.value)))==null?void 0:re[0])==null?void 0:Be.filter(Oe=>(Oe==null?void 0:Oe.key)!=="tableContentName"),w=h==null?void 0:h.map((Oe,R)=>(R===m.index&&(Oe.compData=m.contents),Oe));w.unshift(C==null?void 0:C[0]);let g=D.cloneDeep(p.value),J={};for(let Oe in g)J[Oe]=w;p.value=J},pe=()=>{var C,h;let m={};for(let w in x.value)w===((C=Object.keys(p.value))==null?void 0:C[0])?m[w]=(h=Object.values(p.value))==null?void 0:h[0]:m[w]=x.value[w];b("change",{buttonName:"编辑",index:E.value,singleContent:m},"methodData"),v.value=!1,p.value={},x.value={},E.value=void 0},$=()=>{v.value=!1,p.value={},x.value={},E.value=void 0},M=m=>{b("change",m,"methodData")},L=m=>ra(m);return(m,C)=>{const h=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(w,g)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(w==null?void 0:w.key)==="extra"?(e.openBlock(),e.createElementBlock("div",yc)):(e.openBlock(),e.createElementBlock("div",bc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(w.comp)),{itemData:w==null?void 0:w.compData,childItemData:w==null?void 0:w.itemChildData,key:g,index:(w==null?void 0:w.id)??g,onContentClick:O,onChange:M},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Jt.ssDialog,{visible:v.value,onBeforeDestroy:$},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(w,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(w.comp)),{itemData:w==null?void 0:w.compData,onChange:F,childItemData:w==null?void 0:w.itemChildData,key:g,onContentChange:N,index:(w==null?void 0:w.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",kc,[e.createVNode(h,{class:"cancel-button footer-button",onClick:W,id:"themeBorderButton"},{default:e.withCtx(()=>C[0]||(C[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(h,{class:"confirm-button footer-button",onClick:pe,id:"themeButton"},{default:e.withCtx(()=>C[1]||(C[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},wc=Ft._export_sfc(xc,[["__scopeId","data-v-2d9c5ab2"]]),Dc={key:0,class:"method-content"},_c={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const r=e.ref([]),i=Ve.useOriginalState(D.pinia),{originalPath:l}=D.storeToRefs(i),u=a,s=e.ref(!1),b=e.ref(),v=Ve.useTableComp(D.pinia),{multipleTableConst:p}=D.storeToRefs(v),x=D.useModelComp(D.pinia),E=e.ref(!1),O=D.useMenuState(D.pinia),F=D.useLoginState(D.pinia),{itemData:W,isEdit:N,routeToChildPath:pe,tableViewContents:$,lockingPage:M,payloadTypes:L}=D.storeToRefs(x),{activeMenuPath:m,platform:C,childMenu:h}=D.storeToRefs(O),{loginUserInfo:w}=D.storeToRefs(F),g=e.ref(!1),J=async()=>{var X,z;(X=r.value)!=null&&X.find(ie=>(ie==null?void 0:ie.buttonName)==="保存")&&await oe((z=r.value)==null?void 0:z.find(ie=>(ie==null?void 0:ie.buttonName)==="保存")),await Ve.onSaveBack()};e.watch(()=>W.value,async()=>{N.value==="view"&&!g.value&&await tt(D.cloneDeep(u.itemData)),g.value=!1},{deep:!0});const Ee=()=>{s.value=!1,b.value=void 0},Qe=X=>X.map(z=>{const ie={};for(const Z in z){const ve=z[Z];if(Z.includes(p.value)){const we=Z.split(p.value);let Ce=ie;we.forEach((te,ke)=>{ke===we.length-1?Ce[te]=ve:(Ce[te]||(Ce[te]={}),Ce=Ce[te])})}else ie[Z]=ve}return ie}),re=async(X,z,ie=[])=>{var ve,we,Ce,te,ke,T,Ge,Ye,Ae,ce,ne,de,Se,qe,dt;let Z=(ve=D.cloneDeep(z))==null?void 0:ve.filter(y=>(y==null?void 0:y.comp)!=="methodButton");if(X!=null&&X.includes("[")){let y=(T=(ke=(te=(Ce=(we=D.cloneDeep(X))==null?void 0:we.split("["))==null?void 0:Ce[1])==null?void 0:te.split("]"))==null?void 0:ke[0])==null?void 0:T.split(":"),I="";if(y!=null&&y[0]){let H=(Ge=Z==null?void 0:Z.find(Q=>(Q==null?void 0:Q.name)===(y==null?void 0:y[0])))==null?void 0:Ge.compData;if(!H){let Q=(Ye=X==null?void 0:X.split("["))==null?void 0:Ye[0],S=await Ve.getItemData(Q,sessionStorage.getItem("systemKey"),"",!1,"","",ie);H=(Ae=S==null?void 0:S.find(se=>(se==null?void 0:se.name)===(y==null?void 0:y[0])))==null?void 0:Ae.compData}H==null||H.forEach(Q=>{var S,se,Me,A,ae,U;if((Q==null?void 0:Q.key)==="formContent")(S=Q==null?void 0:Q.contents)==null||S.forEach(q=>{var Te;(q==null?void 0:q.key)===(y==null?void 0:y[1])&&(Array.isArray(q==null?void 0:q.value)?I=q==null?void 0:q.value:I=(Te=q==null?void 0:q.value)==null?void 0:Te.toString())});else if((Q==null?void 0:Q.key)==="tableContents"){let q=[],Te=(se=H==null?void 0:H.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:se.contents,ue=(y==null?void 0:y[1])??"";if(Te!=null&&Te.every(G=>Array.isArray(G))){let G=Ve.getColumnChild((ae=Te==null?void 0:Te[0])==null?void 0:ae.filter(ee=>(ee==null?void 0:ee.label)!=="操作"));(U=Q.contents)==null||U.forEach(ee=>{let he={};ee=ee==null?void 0:ee.filter(ye=>!(ye!=null&&ye.id)),G==null||G.forEach((ye,_e)=>{let xe=ee[_e];typeof ee[_e]=="number"&&(xe=ee[_e].toString()),(ue===""||ue===ye.prop)&&(he[ye.prop]=xe)}),q.push(he)}),q=Qe(q)}else{let G=(Me=Te==null?void 0:Te.map(ee=>ee==null?void 0:ee.label))==null?void 0:Me.filter(ee=>ee!=="操作");(A=Q.contents)==null||A.forEach(ee=>{let he={};ee=ee==null?void 0:ee.filter(ye=>!(ye!=null&&ye.id)),G==null||G.forEach((ye,_e)=>{let xe=ee[_e];typeof ee[_e]=="number"&&(xe=ee[_e].toString()),(ue===""||ue===ye)&&(he[ye]=xe)}),q.push(he)})}I=q}})}return I}else if(X!=null&&X.includes("/")){let y={};return(ce=D.cloneDeep(Z))==null||ce.forEach((I,H)=>{var Q,S,se,Me,A,ae,U,q,Te,ue,G,ee,he,ye,_e,xe,K,Re,be;if((I==null?void 0:I.comp)==="Table"){let Ke=Array.isArray((se=(S=(Q=I==null?void 0:I.compData)==null?void 0:Q.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:S.contents)==null?void 0:se[0])?(U=(ae=(A=(Me=I==null?void 0:I.compData)==null?void 0:Me.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:A.contents)==null?void 0:ae[0])==null?void 0:U.some(Ne=>Ne==null?void 0:Ne.children):[],ot=(ue=(Te=(q=I==null?void 0:I.compData)==null?void 0:q.find(Ne=>(Ne==null?void 0:Ne.key)==="tableContents"))==null?void 0:Te.contents)==null?void 0:ue.map(Ne=>(Ne!=null&&Ne.find(gt=>gt==null?void 0:gt.id)&&(Ne=Ne.slice(1)),Ne)),je=(_e=(ye=(he=(ee=(G=I==null?void 0:I.compData)==null?void 0:G.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:ee.contents)==null?void 0:he[0])==null?void 0:ye[0])==null?void 0:_e.label,at=(K=(xe=I==null?void 0:I.compData)==null?void 0:xe.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:K.contents;if(Ke)(Ke==null?void 0:Ke.length)===0?y[I.name]=y!=null&&y[I.name]?y[I.name]:Ve.tableToForm(ot,at):y[je]=Ve.tableToForm(ot,at);else{const Ne=[];at=at.slice(1,at.length-1),at==null||at.forEach((gt,et)=>{ot==null||ot.forEach(ze=>{Ne.push({key:gt.label+ze[0],value:ze[et+1]})})}),y["form"+H]=Ne}}else{const Ke=(be=(Re=I.compData)==null?void 0:Re.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:be.contents;y!=null&&y.form||(y.form=[]);const ot=[];Ke==null||Ke.forEach(je=>{je.key!==""&&(je={key:(je==null?void 0:je.key)??(je==null?void 0:je.label),value:je==null?void 0:je.value},ot.push(je))}),y.form=[...ot,...D.cloneDeep(y==null?void 0:y.form)]}}),y}else{if(X==="createInsofDataApi"){let y=(ne=D.cloneDeep(z))==null?void 0:ne[0];return y={comp:(de=D.cloneDeep(y))==null?void 0:de.comp,compData:(Se=D.cloneDeep(y))==null?void 0:Se.compData,name:(qe=D.cloneDeep(y))==null?void 0:qe.name,isShow:(dt=D.cloneDeep(y))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:m.value},value:{pageData:y}}}return X}},Be=async(X,z,ie)=>{var we,Ce,te;let Z=await Ve.getItemData(z,sessionStorage.getItem("systemKey"),""),ve=Z==null?void 0:Z.find(ke=>(ke==null?void 0:ke.name)===(ie==null?void 0:ie[0]));if(ve){if((ve==null?void 0:ve.comp)==="Table"){let ke={};for(let de in D.cloneDeep(X))D.cloneDeep(X)[de]!=="loginUser"?ke[de]=D.cloneDeep(X)[de]:ke[de]=((we=w.value)==null?void 0:we.account)||((Ce=w.value)==null?void 0:Ce.账号);let T=[],Ge=ke;Array.isArray(X)||(Ge=[ke]),Ge==null||Ge.forEach(de=>{T.push({[de[ie[1]]]:de})});let Ye=[],Ae=T==null?void 0:T.map(de=>{var Se;return(Se=Object.keys(de))==null?void 0:Se[0]});Z==null||Z.forEach(de=>{var Se;(de==null?void 0:de.name)===(ie==null?void 0:ie[0])&&((Se=de==null?void 0:de.compData)==null||Se.forEach(qe=>{var dt;(qe==null?void 0:qe.key)==="tableContents"&&((dt=qe==null?void 0:qe.contents)==null||dt.forEach(y=>{y!=null&&y.some(I=>Ae.includes(I))&&Ye.push({[y.find(I=>I.id).id]:y.find(I=>Ae.includes(I))})}))}))});let ce=Ye==null?void 0:Ye.map(de=>{var Se;return(Se=Object.keys(de))==null?void 0:Se[0]}),ne=[];if(ce==null||ce.forEach(de=>{var dt;let Se=(dt=Ye==null?void 0:Ye.find(y=>{var I;return((I=Object.keys(y))==null?void 0:I[0].toString())===de.toString()}))==null?void 0:dt[de],qe=T==null?void 0:T.find(y=>{var I;return((I=Object.keys(y))==null?void 0:I[0])===Se});ne.push({id:parseInt(de),value:{tableData:qe[Se]}})}),(ne==null?void 0:ne.length)>0)return ne}else if((ve==null?void 0:ve.comp)==="Form"){let ke=D.cloneDeep(ve);ke.compData=(te=ke.compData)==null?void 0:te.map(Ye=>{var Ae;return(Ye==null?void 0:Ye.key)==="formContent"&&(Ye.contents=(Ae=Ye.contents)==null?void 0:Ae.map(ce=>((ce==null?void 0:ce.key)===(ie==null?void 0:ie[1])&&(ce.value=(X==null?void 0:X[ce==null?void 0:ce.prop])||X),ce))),Ye});let T={};for(let Ye in ke)Ye!=="id"&&(T[Ye]=ke[Ye]);let Ge=[];if(Ge.push({id:ve==null?void 0:ve.id,keyType:ie==null?void 0:ie[1],value:{pageData:T}}),(Ge==null?void 0:Ge.length)>0)return Ge}}},Oe=async(X,z,ie)=>{var we,Ce,te,ke,T,Ge,Ye,Ae,ce,ne;let Z=await Ve.getItemData(z,sessionStorage.getItem("systemKey"),""),ve=Z==null?void 0:Z.find(de=>(de==null?void 0:de.name)===(ie==null?void 0:ie[0]));if(ve){if((ve==null?void 0:ve.comp)==="Table"){let de={};for(let Se in D.cloneDeep(X))D.cloneDeep(X)[Se]!=="loginUser"?de[Se]=D.cloneDeep(X)[Se]:de[Se]=((we=w.value)==null?void 0:we.account)||((Ce=w.value)==null?void 0:Ce.账号);await rt.createInsofDataApi({key:{type:"data",pageKey:z,tableId:ve==null?void 0:ve.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:de}})}else if((ve==null?void 0:ve.comp)==="Form"){let de=D.cloneDeep(ve),Se=Object.keys(X),qe="";(ke=(te=D.cloneDeep(de))==null?void 0:te.compData)==null||ke.forEach(S=>{var se,Me;(S==null?void 0:S.key)==="formContent"&&((Me=(se=D.cloneDeep(S))==null?void 0:se.contents)==null||Me.forEach(A=>{var ae;Se.includes(A==null?void 0:A.key)&&(A==null?void 0:A.value)===((ae=w.value)==null?void 0:ae.姓名)&&(qe=A==null?void 0:A.key)}))});let dt=[];(T=Object.values(X[qe]))==null||T.forEach(S=>{S!=null&&S.includes("(")&&dt.push(S)}),dt=[...new Set(dt)];const y=dt==null?void 0:dt.map(async S=>{var U,q,Te,ue,G,ee,he,ye,_e,xe,K,Re;let se="";(ee=(G=(ue=(Te=(q=(U=D.cloneDeep(S))==null?void 0:U.split("("))==null?void 0:q[1])==null?void 0:Te.split(")"))==null?void 0:ue[0])==null?void 0:G.split(":"))==null||ee.forEach(be=>{se=se===""?se+be.replaceAll("'",""):se+"/"+be.replaceAll("'","")});let Me=[];(Re=(K=(xe=(_e=(ye=(he=D.cloneDeep(S))==null?void 0:he.split("<"))==null?void 0:ye[1])==null?void 0:_e.split(">"))==null?void 0:xe[0])==null?void 0:K.split(":"))==null||Re.forEach(be=>{Me.push(be.replaceAll("'",""))});const A=await Ve.getItemData(se,sessionStorage.getItem("systemKey"),"");let ae="";return A==null||A.forEach(be=>{var Ke;be.name===(Me==null?void 0:Me[0])&&((Ke=be==null?void 0:be.compData)==null||Ke.forEach(ot=>{var je;(ot==null?void 0:ot.key)==="formContent"&&((je=ot.contents)==null||je.forEach(at=>{(at==null?void 0:at.key)===(Me==null?void 0:Me[1])&&(ae=at==null?void 0:at.value)}))}))}),{[S]:ae}}),I=await Promise.all(y);de.compData=(Ye=(Ge=D.cloneDeep(de))==null?void 0:Ge.compData)==null?void 0:Ye.map(S=>{var se,Me;return(S==null?void 0:S.key)==="formContent"&&(S.contents=(Me=(se=D.cloneDeep(S))==null?void 0:se.contents)==null?void 0:Me.map(A=>{var ae,U,q,Te;return(ae=X[qe])!=null&&ae[A==null?void 0:A.key]&&(X[qe][A==null?void 0:A.key].includes("(")?A.value=(U=I==null?void 0:I.find(ue=>{var G;return((G=Object.keys(ue))==null?void 0:G[0])===X[qe][A==null?void 0:A.key]}))==null?void 0:U[X[qe][A==null?void 0:A.key]]:A.value=(Te=(q=D.cloneDeep(X))==null?void 0:q[qe])==null?void 0:Te[A==null?void 0:A.key]),A})),S});const H=await rt.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let Q="";((Ae=H==null?void 0:H.data)==null?void 0:Ae.type)==="success"&&((ne=(ce=H==null?void 0:H.data)==null?void 0:ce.result)==null||ne.forEach(S=>{var se,Me;((Me=(se=S==null?void 0:S.value)==null?void 0:se.pageData)==null?void 0:Me.name)===(ie==null?void 0:ie[0])&&(Q=S.id)}),await rt.updateInsofDataApi({id:Q,value:{pageData:de}}))}}},R=(X,z="",ie={})=>{for(const[Z,ve]of Object.entries(X)){const we=z?`${z}.${Z}`:Z;ve!==null&&typeof ve=="object"&&!Array.isArray(ve)&&Object.prototype.toString.call(ve)!=="[object Date]"?R(ve,we,ie):ie[we]=ve}return ie},le=async(X,z,ie,Z)=>{var Ce,te,ke,T,Ge,Ye,Ae,ce,ne,de,Se,qe,dt,y,I,H,Q,S,se,Me,A,ae,U,q,Te;let ve=await Ve.getItemData(z,sessionStorage.getItem("systemKey"),""),we=ve==null?void 0:ve.find(ue=>(ue==null?void 0:ue.name)===(ie==null?void 0:ie[0]));if(we){if(!(ie!=null&&ie[1])&&(we==null?void 0:we.comp)==="Table"){let ue={},G=[],ee=(te=(Ce=we==null?void 0:we.compData)==null?void 0:Ce.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:te.contents;ee!=null&&ee.every(_e=>Array.isArray(_e))?G=(T=Ve.getColumnChild((ke=ee==null?void 0:ee[0])==null?void 0:ke.filter(_e=>(_e==null?void 0:_e.label)!=="操作")))==null?void 0:T.map(_e=>_e==null?void 0:_e.prop):G=ee==null?void 0:ee.map(_e=>_e==null?void 0:_e.label);for(let _e in D.cloneDeep(X))if(D.cloneDeep(X)[_e]!=="loginUser"){let xe=R(D.cloneDeep(X)[_e]),K={};for(let Re in xe)if(G!=null&&G.find(be=>be===Re))K[Re]=xe[Re];else if(G!=null&&G.find(be=>(be==null?void 0:be.toUpperCase())===(Re==null?void 0:Re.toUpperCase()))){let be=G==null?void 0:G.find(Ke=>(Ke==null?void 0:Ke.toUpperCase())===(Re==null?void 0:Re.toUpperCase()));K[be]=xe[Re]}ue[_e]=K}else ue[_e]=((Ge=w.value)==null?void 0:Ge.account)||((Ye=w.value)==null?void 0:Ye.账号);let he=await rt.getInsofDataApi({keyLikes:{tableId:we==null?void 0:we.id}});if(((ce=(Ae=he==null?void 0:he.data)==null?void 0:Ae.result)==null?void 0:ce.length)>0){let _e=(de=(ne=he==null?void 0:he.data)==null?void 0:ne.result)==null?void 0:de.map(xe=>xe==null?void 0:xe.id);(_e==null?void 0:_e.length)>0&&await rt.batchDeleteInsofDataApi({ids:_e})}let ye=[];if((Se=we==null?void 0:we.compData)!=null&&Se.find(_e=>(_e==null?void 0:_e.key)==="pageColumn")&&((y=(dt=(qe=we==null?void 0:we.compData)==null?void 0:qe.find(_e=>(_e==null?void 0:_e.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&y.includes("["))){const _e=await rt.getInsofDataApi({id:we==null?void 0:we.tableId});let xe=((S=(Q=(H=(I=_e==null?void 0:_e.data)==null?void 0:I.result)==null?void 0:H[0])==null?void 0:Q.key)==null?void 0:S.pageKey)??"";(se=Object.values(ue))==null||se.forEach(K=>{ye.push({key:{type:"data",pageKey:xe,tableId:we==null?void 0:we.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:K}})})}else(Me=Object.values(ue))==null||Me.forEach(_e=>{ye.push({key:{type:"data",pageKey:z,tableId:we==null?void 0:we.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_e}})});(ye==null?void 0:ye.length)>0&&await rt.batchAddInsofDataApi({dataList:ye})}else if(!(ie!=null&&ie[1])&&(we==null?void 0:we.comp)==="Form"){let ue=D.cloneDeep(we);ue.compData=(ae=(A=D.cloneDeep(ue))==null?void 0:A.compData)==null?void 0:ae.map(he=>{var ye,_e;return(he==null?void 0:he.key)==="formContent"&&(he.contents=(_e=(ye=D.cloneDeep(he))==null?void 0:ye.contents)==null?void 0:_e.map(xe=>{var K,Re;return(K=D.cloneDeep(X))!=null&&K[xe==null?void 0:xe.key]&&(xe.value=(Re=D.cloneDeep(X))==null?void 0:Re[xe==null?void 0:xe.key]),xe})),he});const G=await rt.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let ee="";((U=G==null?void 0:G.data)==null?void 0:U.type)==="success"&&((Te=(q=G==null?void 0:G.data)==null?void 0:q.result)==null||Te.forEach(he=>{var ye,_e;((_e=(ye=he==null?void 0:he.value)==null?void 0:ye.pageData)==null?void 0:_e.name)===(ie==null?void 0:ie[0])&&(ee=he.id)}),await rt.updateInsofDataApi({id:ee,value:{pageData:ue}}))}}},oe=async X=>{var z,ie,Z,ve,we,Ce,te,ke,T,Ge,Ye,Ae,ce,ne,de,Se;O.setImportLoading(!0);try{if(X.api){let qe=new WeakMap;(ie=(z=(await rt.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:L.value})).data.result)==null?void 0:z.filter(U=>{var q,Te;return((q=U==null?void 0:U.key)==null?void 0:q.pageKey)!=="menu"&&((Te=U==null?void 0:U.key)==null?void 0:Te.pageKey)!=="secret"}))==null||ie.forEach(U=>{qe[U.key.pageKey]?qe[U.key.pageKey]=[...qe[U.key.pageKey],U]:qe[U.key.pageKey]=[U]});let y=await Ve.getItemData((h==null?void 0:h.value)===""?m.value:h==null?void 0:h.value,sessionStorage.getItem("systemKey"),"",!1,"","",qe),I="";if(y=y==null?void 0:y.map(U=>{var q,Te,ue,G,ee,he,ye,_e,xe,K,Re,be;if((U==null?void 0:U.comp)==="Form")U.compData=(q=U.compData)==null?void 0:q.map(Ke=>{var ot;return(Ke==null?void 0:Ke.key)==="formContent"&&(Ke.contents=(ot=Ke.contents)==null?void 0:ot.map(je=>{var at;if((je==null?void 0:je.value)===""&&(je==null?void 0:je.type)==="Select"){let Ne=Ve.judgeContents((at=D.cloneDeep(je))==null?void 0:at.optionUrl,qe);je.value=je.value||Ne}return je})),Ke});else if((U==null?void 0:U.comp)==="Table"&&(Te=U.compData)!=null&&Te.find(Ke=>(Ke==null?void 0:Ke.key)==="pageColumn")){let Ke=(G=(ue=U.compData)==null?void 0:ue.find(Ne=>(Ne==null?void 0:Ne.key)==="pageColumn"))==null?void 0:G.contents,ot=((he=(ee=U.compData)==null?void 0:ee.find(Ne=>(Ne==null?void 0:Ne.key)==="pageGroup"))==null?void 0:he.contents)??"",je=(xe=(_e=(ye=Ke==null?void 0:Ke.split("["))==null?void 0:ye[1])==null?void 0:_e.split("]"))==null?void 0:xe[0];I=((K=Ke==null?void 0:Ke.split("["))==null?void 0:K[0])+((be=(Re=$.value)==null?void 0:Re.find(Ne=>(Ne==null?void 0:Ne.key)===je))==null?void 0:be.value)}return U}),!(I===""||I==="")){const U=await Ve.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,"","",qe);y=y==null?void 0:y.map(q=>{var Te,ue,G,ee,he,ye,_e,xe,K,Re,be,Ke,ot;if((q==null?void 0:q.comp)==="Table"&&(Te=q.compData)!=null&&Te.find(je=>(je==null?void 0:je.key)==="pageColumn")){let je=(G=(ue=q.compData)==null?void 0:ue.find(ze=>(ze==null?void 0:ze.key)==="pageColumn"))==null?void 0:G.contents,at=((he=(ee=q.compData)==null?void 0:ee.find(ze=>(ze==null?void 0:ze.key)==="pageGroup"))==null?void 0:he.contents)??"",Ne=(xe=(_e=(ye=je==null?void 0:je.split("["))==null?void 0:ye[1])==null?void 0:_e.split("]"))==null?void 0:xe[0],gt=((K=je==null?void 0:je.split("["))==null?void 0:K[0])+((be=(Re=$.value)==null?void 0:Re.find(ze=>(ze==null?void 0:ze.key)===Ne))==null?void 0:be.value),et=(Ke=U==null?void 0:U.find(ze=>(ze==null?void 0:ze.name)===(at===""?u==null?void 0:u.compName:at)))==null?void 0:Ke.compData;q.compData=(ot=q.compData)==null?void 0:ot.map(ze=>{var it;return(ze==null?void 0:ze.key)==="tableContents"&&(ze.contents=(it=et==null?void 0:et.find(mt=>(mt==null?void 0:mt.key)==="tableContents"))==null?void 0:it.contents),ze})}return q})}let H={};if(((ve=(Z=X==null?void 0:X.extraValues)==null?void 0:Z.input)==null?void 0:ve.length)>0){const U=(Ce=(we=X==null?void 0:X.extraValues)==null?void 0:we.input)==null?void 0:Ce.map(async q=>{var Te;fe!=null&&fe.find(ue=>ue===q)?H=await re(q,y):H[Object.keys(q)[0]]=await re((Te=Object.values(q))==null?void 0:Te[0],y,qe)});await Promise.all(U)}else H=await re("/",y);let Q=!1;(ke=(te=X==null?void 0:X.extraValues)==null?void 0:te.output)==null||ke.forEach(U=>{var q,Te;(Te=(q=Object.values(U))==null?void 0:q[0])!=null&&Te.includes(".doc")&&(Q=!0)});let S;if(Q){const U=It.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});S=await rt.axios.post(X.api,H,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{U.close()})}else S=await rt.axios.post(X.api,H,{headers:{"Content-Type":"application/json"}});let se=(Ae=(Ye=(Ge=(T=D.cloneDeep(X))==null?void 0:T.extraValues)==null?void 0:Ge.output)==null?void 0:Ye.map(U=>{var q,Te,ue,G,ee,he,ye,_e,xe,K,Re,be,Ke,ot,je,at;if(!((Te=(q=Object.values(U))==null?void 0:q[0])!=null&&Te.includes(".doc"))){let Ne=(K=(xe=(_e=(G=D.cloneDeep((ue=Object.values(U))==null?void 0:ue[0]))==null?void 0:G.split("["))==null?void 0:_e[((ye=(he=D.cloneDeep((ee=Object.values(U))==null?void 0:ee[0]))==null?void 0:he.split("["))==null?void 0:ye.length)-1])==null?void 0:xe.split("]"))==null?void 0:K[0],gt=Ne==null?void 0:Ne.split(":"),et=(Ke=D.cloneDeep((Re=Object.values(U))==null?void 0:Re[0]))==null?void 0:Ke.substring(0,D.cloneDeep((be=Object.values(U))==null?void 0:be[0]).lastIndexOf("["));if(et=(je=D.cloneDeep(et))==null?void 0:je.slice(0,((ot=D.cloneDeep(et))==null?void 0:ot.length)-1),et!=null&&et.includes("[")){let ze="";if((at=Ve.contentTransArrayToAll(et,"/"))==null||at.forEach(it=>{var mt,Je,Ue,Nt,Ie,Xe,Fe;if(!(it!=null&&it.includes("[")))ze=ze===""?ze+it.replaceAll("/",""):ze+"/"+it.replaceAll("/","");else{let Ze=D.cloneDeep(it).slice(1,((mt=D.cloneDeep(it))==null?void 0:mt.length)-1),B=(Xe=(Ie=(Nt=(Ue=(Je=D.cloneDeep(Ze))==null?void 0:Je.split("["))==null?void 0:Ue[1])==null?void 0:Nt.split("]"))==null?void 0:Ie[0])==null?void 0:Xe.split(":"),ge="",We=(Fe=y==null?void 0:y.find(me=>(me==null?void 0:me.name)===(B==null?void 0:B[0])))==null?void 0:Fe.compData;We==null||We.forEach(me=>{var ut;(me==null?void 0:me.key)==="formContent"&&((ut=me==null?void 0:me.contents)==null||ut.forEach(st=>{(st==null?void 0:st.key)===(B==null?void 0:B[1])&&(ge=st==null?void 0:st.value)}))}),ze=ze===""?ze+ge.replaceAll("/",""):ze+"/"+ge.replaceAll("/","")}}),et=ze,et[(et==null?void 0:et.length)-1]!=="/")return et}}}))==null?void 0:Ae.filter(U=>U);se=[...new Set(D.cloneDeep(se))];let Me=se==null?void 0:se.map(async U=>{let q=await Ve.getItemData(U,sessionStorage.getItem("systemKey"),"",!1,"","",qe);if((q==null?void 0:q.length)===0)return await Ve.getParentContents(U)});await Promise.all(Me);let A=[],ae=(de=(ne=(ce=D.cloneDeep(X))==null?void 0:ce.extraValues)==null?void 0:ne.output)==null?void 0:de.map(async U=>{var _e,xe,K,Re,be,Ke,ot,je,at,Ne,gt,et,ze,it,mt,Je,Ue,Nt,Ie,Xe,Fe,Ze,B,ge,We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut,vt,zt,$t,Kt,qt,Qt,Lt,Tn,Fn,kn,Ln,xn,$n,jn,Un,Kn,Wn,Bn,mn,dn,wn,yn,on,hn,Hn,In,Nn,Dn,qn,Xn,An,Gn,Yn,Et,Zt;if((xe=(_e=Object.values(U))==null?void 0:_e[0])!=null&&xe.includes(".doc")){var q=new Blob([S.data],{type:"application/octet-stream;charset=UTF-8"}),Te=S.headers["content-disposition"],ue=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),G=ue.exec(Te),ee=G==null?void 0:G[1],he=document.createElement("a"),ye=window.URL.createObjectURL(q);b.value=[{name:ee,blobUrl:ye}],s.value=!0}else{let yt=(Ne=(at=(je=(Re=D.cloneDeep((K=Object.values(U))==null?void 0:K[0]))==null?void 0:Re.split("["))==null?void 0:je[((ot=(Ke=D.cloneDeep((be=Object.values(U))==null?void 0:be[0]))==null?void 0:Ke.split("["))==null?void 0:ot.length)-1])==null?void 0:at.split("]"))==null?void 0:Ne[0],Mt=yt==null?void 0:yt.split(":"),bt=(ze=D.cloneDeep((gt=Object.values(U))==null?void 0:gt[0]))==null?void 0:ze.substring(0,D.cloneDeep((et=Object.values(U))==null?void 0:et[0]).lastIndexOf("["));if(bt!=null&&bt.includes("[")?bt=(mt=D.cloneDeep(bt))==null?void 0:mt.slice(0,((it=D.cloneDeep(bt))==null?void 0:it.length)-1):bt===""&&(bt=m.value),bt=bt.replaceAll("<","[").replaceAll(">","]"),bt!=null&&bt.includes("[")){let _t="";(Je=Ve.contentTransArrayToAll(bt,"/"))==null||Je.forEach((Dt,Rt)=>{var Ot,Pt,Xt,ln,Vn,Jn,On,Zn,Ta,ia,ga;if(!(Dt!=null&&Dt.includes("[")))_t=_t===""?_t+Dt.replaceAll("/",""):_t+"/"+Dt.replaceAll("/","");else{let sa="",pn="";(Ot=D.cloneDeep(Dt))!=null&&Ot.includes("]")?(sa=D.cloneDeep(Dt).slice(1,((Pt=D.cloneDeep(Dt))==null?void 0:Pt.length)-1),pn=(On=(Jn=(Vn=(ln=(Xt=D.cloneDeep(sa))==null?void 0:Xt.split("["))==null?void 0:ln[1])==null?void 0:Vn.split("]"))==null?void 0:Jn[0])==null?void 0:On.split(":")):(sa=D.cloneDeep(Dt).slice(1,(Zn=D.cloneDeep(Dt))==null?void 0:Zn.length),pn=(Ta=D.cloneDeep(sa))==null?void 0:Ta.split("/"));let Qn="",ca=(ia=y==null?void 0:y.find(rn=>(rn==null?void 0:rn.name)===(pn==null?void 0:pn[0])))==null?void 0:ia.compData;ca==null||ca.forEach(rn=>{var Ba;(rn==null?void 0:rn.key)==="formContent"&&((Ba=rn==null?void 0:rn.contents)==null||Ba.forEach(Mn=>{(Mn==null?void 0:Mn.key)===(pn==null?void 0:pn[1])&&(Qn=Mn==null?void 0:Mn.value)}))}),((ga=Ve.contentTransArrayToAll(bt,"/"))==null?void 0:ga.length)-1!==Rt?_t=_t===""?_t+Qn.replaceAll("/",""):_t+"/"+Qn.replaceAll("/",""):_t=_t+l.value+Qn.replaceAll("/","")}}),(Ue=m.value)!=null&&Ue.includes(_t)?bt=m.value:bt=_t}let Wt=D.cloneDeep((Nt=Object.keys(U))==null?void 0:Nt[0]);if(((Ie=S==null?void 0:S.data)==null?void 0:Ie.statusCode)===200||((Xe=S==null?void 0:S.data)==null?void 0:Xe.code)===200){if(((Ze=(Fe=S==null?void 0:S.data)==null?void 0:Fe.data)!=null&&Ze[Wt]||(ge=(B=S==null?void 0:S.data)==null?void 0:B.result)!=null&&ge[Wt])&&(Mt==null?void 0:Mt.length)===1)return await le(((me=(We=S==null?void 0:S.data)==null?void 0:We.data)==null?void 0:me[Wt])||((st=(ut=S==null?void 0:S.data)==null?void 0:ut.result)==null?void 0:st[Wt]),D.cloneDeep(bt),Mt,I);if((pt=(xt=S==null?void 0:S.data)==null?void 0:xt.data)!=null&&pt[Wt]||(ft=(ct=S==null?void 0:S.data)==null?void 0:ct.result)!=null&&ft[Wt]){let _t=await Be(((Tt=(wt=S==null?void 0:S.data)==null?void 0:wt.data)==null?void 0:Tt[Wt])||((vt=(Ut=S==null?void 0:S.data)==null?void 0:Ut.result)==null?void 0:vt[Wt]),D.cloneDeep(bt),Mt);return _t&&(A=[...A,..._t]),_t}else{if(!((zt=S==null?void 0:S.data)!=null&&zt.data)){let _t=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,"","",qe);_t=_t==null?void 0:_t.map(Rt=>{var Ot;return(Rt==null?void 0:Rt.name)===(Mt==null?void 0:Mt[0])&&(Rt.compData=(Ot=Rt.compData)==null?void 0:Ot.map(Pt=>{var Xt;return(Pt==null?void 0:Pt.key)==="formContent"&&(Pt.contents=(Xt=Pt.contents)==null?void 0:Xt.map(ln=>{var Vn,Jn;return(ln==null?void 0:ln.key)===(Mt==null?void 0:Mt[1])&&(ln.value=(Jn=(Vn=S==null?void 0:S.data)==null?void 0:Vn.result)==null?void 0:Jn[Wt==null?void 0:Wt.replaceAll(":","")]),ln})),Pt})),Rt});let Dt=[];($t=_t==null?void 0:_t.filter(Rt=>(Rt==null?void 0:Rt.comp)==="Form"))==null||$t.forEach(async Rt=>{let Ot={};for(let Pt in Rt)Pt!=="id"&&(Ot[Pt]=Rt[Pt]);Dt.push({id:Rt==null?void 0:Rt.id,value:{pageData:Ot}})}),(Dt==null?void 0:Dt.length)>0&&await rt.batchUpdateInsofDataApi({dataList:Dt});return}if((Mt==null?void 0:Mt.length)===1){const _t=(Qt=(qt=(Kt=S==null?void 0:S.data)==null?void 0:Kt.data)==null?void 0:qt.path)==null?void 0:Qt.path;let Dt="";(Ln=(kn=(Fn=(Tn=(Lt=_t==null?void 0:_t.split("("))==null?void 0:Lt[1])==null?void 0:Tn.split(")"))==null?void 0:Fn[0])==null?void 0:kn.split(":"))==null||Ln.forEach(Pt=>{var Xt,ln;Dt=Dt===""?Dt+((Xt=Pt==null?void 0:Pt.replaceAll("'",""))==null?void 0:Xt.trim()):Dt+"/"+((ln=Pt==null?void 0:Pt.replaceAll("'",""))==null?void 0:ln.trim())});let Rt=[(Kn=(Un=(jn=($n=(xn=_t==null?void 0:_t.split("<"))==null?void 0:xn[1])==null?void 0:$n.split(">"))==null?void 0:jn[0])==null?void 0:Un.replaceAll("'",""))==null?void 0:Kn.trim()],Ot;return(mn=(Bn=(Wn=S==null?void 0:S.data)==null?void 0:Wn.data)==null?void 0:Bn.data)!=null&&mn[Mt==null?void 0:Mt[0]]?Ot=await le((yn=(wn=(dn=S==null?void 0:S.data)==null?void 0:dn.data)==null?void 0:wn.data)==null?void 0:yn[Mt==null?void 0:Mt[0]],Dt,Mt,I):Ot=await Oe((hn=(on=S==null?void 0:S.data)==null?void 0:on.data)==null?void 0:hn.data,Dt,Rt,qe),Ot}else{const _t=(Nn=(In=(Hn=S==null?void 0:S.data)==null?void 0:Hn.data)==null?void 0:In.path)==null?void 0:Nn.path;let Dt="";return(Gn=(An=(Xn=(qn=(Dn=_t==null?void 0:_t.split("("))==null?void 0:Dn[1])==null?void 0:qn.split(")"))==null?void 0:Xn[0])==null?void 0:An.split(":"))==null||Gn.forEach(Ot=>{var Pt,Xt;Dt=Dt===""?Dt+((Pt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Pt.trim()):Dt+"/"+((Xt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Xt.trim())}),await Be((Zt=(Et=(Yn=S==null?void 0:S.data)==null?void 0:Yn.data)==null?void 0:Et.data)==null?void 0:Zt[Mt==null?void 0:Mt[0]],Dt,Mt)}}}}});if(await Promise.all(ae),(A==null?void 0:A.length)>0){let U=[];A==null||A.forEach(ue=>{U!=null&&U.find(G=>{var ee,he,ye,_e;return((he=(ee=G==null?void 0:G.value)==null?void 0:ee.pageData)==null?void 0:he.name)===((_e=(ye=ue==null?void 0:ue.value)==null?void 0:ye.pageData)==null?void 0:_e.name)})||U.push(ue)});let q=[];U==null||U.forEach(ue=>{var he,ye,_e,xe;let G=D.cloneDeep(ue);G.value.pageData.compData=(he=G.value.pageData.compData)==null?void 0:he.map(K=>{var Re;return(K==null?void 0:K.key)==="formContent"&&(K.contents=(Re=K.contents)==null?void 0:Re.map(be=>{var ot,je,at,Ne;let Ke=(ot=D.cloneDeep(A))==null?void 0:ot.find(gt=>(gt==null?void 0:gt.keyType)===(be==null?void 0:be.key));if(Ke){let gt=(Ne=(at=(je=Ke.value.pageData.compData)==null?void 0:je.find(et=>(et==null?void 0:et.key)==="formContent"))==null?void 0:at.contents)==null?void 0:Ne.find(et=>(et==null?void 0:et.key)===(be==null?void 0:be.key));be.value=gt==null?void 0:gt.value}return be})),K}),q.push({id:G==null?void 0:G.id,value:G==null?void 0:G.value});let ee=[];(xe=(_e=(ye=G==null?void 0:G.value)==null?void 0:ye.pageData)==null?void 0:_e.compData)==null||xe.forEach(K=>{var Re;(K==null?void 0:K.key)==="formContent"&&((Re=K==null?void 0:K.contents)==null||Re.forEach(be=>{var Ke,ot,je,at,Ne,gt;if((ot=(Ke=be==null?void 0:be.optionUrl)==null?void 0:Ke.menuSelect)!=null&&ot.find(et=>et==null?void 0:et.includes("[")))if(ee!=null&&ee.find(et=>{var ze,it,mt;return((ze=et==null?void 0:et.key)==null?void 0:ze.join(","))===((mt=(it=be==null?void 0:be.optionUrl)==null?void 0:it.menuSelect)==null?void 0:mt.join(","))})){let et=(je=ee==null?void 0:ee.find(ze=>{var it,mt,Je;return((it=ze==null?void 0:ze.key)==null?void 0:it.join(","))===((Je=(mt=be==null?void 0:be.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:Je.join(","))}))==null?void 0:je.value;et.push({key:be==null?void 0:be.prop,groups:(at=be==null?void 0:be.optionUrl)==null?void 0:at.groupSelect,value:be==null?void 0:be.value}),ee=ee==null?void 0:ee.map(ze=>{var it,mt,Je;return((it=ze==null?void 0:ze.key)==null?void 0:it.join(","))===((Je=(mt=be==null?void 0:be.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:Je.join(","))&&(ze.value=et),ze})}else ee.push({key:(Ne=be==null?void 0:be.optionUrl)==null?void 0:Ne.menuSelect,value:[{key:be==null?void 0:be.prop,groups:(gt=be==null?void 0:be.optionUrl)==null?void 0:gt.groupSelect,value:be==null?void 0:be.value}]})}))}),(ee==null?void 0:ee.length)>0&&(ee=ee==null?void 0:ee.map(K=>{var be;let Re="";return(be=K==null?void 0:K.key)==null||be.forEach(Ke=>{var ot;if(!(Ke!=null&&Ke.includes("[")))Re=Re===""?Re+Ke:Re+"/"+Ke;else{let je="",at=(ot=Ke==null?void 0:Ke.replaceAll("[","").replaceAll("]",""))==null?void 0:ot.split(":");y==null||y.forEach(Ne=>{var gt;(Ne==null?void 0:Ne.name)===(at==null?void 0:at[0])&&((gt=Ne==null?void 0:Ne.compData)==null||gt.forEach(et=>{var ze;(et==null?void 0:et.key)==="formContent"&&((ze=et==null?void 0:et.contents)==null||ze.forEach(it=>{(it==null?void 0:it.prop)===(at==null?void 0:at[1])&&(je=it==null?void 0:it.value)}))}))}),Re=Re+l.value+je}}),K.key=Re,K})),ee==null||ee.forEach(K=>{var ot,je,at;let Re=(ot=qe[K.key])==null?void 0:ot.find(Ne=>{var gt,et,ze,it,mt,Je,Ue;return((et=(gt=Ne==null?void 0:Ne.value)==null?void 0:gt.pageData)==null?void 0:et.name)===((mt=(it=(ze=K==null?void 0:K.value)==null?void 0:ze[0])==null?void 0:it.groups)==null?void 0:mt[0])&&((Ue=(Je=Ne==null?void 0:Ne.value)==null?void 0:Je.pageData)==null?void 0:Ue.name)!==void 0}),be=Re==null?void 0:Re.id,Ke=(je=Re==null?void 0:Re.value)==null?void 0:je.pageData;Ke.compData=(at=Ke.compData)==null?void 0:at.map(Ne=>{var gt;return(Ne==null?void 0:Ne.key)==="formContent"&&(Ne.contents=(gt=Ne.contents)==null?void 0:gt.map(et=>{var it;let ze=(it=K.value)==null?void 0:it.find(mt=>(mt==null?void 0:mt.key)===(et==null?void 0:et.prop));return ze&&(et.value=ze.value),et})),Ne}),q.push({id:be,value:{pageData:Ke}})})});let Te=(Se=D.cloneDeep(A))==null?void 0:Se[0];(q==null?void 0:q.length)>0&&await rt.batchUpdateInsofDataApi({dataList:q})}x.setFreshContent(!0)}O.setImportLoading(!1)}catch{rt.ElMessage.error("方法执行错误,请查看方法!"),O.setImportLoading(!1)}g.value=!0},fe=["createInsofDataApi"],$e=ml(async X=>{oe(X)},100),tt=async X=>{var te,ke,T,Ge,Ye;const z=D.cloneDeep(X);let ie,Z=new WeakMap,ve=await rt.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:L.value});(ke=(te=ve.data.result)==null?void 0:te.filter(Ae=>{var ce,ne;return((ce=Ae==null?void 0:Ae.key)==null?void 0:ce.pageKey)!=="menu"&&((ne=Ae==null?void 0:Ae.key)==null?void 0:ne.pageKey)!=="secret"}))==null||ke.forEach(Ae=>{Z[Ae.key.pageKey]?Z[Ae.key.pageKey]=[...Z[Ae.key.pageKey],Ae]:Z[Ae.key.pageKey]=[Ae]}),X!=null&&X[0].path&&(ie=await(z==null?void 0:z.map(async(Ae,ce)=>{var H,Q,S,se,Me,A,ae,U,q,Te,ue,G,ee,he,ye,_e;const de=(H=Z[Ae==null?void 0:Ae.path])==null?void 0:H.filter(xe=>{var K;return((K=xe==null?void 0:xe.key)==null?void 0:K.type)==="data"});let Se="";const qe=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Z);de==null||de.forEach(xe=>{var K,Re,be,Ke,ot;((Re=(K=xe==null?void 0:xe.value)==null?void 0:K.tableData)==null?void 0:Re.算法名称)===((be=z==null?void 0:z[ce])==null?void 0:be.method)&&(Se=(ot=(Ke=xe==null?void 0:xe.value)==null?void 0:Ke.tableData)==null?void 0:ot.算法体)});const dt=await Ve.getItemData(Ae==null?void 0:Ae.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,Z);let y="",I=(Me=(se=(S=(Q=dt==null?void 0:dt[0])==null?void 0:Q.compData)==null?void 0:S.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:se.contents)==null?void 0:Me.findIndex(xe=>(xe==null?void 0:xe.prop)==="算法体");return(ae=(A=dt==null?void 0:dt[0])==null?void 0:A.compData)==null||ae.forEach(xe=>{var K;(xe==null?void 0:xe.key)==="tableContents"&&((K=xe==null?void 0:xe.contents)==null||K.forEach(Re=>{Re!=null&&Re.find(be=>be===(Ae==null?void 0:Ae.method))&&(y=Re[I])}))}),{buttonName:((U=z==null?void 0:z[ce])==null?void 0:U.method)||((ue=(Te=(q=de==null?void 0:de[0])==null?void 0:q.value)==null?void 0:Te.tableData)==null?void 0:ue.算法名称),api:(Se===""?(he=(ee=(G=de==null?void 0:de[0])==null?void 0:G.value)==null?void 0:ee.tableData)==null?void 0:he.算法体:Se)||y,content:qe==null?void 0:qe.filter(xe=>xe.comp!=="methodButton"),extraContent:(ye=D.cloneDeep(Ae.value))==null?void 0:ye.slice(1),methodName:(Ae==null?void 0:Ae.path)??"",extraValues:(_e=z==null?void 0:z[ce])==null?void 0:_e.data}})));const we=z==null?void 0:z.map(async Ae=>{var dt,y,I,H,Q,S;const ce=(dt=ve.data.result)==null?void 0:dt.filter(se=>{var Me,A,ae;return((Me=se==null?void 0:se.key)==null?void 0:Me.parentTable)===""&&((A=se==null?void 0:se.key)==null?void 0:A.type)==="method"&&((ae=se==null?void 0:se.key)==null?void 0:ae.methodName)===se.method}),ne=ce==null?void 0:ce[0],de=(y=ve.data.result)==null?void 0:y.filter(se=>{var Me,A;return((Me=se==null?void 0:se.key)==null?void 0:Me.type)==="methodData"&&((A=se==null?void 0:se.key)==null?void 0:A.tableId)===(ne==null?void 0:ne.id)}),Se=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Z),qe=de==null?void 0:de[0];return{buttonName:(I=ne==null?void 0:ne.key)==null?void 0:I.methodKey,api:(Q=(H=qe==null?void 0:qe.value)==null?void 0:H.tableData)==null?void 0:Q[0],content:Se==null?void 0:Se.filter(se=>se.comp!=="methodButton"),extraContent:(S=D.cloneDeep(Ae.value))==null?void 0:S.slice(1),methodName:(Ae==null?void 0:Ae.method)??""}}),Ce=(T=X==null?void 0:X[0])!=null&&T.path&&((Ge=X==null?void 0:X[0])==null?void 0:Ge.path)!==""?await Promise.all(ie):await Promise.all(we);r.value=Ce==null?void 0:Ce.filter(Ae=>Ae==null?void 0:Ae.extraContent),(Ye=r.value)==null||Ye.forEach(Ae=>{var ce;Ae.api===""&&((ce=Ae.content)==null||ce.forEach(ne=>{var de;ne.comp=="Table"&&x.setExtraContents(Ve.methodTableToContent(ne.compData,(de=Ae.extraContent)==null?void 0:de[0]))}))})};return e.watch(()=>u.itemData,async()=>{N.value=="view"&&!g.value&&await tt(D.cloneDeep(u.itemData)),g.value=!1},{immediate:!0,deep:!0}),(X,z)=>{var ie,Z,ve;return e.unref(N)!=="edit"?(e.openBlock(),e.createElementBlock("div",Dc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ie=r.value)==null?void 0:ie.filter(we=>(we==null?void 0:we.buttonName)!=="保存"),we=>{var Ce;return e.openBlock(),e.createElementBlock("div",null,[we.api!==""?(e.openBlock(),e.createBlock(e.unref(Io._sfc_main),{key:0,disabled:e.unref(M)===e.unref(m)&&!((Ce=we==null?void 0:we.buttonName)!=null&&Ce.includes("预览")),class:"calculator-content",modelValue:we.buttonName,onClickTrigger:te=>e.unref($e)(we),loading:E.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(pe)!==""&&((ve=e.unref(m))==null?void 0:ve[((Z=e.unref(m))==null?void 0:Z.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Io._sfc_main),{key:0,class:"calculator-content",onClickTrigger:J,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(It.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Ee},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Ec=Ft._export_sfc(_c,[["__scopeId","data-v-11fca7e0"]]),Cc={};function Sc(a,r){return" 567 "}const Tc=Ft._export_sfc(Cc,[["render",Sc]]),Bc={class:"module content"},Ic={class:"module data"},Nc={class:"module layout"},Ac={class:"form-content"},Vc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),p=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),x=e.ref({}),E=e.ref([]),O=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:x.value}]}),F=$=>{var M;x.value=D.cloneDeep($),l("change",(M=O())==null?void 0:M.compData)},W=$=>{var M,L;if(($==null?void 0:$.buttonName)==="确认"){const m=D.cloneDeep($==null?void 0:$.content);switch(s.value){case"create":E.value.push({...m,index:((M=E.value)==null?void 0:M.length)+1});break}l("change",(L=O())==null?void 0:L.compData),u.visible=!1}else u.visible=!1},N=($,M)=>{var L,m;switch($){case"create":(L=p.value)==null||L.forEach(C=>{C.value=""}),s.value="create",u.visible=!0;break;case"update":(m=p.value)==null||m.forEach(C=>{C.value=M[C==null?void 0:C.prop]}),s.value="update",u.visible=!0;break;case"delete":E.value.splice(M,1),s.value="delete";break}},pe=()=>{u.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,$=>{var M,L;$&&(x.value=((M=$==null?void 0:$.find(m=>m.key==="signConfig"))==null?void 0:M.contents)??{},E.value=((L=$==null?void 0:$.find(m=>m.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),($,M)=>{const L=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Bc,[M[2]||(M[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:M[0]||(M[0]=C=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[M[1]||(M[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ic,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(C,h)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:h},[e.createElementVNode("span",null,e.toDisplayString(C==null?void 0:C.label),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:w=>N("update",{...C,index:h+1})},{default:e.withCtx(()=>M[3]||(M[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:w=>N("delete",h)},{default:e.withCtx(()=>M[4]||(M[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Nc,[e.createVNode(It.ssForm,{rowContents:v.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:pe,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ac,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:W},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Oc=Ft._export_sfc(Vc,[["__scopeId","data-v-487e0536"]]),Mc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:r}){const i=a,l=r,u=e.ref(1),s=e.computed(()=>{var O,F;return(O=i==null?void 0:i.stepConfig)!=null&&O.allowTrigger?u.value:(F=i==null?void 0:i.stepConfig)==null?void 0:F.active}),b=(O,F)=>{u.value=F,l("clickStep",O,F)},v=O=>It.getComponent(O),p=()=>{var F;const O=(F=i==null?void 0:i.stepList)==null?void 0:F.find((W,N)=>N+1===s.value);return console.log("findStep",O),O?O==null?void 0:O.children:[]},x=O=>{l("clickTrigger",O)},E=O=>{l("changeTrigger",O)};return(O,F)=>{var pe,$,M,L,m;const W=e.resolveComponent("el-step"),N=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(N,{direction:(pe=a.stepConfig)==null?void 0:pe.direction,active:s.value,"finish-status":"success",simple:($=a.stepConfig)==null?void 0:$.simple,"align-center":((M=a.stepConfig)==null?void 0:M.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(C,h)=>(e.openBlock(),e.createBlock(W,{key:h,class:"step-item",onClick:w=>b(C,h+1)},{title:e.withCtx(()=>[e.renderSlot(O.$slots,"title",{title:C==null?void 0:C.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(O.$slots,"description",{description:C==null?void 0:C.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((m=a.stepConfig)!=null&&m.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p(),(C,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(C==null?void 0:C.type)),{modelValue:C.value,"onUpdate:modelValue":w=>C.value=w,onClickTrigger:x,onChangeTrigger:E,content:C==null?void 0:C.content},e.createSlots({_:2},[e.renderList(O.$slots,(w,g)=>({name:g,fn:e.withCtx(J=>[e.renderSlot(O.$slots,g,e.mergeProps({ref_for:!0},J||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),zc=Ft._export_sfc(Mc,[["__scopeId","data-v-d7c99969"]]),Rc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:r}){const i=a,l=r,u=e.ref({}),s=e.ref([]),b=(v,p)=>{l("clickStep",v,p)};return e.watch(()=>i==null?void 0:i.itemData,v=>{var p,x;s.value=(p=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:p.contents,u.value=(x=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(v,p)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(zc,{stepConfig:u.value,stepList:s.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(x,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),Pc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(r,i)=>{const l=e.resolveComponent("el-timeline-item"),u=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,b)=>(e.openBlock(),e.createBlock(l,{key:b,timestamp:s.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Fc=Ft._export_sfc(Pc,[["__scopeId","data-v-4172a886"]]),Lc={class:"line-content"},$c={class:"line-time"},jc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const r=a,i=e.ref({}),l=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,u=>{var s,b;l.value=(s=u==null?void 0:u.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:s.contents,i.value=(b=u==null?void 0:u.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(u,s)=>(e.openBlock(),e.createBlock(Fc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:b,timestamp:v})=>[e.createElementVNode("span",Lc,e.toDisplayString(b),1),e.createElementVNode("span",$c,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),Uc=Ft._export_sfc(jc,[["__scopeId","data-v-b4d9deed"]]),Kc={class:"tabs-content"},Wc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const r=a,i=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,l=>{const u=l.find(s=>(s==null?void 0:s.key)=="stepList");u?i.value=u.contents.map(s=>({value:s.value||s.title,label:s.label||s.title,children:s.children||[]})):i.value=r==null?void 0:r.tabsData},{immediate:!0,deep:!0}),(l,u)=>(e.openBlock(),e.createElementBlock("div",Kc,[e.createVNode(It.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},Hc=Ft._export_sfc(Wc,[["__scopeId","data-v-40865f68"]]),Ya=D.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}}}),qc={class:"type-select"},Xc=["onClick"],Gc={class:"list-icon"},Yc={__name:"modelSelect",setup(a){const r=Ya(D.pinia),{itemData:i}=D.storeToRefs(r),l=u=>{const s=D.cloneDeep(i.value);s.push({comp:u.comp,name:u.name,compData:[]}),r.setItemData(s)};return(u,s)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dr),(v,p)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:p},[e.createElementVNode("div",{class:"list-content",onClick:x=>l(v)},[e.createElementVNode("div",Gc,[e.createVNode(b,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,Xc)]))),128))])}}},Jc=Ft._export_sfc(Yc,[["__scopeId","data-v-91799bf8"]]),Zc={class:"fill-content"},Qc={class:"operate-content"},eu={class:"collapse-title-content"},tu={class:"collapse-title-item"},nu={key:1},au=["onClick"],ou={class:"icon-content"},lu={key:0,class:"edit-content"},ru=["onClick"],iu={class:"comp-child"},su={__name:"modelFill",setup(a){const r=Ya(D.pinia),{itemData:i,originalData:l}=D.storeToRefs(r),u=e.ref([]);e.ref([]);const s=e.ref([]),b=e.ref([]),v=W=>{var pe;let N=(pe=D.cloneDeep(b.value))==null?void 0:pe.map(($,M)=>(W===M&&($.content=!0),$));b.value=N},p=W=>{var pe;let N=(pe=D.cloneDeep(b.value))==null?void 0:pe.map(($,M)=>(W===M&&($.content=!1),$));b.value=N,u.value=D.cloneDeep(i.value)},x=(W,N)=>{var L;let pe=(L=D.cloneDeep(b.value))==null?void 0:L.map((m,C)=>(W===C&&(m.content=!1),m));b.value=pe;const $=D.cloneDeep(i.value),M=$==null?void 0:$.filter((m,C)=>(C===W&&(m.name=N),m));r.setOriginalData(M),r.setItemData(M)};e.watch(()=>i.value,()=>{var W,N,pe;!i.value||((W=i.value)==null?void 0:W.length)===0?u.value=[]:u.value=(N=D.cloneDeep(i.value))==null?void 0:N.filter($=>($==null?void 0:$.comp)!=="methodButton"),s.value=u.value,b.value=(pe=D.cloneDeep(s.value))==null?void 0:pe.map(($,M)=>({id:M,content:!1}))},{deep:!0,immediate:!0});const E=W=>ra(W),O=(W,N,pe)=>{var M,L;if(!W)return;let $=D.cloneDeep(i.value);$=(M=$==null?void 0:$.map((m,C)=>(C===pe&&(m.compData=W),m)))==null?void 0:M.filter(m=>(m==null?void 0:m.comp)!=="methodButton"),b.value=(L=D.cloneDeep($))==null?void 0:L.map((m,C)=>({id:C,content:!1})),r.setOriginalData($),r.setItemData($)},F=W=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const N=D.cloneDeep(i.value),pe=N==null?void 0:N.filter(($,M)=>M!==W);r.setOriginalData(pe),r.setItemData(pe),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(W,N)=>{const pe=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Zc,[N[1]||(N[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Qc,[e.createVNode(gl.default,{class:"collapse-content",collapseContents:u.value},{title:e.withCtx(({item:$,index:M})=>{var L,m,C,h,w,g,J,Ee,Qe,re;return[e.createElementVNode("div",eu,[e.createElementVNode("div",tu,[(m=(L=b.value)==null?void 0:L.find(Be=>Be.id===M))!=null&&m.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:$.name&&$.name!==""?"8px":"0px"})},e.toDisplayString($.name),5)),(h=(C=b.value)==null?void 0:C.find(Be=>Be.id===M))!=null&&h.content?(e.openBlock(),e.createElementBlock("div",nu,[e.createVNode(It._sfc_main$2,{modelValue:$.name,"onUpdate:modelValue":Be=>$.name=Be,onClick:N[0]||(N[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(g=(w=b.value)==null?void 0:w.find(Be=>Be.id===M))!=null&&g.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Be=>v(M),["stop"]),class:"icon-content"},[e.createVNode(pe,{name:"Edit",style:{width:"16px",height:"16px"}})],8,au))]),e.createElementVNode("div",ou,[(Ee=(J=b.value)==null?void 0:J.find(Be=>Be.id===M))!=null&&Ee.content?(e.openBlock(),e.createElementBlock("div",lu,[e.createVNode(pe,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Be=>p(M),["stop"])},null,8,["onClick"]),e.createVNode(pe,{name:"Save",onClick:e.withModifiers(Be=>x(M,$.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(re=(Qe=b.value)==null?void 0:Qe.find(Be=>Be.id===M))!=null&&re.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Be=>F(M),["stop"]),class:"icon-content"},[e.createVNode(pe,{name:"Delete",style:{width:"16px",height:"16px"}})],8,ru))])])]}),content:e.withCtx(({item:$,index:M})=>{var L,m;return[e.createElementVNode("div",iu,[e.createTextVNode(e.toDisplayString(E($.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:(m=(L=s.value)==null?void 0:L.find((C,h)=>h===M))==null?void 0:m.compData,onChange:C=>O(C,$,M)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},cu=Ft._export_sfc(su,[["__scopeId","data-v-a46a44b9"]]),uu={key:0,class:"show-content"},du={style:{display:"flex"}},pu={__name:"modelShow",setup(a){const r=Ya(D.pinia),{itemData:i}=D.storeToRefs(r),l=e.ref([]);e.watch(()=>i.value,()=>{var s;!i.value||((s=i.value)==null?void 0:s.length)===0?l.value=[]:l.value=D.cloneDeep(i.value)},{deep:!0,immediate:!0});const u=s=>ra(s);return(s,b)=>{var v;return((v=l.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",uu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(p,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",du,e.toDisplayString(p.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(p.comp)),{itemData:p==null?void 0:p.compData,childItemData:p==null?void 0:p.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},fu=Ft._export_sfc(pu,[["__scopeId","data-v-3f3e863e"]]),hu={class:"tabs-header"},vu={class:"tabs-list"},gu={class:"tab-name"},mu={class:"tab-actions"},yu=["onClick"],bu=["onClick"],ku=["onClick"],xu={class:"model-operate"},wu={class:"model-select",style:{display:"unset"}},Du={class:"existing-components"},_u={class:"component-list"},Eu=["onClick"],Cu={class:"component-info"},Su={class:"component-type"},Tu={class:"component-name"},Bu={class:"model-fill"},Iu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref([]),s=e.ref(!1),b=e.ref(""),v=e.ref({title:""}),p=e.ref(-1),x=e.ref(!1),E=e.ref(-1),O=e.ref(new WeakMap),F=e.ref(null),W=Ya(D.pinia),{itemData:N}=D.storeToRefs(W),pe=()=>{b.value="新增标签页",v.value.title="",p.value=-1,s.value=!0},$=X=>{b.value="修改标签页",v.value.title=u.value[X].title,p.value=X,s.value=!0},M=X=>{const z=C(X);O.value.delete(z),u.value.splice(X,1),tt()},L=()=>{if(v.value.title.trim()){if(p.value===-1){const X={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:m()};u.value.push(X)}else u.value[p.value].title=v.value.title,u.value[p.value].value=v.value.title,u.value[p.value].label=v.value.title;s.value=!1,tt()}},m=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,C=X=>{const z=u.value[X];return z.id||(z.id=m()),z.id},h=X=>{var Z;E.value=X;const z=C(X);F.value=D.cloneDeep(N.value);let ie=O.value.get(z);!ie&&((Z=u.value[X].children)==null?void 0:Z.length)>0&&(ie=Ee(u.value[X].children)),ie?W.setItemData(D.cloneDeep(ie)):W.setItemData([]),x.value=!0},w=e.computed(()=>{const X=D.useModelComp(D.pinia),z=D.storeToRefs(X).itemData.value;return console.log("可用组件数据",z),!z||!Array.isArray(z)?[]:z.filter(ie=>{var Z;if(ie.comp==="Tabs"&&E.value>=0){const ve=C(E.value);if((Z=ie.compData)==null?void 0:Z.some(Ce=>{var te;return Ce.key==="stepList"&&((te=Ce.contents)==null?void 0:te.some(ke=>ke.id===ve))}))return!1}return!0})}),g=X=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[X]||X,J=X=>{var z;try{const ie=D.cloneDeep(X);ie.id=Date.now()+Math.random(),ie.comp==="Tabs"&&((z=ie.compData)==null||z.forEach(ve=>{ve.key==="stepList"&&ve.contents&&ve.contents.forEach(we=>{we.id=m()})}));const Z=D.cloneDeep(N.value);Z.push(ie),W.setItemData(Z)}catch(ie){console.error("添加组件失败:",ie)}},Ee=X=>X.map(z=>{var ie;switch(z.type){case"form":return{comp:"Form",name:z.value||"表单",compData:Qe(z.content)};case"table":return{comp:"Table",name:z.value||"表格",compData:re(z.content)};default:return{comp:"Unknown",name:z.value||"",compData:((ie=z.content)==null?void 0:ie.originalData)||[]}}}),Qe=X=>{if(!X)return[];const z=[];return X.rowContents&&z.push({key:"formContent",contents:X.rowContents}),X.buttonValue&&z.push({key:"formButton",contents:X.buttonValue}),typeof X.isEnableWrap<"u"&&z.push({key:"enableWrap",contents:X.isEnableWrap}),z},re=X=>[],Be=()=>{if(E.value>=0&&E.value<u.value.length){const X=C(E.value);O.value.set(X,D.cloneDeep(N.value)),u.value[E.value].children=le(N.value),console.log("保存后的数据",le(N.value))}x.value=!1,E.value=-1,F.value=null,tt()},Oe=()=>{F.value&&W.setItemData(D.cloneDeep(F.value)),x.value=!1,E.value=-1,F.value=null},R=()=>{x.value&&Oe()},le=X=>{if(!Array.isArray(X))throw new Error("sourceData must be an array");return X.map((z,ie)=>{if(!z||typeof z!="object")return z;const{comp:Z,name:ve,compData:we}=z;switch(Z){case"Form":return{type:"form",content:oe(we||[]),value:"表单"};case"Table":return{type:"table",content:fe(we||[]),value:"表格"};default:return{type:"xxx",content:$e(we||[]),value:""}}})},oe=X=>{const z={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ie={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return X.forEach((Z,ve)=>{if(!Z||typeof Z!="object"){console.warn(`Invalid config at index ${ve}:`,Z);return}const{key:we,contents:Ce}=Z,te=ie[we];if(!te){console.warn(`Unknown Form config key: ${we}`);return}we==="enableWrap"?z[te]=!!Ce:z[te]=Array.isArray(Ce)?Ce:[]}),z},fe=X=>{const z={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ie={header:"columns",tableContents:"tableData"};return X.forEach((Z,ve)=>{if(!Z||typeof Z!="object"){console.warn(`Invalid config at index ${ve}:`,Z);return}const{key:we,contents:Ce}=Z,te=ie[we];if(!te){console.warn(`Unknown Table config key: ${we}`);return}z[te]=Array.isArray(Ce)?Ce:[]}),z},$e=X=>(console.log("Default conversion logic - to be implemented"),{originalData:X,processed:!1,componentType:"unknown"}),tt=()=>{const X=[{key:"stepList",contents:u.value}];l("change",X)};return e.watch(()=>i.itemContents,X=>{if(X&&X.length>0){const z=X.find(ie=>ie.key==="stepList");z&&z.contents&&(u.value=z.contents.map(ie=>({title:ie.title||"",value:ie.value||ie.title||"",label:ie.label||ie.title||"",children:ie.children||[],id:ie.id||m()})))}},{immediate:!0,deep:!0}),(X,z)=>{const ie=e.resolveComponent("svg-icon"),Z=e.resolveComponent("el-input"),ve=e.resolveComponent("el-form-item"),we=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",hu,[z[6]||(z[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:pe},[e.createVNode(ie,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),z[5]||(z[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(Ce,te)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:te},[e.createElementVNode("span",gu,e.toDisplayString(Ce.title),1),e.createElementVNode("div",mu,[e.createElementVNode("button",{onClick:ke=>$(te)},"修改标题",8,yu),e.createElementVNode("button",{onClick:ke=>h(te)},"布局调整",8,bu),e.createElementVNode("button",{onClick:ke=>M(te)},"删除",8,ku)])]))),128))]),e.createVNode(Jt.ssDialog,{modelValue:s.value,"onUpdate:modelValue":z[2]||(z[2]=Ce=>s.value=Ce),title:b.value,onBeforeDestroy:z[3]||(z[3]=Ce=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:z[1]||(z[1]=Ce=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(we,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ve,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(Z,{modelValue:v.value.title,"onUpdate:modelValue":z[0]||(z[0]=Ce=>v.value.title=Ce),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Jt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":z[4]||(z[4]=Ce=>x.value=Ce),title:"布局调整",fullScreen:"",onBeforeDestroy:R},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Oe},"取消"),e.createElementVNode("button",{onClick:Be},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",xu,[e.createElementVNode("div",wu,[e.createVNode(Jc),e.createElementVNode("div",Du,[z[8]||(z[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",_u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,Ce=>(e.openBlock(),e.createElementBlock("div",{key:Ce.id,class:"component-item",onClick:te=>J(Ce)},[e.createElementVNode("div",Cu,[e.createElementVNode("span",Su,e.toDisplayString(g(Ce.comp)),1),e.createElementVNode("span",Tu,e.toDisplayString(Ce.name),1)]),z[7]||(z[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Eu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:X.innerWidth},[e.createVNode(fu)])),e.createElementVNode("div",Bu,[e.createVNode(cu)])])]),_:1},8,["modelValue"])])}}},Nu=Ft._export_sfc(Iu,[["__scopeId","data-v-9096ed0d"]]);function Au(){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 Vu(a){return{type:"line",...a}}function Ou(){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 Mu(a){return{type:"bar",barWidth:"60%",...a}}function zu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Ru(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Sn={line:{initBaseoptions:Au,initSeries:Vu},bar:{initBaseoptions:Ou,initSeries:Mu},pie:{initBaseoptions:zu,initSeries:Ru}},zo=D.useMenuState(D.pinia),Cl=(a,r)=>{var E;const i=[],l=[],{group:u,nameCol:s,valueCol:b}=r||{},v=a==null?void 0:a.find(O=>{const{name:F}=O;return F===u});if(!v)return{names:i,values:l};const p=(E=v==null?void 0:v.compData)==null?void 0:E.find(O=>{const{key:F}=O;return F==="tableContents"});return((p==null?void 0:p.contents)||[]).forEach(O=>{const F=O==null?void 0:O[0];let W=!1;rt.isObject(F)&&(F!=null&&F.id)&&(W=!0);let N=s,pe=b;W&&(N=N+1,pe=pe+1);const $=O==null?void 0:O[N],M=O==null?void 0:O[pe];i.push($),l.push(M)}),{names:i,values:l}},Pu=async a=>{const{menu:r,mainKey:i,detailGroup:l,detailNameCol:u,detailValueCol:s,isSelfDetail:b}=a||{};let v=null;const p=sessionStorage.getItem("systemKey");if(b&&zo.activeMenuPath&&(v=await Ve.getItemData(`${zo.activeMenuPath}`,p,"")),!b){const x=r==null?void 0:r.join("/");v=await Ve.getItemData(`${x}^${i}`,p,"")}return Cl(v,{group:l,nameCol:u,valueCol:s})},Fu=async a=>{const{menu:r,group:i,nameCol:l,valueCol:u}=a||{},s=r==null?void 0:r.join("/"),b=sessionStorage.getItem("systemKey"),v=await Ve.getItemData(s,b,"");return Cl(v,{group:i,nameCol:l,valueCol:u})},yo=async(a,r)=>{const i={names:[],values:[]},{menu:l,group:u,nameCol:s,valueCol:b}=a||{};if(!l.length||!u)return i;const{mainKey:v,group:p,nameCol:x,valueCol:E,isSelfDetail:O}=r||{};return v&&p&&It.isNumber(x)&&It.isNumber(E)?await Pu({menu:l,mainKey:v,detailGroup:p,detailNameCol:x,detailValueCol:E,isSelfDetail:O}):It.isNumber(s)&&It.isNumber(b)?await Fu({menu:l,group:u,nameCol:s,valueCol:b}):i},Lu=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=a||{},s=Sn==null?void 0:Sn[l];if(!s)return;const{initBaseoptions:b,initSeries:v}=s,p=b();p.title.text=u??"";const{names:x,values:E}=await yo(r,i);if(!x||!E)return p;p.xAxis.data=x;const O=v({data:E});return p.series.push(O),p},$u=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=a||{},s=Sn==null?void 0:Sn[l];if(!s)return;const{initBaseoptions:b,initSeries:v}=s,p=b();p.title.text=u??"";const{names:x,values:E}=await yo(r,i);if(!x||!E)return p;p.xAxis.data=x;const O=v({data:E});return p.series.push(O),p},ju=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=a||{},s=Sn==null?void 0:Sn[l];if(!s)return;const{initBaseoptions:b,initSeries:v}=s,p=b();p.title.text=u??"";const{names:x,values:E}=await yo(r,i);if(!x||!E)return p;const O=[];for(let W=0;W<x.length;W++){const N=x[W],pe=E[W];O.push({name:N,value:pe})}const F=v({data:O});return p.series.push(F),p},Uu=async(a=[])=>{var b,v,p;const r=((b=a==null?void 0:a.find(x=>x.key==="chartBaseConfig"))==null?void 0:b.contents)??{},i=((v=a==null?void 0:a.find(x=>x.key==="chartDataConfig"))==null?void 0:v.contents)??{},l=((p=a==null?void 0:a.find(x=>x.key==="chartDetailConfig"))==null?void 0:p.contents)??{},{type:u}=r;let s={};return u==="line"&&(s=await Lu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),u==="bar"&&(s=await $u({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),u==="pie"&&(s=await ju({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),s},Ku=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const r=a,i=e.ref({});e.onMounted(async()=>{const u=r==null?void 0:r.itemData;i.value=await Uu(u)});const l=e.computed(()=>(r==null?void 0:r.height)||"300px");return(u,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Kr.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),Wu=Ft._export_sfc(Ku,[["__scopeId","data-v-d4c081e8"]]),Hu={class:"chart-module layout"},qu={class:"chart-module content"},Xu={class:"chart-module content"},Gu={class:"form-content"},Yu={class:"dialog-footer"},Ju={class:"form-content"},Zu={class:"dialog-footer"},Qu={class:"form-content"},ed={class:"dialog-footer"},td=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],v=e.ref({}),p=()=>{var ce;s.value=b(),(ce=s.value)==null||ce.forEach(ne=>{var Se;const de=ne==null?void 0:ne.prop;ne.value=(Se=v==null?void 0:v.value)==null?void 0:Se[de]}),u.visible=!0},x=ce=>{v.value=ce},E=()=>{var ce;u.visible=!1,l("change",(ce=Ye())==null?void 0:ce.compData)},O=e.reactive({visible:!1,width:"840",title:"数据配置"}),F=e.ref([]),W=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],N=e.ref({}),pe=()=>{const ce=F.value,ne=D.cloneDeep(ce);return ne==null||ne.forEach(de=>{var qe;const Se=de==null?void 0:de.prop;de.value=(qe=N.value)==null?void 0:qe[Se]}),ne},$=ce=>{var de;N.value=ce;const ne=pe();F.value=ne,l("change",(de=Ye())==null?void 0:de.compData)},M=async()=>{const ce=await Ve.getMenusContent(),ne=pe();ne==null||ne.forEach(de=>{(de==null?void 0:de.prop)==="menu"&&(de.contents=ce)}),F.value=ne,O.visible=!0,await Ce(N.value.menu),await T(N.value.group)},L=e.reactive({visible:!1,width:"840",title:"详情页配置"}),m=e.ref([]),C=()=>[{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:[]}],h=e.ref({}),w=()=>{const ce=m.value,ne=D.cloneDeep(ce);return ne==null||ne.forEach(de=>{var qe;const Se=de==null?void 0:de.prop;de.value=(qe=h.value)==null?void 0:qe[Se]}),ne},g=ce=>{var de;h.value=ce;const ne=w();m.value=ne,l("change",(de=Ye())==null?void 0:de.compData)},J=async()=>{await R();const ce=D.cloneDeep(Ee.value),ne=w();ne==null||ne.forEach(de=>{var qe;const Se=de==null?void 0:de.prop;de.value=(qe=h==null?void 0:h.value)==null?void 0:qe[Se],Se==="mainKey"&&(de.contents=ce)}),m.value=ne,L.visible=!0},Ee=e.ref([]),Qe=e.ref([]),re=e.ref({}),Be=e.ref({}),Oe=()=>{const{compData:ce}=Z.value||{},ne=ce==null?void 0:ce.find(H=>{const{key:Q}=H;return Q==="header"}),de=(ne==null?void 0:ne.contents)||[],Se=de==null?void 0:de.filter((H,Q)=>{const{label:S}=H;return S!=="操作"}),qe=Se==null?void 0:Se.findIndex((H,Q)=>{const{isMainKey:S}=H;return S});if(qe<0)return[];const dt=ce==null?void 0:ce.find(H=>{const{key:Q}=H;return Q==="tableContents"}),y=(dt==null?void 0:dt.contents)||[];return y==null?void 0:y.map(H=>{const Q=H==null?void 0:H[0];let S=qe;rt.isObject(Q)&&(Q!=null&&Q.id)&&(S=S+1);const se=H==null?void 0:H[S];return{label:se,value:se}})},R=async()=>{const ce=await Oe();Ee.value=ce},le=async ce=>{const ne=sessionStorage.getItem("systemKey");return await Ve.getItemData(ce,ne,"")},oe=async ce=>{const ne=ce;Qe.value=ne==null?void 0:ne.map(de=>{const{name:Se}=de;return re.value[Se]=de,{label:Se,value:Se}})},fe=ce=>{const{comp:ne,compData:de}=Be.value||{};if(ne==="Table"){let Se=w();Se=Se.filter(qe=>{const{prop:dt}=qe;return dt!=="formItems"}),te(Se,de),m.value=Se}},$e=async()=>{var de,Se;const ce=(de=h==null?void 0:h.value)==null?void 0:de.mainKey,ne=(Se=N==null?void 0:N.value)==null?void 0:Se.menu;if(ce){const dt=`${ne==null?void 0:ne.join("/")}^${ce}`,y=await le(dt);await oe(y);const I=w();I==null||I.forEach(H=>{(H==null?void 0:H.prop)==="group"&&(H.contents=Qe.value)}),m.value=I}};e.watch(()=>{var ce;return(ce=h==null?void 0:h.value)==null?void 0:ce.mainKey},async(ce,ne)=>{ce!=ne&&ce&&await $e()});const tt=async ce=>{const ne=re.value[ce];Be.value=ne,await fe()};e.watch(()=>{var ce;return(ce=h==null?void 0:h.value)==null?void 0:ce.group},async(ce,ne)=>{ce!=ne&&ce&&tt(ce)});const X=async()=>{var ne;await $e();const ce=(ne=h.value)==null?void 0:ne.group;await tt(ce)},z=e.ref([]),ie=e.ref({}),Z=e.ref({}),ve=async ce=>{const ne=ce==null?void 0:ce.join("/"),de=sessionStorage.getItem("systemKey");return await Ve.getItemData(ne,de,"")},we=async ce=>{const ne=await ve(ce);z.value=ne==null?void 0:ne.map(de=>{const{name:Se}=de;return ie.value[Se]=de,{label:Se,value:Se}})},Ce=async(ce,ne)=>{await we(ce);const de=pe();de==null||de.forEach(Se=>{(Se==null?void 0:Se.prop)==="group"&&(Se.contents=z.value)}),F.value=de};e.watch(()=>{var ce;return(ce=N==null?void 0:N.value)==null?void 0:ce.menu},async(ce,ne)=>{const de=ce==null?void 0:ce.join("/"),Se=ne==null?void 0:ne.join("/");de!=Se&&await Ce(ce)});const te=(ce,ne)=>{const de=ne==null?void 0:ne.find(y=>{const{key:I}=y;return I==="header"}),Se=(de==null?void 0:de.contents)||[],qe=Se==null?void 0:Se.filter((y,I)=>{const{label:H}=y;return H!=="操作"}),dt=qe==null?void 0:qe.map((y,I)=>{const{label:H}=y;return{label:H,value:I}});ce==null||ce.forEach(y=>{const I=y==null?void 0:y.prop;(I==="nameCol"||I==="valueCol")&&(y.contents=dt)})},ke=ce=>{const{comp:ne,compData:de}=Z.value||{};if(ne==="Table"){N.value.formItems=[];let Se=pe();Se=Se.filter(qe=>{const{prop:dt}=qe;return dt!=="formItems"}),te(Se,de),F.value=Se}},T=async ce=>{const ne=ie.value[ce];Z.value=ne,await ke()};e.watch(()=>{var ce;return(ce=N==null?void 0:N.value)==null?void 0:ce.group},async(ce,ne)=>{ce!=ne&&T(ce)});const Ge=async()=>{var de,Se;const ce=(de=N.value)==null?void 0:de.menu;await Ce(ce);const ne=(Se=N.value)==null?void 0:Se.group;await T(ne)},Ye=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:N.value},{key:"chartDetailConfig",contents:h.value}]}),Ae=()=>{u.visible=!1,O.visible=!1,L.visible=!1};return e.onMounted(async()=>{var ne,de,Se;F.value=W(),m.value=C();const ce=i==null?void 0:i.itemContents;v.value=((ne=ce==null?void 0:ce.find(qe=>qe.key==="chartBaseConfig"))==null?void 0:ne.contents)??{},N.value=((de=ce==null?void 0:ce.find(qe=>qe.key==="chartDataConfig"))==null?void 0:de.contents)??{},await Ge(),h.value=((Se=ce==null?void 0:ce.find(qe=>qe.key==="chartDetailConfig"))==null?void 0:Se.contents)??{},await X()}),(ce,ne)=>{const de=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Hu,[ne[4]||(ne[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(de,{id:"themeButton",onClick:ne[0]||(ne[0]=Se=>p())},{default:e.withCtx(()=>ne[3]||(ne[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",qu,[ne[6]||(ne[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(de,{id:"themeButton",onClick:ne[1]||(ne[1]=Se=>M())},{default:e.withCtx(()=>ne[5]||(ne[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Xu,[ne[8]||(ne[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(de,{id:"themeButton",onClick:ne[2]||(ne[2]=Se=>J())},{default:e.withCtx(()=>ne[7]||(ne[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Jt.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:Ae,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",Gu,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yu,[e.createVNode(de,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>ne[9]||(ne[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(de,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>ne[10]||(ne[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:Ae,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ju,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:$},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(de,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>ne[11]||(ne[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(de,{class:"ok-button button",onClick:Ae,id:"themeButton"},{default:e.withCtx(()=>ne[12]||(ne[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:Ae,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qu,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ed,[e.createVNode(de,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>ne[13]||(ne[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(de,{class:"ok-button button",onClick:Ae,id:"themeButton"},{default:e.withCtx(()=>ne[14]||(ne[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),nd=Ft._export_sfc(td,[["__scopeId","data-v-fe119645"]]),ad=(a,r)=>{let i;a.replaceAll(" ",`\r
|
|
2
|
-
`).replaceAll(`
|
|
3
|
-
`,`\r
|
|
4
|
-
`).includes(`\r
|
|
5
|
-
`)?i=a.replaceAll(`
|
|
6
|
-
`,`\r
|
|
7
|
-
`).replaceAll(" ",`\r
|
|
8
|
-
`).split(`\r
|
|
9
|
-
`).filter(s=>s.trim()!==""):i=a.replaceAll(" ",`\r
|
|
10
|
-
`).split(`
|
|
11
|
-
`).filter(s=>s.trim()!==""),i=i==null?void 0:i.map(s=>(s=s==null?void 0:s.replaceAll("\r",""),s));const l=[];let u="";for(const s of i)s.includes("{")||u.includes("{")||s.includes("[")||u.includes("[")||s.includes("【")||u.includes("【")||s.includes("(")||u.includes("(")||s.includes("(")||u.includes("(")||s.includes("/*")||u.includes("/*")?(u+=s.trim(),u.split("{").length-1===u.split("}").length-1&&u.split("【").length-1===u.split("】").length-1&&u.split("[").length-1===u.split("]").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("/*").length-1===u.split("*/").length-1&&!(r!=null&&r.find(b=>b===u[u.length-1]))?(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""):u!=null&&u.includes("*/")&&(u=u.replace(/\/\*[\s\S]*?\*\//g,""))):r!=null&&r.find(b=>b===s[s.length-1])?u+=s.trim():l.push(s.trim().replace(/\/\*[\s\S]*?\*\//g,""));return l},Ht=(a,r)=>{let i=a;const l=[];let u="",s=0;for(const b of i)s++,b.includes("{")||u.includes("{")||b.includes("[")||u.includes("[")||b.includes("【")||u.includes("【")||b.includes("(")||u.includes("(")||b.includes("(")||u.includes("(")||b.includes("/*")||u.includes("/*")?(u+=b.trim(),u.split("{").length-1===u.split("}").length-1&&u.split("【").length-1===u.split("】").length-1&&u.split("[").length-1===u.split("]").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("/*").length-1===u.split("*/").length-1&&u[u.length-1]===r?(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""):s===(a==null?void 0:a.length)&&(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u="")):(u+=b.trim(),(u==null?void 0:u[(u==null?void 0:u.length)-1])===r&&(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""));return(u==null?void 0:u.length)!==0&&l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),l},od=(a,r)=>a===r||a.length===r.length&&a.every((i,l)=>i===r[l]),ld=a=>a.reduce((r,i)=>{var u;const l=(((u=r.at(-1))==null?void 0:u.total)??0)+i;return r.push({key:i,total:l}),r},[]),rd=a=>{for(let r=a.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1));[a[r],a[i]]=[a[i],a[r]]}return a},id=a=>{let r=a;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1))};let Bt="$R",sd="[Any]";const cd=a=>{var b,v;let r={},i=a==null?void 0:a[0],l=(v=(b=i==null?void 0:i.replace("{",Bt))==null?void 0:b.split(Bt))==null?void 0:v[0];(l==null?void 0:l[0])==="*"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length)),l=l==null?void 0:l.split(":"),r.group=l;let u=a==null?void 0:a[1],s=u==null?void 0:u.replaceAll(sd,"");return(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),r.filter=s,r},ud=a=>{var x,E,O,F,W,N,pe,$,M;let r=[],i=[],l=a==null?void 0:a.map(L=>{var C;let m=(C=Ht(L,"@"))==null?void 0:C[0];return(m==null?void 0:m[(m==null?void 0:m.length)-1])==="@"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m}),u=Ht(l==null?void 0:l[0],":");i=(x=u==null?void 0:u.filter(L=>!(L!=null&&L.includes("{"))&&!(L!=null&&L.includes("["))))==null?void 0:x.join(""),(i==null?void 0:i[(i==null?void 0:i.length)-1])===":"&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),i=i==null?void 0:i.split(":");let s=u==null?void 0:u.filter(L=>(L==null?void 0:L.includes("{"))||(L==null?void 0:L.includes("["))),b=(O=s==null?void 0:s[0])==null?void 0:O.slice(1,((E=s==null?void 0:s[0])==null?void 0:E.length)-1);b=(F=Ht(b,","))==null?void 0:F.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L));let v="@"+((pe=(N=(W=a==null?void 0:a[0])==null?void 0:W.replace("@",Bt))==null?void 0:N.split(Bt))==null?void 0:pe[1]);(($=Ht(v,":"))==null?void 0:$.length)>1&&(r=Ja((M=Ht(v,":"))==null?void 0:M[1]),r=[r]);let p=b==null?void 0:b.map((L,m)=>{var Ee,Qe,re,Be,Oe,R,le,oe,fe,$e,tt,X;let C=(Ee=L==null?void 0:L.split("=="))==null?void 0:Ee[0],h=(Qe=L==null?void 0:L.split("=="))==null?void 0:Qe[1],w=[],g=[],J=[];return(h==null?void 0:h[0])==="$"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length),w=(Be=(re=h==null?void 0:h.split("*"))==null?void 0:re[0])==null?void 0:Be.split(":"),g=($e=(fe=(oe=(le=(R=(Oe=h==null?void 0:h.split("*"))==null?void 0:Oe[1])==null?void 0:R.replace("{",Bt))==null?void 0:le.split(Bt))==null?void 0:oe[0])==null?void 0:fe.split(":"))==null?void 0:$e.filter(z=>z!==""),J=(X=(tt=h==null?void 0:h.replace("{",Bt))==null?void 0:tt.split(Bt))==null?void 0:X[1],J=J==null?void 0:J.replaceAll("}",""),J=J==null?void 0:J.split(":")),{prop:C,label:C,value:"",menuPath:w,groups:g,columns:J,width:b==null?void 0:b.length}});return{groupName:i,formContents:p,contents:r}},Ja=a=>{var l,u;let r=[],i=a.slice(1,(a==null?void 0:a.length)-1);if((i==null?void 0:i[0])!=="[")(l=Ht(i,","))==null||l.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),r.push(s??"")});else{let s=[];(u=Ht(i,","))==null||u.forEach(b=>{(b==null?void 0:b[(b==null?void 0:b.length)-1])===","&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)),s.push(Ja(b))}),r=s}return r},Sl=(a,r)=>{var E,O,F,W,N,pe,$,M,L,m,C,h,w,g,J,Ee,Qe,re,Be,Oe,R,le,oe,fe,$e,tt,X;let i,l=[],u=[],s=[],b=[],v=[],p=[],x="Input";if(a!=null&&a.includes("(@")||a!=null&&a.includes("==")||a!=null&&a.includes("="))if(a!=null&&a.includes("(@")&&!(a!=null&&a.includes("=")))i=(O=(E=a==null?void 0:a.replace("(@",Bt))==null?void 0:E.split(Bt))==null?void 0:O[0];else{if(i=(F=a==null?void 0:a.split("=="))==null?void 0:F[0],a!=null&&a.includes("=")&&!(a!=null&&a.includes("==")))i=(W=a==null?void 0:a.split("="))==null?void 0:W[0],l=($=(pe=(N=a==null?void 0:a.split("="))==null?void 0:N[1])==null?void 0:pe.split("/"))==null?void 0:$.map(z=>({label:z,value:z}));else if((L=(M=a==null?void 0:a.split("=="))==null?void 0:M[1])!=null&&L.includes("||")){let z=[];(h=(C=(m=a==null?void 0:a.split("=="))==null?void 0:m[1])==null?void 0:C.split("||"))==null||h.forEach(ie=>{var Z,ve,we;u.push((ve=(Z=ie==null?void 0:ie.split("@Filter"))==null?void 0:Z[0])==null?void 0:ve.split("/")),z.push((we=ie==null?void 0:ie.split("@Filter"))==null?void 0:we[1])}),s=z==null?void 0:z.map(ie=>(ie=ie==null?void 0:ie.slice(1,(ie==null?void 0:ie.length)-1),ie))}else{let z=(g=a==null?void 0:a.split("=="))==null?void 0:g[((w=a==null?void 0:a.split("=="))==null?void 0:w.length)-1];if(!(z!=null&&z.includes("&"))){let ie=(J=z==null?void 0:z.replace("*",Bt))==null?void 0:J.split(Bt),Z=(ie==null?void 0:ie[0])===""?r==null?void 0:r.value:ie==null?void 0:ie[0];Z=Z==null?void 0:Z.replaceAll("[Any]",""),(Z==null?void 0:Z[0])==="$"&&(Z=(Ee=Z==null?void 0:Z.slice(1,Z==null?void 0:Z.length))==null?void 0:Ee.replaceAll(":","/")),b=Z==null?void 0:Z.split("/");let ve=(re=(Qe=ie==null?void 0:ie[1])==null?void 0:Qe.replace("[",Bt))==null?void 0:re.split(Bt),we=ve==null?void 0:ve[0];(we==null?void 0:we[(we==null?void 0:we.length)-1])===":"&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),v=we==null?void 0:we.split(":"),p=(le=(R=(Oe=(Be=ve==null?void 0:ve[1])==null?void 0:Be.replace("]",Bt))==null?void 0:Oe.split(Bt))==null?void 0:R[0])==null?void 0:le.split(":");let Ce=($e=(fe=(oe=ve==null?void 0:ve[1])==null?void 0:oe.replace("]",Bt))==null?void 0:fe.split(Bt))==null?void 0:$e[1];Ce!==""&&id(Ce)}}x="Select"}else i=a;return i!=null&&i.includes("(@")&&(i=(X=(tt=a==null?void 0:a.replace("(@",Bt))==null?void 0:tt.split(Bt))==null?void 0:X[0]),{label:i,prop:i,options:l,allContents:u,filterContents:s,menus:b,groups:v,words:p,align:"center",formType:x}},Tl=(a,r)=>{var l,u,s,b,v,p,x,E,O,F,W,N,pe,$,M,L,m;let i=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((b=(s=(u=(l=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:l.replace(":",Bt))==null?void 0:u.split(Bt))==null?void 0:s[0])!=null&&b.includes(","))){let C=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),h=(v=C==null?void 0:C.replace(":",Bt))==null?void 0:v.split(Bt);if(((p=Ht(h==null?void 0:h[1],"="))==null?void 0:p.length)===1){let w=h==null?void 0:h[0];i==null||i.push({label:w,prop:w,children:Tl((E=h==null?void 0:h[1])==null?void 0:E.slice(1,((x=h==null?void 0:h[1])==null?void 0:x.length)-1),r),align:"center"})}else(M=($=(pe=(N=(W=(F=(O=C==null?void 0:C.replace("{",Bt))==null?void 0:O.split(Bt))==null?void 0:F[1])==null?void 0:W.replace("}",Bt))==null?void 0:N.split(Bt))==null?void 0:pe[0])==null?void 0:$.split(","))==null||M.forEach(w=>{i==null||i.push({label:w,prop:w,align:"center"})})}else if((a==null?void 0:a[0])==="{")(L=Ht(a,","))==null||L.forEach(C=>{var h,w,g;if((C==null?void 0:C[(C==null?void 0:C.length)-1])===","&&(C=C==null?void 0:C.slice(0,(C==null?void 0:C.length)-1)),(C==null?void 0:C[0])==="{"){let J=Ht(C,"="),Ee=(w=J==null?void 0:J[0])==null?void 0:w.slice(1,((h=J==null?void 0:J[0])==null?void 0:h.length)-2);(g=Ee==null?void 0:Ee.split(","))==null||g.forEach(Qe=>{i.push({label:Qe,prop:Qe,align:"center"})})}else i.push({label:C,prop:C,align:"center"})});else{let C=(m=Ht(a,","))==null?void 0:m.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));C==null||C.forEach(h=>{i.push(Sl(h,r))})}return i},dd=(a,r)=>{var u;let i=a;if(!a)return;(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1));let l=[];return i=(u=Ht(i,","))==null?void 0:u.forEach(s=>{var b;(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),(s==null?void 0:s[0])==="{"?(b=Tl(s,r))==null||b.forEach(v=>{l.push(v)}):l.push(Sl(s,r))}),l},Ro=a=>{var r,i,l;if(a!=null&&a.includes("@Filter"))return a;{let u=(i=(r=a==null?void 0:a.replace("(",Bt))==null?void 0:r.split(Bt))==null?void 0:i[1];return u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1),u=(l=Ht(u,","))==null?void 0:l.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),"@"+s)),u=u==null?void 0:u.join(","),a!=null&&a.includes("@Quote")&&(u!=null&&u.includes("@Type")||(u=u===""?u+"@Type:Manual":u+",@Type:Manual"),u!=null&&u.includes("@SonSync")||(u=u===""?u+"@SonSync:No":u+",@SonSync:No"),u!=null&&u.includes("@FatherSync")||(u=u===""?u+"@FatherSync:Yes":u+",@FatherSync:Yes")),u}},pd=(a,r,i="")=>{var O,F,W,N,pe,$,M,L,m,C,h,w,g,J,Ee,Qe;let l=[];if(((O=a==null?void 0:a[0])==null?void 0:O[0])!=="*"&&((F=a==null?void 0:a[0])==null?void 0:F[0])!=="$")return;let u=Ht(a==null?void 0:a[0],":");l=(W=u==null?void 0:u.filter(re=>!(re!=null&&re.includes("{"))&&!(re!=null&&re.includes("["))))==null?void 0:W.join("");let s="";(l==null?void 0:l[(l==null?void 0:l.length)-1])===":"&&(l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1)),(l==null?void 0:l[0])==="*"?(l=l==null?void 0:l.slice(1,l==null?void 0:l.length),l=l==null?void 0:l.split(":")):(s=D.cloneDeep(l)+":",l=[]);let b=u==null?void 0:u.filter(re=>!(!(re!=null&&re.includes("{"))&&!(re!=null&&re.includes("["))));s=s+((b==null?void 0:b[0])??"");let v=b==null?void 0:b[1];(s==null?void 0:s[0])==="["&&(v=D.cloneDeep(s)+(v??""),s="");let p=v?Ja(v):[];!(p!=null&&p.every(re=>Array.isArray(re)))&&(p==null?void 0:p.length)>0&&(p=[p]);let x=(N=Ht(s,"@"))!=null&&N[1]?"@"+((pe=Ht(s,"@"))==null?void 0:pe[1]):"";if(s=($=Ht(s,"@"))==null?void 0:$[0],(s==null?void 0:s[0])==="$"&&(x=D.cloneDeep(s)+(x??""),s=""),i!==""&&(x=i),x!==""){(x==null?void 0:x[0])==="$"&&(x=x==null?void 0:x.slice(1,x==null?void 0:x.length)),(x==null?void 0:x[(x==null?void 0:x.length)-1])===":"&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1));let re="";if(x!=null&&x.includes("(@")){re=(L=(M=x==null?void 0:x.replace("(@",Bt))==null?void 0:M.split(Bt))==null?void 0:L[0];let Be=(C=(m=x==null?void 0:x.replace("(@",Bt))==null?void 0:m.split(Bt))==null?void 0:C[1];Be="@"+(Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1));let Oe=(h=Ht(Be,","))==null?void 0:h.map(R=>((R==null?void 0:R[(R==null?void 0:R.length)-1])===","&&(R=R==null?void 0:R.slice(0,(R==null?void 0:R.length)-1)),Ro(R)));x=re+"("+(Oe==null?void 0:Oe.join(","))+")"}else{re=(g=(w=x==null?void 0:x.replace("@",Bt))==null?void 0:w.split(Bt))==null?void 0:g[0];let Be=(Ee=(J=x==null?void 0:x.replace("@",Bt))==null?void 0:J.split(Bt))==null?void 0:Ee[1];if(Be){Be="@"+Be;let Oe=(Qe=Ht(Be,","))==null?void 0:Qe.map(R=>Ro(R));x=re+"("+(Oe==null?void 0:Oe.join(","))+")"}else x=re}}(s==null?void 0:s[(s==null?void 0:s.length)-1])==="@"&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),(s==null?void 0:s[(s==null?void 0:s.length)-1])===":"&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1));let E=s===""?[]:dd(s,r)??[];return E!=null&&E.some(re=>{var Be;return Array.isArray(re==null?void 0:re.children)&&((Be=re==null?void 0:re.children)==null?void 0:Be.length)>0})&&(E=[E]),{groupName:l,tableColumns:E,tableFilter:x,tableContents:p}};let Gt="$R";const fd=Ve.useUnit(D.pinia),{chooseTitle:ua}=D.storeToRefs(fd),fa=[{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},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1}],hd=a=>{var i;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(i=a==null?void 0:a.contents)==null?void 0:i.map(l=>{var u;return(l==null?void 0:l.key)==="tableContents"&&(l.contents=(u=l.contents)==null?void 0:u.slice(0,parseInt(a==null?void 0:a.filter))),l})},vd=a=>{var r;return(a==null?void 0:a.filter)==="Random"?(r=a==null?void 0:a.contents)==null?void 0:r.map(l=>((l==null?void 0:l.key)==="tableContents"&&(l.contents=rd(l.contents)),l)):((a==null?void 0:a.filter)==="Ordin"&&(a==null?void 0:a.contents).push({key:"enableWrap",contents:!0}),a==null?void 0:a.contents)},gd=a=>{var l,u,s,b,v;let r=(s=(u=(l=a==null?void 0:a.filter)==null?void 0:l.replace("*",""))==null?void 0:u.replaceAll("{",""))==null?void 0:s.replaceAll("}","");if((r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return a==null?void 0:a.contents;let i=Ve.calculatorAndToOr(r);if((i==null?void 0:i.length)>0){let p=[];return i==null||i.forEach(E=>{let O={};for(let F in E){let W=F;W!=null&&W.includes("[")||(O[W]=E[F])}p.push(O)}),(v=(b=D.cloneDeep(a))==null?void 0:b.contents)==null?void 0:v.map(E=>{var F,W,N,pe;let O=(N=(W=(F=D.cloneDeep(a))==null?void 0:F.contents)==null?void 0:W.find($=>($==null?void 0:$.key)==="header"))==null?void 0:N.contents;if(O=(pe=Ve.getEqualChild(O))==null?void 0:pe.filter($=>($==null?void 0:$.label)!=="操作"),(E==null?void 0:E.key)==="tableContents"){let M=Ve.tableToForm(E==null?void 0:E.contents,O);p==null||p.forEach(L=>{var m,C;for(let h in L)!((m=M==null?void 0:M[0])!=null&&m.find(w=>{var g;return(w==null?void 0:w.key)===h||((g=w==null?void 0:w.key)==null?void 0:g.includes(h))}))&&!(M!=null&&M.find(w=>{var g;return(w==null?void 0:w.key)===h||((g=w==null?void 0:w.key)==null?void 0:g.includes(h))}))||(((C=L[h])==null?void 0:C[0])!=="!"?M=M==null?void 0:M.filter(w=>{var g,J;return((g=w==null?void 0:w.find(Ee=>{var Qe;return(Ee==null?void 0:Ee.key)===h||((Qe=Ee==null?void 0:Ee.key)==null?void 0:Qe.includes(h))}))==null?void 0:g.value)===L[h]&&!Array.isArray(L==null?void 0:L[h])||Array.isArray(L==null?void 0:L[h])&&((J=L==null?void 0:L[h])==null?void 0:J.find(Ee=>{var Qe;return((Qe=w==null?void 0:w.find(re=>{var Be;return(re==null?void 0:re.key)===h||((Be=re==null?void 0:re.key)==null?void 0:Be.includes(h))}))==null?void 0:Qe.value)===Ee}))}):M=M==null?void 0:M.filter(w=>{var g;return((g=w==null?void 0:w.find(J=>{var Ee;return(J==null?void 0:J.key)===h||((Ee=J==null?void 0:J.key)==null?void 0:Ee.includes(h))}))==null?void 0:g.value)!==L[h]}))}),(M==null?void 0:M.length)===0?E.contents=[]:E.contents=M==null?void 0:M.map(L=>{let m={};return L==null||L.forEach(C=>{m[C==null?void 0:C.key]=C==null?void 0:C.value}),m})}return E})}return a==null?void 0:a.contents},md=a=>a==null?void 0:a.contents,yd=a=>a==null?void 0:a.contents,bd=a=>a==null?void 0:a.contents,kd=a=>a==null?void 0:a.contents,xd=a=>a==null?void 0:a.contents,wd=a=>a==null?void 0:a.contents,Dd=a=>{var r,i,l,u;if(((r=a==null?void 0:a.filter)==null?void 0:r[0])!=="[")return(i=a==null?void 0:a.contents)==null?void 0:i.map(b=>{var v;return(b==null?void 0:b.key)==="formContent"&&(b.contents=(v=b.contents)==null?void 0:v.map(p=>(p.width=parseInt(a==null?void 0:a.filter),p))),b});if(((l=a==null?void 0:a.filter)==null?void 0:l[0])==="["){let s=Ja(a==null?void 0:a.filter),b=s==null?void 0:s.map(p=>parseInt(p));return b=ld(b),(u=a==null?void 0:a.contents)==null?void 0:u.map((p,x)=>{var E;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(E=p.contents)==null?void 0:E.map(O=>{var F;return O.width=(F=b==null?void 0:b.find(W=>(W==null?void 0:W.total)>x+1))==null?void 0:F.key,O})),p})}return a==null?void 0:a.contents},_d=a=>{var r;if((a==null?void 0:a.filter)!==""){let i=a==null?void 0:a.filter;return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=i==null?void 0:i.split(","),(r=a==null?void 0:a.contents)==null?void 0:r.map(u=>{var s,b,v;return(u==null?void 0:u.key)==="header"&&(Array.isArray((s=u==null?void 0:u.contents)==null?void 0:s[0])?u.contents[0]=(v=u.contents[0])==null?void 0:v.map(p=>(i!=null&&i.find(x=>x===(p==null?void 0:p.prop))&&(p.fixed="left"),p)):u.contents=(b=u.contents)==null?void 0:b.map(p=>(i!=null&&i.find(x=>x===(p==null?void 0:p.prop))&&(p.fixed="left"),p))),u})}return a==null?void 0:a.contents},Ed=async a=>{var r,i,l,u,s,b,v,p,x,E,O;if((a==null?void 0:a.filter)==="true"){let F=await Za((i=(r=ua==null?void 0:ua.value)==null?void 0:r[0])==null?void 0:i.parentContent,!1),W=(u=(l=ua==null?void 0:ua.value)==null?void 0:l[0])==null?void 0:u.value;F=(s=F==null?void 0:F[0])==null?void 0:s.compData;let N=(b=F==null?void 0:F.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:b.contents;N=((v=N==null?void 0:N.find(M=>M==null?void 0:M.isMainKey))==null?void 0:v.prop)??((p=N==null?void 0:N[0])==null?void 0:p.prop);let pe=(E=(x=F==null?void 0:F.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:x.contents)==null?void 0:E.find(M=>(M==null?void 0:M[N])===W);return(O=a==null?void 0:a.contents)==null?void 0:O.map(M=>{var L;return(M==null?void 0:M.key)==="formContent"&&(M.contents=(L=M.contents)==null?void 0:L.map(m=>(m.value=pe==null?void 0:pe[m==null?void 0:m.prop],m))),M})}return a==null?void 0:a.contents},Bl={onNumSlice:hd,onRandomContents:vd,onConditionContents:gd,onFatherPaceContents:md,onPaceContents:yd,onMainTagContents:bd,onButtonContents:kd,onPamButtonContents:xd,onRowButtonContents:wd,onRelated:Ed,onRowNum:Dd,onFixRow:_d},Cd=async a=>{var u,s,b,v,p,x,E,O,F,W,N,pe,$,M,L,m,C,h,w;let r="";if(((u=a==null?void 0:a.find(g=>(g==null?void 0:g.key)==="filter"))==null?void 0:u.contents)!==""&&(r=(s=a==null?void 0:a.find(g=>(g==null?void 0:g.key)==="filter"))==null?void 0:s.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(v=(b=r==null?void 0:r.replace("(",Gt))==null?void 0:b.split(Gt))==null?void 0:v[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=Ht(r,","))==null?void 0:p.map(g=>((g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g!=null&&g.includes("(")||(g=g==null?void 0:g.replaceAll(":","=")),g)),l=a;for(let g in i){let J,Ee="";(x=i==null?void 0:i[g])!=null&&x.includes("(")?(J=(F=(O=(E=i==null?void 0:i[g])==null?void 0:E.replace("(",Gt))==null?void 0:O.split(Gt))==null?void 0:F[0],Ee="("+((pe=(N=(W=i==null?void 0:i[g])==null?void 0:W.replace("(",Gt))==null?void 0:N.split(Gt))==null?void 0:pe[1])):(J=(L=(M=($=i==null?void 0:i[g])==null?void 0:$.replace("=",Gt))==null?void 0:M.split(Gt))==null?void 0:L[0],Ee=(h=(C=(m=i==null?void 0:i[g])==null?void 0:m.replace("=",Gt))==null?void 0:C.split(Gt))==null?void 0:h[1]);let Qe=(w=fa==null?void 0:fa.find(re=>(re==null?void 0:re.key)===J))==null?void 0:w.value;if(Qe){const re=Bl[Qe];await new Function("return ")(),l=re({contents:l,filter:Ee})}}return l},Sd=async a=>{var u,s,b,v,p,x,E,O,F,W,N,pe,$,M,L,m,C,h,w;let r="";if(((u=a==null?void 0:a.find(g=>(g==null?void 0:g.key)==="filter"))==null?void 0:u.contents)!==""&&(r=(s=a==null?void 0:a.find(g=>(g==null?void 0:g.key)==="filter"))==null?void 0:s.contents),r==="")return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(v=(b=r==null?void 0:r.replace("(",Gt))==null?void 0:b.split(Gt))==null?void 0:v[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=Ht(r,","))==null?void 0:p.map(g=>((g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g!=null&&g.includes("(")||(g=g==null?void 0:g.replaceAll(":","=")),g)),l=a;for(let g in i){let J,Ee="";(x=i==null?void 0:i[g])!=null&&x.includes("(")?(J=(F=(O=(E=i==null?void 0:i[g])==null?void 0:E.replace("(",Gt))==null?void 0:O.split(Gt))==null?void 0:F[0],Ee="("+((pe=(N=(W=i==null?void 0:i[g])==null?void 0:W.replace("(",Gt))==null?void 0:N.split(Gt))==null?void 0:pe[1])):(J=(L=(M=($=i==null?void 0:i[g])==null?void 0:$.replace("=",Gt))==null?void 0:M.split(Gt))==null?void 0:L[0],Ee=(h=(C=(m=i==null?void 0:i[g])==null?void 0:m.replace("=",Gt))==null?void 0:C.split(Gt))==null?void 0:h[1]);let Qe=(w=fa==null?void 0:fa.find(re=>(re==null?void 0:re.key)===J))==null?void 0:w.value;if(Qe){const re=Bl[Qe];await new Function("return ")(),l=re({contents:l,filter:Ee})}}return l},Td=D.useLoginState(D.pinia),{loginUserInfo:fn}=D.storeToRefs(Td),Bd=D.useMenuState(D.pinia),{activeMenuPath:Po}=D.storeToRefs(Bd),po=Ve.useUnit(D.pinia),{selectTitle:ao}=D.storeToRefs(po);let oo=["新增","导入","导出"],lo=["查看","编辑","复制新增","删除"];const Id=async(a,r)=>{var b,v,p,x,E,O,F,W,N,pe,$,M,L;let i=Po.value,l="",u=((b=ao==null?void 0:ao.value)==null?void 0:b.find(m=>(m==null?void 0:m.condition)==="child"))??void 0;po.setSelectTitle([]),(a==null?void 0:a.length)===0||(i=r?i:(v=a==null?void 0:a[0])==null?void 0:v.object_name,l=(p=a==null?void 0:a[0])==null?void 0:p.father_name);let s=[];if(l!==""){let m=l;(m==null?void 0:m[(m==null?void 0:m.length)-1])==="/"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1));let C=await Za(m,!1);C=(x=C==null?void 0:C[0])==null?void 0:x.compData;let h=(E=C==null?void 0:C.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:E.contents;h=((O=h==null?void 0:h.find(g=>g==null?void 0:g.isMainKey))==null?void 0:O.prop)??((F=h==null?void 0:h[0])==null?void 0:F.prop);let w=(N=(W=C==null?void 0:C.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:W.contents)==null?void 0:N.map(g=>({label:g==null?void 0:g[h],value:g==null?void 0:g[h]}));s=(pe=l==null?void 0:l.split("/"))==null?void 0:pe.map(g=>(g===""?u?(u.isShow=!0,g=u):g={value:g,condition:"child",options:w,parentContent:(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"?l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1):l,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(i!==""){let m=($=i==null?void 0:i.split("/"))==null?void 0:$.map(C=>(C={condition:"normal",value:C.trim(),isShow:!0},C));((M=m==null?void 0:m[0])==null?void 0:M.value)===((L=s==null?void 0:s[0])==null?void 0:L.value)&&(m=m==null?void 0:m.filter((C,h)=>h!==0)),s=[...s,...m??[]]}l===""&&u&&((u==null?void 0:u.parentContent)!==Po.value&&(u.isShow=!1),(u==null?void 0:u.value)!==""&&s.push(u)),po.setSelectTitle(s)},Fo=async a=>{let r=[],i=a==null?void 0:a.map(async l=>{var p,x,E,O,F,W,N,pe,$,M,L,m,C,h,w,g,J,Ee,Qe,re,Be,Oe,R,le,oe,fe,$e,tt,X,z,ie;let u=(O=(E=(x=(p=l==null?void 0:l.contents)==null?void 0:p.find(Z=>{var ve;return(ve=Z==null?void 0:Z.key)==null?void 0:ve.includes("struct")}))==null?void 0:x.value)==null?void 0:E[0])==null?void 0:O.类型,s=Object.values(l==null?void 0:l.name);s=s==null?void 0:s.reverse();let b=(F=l==null?void 0:l.contents)==null?void 0:F.map(Z=>Z==null?void 0:Z.key),v={comp:u,isShow:!0,name:s==null?void 0:s[0],id:l==null?void 0:l.object_id,relatedTables:b};for(let Z in s)parseInt(Z)>=1&&(v[`name${parseInt(Z)-1}`]=s[Z]);if(u==="Table"){let Z=(W=l==null?void 0:l.contents)==null?void 0:W.find(ke=>{var T;return(T=ke==null?void 0:ke.key)==null?void 0:T.includes("content")}),ve=[];Z.value=(N=Z==null?void 0:Z.value)==null?void 0:N.sort((ke,T)=>parseInt(ke)-parseInt(T)),ve.push({key:"tableContents",contents:Z==null?void 0:Z.value});let we=(m=(L=(M=($=(pe=l==null?void 0:l.contents)==null?void 0:pe.find(ke=>{var T;return(T=ke==null?void 0:ke.key)==null?void 0:T.includes("struct")}))==null?void 0:$.value)==null?void 0:M[0])==null?void 0:L.结构)==null?void 0:m.contents;ve.push({key:"header",contents:we}),ve.push({key:"filter",contents:(J=(g=(w=(h=(C=l==null?void 0:l.contents)==null?void 0:C.find(ke=>{var T;return(T=ke==null?void 0:ke.key)==null?void 0:T.includes("struct")}))==null?void 0:h.value)==null?void 0:w[0])==null?void 0:g.引用)==null?void 0:J.contents});let Ce=oo==null?void 0:oo.map(ke=>({label:ke})),te=lo==null?void 0:lo.map(ke=>({label:ke}));ve.push({key:"extraButton",contents:Ce}),ve.push({key:"rowButton",contents:te}),v.compData=await Sd(ve)}else if(u==="Form"){let Z=[],ve=(re=(Qe=(Ee=l==null?void 0:l.contents)==null?void 0:Ee.find(Ce=>{var te;return(te=Ce==null?void 0:Ce.key)==null?void 0:te.includes("content")}))==null?void 0:Qe.value)==null?void 0:re[0],we=(fe=(oe=(le=(R=(Oe=(Be=l==null?void 0:l.contents)==null?void 0:Be.find(Ce=>{var te;return(te=Ce==null?void 0:Ce.key)==null?void 0:te.includes("struct")}))==null?void 0:Oe.value)==null?void 0:R[0])==null?void 0:le.结构)==null?void 0:oe.contents)==null?void 0:fe.map(Ce=>(Ce.value=ve==null?void 0:ve[Ce==null?void 0:Ce.prop],Ce));Z.push({key:"filter",contents:(ie=(z=(X=(tt=($e=l==null?void 0:l.contents)==null?void 0:$e.find(Ce=>{var te;return(te=Ce==null?void 0:Ce.key)==null?void 0:te.includes("struct")}))==null?void 0:tt.value)==null?void 0:X[0])==null?void 0:z.引用)==null?void 0:ie.contents}),Z.push({key:"formContent",contents:we}),v.compData=await Cd(Z)}return v});return r=await Promise.all(i),r},Za=async(a,r,i={})=>{var b,v,p,x,E,O,F,W,N,pe,$,M;let l=await Pn.getPageDataApi({platId:parseInt((b=fn==null?void 0:fn.value)==null?void 0:b.plat_id),pageName:a}),u=(v=l==null?void 0:l.data)==null?void 0:v.result;if((u==null?void 0:u.length)===0&&(i!=null&&i.originPath)&&(i==null?void 0:i.originPath)!==a){let L=await Pn.getPageDataApi({platId:parseInt((p=fn==null?void 0:fn.value)==null?void 0:p.plat_id),pageName:i==null?void 0:i.originPath});if(((E=(x=L==null?void 0:L.data)==null?void 0:x.result)==null?void 0:E.length)>0){let m=await Fo((O=L==null?void 0:L.data)==null?void 0:O.result);m=m==null?void 0:m.map(w=>{var Ee,Qe,re,Be,Oe,R,le,oe,fe,$e,tt,X,z,ie,Z;let g=[],J=(Ee=Object.keys(w))==null?void 0:Ee.filter(ve=>ve==null?void 0:ve.includes("name"));for(let ve in w)J!=null&&J.find(we=>we===ve)&&g.push(w==null?void 0:w[ve]);if(g=g.reverse(),(w==null?void 0:w.comp)==="Table")w={filter:(re=(Qe=w==null?void 0:w.compData)==null?void 0:Qe.find(ve=>(ve==null?void 0:ve.key)==="filter"))==null?void 0:re.contents,key:w==null?void 0:w.comp,name:g,tableColumns:(Oe=(Be=w==null?void 0:w.compData)==null?void 0:Be.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:Oe.contents,tableContents:(le=(R=w==null?void 0:w.compData)==null?void 0:R.find(ve=>(ve==null?void 0:ve.key)==="tableContents"))==null?void 0:le.contents};else{let ve=($e=(fe=(oe=w==null?void 0:w.compData)==null?void 0:oe.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:fe.contents)==null?void 0:$e.map(Ce=>(Ce==null?void 0:Ce.value)??"");ve=[ve];let we=(z=(X=(tt=w==null?void 0:w.compData)==null?void 0:tt.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:X.contents)==null?void 0:z.map(Ce=>(Ce.value="",Ce));w={contents:ve,filter:(Z=(ie=w==null?void 0:w.compData)==null?void 0:ie.find(Ce=>(Ce==null?void 0:Ce.key)==="filter"))==null?void 0:Z.contents,key:w==null?void 0:w.comp,name:g,value:we}}return w});let C=[{key:"menuPath",contents:[{path:a,fatherPath:(N=(W=(F=L==null?void 0:L.data)==null?void 0:F.result)==null?void 0:W[0])==null?void 0:N.father_name,isShow:!1}]},{key:a,contents:m}];await Pn.createPlatFormDataApi({platId:parseInt((pe=fn==null?void 0:fn.value)==null?void 0:pe.plat_id),changeData:C});let h=await Pn.getPageDataApi({platId:parseInt(($=fn==null?void 0:fn.value)==null?void 0:$.plat_id),pageName:a});u=(M=h==null?void 0:h.data)==null?void 0:M.result}}return r&&await Id(u,!!(i!=null&&i.originPath)),await Fo(u)};var Pa={exports:{}},Nd=Pa.exports,Lo;function Ad(){return Lo||(Lo=1,function(a,r){(function(i,l){l()})(Nd,function(){function i(x,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(x.type)?new Blob(["\uFEFF",x],{type:x.type}):x}function l(x,E,O){var F=new XMLHttpRequest;F.open("GET",x),F.responseType="blob",F.onload=function(){p(F.response,E,O)},F.onerror=function(){console.error("could not download file")},F.send()}function u(x){var E=new XMLHttpRequest;E.open("HEAD",x,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function s(x){try{x.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),x.dispatchEvent(E)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ve.commonjsGlobal=="object"&&Ve.commonjsGlobal.global===Ve.commonjsGlobal?Ve.commonjsGlobal:void 0,v=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(x,E,O){var F=b.URL||b.webkitURL,W=document.createElement("a");E=E||x.name||"download",W.download=E,W.rel="noopener",typeof x=="string"?(W.href=x,W.origin===location.origin?s(W):u(W.href)?l(x,E,O):s(W,W.target="_blank")):(W.href=F.createObjectURL(x),setTimeout(function(){F.revokeObjectURL(W.href)},4e4),setTimeout(function(){s(W)},0))}:"msSaveOrOpenBlob"in navigator?function(x,E,O){if(E=E||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(i(x,O),E);else if(u(x))l(x,E,O);else{var F=document.createElement("a");F.href=x,F.target="_blank",setTimeout(function(){s(F)})}}:function(x,E,O,F){if(F=F||open("","_blank"),F&&(F.document.title=F.document.body.innerText="downloading..."),typeof x=="string")return l(x,E,O);var W=x.type==="application/octet-stream",N=/constructor/i.test(b.HTMLElement)||b.safari,pe=/CriOS\/[\d]+/.test(navigator.userAgent);if((pe||W&&N||v)&&typeof FileReader<"u"){var $=new FileReader;$.onloadend=function(){var m=$.result;m=pe?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),F?F.location.href=m:location=m,F=null},$.readAsDataURL(x)}else{var M=b.URL||b.webkitURL,L=M.createObjectURL(x);F?F.location=L:location.href=L,F=null,setTimeout(function(){M.revokeObjectURL(L)},4e4)}});b.saveAs=p.saveAs=p,a.exports=p})}(Pa)),Pa.exports}Ad();const ja=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BPstNH4r.cjs")).then(a=>a.index));ja.install=a=>{a.component("ssMenu",ja)};const Il={__name:"index",props:{name:String},setup(a){const r=a,i=e.computed(()=>rt.ElIcons[r.name]);return e.onMounted(()=>{}),(l,u)=>{const s=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(s,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value)))]),_:1})}}},Nl=(a,r,i=0)=>{let l=a;return l!=null&&l.every(u=>Array.isArray(u))&&(l!=null&&l.every(u=>Array.isArray(u)&&u.length===1)?l=l==null?void 0:l.filter(u=>(u==null?void 0:u[0])!==(r==null?void 0:r[i])):l=l==null?void 0:l.map(u=>{if(u!=null&&u.find(s=>s===(r==null?void 0:r[i]))&&(r==null?void 0:r.length)!==1){let s=D.cloneDeep(r),b=u==null?void 0:u.filter(E=>E!==(s==null?void 0:s[i])),v=i+1,p=Nl(b,s,v),x=[];x.push(u==null?void 0:u[0]),p==null||p.forEach(E=>{x.push(E)}),u=x}return u})),l},Al=(a,r,i,l=0)=>{let u=a;return u!=null&&u.every(s=>Array.isArray(s))&&(u!=null&&u.every(s=>Array.isArray(s)&&s.length===1)?u.push([i]):u=u==null?void 0:u.map(s=>{if(s!=null&&s.find(b=>b===(r==null?void 0:r[l]))&&(r==null?void 0:r.length)!==1){let b=D.cloneDeep(r),v=s==null?void 0:s.filter(O=>O!==(b==null?void 0:b[l])),p=l+1,x=Al(v,b,i,p),E=[];E.push(s==null?void 0:s[0]),x==null||x.forEach(O=>{E.push(O)}),s=E}return s})),u},Vl=(a,r,i,l,u=0)=>{let s=a;return s!=null&&s.every(b=>Array.isArray(b))&&(s!=null&&s.every(b=>Array.isArray(b)&&b.length===1)?s=s==null?void 0:s.map(b=>((b==null?void 0:b[0])===i&&(b=[l]),b)):s=s==null?void 0:s.map(b=>{if(b!=null&&b.find(v=>v===(r==null?void 0:r[u]))&&(r==null?void 0:r.length)!==1){let v=D.cloneDeep(r),p=b==null?void 0:b.filter(F=>F!==(v==null?void 0:v[u])),x=u+1,E=Vl(p,v,i,l,x),O=[];O.push(b==null?void 0:b[0]),E==null||E.forEach(F=>{O.push(F)}),b=O}return b})),s};function Ol(a="menu"){return{name:a,components:{SvgIcon:Wr.SvgIcon,ssMenu:ja,DynamicIcon:Il,ssDialog:Jt.ssDialog,ssInput:It._sfc_main$2},setup(r,{emit:i}){const l=e.defineProps({mode:{type:String,default:"vertical"}}),u=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=D.useMenuState(),b=D.useModelComp(D.pinia),v=D.useLoginState(D.pinia),{loginUserInfo:p}=D.storeToRefs(v),x=e.ref(0),E=Hr.useRouter(),O=e.ref(),{asideMenus:F,menuTriggerType:W,platform:N}=D.storeToRefs(s),{fixMenuStatus:pe}=D.storeToRefs(b),$=e.computed(()=>l==null?void 0:l.mode),M=te=>te==null?void 0:te.map(T=>{var Ge,Ye;return!(T!=null&&T.children)||((Ge=T==null?void 0:T.children)==null?void 0:Ge.length)===0?T.config=u.value:T!=null&&T.children&&((Ye=T==null?void 0:T.children)==null?void 0:Ye.length)>0&&(T.children=M(T.children)),T}),L=e.computed(()=>{let te=[...F.value];if((te==null?void 0:te.length)===0)return E.push("/"),[];const ke=J(te,g.value);return ke.isFlag||(te=ke==null?void 0:ke.data),te=te==null?void 0:te.map(T=>{var Ge,Ye;return!(T!=null&&T.children)||((Ge=T==null?void 0:T.children)==null?void 0:Ge.length)===0?T.config=u.value:T!=null&&T.children&&((Ye=T==null?void 0:T.children)==null?void 0:Ye.length)>0&&(T.children=M(T.children)),T}),te}),m=async(te,ke)=>{b.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(te==null?void 0:te.path),s.setActiveAsideMenu(te),te.isRouter?E.push(te.path):E.push("/"),i("node-click",te,ke)},C=async te=>{const ke=qr.findNodeByPropInTree(L.value,"path",te);s.setActiveAsideMenu(ke),b.setRouteToChildPath(""),pe.value?b.setFixMenuStatus(!1):(we.value&&(W.value="open"),W.value==="click"?x.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(te):we.value||(s.setMenuTriggerType("click"),s.setActiveMenuPath(te))),te!=null&&te.startsWith("/")?E.push(te):E.push("/"),x.value++},h=te=>{we.value||s.setActiveMenuPath(te)},w=te=>{const ke=document.documentElement;te==null||te.forEach(T=>{ke.style.setProperty(T.name,T.value)})};e.onMounted(()=>{x.value=1});const g=e.computed(()=>{const te=sessionStorage.getItem("authority");return te?JSON.parse(te):[]});e.watch(()=>N.value,te=>{te==="browser"?w(ka.browserVerticalMenuClasses):te==="client"?(w(ka.clientHorizontalMenuClasses),w(ka.clientVerticalMenuClasses)):te==="three"&&(w(ka.threeHorizontalMenuClasses),w(ka.threeVerticalMenuClasses))},{immediate:!0});const J=(te,ke)=>({isFlag:!0}),Ee=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Qe=te=>ra(te),re=e.ref({}),Be=e.ref([]),Oe=e.ref({}),R=e.ref({}),le=te=>{switch(te){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},oe=e.ref({}),fe=te=>{s.setCacheInputMenu({type:Ee.type,data:te}),s.setIsRefreshMenus(!0)},$e=async(te,ke,T)=>{var Ge,Ye,Ae,ce,ne,de,Se,qe,dt,y,I,H,Q,S,se,Me,A,ae,U,q,Te,ue,G,ee,he,ye,_e,xe,K,Re,be,Ke,ot,je,at,Ne,gt,et,ze,it,mt,Je;if(ke==="create"){let Ue=(T==null?void 0:T.title)+"(1)",Nt=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ie=(Ye=(Ge=Nt==null?void 0:Nt.data)==null?void 0:Ge.result)==null?void 0:Ye[0],Xe=(Ae=Ie==null?void 0:Ie.value)==null?void 0:Ae.pageData;Xe.compData=(ce=Xe.compData)==null?void 0:ce.map(B=>{var ge;return(B==null?void 0:B.key)==="menuContents"&&(B.contents=Al(B.contents,(ge=T==null?void 0:T.path)==null?void 0:ge.split("/"),Ue)),B}),await rt.updateInsofDataApi({id:Ie==null?void 0:Ie.id,value:{pageData:Xe}});let Fe=(de=(ne=T==null?void 0:T.path)==null?void 0:ne.split("/"))==null?void 0:de.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}),Ze=await Ve.getItemData((dt=(qe=(Se=T==null?void 0:T.path)==null?void 0:Se.split("/"))==null?void 0:qe.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(Fe.push(Ue),Fe=Fe==null?void 0:Fe.join("/"),(Ze==null?void 0:Ze.length)>0){let B=Ze==null?void 0:Ze[0],ge=(I=(y=B==null?void 0:B.compData)==null?void 0:y.find(We=>(We==null?void 0:We.key)==="header"))==null?void 0:I.contents;if(((H=ge==null?void 0:ge[0])==null?void 0:H.directiveLabel)==="#isMain"){let We=(Q=ge==null?void 0:ge[0])==null?void 0:Q.prop,me=(se=(S=B==null?void 0:B.compData)==null?void 0:S.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:se.contents,ut;me==null||me.forEach(st=>{var xt,pt;if(st.length===1)((xt=st==null?void 0:st[0])==null?void 0:xt[We])===(T==null?void 0:T.title)&&(ut=st==null?void 0:st[0],ut[We]=Ue);else{let ct=(pt=ge==null?void 0:ge.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=Ve.getValueToObjectValue(ft,ct);wt[We]=Ue,ut=wt}}),await rt.createInsofDataApi({key:{type:"data",pageKey:(ae=(A=(Me=T==null?void 0:T.path)==null?void 0:Me.split("/"))==null?void 0:A.filter((st,xt)=>{var pt,ct;return xt!==((ct=(pt=T==null?void 0:T.path)==null?void 0:pt.split("/"))==null?void 0:ct.length)-1}))==null?void 0:ae.join("/"),tableId:B==null?void 0:B.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(U=p.value)==null?void 0:U.id,createUserLayer:((q=p.value)==null?void 0:q.dept)||((Te=p.value)==null?void 0:Te.部门名称)},value:{tableData:ut}})}}await Ve.newLoadingConstruct(T==null?void 0:T.path,Fe),s.setUpdateMenuStatus(!1),await Pn.verifyStructureDataToStore(),s.setActiveMenuPath((ee=(G=(ue=T==null?void 0:T.path)==null?void 0:ue.split("/"))==null?void 0:G.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}))==null?void 0:ee.join("/")),s.setActiveTopMenuPath((ye=(he=T==null?void 0:T.path)==null?void 0:he.split("/"))==null?void 0:ye[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(ke==="update")O.value=T;else if(ke==="delete"){let Ue=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:T==null?void 0:T.path}}),Nt=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ie=(xe=(_e=Nt==null?void 0:Nt.data)==null?void 0:_e.result)==null?void 0:xe[0],Xe=(K=Ie==null?void 0:Ie.value)==null?void 0:K.pageData;if(Xe.compData=(Re=Xe.compData)==null?void 0:Re.map(B=>{var ge;return(B==null?void 0:B.key)==="menuContents"&&(B.contents=Nl(B.contents,(ge=T==null?void 0:T.path)==null?void 0:ge.split("/"))),B}),await rt.updateInsofDataApi({id:Ie==null?void 0:Ie.id,value:{pageData:Xe}}),((Ke=(be=Ue==null?void 0:Ue.data)==null?void 0:be.result)==null?void 0:Ke.length)>0){let B=(je=(ot=Ue==null?void 0:Ue.data)==null?void 0:ot.result)==null?void 0:je.map(ge=>ge==null?void 0:ge.id);(B==null?void 0:B.length)>0&&await rt.batchDeleteInsofDataApi({ids:B})}let Fe=await Ve.getItemData((gt=(Ne=(at=T==null?void 0:T.path)==null?void 0:at.split("/"))==null?void 0:Ne.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}))==null?void 0:gt.join("/"),sessionStorage.getItem("systemKey"),""),Ze=[];(Fe==null?void 0:Fe.length)>0&&(Fe==null||Fe.forEach(B=>{var We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut;let ge=(st=(ut=(me=(We=B==null?void 0:B.compData)==null?void 0:We.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:me.contents)==null?void 0:ut[0])==null?void 0:st.prop;((ft=(ct=(pt=(xt=B==null?void 0:B.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"&&((Ut=(Tt=(wt=B==null?void 0:B.compData)==null?void 0:wt.find(vt=>(vt==null?void 0:vt.key)==="tableContents"))==null?void 0:Tt.contents)==null||Ut.forEach(vt=>{var zt,$t,Kt;(vt==null?void 0:vt.length)>1?(vt==null?void 0:vt[1])===(T==null?void 0:T.title)&&Ze.push((zt=vt==null?void 0:vt[0])==null?void 0:zt.id):(($t=vt==null?void 0:vt[0])==null?void 0:$t[ge])===(T==null?void 0:T.title)&&Ze.push((Kt=vt==null?void 0:vt[0])==null?void 0:Kt.id)}))})),(Ze==null?void 0:Ze.length)>0&&await rt.batchDeleteInsofDataApi({ids:Ze}),s.setUpdateMenuStatus(!1),await Pn.verifyStructureDataToStore(),s.setActiveMenuPath((it=(ze=(et=T==null?void 0:T.path)==null?void 0:et.split("/"))==null?void 0:ze.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}))==null?void 0:it.join("/")),s.setActiveTopMenuPath((Je=(mt=T==null?void 0:T.path)==null?void 0:mt.split("/"))==null?void 0:Je[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},tt=async(te,ke)=>{var qe,dt,y,I,H,Q,S,se,Me,A,ae,U,q,Te,ue,G,ee,he,ye,_e,xe,K,Re,be,Ke,ot,je,at,Ne,gt,et;let T=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ge=(dt=(qe=T==null?void 0:T.data)==null?void 0:qe.result)==null?void 0:dt[0],Ye=(y=Ge==null?void 0:Ge.value)==null?void 0:y.pageData;Ye.compData=(I=Ye.compData)==null?void 0:I.map(ze=>{var it,mt;return(ze==null?void 0:ze.key)==="menuContents"&&(ze.contents=Vl(ze.contents,(it=ke==null?void 0:ke.path)==null?void 0:it.split("/"),ke==null?void 0:ke.title,(mt=te==null?void 0:te.target)==null?void 0:mt.value)),ze}),Ge!=null&&Ge.id&&await rt.updateInsofDataApi({id:Ge==null?void 0:Ge.id,value:{pageData:Ye}});let Ae=(Q=(H=ke==null?void 0:ke.path)==null?void 0:H.split("/"))==null?void 0:Q.filter((ze,it)=>{var mt,Je;return it!==((Je=(mt=ke==null?void 0:ke.path)==null?void 0:mt.split("/"))==null?void 0:Je.length)-1}),ce=Ae==null?void 0:Ae.join("/");Ae.push((S=te==null?void 0:te.target)==null?void 0:S.value),Ae=Ae==null?void 0:Ae.join("/");let ne=await Ve.getItemData(ce,sessionStorage.getItem("systemKey"),"");if(((U=(ae=(A=(Me=(se=ne==null?void 0:ne[0])==null?void 0:se.compData)==null?void 0:Me.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:A.contents)==null?void 0:ae[0])==null?void 0:U.directiveLabel)==="#isMain"){let ze=(ee=(G=(ue=(Te=(q=ne==null?void 0:ne[0])==null?void 0:q.compData)==null?void 0:Te.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ue.contents)==null?void 0:G[0])==null?void 0:ee.prop,it=(_e=(ye=(he=ne==null?void 0:ne[0])==null?void 0:he.compData)==null?void 0:ye.find(Ue=>(Ue==null?void 0:Ue.key)==="tableContents"))==null?void 0:_e.contents,mt=(be=(Re=(K=(xe=ne==null?void 0:ne[0])==null?void 0:xe.compData)==null?void 0:K.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:Re.contents)==null?void 0:be.map(Ue=>Ue==null?void 0:Ue.prop),Je;if(it==null||it.forEach(Ue=>{var Ie;let Nt=Ve.getValueToObjectValue(Ue,mt);(Nt==null?void 0:Nt[ze])===ke.title&&(Je=Nt,Je[ze]=(Ie=te==null?void 0:te.target)==null?void 0:Ie.value)}),Je){let Ue={};for(let Ie in Je)Ie!=="id"&&(Ue[Ie]=Je==null?void 0:Je[Ie]);let Nt=[{id:Je==null?void 0:Je.id,value:{tableData:Ue}}];await rt.batchUpdateInsofDataApi({dataList:Nt})}}let de=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ke==null?void 0:ke.path}}),Se=(ot=(Ke=de==null?void 0:de.data)==null?void 0:Ke.result)==null?void 0:ot.map(ze=>({id:ze==null?void 0:ze.id,key:ze==null?void 0:ze.key}));Se=Se==null?void 0:Se.map(ze=>(ze.key.pageKey=Ae,ze)),(Se==null?void 0:Se.length)>0&&await rt.batchUpdateInsofDataApi({dataList:Se}),s.setUpdateMenuStatus(!1),await Pn.verifyStructureDataToStore(),s.setActiveMenuPath((Ne=(at=(je=ke==null?void 0:ke.path)==null?void 0:je.split("/"))==null?void 0:at.filter((ze,it)=>{var mt,Je;return it!==((Je=(mt=ke==null?void 0:ke.path)==null?void 0:mt.split("/"))==null?void 0:Je.length)-1}))==null?void 0:Ne.join("/")),s.setActiveTopMenuPath((et=(gt=ke==null?void 0:ke.path)==null?void 0:gt.split("/"))==null?void 0:et[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),O.value=void 0},X=async(te,ke)=>{Ee.type=le(ke==null?void 0:ke.operateType),await $e(ke,Ee.type,te),R.value=te,oe.value=ke},z=()=>{Ee.show=!1},ie=te=>te==null?void 0:te.filter(ke=>ke.allowInherit),Z=()=>{var T,Ge,Ye,Ae,ce;let te;Ee.type==="create"&&(te=((T=R.value)==null?void 0:T.path)+"/"+Oe.value[(Ge=Oe.value)==null?void 0:Ge.prop]),Ee.type==="update"&&(te=(Ye=R.value)==null?void 0:Ye.path);const ke={...R.value,config:ie((Ae=R.value)==null?void 0:Ae.config),children:[],childMenus:[],title:Oe.value[(ce=Oe.value)==null?void 0:ce.prop],path:te};console.log("clickSubmitForm",oe.value,R.value,ke),fe(ke),Ee.show=!1},ve=te=>{var T,Ge;const ke=(T=te==null?void 0:te.contents)==null?void 0:T.find(Ye=>Ye.key==="formContent");ke&&(Oe.value=(Ge=ke==null?void 0:ke.contents)==null?void 0:Ge.reduce((Ye,Ae)=>(Ye[Ae.key]=Ae.value,Ye.prop=Ae.key,Ye),{}))},we=e.ref(!1);return{isCollapse:we,handleMenuCollapse:()=>{we.value=!we.value},handleCompChange:ve,dialogForm:re,dialogRenderComps:Be,getComponents:Qe,clickSubmitForm:Z,dialogInfo:Ee,beforeDialogDestroy:z,clickMenuIcon:X,mode:$,renderMenuList:L,clickMenu:m,openMenu:C,closeMenu:h,changeMenuStyle:w,fixElement:O,onBlur:tt}}}}e.defineComponent(Ol());const Vd=D.useLoginState(),{loginUserInfo:ro}=D.storeToRefs(Vd),an=D.useModelComp(D.pinia),Od=e.ref(!1),{itemData:Md,itemGridData:ta,curStructureCompIds:$o,isSubmitCurStructure:zd,isRefreshCurStructure:Rd,routeToChildPath:Pd,pageMapState:fo,itemExtendData:Oa}=D.storeToRefs(an),un=D.useMenuState(D.pinia),{activeTopMenuPath:Fd,activeMenuPath:gn,platform:_f,activeAsideMenu:Ef,buttonTriggerType:Ld,menus:Cf}=D.storeToRefs(un),oa=Ve.useUnit(D.pinia),{selectTitle:Ml,chooseTitle:jo}=D.storeToRefs(oa),$d=Ve.useOriginalState(D.pinia),{originalPath:Sf}=D.storeToRefs($d);e.ref();D.useAuthorityState(D.pinia);const Ua=e.ref(!0),va=e.ref(0),ho=e.ref([]);e.ref(!1);const jd=()=>{an.setItemGridData([]),an.setIsEdit("edit"),an.setSubmitCurStructure(gn.value!=="/平台管理/菜单管理")},Ud=()=>{an.setIsEdit("view"),an.setRefreshCurStructure(!0)},Kd=async a=>{const r=sessionStorage.getItem("systemKey"),i=await Ve.getItemData(a,r,"");return i&&i.length>0},Wd=async a=>{var v,p,x;let r=Ml.value,i=r==null?void 0:r.findIndex(E=>(E==null?void 0:E.value)===(a==null?void 0:a.value)),l=(v=r==null?void 0:r.filter(E=>(E==null?void 0:E.condition)==="parent"))==null?void 0:v.map(E=>E==null?void 0:E.value),u=l==null?void 0:l[0],s=(x=(p=r==null?void 0:r.filter((E,O)=>!(E!=null&&E.condition)&&O<=i))==null?void 0:p.map(E=>E.value))==null?void 0:x.join("/");u?(s==null?void 0:s.length)>0?u=u+"/"+s:u=l==null?void 0:l.join("/"):(s==null?void 0:s.length)>0&&(u=s,r=r==null?void 0:r.filter(E=>(E==null?void 0:E.condition)!=="child"),oa.setSelectTitle(r),oa.setChooseTitle([])),await Kd(u)&&un.setActiveMenuPath(u)},io=async(a,r,i,l="contentConfig")=>{var u;try{if(!Array.isArray(a))return;let s,b;r==="create"?(s={dataList:a==null?void 0:a.map(p=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i!=null&&i.startsWith("/")?i==null?void 0:i.substring(1):i,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...p,compData:(x=p==null?void 0:p.compData)==null?void 0:x.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},b=rt.batchAddInsofDataApi):r==="update"?(s={dataList:a==null?void 0:a.map(p=>{var x;return{id:p==null?void 0:p.id,value:{pageData:{...p,compData:(x=p==null?void 0:p.compData)==null?void 0:x.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},b=rt.batchUpdateInsofDataApi):r==="delete"&&(s={ids:a},b=rt.batchDeleteInsofDataApi);const v=await b(s);if(((u=v==null?void 0:v.data)==null?void 0:u.code)===200)return v.data.result;throw rt.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{rt.ElMessage.error("保存响应失败")}},Uo=async(a,r,i,l)=>{var u,s,b,v,p,x,E,O,F,W,N;try{const pe=(s=(u=a==null?void 0:a.results)==null?void 0:u.filter(h=>!(h!=null&&h.id)||typeof(h==null?void 0:h.id)=="string"))==null?void 0:s.map(h=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:i},value:{tableData:h}})),$=(v=(b=a==null?void 0:a.results)==null?void 0:b.filter(h=>(h==null?void 0:h.id)&&typeof(h==null?void 0:h.id)=="number"))==null?void 0:v.map(h=>({id:h==null?void 0:h.id,value:{tableData:h}})),M=JSON.parse(D.cloneDeep(JSON.stringify(a))),L=(p=M==null?void 0:M.results)==null?void 0:p.map(h=>h.id);let m;i?m=(O=(E=(x=fo.value)==null?void 0:x[gn.value])==null?void 0:E.filter(h=>{var w,g,J;return((w=h==null?void 0:h.key)==null?void 0:w.type)===r&&((J=(g=h==null?void 0:h.key)==null?void 0:g.relatedInfo)==null?void 0:J.target)===l}))==null?void 0:O.map(h=>h==null?void 0:h.id):m=(N=(W=(F=fo.value)==null?void 0:F[gn.value])==null?void 0:W.filter(h=>{var w;return((w=h==null?void 0:h.key)==null?void 0:w.type)===r}))==null?void 0:N.map(h=>h==null?void 0:h.id);const C=m==null?void 0:m.filter(h=>!(L!=null&&L.includes(h))&&typeof h=="number");(pe==null?void 0:pe.length)>0&&await rt.batchAddInsofDataApi({dataList:pe}),($==null?void 0:$.length)>0&&await rt.batchUpdateInsofDataApi({dataList:$}),(C==null?void 0:C.length)>0&&await rt.batchDeleteInsofDataApi({ids:C})}catch(pe){throw new Error(pe)}},Hd=async a=>{var x,E,O,F,W,N,pe,$,M,L;un.setContentLoading(!0);const r=JSON.parse(D.cloneDeep(JSON.stringify(Md.value)));if(!zd.value)return un.setCacheStructures({key:Ld.value,data:r}),rt.ElMessage.success("已暂存");const i=r==null?void 0:r.map(m=>m.id),l=i.filter(m=>{var C;return!((C=$o.value)!=null&&C.includes(m))}),u=(x=$o.value)==null?void 0:x.filter(m=>!i.includes(m)),s=[...l,...u].filter(m=>typeof m!==null&&typeof m<"u"),b=r==null?void 0:r.filter(m=>!m.id),v=r==null?void 0:r.filter(m=>m.id);let p=[];if(s&&(s==null?void 0:s.length)>0&&p.push(io(s,"delete",a)),b&&(b==null?void 0:b.length)>0&&p.push(io(b,"create",a)),v&&(v==null?void 0:v.length)>0&&p.push(io(v,"update",a)),ta.value&&((E=ta.value)!=null&&E.isDelete&&((F=(O=ta.value)==null?void 0:O.results)==null?void 0:F.length)>0&&((N=(W=ta.value)==null?void 0:W.results)!=null&&N.every(m=>typeof m=="number"))?await rt.batchDeleteInsofDataApi({ids:(pe=ta.value)==null?void 0:pe.results}):(console.log("itemGridData.value",ta.value),p.push(await Uo(ta.value,"gridLayout")))),Oa.value)for(const m in Oa.value)p.push(await Uo(($=Oa.value)==null?void 0:$[m],"extend",{target:m,compId:(L=(M=Oa.value)==null?void 0:M[m])==null?void 0:L.compId},m));await Promise.all(p).then(()=>{rt.ElMessage.success("保存成功"),an.setRefreshCurStructure(!0)}).catch(m=>{rt.ElMessage.success(m)}),un.setContentLoading(!1)},Ka=a=>ra(a),Yt=e.ref([]),qd=e.computed(()=>{var a;return(a=Yt.value)==null?void 0:a.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),zl=e.computed(()=>{var a;return(a=Yt.value)==null?void 0:a.filter(r=>!(r!=null&&r.affix)||(r==null?void 0:r.affix)==="default")}),Rl=e.ref(0),Pl=e.ref(null),Wa=async(a,r="data",i)=>{var l,u;if((a==null?void 0:a.buttonName)==="新增"){let s=[{tableName:(l=a==null?void 0:a.relatedContents)==null?void 0:l.find(b=>b==null?void 0:b.includes("content")),tableContents:a==null?void 0:a.fixContent}];await Pn.pageBatchAddApi({platId:parseInt((u=ro==null?void 0:ro.value)==null?void 0:u.plat_id),changeContents:s})}an.setRefreshCurStructure(!0)},Ha=async(a,r)=>{},qa=async a=>{Yt.value=await Ve.getDeepDiffItems(a),an.setItemData(Yt.value),an.setOriginalData(Yt.value)};e.ref();const wa=e.ref(null),Xd=()=>{var a,r;console.log("倒计时结束时"),D.ElMessageBox.alert(`超时未提交,【${(r=(a=gn.value)==null?void 0:a.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=e.ref([]),Gd=e.computed(()=>{var a,r;return(r=(a=fo.value)==null?void 0:a[gn.value])==null?void 0:r.filter(i=>{var l;return((l=i==null?void 0:i.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Fd.value],()=>{oa.setSelectTitle([]),oa.setChooseTitle([])},{deep:!0});e.watch(()=>[jo.value],async()=>{var r,i;let a=(r=jo.value)==null?void 0:r.filter(l=>(l==null?void 0:l.condition)==="child"&&(l==null?void 0:l.value)!==""&&(l==null?void 0:l.parentContent)!==gn.value);if((a==null?void 0:a.length)>0){un.setContentLoading(!0);let l=gn.value+"/"+((i=a==null?void 0:a[0])==null?void 0:i.value),u=await Za(l,!0,{originPath:gn.value});Yt.value=await Ve.getDeepDiffItems(u),un.setContentLoading(!1)}});e.watch(()=>[gn.value,Rd.value],async a=>{var b,v,p;if(!gn.value)return;an.setLockingPage(""),Yt.value=[];let r=e.getCurrentInstance();(b=r==null?void 0:r.scope)==null||b.stop(),r=null,Ua.value=!1,un.setContentLoading(!0),Od.value=!0;let i=a==null?void 0:a[0],l=i,u=(v=Ml.value)==null?void 0:v.filter(x=>(x==null?void 0:x.condition)==="child"&&(x==null?void 0:x.value)!==""&&(x==null?void 0:x.parentContent)!==gn.value);(u==null?void 0:u.length)>0&&(i=i+"/"+((p=u==null?void 0:u[0])==null?void 0:p.value));let s=await Za(i,!0,{originPath:l});Yt.value=await Ve.getDeepDiffItems(s),un.setContentLoading(!1),an.setExtraContents([]),oa.setSelectIndex(""),oa.setSelectMenu(""),an.setItemData(Yt.value),an.setOriginalData(Yt.value),e.nextTick(()=>{va.value=va.value++,Ua.value=!0})},{immediate:!0});const Yd=async()=>{un.setLinkMenuInfo(null),un.setActiveMenuPath(Pd.value),Yt.value=null,an.setRouteToChildPath(""),un.setChildMenu("")},Jd=a=>new RegExp("button","i").test(a),Zd=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ll=a=>{if(Zd(a)){const r=a==null?void 0:a.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&un.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},$l=a=>{var r;wa.value&&(wa.value={...wa.value,mainKeyPropValue:a==null?void 0:a[(r=wa.value)==null?void 0:r.mainKeyProp]})},Qd=a=>{Rl.value=a},pa=e.reactive({index:0,comp:null}),ep=e.computed(()=>{var a;return(a=Yt.value)==null?void 0:a.map((r,i)=>({id:r.id,name:r.name,status:tp(r,i)}))}),jl=(a,r)=>{var p,x,E,O,F;const i=r?a:a-2,l=(p=Yt.value)==null?void 0:p[i],u=(E=(x=l==null?void 0:l.compData)==null?void 0:x.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:E.contents,s=u==null?void 0:u.findIndex(W=>(W==null?void 0:W.isMainKey)&&(W==null?void 0:W.label)!=="操作"),b=s===-1?0:s,v=(F=(O=l==null?void 0:l.compData)==null?void 0:O.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:F.contents;return{valid:v==null?void 0:v.every(W=>W==null?void 0:W[b+1]),length:(v==null?void 0:v.length)||0}},tp=(a,r)=>{var l;let i="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:u,length:s}=jl(r,!0);pa.index===r?i="process":s===0?i="wait":i=u?"success":"error"}return i},Ul=a=>{var i,l,u,s,b;const r=a+1;if(r>1&&((u=(l=(i=Yt.value)==null?void 0:i[a])==null?void 0:l.comp)==null?void 0:u.toUpperCase())==="TABLE"){const{valid:v}=jl(r);v?(pa.index=r,pa.comp=(s=Yt.value)==null?void 0:s[a]):rt.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else pa.index=r,pa.comp=(b=Yt.value)==null?void 0:b[a]},Kl=e.computed(()=>{var a,r;return(r=(a=zl.value)==null?void 0:a[0])==null?void 0:r.isStepLayout});e.watch(()=>Kl.value,a=>{a&&Ul(0)},{immediate:!0});const np={class:"layout"},ap=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:r}){const i=r,l=a;e.onMounted(async()=>{});const u=e.computed(()=>D.cloneDeep(l==null?void 0:l.itemData)||[]),s=e.computed(()=>{var E;const x=(E=u==null?void 0:u.value)==null?void 0:E.find(O=>{const{key:F}=O;return F==="baseConfig"});return x==null?void 0:x.contents}),b=e.computed(()=>{var E;const x=(E=u==null?void 0:u.value)==null?void 0:E.find(O=>{const{key:F}=O;return F==="children"});return x==null?void 0:x.contents}),v=e.computed(()=>{let x=D.cloneDeep(b.value)||[];const E=x.length;let O=0;const F=[];if(x=x.map(W=>{const N=W.span;return N?(W.span=Number(N),O=O+W.span):F.push(W),W}),O<24){const W=Math.floor((24-O)/E);F.forEach(N=>{N.span=W})}return x}),p=x=>{i("rowClick",x)};return(x,E)=>{var W;const O=e.resolveComponent("el-col"),F=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",np,[e.createVNode(F,{style:e.normalizeStyle({height:(W=s.value)==null?void 0:W.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(N,pe)=>(e.openBlock(),e.createBlock(O,{span:N==null?void 0:N.span},{default:e.withCtx(()=>{var $;return[e.unref(Ua)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ka)(N.comp)),{key:e.unref(va),compName:N.name,index:(N==null?void 0:N.id)??pe,height:($=s.value)==null?void 0:$.height,itemData:N==null?void 0:N.compData,childItemData:N==null?void 0:N.itemChildData,onChange:e.unref(Wa),onContentChange:e.unref(Ha),onPageChange:e.unref(qa),onRowClick:p},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),op=Ft._export_sfc(ap,[["__scopeId","data-v-ab9a36ed"]]),lp={class:"layout-operate"},rp={class:"layout-module"},ip={class:"collapse-title-item"},sp={class:"collapse-title"},cp={class:"icon-content"},up=["onClick"],dp={class:"comp-child"},pp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r;e.onMounted(()=>{pe()});const u=e.ref({}),s=e.ref({}),b=e.ref([]),v=h=>[{label:"高度",prop:"height",type:"input",value:h==null?void 0:h.height}],p=h=>{s.value=h,l("change",C(),!0)},x=e.ref([]),E=e.ref([]),O=h=>[{label:"占比",prop:"span",type:"input",value:h==null?void 0:h.span}],F=e.computed(()=>{const h=i==null?void 0:i.itemContents;return D.cloneDeep(h)}),W=e.computed(()=>{const h=F==null?void 0:F.value,w=h==null?void 0:h.find(g=>{const{key:J}=g;return J==="baseConfig"});return w==null?void 0:w.contents}),N=e.computed(()=>{const h=F==null?void 0:F.value,w=h==null?void 0:h.find(g=>{const{key:J}=g;return J==="children"});return w==null?void 0:w.contents}),pe=()=>{var h;u.value=F.value||{},x.value=(N==null?void 0:N.value)||[],b.value=v(),b.value=(h=b.value)==null?void 0:h.map(w=>{var J;const{prop:g}=w;return w.value=(J=W.value)==null?void 0:J[g],w})};e.watch(()=>{var h;return(h=N==null?void 0:N.value)==null?void 0:h.length},()=>{var h;x.value=(N==null?void 0:N.value)||[],E.value=(h=N.value)==null?void 0:h.map(w=>O(w))},{immediate:!0});const $=(h,w)=>{const g=D.cloneDeep(N==null?void 0:N.value);g[w].span=h.span,x.value=g,l("change",C(),!0)},M=h=>ra(h),L=(h,w,g)=>{if(!h)return;const J=D.cloneDeep(N==null?void 0:N.value);J[g]&&(J[g].compData=h,x.value=J,l("change",C(),!0))},m=h=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let w=D.cloneDeep(N==null?void 0:N.value);w=w==null?void 0:w.filter((g,J)=>h!==J),x.value=w,l("change",C(),!0),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},C=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:x==null?void 0:x.value}]});return(h,w)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",lp,[e.createElementVNode("div",rp,[w[1]||(w[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(It.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:w[0]||(w[0]=J=>p(J))},null,8,["rowContents"])])]),e.createVNode(gl.default,{class:"collapse-content",collapseContents:N.value},{title:e.withCtx(({item:J,index:Ee})=>[e.createElementVNode("div",ip,[e.createElementVNode("div",sp,e.toDisplayString(J.name),1),e.createElementVNode("div",cp,[e.createElementVNode("div",{onClick:e.withModifiers(Qe=>m(Ee),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,up)])])]),content:e.withCtx(({item:J,index:Ee})=>[e.createElementVNode("div",dp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:E.value[Ee],key:Ee,isEnableWrap:!0,onChange:Qe=>$(Qe,Ee)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(J.comp+"Operate")),{itemContents:J==null?void 0:J.compData,originalItemContents:J.compData,onChange:Qe=>L(Qe,J,Ee)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),fp=Ft._export_sfc(pp,[["__scopeId","data-v-ba05456e"]]),hp=typeof window<"u";var Ko;hp&&((Ko=window==null?void 0:window.navigator)!=null&&Ko.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cn(a){return a==null}function Wl(){}const vp=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(vp)));function gp(){const a=new Map;return{on(r,i){const l=a.get(r);l!=null&&l.add(i)||a.set(r,new Set([i]))},off(r,i){const l=a.get(r);l&&l.delete(i)},clear(r){const i=a.get(r);i&&i.clear()},clearAll(){a.clear()},emit(r,...i){const l=a.get(r);l&&l.forEach(u=>{u(...i)})}}}function Wo(a,r=16){if(typeof a!="function")return Wl;const i=(...s)=>{a(...s)};if(r<=0)return Hl(i);let l=0,u;return function(...s){const b=Date.now(),v=b-l;clearTimeout(u),v>=r?(l=b,i(...s)):u=setTimeout(()=>{l=Date.now(),i(...s)},Math.max(0,r-v))}}function mp(a,r=100){if(typeof a!="function")return Wl;const i=(...u)=>{a(...u)};if(r<=0)return Hl(i);let l;return function(...u){clearTimeout(l),l=setTimeout(()=>{i(...u)},r)}}function Hl(a){if(typeof a!="function")return a;let r=!1,i,l;return function(...u){return i=u,r||(r=!0,l=Promise.resolve().then(()=>(r=!1,l=void 0,a(...i)))),l}}const _a=new Set,ql=new WeakMap;function yp(){_a.forEach(a=>{a(...ql.get(a))}),_a.clear()}function nn(a,...r){if(typeof a!="function")return a;ql.set(a,r),!_a.has(a)&&(_a.add(a),_a.size===1&&Promise.resolve().then(yp))}const Xl=Symbol("LAYOUT_KEY"),Gl=Symbol("EMITTER_KEY");function bp(a){let r=0,i;for(let l=0,u=a.length;l<u;l++)i=a[l].y+a[l].h,i>r&&(r=i);return r}function vo(a){const r=Array(a.length);for(let i=0,l=a.length;i<l;i++)r[i]=kp(a[i]);return r}function kp(a){return{...a}}function Yl(a,r){return!(a===r||a.x+a.w<=r.x||a.x>=r.x+r.w||a.y+a.h<=r.y||a.y>=r.y+r.h)}function da(a,r,i){const l=Zl(a),u=Ql(a),s=Array(a.length);for(let b=0,v=u.length;b<v;b++){let p=u[b];p.static||(p=xp(l,p,r,i),l.push(p)),s[a.findIndex(x=>x.i===p.i)]=p,p.moved=!1}return s}function xp(a,r,i,l){if(i)for(;r.y>0&&!Ea(a,r);)r.y--;else if(l){const s=l[r.i].y;for(;r.y>s&&!Ea(a,r);)r.y--}let u;for(;u=Ea(a,r);)r.y=u.y+u.h;return r}function wp(a,r){const i=Zl(a);for(let l=0,u=a.length;l<u;l++){const s=a[l];if(s.x+s.w>r.cols&&(s.x=r.cols-s.w),s.x<0&&(s.x=0,s.w=r.cols),!s.static)i.push(s);else for(;Ea(i,s);)s.y++}return a}function Ho(a,r){for(let i=0,l=a.length;i<l;i++)if(a[i].i===r)return a[i]}function Ea(a,r){for(let i=0,l=a.length;i<l;i++)if(Yl(a[i],r))return a[i]}function Jl(a,r){return a.filter(i=>Yl(i,r))}function Zl(a){return a.filter(r=>r.static)}function go(a,r,i,l,u=!1,s=!1){if(r.static)return a;const b=r.x,v=r.y,p=l&&r.y>l;typeof i=="number"&&(r.x=i),typeof l=="number"&&(r.y=l),r.moved=!0;let x=Ql(a);p&&(x=x.reverse());const E=Jl(x,r);if(s&&E.length)return r.x=b,r.y=v,r.moved=!1,a;for(let O=0,F=E.length;O<F;O++){const W=E[O];W.moved||r.y>W.y&&r.y-W.y>W.h/4||(W.static?a=qo(a,W,r,u):a=qo(a,r,W,u))}return a}function qo(a,r,i,l){if(l){const u={x:i.x,y:i.y,w:i.w,h:i.h};if(u.y=Math.max(r.y-i.h,0),!Ea(a,u))return go(a,i,void 0,u.y,!1)}return go(a,i,void 0,i.y+1,!1)}function Dp(a,r,i,l){const u="translate3d("+r+"px,"+a+"px, 0)";return{transform:u,WebkitTransform:u,MozTransform:u,msTransform:u,OTransform:u,width:i+"px",height:l+"px",position:"absolute"}}function _p(a,r,i,l){const u="translate3d("+r*-1+"px,"+a+"px, 0)";return{transform:u,WebkitTransform:u,MozTransform:u,msTransform:u,OTransform:u,width:i+"px",height:l+"px",position:"absolute"}}function Ep(a,r,i,l){return{top:a+"px",left:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function Cp(a,r,i,l){return{top:a+"px",right:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function Ql(a){return Array.from(a).sort(function(r,i){return r.y===i.y&&r.x===i.x?0:r.y>i.y||r.y===i.y&&r.x>i.x?1:-1})}function Sp(a,r){r=r||"Layout";const i=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(r+" must be an array!");for(let u=0,s=a.length;u<s;u++){const b=a[u];for(let v=0;v<i.length;v++)if(typeof b[i[v]]!="number")throw new Error("VueGridLayout: "+r+"["+u+"]."+i[v]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+r+"["+u+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+r+"["+u+"].i must be a string or number!");if(l.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+r+"["+u+"].i must be unique!");if(l.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+r+"["+u+"].static must be a boolean!")}}function Tp(a,r="vgl"){const i=()=>`${r}-${a}`;return{b:i,be:l=>`${i()}__${l}`,bm:l=>`${i()}--${l}`,bem:(l,u)=>`${i()}__${l}--${u}`}}function Xo(a){return Bp(a)}function Bp(a){var r;const i=((r=a.target)==null?void 0:r.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:i.getBoundingClientRect(),u=a.clientX+i.scrollLeft-l.left,s=a.clientY+i.scrollTop-l.top;return{x:u,y:s}}function Go(a,r,i,l){return Ip(a)?{deltaX:i-a,deltaY:l-r,lastX:a,lastY:r,x:i,y:l}:{deltaX:0,deltaY:0,lastX:i,lastY:l,x:i,y:l}}function Ip(a){return typeof a=="number"&&!Number.isNaN(a)}function Np(a,r){const i=tr(a);let l=i[0];for(let u=1,s=i.length;u<s;u++){const b=i[u];r>a[b]&&(l=b)}return l}function er(a,r){if(!r[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return r[a]}function Ap(a,r,i,l,u,s,b){if(r[l])return vo(r[l]);let v=a;const p=tr(i),x=p.slice(p.indexOf(l));for(let E=0,O=x.length;E<O;E++){const F=x[E];if(r[F]){v=r[F];break}}return v=vo(v||[]),da(wp(v,{cols:s}),b)}function tr(a){return Object.keys(a).sort((r,i)=>a[r]-a[i])}let Vp="auto";function Op(){return typeof document<"u"}function Yo(){return Op()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Vp}var Da={exports:{}},Mp=Da.exports,Jo;function zp(){return Jo||(Jo=1,function(a,r){(function(i,l){a.exports=l()})(Mp,function(){function i(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);t&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),o.push.apply(o,c)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(c){p(n,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(c){Object.defineProperty(n,c,Object.getOwnPropertyDescriptor(o,c))})}return n}function u(n){return u=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},u(n)}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function b(n,t){for(var o=0;o<t.length;o++){var c=t[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(n,pe(c.key),c)}}function v(n,t,o){return t&&b(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function p(n,t,o){return(t=pe(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function x(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&O(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function O(n,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},O(n,t)}function F(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function W(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,c=E(n);if(t){var d=E(this).constructor;o=Reflect.construct(c,arguments,d)}else o=c.apply(this,arguments);return function(f,k){if(k&&(typeof k=="object"||typeof k=="function"))return k;if(k!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(f)}(this,o)}}function N(){return N=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var c=function(f,k){for(;!Object.prototype.hasOwnProperty.call(f,k)&&(f=E(f))!==null;);return f}(n,t);if(c){var d=Object.getOwnPropertyDescriptor(c,t);return d.get?d.get.call(arguments.length<3?n:o):d.value}},N.apply(this,arguments)}function pe(n){var t=function(o,c){if(typeof o!="object"||o===null)return o;var d=o[Symbol.toPrimitive];if(d!==void 0){var f=d.call(o,c);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var $=function(n){return!(!n||!n.Window)&&n instanceof n.Window},M=void 0,L=void 0;function m(n){M=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),L=n}function C(n){return $(n)?n:(n.ownerDocument||n).defaultView||L.window}typeof window<"u"&&window&&m(window);var h=function(n){return!!n&&u(n)==="object"},w=function(n){return typeof n=="function"},g={window:function(n){return n===L||$(n)},docFrag:function(n){return h(n)&&n.nodeType===11},object:h,func:w,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||u(n)!=="object")return!1;var t=C(n)||L;return/object|function/.test(typeof Element>"u"?"undefined":u(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return h(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return h(n)&&n.length!==void 0&&w(n.splice)}};function J(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 Ee(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var c=o.prepared.axis;if(c==="x"||c==="y"){var d=c==="x"?"y":"x";t.page[d]=o.coords.start.page[d],t.client[d]=o.coords.start.client[d],t.delta[d]=0}}}var Qe={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,c=n.defaults;o.prototype.draggable=Qe.draggable,t.map.drag=Qe,t.methodDict.drag="draggable",c.actions.drag=Qe.defaults},listeners:{"interactions:before-action-move":J,"interactions:action-resume":J,"interactions:action-move":Ee,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,c=n.buttons,d=o.options.drag;if(d&&d.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(c&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:d.lockAxis==="start"?d.startAxis:d.lockAxis},!1}},draggable:function(n){return g.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):g.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:J,move:Ee,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},re=Qe,Be={init:function(n){var t=n;Be.document=t.document,Be.DocumentFragment=t.DocumentFragment||Oe,Be.SVGElement=t.SVGElement||Oe,Be.SVGSVGElement=t.SVGSVGElement||Oe,Be.SVGElementInstance=t.SVGElementInstance||Oe,Be.Element=t.Element||Oe,Be.HTMLElement=t.HTMLElement||Be.Element,Be.Event=t.Event,Be.Touch=t.Touch||Oe,Be.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 Oe(){}var R=Be,le={init:function(n){var t=R.Element,o=n.navigator||{};le.supportsTouch="ontouchstart"in n||g.func(n.DocumentTouch)&&R.document instanceof n.DocumentTouch,le.supportsPointerEvent=o.pointerEnabled!==!1&&!!R.PointerEvent,le.isIOS=/iP(hone|od|ad)/.test(o.platform),le.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),le.isIe9=/MSIE 9/.test(o.userAgent),le.isOperaMobile=o.appName==="Opera"&&le.supportsTouch&&/Presto/.test(o.userAgent),le.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",le.pEventTypes=le.supportsPointerEvent?R.PointerEvent===n.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,le.wheelEvent=R.document&&"onmousewheel"in R.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},oe=le;function fe(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function $e(n,t){for(;g.element(n);){if(X(n,t))return n;n=tt(n)}return null}function tt(n){var t=n.parentNode;if(g.docFrag(t)){for(;(t=t.host)&&g.docFrag(t););return t}return t}function X(n,t){return L!==M&&(t=t.replace(/\/deep\//g," ")),n[oe.prefixedMatchesSelector](t)}var z=function(n){return n.parentNode||n.host};function ie(n,t){for(var o,c=[],d=n;(o=z(d))&&d!==t&&o!==d.ownerDocument;)c.unshift(d),d=o;return c}function Z(n,t,o){for(;g.element(n);){if(X(n,t))return!0;if((n=tt(n))===o)return X(n,t)}return!1}function ve(n){return n.correspondingUseElement||n}function we(n){var t=n instanceof R.SVGElement?n.getBoundingClientRect():n.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function Ce(n){var t,o=we(n);if(!oe.isIOS7&&o){var c={x:(t=(t=C(n))||L).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=c.x,o.right+=c.x,o.top+=c.y,o.bottom+=c.y}return o}function te(n){for(var t=[];n;)t.push(n),n=tt(n);return t}function ke(n){return!!g.string(n)&&(R.document.querySelector(n),!0)}function T(n,t){for(var o in t)n[o]=t[o];return n}function Ge(n,t,o){return n==="parent"?tt(o):n==="self"?t.getRect(o):$e(o,n)}function Ye(n,t,o,c){var d=n;return g.string(d)?d=Ge(d,t,o):g.func(d)&&(d=d.apply(void 0,c)),g.element(d)&&(d=Ce(d)),d}function Ae(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ce(n){return!n||"x"in n&&"y"in n||((n=T({},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 ne(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 de(n,t,o){var c=o&&n.options[o];return Ae(Ye(c&&c.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Se(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(V){return!0},c=arguments.length>3?arguments[3]:void 0;if(c=c||{},g.string(n)&&n.search(" ")!==-1&&(n=qe(n)),g.array(n))return n.forEach(function(V){return Se(V,t,o,c)}),c;if(g.object(n)&&(t=n,n=""),g.func(t)&&o(n))c[n]=c[n]||[],c[n].push(t);else if(g.array(t))for(var d=0,f=t;d<f.length;d++){var k=f[d];Se(n,k,o,c)}else if(g.object(t))for(var _ in t)Se(qe(_).map(function(V){return"".concat(n).concat(V)}),t[_],o,c);return c}function qe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},y=["webkit","moz"];function I(n,t){n.__set||(n.__set={});var o=function(d){if(y.some(function(f){return d.indexOf(f)===0}))return 1;typeof n[d]!="function"&&d!=="__set"&&Object.defineProperty(n,d,{get:function(){return d in n.__set?n.__set[d]:n.__set[d]=t[d]},set:function(f){n.__set[d]=f},configurable:!0})};for(var c in t)o(c);return n}function H(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 Q(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function S(n){return n instanceof R.Event||n instanceof R.Touch}function se(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Me(n,t){return t=t||{x:0,y:0},oe.isOperaMobile&&S(n)?(se("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):se("page",n,t),t}function A(n){return g.number(n.pointerId)?n.pointerId:n.identifier}function ae(n,t,o){var c=t.length>1?q(t):t[0];Me(c,n.page),function(d,f){f=f||{},oe.isOperaMobile&&S(d)?se("screen",d,f):se("client",d,f)}(c,n.client),n.timeStamp=o}function U(n){var t=[];return g.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 q(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var c=n[o];for(var d in t)t[d]+=c[d]}for(var f in t)t[f]/=n.length;return t}function Te(n){if(!n.length)return null;var t=U(n),o=Math.min(t[0].pageX,t[1].pageX),c=Math.min(t[0].pageY,t[1].pageY),d=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:c,left:o,top:c,right:d,bottom:f,width:d-o,height:f-c}}function ue(n,t){var o=t+"X",c=t+"Y",d=U(n),f=d[0][o]-d[1][o],k=d[0][c]-d[1][c];return dt(f,k)}function G(n,t){var o=t+"X",c=t+"Y",d=U(n),f=d[1][o]-d[0][o],k=d[1][c]-d[0][c];return 180*Math.atan2(k,f)/Math.PI}function ee(n){return g.string(n.pointerType)?n.pointerType:g.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof R.Touch?"touch":"mouse"}function he(n){var t=g.func(n.composedPath)?n.composedPath():n.path;return[ve(t?t[0]:n.target),ve(n.currentTarget)]}var ye=function(){function n(t){s(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(ye.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var _e=function(n,t){for(var o=0;o<t.length;o++){var c=t[o];n.push(c)}return n},xe=function(n){return _e([],n)},K=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},Re=function(n,t){return n[K(n,t)]},be=function(n){x(o,n);var t=W(o);function o(c,d,f){var k;s(this,o),(k=t.call(this,d._interaction)).dropzone=void 0,k.dragEvent=void 0,k.relatedTarget=void 0,k.draggable=void 0,k.propagationStopped=!1,k.immediatePropagationStopped=!1;var _=f==="dragleave"?c.prev:c.cur,V=_.element,j=_.dropzone;return k.type=f,k.target=V,k.currentTarget=V,k.dropzone=j,k.dragEvent=d,k.relatedTarget=d.target,k.draggable=d.interactable,k.timeStamp=d.timeStamp,k}return v(o,[{key:"reject",value:function(){var c=this,d=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&d.cur.dropzone===this.dropzone&&d.cur.element===this.target)if(d.prev.dropzone=this.dropzone,d.prev.element=this.target,d.rejected=!0,d.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=d.activeDrops,k=K(f,function(V){var j=V.dropzone,P=V.element;return j===c.dropzone&&P===c.target});d.activeDrops.splice(k,1);var _=new o(d,this.dragEvent,"dropdeactivate");_.dropzone=this.dropzone,_.target=this.target,this.dropzone.fire(_)}else this.dropzone.fire(new o(d,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(ye);function Ke(n,t){for(var o=0,c=n.slice();o<c.length;o++){var d=c[o],f=d.dropzone,k=d.element;t.dropzone=f,t.target=k,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function ot(n,t){for(var o=function(f,k){for(var _=[],V=0,j=f.interactables.list;V<j.length;V++){var P=j[V];if(P.options.drop.enabled){var Y=P.options.drop.accept;if(!(g.element(Y)&&Y!==k||g.string(Y)&&!X(k,Y)||g.func(Y)&&!Y({dropzone:P,draggableElement:k})))for(var De=0,Le=P.getAllElements();De<Le.length;De++){var Pe=Le[De];Pe!==k&&_.push({dropzone:P,element:Pe,rect:P.getRect(Pe)})}}}return _}(n,t),c=0;c<o.length;c++){var d=o[c];d.rect=d.dropzone.getRect(d.element)}return o}function je(n,t,o){for(var c=n.dropState,d=n.interactable,f=n.element,k=[],_=0,V=c.activeDrops;_<V.length;_++){var j=V[_],P=j.dropzone,Y=j.element,De=j.rect,Le=P.dropCheck(t,o,d,f,Y,De);k.push(Le?Y:null)}var Pe=function(He){for(var lt,nt,ht,Ct=[],At=0;At<He.length;At++){var kt=He[At],St=He[lt];if(kt&&At!==lt)if(St){var tn=z(kt),jt=z(St);if(tn!==kt.ownerDocument)if(jt!==kt.ownerDocument)if(tn!==jt){Ct=Ct.length?Ct:ie(St);var sn=void 0;if(St instanceof R.HTMLElement&&kt instanceof R.SVGElement&&!(kt instanceof R.SVGSVGElement)){if(kt===jt)continue;sn=kt.ownerSVGElement}else sn=kt;for(var vn=ie(sn,St.ownerDocument),_n=0;vn[_n]&&vn[_n]===Ct[_n];)_n++;var Va=[vn[_n-1],vn[_n],Ct[_n]];if(Va[0])for(var ba=Va[0].lastChild;ba;){if(ba===Va[1]){lt=At,Ct=vn;break}if(ba===Va[2])break;ba=ba.previousSibling}}else ht=St,(parseInt(C(nt=kt).getComputedStyle(nt).zIndex,10)||0)>=(parseInt(C(ht).getComputedStyle(ht).zIndex,10)||0)&&(lt=At);else lt=At}else lt=At}return lt}(k);return c.activeDrops[Pe]||null}function at(n,t,o){var c=n.dropState,d={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(d.activate=new be(c,o,"dropactivate"),d.activate.target=null,d.activate.dropzone=null),o.type==="dragend"&&(d.deactivate=new be(c,o,"dropdeactivate"),d.deactivate.target=null,d.deactivate.dropzone=null),c.rejected||(c.cur.element!==c.prev.element&&(c.prev.dropzone&&(d.leave=new be(c,o,"dragleave"),o.dragLeave=d.leave.target=c.prev.element,o.prevDropzone=d.leave.dropzone=c.prev.dropzone),c.cur.dropzone&&(d.enter=new be(c,o,"dragenter"),o.dragEnter=c.cur.element,o.dropzone=c.cur.dropzone)),o.type==="dragend"&&c.cur.dropzone&&(d.drop=new be(c,o,"drop"),o.dropzone=c.cur.dropzone,o.relatedTarget=c.cur.element),o.type==="dragmove"&&c.cur.dropzone&&(d.move=new be(c,o,"dropmove"),o.dropzone=c.cur.dropzone)),d}function Ne(n,t){var o=n.dropState,c=o.activeDrops,d=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&d.dropzone.fire(t.enter),t.move&&d.dropzone.fire(t.move),t.drop&&d.dropzone.fire(t.drop),t.deactivate&&Ke(c,t.deactivate),o.prev.dropzone=d.dropzone,o.prev.element=d.element}function gt(n,t){var o=n.interaction,c=n.iEvent,d=n.event;if(c.type==="dragmove"||c.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=ot(t,o.element));var k=c,_=je(o,k,d);f.rejected=f.rejected&&!!_&&_.dropzone===f.cur.dropzone&&_.element===f.cur.element,f.cur.dropzone=_&&_.dropzone,f.cur.element=_&&_.element,f.events=at(o,0,k)}}var et={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,c=n.Interactable,d=n.defaults;n.usePlugin(re),c.prototype.dropzone=function(f){return function(k,_){if(g.object(_)){if(k.options.drop.enabled=_.enabled!==!1,_.listeners){var V=Se(_.listeners),j=Object.keys(V).reduce(function(Y,De){return Y[/^(enter|leave)/.test(De)?"drag".concat(De):/^(activate|deactivate|move)/.test(De)?"drop".concat(De):De]=V[De],Y},{}),P=k.options.drop.listeners;P&&k.off(P),k.on(j),k.options.drop.listeners=j}return g.func(_.ondrop)&&k.on("drop",_.ondrop),g.func(_.ondropactivate)&&k.on("dropactivate",_.ondropactivate),g.func(_.ondropdeactivate)&&k.on("dropdeactivate",_.ondropdeactivate),g.func(_.ondragenter)&&k.on("dragenter",_.ondragenter),g.func(_.ondragleave)&&k.on("dragleave",_.ondragleave),g.func(_.ondropmove)&&k.on("dropmove",_.ondropmove),/^(pointer|center)$/.test(_.overlap)?k.options.drop.overlap=_.overlap:g.number(_.overlap)&&(k.options.drop.overlap=Math.max(Math.min(1,_.overlap),0)),"accept"in _&&(k.options.drop.accept=_.accept),"checker"in _&&(k.options.drop.checker=_.checker),k}return g.bool(_)?(k.options.drop.enabled=_,k):k.options.drop}(this,f)},c.prototype.dropCheck=function(f,k,_,V,j,P){return function(Y,De,Le,Pe,He,lt,nt){var ht=!1;if(!(nt=nt||Y.getRect(lt)))return!!Y.options.drop.checker&&Y.options.drop.checker(De,Le,ht,Y,lt,Pe,He);var Ct=Y.options.drop.overlap;if(Ct==="pointer"){var At=de(Pe,He,"drag"),kt=Me(De);kt.x+=At.x,kt.y+=At.y;var St=kt.x>nt.left&&kt.x<nt.right,tn=kt.y>nt.top&&kt.y<nt.bottom;ht=St&&tn}var jt=Pe.getRect(He);if(jt&&Ct==="center"){var sn=jt.left+jt.width/2,vn=jt.top+jt.height/2;ht=sn>=nt.left&&sn<=nt.right&&vn>=nt.top&&vn<=nt.bottom}return jt&&g.number(Ct)&&(ht=Math.max(0,Math.min(nt.right,jt.right)-Math.max(nt.left,jt.left))*Math.max(0,Math.min(nt.bottom,jt.bottom)-Math.max(nt.top,jt.top))/(jt.width*jt.height)>=Ct),Y.options.drop.checker&&(ht=Y.options.drop.checker(De,Le,ht,Y,lt,Pe,He)),ht}(this,f,k,_,V,j,P)},o.dynamicDrop=function(f){return g.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},T(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,d.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,c=(n.event,n.iEvent);if(o.prepared.name==="drag"){var d=o.dropState;d.activeDrops=[],d.events={},d.activeDrops=ot(t,o.element),d.events=at(o,0,c),d.events.activate&&(Ke(d.activeDrops,d.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:c}))}},"interactions:action-move":gt,"interactions:after-action-move":function(n,t){var o=n.interaction,c=n.iEvent;if(o.prepared.name==="drag"){var d=o.dropState;Ne(o,d.events),t.fire("actions/drop:move",{interaction:o,dragEvent:c}),d.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,c=n.iEvent;gt(n,t),Ne(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:c})}},"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:ot,getDrop:je,getDropEvents:at,fireDropEvents:Ne,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ze=et;function it(n){var t=n.interaction,o=n.iEvent,c=n.phase;if(t.prepared.name==="gesture"){var d=t.pointers.map(function(j){return j.pointer}),f=c==="start",k=c==="end",_=t.interactable.options.deltaSource;if(o.touches=[d[0],d[1]],f)o.distance=ue(d,_),o.box=Te(d),o.scale=1,o.ds=0,o.angle=G(d,_),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(k||t.pointers.length<2){var V=t.prevEvent;o.distance=V.distance,o.box=V.box,o.scale=V.scale,o.ds=0,o.angle=V.angle,o.da=0}else o.distance=ue(d,_),o.box=Te(d),o.scale=o.distance/t.gesture.startDistance,o.angle=G(d,_),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,g.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var mt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,c=n.defaults;o.prototype.gesturable=function(d){return g.object(d)?(this.options.gesture.enabled=d.enabled!==!1,this.setPerAction("gesture",d),this.setOnEvents("gesture",d),this):g.bool(d)?(this.options.gesture.enabled=d,this):this.options.gesture},t.map.gesture=mt,t.methodDict.gesture="gesturable",c.actions.gesture=mt.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=mt;function Ue(n,t,o,c,d,f,k){if(!t)return!1;if(t===!0){var _=g.number(f.width)?f.width:f.right-f.left,V=g.number(f.height)?f.height:f.bottom-f.top;if(k=Math.min(k,Math.abs((n==="left"||n==="right"?_:V)/2)),_<0&&(n==="left"?n="right":n==="right"&&(n="left")),V<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var j=_>=0?f.left:f.right;return o.x<j+k}if(n==="top"){var P=V>=0?f.top:f.bottom;return o.y<P+k}if(n==="right")return o.x>(_>=0?f.right:f.left)-k;if(n==="bottom")return o.y>(V>=0?f.bottom:f.top)-k}return!!g.element(c)&&(g.element(t)?t===c:Z(c,t,d))}function Nt(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var c=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?c.delta.x=c.delta.y:c.delta.y=c.delta.x,c.axes="xy"):(c.axes=o.resizeAxes,o.resizeAxes==="x"?c.delta.y=0:o.resizeAxes==="y"&&(c.delta.x=0))}}var Ie,Xe,Fe={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,c=n.Interactable,d=n.defaults;Fe.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Fe.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,c.prototype.resizable=function(f){return function(k,_,V){return g.object(_)?(k.options.resize.enabled=_.enabled!==!1,k.setPerAction("resize",_),k.setOnEvents("resize",_),g.string(_.axis)&&/^x$|^y$|^xy$/.test(_.axis)?k.options.resize.axis=_.axis:_.axis===null&&(k.options.resize.axis=V.defaults.actions.resize.axis),g.bool(_.preserveAspectRatio)?k.options.resize.preserveAspectRatio=_.preserveAspectRatio:g.bool(_.square)&&(k.options.resize.square=_.square),k):g.bool(_)?(k.options.resize.enabled=_,k):k.options.resize}(this,f,n)},t.map.resize=Fe,t.methodDict.resize="resizable",d.actions.resize=Fe.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,c=t.interaction;if(c.prepared.name==="resize"&&c.prepared.edges){var d=o,f=c.rect;c._rects={start:T({},f),corrected:T({},f),previous:T({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},d.edges=c.prepared.edges,d.rect=c._rects.corrected,d.deltaRect=c._rects.delta}})(n),Nt(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,c=t.interaction;if(c.prepared.name==="resize"&&c.prepared.edges){var d=o,f=c.interactable.options.resize.invert,k=f==="reposition"||f==="negate",_=c.rect,V=c._rects,j=V.start,P=V.corrected,Y=V.delta,De=V.previous;if(T(De,P),k){if(T(P,_),f==="reposition"){if(P.top>P.bottom){var Le=P.top;P.top=P.bottom,P.bottom=Le}if(P.left>P.right){var Pe=P.left;P.left=P.right,P.right=Pe}}}else P.top=Math.min(_.top,j.bottom),P.bottom=Math.max(_.bottom,j.top),P.left=Math.min(_.left,j.right),P.right=Math.max(_.right,j.left);for(var He in P.width=P.right-P.left,P.height=P.bottom-P.top,P)Y[He]=P[He]-De[He];d.edges=c.prepared.edges,d.rect=P,d.deltaRect=Y}})(n),Nt(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var c=t;c.edges=o.prepared.edges,c.rect=o._rects.corrected,c.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,c=n.element,d=n.rect,f=n.buttons;if(d){var k=T({},t.coords.cur.page),_=o.options.resize;if(_&&_.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&_.mouseButtons)!=0)){if(g.object(_.edges)){var V={left:!1,right:!1,top:!1,bottom:!1};for(var j in V)V[j]=Ue(j,_.edges[j],k,t._latestPointer.eventTarget,c,d,_.margin||Fe.defaultMargin);V.left=V.left&&!V.right,V.top=V.top&&!V.bottom,(V.left||V.right||V.top||V.bottom)&&(n.action={name:"resize",edges:V})}else{var P=_.axis!=="y"&&k.x>d.right-Fe.defaultMargin,Y=_.axis!=="x"&&k.y>d.bottom-Fe.defaultMargin;(P||Y)&&(n.action={name:"resize",axes:(P?"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,c=n.name,d=Fe.cursors,f=null;if(o)f=d[c+o];else if(t){for(var k="",_=0,V=["top","bottom","left","right"];_<V.length;_++){var j=V[_];t[j]&&(k+=j)}f=d[k]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Ze=Fe,B={id:"actions",install:function(n){n.usePlugin(Je),n.usePlugin(Ze),n.usePlugin(re),n.usePlugin(ze)}},ge=0,We={request:function(n){return Ie(n)},cancel:function(n){return Xe(n)},init:function(n){if(Ie=n.requestAnimationFrame,Xe=n.cancelAnimationFrame,!Ie)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var c=t[o];Ie=n["".concat(c,"RequestAnimationFrame")],Xe=n["".concat(c,"CancelAnimationFrame")]||n["".concat(c,"CancelRequestAnimationFrame")]}Ie=Ie&&Ie.bind(n),Xe=Xe&&Xe.bind(n),Ie||(Ie=function(d){var f=Date.now(),k=Math.max(0,16-(f-ge)),_=n.setTimeout(function(){d(f+k)},k);return ge=f+k,_},Xe=function(d){return clearTimeout(d)})}},me={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){me.isScrolling=!0,We.cancel(me.i),n.autoScroll=me,me.interaction=n,me.prevTime=me.now(),me.i=We.request(me.scroll)},stop:function(){me.isScrolling=!1,me.interaction&&(me.interaction.autoScroll=null),We.cancel(me.i)},scroll:function(){var n=me.interaction,t=n.interactable,o=n.element,c=n.prepared.name,d=t.options[c].autoScroll,f=ut(d.container,t,o),k=me.now(),_=(k-me.prevTime)/1e3,V=d.speed*_;if(V>=1){var j={x:me.x*V,y:me.y*V};if(j.x||j.y){var P=st(f);g.window(f)?f.scrollBy(j.x,j.y):f&&(f.scrollLeft+=j.x,f.scrollTop+=j.y);var Y=st(f),De={x:Y.x-P.x,y:Y.y-P.y};(De.x||De.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:De,interaction:n,container:f})}me.prevTime=k}me.isScrolling&&(We.cancel(me.i),me.i=We.request(me.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()&&me.check(t.interactable,t.prepared.name))if(t.simulation)me.x=me.y=0;else{var c,d,f,k,_=t.interactable,V=t.element,j=t.prepared.name,P=_.options[j].autoScroll,Y=ut(P.container,_,V);if(g.window(Y))k=o.clientX<me.margin,c=o.clientY<me.margin,d=o.clientX>Y.innerWidth-me.margin,f=o.clientY>Y.innerHeight-me.margin;else{var De=we(Y);k=o.clientX<De.left+me.margin,c=o.clientY<De.top+me.margin,d=o.clientX>De.right-me.margin,f=o.clientY>De.bottom-me.margin}me.x=d?1:k?-1:0,me.y=f?1:c?-1:0,me.isScrolling||(me.margin=P.margin,me.speed=P.speed,me.start(t))}}};function ut(n,t,o){return(g.string(n)?Ge(n,t,o):n)||C(o)}function st(n){return g.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=me,me.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=me.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,me.stop(),me.interaction&&(me.interaction=null)},"interactions:stop":me.stop,"interactions:action-move":function(n){return me.onInteractionMove(n)}}},pt=xt;function ct(n,t){var o=!1;return function(){return o||(L.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 g.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Tt(n){return g.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ut={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,c,d,f){var k=function(_,V,j,P,Y){var De=_.getRect(P),Le=V.buttons||{0:1,1:4,3:8,4:16}[V.button],Pe={action:null,interactable:_,interaction:j,element:P,rect:De,buttons:Le};return Y.fire("auto-start:check",Pe),Pe.action}(this,c,d,f,n);return this.options.actionChecker?this.options.actionChecker(o,c,k,this,f,d):k},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,c,d){return t.testIgnoreAllow(t.options[n.name],o,c)&&t.options[n.name].enabled&&qt(t,o,n,d)?n:null}function zt(n,t,o,c,d,f,k){for(var _=0,V=c.length;_<V;_++){var j=c[_],P=d[_],Y=j.getAction(t,o,n,P);if(Y){var De=vt(Y,j,P,f,k);if(De)return{action:De,interactable:j,element:P}}}return{action:null,interactable:null,element:null}}function $t(n,t,o,c,d){var f=[],k=[],_=c;function V(P){f.push(P),k.push(_)}for(;g.element(_);){f=[],k=[],d.interactables.forEachMatch(_,V);var j=zt(n,t,o,f,k,c,d);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;_=tt(_)}return{action:null,interactable:null,element:null}}function Kt(n,t,o){var c=t.action,d=t.interactable,f=t.element;c=c||{name:null},n.interactable=d,n.element=f,ft(n.prepared,c),n.rect=d&&c.name?d.getRect(f):null,Tn(n,o),o.fire("autoStart:prepared",{interaction:n})}function qt(n,t,o,c){var d=n.options,f=d[o.name].max,k=d[o.name].maxPerElement,_=c.autoStart.maxInteractions,V=0,j=0,P=0;if(!(f&&k&&_))return!1;for(var Y=0,De=c.interactions.list;Y<De.length;Y++){var Le=De[Y],Pe=Le.prepared.name;if(Le.interacting()&&(++V>=_||Le.interactable===n&&((j+=Pe===o.name?1:0)>=f||Le.element===t&&(P++,Pe===o.name&&P>=k))))return!1}return _>0}function Qt(n,t){return g.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function Lt(n,t,o){var c=o.autoStart.cursorElement;c&&c!==n&&(c.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function Tn(n,t){var o=n.interactable,c=n.element,d=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(d.name){var k=o.options[d.name].cursorChecker;f=g.func(k)?k(d,o,c,n._interacting):t.actions.map[d.name].getCursor(d)}Lt(n.element,f||"",t)}else t.autoStart.cursorElement&&Lt(t.autoStart.cursorElement,"",t)}var Fn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Ut),o.base.actionChecker=null,o.base.styleCursor=!0,T(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(c){return Qt(c,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:qt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,c=n.pointer,d=n.event,f=n.eventTarget;o.interacting()||Kt(o,$t(o,c,d,f,t),t)},"interactions:move":function(n,t){(function(o,c){var d=o.interaction,f=o.pointer,k=o.event,_=o.eventTarget;d.pointerType!=="mouse"||d.pointerIsDown||d.interacting()||Kt(d,$t(d,f,k,_,c),c)})(n,t),function(o,c){var d=o.interaction;if(d.pointerIsDown&&!d.interacting()&&d.pointerWasMoved&&d.prepared.name){c.fire("autoStart:before-start",o);var f=d.interactable,k=d.prepared.name;k&&f&&(f.options[k].manualStart||!qt(f,d.element,d.prepared,c)?d.stop():(d.start(d.prepared,f,d.element),Tn(d,c)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,c=o.interactable;c&&c.options.styleCursor&&Lt(o.element,"",t)}},maxInteractions:Qt,withinInteractionLimit:qt,validateAction:vt},kn=Fn,Ln={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,c=n.eventTarget,d=n.dx,f=n.dy;if(o.prepared.name==="drag"){var k=Math.abs(d),_=Math.abs(f),V=o.interactable.options.drag,j=V.startAxis,P=k>_?"x":k<_?"y":"xy";if(o.prepared.axis=V.lockAxis==="start"?P[0]:V.lockAxis,P!=="xy"&&j!=="xy"&&j!==P){o.prepared.name=null;for(var Y=c,De=function(Pe){if(Pe!==o.interactable){var He=o.interactable.options.drag;if(!He.manualStart&&Pe.testIgnoreAllow(He,Y,c)){var lt=Pe.getAction(o.downPointer,o.downEvent,o,Y);if(lt&<.name==="drag"&&function(nt,ht){if(!ht)return!1;var Ct=ht.options.drag.startAxis;return nt==="xy"||Ct==="xy"||Ct===nt}(P,Pe)&&kn.validateAction(lt,Pe,Y,c,t))return Pe}}};g.element(Y);){var Le=t.interactables.forEachMatch(Y,De);if(Le){o.prepared.name="drag",o.interactable=Le,o.element=Y;break}Y=tt(Y)}}}}}};function xn(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 $n={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(kn),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=xn(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;xn(t)>0&&(t.prepared.name=null)}},getHoldDuration:xn},jn=$n,Un={id:"auto-start",install:function(n){n.usePlugin(kn),n.usePlugin(jn),n.usePlugin(Ln)}},Kn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):g.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Wn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Bn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Kn,t.prototype.checkAndPreventDefault=function(o){return function(c,d,f){var k=c.options.preventDefault;if(k!=="never")if(k!=="always"){if(d.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var _=C(f.target).document,V=d.getDocOptions(_);if(!V||!V.events||V.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||g.element(f.target)&&X(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var c=0,d=n.interactions.list;c<d.length;c++){var f=d[c];if(f.element&&(f.element===o.target||fe(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Wn,n},{})};function mn(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function dn(n){var t={};for(var o in n){var c=n[o];g.plainObject(c)?t[o]=dn(c):g.array(c)?t[o]=xe(c):t[o]=c}return t}var wn=function(){function n(t){s(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=yn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var c,d,f=t.phase,k=this.interaction,_=function(j){var P=j.interactable.options[j.prepared.name],Y=P.modifiers;return Y&&Y.length?Y:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(De){var Le=P[De];return Le&&Le.enabled&&{options:Le,methods:Le._methods}}).filter(function(De){return!!De})}(k);this.prepareStates(_),this.startEdges=T({},k.edges),this.edges=T({},this.startEdges),this.startOffset=(c=k.rect,d=o,c?{left:d.x-c.left,top:d.y-c.top,right:c.right-d.x,bottom:c.bottom-d.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var V=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=yn(),this.startAll(V),this.result=this.setAll(V)}},{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,c=this.states;o<c.length;o++){var d=c[o];d.methods.start&&(t.state=d,d.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,c=t.preEnd,d=t.skipModifiers,f=t.rect,k=t.edges;t.coords=T({},t.pageCoords),t.rect=T({},f),t.edges=T({},k);for(var _=d?this.states.slice(d):this.states,V=yn(t.coords,t.rect),j=0;j<_.length;j++){var P,Y=_[j],De=Y.options,Le=T({},t.coords),Pe=null;(P=Y.methods)!=null&&P.set&&this.shouldDo(De,c,o)&&(t.state=Y,Pe=Y.methods.set(t),ne(t.edges,t.rect,{x:t.coords.x-Le.x,y:t.coords.y-Le.y})),V.eventProps.push(Pe)}T(this.edges,t.edges),V.delta.x=t.coords.x-t.pageCoords.x,V.delta.y=t.coords.y-t.pageCoords.y,V.rectDelta.left=t.rect.left-f.left,V.rectDelta.right=t.rect.right-f.right,V.rectDelta.top=t.rect.top-f.top,V.rectDelta.bottom=t.rect.bottom-f.bottom;var He=this.result.coords,lt=this.result.rect;if(He&<){var nt=V.rect.left!==lt.left||V.rect.right!==lt.right||V.rect.top!==lt.top||V.rect.bottom!==lt.bottom;V.changed=nt||He.x!==V.coords.x||He.y!==V.coords.y}return V}},{key:"applyToInteraction",value:function(t){var o=this.interaction,c=t.phase,d=o.coords.cur,f=o.coords.start,k=this.result,_=this.startDelta,V=k.delta;c==="start"&&T(this.startDelta,k.delta);for(var j=0,P=[[f,_],[d,V]];j<P.length;j++){var Y=P[j],De=Y[0],Le=Y[1];De.page.x+=Le.x,De.page.y+=Le.y,De.client.x+=Le.x,De.client.y+=Le.y}var Pe=this.result.rectDelta,He=t.rect||o.rect;He.left+=Pe.left,He.right+=Pe.right,He.top+=Pe.top,He.bottom+=Pe.bottom,He.width=He.right-He.left,He.height=He.bottom-He.top}},{key:"setAndApply",value:function(t){var o=this.interaction,c=t.phase,d=t.preEnd,f=t.skipModifiers,k=this.setAll(this.fillArg({preEnd:d,phase:c,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=k,!k.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var _=o.coords.cur.page,V={x:t.modifiedCoords.x-_.x,y:t.modifiedCoords.y-_.y};k.coords.x+=V.x,k.coords.y+=V.y,k.delta.x+=V.x,k.delta.y+=V.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,c=t.event,d=this.states;if(d&&d.length){for(var f=!1,k=0;k<d.length;k++){var _=d[k];t.state=_;var V=_.options,j=_.methods,P=j.beforeEnd&&j.beforeEnd(t);if(P)return this.endResult=P,!1;f=f||!f&&this.shouldDo(V,!0,t.phase,!0)}f&&o.move({event:c,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var c=T({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(c);for(var d=0,f=this.states;d<f.length;d++){var k=f[d];c.state=k,k.methods.stop&&k.methods.stop(c)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var c=t[o],d=c.options,f=c.methods,k=c.name;this.states.push({options:d,methods:f,index:o,name:k})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,c=o.coords,d=o.rect,f=o.modification;if(f.result){for(var k=f.startDelta,_=f.result,V=_.delta,j=_.rectDelta,P=0,Y=[[c.start,k],[c.cur,V]];P<Y.length;P++){var De=Y[P],Le=De[0],Pe=De[1];Le.page.x-=Pe.x,Le.page.y-=Pe.y,Le.client.x-=Pe.x,Le.client.y-=Pe.y}d.left-=j.left,d.right-=j.right,d.top-=j.top,d.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,c,d){return!(!t||t.enabled===!1||d&&!t.endOnly||t.endOnly&&!o||c==="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 dn(o)}),this.result=yn(T({},t.result.coords),T({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function yn(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 on(n,t){var o=n.defaults,c={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},d=function(f){var k=f||{};for(var _ in k.enabled=k.enabled!==!1,o)_ in k||(k[_]=o[_]);var V={options:k,methods:c,name:t,enable:function(){return k.enabled=!0,V},disable:function(){return k.enabled=!1,V}};return V};return t&&typeof t=="string"&&(d._defaults=o,d._methods=c),d}function hn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Hn={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new wn(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,c=o.setAndApply(n);return t.edges=o.edges,c},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,c=o.beforeEnd(n);return t.edges=o.startEdges,c},"interactions:action-start":hn,"interactions:action-move":hn,"interactions:action-end":hn,"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)}}},In=Hn,Nn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Dn=function(n){x(o,n);var t=W(o);function o(c,d,f,k,_,V,j){var P;s(this,o),(P=t.call(this,c)).relatedTarget=null,P.screenX=void 0,P.screenY=void 0,P.button=void 0,P.buttons=void 0,P.ctrlKey=void 0,P.shiftKey=void 0,P.altKey=void 0,P.metaKey=void 0,P.page=void 0,P.client=void 0,P.delta=void 0,P.rect=void 0,P.x0=void 0,P.y0=void 0,P.t0=void 0,P.dt=void 0,P.duration=void 0,P.clientX0=void 0,P.clientY0=void 0,P.velocity=void 0,P.speed=void 0,P.swipe=void 0,P.axes=void 0,P.preEnd=void 0,_=_||c.element;var Y=c.interactable,De=(Y&&Y.options||Nn).deltaSource,Le=de(Y,_,f),Pe=k==="start",He=k==="end",lt=Pe?F(P):c.prevEvent,nt=Pe?c.coords.start:He?{page:lt.page,client:lt.client,timeStamp:c.coords.cur.timeStamp}:c.coords.cur;return P.page=T({},nt.page),P.client=T({},nt.client),P.rect=T({},c.rect),P.timeStamp=nt.timeStamp,He||(P.page.x-=Le.x,P.page.y-=Le.y,P.client.x-=Le.x,P.client.y-=Le.y),P.ctrlKey=d.ctrlKey,P.altKey=d.altKey,P.shiftKey=d.shiftKey,P.metaKey=d.metaKey,P.button=d.button,P.buttons=d.buttons,P.target=_,P.currentTarget=_,P.preEnd=V,P.type=j||f+(k||""),P.interactable=Y,P.t0=Pe?c.pointers[c.pointers.length-1].downTime:lt.t0,P.x0=c.coords.start.page.x-Le.x,P.y0=c.coords.start.page.y-Le.y,P.clientX0=c.coords.start.client.x-Le.x,P.clientY0=c.coords.start.client.y-Le.y,P.delta=Pe||He?{x:0,y:0}:{x:P[De].x-lt[De].x,y:P[De].y-lt[De].y},P.dt=c.coords.delta.timeStamp,P.duration=P.timeStamp-P.t0,P.velocity=T({},c.coords.velocity[De]),P.speed=dt(P.velocity.x,P.velocity.y),P.swipe=He||k==="inertiastart"?P.getSwipe():null,P}return v(o,[{key:"getSwipe",value:function(){var c=this._interaction;if(c.prevEvent.speed<600||this.timeStamp-c.prevEvent.timeStamp>150)return null;var d=180*Math.atan2(c.prevEvent.velocityY,c.prevEvent.velocityX)/Math.PI;d<0&&(d+=360);var f=112.5<=d&&d<247.5,k=202.5<=d&&d<337.5;return{up:k,down:!k&&22.5<=d&&d<157.5,left:f,right:!f&&(292.5<=d||d<67.5),angle:d,speed:c.prevEvent.speed,velocity:{x:c.prevEvent.velocityX,y:c.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(ye);Object.defineProperties(Dn.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 qn=v(function n(t,o,c,d,f){s(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=c,this.downTime=d,this.downTarget=f}),Xn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),An=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Gn=0,Yn=function(){function n(t){var o=this,c=t.pointerType,d=t.scopeFire;s(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(P){this.move(P)},"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=Gn++,this._scopeFire=d,this.pointerType=c;var f=this;this._proxy={};var k=function(P){Object.defineProperty(o._proxy,P,{get:function(){return f[P]}})};for(var _ in Xn)k(_);var V=function(P){Object.defineProperty(o._proxy,P,{value:function(){return f[P].apply(f,arguments)}})};for(var j in An)V(j);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,c){var d=this.updatePointer(t,o,c,!0),f=this.pointers[d];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:c,pointerIndex:d,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,c){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=c,this.rect=o.getRect(c),this.edges=this.prepared.edges?T({},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,c){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,c,!1);var d,f,k=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(d=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(d,f)>this.pointerMoveTolerance);var _,V,j,P=this.getPointerIndex(t),Y={pointer:t,pointerIndex:P,pointerInfo:this.pointers[P],event:o,type:"move",eventTarget:c,dx:d,dy:f,duplicate:k,interaction:this};k||(_=this.coords.velocity,V=this.coords.delta,j=Math.max(V.timeStamp/1e3,.001),_.page.x=V.page.x/j,_.page.y=V.page.y/j,_.client.x=V.client.x/j,_.client.y=V.client.y/j,_.timeStamp=j),this._scopeFire("interactions:move",Y),k||this.simulation||(this.interacting()&&(Y.type=null,this.move(Y)),this.pointerWasMoved&&H(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Q(this.coords.delta),(t=T({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,c,d){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,c,!1));var k=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(k),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:c,type:k,curEventTarget:d,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=A(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:K(this.pointers,function(c){return c.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,c,d){var f,k,_,V=A(t),j=this.getPointerIndex(t),P=this.pointers[j];return d=d!==!1&&(d||/(down|start)$/i.test(o.type)),P?P.pointer=t:(P=new qn(V,t,o,null,null),j=this.pointers.length,this.pointers.push(P)),ae(this.coords.cur,this.pointers.map(function(Y){return Y.pointer}),this._now()),f=this.coords.delta,k=this.coords.prev,_=this.coords.cur,f.page.x=_.page.x-k.page.x,f.page.y=_.page.y-k.page.y,f.client.x=_.client.x-k.client.x,f.client.y=_.client.y-k.client.y,f.timeStamp=_.timeStamp-k.timeStamp,d&&(this.pointerIsDown=!0,P.downTime=this.coords.cur.timeStamp,P.downTarget=c,I(this.downPointer,t),this.interacting()||(H(this.coords.start,this.coords.cur),H(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,c),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:c,down:d,pointerInfo:P,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var c=this.getPointerIndex(t);if(c!==-1){var d=this.pointers[c];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:c,pointerInfo:d,interaction:this}),this.pointers.splice(c,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,c){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=c}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,c,d){return new Dn(this,t,this.prepared.name,o,this.element,c,d)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,c=t.phase,d=t.preEnd,f=t.type,k=this.rect;if(k&&c==="move"&&(ne(this.edges,k,this.coords.delta[this.interactable.options.deltaSource]),k.width=k.right-k.left,k.height=k.bottom-k.top),this._scopeFire("interactions:before-action-".concat(c),t)===!1)return!1;var _=t.iEvent=this._createPreparedEvent(o,c,d,f);return this._scopeFire("interactions:action-".concat(c),t),c==="start"&&(this.prevEvent=_),this._fireEvent(_),this._scopeFire("interactions:after-action-".concat(c),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Et(n){Zt(n.interaction)}function Zt(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Mt(n.coords.cur,t),Mt(n.coords.delta,t),ne(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 Mt(n,t){var o=n.page,c=n.client,d=t.x,f=t.y;o.x+=d,o.y+=f,c.x+=d,c.y+=f}An.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&&(Mt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Et,"interactions:before-action-move":Et,"interactions:before-action-end":function(n){var t=n.interaction;if(Zt(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}}},Wt=bt,_t=function(){function n(t){s(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,c=Dt(o);if(!c||!c.enabled)return!1;var d=o.coords.velocity.client,f=dt(d.x,d.y),k=this.modification||(this.modification=new wn(o));if(k.copyFrom(o.modification),this.t0=o._now(),this.allowResume=c.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=k.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>c.minSpeed&&f>c.endSpeed)this.startInertia();else{if(k.result=k.setAll(this.modifierArg),!k.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,c=Dt(this.interaction),d=c.resistance,f=-Math.log(c.endSpeed/this.v0)/d;this.targetOffset={x:(o.x-f)/d,y:(o.y-f)/d},this.te=f,this.lambda_v0=d/this.v0,this.one_ve_v0=1-c.endSpeed/this.v0;var k=this.modification,_=this.modifierArg;_.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},k.result=k.setAll(_),k.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+k.result.delta.x,y:this.targetOffset.y+k.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=We.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,c,d,f,k,_,V=this,j=this.interaction,P=Dt(j).resistance,Y=(j._now()-this.t0)/1e3;if(Y<this.te){var De,Le=1-(Math.exp(-P*Y)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,c=this.targetOffset.x,d=this.targetOffset.y,f=this.modifiedOffset.x,k=this.modifiedOffset.y,De={x:Ot(_=Le,t,c,f),y:Ot(_,o,d,k)}):De={x:this.targetOffset.x*Le,y:this.targetOffset.y*Le};var Pe={x:De.x-this.currentOffset.x,y:De.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,j.offsetBy(Pe),j.move(),this.onNextFrame(function(){return V.inertiaTick()})}else j.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,c=o._now()-this.t0,d=Dt(o).smoothEndDuration;if(c<d){var f={x:Pt(c,0,this.targetOffset.x,d),y:Pt(c,0,this.targetOffset.y,d)},k={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=k.x,this.currentOffset.y+=k.y,o.offsetBy(k),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,c=t.event,d=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,c,d,!0),f._doPhase({interaction:f,event:c,phase:"resume"}),H(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,We.cancel(this.timeout)}}]),n}();function Dt(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Rt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(Wt),n.usePlugin(In),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 _t(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,c=t.inertia;if(c.active)for(var d=o;g.element(d);){if(d===t.element){c.resume(n);break}d=tt(d)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":hn,"interactions:action-inertiastart":hn,"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 Ot(n,t,o,c){var d=1-n;return d*d*t+2*d*n*o+n*n*c}function Pt(n,t,o,c){return-o*(n/=c)*(n-2)+t}var Xt=Rt;function ln(n,t){for(var o=0;o<t.length;o++){var c=t[o];if(n.immediatePropagationStopped)break;c(n)}}var Vn=function(){function n(t){s(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=T({},t||{})}return v(n,[{key:"fire",value:function(t){var o,c=this.global;(o=this.types[t.type])&&ln(t,o),!t.propagationStopped&&c&&(o=c[t.type])&&ln(t,o)}},{key:"on",value:function(t,o){var c=Se(t,o);for(t in c)this.types[t]=_e(this.types[t]||[],c[t])}},{key:"off",value:function(t,o){var c=Se(t,o);for(t in c){var d=this.types[t];if(d&&d.length)for(var f=0,k=c[t];f<k.length;f++){var _=k[f],V=d.indexOf(_);V!==-1&&d.splice(V,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Jn=function(){function n(t){s(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,I(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 On(n){return g.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Zn(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Ta={id:"events",install:function(n){var t,o=[],c={},d=[],f={add:k,remove:_,addDelegate:function(P,Y,De,Le,Pe){var He=On(Pe);if(!c[De]){c[De]=[];for(var lt=0;lt<d.length;lt++){var nt=d[lt];k(nt,De,V),k(nt,De,j,!0)}}var ht=c[De],Ct=Re(ht,function(At){return At.selector===P&&At.context===Y});Ct||(Ct={selector:P,context:Y,listeners:[]},ht.push(Ct)),Ct.listeners.push({func:Le,options:He})},removeDelegate:function(P,Y,De,Le,Pe){var He,lt=On(Pe),nt=c[De],ht=!1;if(nt)for(He=nt.length-1;He>=0;He--){var Ct=nt[He];if(Ct.selector===P&&Ct.context===Y){for(var At=Ct.listeners,kt=At.length-1;kt>=0;kt--){var St=At[kt];if(St.func===Le&&Zn(St.options,lt)){At.splice(kt,1),At.length||(nt.splice(He,1),_(Y,De,V),_(Y,De,j,!0)),ht=!0;break}}if(ht)break}}},delegateListener:V,delegateUseCapture:j,delegatedEvents:c,documents:d,targets:o,supportsOptions:!1,supportsPassive:!1};function k(P,Y,De,Le){if(P.addEventListener){var Pe=On(Le),He=Re(o,function(lt){return lt.eventTarget===P});He||(He={eventTarget:P,events:{}},o.push(He)),He.events[Y]||(He.events[Y]=[]),Re(He.events[Y],function(lt){return lt.func===De&&Zn(lt.options,Pe)})||(P.addEventListener(Y,De,f.supportsOptions?Pe:Pe.capture),He.events[Y].push({func:De,options:Pe}))}}function _(P,Y,De,Le){if(P.addEventListener&&P.removeEventListener){var Pe=K(o,function(tn){return tn.eventTarget===P}),He=o[Pe];if(He&&He.events)if(Y!=="all"){var lt=!1,nt=He.events[Y];if(nt){if(De==="all"){for(var ht=nt.length-1;ht>=0;ht--){var Ct=nt[ht];_(P,Y,Ct.func,Ct.options)}return}for(var At=On(Le),kt=0;kt<nt.length;kt++){var St=nt[kt];if(St.func===De&&Zn(St.options,At)){P.removeEventListener(Y,De,f.supportsOptions?At:At.capture),nt.splice(kt,1),nt.length===0&&(delete He.events[Y],lt=!0);break}}}lt&&!Object.keys(He.events).length&&o.splice(Pe,1)}else for(Y in He.events)He.events.hasOwnProperty(Y)&&_(P,Y,"all")}}function V(P,Y){for(var De=On(Y),Le=new Jn(P),Pe=c[P.type],He=he(P)[0],lt=He;g.element(lt);){for(var nt=0;nt<Pe.length;nt++){var ht=Pe[nt],Ct=ht.selector,At=ht.context;if(X(lt,Ct)&&fe(At,He)&&fe(At,lt)){var kt=ht.listeners;Le.currentTarget=lt;for(var St=0;St<kt.length;St++){var tn=kt[St];Zn(tn.options,De)&&tn.func(Le)}}}lt=tt(lt)}}function j(P){return V(P,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},ia={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=ia.methodOrder;t<o.length;t++){var c=o[t],d=ia[c](n);if(d)return d}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,c=n.eventTarget,d=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,k=d.interactions.list;f<k.length;f++){var _=k[f],V=c;if(_.simulation&&_.simulation.allowResume&&_.pointerType===t)for(;V;){if(V===_.element)return _;V=tt(V)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,c=n.pointerType,d=n.eventType,f=n.scope;if(c!=="mouse"&&c!=="pen")return null;for(var k=0,_=f.interactions.list;k<_.length;k++){var V=_[k];if(V.pointerType===c){if(V.simulation&&!ga(V,o))continue;if(V.interacting())return V;t||(t=V)}}if(t)return t;for(var j=0,P=f.interactions.list;j<P.length;j++){var Y=P[j];if(!(Y.pointerType!==c||/down/i.test(d)&&Y.simulation))return Y}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,c=n.scope.interactions.list;o<c.length;o++){var d=c[o];if(ga(d,t))return d}return null},idle:function(n){for(var t=n.pointerType,o=0,c=n.scope.interactions.list;o<c.length;o++){var d=c[o];if(d.pointers.length===1){var f=d.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(d.pointers.length>=2)continue;if(!d.interacting()&&t===d.pointerType)return d}return null}};function ga(n,t){return n.pointers.some(function(o){return o.id===t})}var sa=ia,pn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Qn(n,t){return function(o){var c=t.interactions.list,d=ee(o),f=he(o),k=f[0],_=f[1],V=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,P=o.changedTouches;j<P.length;j++){var Y=P[j],De={pointer:Y,pointerId:A(Y),pointerType:d,eventType:o.type,eventTarget:k,curEventTarget:_,scope:t},Le=ca(De);V.push([De.pointer,De.eventTarget,De.curEventTarget,Le])}}else{var Pe=!1;if(!oe.supportsPointerEvent&&/mouse/.test(o.type)){for(var He=0;He<c.length&&!Pe;He++)Pe=c[He].pointerType!=="mouse"&&c[He].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var lt={pointer:o,pointerId:A(o),pointerType:d,eventType:o.type,curEventTarget:_,eventTarget:k,scope:t},nt=ca(lt);V.push([lt.pointer,lt.eventTarget,lt.curEventTarget,nt])}}for(var ht=0;ht<V.length;ht++){var Ct=V[ht],At=Ct[0],kt=Ct[1],St=Ct[2];Ct[3][n](At,o,kt,St)}}}function ca(n){var t=n.pointerType,o=n.scope,c={interaction:sa.search(n),searchDetails:n};return o.fire("interactions:find",c),c.interaction||o.interactions.new({pointerType:t})}function rn(n,t){var o=n.doc,c=n.scope,d=n.options,f=c.interactions.docEvents,k=c.events,_=k[t];for(var V in c.browser.isIOS&&!d.events&&(d.events={passive:!1}),k.delegatedEvents)_(o,V,k.delegateListener),_(o,V,k.delegateUseCapture,!0);for(var j=d&&d.events,P=0;P<f.length;P++){var Y=f[P];_(o,Y.type,Y.listener,j)}}var Ba={id:"core/interactions",install:function(n){for(var t={},o=0;o<pn.length;o++){var c=pn[o];t[c]=Qn(c,n)}var d,f=oe.pEventTypes;function k(){for(var _=0,V=n.interactions.list;_<V.length;_++){var j=V[_];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var P=function(){var Le=De[Y];n.documents.some(function(Pe){return fe(Pe.doc,Le.downTarget)})||j.removePointer(Le.pointer,Le.event)},Y=0,De=j.pointers;Y<De.length;Y++)P()}}(d=R.PointerEvent?[{type:f.down,listener:k},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:k},{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(_){for(var V=0,j=n.interactions.list;V<j.length;V++)j[V].documentBlur(_)}}),n.prevTouchTime=0,n.Interaction=function(_){x(j,_);var V=W(j);function j(){return s(this,j),V.apply(this,arguments)}return v(j,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(P){n.interactions.pointerMoveTolerance=P}},{key:"_now",value:function(){return n.now()}}]),j}(Yn),n.interactions={list:[],new:function(_){_.scopeFire=function(j,P){return n.fire(j,P)};var V=new n.Interaction(_);return n.interactions.list.push(V),V},listeners:t,docEvents:d,pointerMoveTolerance:1},n.usePlugin(Bn)},listeners:{"scope:add-document":function(n){return rn(n,"add")},"scope:remove-document":function(n){return rn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,c=t.interactions.list.length-1;c>=0;c--){var d=t.interactions.list[c];d.interactable===o&&(d.stop(),t.fire("interactions:destroy",{interaction:d}),d.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(c,1))}}},onDocSignal:rn,doOnInteractions:Qn,methodNames:pn},Mn=Ba,zn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(zn||{}),pr=function(){function n(t,o,c,d){s(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Vn,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||c,this._win=C(ke(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=d,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return g.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),g.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),g.func(o.onend)&&this.on("".concat(t,"end"),o.onend),g.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,c){var d,f=this,k=(d=this._actions.map[t])==null?void 0:d.filterEventType,_=function(V){return(k==null||k(V))&&mn(V,f._actions)};(g.array(o)||g.object(o))&&this._onOff(zn.Off,t,o,void 0,_),(g.array(c)||g.object(c))&&this._onOff(zn.On,t,c,void 0,_)}},{key:"setPerAction",value:function(t,o){var c=this._defaults;for(var d in o){var f=d,k=this.options[t],_=o[f];f==="listeners"&&this.updatePerActionListeners(t,k.listeners,_),g.array(_)?k[f]=xe(_):g.plainObject(_)?(k[f]=T(k[f]||{},dn(_)),g.object(c.perAction[f])&&"enabled"in c.perAction[f]&&(k[f].enabled=_.enabled!==!1)):g.bool(_)&&g.object(c.perAction[f])?k[f].enabled=_:k[f]=_}}},{key:"getRect",value:function(t){return t=t||(g.element(this.target)?this.target:null),g.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ce(t)}},{key:"rectChecker",value:function(t){var o=this;return g.func(t)?(this.getRect=function(c){var d=T({},t.apply(o,c));return"width"in d||(d.width=d.right-d.left,d.height=d.bottom-d.top),d},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(ke(o)||g.object(o)){for(var c in this.options[t]=o,this._actions.map)this.options[c][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 g.string(t)?Array.from(this._context.querySelectorAll(t)):g.func(t)&&t.getAllElements?t.getAllElements():g.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||fe(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,c){return!this.testIgnore(t.ignoreFrom,o,c)&&this.testAllow(t.allowFrom,o,c)}},{key:"testAllow",value:function(t,o,c){return!t||!!g.element(c)&&(g.string(t)?Z(c,t,o):!!g.element(t)&&fe(t,c))}},{key:"testIgnore",value:function(t,o,c){return!(!t||!g.element(c))&&(g.string(t)?Z(c,t,o):!!g.element(t)&&fe(t,c))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,c,d,f){g.object(o)&&!g.array(o)&&(d=c,c=null);var k=Se(o,c,f);for(var _ in k){_==="wheel"&&(_=oe.wheelEvent);for(var V=0,j=k[_];V<j.length;V++){var P=j[V];mn(_,this._actions)?this.events[t===zn.On?"on":"off"](_,P):g.string(this.target)?this._scopeEvents[t===zn.On?"addDelegate":"removeDelegate"](this.target,this._context,_,P,d):this._scopeEvents[t===zn.On?"add":"remove"](this.target,_,P,d)}}return this}},{key:"on",value:function(t,o,c){return this._onOff(zn.On,t,o,c)}},{key:"off",value:function(t,o,c){return this._onOff(zn.Off,t,o,c)}},{key:"set",value:function(t){var o=this._defaults;for(var c in g.object(t)||(t={}),this.options=dn(o.base),this._actions.methodDict){var d=c,f=this._actions.methodDict[d];this.options[d]={},this.setPerAction(d,T(T({},o.perAction),o.actions[d])),this[f](t[d])}for(var k in t)k!=="getRect"?g.func(this[k])&&this[k](t[k]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],c=o.length-1;c>=0;c--){var d=o[c],f=d.selector,k=d.context,_=d.listeners;f===this.target&&k===this._context&&o.splice(c,1);for(var V=_.length-1;V>=0;V--)this._scopeEvents.removeDelegate(this.target,this._context,t,_[V][0],_[V][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),fr=function(){function n(t){var o=this;s(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(c){var d=c.interactable,f=d.target,k=g.string(f)?o.selectorMap[f]:f[o.scope.id],_=K(k,function(V){return V===d});k.splice(_,1)}})}return v(n,[{key:"new",value:function(t,o){o=T(o||{},{actions:this.scope.actions});var c=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(c._doc),this.list.push(c),g.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(c)):(c.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(c)),this.scope.fire("interactable:new",{target:t,options:o,interactable:c,win:this.scope._win}),c}},{key:"getExisting",value:function(t,o){var c=o&&o.context||this.scope.document,d=g.string(t),f=d?this.selectorMap[t]:t[this.scope.id];if(f)return Re(f,function(k){return k._context===c&&(d||k.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var c=0,d=this.list;c<d.length;c++){var f=d[c],k=void 0;if((g.string(f.target)?g.element(t)&&X(t,f.target):t===f.target)&&f.inContext(t)&&(k=o(f)),k!==void 0)return k}}}]),n}(),hr=function(){function n(){var t=this;s(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=oe,this.defaults=dn(Nn),this.Eventable=Vn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(c){var d=function f(k,_){var V=c.interactables.getExisting(k,_);return V||((V=c.interactables.new(k,_)).events.global=f.globalEvents),V};return d.getPointerAverage=q,d.getTouchBBox=Te,d.getTouchDistance=ue,d.getTouchAngle=G,d.getElementRect=Ce,d.getElementClientRect=we,d.matchesSelector=X,d.closest=$e,d.globalEvents={},d.version="1.10.27",d.scope=c,d.use=function(f,k){return this.scope.usePlugin(f,k),this},d.isSet=function(f,k){return!!this.scope.interactables.get(f,k&&k.context)},d.on=ct(function(f,k,_){if(g.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),g.array(f)){for(var V=0,j=f;V<j.length;V++){var P=j[V];this.on(P,k,_)}return this}if(g.object(f)){for(var Y in f)this.on(Y,f[Y],k);return this}return mn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(k):this.globalEvents[f]=[k]:this.scope.events.add(this.scope.document,f,k,{options:_}),this},"The interact.on() method is being deprecated"),d.off=ct(function(f,k,_){if(g.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),g.array(f)){for(var V=0,j=f;V<j.length;V++){var P=j[V];this.off(P,k,_)}return this}if(g.object(f)){for(var Y in f)this.off(Y,f[Y],k);return this}var De;return mn(f,this.scope.actions)?f in this.globalEvents&&(De=this.globalEvents[f].indexOf(k))!==-1&&this.globalEvents[f].splice(De,1):this.scope.events.remove(this.scope.document,f,k,_),this},"The interact.off() method is being deprecated"),d.debug=function(){return this.scope},d.supportsTouch=function(){return oe.supportsTouch},d.supportsPointerEvent=function(){return oe.supportsPointerEvent},d.stop=function(){for(var f=0,k=this.scope.interactions.list;f<k.length;f++)k[f].stop();return this},d.pointerMoveTolerance=function(f){return g.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},d.addDocument=function(f,k){this.scope.addDocument(f,k)},d.removeDocument=function(f){this.scope.removeDocument(f)},d}(this),this.InteractEvent=Dn,this.Interactable=void 0,this.interactables=new fr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(c){return t.removeDocument(c.target)};var o=this;this.Interactable=function(c){x(f,c);var d=W(f);function f(){return s(this,f),d.apply(this,arguments)}return v(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(k){return N(E(f.prototype),"set",this).call(this,k),o.fire("interactable:set",{options:k,interactable:this}),this}},{key:"unset",value:function(){N(E(f.prototype),"unset",this).call(this);var k=o.interactables.list.indexOf(this);k<0||(o.interactables.list.splice(k,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(pr)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var c=0,d=this.listenerMaps;c<d.length;c++){var f=d[c].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,c){return o.isInitialized=!0,g.window(c)&&m(c),R.init(c),oe.init(c),We.init(c),o.window=c,o.document=c.document,o.usePlugin(Mn),o.usePlugin(Ta),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 c=0,d=this.listenerMaps.length,f=t.before.reduce(function(_,V){return _[V]=!0,_[ko(V)]=!0,_},{});c<d;c++){var k=this.listenerMaps[c].id;if(k&&(f[k]||f[ko(k)]))break}this.listenerMaps.splice(c,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 c=C(t);o=o?T({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(c,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:c,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),c=C(t),d=this.documents[o].options;this.events.remove(c,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:c,scope:this,options:d})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function ko(n){return n&&n.replace(/\/.*$/,"")}var xo=new hr,en=xo.interactStatic,vr=typeof globalThis<"u"?globalThis:window;xo.init(vr);var gr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(c){var d=c[0],f=c[1];return d in n||f in n}),o=function(c,d){for(var f=n.range,k=n.limits,_=k===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:k,V=n.offset,j=V===void 0?{x:0,y:0}:V,P={range:f,grid:n,x:null,y:null},Y=0;Y<t.length;Y++){var De=t[Y],Le=De[0],Pe=De[1],He=Math.round((c-j.x)/n[Le]),lt=Math.round((d-j.y)/n[Pe]);P[Le]=Math.max(_.left,Math.min(_.right,He*n[Le]+j.x)),P[Pe]=Math.max(_.top,Math.min(_.bottom,lt*n[Pe]+j.y))}return P};return o.grid=n,o.coordFields=t,o}}),mr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=T(t.snappers||{},gr),t.createSnapGrid=t.snappers.grid}},yr=mr,br={start:function(n){var t=n.state,o=n.rect,c=n.edges,d=n.pageCoords,f=t.options,k=f.ratio,_=f.enabled,V=t.options,j=V.equalDelta,P=V.modifiers;k==="preserve"&&(k=o.width/o.height),t.startCoords=T({},d),t.startRect=T({},o),t.ratio=k,t.equalDelta=j;var Y=t.linkedEdges={top:c.top||c.left&&!c.bottom,left:c.left||c.top&&!c.right,bottom:c.bottom||c.right&&!c.top,right:c.right||c.bottom&&!c.left};if(t.xIsPrimaryAxis=!(!c.left&&!c.right),t.equalDelta){var De=(Y.left?1:-1)*(Y.top?1:-1);t.edgeSign={x:De,y:De}}else t.edgeSign={x:Y.left?-1:1,y:Y.top?-1:1};if(_!==!1&&T(c,Y),P!=null&&P.length){var Le=new wn(n.interaction);Le.copyFrom(n.interaction.modification),Le.prepareStates(P),t.subModification=Le,Le.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,c=n.coords,d=t.linkedEdges,f=T({},c),k=t.equalDelta?kr:xr;if(T(n.edges,d),k(t,t.xIsPrimaryAxis,c,o),!t.subModification)return null;var _=T({},o);ne(d,_,{x:c.x-f.x,y:c.y-f.y});var V=t.subModification.setAll(l(l({},n),{},{rect:_,edges:d,pageCoords:c,prevCoords:c,prevRect:_})),j=V.delta;return V.changed&&(k(t,Math.abs(j.x)>Math.abs(j.y),V.coords,V.rect),T(c,V.coords)),V.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function kr(n,t,o){var c=n.startCoords,d=n.edgeSign;t?o.y=c.y+(o.x-c.x)*d.y:o.x=c.x+(o.y-c.y)*d.x}function xr(n,t,o,c){var d=n.startRect,f=n.startCoords,k=n.ratio,_=n.edgeSign;if(t){var V=c.width/k;o.y=f.y+(V-d.height)*_.y}else{var j=c.height*k;o.x=f.x+(j-d.width)*_.x}}var wr=on(br,"aspectRatio"),wo=function(){};wo._defaults={};var Ia=wo;function ea(n,t,o){return g.func(n)?Ye(n,t.interactable,t.element,[o.x,o.y,t]):Ye(n,t.interactable,t.element)}var Na={start:function(n){var t=n.rect,o=n.startOffset,c=n.state,d=n.interaction,f=n.pageCoords,k=c.options,_=k.elementRect,V=T({left:0,top:0,right:0,bottom:0},k.offset||{});if(t&&_){var j=ea(k.restriction,d,f);if(j){var P=j.right-j.left-t.width,Y=j.bottom-j.top-t.height;P<0&&(V.left+=P,V.right+=P),Y<0&&(V.top+=Y,V.bottom+=Y)}V.left+=o.left-t.width*_.left,V.top+=o.top-t.height*_.top,V.right+=o.right-t.width*(1-_.right),V.bottom+=o.bottom-t.height*(1-_.bottom)}c.offset=V},set:function(n){var t=n.coords,o=n.interaction,c=n.state,d=c.options,f=c.offset,k=ea(d.restriction,o,t);if(k){var _=function(V){return!V||"left"in V&&"top"in V||((V=T({},V)).left=V.x||0,V.top=V.y||0,V.right=V.right||V.left+V.width,V.bottom=V.bottom||V.top+V.height),V}(k);t.x=Math.max(Math.min(_.right-f.right,t.x),_.left+f.left),t.y=Math.max(Math.min(_.bottom-f.bottom,t.y),_.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Dr=on(Na,"restrict"),Do={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(n,t){for(var o=0,c=["top","left","bottom","right"];o<c.length;o++){var d=c[o];d in n||(n[d]=t[d])}return n}var ma={noInner:Do,noOuter:_o,start:function(n){var t,o=n.interaction,c=n.startOffset,d=n.state,f=d.options;f&&(t=Ae(ea(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},d.offset={top:t.y+c.top,left:t.x+c.left,bottom:t.y-c.bottom,right:t.x-c.right}},set:function(n){var t=n.coords,o=n.edges,c=n.interaction,d=n.state,f=d.offset,k=d.options;if(o){var _=T({},t),V=ea(k.inner,c,_)||{},j=ea(k.outer,c,_)||{};Eo(V,Do),Eo(j,_o),o.top?t.y=Math.min(Math.max(j.top+f.top,_.y),V.top+f.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+f.bottom,_.y),V.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(j.left+f.left,_.x),V.left+f.left):o.right&&(t.x=Math.max(Math.min(j.right+f.right,_.x),V.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},_r=on(ma,"restrictEdges"),Er=T({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Na.defaults),Cr=on({start:Na.start,set:Na.set,defaults:Er},"restrictRect"),Sr={width:-1/0,height:-1/0},Tr={width:1/0,height:1/0},Br=on({start:function(n){return ma.start(n)},set:function(n){var t=n.interaction,o=n.state,c=n.rect,d=n.edges,f=o.options;if(d){var k=ce(ea(f.min,t,n.coords))||Sr,_=ce(ea(f.max,t,n.coords))||Tr;o.options={endOnly:f.endOnly,inner:T({},ma.noInner),outer:T({},ma.noOuter)},d.top?(o.options.inner.top=c.bottom-k.height,o.options.outer.top=c.bottom-_.height):d.bottom&&(o.options.inner.bottom=c.top+k.height,o.options.outer.bottom=c.top+_.height),d.left?(o.options.inner.left=c.right-k.width,o.options.outer.left=c.right-_.width):d.right&&(o.options.inner.right=c.left+k.width,o.options.outer.right=c.left+_.width),ma.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Qa={start:function(n){var t,o=n.interaction,c=n.interactable,d=n.element,f=n.rect,k=n.state,_=n.startOffset,V=k.options,j=V.offsetWithOrigin?function(De){var Le=De.interaction.element,Pe=Ae(Ye(De.state.options.origin,null,null,[Le])),He=Pe||de(De.interactable,Le,De.interaction.prepared.name);return He}(n):{x:0,y:0};if(V.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var P=Ye(V.offset,c,d,[o]);(t=Ae(P)||{x:0,y:0}).x+=j.x,t.y+=j.y}var Y=V.relativePoints;k.offsets=f&&Y&&Y.length?Y.map(function(De,Le){return{index:Le,relativePoint:De,x:_.left-f.width*De.x+t.x,y:_.top-f.height*De.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,c=n.state,d=c.options,f=c.offsets,k=de(t.interactable,t.element,t.prepared.name),_=T({},o),V=[];d.offsetWithOrigin||(_.x-=k.x,_.y-=k.y);for(var j=0,P=f;j<P.length;j++)for(var Y=P[j],De=_.x-Y.x,Le=_.y-Y.y,Pe=0,He=d.targets.length;Pe<He;Pe++){var lt=d.targets[Pe],nt=void 0;(nt=g.func(lt)?lt(De,Le,t._proxy,Y,Pe):lt)&&V.push({x:(g.number(nt.x)?nt.x:De)+Y.x,y:(g.number(nt.y)?nt.y:Le)+Y.y,range:g.number(nt.range)?nt.range:d.range,source:lt,index:Pe,offset:Y})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ct=0;Ct<V.length;Ct++){var At=V[Ct],kt=At.range,St=At.x-_.x,tn=At.y-_.y,jt=dt(St,tn),sn=jt<=kt;kt===1/0&&ht.inRange&&ht.range!==1/0&&(sn=!1),ht.target&&!(sn?ht.inRange&&kt!==1/0?jt/kt<ht.distance/ht.range:kt===1/0&&ht.range!==1/0||jt<ht.distance:!ht.inRange&&jt<ht.distance)||(ht.target=At,ht.distance=jt,ht.range=kt,ht.inRange=sn,ht.delta.x=St,ht.delta.y=tn)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),c.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Ir=on(Qa,"snap"),Aa={start:function(n){var t=n.state,o=n.edges,c=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:c.offset||"self",origin:{x:0,y:0},range:c.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Qa.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,c=n.coords,d=o.options,f=o.offsets,k={x:c.x-f[0].x,y:c.y-f[0].y};o.options=T({},d),o.options.targets=[];for(var _=0,V=d.targets||[];_<V.length;_++){var j=V[_],P=void 0;if(P=g.func(j)?j(k.x,k.y,t):j){for(var Y=0,De=o.targetFields;Y<De.length;Y++){var Le=De[Y],Pe=Le[0],He=Le[1];if(Pe in P||He in P){P.x=P[Pe],P.y=P[He];break}}o.options.targets.push(P)}}var lt=Qa.set(n);return o.options=d,lt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Nr=on(Aa,"snapSize"),eo={aspectRatio:wr,restrictEdges:_r,restrict:Dr,restrictRect:Cr,restrictSize:Br,snapEdges:on({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Aa.start(n)):null},set:Aa.set,defaults:T(dn(Aa.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ir,snapSize:Nr,spring:Ia,avoid:Ia,transform:Ia,rubberband:Ia},Ar={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(In),n.usePlugin(yr),t.modifiers=eo,eo){var c=eo[o],d=c._defaults,f=c._methods;d._methods=f,n.defaults.perAction[o]=d}}},Vr=Ar,Co=function(n){x(o,n);var t=W(o);function o(c,d,f,k,_,V){var j;if(s(this,o),I(F(j=t.call(this,_)),f),f!==d&&I(F(j),d),j.timeStamp=V,j.originalEvent=f,j.type=c,j.pointerId=A(d),j.pointerType=ee(d),j.target=k,j.currentTarget=null,c==="tap"){var P=_.getPointerIndex(d);j.dt=j.timeStamp-_.pointers[P].downTime;var Y=j.timeStamp-_.tapTime;j.double=!!_.prevTap&&_.prevTap.type!=="doubletap"&&_.prevTap.target===j.target&&Y<500}else c==="doubletap"&&(j.dt=d.timeStamp-_.tapTime,j.double=!0);return j}return v(o,[{key:"_subtractOrigin",value:function(c){var d=c.x,f=c.y;return this.pageX-=d,this.pageY-=f,this.clientX-=d,this.clientY-=f,this}},{key:"_addOrigin",value:function(c){var d=c.x,f=c.y;return this.pageX+=d,this.pageY+=f,this.clientX+=d,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(ye),ya={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ya,n.defaults.actions.pointerEvents=ya.defaults,T(n.actions.phaselessTypes,ya.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,c=n.pointer,d=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&to(n),Rn({interaction:o,pointer:c,event:d,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,c){for(var d=o.interaction,f=o.pointer,k=o.event,_=o.eventTarget,V=o.pointerIndex,j=d.pointers[V].hold,P=te(_),Y={interaction:d,pointer:f,event:k,eventTarget:_,type:"hold",targets:[],path:P,node:null},De=0;De<P.length;De++){var Le=P[De];Y.node=Le,c.fire("pointerEvents:collect-targets",Y)}if(Y.targets.length){for(var Pe=1/0,He=0,lt=Y.targets;He<lt.length;He++){var nt=lt[He].eventable.options.holdDuration;nt<Pe&&(Pe=nt)}j.duration=Pe,j.timeout=setTimeout(function(){Rn({interaction:d,eventTarget:_,pointer:f,event:k,type:"hold"},c)},Pe)}})(n,t),Rn(n,t)},"interactions:up":function(n,t){to(n),Rn(n,t),function(o,c){var d=o.interaction,f=o.pointer,k=o.event,_=o.eventTarget;d.pointerWasMoved||Rn({interaction:d,eventTarget:_,pointer:f,event:k,type:"tap"},c)}(n,t)},"interactions:cancel":function(n,t){to(n),Rn(n,t)}},PointerEvent:Co,fire:Rn,collectEventTargets:So,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Rn(n,t){var o=n.interaction,c=n.pointer,d=n.event,f=n.eventTarget,k=n.type,_=n.targets,V=_===void 0?So(n,t):_,j=new Co(k,c,d,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var P={interaction:o,pointer:c,event:d,eventTarget:f,targets:V,type:k,pointerEvent:j},Y=0;Y<V.length;Y++){var De=V[Y];for(var Le in De.props||{})j[Le]=De.props[Le];var Pe=de(De.eventable,De.node);if(j._subtractOrigin(Pe),j.eventable=De.eventable,j.currentTarget=De.node,De.eventable.fire(j),j._addOrigin(Pe),j.immediatePropagationStopped||j.propagationStopped&&Y+1<V.length&&V[Y+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",P),k==="tap"){var He=j.double?Rn({interaction:o,pointer:c,event:d,eventTarget:f,type:"doubletap"},t):j;o.prevTap=He,o.tapTime=He.timeStamp}return j}function So(n,t){var o=n.interaction,c=n.pointer,d=n.event,f=n.eventTarget,k=n.type,_=o.getPointerIndex(c),V=o.pointers[_];if(k==="tap"&&(o.pointerWasMoved||!V||V.downTarget!==f))return[];for(var j=te(f),P={interaction:o,pointer:c,event:d,eventTarget:f,type:k,path:j,targets:[],node:null},Y=0;Y<j.length;Y++){var De=j[Y];P.node=De,t.fire("pointerEvents:collect-targets",P)}return k==="hold"&&(P.targets=P.targets.filter(function(Le){var Pe,He;return Le.eventable.options.holdDuration===((Pe=o.pointers[_])==null||(He=Pe.hold)==null?void 0:He.duration)})),P.targets}function to(n){var t=n.interaction,o=n.pointerIndex,c=t.pointers[o].hold;c&&c.timeout&&(clearTimeout(c.timeout),c.timeout=null)}var Or=Object.freeze({__proto__:null,default:ya});function Mr(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var zr={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ya);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)]=Mr,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,c=n.pointerEvent,d=n.eventTarget,f=n.targets;if(c.type==="hold"&&f.length){var k=f[0].eventable.options.holdRepeatInterval;k<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:d,type:"hold",pointer:c,event:c},t)},k))}}})},Rr=zr,Pr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(c){return T(this.events.options,c),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(c,d){var f=o.call(this,c,d);return f===this&&(this.events.options[c]=d),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,c=n.node,d=n.type,f=n.eventTarget;t.interactables.forEachMatch(c,function(k){var _=k.events,V=_.options;_.types[d]&&_.types[d].length&&k.testIgnoreAllow(V,c,f)&&o.push({node:c,eventable:_,props:{interactable:k}})})},"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,c=n.options;T(o.events.options,t.pointerEvents.defaults),T(o.events.options,c.pointerEvents||{})}}},Fr=Pr,Lr={id:"pointer-events",install:function(n){n.usePlugin(Or),n.usePlugin(Rr),n.usePlugin(Fr)}},$r=Lr,jr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(c,d,f){for(var k=c.getAllElements(),_=f.window.Promise,V=_?[]:null,j=function(){var Y=k[P],De=c.getRect(Y);if(!De)return 1;var Le,Pe=Re(f.interactions.list,function(nt){return nt.interacting()&&nt.interactable===c&&nt.element===Y&&nt.prepared.name===d.name});if(Pe)Pe.move(),V&&(Le=Pe._reflowPromise||new _(function(nt){Pe._reflowResolve=nt}));else{var He=ce(De),lt=function(nt){return{coords:nt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:He.x,y:He.y},client:{x:He.x,y:He.y},timeStamp:f.now()});Le=function(nt,ht,Ct,At,kt){var St=nt.interactions.new({pointerType:"reflow"}),tn={interaction:St,event:kt,pointer:kt,eventTarget:Ct,phase:"reflow"};St.interactable=ht,St.element=Ct,St.prevEvent=kt,St.updatePointer(kt,kt,Ct,!0),Q(St.coords.delta),ft(St.prepared,At),St._doPhase(tn);var jt=nt.window,sn=jt.Promise,vn=sn?new sn(function(_n){St._reflowResolve=_n}):void 0;return St._reflowPromise=vn,St.start(At,ht,Ct),St._interacting?(St.move(tn),St.end(kt)):(St.stop(),St._reflowResolve()),St.removePointer(kt,kt),vn}(f,c,Y,d,lt)}V&&V.push(Le)},P=0;P<k.length&&!j();P++);return V&&_.all(V).then(function(){return c})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(c,d){c.splice(c.indexOf(d),1)}(t.interactions.list,o))}}},Ur=jr;if(en.use(Bn),en.use(Wt),en.use($r),en.use(Xt),en.use(Vr),en.use(Un),en.use(B),en.use(pt),en.use(Ur),en.default=en,u(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(Da,Da.exports)),Da.exports}var Rp=zp();const Zo=Ve.getDefaultExportFromCjs(Rp),Xa=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:r,emit:i}){const l=a,u=i,s=e.inject(Xl),b=e.inject(Gl);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),p=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let x=!1,E=!1,O=NaN,F=NaN,W=NaN,N=NaN,pe=-1,$=-1,M=-1,L=-1,m=l.x,C=l.y,h=l.w,w=l.h;const g=e.ref(),J=e.reactive({i:e.toRef(l,"i"),state:p,wrapper:g,calcXY:Ye});function Ee(S){Se(S)}function Qe(){qe()}function re(S){cn(l.isDraggable)&&(p.draggable=S)}function Be(S){cn(l.isResizable)&&(p.resizable=S)}function Oe(S){cn(l.isBounded)&&(p.bounded=S)}function R(S){p.transformScale=S}function le(S){p.rowHeight=S}function oe(S){p.maxRows=S}function fe(){p.rtl=Yo()==="rtl",qe()}function $e(S){p.cols=Math.floor(S)}s.increaseItem(J),e.onBeforeMount(()=>{p.rtl=Yo()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?p.cols=er(s.lastBreakpoint,s.cols):p.cols=s.colNum,p.rowHeight=s.rowHeight,p.containerWidth=s.width!==null?s.width:100,p.margin=s.margin!==void 0?s.margin.map(Number):[10,10],p.maxRows=s.maxRows,cn(l.isDraggable)?p.draggable=s.isDraggable:p.draggable=l.isDraggable,cn(l.isResizable)?p.resizable=s.isResizable:p.resizable=l.isResizable,cn(l.isBounded)?p.bounded=s.isBounded:p.bounded=l.isBounded,p.transformScale=s.transformScale,p.useCssTransforms=s.useCssTransforms,p.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{m=l.x,C=l.y,w=l.h,h=l.w,nn(Ce)}),b.on("updateWidth",Ee),b.on("compact",Qe),b.on("setDraggable",re),b.on("setResizable",Be),b.on("setBounded",Oe),b.on("setTransformScale",R),b.on("setRowHeight",le),b.on("setMaxRows",oe),b.on("directionchange",fe),b.on("setColNum",$e)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Ee),b.off("compact",Qe),b.off("setDraggable",re),b.off("setResizable",Be),b.off("setBounded",Oe),b.off("setTransformScale",R),b.off("setRowHeight",le),b.off("setMaxRows",oe),b.off("directionchange",fe),b.off("setColNum",$e),v.value&&(v.value.unset(),v.value=null),s.decreaseItem(J)}),r({state:p,wrapper:g});const tt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,X=e.computed(()=>p.resizable&&!l.static),z=e.computed(()=>s.isMirrored?!p.rtl:p.rtl),ie=e.computed(()=>(p.draggable||p.resizable)&&!l.static),Z=Tp("item"),ve=e.computed(()=>({[Z.b()]:!0,[Z.bm("resizable")]:X.value,[Z.bm("static")]:l.static,[Z.bm("resizing")]:p.isResizing,[Z.bm("dragging")]:p.isDragging,[Z.bm("transform")]:p.useCssTransforms,[Z.bm("rtl")]:z.value,[Z.bm("no-touch")]:tt&&ie.value})),we=e.computed(()=>[Z.be("resizer"),z.value&&Z.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,S=>{p.draggable=S}),e.watch(()=>l.static,()=>{nn(I),nn(Q)}),e.watch(()=>p.draggable,()=>{nn(I)}),e.watch(()=>l.isResizable,S=>{p.resizable=S}),e.watch(()=>l.isBounded,S=>{p.bounded=S}),e.watch(()=>p.resizable,()=>{nn(Q)}),e.watch(()=>p.rowHeight,()=>{nn(Ce),nn(te)}),e.watch([()=>p.cols,()=>p.containerWidth],()=>{nn(Q),nn(Ce),nn(te)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(Q)}),e.watch(z,()=>{nn(Q),nn(Ce)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const S=s.margin;!S||S[0]===p.margin[0]&&S[1]===p.margin[1]||(p.margin=S.map(Number),nn(Ce),nn(te))});function Ce(){l.x+l.w>p.cols?(m=0,h=l.w>p.cols?p.cols:l.w):(m=l.x,h=l.w);const S=Ge(m,C,h,w);p.isDragging&&(S.top=p.dragging.top,z.value?S.right=p.dragging.left:S.left=p.dragging.left),p.isResizing&&(S.width=p.resizing.width,S.height=p.resizing.height);let se;p.useCssTransforms?z.value?se=_p(S.top,S.right,S.width,S.height):se=Dp(S.top,S.left,S.width,S.height):z.value?se=Cp(S.top,S.right,S.width,S.height):se=Ep(S.top,S.left,S.width,S.height),p.style=se}function te(){const S={};for(const se of["width","height"]){const Me=p.style[se].match(/^(\d+)px$/);if(!Me)return;S[se]=Me[1]}u("container-resized",l.i,l.h,l.w,S.height,S.width)}function ke(S){if(l.static)return;const se=S.type;if(se==="resizestart"&&p.isResizing||se!=="resizestart"&&!p.isResizing)return;const Me=Xo(S);if(cn(Me))return;const{x:A,y:ae}=Me,U={width:0,height:0};let q;switch(se){case"resizestart":{Q(),pe=h,$=w,q=Ge(m,C,h,w),U.width=q.width,U.height=q.height,p.resizing=U,p.isResizing=!0;break}case"resizemove":{!S.edges.right&&!S.edges.left&&(W=A),!S.edges.top&&!S.edges.bottom&&(N=ae);const Te=Go(W,N,A,ae);z.value?U.width=p.resizing.width-Te.deltaX/p.transformScale:U.width=p.resizing.width+Te.deltaX/p.transformScale,U.height=p.resizing.height+Te.deltaY/p.transformScale,p.resizing=U;break}case"resizeend":{q=Ge(m,C,h,w),U.width=q.width,U.height=q.height,p.resizing={width:-1,height:-1},p.isResizing=!1;break}}q=de(U.height,U.width),q.w<l.minW&&(q.w=l.minW),q.w>l.maxW&&(q.w=l.maxW),q.h<l.minH&&(q.h=l.minH),q.h>l.maxH&&(q.h=l.maxH),q.h<1&&(q.h=1),q.w<1&&(q.w=1),W=A,N=ae,(h!==q.w||w!==q.h)&&u("resize",l.i,q.h,q.w,U.height,U.width),S.type==="resizeend"&&(pe!==h||$!==w)&&u("resized",l.i,q.h,q.w,U.height,U.width),b.emit("resizeEvent",S.type,l.i,m,C,q.h,q.w)}function T(S){if(l.static||p.isResizing)return;const se=S.type;if(se==="dragstart"&&p.isDragging||se!=="dragstart"&&!p.isDragging)return;const Me=Xo(S);if(cn(Me))return;const{x:A,y:ae}=Me,U=S.target;if(!U.offsetParent)return;const q={top:0,left:0};switch(se){case"dragstart":{M=m,L=C;const ue=U.offsetParent.getBoundingClientRect(),G=U.getBoundingClientRect(),ee=G.left/p.transformScale,he=ue.left/p.transformScale,ye=G.right/p.transformScale,_e=ue.right/p.transformScale,xe=G.top/p.transformScale,K=ue.top/p.transformScale;z.value?q.left=(ye-_e)*-1:q.left=ee-he,q.top=xe-K,p.dragging=q,p.isDragging=!0;break}case"dragmove":{const ue=Go(O,F,A,ae);if(z.value?q.left=p.dragging.left-ue.deltaX/p.transformScale:q.left=p.dragging.left+ue.deltaX/p.transformScale,q.top=p.dragging.top+ue.deltaY/p.transformScale,p.bounded){const G=U.offsetParent.clientHeight-ce(l.h,p.rowHeight,p.margin[1]);q.top=ne(q.top,0,G);const ee=Ae(),he=p.containerWidth-ce(l.w,ee,p.margin[0]);q.left=ne(q.left,0,he)}p.dragging=q;break}case"dragend":{const ue=U.offsetParent.getBoundingClientRect(),G=U.getBoundingClientRect(),ee=G.left/p.transformScale,he=ue.left/p.transformScale,ye=G.right/p.transformScale,_e=ue.right/p.transformScale,xe=G.top/p.transformScale,K=ue.top/p.transformScale;z.value?q.left=(ye-_e)*-1:q.left=ee-he,q.top=xe-K,p.dragging={top:-1,left:-1},p.isDragging=!1;break}}let Te;z.value,Te=Ye(q.top,q.left),O=A,F=ae,(m!==Te.x||C!==Te.y)&&u("move",l.i,Te.x,Te.y),S.type==="dragend"&&(M!==m||L!==C)&&u("moved",l.i,Te.x,Te.y),b.emit("dragEvent",S.type,l.i,Te.x,Te.y,w,h)}function Ge(S,se,Me,A){const ae=Ae();let U;return z.value?U={right:Math.round(ae*S+(S+1)*p.margin[0]),top:Math.round(p.rowHeight*se+(se+1)*p.margin[1]),width:Me===1/0?Me:Math.round(ae*Me+Math.max(0,Me-1)*p.margin[0]),height:A===1/0?A:Math.round(p.rowHeight*A+Math.max(0,A-1)*p.margin[1])}:U={left:Math.round(ae*S+(S+1)*p.margin[0]),top:Math.round(p.rowHeight*se+(se+1)*p.margin[1]),width:Me===1/0?Me:Math.round(ae*Me+Math.max(0,Me-1)*p.margin[0]),height:A===1/0?A:Math.round(p.rowHeight*A+Math.max(0,A-1)*p.margin[1])},U}function Ye(S,se){const Me=Ae();let A=Math.round((se-p.margin[0])/(Me+p.margin[0])),ae=Math.round((S-p.margin[1])/(p.rowHeight+p.margin[1]));return A=Math.max(Math.min(A,p.cols-h),0),ae=Math.max(Math.min(ae,p.maxRows-w),0),{x:A,y:ae}}function Ae(){return(p.containerWidth-p.margin[0]*(p.cols+1))/p.cols}function ce(S,se,Me){return Number.isFinite(S)?Math.round(se*S+Math.max(0,S-1)*Me):S}function ne(S,se,Me){return Math.max(Math.min(S,Me),se)}function de(S,se,Me=!1){const A=Ae();let ae=Math.round((se+p.margin[0])/(A+p.margin[0])),U=0;return Me?U=Math.ceil((S+p.margin[1])/(p.rowHeight+p.margin[1])):U=Math.round((S+p.margin[1])/(p.rowHeight+p.margin[1])),ae=Math.max(Math.min(ae,p.cols-m),0),U=Math.max(Math.min(U,p.maxRows-C),0),{w:ae,h:U}}function Se(S,se){p.containerWidth=S}function qe(){Ce()}function dt(){!v.value&&g.value&&(v.value=Zo(g.value),p.useStyleCursor||v.value.styleCursor(!1))}const y=Wo(T);function I(){if(dt(),!!v.value)if(p.draggable&&!l.static){const S={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};v.value.draggable(S),x||(x=!0,v.value.on("dragstart dragmove dragend",se=>{se.type==="dragmove"?y(se):T(se)}))}else v.value.draggable({enabled:!1})}const H=Wo(ke);function Q(){if(dt(),!!v.value)if(p.resizable&&!l.static){const S=Ge(0,0,l.maxW,l.maxH),se=Ge(0,0,l.minW,l.minH),Me={edges:{left:z.value?`.${we.value[0]}`:!1,right:z.value?!1:`.${we.value[0]}`,bottom:`.${we.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:se.height*p.transformScale,width:se.width*p.transformScale},max:{height:S.height*p.transformScale,width:S.width*p.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Me.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(Me),E||(E=!0,v.value.on("resizestart resizemove resizeend",A=>{A.type==="resizemove"?H(A):ke(A)}))}else v.value.resizable({enabled:!1})}return(S,se)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:g,class:e.normalizeClass(ve.value),style:e.normalizeStyle(p.style)},[e.renderSlot(S.$slots,"default"),X.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(we.value)},null,2)):e.createCommentVNode("",!0)],6))}}),la=typeof window<"u";var Qo;la&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function el(a){return a!=null}function tl(){}const Pp=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(Pp)));const Fp=la&&("ontouchstart"in window||$p()>0),Lp=Fp?"pointerdown":"click";function $p(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function jp(a,r,i=window.Event){const{type:l,bubbles:u=!1,cancelable:s=!1,...b}=r;if(!el(l)||l==="")return!1;let v;return el(i)?v=new i(l,{bubbles:u,cancelable:s}):(v=document.createEvent("HTMLEvents"),v.initEvent(l,u,s)),Object.assign(v,b),a.dispatchEvent(v)}const Up="clickoutside",Kp=new Set;la&&document.addEventListener(Lp,a=>{const r=a.target,i=a.composedPath&&a.composedPath();Kp.forEach(l=>{l!==r&&(i?!i.includes(l):!l.contains(r))&&(!l.__transferElement||l.__transferElement!==r&&!l.__transferElement.contains(r))&&jp(l,{type:Up})})},!0);const Wp=[["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(la){for(const a of Wp)if(a[1]in document){Fa=a;break}}e.computed(()=>!1);const Hp=new Set,qp=new WeakMap;if(la&&Fa){const a=Fa[2],r=Fa[4];document.addEventListener(r,()=>{if(Hp.forEach(i=>{i.value=!1}),document[a]){const i=qp.get(document[a]);i&&(i.value=!0)}},!1)}const nr=new Map;nr.set("x",0);nr.set("y",0);var na=[],Xp=function(){return na.some(function(a){return a.activeTargets.length>0})},Gp=function(){return na.some(function(a){return a.skippedTargets.length>0})},nl="ResizeObserver loop completed with undelivered notifications.",Yp=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:nl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=nl),window.dispatchEvent(a)},Sa;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Sa||(Sa={}));var aa=function(a){return Object.freeze(a)},Jp=function(){function a(r,i){this.inlineSize=r,this.blockSize=i,aa(this)}return a}(),ar=function(){function a(r,i,l,u){return this.x=r,this.y=i,this.width=l,this.height=u,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,aa(this)}return a.prototype.toJSON=function(){var r=this,i=r.x,l=r.y,u=r.top,s=r.right,b=r.bottom,v=r.left,p=r.width,x=r.height;return{x:i,y:l,top:u,right:s,bottom:b,left:v,width:p,height:x}},a.fromRect=function(r){return new a(r.x,r.y,r.width,r.height)},a}(),bo=function(a){return a instanceof SVGElement&&"getBBox"in a},or=function(a){if(bo(a)){var r=a.getBBox(),i=r.width,l=r.height;return!i&&!l}var u=a,s=u.offsetWidth,b=u.offsetHeight;return!(s||b||a.getClientRects().length)},al=function(a){var r;if(a instanceof Element)return!0;var i=(r=a==null?void 0:a.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(i&&a instanceof i.Element)},Zp=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},Ca=typeof window<"u"?window:{},Ma=new WeakMap,ol=/auto|scroll/,Qp=/^tb|vertical/,ef=/msie|trident/i.test(Ca.navigator&&Ca.navigator.userAgent),bn=function(a){return parseFloat(a||"0")},ha=function(a,r,i){return a===void 0&&(a=0),r===void 0&&(r=0),i===void 0&&(i=!1),new Jp((i?r:a)||0,(i?a:r)||0)},ll=aa({devicePixelContentBoxSize:ha(),borderBoxSize:ha(),contentBoxSize:ha(),contentRect:new ar(0,0,0,0)}),lr=function(a,r){if(r===void 0&&(r=!1),Ma.has(a)&&!r)return Ma.get(a);if(or(a))return Ma.set(a,ll),ll;var i=getComputedStyle(a),l=bo(a)&&a.ownerSVGElement&&a.getBBox(),u=!ef&&i.boxSizing==="border-box",s=Qp.test(i.writingMode||""),b=!l&&ol.test(i.overflowY||""),v=!l&&ol.test(i.overflowX||""),p=l?0:bn(i.paddingTop),x=l?0:bn(i.paddingRight),E=l?0:bn(i.paddingBottom),O=l?0:bn(i.paddingLeft),F=l?0:bn(i.borderTopWidth),W=l?0:bn(i.borderRightWidth),N=l?0:bn(i.borderBottomWidth),pe=l?0:bn(i.borderLeftWidth),$=O+x,M=p+E,L=pe+W,m=F+N,C=v?a.offsetHeight-m-a.clientHeight:0,h=b?a.offsetWidth-L-a.clientWidth:0,w=u?$+L:0,g=u?M+m:0,J=l?l.width:bn(i.width)-w-h,Ee=l?l.height:bn(i.height)-g-C,Qe=J+$+h+L,re=Ee+M+C+m,Be=aa({devicePixelContentBoxSize:ha(Math.round(J*devicePixelRatio),Math.round(Ee*devicePixelRatio),s),borderBoxSize:ha(Qe,re,s),contentBoxSize:ha(J,Ee,s),contentRect:new ar(O,p,J,Ee)});return Ma.set(a,Be),Be},rr=function(a,r,i){var l=lr(a,i),u=l.borderBoxSize,s=l.contentBoxSize,b=l.devicePixelContentBoxSize;switch(r){case Sa.DEVICE_PIXEL_CONTENT_BOX:return b;case Sa.BORDER_BOX:return u;default:return s}},tf=function(){function a(r){var i=lr(r);this.target=r,this.contentRect=i.contentRect,this.borderBoxSize=aa([i.borderBoxSize]),this.contentBoxSize=aa([i.contentBoxSize]),this.devicePixelContentBoxSize=aa([i.devicePixelContentBoxSize])}return a}(),ir=function(a){if(or(a))return 1/0;for(var r=0,i=a.parentNode;i;)r+=1,i=i.parentNode;return r},nf=function(){var a=1/0,r=[];na.forEach(function(s){if(s.activeTargets.length!==0){var b=[];s.activeTargets.forEach(function(v){var p=new tf(v.target),x=ir(v.target);b.push(p),v.lastReportedSize=rr(v.target,v.observedBox),x<a&&(a=x)}),r.push(function(){s.callback.call(s.observer,b,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var i=0,l=r;i<l.length;i++){var u=l[i];u()}return a},rl=function(a){na.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(ir(i.target)>a?r.activeTargets.push(i):r.skippedTargets.push(i))})})},af=function(){var a=0;for(rl(a);Xp();)a=nf(),rl(a);return Gp()&&Yp(),a>0},so,sr=[],of=function(){return sr.splice(0).forEach(function(a){return a()})},lf=function(a){if(!so){var r=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return of()}).observe(i,l),so=function(){i.textContent="".concat(r?r--:r++)}}sr.push(a),so()},rf=function(a){lf(function(){requestAnimationFrame(a)})},La=0,sf=function(){return!!La},cf=250,uf={attributes:!0,characterData:!0,childList:!0,subtree:!0},il=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sl=function(a){return a===void 0&&(a=0),Date.now()+a},co=!1,df=function(){function a(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return a.prototype.run=function(r){var i=this;if(r===void 0&&(r=cf),!co){co=!0;var l=sl(r);rf(function(){var u=!1;try{u=af()}finally{if(co=!1,r=l-sl(),!sf())return;u?i.run(1e3):r>0?i.run(r):i.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var r=this,i=function(){return r.observer&&r.observer.observe(document.body,uf)};document.body?i():Ca.addEventListener("DOMContentLoaded",i)},a.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),il.forEach(function(i){return Ca.addEventListener(i,r.listener,!0)}))},a.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),il.forEach(function(i){return Ca.removeEventListener(i,r.listener,!0)}),this.stopped=!0)},a}(),mo=new df,cl=function(a){!La&&a>0&&mo.start(),La+=a,!La&&mo.stop()},pf=function(a){return!bo(a)&&!Zp(a)&&getComputedStyle(a).display==="inline"},ff=function(){function a(r,i){this.target=r,this.observedBox=i||Sa.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var r=rr(this.target,this.observedBox,!0);return pf(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},a}(),hf=function(){function a(r,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=i}return a}(),za=new WeakMap,ul=function(a,r){for(var i=0;i<a.length;i+=1)if(a[i].target===r)return i;return-1},Ra=function(){function a(){}return a.connect=function(r,i){var l=new hf(r,i);za.set(r,l)},a.observe=function(r,i,l){var u=za.get(r),s=u.observationTargets.length===0;ul(u.observationTargets,i)<0&&(s&&na.push(u),u.observationTargets.push(new ff(i,l&&l.box)),cl(1),mo.schedule())},a.unobserve=function(r,i){var l=za.get(r),u=ul(l.observationTargets,i),s=l.observationTargets.length===1;u>=0&&(s&&na.splice(na.indexOf(l),1),l.observationTargets.splice(u,1),cl(-1))},a.disconnect=function(r){var i=this,l=za.get(r);l.observationTargets.slice().forEach(function(u){return i.unobserve(r,u.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),vf=function(){function a(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ra.connect(this,r)}return a.prototype.observe=function(r,i){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!al(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ra.observe(this,r,i)},a.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!al(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ra.unobserve(this,r)},a.prototype.disconnect=function(){Ra.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Ga=new WeakMap;function gf(a){var r;for(let i=0,l=a.length;i<l;++i){const u=a[i],s=Ga.get(u.target);if(typeof s=="function"){const{inlineSize:b,blockSize:v}=((r=u.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:p,offsetHeight:x}=u.target;s(Object.assign(u,{offsetWidth:p,offsetHeight:x,width:b??p,height:v??x}))}}}const cr=new(la&&window.ResizeObserver||vf)(gf);function dl(a,r){Ga.set(a,r),cr.observe(a)}function pl(a){Ga.has(a)&&(cr.unobserve(a),Ga.delete(a))}function mf(a={}){let r=tl;const i=e.watch(()=>e.unref(a.target),u=>{r(),!(!u||typeof a.onResize!="function")&&(dl(u,a.onResize),r=()=>{pl(u),r=tl})},{immediate:!0}),l=()=>{i(),r()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:dl,unobserveResize:pl,unobserve:l}}const yf=e.ref(!1);e.computed(()=>yf.value);const fl="__theme_style__",uo="__theme_observer__",hl=e.reactive(new Map),vl=new Map;e.watch(hl,()=>{if(!la)return;vl.clear();const a=document.head.querySelector(`#${fl}`);a&&document.head.removeChild(a);const r=document.createElement("style");let i=`.${uo} { width: 1px }`,l=1;for(const[u,[s,b]]of hl.entries())i+=` html.${s} .${uo}, .${b} .${uo} { width: ${++l}px }`,vl.set(l,u);r.textContent=i,r.id=fl,document.head.appendChild(r)});const ur=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:r,emit:i}){const l=a,u=i,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,v=e.ref(l.layout),p=e.ref(),{observeResize:x,unobserveResize:E}=mf(),O=gp();O.on("resizeEvent",F),O.on("dragEvent",W),e.onBeforeMount(()=>{u("layout-before-mount",v.value)}),e.onMounted(()=>{u("layout-mounted",v.value),e.nextTick(()=>{Sp(v.value),s.originalLayout=v.value,e.nextTick(()=>{Ee(),p.value&&x(p.value,mp(m,16)),da(v.value,l.verticalCompact),u("layout-updated",v.value),L(),m()})})}),e.onBeforeUnmount(()=>{O.clearAll(),p.value&&E(p.value)});function F(re,Be,Oe,R,le,oe){g(re,Be,Oe,R,le,oe)}function W(re,Be,Oe,R,le,oe){w(re,Be,Oe,R,le,oe)}e.watch(()=>s.width,(re,Be)=>{e.nextTick(()=>{O.emit("updateWidth",re),Be===-1&&e.nextTick(()=>{u("layout-ready",v.value)}),L()})}),e.watch(()=>[l.layout,l.layout.length],()=>{v.value=l.layout,M()}),e.watch(()=>l.colNum,re=>{O.emit("setColNum",re)}),e.watch(()=>l.rowHeight,re=>{O.emit("setRowHeight",re)}),e.watch(()=>l.isDraggable,re=>{O.emit("setDraggable",re)}),e.watch(()=>l.isResizable,re=>{O.emit("setResizable",re)}),e.watch(()=>l.isBounded,re=>{O.emit("setBounded",re)}),e.watch(()=>l.transformScale,re=>{O.emit("setTransformScale",re)}),e.watch(()=>l.responsive,re=>{re||(u("update:layout",s.originalLayout),O.emit("setColNum",l.colNum)),m()}),e.watch(()=>l.maxRows,re=>{O.emit("setMaxRows",re)}),e.watch([()=>l.margin,()=>l.margin[1]],L),e.provide(Xl,e.reactive({...e.toRefs(l),...e.toRefs(s),increaseItem:N,decreaseItem:pe})),e.provide(Gl,O),r({state:s,getItem:$,resizeEvent:g,dragEvent:w,layoutUpdate:M});function N(re){b.set(re.i,re)}function pe(re){b.delete(re.i)}function $(re){return b.get(re)}function M(){if(!cn(v.value)&&!cn(s.originalLayout)){if(v.value.length!==s.originalLayout.length){const re=Qe(v.value,s.originalLayout);if(re.length>0)if(v.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(re);else{const Be=new Set(re.map(Oe=>Oe.i));s.originalLayout=s.originalLayout.filter(Oe=>!Be.has(Oe.i))}s.lastLayoutLength=v.value.length,Ee()}da(v.value,l.verticalCompact),O.emit("updateWidth",s.width),L(),u("layout-updated",v.value)}}function L(){s.mergedStyle={height:C()}}function m(){p.value&&(s.width=p.value.offsetWidth),O.emit("resizeEvent")}function C(){if(!l.autoSize)return;const re=parseFloat(l.margin[1]);return bp(v.value)*(l.rowHeight+re)+re+"px"}let h;function w(re,Be,Oe,R,le,oe){let fe=Ho(v.value,Be);cn(fe)&&(fe={h:0,w:0,x:0,y:0,i:""}),re==="dragstart"&&!l.verticalCompact&&(h=v.value.reduce(($e,{i:tt,x:X,y:z})=>({...$e,[tt]:{x:X,y:z}}),{})),re==="dragmove"||re==="dragstart"?(s.placeholder.i=Be,s.placeholder.x=fe.x,s.placeholder.y=fe.y,s.placeholder.w=oe,s.placeholder.h=le,e.nextTick(()=>{s.isDragging=!0}),O.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),v.value=go(v.value,fe,Oe,R,!0,l.preventCollision),l.restoreOnDrag?(fe.static=!0,da(v.value,l.verticalCompact,h),fe.static=!1):da(v.value,l.verticalCompact),O.emit("compact"),L(),re==="dragend"&&(h=void 0,u("layout-updated",v.value))}function g(re,Be,Oe,R,le,oe){let fe=Ho(v.value,Be);cn(fe)&&(fe={h:0,w:0,x:0,y:0,i:""});let $e;if(l.preventCollision){const tt=Jl(v.value,{...fe,w:oe,h:le}).filter(X=>X.i!==fe.i);if($e=tt.length>0,$e){let X=1/0,z=1/0;tt.forEach(ie=>{ie.x>fe.x&&(X=Math.min(X,ie.x)),ie.y>fe.y&&(z=Math.min(z,ie.y))}),Number.isFinite(X)&&(fe.w=X-fe.x),Number.isFinite(z)&&(fe.h=z-fe.y)}}$e||(fe.w=oe,fe.h=le),re==="resizestart"||re==="resizemove"?(s.placeholder.i=Be,s.placeholder.x=Oe,s.placeholder.y=R,s.placeholder.w=fe.w,s.placeholder.h=fe.h,e.nextTick(()=>{s.isDragging=!0}),O.emit("updateWidth",s.width)):re&&e.nextTick(()=>{s.isDragging=!1}),l.responsive&&J(),da(v.value,l.verticalCompact),O.emit("compact"),L(),re==="resizeend"&&u("layout-updated",v.value)}function J(){const re=Np(l.breakpoints,s.width);if(re===s.lastBreakpoint)return;const Be=er(re,l.cols);!cn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=vo(v.value));const Oe=Ap(s.originalLayout,s.layouts,l.breakpoints,re,s.lastBreakpoint,Be,l.verticalCompact);s.layouts[re]=Oe,s.lastBreakpoint!==re&&u("breakpoint-changed",re,Oe),v.value=Oe,u("update:layout",Oe),s.lastBreakpoint=re,O.emit("setColNum",Be)}function Ee(){s.layouts=Object.assign({},l.responsiveLayouts)}function Qe(re,Be){const Oe=new Set(Be.map(fe=>fe.i)),R=new Set(re.map(fe=>fe.i)),le=re.filter(fe=>!Oe.has(fe.i)),oe=Be.filter(fe=>!R.has(fe.i));return le.concat(oe)}return(re,Be)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:p,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[re.$slots.default?e.renderSlot(re.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,Oe=>(e.openBlock(),e.createBlock(Xa,e.mergeProps({key:Oe.i,ref_for:!0},Oe),{default:e.withCtx(()=>[e.renderSlot(re.$slots,"item",{item:Oe})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Xa,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const bf={key:0,class:"item-view-group"},kf={key:0,class:"item-view-group"},xf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:r}){const i=D.useModelComp(D.pinia),{isEdit:l}=D.storeToRefs(i),u=r,s=a,b=e.computed(()=>s==null?void 0:s.children),v=e.computed(()=>{var F,W,N,pe;return((F=s==null?void 0:s.children)==null?void 0:F.length)>0&&((W=s==null?void 0:s.children)!=null&&W.every($=>$==null?void 0:$.layout))?(pe=(N=s==null?void 0:s.children)==null?void 0:N[0])==null?void 0:pe.layout:"vertical"}),p=e.computed(()=>{var F,W;return((W=(F=s==null?void 0:s.children)==null?void 0:F[0])==null?void 0:W.isGridLayout)||!1}),x=e.ref((s==null?void 0:s.level)+1),E=F=>{u("rowClick",F)},O=(F,W)=>{u("routeUrl",F,W)};return(F,W)=>p.value?(e.openBlock(),e.createBlock(e.unref(ur),{key:0,layout:b.value,"onUpdate:layout":W[0]||(W[0]=N=>b.value=N),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(N,pe)=>(e.openBlock(),e.createBlock(e.unref(Xa),{key:N.i,x:N.x,y:N.y,"min-h":N.minH,"max-h":N.maxH,"min-w":N.minW,w:N.w,h:N.h,i:N.i},{default:e.withCtx(()=>{var $,M,L,m,C,h,w,g,J,Ee,Qe,re,Be;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:pe===(($=s==null?void 0:s.children)==null?void 0:$.length)-1?"0px":"24px"})},[((L=(M=N==null?void 0:N.component)==null?void 0:M.comp)==null?void 0:L.toUpperCase())!=="TABLE"&&((m=N==null?void 0:N.component)!=null&&m.name)?(e.openBlock(),e.createElementBlock("div",bf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString((C=N==null?void 0:N.component)==null?void 0:C.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ka)((h=N==null?void 0:N.component)==null?void 0:h.comp)),{pageLayout:v.value,config:{showIndex:(w=e.unref(Yt)[pe])==null?void 0:w.showIndex,allowMove:(g=e.unref(Yt)[pe])==null?void 0:g.allowMove,viewport:(J=e.unref(Yt)[pe])==null?void 0:J.viewport},related:N==null?void 0:N.relatedTables,compName:N==null?void 0:N.component.name,compNames:e.unref(Fl),itemData:(Ee=N==null?void 0:N.component)==null?void 0:Ee.compData,childItemData:(Qe=N==null?void 0:N.component)==null?void 0:Qe.itemChildData,key:e.unref(va),cacheNewData:e.unref(Pl),onChange:e.unref(Wa),index:(N==null?void 0:N.id)??pe,onContentChange:e.unref(Ha),onPageChange:e.unref(qa),parentTableId:(re=N==null?void 0:N.component)==null?void 0:re.tableId,allMapContents:e.unref(ho),children:(Be=N==null?void 0:N.component)==null?void 0:Be.children,level:x.value,onRowClick:E,onRouteUrl:O,onClickTrigger:e.unref(Ll),onClickMainKey:e.unref($l)},null,40,["pageLayout","config","related","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(s==null?void 0:s.children,(N,pe)=>{var $,M;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(N==null?void 0:N.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(pe)===(($=s==null?void 0:s.children)==null?void 0:$.length)-1?"0px":"24px"})},[((M=N==null?void 0:N.comp)==null?void 0:M.toUpperCase())!=="TABLE"&&N.name?(e.openBlock(),e.createElementBlock("div",kf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(N.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ka)(N.comp)),{compName:N.name,itemData:N==null?void 0:N.compData,related:N==null?void 0:N.relatedTables,childItemData:N==null?void 0:N.itemChildData,key:e.unref(va),onChange:e.unref(Wa),index:(N==null?void 0:N.id)??pe,onContentChange:e.unref(Ha),onPageChange:e.unref(qa),parentTableId:N==null?void 0:N.tableId,allMapContents:e.unref(ho),children:N==null?void 0:N.children,level:x.value,onRowClick:E,onRouteUrl:O},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),wf=Ft._export_sfc(xf,[["__scopeId","data-v-a00427c1"]]),dr=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"}]),Df={TABLE:xa.ssTable,FORM:Oo,TABLEOPERATE:bs,TABLESTYLE:Ms,TABLEEXTEND:Rs,TABLEINTERACTION:Ls,FORMOPERATE:Mo,FOLD:gc,CALCULATOR:wc,METHODBUTTON:Ec,AVATARUPLOAD:No.ssAvatar,SIGNATURE:No.ssSignature,FORMTOP:Oo,STEP:Rc,STEPOPERATE:ic,TIMELINE:Uc,TIMELINEOPERATE:fc,FORMTOPOPERATE:Mo,SIGNATUREOPERATE:Oc,AVATARUPLOADOPERATE:Tc,TABS:Hc,TABSOPERATE:Nu,CHART:Wu,CHARTOPERATE:nd,LAYOUT:op,LAYOUTOPERATE:fp,PARENTITEM:wf};function ra(a){return Df[a==null?void 0:a.toUpperCase()]||null}exports.De=ur;exports._sfc_main=Il;exports.activeStepInfo=pa;exports.affixItems=qd;exports.allMapContents=ho;exports.analyzeForm=ud;exports.analyzeQuoteForm=cd;exports.analyzeSplitToContent=Ht;exports.analyzeTable=pd;exports.analyzerStringToArray=ad;exports.cacheNewData=Pl;exports.clickMainKey=$l;exports.clickSavePage=Hd;exports.clickStep=Ul;exports.clickTrigger=Ll;exports.compId=va;exports.compNames=Fl;exports.compShow=Ua;exports.existLayouts=Gd;exports.generateLayouts=Ns;exports.getComponent=ra;exports.getComponents=Ka;exports.getSliceContLength=Qd;exports.gridRowHeight=Cs;exports.isStepLayout=Kl;exports.onBack=Ud;exports.onChange=Wa;exports.onClick=Wd;exports.onContentChange=Ha;exports.onExtendTaskEnd=Xd;exports.onPageBack=Yd;exports.onPageChange=qa;exports.onSelectFixContent=jd;exports.renderShowItems=zl;exports.same=od;exports.setComponent=Ol;exports.showItems=Yt;exports.sliceTableLength=Rl;exports.slotContent=dr;exports.ssMenu=ja;exports.st=Xa;exports.stepItems=ep;exports.toolBar=wa;exports.verifyButton=Jd;
|