ss-component-new 1.2.22 → 1.2.23
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-Cgu6hVsY.cjs → MTLLoader-B8MnfNfT.cjs} +1 -1
- package/dist/{MTLLoader-6BGR4SPQ.js → MTLLoader-BD3cbBAW.js} +1 -1
- package/dist/{OrbitControls-KuEu6kM3.cjs → OrbitControls-2UHRU9Fu.cjs} +1 -1
- package/dist/{OrbitControls-CqrkpfUW.js → OrbitControls-D1pz0uFI.js} +1 -1
- package/dist/{animationData-FMGneVai.cjs → animationData-Bwh55Xw6.cjs} +1 -1
- package/dist/{animationData-OlBnUG8w.js → animationData-D0TJ-9dd.js} +4 -4
- package/dist/array-DMPAgNcb.cjs +11 -0
- package/dist/array-DTXrs6ZK.js +1207 -0
- package/dist/{dataUtil-DPRubJA4.js → dataUtil-gEKo7CEq.js} +2 -2
- package/dist/{dataUtil-D2dUTgHP.cjs → dataUtil-i5X2xhin.cjs} +1 -1
- package/dist/{fileUtil-D4f4EJ9p.js → fileUtil-CN00xr9W.js} +1 -1
- package/dist/{fileUtil-DWuPXxGz.cjs → fileUtil-GIRXMs25.cjs} +1 -1
- package/dist/{iconfont-CiYOe1nN.cjs → iconfont-C9-pGpAJ.cjs} +1 -1
- package/dist/{iconfont-D1aDkauN.js → iconfont-DTSZW2AU.js} +2 -2
- package/dist/icons/svg/LowCodeEvent.svg +1 -1
- package/dist/icons/svg/LowCodeExtend.svg +1 -1
- package/dist/icons/svg/LowCodeSetting.svg +1 -1
- package/dist/icons/svg/LowCodeStyle.svg +1 -1
- package/dist/{index-Dv32OdnH.js → index-2fqHNrPg.js} +4 -4
- package/dist/{index-CfrqPhLf.cjs → index-7Ru3e632.cjs} +1 -1
- package/dist/{index-DyA4ALuY.cjs → index-7gU0r1We.cjs} +1 -1
- package/dist/{index-Cgs7cequ.js → index-7oJ8Ile4.js} +1 -1
- package/dist/{index-C9o3guTc.js → index-B0dydZDW.js} +17 -17
- package/dist/{index-CIn_YMID.js → index-BD5yZDAq.js} +2 -2
- package/dist/index-BLwwxnzs.cjs +1 -0
- package/dist/{index-BQ1gqL2T.cjs → index-BNYeBPmi.cjs} +1 -1
- package/dist/{index-DEBf-IBT.cjs → index-BOJUyAaV.cjs} +9 -9
- package/dist/{index-BsXwkKZt.js → index-BQBxzTyE.js} +2 -2
- package/dist/{index-CJhLlcnS.js → index-BTTpV9o2.js} +3 -3
- package/dist/{index-CdNhl58g.cjs → index-BTfg83yY.cjs} +1 -1
- package/dist/{index-CkdrE77c.js → index-BVFL7Z_0.js} +3 -3
- package/dist/index-BVdolwlx.js +7293 -0
- package/dist/{index-D_zs3Ywk.cjs → index-BXEOQo2c.cjs} +1 -1
- package/dist/{index-C0eoTBsi.js → index-Be1LJMUR.js} +2 -2
- package/dist/{index-y9I5saNf.cjs → index-BkIFY0hK.cjs} +1 -1
- package/dist/{index-BvyKSIqa.js → index-Bm3FE_ss.js} +3 -3
- package/dist/{index-i1HrhN2m.js → index-BpTrDbkf.js} +4 -4
- package/dist/{index-DcgnW8IS.js → index-Bt2MaT2G.js} +6 -6
- package/dist/{index-BOwTBtjA.js → index-BuSsSHAY.js} +2733 -2817
- package/dist/{index-Vo9hn1HO.js → index-Bvk4OpkL.js} +2 -2
- package/dist/{index-Br1HQap-.js → index-BwEfrokO.js} +2 -2
- package/dist/{index-dJ_vyooa.cjs → index-C54wX50t.cjs} +1 -1
- package/dist/{index-CMSMrWWB.cjs → index-C6C5VWbs.cjs} +1 -1
- package/dist/{index-wFocLxVz.cjs → index-CADH_aSQ.cjs} +1 -1
- package/dist/{index-GVURdQmb.cjs → index-CFriKZ-T.cjs} +1 -1
- package/dist/index-CK54pscx.cjs +1 -0
- package/dist/{index-DdYGa8y9.js → index-Cl6HMOao.js} +1 -1
- package/dist/{index-C1xFocJD.js → index-CptCatmL.js} +2 -2
- package/dist/{index-BdEr19ln.js → index-CqYUVCh5.js} +12 -12
- package/dist/index-CsOz5vsv.cjs +1 -0
- package/dist/{index-kFjfkR4F.cjs → index-CtXpoEg0.cjs} +1 -1
- package/dist/{index-Dw_mx2E5.js → index-CvC2498b.js} +2 -2
- package/dist/{index-DN2RDo7w.js → index-CvrBt7bU.js} +3 -3
- package/dist/{index-B0mK1X2Z.js → index-D4pN9YmB.js} +2 -2
- package/dist/index-D8Y3imz9.cjs +1 -0
- package/dist/index-DEEZPcpU.cjs +1 -0
- package/dist/index-DEs8s152.js +3621 -0
- package/dist/{index-DV1Onr_-.cjs → index-DHp714Ep.cjs} +1 -1
- package/dist/index-DMbCaqEC.cjs +15 -0
- package/dist/{index-C7Wgog15.js → index-DNs9XPOG.js} +2 -2
- package/dist/{index-B3vewIE0.js → index-DOhvzke2.js} +5 -5
- package/dist/index-DPX3w6cO.js +2643 -0
- package/dist/{index-D6aL_qQ4.cjs → index-DQ3y1xkr.cjs} +1 -1
- package/dist/{index-Gqf0Dw_K.cjs → index-DR9beXhk.cjs} +1 -1
- package/dist/{index-C8YYklCT.cjs → index-DSchKIyh.cjs} +1 -1
- package/dist/{index-vIQwCbI-.cjs → index-DSlPg3dk.cjs} +1 -1
- package/dist/{index-CYvWTBiC.cjs → index-DbCNaQ87.cjs} +1 -1
- package/dist/{index-B1KcMjms.cjs → index-Dfwm0xPp.cjs} +1 -1
- package/dist/index-DiRBJiMW.js +43 -0
- package/dist/{index-BuQNI1CB.js → index-DlIkbsRf.js} +6 -6
- package/dist/{index-B__9hFoC.cjs → index-DllJulGH.cjs} +1 -1
- package/dist/{index-BJadEVee.js → index-Dm_WlV6R.js} +5542 -5543
- package/dist/{index-D4nuGSp1.cjs → index-Do8zI4DM.cjs} +1 -1
- package/dist/{index-7w9QLGZ8.cjs → index-DrWIUUZK.cjs} +1 -1
- package/dist/index-G_cKl_J4.js +2379 -0
- package/dist/{index-CkJaR30x.js → index-NlkdTb--.js} +4 -4
- package/dist/{index-CuYt_7-p.js → index-ThNNBX7h.js} +1 -1
- package/dist/{index-DzuOO-jn.js → index-XXKsLOYd.js} +2 -2
- package/dist/{index-_7Qm6usF.cjs → index-dwX_BHyo.cjs} +1 -1
- package/dist/{index-D-ygp57X.cjs → index-eH9RMVXv.cjs} +1 -1
- package/dist/index-pmcRbjPd.cjs +1 -0
- package/dist/{index-B5KCSN4c.cjs → index-tttYIzsn.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bhj73Dii.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DAjyk3_9.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DbaX17jD.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-De0avjy5.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-B0Slk6gv.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DhMDLOg8.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_980cb04a_lang-BmYxcD8z.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CEcxaThh.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_980cb04a_lang-DGpKXuuO.cjs → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DLuOs1IZ.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-8MlG6f_5.js → index.vue_vue_type_style_index_1_lang-B0l6QIWy.js} +531 -536
- package/dist/{index.vue_vue_type_style_index_1_lang-BMAOkg3Y.cjs → index.vue_vue_type_style_index_1_lang-CC1o5rIu.cjs} +8 -8
- package/dist/{index.vue_vue_type_style_index_1_lang-C5-R1ghT.cjs → index.vue_vue_type_style_index_1_lang-Chzrrthw.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-QVwLsuO7.js → index.vue_vue_type_style_index_1_lang-DzZEPkuk.js} +5 -5
- package/dist/{isString-D6Z6SOrb.cjs → isString-CELwppr9.cjs} +1 -1
- package/dist/{isString-DOZgMp8l.js → isString-DvY0kl3S.js} +1 -1
- package/dist/{main-BCD-Orm3.js → main-DQXqHTYg.js} +5 -5
- package/dist/{main-DUUTokjq.cjs → main-yiUkyrA7.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +12 -12
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-DWfIRtBe.js → threeModel-BiWZCOOI.js} +5 -5
- package/dist/{threeModel-D-cNRyXR.cjs → threeModel-Cva5i9Dy.cjs} +1 -1
- package/dist/{threePreview-CB4s2usq.cjs → threePreview-BNvDY6xx.cjs} +1 -1
- package/dist/{threePreview-BelyhkDx.js → threePreview-CjFKHY3_.js} +4 -4
- package/dist/{threeSceneView-9pPPVjCA.cjs → threeSceneView-DM8uof_D.cjs} +1 -1
- package/dist/{threeSceneView-C66YfUi3.js → threeSceneView-DPTQ_xR-.js} +11 -11
- package/dist/{threeSceneViewForCPMPIP-WBguXbnU.js → threeSceneViewForCPMPIP-Bqb44i-c.js} +50 -50
- package/dist/{threeSceneViewForCPMPIP-DLVSylJ7.cjs → threeSceneViewForCPMPIP-D5jl1r-h.cjs} +1 -1
- package/dist/{threeTrackPathView-DxO-9BKu.js → threeTrackPathView-BvxoafSz.js} +6 -6
- package/dist/{threeTrackPathView-C4c7FI2n.cjs → threeTrackPathView-DgnuPrBe.cjs} +1 -1
- package/dist/{threeViewerHost-CNs819Rf.js → threeViewerHost-CKmZPGir.js} +4 -4
- package/dist/{threeViewerHost-Ihdu1cjR.cjs → threeViewerHost-D80V4Cfh.cjs} +1 -1
- package/dist/{urdfTree-CLhAUUAD.js → urdfTree-BxuavyNQ.js} +1 -1
- package/dist/{urdfTree-Di3A1LA8.cjs → urdfTree-wR2vnG4s.cjs} +1 -1
- package/dist/{workpieceTreePanel-CzDrMcRN.cjs → workpieceTreePanel-C2BXrv3k.cjs} +1 -1
- package/dist/{workpieceTreePanel--iaoqT8x.js → workpieceTreePanel-CSKzSdIt.js} +5 -5
- package/package.json +1 -1
- package/public/icons/svg/LowCodeEvent.svg +1 -1
- package/public/icons/svg/LowCodeExtend.svg +1 -1
- package/public/icons/svg/LowCodeSetting.svg +1 -1
- package/public/icons/svg/LowCodeStyle.svg +1 -1
- package/dist/array-Ct7vOLI-.cjs +0 -11
- package/dist/array-W5079asF.js +0 -691
- package/dist/index-4WD9Ho5n.js +0 -2933
- package/dist/index-BA9JRDoC.cjs +0 -1
- package/dist/index-BVaHwt5f.cjs +0 -1
- package/dist/index-CFI3jKGA.js +0 -2671
- package/dist/index-CO41Br9G.cjs +0 -1
- package/dist/index-CTq3U1p_.cjs +0 -1
- package/dist/index-CvZk_MDD.cjs +0 -15
- package/dist/index-Db9w-sM_.cjs +0 -1
- package/dist/index-DitsEkB9.js +0 -673
- package/dist/index-DooNp_Nd.js +0 -12047
- package/dist/index-JAuJmfCC.cjs +0 -1
- package/dist/index-rlStojTL.js +0 -52
package/dist/index-CTq3U1p_.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const ua=require("./index-JAuJmfCC.cjs"),e=require("vue"),p=require("./index-DEBf-IBT.cjs"),St=require("./index-CvZk_MDD.cjs"),Be=require("./index.vue_vue_type_style_index_1_lang-BMAOkg3Y.cjs"),Gt=require("./index-Db9w-sM_.cjs"),Bo=require("./threeViewerHost-Ihdu1cjR.cjs"),pa=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DAjyk3_9.cjs"),Rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString-D6Z6SOrb.cjs"),No=require("./index-DyA4ALuY.cjs"),bl=require("./index-BVaHwt5f.cjs"),Or=require("./index-CfrqPhLf.cjs");var Mr=/\s/;function zr(a){for(var c=a.length;c--&&Mr.test(a.charAt(c)););return c}var Rr=/^\s+/;function Pr(a){return a&&a.slice(0,zr(a)+1).replace(Rr,"")}var Vo=NaN,Fr=/^[-+]0x[0-9a-f]+$/i,Lr=/^0b[01]+$/i,$r=/^0o[0-7]+$/i,jr=parseInt;function Oo(a){if(typeof a=="number")return a;if(p.isSymbol(a))return Vo;if(p.isObject(a)){var c=typeof a.valueOf=="function"?a.valueOf():a;a=p.isObject(c)?c+"":c}if(typeof a!="string")return a===0?a:+a;a=Pr(a);var i=Lr.test(a);return i||$r.test(a)?jr(a.slice(2),i?2:8):Fr.test(a)?Vo:+a}var no=function(){return p.root.Date.now()},Kr="Expected a function",Ur=Math.max,Wr=Math.min;function fo(a,c,i){var l,s,d,w,g,h,D=0,A=!1,I=!1,F=!0;if(typeof a!="function")throw new TypeError(Kr);c=Oo(c)||0,p.isObject(i)&&(A=!!i.leading,I="maxWait"in i,d=I?Ur(Oo(i.maxWait)||0,c):d,F="trailing"in i?!!i.trailing:F);function M(V){var S=l,re=s;return l=s=void 0,D=V,w=a.apply(re,S),w}function W(V){return D=V,g=setTimeout(K,c),A?M(V):w}function De(V){var S=V-h,re=V-D,Le=c-S;return I?Wr(Le,d-re):Le}function J(V){var S=V-h,re=V-D;return h===void 0||S>=c||S<0||I&&re>=d}function K(){var V=no();if(J(V))return ce(V);g=setTimeout(K,De(V))}function ce(V){return g=void 0,F&&l?M(V):(l=s=void 0,w)}function C(){g!==void 0&&clearTimeout(g),D=0,l=h=s=g=void 0}function P(){return g===void 0?w:ce(no())}function b(){var V=no(),S=J(V);if(l=arguments,s=this,h=V,S){if(g===void 0)return W(h);if(I)return clearTimeout(g),g=setTimeout(K,c),M(h)}return g===void 0&&(g=setTimeout(K,c)),w}return b.cancel=C,b.flush=P,b}var Hr="[object Boolean]";function kl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Hr}function xl(a){return a===void 0}const qr={class:"form-content"},Xr={title:"选择标签"},Gr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Yr={class:"col-operate-wrap"},Jr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Zr={__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:c}){const i=()=>{w.value=!1,g.value=!1,h.value=[]},l=a;e.computed(()=>{var U;const m=(U=Ue.value)==null?void 0:U.split("/");return(m==null?void 0:m.some(j=>(j==null?void 0:j.includes("updateLoading"))||(j==null?void 0:j.includes("loading"))))?!1:Ve.value==="view"});const s=c,d=e.ref([]),w=e.ref(!1),g=e.ref(!1),h=e.ref([]);Bo.useThreeSystem();const D=e.ref(),A=e.ref(!1),I=e.ref(!1),F=e.ref([]),M=e.ref(),W=e.ref(!1),De=e.ref([]),J=ua.useFormToTableComp(p.pinia),K=ua.useFormComp(p.pinia),ce=e.ref(!1),C=e.ref(),P=p.useLoginState(p.pinia),{loginUserInfo:b}=p.storeToRefs(P),V=e.ref(),S=e.ref(!0),re=Be.useModelComp(p.pinia),{tableViewContents:Le,itemData:lt,isEdit:Ve,routeToChildPath:We,lockingPage:be}=p.storeToRefs(re),B=e.ref(null),ae=e.ref(!1),te=e.ref(!1),de=Be.useMenuState(),{activeMenuPath:Ue}=p.storeToRefs(de),ut=Be.useOriginalState(p.pinia),{originalPath:Ne}=p.storeToRefs(ut),E=e.ref([]),_e=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ie=async m=>{te.value=m,await Qe("disabled",null,m,!0)},Fe=async m=>{await Qe("operable",null,m,!0)};e.watch(()=>Ue.value,async()=>{d.value=[],h.value=[]},{deep:!0,immediate:!0});const $e=()=>{e.nextTick(()=>{G()})},xe=m=>{var T;d.value=(T=d.value)==null?void 0:T.map(U=>({...U,isFormColHidden:!(m!=null&&m.includes(U.label))}))};e.onUnmounted(()=>{B.value=null});const je=m=>{s("clickTrigger",m)},pt=async m=>{var T,U,j,H,Z,X;if(m===""){let Y="";(T=d.value)==null||T.forEach($=>{$!=null&&$.isMain&&(Y=$==null?void 0:$.value)});let fe=await Be.getItemData(We.value,sessionStorage.getItem("systemKey"),"");Y=((X=(Z=(H=(j=(U=fe==null?void 0:fe[0])==null?void 0:U.compData)==null?void 0:j.find($=>($==null?void 0:$.key)==="mainRouters"))==null?void 0:H.contents)==null?void 0:Z[0])==null?void 0:X.routerContent)+Ne.value+Y;let se=await Be.getItemData(Y,sessionStorage.getItem("systemKey"),"");W.value=!0,De.value=se==null?void 0:se.filter($=>($==null?void 0:$.comp)!=="methodButton"),s("routeUrl",De.value)}},G=()=>{var T;const m=(T=B.value)==null?void 0:T.$el;m&&pa.Sortable.create(m,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:U=>{const{oldIndex:j,newIndex:H}=U;if(j===H)return;const Z=d.value.splice(j,1)[0];d.value.splice(H,0,Z)}})},Qe=async(m,T,U,j=!1)=>{var H,Z,X,Y,fe,q,se,$;try{re.setRefreshCurStructure(!1);const Ae=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((H=Ae==null?void 0:Ae.data)==null?void 0:H.code)===200){let Se=(fe=(Y=(X=(Z=Ae==null?void 0:Ae.data)==null?void 0:Z.result)==null?void 0:X[0])==null?void 0:Y.value)==null?void 0:fe.pageData;j?Se={...Se,compData:(se=Se==null?void 0:Se.compData)==null?void 0:se.map(z=>{var pe;return(z==null?void 0:z.key)==="formContent"?{...z,contents:(pe=z==null?void 0:z.contents)==null?void 0:pe.map(ve=>({...ve,[m]:U}))}:z})}:Se={...Se,compData:(q=Se==null?void 0:Se.compData)==null?void 0:q.map(z=>{var pe;return(z==null?void 0:z.key)==="formContent"?{...z,contents:(pe=z==null?void 0:z.contents)==null?void 0:pe.map(ve=>(ve==null?void 0:ve.prop)===(T==null?void 0:T.prop)?{...ve,[m]:U}:ve)}:z})};const ke=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:Se}});(($=ke==null?void 0:ke.data)==null?void 0:$.code)===200?(p.ElMessage.success("编辑成功"),re.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},ft=async(m,T)=>{await Qe("label",T,m)},tt=async(m,T)=>{m&&await Qe("type",T,m)},ee=async(m,T,U)=>{await Qe(T,U,m,!1)},oe=(m,T)=>{V.value===T?S.value=!1:S.value=!0,V.value=T==null?void 0:T.changeProp},we=async m=>{var U,j,H,Z,X,Y,fe,q,se,$,Ae,Se,ke,z,pe;let T=[];if((U=m==null?void 0:m.toString())!=null&&U.includes(".urdf")){if(m.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[m],g.value=!0,w.value=!0;return}if((j=m==null?void 0:m.toString())!=null&&j.includes(".stl")||(H=m==null?void 0:m.toString())!=null&&H.includes(".STL")||(Z=m==null?void 0:m.toString())!=null&&Z.includes(".obj")||(X=m==null?void 0:m.toString())!=null&&X.includes(".mtl")){h.value=(Y=m==null?void 0:m.toString())==null?void 0:Y.split(","),g.value=!1,w.value=!0;return}if((fe=m==null?void 0:m.toString())!=null&&fe.includes(".stl")||(q=m==null?void 0:m.toString())!=null&&q.includes(".STL")||(se=m==null?void 0:m.toString())!=null&&se.includes(".obj")||($=m==null?void 0:m.toString())!=null&&$.includes(".mtl")){let ve,ge=[],Me={};if(Array.isArray(m)?ve=m:ve=m==null?void 0:m.split(","),ve==null||ve.forEach(Ze=>{Ze.includes(".mtl")?ge.push(Ze):Me.blob=Me.blob?Me.blob+","+Ze:Ze}),(ge==null?void 0:ge.length)>0&&(Me.mtlBlobs=ge),(Se=(Ae=Object.values(Me))==null?void 0:Ae[0])!=null&&Se.includes("http:"))T.push(Me);else{const Ze=new Blob([Me.blob],{type:"application/octet-stream;charset=UTF-8"});let Ce=URL.createObjectURL(Ze),Re="";(ke=m==null?void 0:m.split("/"))==null||ke.forEach((Te,it)=>{var me;it===((me=m==null?void 0:m.split("/"))==null?void 0:me.length)-1&&(Re=Te)}),(z=Me.blob)!=null&&z.includes(".stl")&&(Re=(Re==null?void 0:Re.replaceAll(">",""))+".urdf"),M.value=[{name:Re,blobUrl:Ce}],I.value=!0}}else{const ve=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ge=await p.axios.get(m,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ve.close()}),Me=new Blob([ge.data],{type:"application/octet-stream;charset=UTF-8"});let Ze=URL.createObjectURL(Me),Ce="";(pe=m==null?void 0:m.split("/"))==null||pe.forEach((Re,Te)=>{var it;Te===((it=m==null?void 0:m.split("/"))==null?void 0:it.length)-1&&(Ce=Re)}),M.value=[{name:Ce,blobUrl:Ze}],I.value=!0}(T==null?void 0:T.length)>0&&K.setBlobUrls(T)},he=()=>{I.value=!1},Je=m=>{var Z,X,Y,fe;const T=(X=(Z=p.cloneDeep(l.itemData))==null?void 0:Z.find(q=>(q==null?void 0:q.key)==="formContent"))==null?void 0:X.contents,U=p.cloneDeep(m.content);let j={};U&&((Y=Object.values(U))==null?void 0:Y.length)>0&&((fe=Object.values(U))==null||fe.forEach((q,se)=>{j[T[se].key]=q}));const H={content:j,index:l==null?void 0:l.index,buttonName:m==null?void 0:m.buttonName};s("change",H)},et=e.computed(()=>"http://222.92.178.198:62001"),k=async m=>{var Ae,Se,ke,z,pe,ve,ge,Me,Ze,Ce,Re,Te,it,me,ue,He;if(!m)return;(Se=(Ae=l==null?void 0:l.itemData)==null?void 0:Ae.find(le=>(le==null?void 0:le.key)==="parentFormPath"))==null||Se.contents;let T=Le.value;(T==null?void 0:T.length)>0&&(T=T==null?void 0:T.map(le=>{var ze,qe,O,Ee;let Ie=(ze=le==null?void 0:le.key)==null?void 0:ze.split("/");return(l==null?void 0:l.compName)===(Ie==null?void 0:Ie[0])&&(qe=d.value)!=null&&qe.find(ct=>(ct==null?void 0:ct.prop)===(Ie==null?void 0:Ie[1]))&&(le.value=(Ee=(O=d.value)==null?void 0:O.find(ct=>(ct==null?void 0:ct.prop)===(Ie==null?void 0:Ie[1])))==null?void 0:Ee.value),le}),re.setTableViewContents(T));const U=p.cloneDeep(l.itemData);let j=U==null?void 0:U.map(le=>{var Ie;return(le==null?void 0:le.key)==="formContent"&&((Ie=le.contents)==null||Ie.map((ze,qe)=>{var O,Ee,ct,nt,dt,rt,Oe,Xe,Ye,at,vt,Tt,It,wt,Dt,Nt,Bt,Ut,Pt;return ze.type=(Ee=(O=d.value)==null?void 0:O.find(At=>(At==null?void 0:At.prop)===(ze==null?void 0:ze.prop)))==null?void 0:Ee.type,ze.options=ze!=null&&ze.options?ze.options:((dt=(nt=(ct=ze==null?void 0:ze.key)==null?void 0:ct.split("$"))==null?void 0:nt[1])==null?void 0:dt.length)>0?(Ye=(Xe=ua.formGetOptions((Oe=(rt=ze==null?void 0:ze.key)==null?void 0:rt.split("$"))==null?void 0:Oe[1]))==null?void 0:Xe.split(","))==null?void 0:Ye.map(At=>({label:At,value:At})):[],(at=ze==null?void 0:ze.key)!=null&&at.includes("$")&&(ze.key=(Tt=(vt=ze==null?void 0:ze.key)==null?void 0:vt.split("$"))==null?void 0:Tt[0]),ze.signature=(wt=(It=d.value)==null?void 0:It.find(At=>(At==null?void 0:At.prop)===(ze==null?void 0:ze.prop)))==null?void 0:wt.signature,ze.isLoginUser=(Nt=(Dt=d.value)==null?void 0:Dt.find(At=>(At==null?void 0:At.prop)===(ze==null?void 0:ze.prop)))==null?void 0:Nt.isLoginUser,ze.value=(Bt=Object.values(m))==null?void 0:Bt[qe],ze.isFormColHidden=(Pt=(Ut=d.value)==null?void 0:Ut.find(At=>(At==null?void 0:At.prop)===(ze==null?void 0:ze.prop)))==null?void 0:Pt.isFormColHidden,ze})),le}),H=d.value,Z=(z=(ke=p.cloneDeep(j))==null?void 0:ke.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:z.contents;if(H=H==null?void 0:H.map(le=>{var Ie;return le.value=(Ie=Z==null?void 0:Z.find((ze,qe)=>((ze==null?void 0:ze.id)??qe)===(le==null?void 0:le.id)))==null?void 0:Ie.value,le}),!S.value){s("contentChange",{contents:j,index:l.index});return}let X="",Y=(ge=(ve=(pe=p.cloneDeep(j))==null?void 0:pe.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:ve.contents)==null?void 0:ge.find((le,Ie)=>{var ze,qe,O;return(le==null?void 0:le.label)===V.value||Ie.toString()===((O=(qe=(ze=V.value)==null?void 0:ze.split("t"))==null?void 0:qe[1])==null?void 0:O.toString())}),fe=(Me=Y==null?void 0:Y.optionUrl)==null?void 0:Me.menuSelect,q=!0;if((Re=(Ce=(Ze=p.cloneDeep(j))==null?void 0:Ze.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:Ce.contents)==null||Re.forEach(le=>{var Ie,ze,qe,O,Ee,ct;q&&((qe=(ze=(Ie=le==null?void 0:le.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:ze[1])!=null&&qe.includes("["))&&(X=(Ee=(O=le==null?void 0:le.optionUrl)==null?void 0:O.groupSelect)==null?void 0:Ee[1],JSON.stringify(fe)===JSON.stringify((ct=le==null?void 0:le.optionUrl)==null?void 0:ct.menuSelect)&&(q=!1))}),(Te=Y==null?void 0:Y.optionUrl)!=null&&Te.menuSelect&&S.value){let le=await ua.getSelectRow(Y),Ie,ze=(it=Y==null?void 0:Y.optionUrl)==null?void 0:it.menuSelect;if(le==null||le.forEach(qe=>{var O,Ee,ct,nt,dt,rt,Oe,Xe,Ye,at;X===((Ee=(O=Y==null?void 0:Y.optionUrl)==null?void 0:O.groupSelect)==null?void 0:Ee[1])&&((dt=(nt=(ct=Y==null?void 0:Y.optionUrl)==null?void 0:ct.groupSelect)==null?void 0:nt[1])!=null&&dt.includes("["))&&((at=p.cloneDeep(qe))==null?void 0:at[(Ye=(Xe=(Oe=(rt=Y==null?void 0:Y.optionUrl)==null?void 0:rt.groupSelect)==null?void 0:Oe[1])==null?void 0:Xe.replaceAll("[",""))==null?void 0:Ye.replaceAll("]","")])===(Y==null?void 0:Y.value)&&(Ie=qe)}),Ie){let qe=p.cloneDeep(H);qe=qe==null?void 0:qe.map(Ee=>{var ct,nt,dt,rt,Oe,Xe,Ye,at,vt,Tt,It;return(Ie!=null&&Ie[Ee==null?void 0:Ee.label]||Ie!=null&&Ie[(rt=(dt=(nt=(ct=Ee==null?void 0:Ee.optionUrl)==null?void 0:ct.groupSelect)==null?void 0:nt[1])==null?void 0:dt.replaceAll("[",""))==null?void 0:rt.replaceAll("]","")])&&((Ye=(Xe=(Oe=Ee==null?void 0:Ee.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:Xe[1])!=null&&Ye.includes("["))&&ze!=null&&ze.every(wt=>{var Dt,Nt;return(Nt=(Dt=Ee==null?void 0:Ee.optionUrl)==null?void 0:Dt.menuSelect)==null?void 0:Nt.includes(wt)})&&(Ee.value=(Ie==null?void 0:Ie[Ee==null?void 0:Ee.label])||(Ie==null?void 0:Ie[(It=(Tt=(vt=(at=Ee==null?void 0:Ee.optionUrl)==null?void 0:at.groupSelect)==null?void 0:vt[1])==null?void 0:Tt.replaceAll("[",""))==null?void 0:It.replaceAll("]","")]),Array.isArray(Ee.value)&&Ee.value.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(Ee.type="Upload")),Ee}),qe=qe==null?void 0:qe.map(Ee=>{var ct,nt,dt;return(ct=Ee==null?void 0:Ee.optionUrl)!=null&&ct.oldMenuSelect&&(Ee.optionUrl.menuSelect=(dt=(nt=p.cloneDeep(Ee))==null?void 0:nt.optionUrl)==null?void 0:dt.oldMenuSelect),Ee}),d.value=p.cloneDeep(qe);let O=p.cloneDeep(qe);O=O==null?void 0:O.map(Ee=>{var ct,nt,dt,rt,Oe,Xe;return(nt=(ct=Ee==null?void 0:Ee.optionUrl)==null?void 0:ct.menuSelect)!=null&&nt.some(Ye=>Ye==null?void 0:Ye.includes("["))&&(Ee.optionUrl.oldMenuSelect=(rt=(dt=p.cloneDeep(Ee))==null?void 0:dt.optionUrl)==null?void 0:rt.menuSelect,Ee.optionUrl.menuSelect=(Xe=(Oe=Ee==null?void 0:Ee.optionUrl)==null?void 0:Oe.menuSelect)==null?void 0:Xe.map(Ye=>{var at,vt,Tt,It;if(Ye!=null&&Ye.includes("[")){let wt=(vt=(at=Ye==null?void 0:Ye.replaceAll("[","").replaceAll("]",""))==null?void 0:at.split(":"))==null?void 0:vt[1];Ye=(It=(Tt=p.cloneDeep(qe))==null?void 0:Tt.find(Dt=>(Dt==null?void 0:Dt.label)===wt))==null?void 0:It.value}return Ye})),Ee}),d.value=O}else d.value=H;j=j==null?void 0:j.map(qe=>{var O;return(qe==null?void 0:qe.key)==="formContent"&&(qe.contents=(O=qe.contents)==null?void 0:O.map(Ee=>{var ct,nt,dt,rt;return Ee.value=((nt=(ct=d.value)==null?void 0:ct.find(Oe=>(Oe==null?void 0:Oe.label)===(Ee==null?void 0:Ee.key)))==null?void 0:nt.value)??(Ee==null?void 0:Ee.value),Ee.type=((rt=(dt=d.value)==null?void 0:dt.find(Oe=>(Oe==null?void 0:Oe.prop)===(Ee==null?void 0:Ee.key)))==null?void 0:rt.type)??(Ee==null?void 0:Ee.type),Ee})),qe})}S.value=!1,s("contentChange",{contents:j,index:l.index});let se=[],$=[];if((ue=p.cloneDeep((me=j==null?void 0:j.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:me.contents))==null||ue.forEach(le=>{var Ie;Array.isArray(le==null?void 0:le.value)&&((Ie=le==null?void 0:le.value)!=null&&Ie.find(ze=>{var qe;return(qe=ze==null?void 0:ze.url)==null?void 0:qe.includes(".obj")}))&&($=le==null?void 0:le.value)}),($==null?void 0:$.length)>0){const le=(He=p.cloneDeep($))==null?void 0:He.filter(Ie=>{var ze;return(ze=Ie==null?void 0:Ie.url)==null?void 0:ze.includes(".obj")});le==null||le.forEach(Ie=>{var qe,O,Ee,ct;const ze=(qe=$==null?void 0:$.filter(nt=>{var dt;return(nt==null?void 0:nt.name)===(Ie==null?void 0:Ie.name)&&((dt=nt==null?void 0:nt.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:qe.map(nt=>nt==null?void 0:nt.url);se.push({objUrl:Ie==null?void 0:Ie.url,mtlUrls:((O=$==null?void 0:$.filter(nt=>{var dt;return(nt==null?void 0:nt.name)===(Ie==null?void 0:Ie.name)&&((dt=nt==null?void 0:nt.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:O.length)===1?(ct=(Ee=$==null?void 0:$.filter(nt=>{var dt;return(nt==null?void 0:nt.name)===(Ie==null?void 0:Ie.name)&&((dt=nt==null?void 0:nt.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:Ee[0])==null?void 0:ct.url:ze})}),K.setObjUrl(se)}},x=m=>{if(!m)return;const T=[];let U="";for(let j of m)(j.includes("[")||U.includes("["))&&(U+=j.trim(),p.cloneDeep(U).split("【").length-1===p.cloneDeep(U).split("】").length-1&&p.cloneDeep(U).split("[").length-1===p.cloneDeep(U).split("]").length-1&&(T.push(U.replace(/\/\*[\s\S]*?\*\//g,"")),U=""));return T},R=(m,T,U)=>{let j="";const H=T==null?void 0:T.map(Z=>{var X;return(X=Z==null?void 0:Z.value)==null?void 0:X.pageData});return H==null||H.forEach(Z=>{var X;(Z==null?void 0:Z.name)===(m==null?void 0:m[0])&&((X=Z==null?void 0:Z.compData)==null||X.forEach(Y=>{var fe;(Y==null?void 0:Y.key)==="formContent"&&((fe=Y==null?void 0:Y.contents)==null||fe.forEach(q=>{var se;(q==null?void 0:q.prop)===(m==null?void 0:m[1])&&(j=(q==null?void 0:q.value)===""?Be.judgeContents((se=p.cloneDeep(q))==null?void 0:se.optionUrl,U):q==null?void 0:q.value)}))}))}),j},ne=(m,T,U,j)=>{var Y,fe;let H="",Z="";(Y=p.cloneDeep(T))==null||Y.forEach((q,se)=>{q!=null&&q.includes("[")?Z=Z+Ne.value+m[se]:Z=Z===""?Z+q:Z+"/"+q});let X=(fe=j[Z])==null?void 0:fe.map(q=>{var se;return(se=q==null?void 0:q.value)==null?void 0:se.pageData});return X==null||X.forEach(q=>{var se;(q==null?void 0:q.name)===(U==null?void 0:U[0])&&((se=q==null?void 0:q.compData)==null||se.forEach($=>{var Ae;($==null?void 0:$.key)==="formContent"&&((Ae=$==null?void 0:$.contents)==null||Ae.forEach(Se=>{(Se==null?void 0:Se.prop)===(U==null?void 0:U[1])&&(H=Se==null?void 0:Se.value)}))}))}),H};return e.watch(()=>l.itemData,async()=>{var X,Y,fe,q,se,$,Ae,Se,ke,z,pe,ve,ge,Me,Ze,Ce,Re,Te,it;const m=(X=l.itemData)==null?void 0:X.find(me=>(me==null?void 0:me.key)==="formContent"),T=(Y=p.cloneDeep(l.itemData))==null?void 0:Y.find(me=>(me==null?void 0:me.key)==="formButton"),U=(fe=p.cloneDeep(l.itemData))==null?void 0:fe.find(me=>(me==null?void 0:me.key)==="formFlex"),j=(q=p.cloneDeep(l.itemData))==null?void 0:q.find(me=>(me==null?void 0:me.key)==="formWrap"),H=(se=p.cloneDeep(l.itemData))==null?void 0:se.find(me=>(me==null?void 0:me.key)==="enableWrap");if((j==null?void 0:j.contents)==="纵向"?A.value=!1:A.value=!0,ce.value=(H==null?void 0:H.contents)===void 0?!1:H==null?void 0:H.contents,C.value=typeof(U==null?void 0:U.contents)!="boolean"?!(!(U!=null&&U.contents)===""||(($=U==null?void 0:U.contents)==null?void 0:$.toUpperCase())==="VERTICAL"):U==null?void 0:U.contents,((Ae=m==null?void 0:m.contents)==null?void 0:Ae.length)>0&&Array.isArray(m==null?void 0:m.contents)){let me=l.allMapContents;const ue=(ke=(Se=p.cloneDeep(m))==null?void 0:Se.contents)==null?void 0:ke.map((O,Ee)=>{var wt,Dt,Nt,Bt,Ut,Pt,At,qt,bn,pn,kn,Tn,dn,In,fn,Bn,hn,qn,Xn,Gn,Kn,An,vn,Rn,Nn,an,xn;let ct=(O==null?void 0:O.label)??(O==null?void 0:O.key)??"",nt=(O==null?void 0:O.type)??"",dt=(O==null?void 0:O.options)??[];if((wt=O==null?void 0:O.key)!=null&&wt.includes("$")&&(ct=(Dt=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Dt[0],((Bt=(Nt=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Nt[1])==null?void 0:Bt.length)>0)){const[bt,Yt]=(Pt=(Ut=p.cloneDeep(O==null?void 0:O.key).split("$"))==null?void 0:Ut[1])==null?void 0:Pt.split(/[()]/);nt=((At=Be.FormType.find(gt=>(gt==null?void 0:gt.key)===bt))==null?void 0:At.value)??"",((qt=Yt==null?void 0:Yt.split(","))==null?void 0:qt.length)>0&&(dt=(bn=Yt==null?void 0:Yt.split(","))==null?void 0:bn.map(gt=>({label:gt,value:gt})))}let rt=[];O!=null&&O.contents&&!Array.isArray(O==null?void 0:O.contents)&&(rt=(kn=(pn=O==null?void 0:O.contents)==null?void 0:pn.split(","))==null?void 0:kn.map(bt=>({label:bt,value:bt}))),((Tn=O==null?void 0:O.optionUrl)==null?void 0:Tn.selectRelateType)==="自定义绑定"&&(rt=(In=(dn=O==null?void 0:O.optionUrl)==null?void 0:dn.defaultSelect)==null?void 0:In.map(bt=>({label:bt,value:bt})));let Oe=!1,Xe=(O==null?void 0:O.isFormColHidden)??!1,Ye=Be.judgeContents((fn=p.cloneDeep(O))==null?void 0:fn.optionUrl,me),at=Ye!==void 0&&Ye!==""?Ye:O!=null&&O.originalContent&&(O==null?void 0:O.originalContent)!==""?O.originalContent:O!=null&&O.value?O.value:(dt==null?void 0:dt.length)>0?(Bn=dt==null?void 0:dt[0])==null?void 0:Bn.value:(O==null?void 0:O.value)??"",vt=!1,Tt=Ye!==void 0||nt===""?"Input":nt;if((Array.isArray(Ye)&&(Ye!=null&&Ye.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url)))||Array.isArray(at)&&(at!=null&&at.every(bt=>(bt==null?void 0:bt.name)&&(bt==null?void 0:bt.url))))&&(Tt="upload"),typeof at=="string"&&(at!=null&&at.includes("loginUser"))&&!(at!=null&&at.includes("loginUserSign"))||O!=null&&O.isLoginUser)Oe=!0,at=((hn=b.value)==null?void 0:hn.姓名)||((qn=b.value)==null?void 0:qn.account)||((Xn=b.value)==null?void 0:Xn.账号)||((Gn=b.value)==null?void 0:Gn.userName);else if(typeof at=="string"&&(at!=null&&at.includes("loginUserSign"))||O!=null&&O.signature||O!=null&&O.isShow)if(vt=!0,(O==null?void 0:O.isShow)==="originalSignature")Tt="image",at=et.value+"/"+((Kn=b.value)==null?void 0:Kn.signature);else{let bt=[...new Set(x(O.isShow))].map(Vt=>{var Vn,on,On,Zt;return{key:(Zt=(On=(on=(Vn=Vt==null?void 0:Vt.split("["))==null?void 0:Vn[1])==null?void 0:on.split("]"))==null?void 0:On[0])==null?void 0:Zt.split(":"),value:""}});(An=lt.value)==null||An.forEach(Vt=>{bt==null||bt.forEach((gn,Vn)=>{var On;let on=gn==null?void 0:gn.key;(Vt==null?void 0:Vt.name)===(on==null?void 0:on[0].replaceAll("'",""))&&((On=Vt==null?void 0:Vt.compData)==null||On.forEach(Zt=>{var Un;(Zt==null?void 0:Zt.key)==="formContent"&&((Un=Zt==null?void 0:Zt.contents)==null||Un.forEach(wn=>{(wn==null?void 0:wn.prop)===(on==null?void 0:on[1].replaceAll("'",""))&&(bt[Vn].value=wn==null?void 0:wn.value)}))}))})});let Yt=bt==null?void 0:bt.map(Vt=>{var gn;return Vt.key="["+((gn=Vt.key)==null?void 0:gn.join(":"))+"]",Vt}),gt=O==null?void 0:O.isShow;Yt==null||Yt.forEach(Vt=>{Vt!=null&&Vt.value?gt=gt.replaceAll(Vt==null?void 0:Vt.key,"'"+(Vt==null?void 0:Vt.value)+"'"):gt=gt.replaceAll(Vt==null?void 0:Vt.key,"undefined")}),gt!=null&>.includes("(")||(gt!=null&>.includes("==")?gt=((vn=gt==null?void 0:gt.split("==="))==null?void 0:vn[0])+"==='"+((Rn=gt==null?void 0:gt.split("==="))==null?void 0:Rn[1])+"'":gt=((Nn=gt==null?void 0:gt.split("="))==null?void 0:Nn[0])+"='"+((an=gt==null?void 0:gt.split("="))==null?void 0:an[1])+"'"),gt!=null&>.includes("=")&&!(gt!=null&>.includes("=="))&&!(gt!=null&>.includes("==="))&&(gt=gt==null?void 0:gt.replaceAll("=","==")),new Function(`if (${gt}) { return true } else { return false }`)()?(Xe=!1,Tt="image",at=et.value+"/"+((xn=b.value)==null?void 0:xn.signature)):at=""}return Array.isArray(at)&&at.every(bt=>(bt==null?void 0:bt.url)&&(bt==null?void 0:bt.name))&&(O.type="Upload"),O!=null&&O.isMainUrl&&(Tt="Url"),{label:ct??"",name:"t"+Ee,prop:p.cloneDeep(O==null?void 0:O.key),type:Tt,value:O!=null&&O.isNewDate&&at===""?new Date:at,id:(O==null?void 0:O.id)??Ee,contents:(rt==null?void 0:rt.length)>0?rt:dt??[],width:(O==null?void 0:O.width)??1,isLoginUser:Oe,config:O==null?void 0:O.config,optionUrl:(O==null?void 0:O.optionUrl)??O,isFormColHidden:Xe,signature:vt,isMain:O==null?void 0:O.isMain,isMainUrl:O==null?void 0:O.isMainUrl,operable:(O==null?void 0:O.operable)??!1,disabled:(O==null?void 0:O.disabled)??!1}}),He=ue==null?void 0:ue.map(O=>O==null?void 0:O.value);let le="";He==null||He.forEach(O=>{O!==""&&O!==void 0&&(le=le===""?O:le+"/"+O)}),J.setSelectArray(He),J.setSelectString(le);let Ie=(z=p.cloneDeep(ue))==null?void 0:z.map(O=>(O!=null&&O.value&&Be.IsJson(O==null?void 0:O.value)&&Array.isArray(JSON.parse(O==null?void 0:O.value))&&(O.value=JSON.parse(O.value)),O));Ie=Ie==null?void 0:Ie.map(O=>{var Ee,ct,nt,dt,rt,Oe,Xe,Ye;if((ct=(Ee=O==null?void 0:O.optionUrl)==null?void 0:Ee.menuSelect)!=null&&ct.some(at=>at==null?void 0:at.includes("["))){let at="";O.optionUrl.oldMenuSelect=(dt=(nt=p.cloneDeep(O))==null?void 0:nt.optionUrl)==null?void 0:dt.menuSelect,O.optionUrl.menuSelect=(Oe=(rt=O==null?void 0:O.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:Oe.map(vt=>{var Tt,It,wt,Dt,Nt,Bt;if(vt!=null&&vt.includes("[")){let Ut=(It=(Tt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:Tt.split(":"))==null?void 0:It[1];at=R((wt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:wt.split(":"),me==null?void 0:me[Ue.value],me),vt=((Nt=(Dt=p.cloneDeep(Ie))==null?void 0:Dt.find(Pt=>(Pt==null?void 0:Pt.label)===Ut))==null?void 0:Nt.value)||R((Bt=vt==null?void 0:vt.replaceAll("[","").replaceAll("]",""))==null?void 0:Bt.split(":"),me==null?void 0:me[Ue.value],me)}return vt}),at!==""&&O.value===""&&(O.value=ne(O.optionUrl.menuSelect,O.optionUrl.oldMenuSelect,(Xe=O==null?void 0:O.optionUrl)==null?void 0:Xe.groupSelect,me),Array.isArray(O.value)&&((Ye=O.value)!=null&&Ye.every(vt=>vt==null?void 0:vt.url))&&(O.type="UPLOAD"))}return O}),d.value=Ie,te.value=((pe=d.value)==null?void 0:pe.every(O=>O==null?void 0:O.disabled))||be.value===Ue.value,ae.value=(ve=d.value)==null?void 0:ve.every(O=>O==null?void 0:O.operable),E.value=(ge=d.value)==null?void 0:ge.map(O=>O==null?void 0:O.label);let ze=[],qe=[];if((Me=p.cloneDeep(d.value))==null||Me.forEach(O=>{var Ee;Array.isArray(O==null?void 0:O.value)&&((Ee=O==null?void 0:O.value)!=null&&Ee.find(ct=>{var nt;return(nt=ct==null?void 0:ct.url)==null?void 0:nt.includes(".obj")}))&&(qe=O==null?void 0:O.value)}),(qe==null?void 0:qe.length)>0){const O=(Ze=p.cloneDeep(qe))==null?void 0:Ze.filter(Ee=>{var ct;return(ct=Ee==null?void 0:Ee.url)==null?void 0:ct.includes(".obj")});O==null||O.forEach(Ee=>{var nt,dt,rt,Oe;const ct=(nt=qe==null?void 0:qe.filter(Xe=>{var Ye;return(Xe==null?void 0:Xe.name)===(Ee==null?void 0:Ee.name)&&((Ye=Xe==null?void 0:Xe.url)==null?void 0:Ye.includes(".mtl"))}))==null?void 0:nt.map(Xe=>Xe==null?void 0:Xe.url);ze.push({objUrl:Ee==null?void 0:Ee.url,mtlUrls:((dt=qe==null?void 0:qe.filter(Xe=>{var Ye;return(Xe==null?void 0:Xe.name)===(Ee==null?void 0:Ee.name)&&((Ye=Xe==null?void 0:Xe.url)==null?void 0:Ye.includes(".mtl"))}))==null?void 0:dt.length)===1?(Oe=(rt=qe==null?void 0:qe.filter(Xe=>{var Ye;return(Xe==null?void 0:Xe.name)===(Ee==null?void 0:Ee.name)&&((Ye=Xe==null?void 0:Xe.url)==null?void 0:Ye.includes(".mtl"))}))==null?void 0:rt[0])==null?void 0:Oe.url:ct})}),K.setObjUrl(ze)}(Ce=p.cloneDeep(d.value))==null||Ce.forEach(O=>{var Ee,ct,nt,dt,rt,Oe,Xe,Ye,at,vt,Tt,It,wt;if((ct=(Ee=O==null?void 0:O.value)==null?void 0:Ee.toString())!=null&&ct.includes(".stl")||(dt=(nt=O==null?void 0:O.value)==null?void 0:nt.toString())!=null&&dt.includes(".STL")||(Oe=(rt=O==null?void 0:O.value)==null?void 0:rt.toString())!=null&&Oe.includes(".obj")||(Ye=(Xe=O==null?void 0:O.value)==null?void 0:Xe.toString())!=null&&Ye.includes(".mtl")||(vt=(at=O==null?void 0:O.value)==null?void 0:at.toString())!=null&&vt.includes(".urdf")){let Dt={},Nt=[],Bt;Array.isArray(O==null?void 0:O.value)?Bt=O==null?void 0:O.value:Bt=(Tt=O==null?void 0:O.value)==null?void 0:Tt.split(","),Bt==null||Bt.forEach(Ut=>{Ut.includes(".mtl")?Nt.push(Ut):Dt.blob=Dt.blob==="undefined"?Ut:Dt.blob+","+Ut}),(Nt==null?void 0:Nt.length)>0&&(Dt.mtlBlobs=Nt),(wt=(It=Object.values(Dt))==null?void 0:It[0])!=null&&wt.includes("http:")}})}else d.value=[];let Z=Le.value;if((Z==null?void 0:Z.length)>0&&(Z=Z==null?void 0:Z.map(me=>{var He,le,Ie,ze;let ue=(He=me==null?void 0:me.key)==null?void 0:He.split("/");return(l==null?void 0:l.compName)===(ue==null?void 0:ue[0])&&(le=d.value)!=null&&le.find(qe=>(qe==null?void 0:qe.prop)===(ue==null?void 0:ue[1]))&&(me.value=(ze=(Ie=d.value)==null?void 0:Ie.find(qe=>(qe==null?void 0:qe.prop)===(ue==null?void 0:ue[1])))==null?void 0:ze.value),me}),re.setTableViewContents(Z)),l!=null&&l.formRules)D.value=l==null?void 0:l.formRules;else{let me={};(Re=p.cloneDeep(d).value)==null||Re.forEach(ue=>{(ue==null?void 0:ue.isMain)===!0&&(me[(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)}不能为空`}])}),D.value=me}if(((Te=T==null?void 0:T.contents)==null?void 0:Te.length)>0){const me=[];(it=T==null?void 0:T.contents)==null||it.forEach((ue,He)=>{(ue==null?void 0:ue.label)!==""&&me.push({label:(ue==null?void 0:ue.label)??"",id:(ue==null?void 0:ue.id)??He,type:(ue==null?void 0:ue.type)??"",background:ue==null?void 0:ue.background})}),F.value=me}else F.value=[]},{deep:!0,immediate:!0}),e.watch(()=>be.value,m=>{te.value=m===Ue.value},{immediate:!0}),(m,T)=>{const U=e.resolveComponent("svg-icon"),j=e.resolveComponent("el-switch"),H=e.resolveComponent("el-checkbox"),Z=e.resolveComponent("el-popover"),X=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",qr,[e.createVNode(St.ssForm,{rowContents:d.value,formRules:D.value,buttonValue:F.value,isRowFlex:!1,isEnableWrap:ce.value,onOnButtonClick:Je,onChange:k,formDisabled:te.value,formLabelsOperable:ae.value,isButtonRow:A.value,onPreview:we,onBlurChange:oe,onHandleColEditChange:ft,onHandleColTypeChange:tt,onRouteUrl:pt,onClickTrigger:je},{operateCol:e.withCtx(({renderColumns:Y,formDisabled:fe,formLabelsOperable:q})=>[e.createVNode(Z,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:$e},{reference:e.withCtx(()=>[e.createElementVNode("span",Xr,[e.createVNode(U,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Gr,[T[1]||(T[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(j,{"model-value":fe,"active-text":"禁用","inactive-text":"",onChange:ie,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(j,{"model-value":q,"active-text":"编辑所有标签","inactive-text":"",onChange:Fe},null,8,["model-value"]),T[2]||(T[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(X,{modelValue:E.value,"onUpdate:modelValue":T[0]||(T[0]=se=>E.value=se),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:B,onChange:xe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y,se=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:se.label},[e.createVNode(H,{value:se.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(se.label),1)]),_:2},1032,["value"]),e.createVNode(Z,{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 $;return[e.createElementVNode("div",Yr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(($=Object.keys(se))==null?void 0:$.filter(Ae=>{var Se;return(Se=_e.value)==null?void 0:Se.find(ke=>(ke==null?void 0:ke.value)===Ae)}),Ae=>{var Se,ke;return e.openBlock(),e.createElementBlock("div",{key:Ae},[e.createVNode(St._sfc_main$1,{value:se==null?void 0:se[Ae],"active-text":(ke=(Se=_e.value)==null?void 0:Se.find(z=>(z==null?void 0:z.value)===Ae))==null?void 0:ke.label,inactiveText:"",onChange:z=>ee(z,Ae,se)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Jr,[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"]),I.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:M.value,onDestroy:he},null,8,["fileDataList"])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createBlock(Gt.ssDialog,{key:1,visible:w.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Bo.ThreeViewerHost,{"file-urls":h.value,isThreeScene:g.value,onGetAnimationData:m.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=Rt._export_sfc(Zr,[["__scopeId","data-v-b08c7a6b"]]),Wa=e.ref(0),wl=a=>{var c;return!a||(a==null?void 0:a.length)===0?[]:(c=p.cloneDeep(a))==null?void 0:c.map(l=>(Wa.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)??Wa.value,children:wl(l==null?void 0:l.children)},l))},Qr=a=>{var i;return(i=p.cloneDeep(a))==null?void 0:i.map(l=>(Wa.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)??Wa.value,children:wl(l==null?void 0:l.children)},l))},Dl=(a,c)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===c)?(i=p.cloneDeep(a))==null?void 0:i.filter(s=>(s==null?void 0:s.id)!==c):(a=a==null?void 0:a.map(l=>(l.children=Dl(l==null?void 0:l.children,c),l)),a)},Cl=(a,c)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(c==null?void 0:c.id))?(i=p.cloneDeep(a))==null?void 0:i.map(s=>((s==null?void 0:s.id)===(c==null?void 0:c.id)&&(s=c),s)):(a=a==null?void 0:a.map(l=>(l.children=Cl(l==null?void 0:l.children,c),l)),a)},El=(a,c)=>{var i;return a!=null&&a.find(l=>{var s;return(l==null?void 0:l.id)===((s=c==null?void 0:c.contents)==null?void 0:s.id)})?(i=p.cloneDeep(a))==null?void 0:i.map(s=>{var d;return(s==null?void 0:s.id)===((d=c==null?void 0:c.contents)==null?void 0:d.id)&&(s=c==null?void 0:c.contents),s}):(a=a==null?void 0:a.map(l=>(l.children=El(l==null?void 0:l.children,c),l)),a)},_l=(a,c)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(c==null?void 0:c.id))?(i=p.cloneDeep(a))==null?void 0:i.map(s=>((s==null?void 0:s.id)===(c==null?void 0:c.id)&&(s!=null&&s.children||(s.children=[]),s.children.push(c.contents)),s)):(a=a==null?void 0:a.map(l=>(l.children=_l(l==null?void 0:l.children,c),l)),a)},_t=[{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"}],ei=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ti=[{label:"新增",value:"add"}],Fn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ti},{key:"background",label:"按钮背景色",type:"Color"}],Ln=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ei},{key:"textColor",label:"按钮颜色",type:"Color"}],ni={class:"table-header-child"},ai={class:"table-header-child-main"},oi={class:"table-header-child-content"},li={class:"table-header-child-content-item"},ri={class:"fix-button"},ii={key:0},si={class:"form-content"},ci={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:c}){const i=a,l=c,s=e.ref(!1),d=e.ref(""),w=Be.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(w);e.ref(0);const h=e.ref(""),D=e.ref([]),A=e.ref([]),I=C=>{var b;s.value=!0;let P=[];_t==null||_t.forEach(V=>{let S=p.cloneDeep(g.value)+1;w.setTableIndex(S),P.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:C[V.key],id:g.value,contents:V==null?void 0:V.options})}),C!=null&&C.children&&((b=C==null?void 0:C.children)==null?void 0:b.length)>0&&P.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,D.value=P,A.value=P},F=C=>{l("fixChange",p.cloneDeep(C))},M=C=>{l("deleteChange",p.cloneDeep(C))},W=C=>{s.value=!0;let P=[];_t==null||_t.forEach(b=>{let V=p.cloneDeep(g.value)+1;w.setTableIndex(V),P.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:"",id:g.value,contents:b==null?void 0:b.options})}),d.value=C==null?void 0:C.id,D.value=P,A.value=P},De=C=>{let P=p.cloneDeep(A.value);P=P==null?void 0:P.map(b=>(b.children||(b.value=C==null?void 0:C[b.name]),b)),A.value=P},J=()=>{var P,b;D.value=A.value;let C={};if(h.value!=="")C.id=h.value,(P=D.value)==null||P.forEach(V=>{const S=_t==null?void 0:_t.find(re=>(re==null?void 0:re.label)===(V==null?void 0:V.label));S?C[S.key]=V.value:V!=null&&V.children&&V.children.length>0&&(C.children=V.children)}),s.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"fix"});else{let V=p.cloneDeep(g.value)+1;w.setTableIndex(V),C.id="id"+g.value,(b=D.value)==null||b.forEach(S=>{const re=_t==null?void 0:_t.find(Le=>(Le==null?void 0:Le.label)===(S==null?void 0:S.label));re?C[re.key]=S.value:S!=null&&S.children&&S.children.length>0&&(C.children=S.children)}),s.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"add"})}h.value="",D.value=[],A.value=[]},K=()=>{s.value=!1,h.value="",d.value="",D.value=[],A.value=[]},ce=C=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",C),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(C,P)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(V,S)=>(e.openBlock(),e.createElementBlock("div",ai,[e.createElementVNode("div",oi,[e.createElementVNode("div",li,e.toDisplayString(V.label),1),e.createElementVNode("div",ri,[e.createVNode(b,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:re=>W(V)},null,8,["onClick"]),e.createVNode(b,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:re=>I(V)},null,8,["onClick"]),e.createVNode(b,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:re=>ce(V)},null,8,["onClick"])])]),V!=null&&V.children&&V.children.length>0?(e.openBlock(),e.createElementBlock("div",ii,[e.createVNode(Sl,{tableChildContents:V==null?void 0:V.children,onDeleteChange:M,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",si,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:J},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},ui=Rt._export_sfc(ci,[["__scopeId","data-v-e0fef72d"]]),pi={class:"table-header-child"},di={class:"table-header-child-main"},fi={class:"table-header-child-content"},hi={class:"table-header-child-content-item"},vi={class:"fix-button"},gi={key:0},mi={class:"form-content"},yi={class:"dialog-footer"},bi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:c}){const i=a,l=c,s=e.ref(!1),d=e.ref(""),w=Be.useTableComp(p.pinia),{tableIndex:g}=p.storeToRefs(w),h=e.ref(""),D=e.ref([]),A=e.ref([]),I=C=>{l("fixChange",p.cloneDeep(C))},F=C=>{var b;s.value=!0;let P=[];_t==null||_t.forEach(V=>{let S=p.cloneDeep(g.value)+1;w.setTableIndex(S),P.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:C[V.key],id:g.value,contents:V==null?void 0:V.options})}),C!=null&&C.children&&((b=C==null?void 0:C.children)==null?void 0:b.length)>0&&P.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,D.value=P,A.value=P},M=C=>{s.value=!0;let P=[];_t==null||_t.forEach(b=>{let V=p.cloneDeep(g.value)+1;w.setTableIndex(V),P.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:"",id:g.value,contents:b==null?void 0:b.options})}),d.value=C==null?void 0:C.id,D.value=P,A.value=P},W=C=>{let P=p.cloneDeep(A.value);P=P==null?void 0:P.map(b=>(b.children||(b.value=C==null?void 0:C[b.name]),b)),A.value=P},De=()=>{var P,b;D.value=A.value;let C={};if(h.value!=="")C.id=h.value,(P=D.value)==null||P.forEach(V=>{const S=_t==null?void 0:_t.find(re=>(re==null?void 0:re.label)===(V==null?void 0:V.label));S?C[S.key]=V.value:V!=null&&V.children&&V.children.length>0&&(C.children=V.children)}),s.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"fix"});else{let V=p.cloneDeep(g.value)+1;w.setTableIndex(V),C.id="idChild"+g.value,(b=D.value)==null||b.forEach(S=>{const re=_t==null?void 0:_t.find(Le=>(Le==null?void 0:Le.label)===(S==null?void 0:S.label));re?C[re.key]=S.value:S!=null&&S.children&&S.children.length>0&&(C.children=S.children)}),s.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"add"})}h.value="",D.value=[],A.value=[]},J=()=>{s.value=!1,h.value="",d.value="",D.value=[],A.value=[]},K=C=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",C),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ce=C=>{l("deleteChange",C)};return(C,P)=>{const b=e.resolveComponent("svg-icon"),V=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(S,re)=>(e.openBlock(),e.createElementBlock("div",di,[e.createElementVNode("div",fi,[e.createElementVNode("div",hi,e.toDisplayString(S.label),1),e.createElementVNode("div",vi,[e.createVNode(b,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>M(S)},null,8,["onClick"]),e.createVNode(b,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>F(S)},null,8,["onClick"]),e.createVNode(b,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>K(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",gi,[e.createVNode(ui,{tableChildContents:S==null?void 0:S.children,onDeleteChange:ce,onFixChange:I},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:J,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",mi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createVNode(V,{onClick:J,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>P[0]||(P[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(V,{class:"ok-button button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>P[1]||(P[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Sl=Rt._export_sfc(bi,[["__scopeId","data-v-ebd68fa1"]]),ki={class:"table-operate-content"},xi={class:"table-operate-item"},wi={class:"operate-title"},Di={class:"operate-content"},Ci={class:"fix-content"},Ei={class:"fix-content-label"},_i={class:"fix-button"},Si={key:0},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ai={class:"fix-content-label"},Ni={class:"fix-button"},Vi={class:"operate-title"},Oi={class:"operate-content"},Mi={class:"fix-content"},zi={class:"fix-content-label"},Ri={class:"fix-button"},Pi={class:"operate-title"},Fi={class:"operate-content"},Li={class:"fix-content"},$i={class:"fix-content-label"},ji={class:"fix-button"},Ki={class:"operate-content"},Ui={style:{display:"flex","justify-content":"space-between"}},Wi={class:"form-content"},Hi={class:"dialog-footer"},qi={class:"form-content"},Xi={class:"dialog-footer"},Gi={class:"form-content"},Yi={class:"dialog-footer"},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:c}){const i=a,l=c,s=e.ref([]),d=e.ref(!1),w=e.ref(!1),g=e.ref([]),h=e.ref(!1),D=e.ref([]),A=e.ref(!1),I=e.ref([]),F=e.ref(""),M=e.ref(""),W=e.ref([]),De=e.ref([]),J=e.ref([]),K=e.ref([]),ce=e.ref(!1),C=e.ref([]),P=e.ref([]),b=e.ref(0),V=e.ref([]),S=e.ref([]),re=e.ref([]),Le=()=>{ce.value=!0;let k=[];Fn==null||Fn.forEach(x=>{b.value++,k.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:(x==null?void 0:x.key)==="background"?"var(--ssComponent-primary-color)":"",id:b.value,contents:x==null?void 0:x.options})}),C.value=k,P.value=k},lt=()=>{var x,R,ne;w.value=!0;let k=[];(ne=(R=(x=Be.FormContent)==null?void 0:x.find(m=>(m==null?void 0:m.key)==="Input"))==null?void 0:R.value)==null||ne.forEach(m=>{b.value++,k.push({label:m==null?void 0:m.label,name:(m==null?void 0:m.name)||(m==null?void 0:m.label),type:m.type,value:(m==null?void 0:m.label)==="类型"?"Input":"",id:b.value,contents:m==null?void 0:m.options})}),V.value=k,S.value=k},Ve=k=>{k||(V.value=S.value)},We=async k=>{var x,R,ne,m,T,U,j,H,Z,X,Y,fe;if((k==null?void 0:k.类型)!==((R=(x=S.value)==null?void 0:x.find(q=>(q==null?void 0:q.label)==="类型"))==null?void 0:R.value)){let q=[],se=await((T=(m=(ne=Be.FormContent)==null?void 0:ne.find($=>($==null?void 0:$.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:m.value)==null?void 0:T.value)?await((X=(Z=(H=Be.FormContent)==null?void 0:H.find($=>($==null?void 0:$.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:Z.value)==null?void 0:X.value):(j=(U=Be.FormContent)==null?void 0:U.find($=>($==null?void 0:$.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:j.value;if(se==null||se.forEach($=>{b.value++,q.push({label:$==null?void 0:$.label,name:($==null?void 0:$.name)||($==null?void 0:$.label),type:$.type,value:$!=null&&$.属性名?(k==null?void 0:k.prop)||(k==null?void 0:k.name)||(k==null?void 0:k.label):(k==null?void 0:k[$.label])??"",id:b.value,contents:$==null?void 0:$.options,prop:($==null?void 0:$.prop)||($==null?void 0:$.name)||($==null?void 0:$.label)})}),k!=null&&k.菜单选项&&((Y=k==null?void 0:k.菜单选项)==null?void 0:Y.length)>0){const $=await Be.menuToContentType(k==null?void 0:k.菜单选项);q=q==null?void 0:q.map(Ae=>((Ae==null?void 0:Ae.name)==="组信息选项"&&(Ae.contents=$),Ae))}S.value=await Be.selectToBase(p.cloneDeep(q)),V.value=await Be.selectToBase(p.cloneDeep(q))}else{let q=p.cloneDeep(V.value);if(q=q==null?void 0:q.map(se=>(se.value=k==null?void 0:k[se.name],se)),k!=null&&k.菜单选项&&((fe=k==null?void 0:k.菜单选项)==null?void 0:fe.length)>0){const se=await Be.menuToContentType(k==null?void 0:k.菜单选项);q=q==null?void 0:q.map($=>(($==null?void 0:$.name)==="组信息选项"&&($.contents=se),$))}q=Be.formToOptionsContents(q),S.value=await Be.selectToBase(p.cloneDeep(q))}},be=async k=>{await We(k),V.value=S.value},B=(k,x)=>{if((x==null?void 0:x.type)=="Select"&&(k==null?void 0:k.key)==="selectRelateType"){const R=x==null?void 0:x.optionUrl;return(R==null?void 0:R.selectRelateType)||x[k.key]}if((x==null?void 0:x.type)=="Select"&&(k==null?void 0:k.key)==="menuSelect"){const R=x==null?void 0:x.optionUrl;return(R==null?void 0:R.menuSelect)||x[k.key]}if((x==null?void 0:x.type)=="Select"&&(k==null?void 0:k.key)==="groupSelect"){const R=x==null?void 0:x.optionUrl;return(R==null?void 0:R.groupSelect)||x[k.key]}if((x==null?void 0:x.type)=="Select"&&(k==null?void 0:k.key)==="originalContent")return(x==null?void 0:x.value)||x[k.key];if((x==null?void 0:x.type)=="Select"&&(k==null?void 0:k.key)==="multiple"){const R=x[k.key];return kl(R)?R:k.default}return(k==null?void 0:k.label)==="类型"&&x[k.key]===""?"Input":(k==null?void 0:k.key)==="isFormColHidden"&&!x[k.key]?!1:x[k.key]},ae=async k=>{var ne,m,T,U,j,H,Z,X,Y;w.value=!0;let x=[];const R=await((T=(m=(ne=Be.FormContent)==null?void 0:ne.find(fe=>(fe==null?void 0:fe.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:m.value)==null?void 0:T.value)?await((X=(Z=(H=Be.FormContent)==null?void 0:H.find(fe=>(fe==null?void 0:fe.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:Z.value)==null?void 0:X.value):(j=(U=Be.FormContent)==null?void 0:U.find(fe=>(fe==null?void 0:fe.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:j.value;if(R==null||R.forEach(fe=>{b.value++,x.push({label:fe==null?void 0:fe.label,name:(fe==null?void 0:fe.name)||(fe==null?void 0:fe.label),type:fe.type,value:(fe==null?void 0:fe.label)==="属性名"?(k==null?void 0:k.prop)||(k==null?void 0:k.name)||(k==null?void 0:k.label):B(fe,k),id:b.value,contents:fe==null?void 0:fe.options})}),k!=null&&k.menuSelect&&((Y=k==null?void 0:k.menuSelect)==null?void 0:Y.length)>0){const fe=await Be.menuToContentType(k==null?void 0:k.menuSelect);x=x==null?void 0:x.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=fe),q))}F.value=k==null?void 0:k.id,V.value=await Be.selectToBase(Be.formToOptionsContents(x)),S.value=await Be.selectToBase(Be.formToOptionsContents(x))},te=k=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,R;re.value=(x=p.cloneDeep(re.value))==null?void 0:x.filter(ne=>(ne==null?void 0:ne.id)!==(k==null?void 0:k.id)),l("change",(R=p.cloneDeep(i.originalItemContents))==null?void 0:R.map(ne=>((ne==null?void 0:ne.key)==="tableToForm"&&(ne.contents=re.value),ne))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{w.value=!1,V.value=[],F.value=""},Ue=async()=>{var ne,m,T,U,j,H,Z,X,Y,fe;V.value=S.value;let k={};F.value!==""?k.id=F.value:(b.value++,k.id="id"+b.value);let x=await((T=(m=(ne=Be.FormContent)==null?void 0:ne.find(q=>{var se,$;return(q==null?void 0:q.key)===((($=(se=V.value)==null?void 0:se.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:$.value)??"label")}))==null?void 0:m.value)==null?void 0:T.value)??((j=(U=Be.FormContent)==null?void 0:U.find(q=>{var se,$;return(q==null?void 0:q.key)===((($=(se=V.value)==null?void 0:se.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:$.value)??"label")}))==null?void 0:j.value);if((H=V.value)==null||H.forEach(q=>{const se=x==null?void 0:x.find($=>($==null?void 0:$.label)===(q==null?void 0:q.label));se&&(k[se.key]=q.value)}),k.name=k.label,(Z=re.value)!=null&&Z.find(q=>q.id===k.id))re.value=(X=re.value)==null?void 0:X.map(q=>(q.id===k.id&&(q=k),q));else{let q=p.cloneDeep(re.value);re.value||(re.value=[]),q.push(k),re.value=q}re.value=re.value.map(({id:q,...se})=>se),w.value=!1,F.value="";let R=p.cloneDeep(i.originalItemContents);(Y=p.cloneDeep(i.originalItemContents))!=null&&Y.find(q=>(q==null?void 0:q.key)==="tableToForm")?R=(fe=p.cloneDeep(i.originalItemContents))==null?void 0:fe.map(q=>((q==null?void 0:q.key)==="tableToForm"&&(q.contents=re.value),q)):R.push({key:"tableToForm",contents:re.value}),l("change",R)},ut=k=>{ce.value=!0;let x=[];Fn==null||Fn.forEach(R=>{b.value++,x.push({label:R==null?void 0:R.label,name:R==null?void 0:R.label,type:R.type,value:k[R.key],id:b.value,contents:R==null?void 0:R.options})}),F.value=k==null?void 0:k.id,C.value=x,P.value=x};e.watch(()=>A.value,()=>{var x,R;let k=p.cloneDeep(i.originalItemContents);(x=p.cloneDeep(i.originalItemContents))!=null&&x.find(ne=>(ne==null?void 0:ne.key)==="page")?k=(R=p.cloneDeep(i.originalItemContents))==null?void 0:R.map(ne=>((ne==null?void 0:ne.key)==="page"&&(ne.contents=A.value),ne)):k.push({key:"page",contents:A.value}),l("change",k)},{deep:!0});const Ne=k=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,R;De.value=(x=p.cloneDeep(De.value))==null?void 0:x.filter(ne=>(ne==null?void 0:ne.id)!==(k==null?void 0:k.id)),l("change",(R=p.cloneDeep(i.originalItemContents))==null?void 0:R.map(ne=>((ne==null?void 0:ne.key)==="extraButton"&&(ne.contents=De.value),ne))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},E=()=>{var R,ne,m,T,U;C.value=P.value;let k={};if(F.value!==""?k.id=F.value:(b.value++,k.id="id"+b.value),(R=C.value)==null||R.forEach(j=>{const H=Fn==null?void 0:Fn.find(Z=>(Z==null?void 0:Z.label)===(j==null?void 0:j.label));H?k[H.key]=j.value:j!=null&&j.children&&j.children.length>0&&(k.children=j.children)}),(ne=De.value)!=null&&ne.find(j=>j.id===k.id))De.value=(m=De.value)==null?void 0:m.map(j=>(j.id===k.id&&(j=k),j));else{let j=p.cloneDeep(De.value)??[];j.push(k),De.value=j}ce.value=!1,F.value="";let x=p.cloneDeep(i.originalItemContents);(T=p.cloneDeep(i.originalItemContents))!=null&&T.find(j=>(j==null?void 0:j.key)==="extraButton")?x=(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(j=>((j==null?void 0:j.key)==="extraButton"&&(j.contents=De.value),j)):x.push({key:"extraButton",contents:De.value}),l("change",x)},_e=k=>{let x=p.cloneDeep(P.value);x=x==null?void 0:x.map(R=>(R.children||(R.value=k==null?void 0:k[R.name]),R)),P.value=x},ie=()=>{ce.value=!1,C.value=[],F.value=""},Fe=k=>{h.value=!0;let x=[];Ln==null||Ln.forEach(R=>{b.value++,x.push({label:R==null?void 0:R.label,name:R==null?void 0:R.label,type:R.type,value:k[R.key],id:b.value,contents:R==null?void 0:R.options})}),F.value=k==null?void 0:k.id,J.value=x,K.value=x},$e=k=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,R;W.value=(x=p.cloneDeep(W.value))==null?void 0:x.filter(ne=>(ne==null?void 0:ne.id)!==(k==null?void 0:k.id)),l("change",(R=p.cloneDeep(i.originalItemContents))==null?void 0:R.map(ne=>((ne==null?void 0:ne.key)==="rowButton"&&(ne.contents=W.value),ne))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},xe=()=>{d.value=!0;let k=[];_t==null||_t.forEach(x=>{b.value++,k.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:b.value,contents:x==null?void 0:x.options})}),D.value=k,I.value=k},je=()=>{h.value=!0;let k=[];Ln==null||Ln.forEach(x=>{b.value++,k.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:b.value,contents:x==null?void 0:x.options})}),J.value=k,K.value=k},pt=k=>{let x=p.cloneDeep(K.value);x=x==null?void 0:x.map(R=>(R.children||(R.value=k==null?void 0:k[R.name]),R)),K.value=x},G=()=>{var R,ne,m,T,U;J.value=K.value;let k={};if(F.value!==""?k.id=F.value:(b.value++,k.id="id"+b.value),(R=J.value)==null||R.forEach(j=>{const H=Ln==null?void 0:Ln.find(Z=>(Z==null?void 0:Z.label)===(j==null?void 0:j.label));H?k[H.key]=j.value:j!=null&&j.children&&j.children.length>0&&(k.children=j.children)}),(ne=W.value)!=null&&ne.find(j=>j.id===k.id))W.value=(m=W.value)==null?void 0:m.map(j=>(j.id===k.id&&(j=k),j));else{let j=p.cloneDeep(W.value);j.push(k),W.value=j}h.value=!1,F.value="";let x=p.cloneDeep(i.originalItemContents);(T=p.cloneDeep(i.originalItemContents))!=null&&T.find(j=>(j==null?void 0:j.key)==="rowButton")?x=(U=p.cloneDeep(i.originalItemContents))==null?void 0:U.map(j=>((j==null?void 0:j.key)==="rowButton"&&(j.contents=W.value),j)):x.push({key:"rowButton",contents:W.value}),l("change",x)},Qe=()=>{h.value=!1,F.value="",K.value=[],J.value=[]},ft=k=>{d.value=!0;let x=[];_t==null||_t.forEach(R=>{b.value++,x.push({label:R==null?void 0:R.label,name:R==null?void 0:R.label,type:R.type,value:"",id:b.value,contents:R==null?void 0:R.options})}),D.value=x,M.value=k==null?void 0:k.id,I.value=x},tt=k=>{var x;g.value=Dl(p.cloneDeep(g.value),k==null?void 0:k.id),l("change",(x=p.cloneDeep(i.originalItemContents))==null?void 0:x.map(R=>{var ne;return(R==null?void 0:R.key)==="header"&&(R.contents=(ne=g.value)!=null&&ne.some(m=>m==null?void 0:m.children)?[g.value]:g.value),R}))},ee=k=>{var R,ne,m;k.type==="fix"?k.id!==""?g.value=El(g.value,k):g.value=Cl(g.value,k==null?void 0:k.contents):g.value=_l(g.value,k),g.value=(R=g.value)!=null&&R.some(T=>T==null?void 0:T.children)?[g.value]:g.value,F.value="";let x=p.cloneDeep(i.originalItemContents);(ne=p.cloneDeep(i.originalItemContents))!=null&&ne.find(T=>(T==null?void 0:T.key)==="header")?x=(m=p.cloneDeep(i.originalItemContents))==null?void 0:m.map(T=>((T==null?void 0:T.key)==="header"&&(T.contents=g.value),T)):x.push({key:"header",contents:g.value}),l("change",x)},oe=k=>{var R;d.value=!0;let x=[];_t==null||_t.forEach(ne=>{b.value++,x.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:k[ne.key],id:b.value,contents:ne==null?void 0:ne.options})}),k!=null&&k.children&&((R=k==null?void 0:k.children)==null?void 0:R.length)>0&&x.push({children:k==null?void 0:k.children,isFormColHidden:!0}),F.value=k==null?void 0:k.id,M.value="",D.value=x,I.value=x},we=k=>{let x=p.cloneDeep(I.value);x=x==null?void 0:x.map(R=>(R.children||(R.value=k==null?void 0:k[R.name]),R)),I.value=x},he=()=>{d.value=!1,F.value="",M.value="",I.value=[]},Je=()=>{var R,ne,m,T,U,j;D.value=I.value;let k={};if(F.value!==""?k.id=F.value:(b.value++,k.id="id"+b.value),(R=D.value)==null||R.forEach(H=>{const Z=_t==null?void 0:_t.find(X=>(X==null?void 0:X.label)===(H==null?void 0:H.label));Z?k[Z.key]=H.value:H!=null&&H.children&&H.children.length>0&&(k.children=H.children)}),(ne=g.value)!=null&&ne.find(H=>H.id===k.id))g.value=(m=g.value)==null?void 0:m.map(H=>(H.id===k.id&&(H=k),H));else{let H=p.cloneDeep(g.value)??[];M.value===""?H.push(k):H=H==null?void 0:H.map(Z=>(Z.id===M.value&&(Z.children||(Z.children=[]),Z.children.push(k)),Z)),g.value=H}g.value=(T=g.value)!=null&&T.some(H=>H==null?void 0:H.children)?[g.value]:g.value,d.value=!1,F.value="",M.value="";let x=p.cloneDeep(i.originalItemContents);(U=p.cloneDeep(i.originalItemContents))!=null&&U.find(H=>(H==null?void 0:H.key)==="header")?x=(j=p.cloneDeep(i.originalItemContents))==null?void 0:j.map(H=>((H==null?void 0:H.key)==="header"&&(H.contents=g.value),H)):x.push({key:"header",contents:g.value}),l("change",x)},et=k=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,R;g.value=(x=p.cloneDeep(g.value))==null?void 0:x.filter(ne=>(ne==null?void 0:ne.id)!==(k==null?void 0:k.id)),l("change",(R=p.cloneDeep(i.originalItemContents))==null?void 0:R.map(ne=>{var m;return(ne==null?void 0:ne.key)==="header"&&(ne.contents=(m=g.value)!=null&&m.some(T=>T==null?void 0:T.children)?[g.value]:g.value),ne})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var k,x,R,ne,m,T,U,j,H,Z,X,Y,fe,q,se,$,Ae,Se,ke;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(s.value=p.cloneDeep(i.originalItemContents),g.value=(x=(k=s.value)==null?void 0:k.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:x.contents,W.value=(ne=(R=s.value)==null?void 0:R.find(z=>(z==null?void 0:z.key)==="rowButton"))==null?void 0:ne.contents,De.value=(T=(m=s.value)==null?void 0:m.find(z=>(z==null?void 0:z.key)==="extraButton"))==null?void 0:T.contents,A.value=(j=(U=s.value)==null?void 0:U.find(z=>(z==null?void 0:z.key)==="page"))!=null&&j.contents?!!((Z=(H=s.value)==null?void 0:H.find(z=>(z==null?void 0:z.key)==="page"))!=null&&Z.contents):!1,re.value=(Y=(X=s.value)==null?void 0:X.find(z=>(z==null?void 0:z.key)==="tableToForm"))==null?void 0:Y.contents,g.value=(fe=g.value)==null?void 0:fe.map((z,pe)=>(Array.isArray(z)?z=Qr(z):z={label:(z==null?void 0:z.label)??"",prop:(z==null?void 0:z.label)==="操作"?"operate":z==null?void 0:z.prop,width:z!=null&&z.width?parseInt(z.width):"",fixed:(z==null?void 0:z.fixed)??void 0,sortable:(z==null?void 0:z.sortable)??!1,align:(z==null?void 0:z.align)??"left",showOverflowTooltip:(z==null?void 0:z.showOverflowTooltip)??!0,isNotDrag:(z==null?void 0:z.isNotDrag)??!1,isEditCol:(z==null?void 0:z.isEditCol)??!1,isOperate:(z==null?void 0:z.isOperate)??!1,id:(z==null?void 0:z.id)??pe,formMenuSelect:(z==null?void 0:z.formMenuSelect)??void 0,groupSelect:(z==null?void 0:z.groupSelect)??void 0},z)),g.value=(q=g.value)!=null&&q.every(z=>Array.isArray(z))?(se=g.value)==null?void 0:se[0]:g.value,W.value=($=W.value)==null?void 0:$.map((z,pe)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",textColor:(z==null?void 0:z.textColor)??"#000000",id:(z==null?void 0:z.id)??pe}),De.value=(Ae=De.value)==null?void 0:Ae.map((z,pe)=>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:(z==null?void 0:z.id)??pe}),re.value)re.value=(ke=re.value)==null?void 0:ke.map(z=>{b.value++;let pe=z;return pe.id=b.value,pe});else{let z=[];const pe=(Se=Be.getColumnChild(p.cloneDeep(g.value)))==null?void 0:Se.filter(ve=>(ve==null?void 0:ve.prop)!=="operate");pe==null||pe.forEach(ve=>{var ge;b.value++,z.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve!=null&&ve.groupSelect?"Select":"Input",value:"",id:b.value,contents:ve==null?void 0:ve.options,menuSelect:ve==null?void 0:ve.formMenuSelect,groupSelect:(ge=ve==null?void 0:ve.groupSelect)==null?void 0:ge.split(":"),selectRelateType:"关联绑定列"})}),re.value=z}},{deep:!0,immediate:!0}),(k,x)=>{const R=e.resolveComponent("svg-icon"),ne=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("div",xi,[e.createElementVNode("div",wi,[x[2]||(x[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ne,{class:"icon-content",onClick:xe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[x[1]||(x[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Di,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(m,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createElementVNode("div",Ci,[e.createElementVNode("div",Ei,e.toDisplayString(m==null?void 0:m.label),1),e.createElementVNode("div",_i,[e.createVNode(R,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>ft(m)},null,8,["onClick"]),e.createVNode(R,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>oe(m)},null,8,["onClick"]),e.createVNode(R,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>et(m)},null,8,["onClick"])])]),m!=null&&m.children&&m.children.length>0?(e.openBlock(),e.createElementBlock("div",Si,[e.createVNode(Sl,{tableChildContents:m==null?void 0:m.children,onDeleteChange:tt,onFixChange:ee},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ti,[x[4]||(x[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:je},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[x[3]||(x[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(m,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ai,e.toDisplayString(m==null?void 0:m.label),1),e.createElementVNode("div",Ni,[e.createVNode(R,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:U=>Fe(m)},null,8,["onClick"]),e.createVNode(R,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>$e(m)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Vi,[x[6]||(x[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:Le},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[x[5]||(x[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De.value,(m,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createElementVNode("div",Mi,[e.createElementVNode("div",zi,e.toDisplayString(m==null?void 0:m.label),1),e.createElementVNode("div",Ri,[e.createVNode(R,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:U=>ut(m)},null,8,["onClick"]),e.createVNode(R,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>Ne(m)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Pi,[x[8]||(x[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ne,{class:"icon-content",id:"themeButton",onClick:lt},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[x[7]||(x[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Fi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(m,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createElementVNode("div",Li,[e.createElementVNode("div",$i,e.toDisplayString(m==null?void 0:m.label),1),e.createElementVNode("div",ji,[e.createVNode(R,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:U=>ae(m)},null,8,["onClick"]),e.createVNode(R,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>te(m)},null,8,["onClick"])])])]))),128))]),x[10]||(x[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Ki,[e.createElementVNode("div",Ui,[x[9]||(x[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(St._sfc_main$1,{modelValue:A.value,"onUpdate:modelValue":x[0]||(x[0]=m=>A.value=m)},null,8,["modelValue"])])])]),e.createVNode(Gt.ssDialog,{visible:d.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Wi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hi,[e.createVNode(ne,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[11]||(x[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ne,{class:"ok-button button",onClick:Je,id:"themeButton"},{default:e.withCtx(()=>x[12]||(x[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:h.value,onBeforeDestroy:Qe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:J.value,key:J.value,isEnableWrap:!0,onChange:pt},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Xi,[e.createVNode(ne,{onClick:Qe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[13]||(x[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ne,{class:"ok-button button",onClick:G,id:"themeButton"},{default:e.withCtx(()=>x[14]||(x[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:ce.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Gi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yi,[e.createVNode(ne,{onClick:ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[15]||(x[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ne,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>x[16]||(x[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:w.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:We,onChangeVisible:Ve,onBlurChange:be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(ne,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[17]||(x[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ne,{class:"ok-button button",onClick:Ue,id:"themeButton"},{default:e.withCtx(()=>x[18]||(x[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},es=Rt._export_sfc(Qi,[["__scopeId","data-v-0a7fc163"]]),ts=Be.useModelComp(p.pinia),{pageMapState:ns}=p.storeToRefs(ts),as=Be.useMenuState(p.pinia),{activeMenuPath:os}=p.storeToRefs(as),ls=e.ref(24),rs=e.ref(6),is=e.ref(70),ss=e.ref(.18),cs=e.ref(45),us=(a,c,i,l)=>{var s,d,w,g,h,D,A,I,F,M,W,De,J,K,ce,C;return{x:((d=(s=a==null?void 0:a.value)==null?void 0:s.tableData)==null?void 0:d.x)||c%2*12,y:((g=(w=a==null?void 0:a.value)==null?void 0:w.tableData)==null?void 0:g.y)||c,w:((D=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:D.w)||ls.value,h:((I=(A=a==null?void 0:a.value)==null?void 0:A.tableData)==null?void 0:I.h)||i,minW:((M=(F=a==null?void 0:a.value)==null?void 0:F.tableData)==null?void 0:M.minW)||rs.value,minH:((De=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:De.minH)||ss.value,maxH:((K=(J=a==null?void 0:a.value)==null?void 0:J.tableData)==null?void 0:K.maxH)||cs.value,i:((C=(ce=a==null?void 0:a.value)==null?void 0:ce.tableData)==null?void 0:C.i)||c,id:(a==null?void 0:a.id)||c+"",component:l}},ps=(a,c)=>{var l,s,d,w,g,h,D,A;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"){const I=(w=(d=(s=a==null?void 0:a.compData)==null?void 0:s.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:w.length;if(I===0)return 2;i=I>=10?Math.ceil(I/10)>10?Math.ceil(I/10)/2:Math.ceil(I/10)+2:Math.ceil(I/2)+.2}else((g=a==null?void 0:a.comp)==null?void 0:g.toUpperCase())==="FORM"&&(i=((A=(D=(h=a==null?void 0:a.compData)==null?void 0:h.find(F=>(F==null?void 0:F.key)==="formContent"))==null?void 0:D.contents)==null?void 0:A.length)/5);return i%2===0?i+1.5:i+1},Tl=(a,c,i)=>{var w,g;const l=(g=(w=ns.value)==null?void 0:w[os.value])==null?void 0:g.filter(h=>{var D;return((D=h==null?void 0:h.key)==null?void 0:D.type)==="gridLayout"}),s=l==null?void 0:l.find(h=>{var D,A,I;return((I=(A=(D=h==null?void 0:h.value)==null?void 0:D.tableData)==null?void 0:A.component)==null?void 0:I.id)===a.id}),d=ps(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,D)=>Tl(h,D))),{...us(s,c,d,a)}},ds=(a,c)=>{if((a==null?void 0:a.length)===0)return[];const i=p.cloneDeep(a);return Array.isArray(a)?i==null?void 0:i.map((l,s)=>Tl(l,s)):[]},fs=a=>({TABLE:{overall:[{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},{label:"禁用",value:!1}]}],alone:[{label:"浏览视图",prop:"viewport",type:"checkbox",value:[],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否支持选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),hs=(a,c)=>a==null?void 0:a.map(i=>{for(const l in c)if(l===(i==null?void 0:i.prop))return{...i,value:c[l]};return i}),vs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:c}){const i=a,l=c,s=e.ref([]);e.watch(()=>i.compType,g=>{var A;const h=fs(i==null?void 0:i.optionItems),D=g?(A=h[g==null?void 0:g.toUpperCase()])==null?void 0:A[i==null?void 0:i.target]:[];s.value=D==null?void 0:D.map(I=>{for(const[F,M]of Object.entries((i==null?void 0:i.comp)||{}))if((I==null?void 0:I.prop)===F)return{...I,value:M};return I})},{immediate:!0});const d=g=>St.getComponent(g),w=()=>{l("change",{target:i==null?void 0:i.target,styleConfigs:s.value})};return(g,h)=>{const D=e.resolveComponent("el-col"),A=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,I=>(e.openBlock(),e.createBlock(A,{class:"style-row",key:I==null?void 0:I.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I==null?void 0:I.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(I.type)),{modelValue:I.value,"onUpdate:modelValue":F=>I.value=F,content:I==null?void 0:I.options,optionUrl:I==null?void 0:I.optionUrl,onChange:w},null,40,["modelValue","onUpdate:modelValue","content","optionUrl"]))]),_:2},1024)]),_:2},1024))),128)}}}),gs=Rt._export_sfc(vs,[["__scopeId","data-v-7f3b5d2f"]]),ms=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:c}){const i=a,l=c,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),w=K=>K==null?void 0:K.reduce((ce,C)=>(ce[C==null?void 0:C.prop]=C==null?void 0:C.rule,ce),{}),g=e.computed(()=>({formRules:w(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),D=e.ref(""),A=(K,ce,C)=>{var V;let P=[];(i==null?void 0:i.activeTabName)==="任务配置"?(P=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:ce}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(i==null?void 0:i.activeTabName)==="任务关联"&&(P=[{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:(V=i==null?void 0:i.relatedData)==null?void 0:V.map(S=>({label:S==null?void 0:S.任务名称,value:S==null?void 0:S.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let b;return C&&(C==null?void 0:C.length)>0?b=[...P,...I(K,ce,C)]:b=P,b},I=(K,ce,C)=>{const P=[{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 C?P==null?void 0:P.filter(b=>C==null?void 0:C.includes(b==null?void 0:b.prop)):P},F=(K,ce)=>{var S,re,Le,lt,Ve,We,be,B,ae;const C=((Ve=(lt=(Le=(re=(S=i==null?void 0:i.comp)==null?void 0:S.compData)==null?void 0:re.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:Le.contents)==null?void 0:lt.filter(te=>(te==null?void 0:te.label)!=="操作"))==null?void 0:Ve.map(te=>({value:te==null?void 0:te.prop,label:te.label})))||[],P=/button/i,b=((ae=(B=(be=(We=i==null?void 0:i.comp)==null?void 0:We.compData)==null?void 0:be.filter(te=>P.test(te==null?void 0:te.key)))==null?void 0:B.flatMap(te=>te==null?void 0:te.contents))==null?void 0:ae.map(te=>({value:te==null?void 0:te.label,label:te.label})))||[],V=A(C,b,K);h.value=ce?hs(V,ce):V,K&&(K==null?void 0:K.length)>0&&d.value.push(...K==null?void 0:K.map(te=>({prop:te,rule:s})))};e.onMounted(()=>{F(null,i==null?void 0:i.extendItem)});const M=K=>{const ce=K==null?void 0:K[D.value];if(D.value==="执行任务"){if(!(ce!=null&&ce.join("/")))return;const C=ce==null?void 0:ce.join("/");F(C==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:C==="进度设置/进度条"?["进度关键词"]:null,K)}},W=K=>{l("change",{target:i==null?void 0:i.target,extendConfigs:K})},De=(K,ce)=>{D.value=ce==null?void 0:ce.changeProp,M(K)},J=K=>{l("onButtonClick",K)};return(K,ce)=>(e.openBlock(),e.createBlock(St.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:W,onBlurChange:De,onOnButtonClick:J},null,8,["rowContents","formRules","buttonValue"]))}}),ys=Rt._export_sfc(ms,[["__scopeId","data-v-7c660c1f"]]),bs={};function ks(a,c){return null}const xs=Rt._export_sfc(bs,[["render",ks]]),ws={class:"form-operate-content"},Ds={class:"form-operate-item"},Cs={class:"operate-title"},Es={class:"operate-content"},_s={class:"fix-content"},Ss={class:"fix-button"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},As={class:"fix-button"},Ns={style:{display:"flex","justify-content":"space-between"}},Vs={class:"form-content"},Os={class:"dialog-footer"},Ms={class:"form-content"},zs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:c}){const i=a,l=c,s=e.ref(!1),d=e.ref([]),w=e.ref([]),g=e.ref(!1),h=e.ref([]),D=e.ref([]),A=e.ref(""),I=e.ref(!1),F=e.ref(0),M=e.ref([]),W=e.ref([]),De=(B,ae)=>{if((ae==null?void 0:ae.type)=="Select"&&(B==null?void 0:B.key)==="selectRelateType"){const te=ae==null?void 0:ae.optionUrl;return(te==null?void 0:te.selectRelateType)||ae[B.key]}if((ae==null?void 0:ae.type)=="Select"&&(B==null?void 0:B.key)==="menuSelect"){const te=ae==null?void 0:ae.optionUrl;return(te==null?void 0:te.menuSelect)||ae[B.key]}if((ae==null?void 0:ae.type)=="Select"&&(B==null?void 0:B.key)==="groupSelect"){const te=ae==null?void 0:ae.optionUrl;return(te==null?void 0:te.groupSelect)||ae[B.key]}if((ae==null?void 0:ae.type)=="Select"&&(B==null?void 0:B.key)==="originalContent")return(ae==null?void 0:ae.value)||ae[B.key];if((ae==null?void 0:ae.type)=="Select"&&(B==null?void 0:B.key)==="multiple"){const te=ae[B.key];return kl(te)?te:B.default}return(B==null?void 0:B.label)==="类型"&&ae[B.key]===""?"Input":(B==null?void 0:B.key)==="isFormColHidden"&&!ae[B.key]?!1:ae[B.key]},J=async B=>{var de,Ue,ut,Ne,E,_e;s.value=!0;let ae=[];const te=await((ut=(Ue=(de=Be.FormContent)==null?void 0:de.find(ie=>(ie==null?void 0:ie.key)===((B==null?void 0:B.type)===""?"Input":B==null?void 0:B.type)))==null?void 0:Ue.value)==null?void 0:ut.value)??((E=(Ne=Be.FormContent)==null?void 0:Ne.find(ie=>(ie==null?void 0:ie.key)===((B==null?void 0:B.type)===""?"Input":B==null?void 0:B.type)))==null?void 0:E.value);if(te==null||te.forEach(ie=>{F.value++,ae.push({label:ie==null?void 0:ie.label,name:ie==null?void 0:ie.label,type:ie.type,prop:ie==null?void 0:ie.prop,value:De(ie,B),id:F.value,contents:ie==null?void 0:ie.options,width:(B==null?void 0:B.width)??1})}),B!=null&&B.menuSelect&&((_e=B==null?void 0:B.menuSelect)==null?void 0:_e.length)>0){const ie=await Be.menuToContentType(B==null?void 0:B.menuSelect);ae=ae==null?void 0:ae.map(Fe=>((Fe==null?void 0:Fe.name)==="组信息选项"&&(Fe.contents=ie),Fe))}A.value=B==null?void 0:B.id,d.value=await Be.selectToBase(Be.formToOptionsContents(ae)),w.value=await Be.selectToBase(Be.formToOptionsContents(ae))},K=B=>{var te;g.value=!0;let ae=[];(te=Be.FormButton)==null||te.forEach(de=>{F.value++,ae.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&B[de.key]===""?"normal":B[de.key],id:F.value,contents:de==null?void 0:de.options})}),M.value=ae,W.value=ae,A.value=B==null?void 0:B.id};e.watch(()=>I.value,()=>{var ae,te;let B=p.cloneDeep(i.originalItemContents);(ae=p.cloneDeep(i.originalItemContents))!=null&&ae.find(de=>(de==null?void 0:de.key)==="enableWrap")?B=(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!I.value),de)):B.push({key:"enableWrap",contents:!I.value}),l("change",B)},{deep:!0});const ce=()=>{var te,de,Ue,ut,Ne;M.value=W.value;let B={};if(A.value!==""?B.id=A.value:(F.value++,B.id="id"+F.value),(te=M.value)==null||te.forEach(E=>{var ie;const _e=(ie=Be.FormButton)==null?void 0:ie.find(Fe=>(Fe==null?void 0:Fe.label)===(E==null?void 0:E.label));_e&&(B[_e.key]=E.value)}),(de=h.value)!=null&&de.find(E=>E.id===B.id))h.value=(Ue=h.value)==null?void 0:Ue.map(E=>(E.id===B.id&&(E=B),E));else{let E=p.cloneDeep(h.value);h.value||(h.value=[]),E.push(B),h.value=E}g.value=!1,A.value="";let ae=p.cloneDeep(i.originalItemContents);(ut=p.cloneDeep(i.originalItemContents))!=null&&ut.find(E=>(E==null?void 0:E.key)==="formButton")?ae=(Ne=p.cloneDeep(i.originalItemContents))==null?void 0:Ne.map(E=>((E==null?void 0:E.key)==="formButton"&&(E.contents=h.value),E)):ae.push({key:"formButton",contents:h.value}),l("change",ae)},C=B=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ae,te;D.value=(ae=p.cloneDeep(D.value))==null?void 0:ae.filter(de=>(de==null?void 0:de.id)!==(B==null?void 0:B.id)),l("change",(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=D.value),de))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},P=B=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ae,te;h.value=(ae=p.cloneDeep(h.value))==null?void 0:ae.filter(de=>(de==null?void 0:de.id)!==(B==null?void 0:B.id)),l("change",(te=p.cloneDeep(i.originalItemContents))==null?void 0:te.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=h.value),de))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},b=()=>{var ae;g.value=!0;let B=[];(ae=Be.FormButton)==null||ae.forEach(te=>{F.value++,B.push({label:te==null?void 0:te.label,name:te==null?void 0:te.label,type:te.type,value:(te==null?void 0:te.label)==="类型"?"normal":"",id:F.value,contents:te==null?void 0:te.options})}),M.value=B,W.value=B},V=()=>{var ae,te,de;s.value=!0;let B=[];(de=(te=(ae=Be.FormContent)==null?void 0:ae.find(Ue=>(Ue==null?void 0:Ue.key)==="Input"))==null?void 0:te.value)==null||de.forEach(Ue=>{F.value++,B.push({label:Ue==null?void 0:Ue.label,name:Ue==null?void 0:Ue.label,type:Ue.type,value:(Ue==null?void 0:Ue.label)==="类型"?"Input":"",id:F.value,contents:Ue==null?void 0:Ue.options})}),d.value=B,w.value=B},S=B=>{let ae=p.cloneDeep(W.value);ae=ae==null?void 0:ae.map(te=>(te.value=B==null?void 0:B[te.name],te)),W.value=ae},re=B=>{const ae=B.find(Ue=>(Ue==null?void 0:Ue.name)==="类型");if((ae==null?void 0:ae.value)!="Select")return;const te=B.find(Ue=>(Ue==null?void 0:Ue.name)==="多选"),de=B.find(Ue=>(Ue==null?void 0:Ue.name)==="初始值");te!=null&&te.value&&Ao.isString(de.value)&&(de.value=[de.value]),!(te!=null&&te.value)&&!Ao.isString(de.value)&&(de.value="")},Le=async B=>{var ae,te,de,Ue,ut,Ne,E,_e,ie,Fe,$e,xe;if((B==null?void 0:B.类型)!==((te=(ae=w.value)==null?void 0:ae.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:te.value)){let je=[];const pt=await((ut=(Ue=(de=Be.FormContent)==null?void 0:de.find(G=>(G==null?void 0:G.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:Ue.value)==null?void 0:ut.value)?await((Fe=(ie=(_e=Be.FormContent)==null?void 0:_e.find(G=>(G==null?void 0:G.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:ie.value)==null?void 0:Fe.value):(E=(Ne=Be.FormContent)==null?void 0:Ne.find(G=>(G==null?void 0:G.key)===((B==null?void 0:B.类型)===""?"Input":B==null?void 0:B.类型)))==null?void 0:E.value;if(pt==null||pt.forEach(G=>{var ft,tt;F.value++;const Qe=xl(G==null?void 0:G.default)?(B==null?void 0:B[G.label])??G.value??"":G==null?void 0:G.default;je.push({label:G==null?void 0:G.label,name:G==null?void 0:G.label,type:G.type,value:Qe,prop:G==null?void 0:G.prop,id:F.value,contents:G==null?void 0:G.options,width:((tt=(ft=w.value)==null?void 0:ft[0])==null?void 0:tt.width)??1})}),B!=null&&B.菜单选项&&(($e=B==null?void 0:B.菜单选项)==null?void 0:$e.length)>0){const G=await Be.menuToContentType(B==null?void 0:B.菜单选项);je=je==null?void 0:je.map(Qe=>((Qe==null?void 0:Qe.name)==="组信息选项"&&(Qe.contents=G),Qe))}re(je),w.value=await Be.selectToBase(p.cloneDeep(je)),d.value=await Be.selectToBase(p.cloneDeep(je))}else{let je=p.cloneDeep(w.value);if(je=je==null?void 0:je.map(pt=>(pt.value=B==null?void 0:B[pt.name],pt)),B!=null&&B.菜单选项&&((xe=B==null?void 0:B.菜单选项)==null?void 0:xe.length)>0){const pt=await Be.menuToContentType(B==null?void 0:B.菜单选项);je=je==null?void 0:je.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=pt),G))}je=Be.formToOptionsContents(je),re(je),w.value=await Be.selectToBase(p.cloneDeep(je))}},lt=B=>{B||(d.value=w.value)},Ve=async B=>{await Le(B),d.value=w.value},We=fo(async()=>{var de,Ue,ut,Ne,E,_e,ie,Fe,$e,xe,je,pt;d.value=w.value;let B={};B.width=((Ue=(de=d.value)==null?void 0:de[0])==null?void 0:Ue.width)??1,A.value!==""?B.id=A.value:(F.value++,B.id="id"+F.value);let ae=await((E=(Ne=(ut=Be.FormContent)==null?void 0:ut.find(G=>{var Qe,ft;return(G==null?void 0:G.key)===(((ft=(Qe=d.value)==null?void 0:Qe.find(tt=>(tt==null?void 0:tt.label)==="类型"))==null?void 0:ft.value)??"label")}))==null?void 0:Ne.value)==null?void 0:E.value)??((ie=(_e=Be.FormContent)==null?void 0:_e.find(G=>{var Qe,ft;return(G==null?void 0:G.key)===(((ft=(Qe=d.value)==null?void 0:Qe.find(tt=>(tt==null?void 0:tt.label)==="类型"))==null?void 0:ft.value)??"label")}))==null?void 0:ie.value);if((Fe=d.value)==null||Fe.forEach(G=>{const Qe=ae==null?void 0:ae.find(ft=>(ft==null?void 0:ft.label)===(G==null?void 0:G.label));Qe&&(B[Qe.key]=G.value)}),B.width=B.width?B.width:1,B.key=B==null?void 0:B.label,B.isFormColHidden=B==null?void 0:B.isFormColHidden,($e=D.value)!=null&&$e.find(G=>G.id===B.id))D.value=(xe=D.value)==null?void 0:xe.map(G=>(G.id===B.id&&(G=B),G));else{let G=p.cloneDeep(D.value);G.push(B),D.value=G}D.value=D.value.map(({id:G,...Qe})=>Qe),s.value=!1,A.value="";let te=p.cloneDeep(i.originalItemContents);(je=p.cloneDeep(i.originalItemContents))!=null&&je.find(G=>(G==null?void 0:G.key)==="formContent")?te=(pt=p.cloneDeep(i.originalItemContents))==null?void 0:pt.map(G=>((G==null?void 0:G.key)==="formContent"&&(G.contents=D.value),G)):te.push({key:"formContent",contents:D.value}),l("change",te)},300),be=()=>{s.value=!1,g.value=!1,A.value="",w.value=[],W.value=[]};return e.watch(()=>i.originalItemContents,()=>{var ae,te,de,Ue,ut,Ne;if(!i.originalItemContents||i.originalItemContents.length===0)return;const B=p.cloneDeep(i.originalItemContents);D.value=((ae=B==null?void 0:B.find(E=>(E==null?void 0:E.key)==="formContent"))==null?void 0:ae.contents)??[],h.value=((te=B==null?void 0:B.find(E=>(E==null?void 0:E.key)==="formButton"))==null?void 0:te.contents)??[],I.value=(de=B==null?void 0:B.find(E=>(E==null?void 0:E.key)==="enableWrap"))!=null&&de.contents?!((Ue=B==null?void 0:B.find(E=>(E==null?void 0:E.key)==="enableWrap"))!=null&&Ue.contents):!0,D.value=(ut=p.cloneDeep(D.value))==null?void 0:ut.map((E,_e)=>{var Fe;let ie=E;return ie.id=(E==null?void 0:E.id)??_e,E!=null&&E.label||(E.label=(E==null?void 0:E.key)??(E==null?void 0:E.label)??""),E!=null&&E.type||(E.type=(E==null?void 0:E.type)??""),E.contents=((Fe=E==null?void 0:E.options)==null?void 0:Fe.length)===0?(E==null?void 0:E.contents)??"":E==null?void 0:E.options,ie}),D.value=Be.formToOptionsContents(D.value),h.value=(Ne=h.value)==null?void 0:Ne.map((E,_e)=>E={label:(E==null?void 0:E.label)??"",type:(E==null?void 0:E.type)??"",background:(E==null?void 0:E.background)??"var(--ssComponent-primary-color)",id:_e})},{deep:!0,immediate:!0}),(B,ae)=>{const te=e.resolveComponent("svg-icon"),de=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ws,[e.createElementVNode("div",Ds,[e.createElementVNode("div",Cs,[ae[2]||(ae[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:V},{icon:e.withCtx(()=>[e.createVNode(te,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ae[1]||(ae[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Es,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ue,ut)=>(e.openBlock(),e.createElementBlock("div",{key:ut},[e.createElementVNode("div",_s,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",Ss,[e.createVNode(te,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>J(Ue)},null,8,["onClick"]),e.createVNode(te,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>C(Ue)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ts,[ae[4]||(ae[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(de,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(te,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ae[3]||(ae[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Ue,ut)=>(e.openBlock(),e.createElementBlock("div",{key:ut},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(Ue.label),1),e.createElementVNode("div",As,[e.createVNode(te,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>K(Ue)},null,8,["onClick"]),e.createVNode(te,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ne=>P(Ue)},null,8,["onClick"])])])]))),128))]),ae[6]||(ae[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Ns,[ae[5]||(ae[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(St._sfc_main$1,{modelValue:I.value,"onUpdate:modelValue":ae[0]||(ae[0]=Ue=>I.value=Ue)},null,8,["modelValue"])])]),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Vs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Le,onChangeVisible:lt,onBlurChange:Ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Os,[e.createVNode(de,{onClick:be,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(de,{class:"ok-button button",onClick:e.unref(We),id:"themeButton"},{default:e.withCtx(()=>ae[8]||(ae[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:g.value,onBeforeDestroy:be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ms,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:be,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ce},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},zo=Rt._export_sfc(zs,[["__scopeId","data-v-20850524"]]),Rs={class:"step-module content"},Ps={class:"module-data"},Fs={class:"step-module layout"},Ls={class:"form-content"},$s=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:c}){const i=a,l=c,s=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),w=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),D=e.ref({}),A=e.ref([]),I=J=>{var K;D.value=J,l("change",(K=W())==null?void 0:K.compData)},F=(J,K)=>{var ce,C;switch(J){case"create":(ce=d.value)==null||ce.forEach(P=>{P.value=""}),h.value="create",g.visible=!0;break;case"update":(C=d.value)==null||C.forEach(P=>{P.value=K[P==null?void 0:P.prop]}),h.value="update",g.visible=!0;break;case"delete":A.value.splice(K,1),h.value="delete";break}},M=J=>{var K,ce,C;if((J==null?void 0:J.buttonName)==="确认"){const P=p.cloneDeep(J==null?void 0:J.content);switch(Object.keys(P).forEach(b=>{P[b]===""&&delete P[b]}),h.value){case"create":A.value.push({...P,index:((K=A.value)==null?void 0:K.length)+1});break;case"update":A.value=(ce=A.value)==null?void 0:ce.map(b=>b.index===(P==null?void 0:P.index)?{...b,title:P==null?void 0:P.title,description:P==null?void 0:P.description}:b);break}l("change",(C=W())==null?void 0:C.compData),g.visible=!1}else g.visible=!1},W=()=>({comp:"Step",compData:[{key:"stepList",contents:A.value},{key:"stepConfig",contents:D.value}]}),De=()=>{g.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,J=>{var K,ce;J&&(D.value=((K=J==null?void 0:J.find(C=>C.key==="stepConfig"))==null?void 0:K.contents)??{},A.value=((ce=J==null?void 0:J.find(C=>C.key==="stepList"))==null?void 0:ce.contents)??[])},{immediate:!0}),(J,K)=>{const ce=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Rs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=P=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(ce,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(P,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.title),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:V=>F("update",{...P,index:b+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:V=>F("delete",b)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Fs,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:s.value,onChange:I},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:De,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ls,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:w.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),js=Rt._export_sfc($s,[["__scopeId","data-v-7dbd17f2"]]),Ks={class:"step-module content"},Us={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:c}){const i=a,l=c,s=e.ref("create"),d=e.ref({}),w=e.ref([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),A=e.reactive({visible:!1,width:"40%",title:"时间线"}),I=J=>{var K;d.value=J,l("change",(K=W())==null?void 0:K.compData)},F=(J,K)=>{var ce,C;switch(J){case"create":(ce=h.value)==null||ce.forEach(P=>{P.value=""}),s.value="create",A.visible=!0;break;case"update":(C=h.value)==null||C.forEach(P=>{P.value=K[P==null?void 0:P.prop]}),s.value="update",A.visible=!0;break;case"delete":w.value.splice(K,1),s.value="delete";break}},M=J=>{var K,ce,C,P;if((J==null?void 0:J.buttonName)==="确认"){const b=p.cloneDeep(J==null?void 0:J.content);switch(Object.keys(b).forEach(V=>{b[V]===""&&delete b[V]}),s.value){case"create":(ce=w.value)==null||ce.push({...b,index:((K=w.value)==null?void 0:K.length)+1});break;case"update":w.value=(C=w.value)==null?void 0:C.map(V=>V.index===(b==null?void 0:b.index)?{...V,content:b==null?void 0:b.content,timestamp:b==null?void 0:b.timestamp}:V);break}l("change",(P=W())==null?void 0:P.compData),A.visible=!1}else A.visible=!1},W=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:w.value},{key:"timeLineConfig",contents:d.value}]}),De=()=>{A.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,J=>{var K,ce;J&&(d.value=((K=J==null?void 0:J.find(C=>C.key==="timeLineConfig"))==null?void 0:K.contents)??{},w.value=((ce=J==null?void 0:J.find(C=>C.key==="timeLineList"))==null?void 0:ce.contents)??[])},{immediate:!0}),(J,K)=>{const ce=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Ks,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=P=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(ce,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(P,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.content),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:V=>F("update",{...P,index:b+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:V=>F("delete",b)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:g.value,onChange:I},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:A.visible,title:A.title,onBeforeDestroy:De,width:A.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Xs=Rt._export_sfc(qs,[["__scopeId","data-v-39ffc861"]]),Gs={};function Ys(a,c){return e.openBlock(),e.createElementBlock("div")}const Js=Rt._export_sfc(Gs,[["render",Ys]]),Zs={class:"extra-content"},Qs={key:0},ec={key:1},tc={class:"dialog-footer"},nc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:c}){const i=a,l=e.ref(0),s=e.ref(),d=e.ref(),w=c,g=e.ref(!1),h=e.ref({}),D=e.ref({}),A=e.ref();e.watch(()=>[i.itemData],()=>{var P;const C=p.cloneDeep(i.itemData);s.value=(P=p.cloneDeep(C))==null?void 0:P.map(b=>{var V;if(b.key==="extra"){let S=[];(V=b.value)==null||V.forEach(re=>{var Le;S.push((Le=Object.values(re))==null?void 0:Le[0])}),b.value=S}return b})},{deep:!0,immediate:!0});const I=(C,P,b,V)=>{var re;let S={};((re=C==null?void 0:C[0])==null?void 0:re.contents)==="详情"&&(g.value=!0,S[P]=C,d.value=C==null?void 0:C.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),h.value=S,D.value=b,A.value=V.id)},F=C=>{var Le,lt,Ve,We;const P=(lt=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:lt.filter(be=>(be==null?void 0:be.key)==="tableContentName"),b=(We=(Ve=Object.values(p.cloneDeep(h.value)))==null?void 0:Ve[0])==null?void 0:We.filter(be=>(be==null?void 0:be.key)!=="tableContentName"),V=b==null?void 0:b.map((be,B)=>{var ae;return B===C.index&&(be==null?void 0:be.comp)==="Table"&&(be.compData=(ae=be.compData)==null?void 0:ae.map(te=>{var de,Ue;return(te==null?void 0:te.key)==="tableContents"&&(te.contents=(Ue=(de=C.content)==null?void 0:de.map(ut=>{let Ne={};for(let E in ut)E!=="id"&&(Ne[E]=ut[E]);return Ne}))==null?void 0:Ue.map(ut=>Object.values(ut))),te})),be});V.unshift(P==null?void 0:P[0]);let S=p.cloneDeep(h.value),re={};for(let be in S)re[be]=V;h.value=re},M=()=>{g.value=!1,h.value={},D.value={},A.value=void 0,l.value++},W=C=>{var Le,lt,Ve,We;const P=(lt=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:lt.filter(be=>(be==null?void 0:be.key)==="tableContentName"),b=(We=(Ve=Object.values(p.cloneDeep(h.value)))==null?void 0:Ve[0])==null?void 0:We.filter(be=>(be==null?void 0:be.key)!=="tableContentName"),V=b==null?void 0:b.map((be,B)=>(B===C.index&&(be.compData=C.contents),be));V.unshift(P==null?void 0:P[0]);let S=p.cloneDeep(h.value),re={};for(let be in S)re[be]=V;h.value=re},De=()=>{var P,b;let C={};for(let V in D.value)V===((P=Object.keys(h.value))==null?void 0:P[0])?C[V]=(b=Object.values(h.value))==null?void 0:b[0]:C[V]=D.value[V];w("change",{buttonName:"编辑",index:A.value,singleContent:C},"methodData"),g.value=!1,h.value={},D.value={},A.value=void 0},J=()=>{g.value=!1,h.value={},D.value={},A.value=void 0},K=C=>{w("change",C,"methodData")},ce=C=>fa(C);return(C,P)=>{const b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Zs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(V,S)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(V==null?void 0:V.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Qs)):(e.openBlock(),e.createElementBlock("div",ec,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ce(V.comp)),{itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:S,index:(V==null?void 0:V.id)??S,onContentClick:I,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Gt.ssDialog,{visible:g.value,onBeforeDestroy:J},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(V,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ce(V.comp)),{itemData:V==null?void 0:V.compData,onChange:F,childItemData:V==null?void 0:V.itemChildData,key:S,onContentChange:W,index:(V==null?void 0:V.id)??S,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",tc,[e.createVNode(b,{class:"cancel-button footer-button",onClick:M,id:"themeBorderButton"},{default:e.withCtx(()=>P[0]||(P[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(b,{class:"confirm-button footer-button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>P[1]||(P[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},ac=Rt._export_sfc(nc,[["__scopeId","data-v-2d9c5ab2"]]);let Et="$R";const oc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),lc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),rc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),ba=a=>{let c=a;const i=[];let l="";for(const s of c)s.includes("{")||l.includes("{")||s.includes("[")||l.includes("[")||s.includes("【")||l.includes("【")||s.includes("(")||l.includes("(")||s.includes("(")||l.includes("(")||s.includes("/*")||l.includes("/*")||s.includes("&")||l.includes("&")?(l+=s.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(i.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):i.push(s.trim().replace(/\/\*[\s\S]*?\*\//g,""));return i},wa=(a,c)=>{let i=a;const l=[];let s="",d=0;for(const w of i)d++,w.includes("{")||s.includes("{")||w.includes("[")||s.includes("[")||w.includes("【")||s.includes("【")||w.includes("(")||s.includes("(")||w.includes("(")||s.includes("(")||w.includes("/*")||s.includes("/*")?(s+=w.trim(),p.cloneDeep(s).split("{").length-1===p.cloneDeep(s).split("}").length-1&&p.cloneDeep(s).split("【").length-1===p.cloneDeep(s).split("】").length-1&&p.cloneDeep(s).split("[").length-1===p.cloneDeep(s).split("]").length-1&&p.cloneDeep(s).split("(").length-1===p.cloneDeep(s).split(")").length-1&&p.cloneDeep(s).split("(").length-1===p.cloneDeep(s).split(")").length-1&&p.cloneDeep(s).split("/*").length-1===p.cloneDeep(s).split("*/").length-1&&s[s.length-1]!==","&&s[s.length-1]===c?(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""):d===(a==null?void 0:a.length)&&l.push(s.replace(/\/\*[\s\S]*?\*\//g,""))):(s+=w.trim(),(s==null?void 0:s[(s==null?void 0:s.length)-1])===c&&(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""));return l},ic=(a,c)=>{let i=a;const l=[];let s="",d=0;for(const w of i)d++,w.includes("{")||s.includes("{")||w.includes("[")||s.includes("[")||w.includes("【")||s.includes("【")||w.includes("(")||s.includes("(")||w.includes("(")||s.includes("(")||w.includes("/*")||s.includes("/*")?(s+=w.trim(),p.cloneDeep(s).split("{").length-1===p.cloneDeep(s).split("}").length-1&&p.cloneDeep(s).split("【").length-1===p.cloneDeep(s).split("】").length-1&&p.cloneDeep(s).split("[").length-1===p.cloneDeep(s).split("]").length-1&&p.cloneDeep(s).split("(").length-1===p.cloneDeep(s).split(")").length-1&&p.cloneDeep(s).split("(").length-1===p.cloneDeep(s).split(")").length-1&&p.cloneDeep(s).split("/*").length-1===p.cloneDeep(s).split("*/").length-1&&(s[s.length-1]===":"||s[s.length-1]===c)&&(s.match(/'/g)||[]).length%2===0?(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""):d===(a==null?void 0:a.length)&&(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s="")):(s+=w.trim(),((s==null?void 0:s[(s==null?void 0:s.length)-1])===c||s[s.length-1]===":")&&(s.match(/'/g)||[]).length%2===0&&(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""));return(s==null?void 0:s.length)!==0&&l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),l},Ro=(a,c)=>{let i=0;for(let l=0;l<a.length;l++)a[l]===c&&i++;return i%2===0},io=(a,c)=>{let i=a;const l=[];let s="",d=0;for(const w of i)d++,w.includes("{")||s.includes("{")||w.includes("[")||s.includes("[")||w.includes("【")||s.includes("【")||w.includes("(")||s.includes("(")||w.includes("(")||s.includes("(")||w.includes("/*")||s.includes("/*")?(s+=w.trim(),p.cloneDeep(s).split("{").length-1===p.cloneDeep(s).split("}").length-1&&p.cloneDeep(s).split("【").length-1===p.cloneDeep(s).split("】").length-1&&p.cloneDeep(s).split("[").length-1===p.cloneDeep(s).split("]").length-1&&p.cloneDeep(s).split("(").length-1===p.cloneDeep(s).split(")").length-1&&p.cloneDeep(s).split("(").length-1===p.cloneDeep(s).split(")").length-1&&p.cloneDeep(s).split("/*").length-1===p.cloneDeep(s).split("*/").length-1&&s[s.length-1]===c&&Ro(s,"'")?(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""):d===(a==null?void 0:a.length)&&(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s="")):(s+=w.trim(),(s==null?void 0:s[(s==null?void 0:s.length)-1])===c&&Ro(s,"'")&&(l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),s=""));return(s==null?void 0:s.length)!==0&&l.push(s.replace(/\/\*[\s\S]*?\*\//g,"")),l},sc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),cc=a=>{var c,i,l,s,d,w,g,h,D,A,I,F,M,W,De,J,K,ce,C,P,b,V,S,re,Le,lt,Ve,We,be,B,ae,te,de,Ue,ut,Ne,E,_e,ie,Fe,$e,xe,je,pt,G,Qe,ft,tt,ee,oe,we,he,Je,et,k,x,R,ne,m,T,U,j,H,Z,X,Y,fe,q,se,$,Ae,Se,ke,z,pe,ve,ge,Me,Ze,Ce,Re,Te;if(rc(a)){let it={},me=(l=(i=(c=a==null?void 0:a.replace(":",Et))==null?void 0:c.split(Et))==null?void 0:i[0])==null?void 0:l.replaceAll("'",""),ue="",He="",le=(d=(s=a==null?void 0:a.replace(":",Et))==null?void 0:s.split(Et))==null?void 0:d[1];if((le==null?void 0:le[0])==="("&&(He=(h=(g=(w=le==null?void 0:le.split("("))==null?void 0:w[1])==null?void 0:g.split(")"))==null?void 0:h[0],le=(A=(D=le==null?void 0:le.replace(")",Et))==null?void 0:D.split(Et))==null?void 0:A[1]),((I=io(le,"/"))==null?void 0:I.length)>1)ue=(F=io(le,"/"))==null?void 0:F.map(Ie=>Ie==null?void 0:Ie.replaceAll("/","").replaceAll("'",""));else if(le.includes("{")||le.includes("("))if(le.includes("{")?ue=ue+((ce=(K=(J=(De=(W=(M=le==null?void 0:le.split("{"))==null?void 0:M[1])==null?void 0:W.split("}"))==null?void 0:De[0])==null?void 0:J.replaceAll(":","/").replaceAll("'",""))==null?void 0:K.replaceAll("[","(["))==null?void 0:ce.replaceAll("]","])"))+"[":ue=ue+((re=(S=(V=(b=(P=(C=le==null?void 0:le.split("("))==null?void 0:C[1])==null?void 0:P.split(")"))==null?void 0:b[0])==null?void 0:V.replaceAll(":","/").replaceAll("'",""))==null?void 0:S.replaceAll("[","(["))==null?void 0:re.replaceAll("]","])"))+"[",!((Le=le==null?void 0:le.split(")"))!=null&&Le[1]))ue=ue+((We=(Ve=(lt=le==null?void 0:le.split("["))==null?void 0:lt[1])==null?void 0:Ve.split("]"))==null?void 0:We[0])+"]";else{const Ie=(te=(ae=(B=(be=le==null?void 0:le.split(")"))==null?void 0:be[1])==null?void 0:B.replace("[",Et))==null?void 0:ae.split(Et))==null?void 0:te[1];if(le!=null&&le.includes("?"))ue=((de=le==null?void 0:le.split("?"))==null?void 0:de[1])+"&&"+((ut=(Ue=le==null?void 0:le.split("?"))==null?void 0:Ue[0])==null?void 0:ut.replaceAll("#","==="));else if(Ie){const ze=Ie.lastIndexOf("]"),qe=Ie.substring(0,ze)+Et+Ie.substring(ze+1);ue=ue+((Ne=qe==null?void 0:qe.split(Et))==null?void 0:Ne[0])+"]"}else ue=(ie=(_e=(E=a==null?void 0:a.replace(":",Et))==null?void 0:E.split(Et))==null?void 0:_e[1])==null?void 0:ie.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))ue=(xe=($e=(Fe=a==null?void 0:a.replace(":",Et))==null?void 0:Fe.split(Et))==null?void 0:$e[1])==null?void 0:xe.replaceAll("'","");else{let Ie=(G=(pt=(je=a==null?void 0:a.replace(":",Et))==null?void 0:je.split(Et))==null?void 0:pt[1])==null?void 0:G.replaceAll("'","");ue=((tt=(ft=(Qe=Ie==null?void 0:Ie.split("?"))==null?void 0:Qe[1])==null?void 0:ft.split(":"))==null?void 0:tt[0])+"&&"+((ee=Ie==null?void 0:Ie.split("?"))==null?void 0:ee[0])}return it[me]=He!==""?He+"$##"+ue:ue,{groupName:"",formContents:[[it]]}}else{let it={},me="",ue="";if(a.includes("#")){me=(we=(oe=a==null?void 0:a.split("#"))==null?void 0:oe[0])==null?void 0:we.replaceAll("'","");let He=(Je=(he=a==null?void 0:a.split("#"))==null?void 0:he[1])==null?void 0:Je.replaceAll("'","");He!=null&&He.includes("{")?ue=ue+((R=(x=(k=(et=He==null?void 0:He.split("{"))==null?void 0:et[1])==null?void 0:k.split("}"))==null?void 0:x[0])==null?void 0:R.replaceAll(":","/").replaceAll("'",""))+"[":ue=ue+((U=(T=(m=(ne=He==null?void 0:He.split("("))==null?void 0:ne[1])==null?void 0:m.split(")"))==null?void 0:T[0])==null?void 0:U.replaceAll(":","/").replaceAll("'",""))+"[",ue=ue+((fe=(H=(j=He==null?void 0:He.replace("[",Et))==null?void 0:j.split(Et))==null?void 0:H[1])==null?void 0:fe.slice(0,((Y=(X=(Z=He==null?void 0:He.replace("[",Et))==null?void 0:Z.split(Et))==null?void 0:X[1])==null?void 0:Y.length)-1))}else{let He=($=(se=(q=a==null?void 0:a.split("]"))==null?void 0:q[0])==null?void 0:se.split("["))==null?void 0:$[1];if((Ae=He==null?void 0:He.split(":"))==null||Ae.forEach((le,Ie)=>{var ze;((ze=He==null?void 0:He.split(":"))==null?void 0:ze.length)-1===Ie&&(me=le==null?void 0:le.replaceAll("'",""))}),!(a!=null&&a.includes("[")))ue=((pe=(z=(ke=(Se=a==null?void 0:a.split("]"))==null?void 0:Se[1])==null?void 0:ke.replace(":",Et).split(Et))==null?void 0:z[1])==null?void 0:pe.replaceAll("'",""))??"";else{let le=(Re=(Ce=(Ze=(Me=(ge=(ve=p.cloneDeep(a))==null?void 0:ve.split("("))==null?void 0:ge[1])==null?void 0:Me.split(")"))==null?void 0:Ze[0])==null?void 0:Ce.replaceAll("{","").replaceAll("}",""))==null?void 0:Re.replaceAll("'","").replaceAll(":","/"),Ie="";(Te=He==null?void 0:He.split(":"))==null||Te.forEach(ze=>{Ie=Ie===""?Ie+(ze==null?void 0:ze.replaceAll("'","")):Ie+":"+(ze==null?void 0:ze.replaceAll("'",""))}),ue=le+"["+Ie+"]"}}return it[me]=ue,{groupName:"",formContents:[[it]]}}},uc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),pc=(a,c)=>{let i=a.length;for(;i--;)if(a[i]===")")return a.substring(0,i)+c+a.substring(i+1);return a},dc=a=>{var d,w,g,h,D;let c=a.slice(1,a.length-1),i;(c==null?void 0:c[0])==="["?i=(w=(d=ba(p.cloneDeep(c)))==null?void 0:d.filter(A=>A!==","))==null?void 0:w.map(A=>A==null?void 0:A.slice(1,A.length-1)):(c="["+p.cloneDeep(c)+"]",i=(h=(g=ba(p.cloneDeep(c)))==null?void 0:g.filter(A=>A!==","))==null?void 0:h.map(A=>A==null?void 0:A.slice(1,A.length-1))),i=(D=p.cloneDeep(i))==null?void 0:D.map(A=>{var I,F;return A=(F=(I=A.replace(")",Et))==null?void 0:I.split(Et))==null?void 0:F[1],A});let l=[],s=[];return i==null||i.forEach(A=>{var M,W,De,J,K,ce,C,P,b,V,S,re,Le,lt,Ve,We,be,B,ae,te,de,Ue,ut,Ne,E,_e,ie,Fe,$e,xe,je,pt,G,Qe,ft,tt,ee,oe,we,he,Je,et,k,x,R,ne,m,T;let I=(W=(M=p.cloneDeep(A))==null?void 0:M.slice(1,p.cloneDeep(A).length-1))==null?void 0:W.replace(":",Et).split(Et);if(((J=(De=p.cloneDeep(I))==null?void 0:De[0])==null?void 0:J.replaceAll("'",""))==="输入"){if(!((ce=(K=p.cloneDeep(I))==null?void 0:K[1])!=null&&ce.includes("["))&&!((P=(C=p.cloneDeep(I))==null?void 0:C[1])!=null&&P.includes("("))){Be.IsJson((b=p.cloneDeep(I))==null?void 0:b[1].replaceAll("'",'"'))&&s.push(JSON.parse((V=p.cloneDeep(I))==null?void 0:V[1].replaceAll("'",'"')));return}if(((re=(S=p.cloneDeep(I))==null?void 0:S[1])==null?void 0:re[0])==="["){let U=(We=(Le=p.cloneDeep(I))==null?void 0:Le[1])==null?void 0:We.slice(1,((Ve=(lt=p.cloneDeep(I))==null?void 0:lt[1])==null?void 0:Ve.length)-1);(B=(be=ba(U))==null?void 0:be.filter(j=>j!==","))==null||B.forEach(j=>{var fe,q,se,$,Ae,Se,ke,z,pe,ve,ge,Me,Ze,Ce,Re,Te,it,me,ue,He,le,Ie;let H={},Z=(se=(q=p.cloneDeep(j))==null?void 0:q.slice(1,((fe=p.cloneDeep(j))==null?void 0:fe.length)-1))==null?void 0:se.replace(":",Et).split(Et),X=($=Z==null?void 0:Z[0])==null?void 0:$.replaceAll("'",""),Y;(Ae=Z==null?void 0:Z[1])!=null&&Ae.includes("(")?(Y=(Ce=(Ze=(Me=(ge=(ve=(pe=(z=(ke=p.cloneDeep(Z))==null?void 0:ke[1])==null?void 0:z.replaceAll("{",""))==null?void 0:pe.replaceAll("}",""))==null?void 0:ve.split("("))==null?void 0:ge[1])==null?void 0:Me.split(")"))==null?void 0:Ze[0])==null?void 0:Ce.replaceAll(":","/").replaceAll("'",""),(Te=(Re=p.cloneDeep(Z))==null?void 0:Re[1])!=null&&Te.includes("[")&&(Y=p.cloneDeep(Y)+"["+((Ie=(le=(He=(ue=(me=(it=p.cloneDeep(Z))==null?void 0:it[1])==null?void 0:me.split("["))==null?void 0:ue[1])==null?void 0:He.split("]"))==null?void 0:le[0])==null?void 0:Ie.replaceAll("'",""))+"]")):Y=(Se=Z==null?void 0:Z[1])==null?void 0:Se.replaceAll("'",""),H[X]=Y,s.push(H)})}}else{if(!((te=(ae=p.cloneDeep(I))==null?void 0:ae[1])!=null&&te.includes("["))&&!((Ue=(de=p.cloneDeep(I))==null?void 0:de[1])!=null&&Ue.includes("("))){Be.IsJson((ut=p.cloneDeep(I))==null?void 0:ut[1].replaceAll("'",'"'))&&l.push(JSON.parse((Ne=p.cloneDeep(I))==null?void 0:Ne[1].replaceAll("'",'"')));return}if(((_e=(E=p.cloneDeep(I))==null?void 0:E[1])==null?void 0:_e[0])==="["){let U=(xe=(ie=p.cloneDeep(I))==null?void 0:ie[1])==null?void 0:xe.slice(1,(($e=(Fe=p.cloneDeep(I))==null?void 0:Fe[1])==null?void 0:$e.length)-1);(pt=(je=ba(U))==null?void 0:je.filter(j=>j!==","))==null||pt.forEach(j=>{var fe,q,se,$,Ae,Se,ke,z,pe,ve,ge,Me,Ze,Ce,Re,Te,it,me,ue,He,le,Ie,ze,qe,O,Ee,ct,nt,dt,rt,Oe,Xe,Ye,at,vt,Tt;let H={},Z=(se=(q=p.cloneDeep(j))==null?void 0:q.slice(1,((fe=p.cloneDeep(j))==null?void 0:fe.length)-1))==null?void 0:se.replace(":",Et).split(Et),X=($=Z==null?void 0:Z[0])==null?void 0:$.replaceAll("'",""),Y;if(!((Ae=Z==null?void 0:Z[1])!=null&&Ae.includes("(")))Y=(Se=Z==null?void 0:Z[1])==null?void 0:Se.replaceAll("'","");else if(Y=(Me=(ge=(ve=(pe=(z=(ke=p.cloneDeep(Z))==null?void 0:ke[1])==null?void 0:z.replaceAll("{",""))==null?void 0:pe.replaceAll("}",""))==null?void 0:ve.replace("(",Et))==null?void 0:ge.split(Et))==null?void 0:Me[1],Y=(Ce=(Ze=pc(p.cloneDeep(Y),Et))==null?void 0:Ze.split(Et))==null?void 0:Ce[0],!(Y!=null&&Y.includes("(")))Y=(Re=p.cloneDeep(Y))==null?void 0:Re.replaceAll(":","/").replaceAll("'",""),(it=(Te=p.cloneDeep(Z))==null?void 0:Te[1])!=null&&it.includes("[")&&(Y=p.cloneDeep(Y)+"["+((Ee=(O=(qe=(ze=(ue=(me=p.cloneDeep(Z))==null?void 0:me[1])==null?void 0:ue.split("["))==null?void 0:ze[((Ie=(le=(He=p.cloneDeep(Z))==null?void 0:He[1])==null?void 0:le.split("["))==null?void 0:Ie.length)-1])==null?void 0:qe.split("]"))==null?void 0:O[0])==null?void 0:Ee.replaceAll("'",""))+"]");else{let It="";(ct=wa(Y,":"))==null||ct.forEach(wt=>{var Dt,Nt,Bt,Ut,Pt,At,qt,bn,pn,kn,Tn,dn,In,fn,Bn;if(!(wt!=null&&wt.includes("(")))It=It===""?It+((Dt=wt==null?void 0:wt.replaceAll(":",""))==null?void 0:Dt.replaceAll("'","")):It+"/"+((Nt=wt==null?void 0:wt.replaceAll(":",""))==null?void 0:Nt.replaceAll("'",""));else{let hn=(kn=(pn=(bn=(qt=(At=(Pt=(Ut=(Bt=p.cloneDeep(wt))==null?void 0:Bt.replaceAll("{",""))==null?void 0:Ut.replaceAll("}",""))==null?void 0:Pt.replace("(",Et))==null?void 0:At.split(Et))==null?void 0:qt[1])==null?void 0:bn.split(")"))==null?void 0:pn[0])==null?void 0:kn.replaceAll(":","/").replaceAll("'","");hn=hn+"["+((Bn=(fn=(In=(dn=(Tn=p.cloneDeep(wt))==null?void 0:Tn.split("["))==null?void 0:dn[1])==null?void 0:In.split("]"))==null?void 0:fn[0])==null?void 0:Bn.replaceAll("'",""))+"]",It=It===""?It+"["+hn+"]":It+"/["+hn+"]"}}),Y=It+"["+((Tt=(vt=(at=(Ye=(dt=(nt=p.cloneDeep(Z))==null?void 0:nt[1])==null?void 0:dt.split("["))==null?void 0:Ye[((Xe=(Oe=(rt=p.cloneDeep(Z))==null?void 0:rt[1])==null?void 0:Oe.split("["))==null?void 0:Xe.length)-1])==null?void 0:at.split("]"))==null?void 0:vt[0])==null?void 0:Tt.replaceAll("'",""))+"]"}H[X]=Y,l.push(H)})}else{let U=(tt=(G=p.cloneDeep(I))==null?void 0:G[1])==null?void 0:tt.slice(1,((ft=(Qe=p.cloneDeep(I))==null?void 0:Qe[1])==null?void 0:ft.length)-1),j={},H=(R=(x=(we=(oe=(ee=p.cloneDeep(U))==null?void 0:ee.split("]"))==null?void 0:oe[0])==null?void 0:we.split(":"))==null?void 0:x[((k=(et=(Je=(he=p.cloneDeep(U))==null?void 0:he.split("]"))==null?void 0:Je[0])==null?void 0:et.split(":"))==null?void 0:k.length)-1])==null?void 0:R.replaceAll("'",""),Z=((T=(m=(ne=p.cloneDeep(U))==null?void 0:ne.split("]"))==null?void 0:m[0])==null?void 0:T.replaceAll("'",""))+"]";j[H]=Z,l.push(j)}}}),{output:l,input:s}},fc=Be.useModelComp(p.pinia),{routeToChildPath:_n}=p.storeToRefs(fc),zn=Be.useMenuState(p.pinia),{activeMenuPath:aa}=p.storeToRefs(zn),ka=p.useLoginState(),{loginUserInfo:Xt}=p.storeToRefs(ka),hc=Be.useOriginalState(p.pinia),{originalPath:vc}=p.storeToRefs(hc),Jt=vc.value,gc=a=>{const c=/^name(\d+)$/,i=a==null?void 0:a.map(s=>{const d=[];for(const w in s){const g=w.match(c);g&&d.push({idx:Number(g[1]),value:s[w]})}return!d.length&&s.name&&d.push({idx:-1,value:s.name}),d.sort((w,g)=>w.idx-g.idx),{item:s,names:d}});function l(s,d){var g;if(!s)return[];if(d>=((g=s==null?void 0:s[0])==null?void 0:g.names.length))return s.map(h=>h.item);const w=new Map;for(const h of s){const D=h.names[d].value;w.has(D)||w.set(D,[]),w.get(D).push(h)}return Array.from(w.entries()).map(([h,D])=>{var A,I,F;return(D[0].names.length===1||(D==null?void 0:D.length)===1)&&((I=(A=D[0].names)==null?void 0:A[0])==null?void 0:I.idx)===-1?(F=D==null?void 0:D[0])==null?void 0:F.item:{name:h,isShow:!0,comp:"ParentItem",children:l(D,d+1)}})}if(i)return l(i,0)},Ia=a=>a!=null&&a.every(c=>{var i,l;return((l=(i=Object.keys(c))==null?void 0:i.filter(s=>s==null?void 0:s.includes("name")))==null?void 0:l.length)===1})?a:gc(a),Il=async()=>{var d,w,g,h,D,A,I,F,M,W,De,J,K,ce,C,P,b,V,S,re,Le,lt,Ve,We,be,B,ae,te,de,Ue,ut,Ne,E,_e,ie,Fe,$e,xe,je,pt,G,Qe,ft,tt,ee,oe,we,he,Je,et,k,x,R,ne,m,T,U,j,H,Z,X,Y,fe,q,se,$,Ae;zn.setImportLoading(!0);let a="";const c=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(_n).value,systemKey:sessionStorage.getItem("systemKey")}});if(((w=(d=c==null?void 0:c.data)==null?void 0:d.result)==null?void 0:w.length)>0){let Se=(M=(F=(I=(A=(D=(h=(g=c==null?void 0:c.data)==null?void 0:g.result)==null?void 0:h[0])==null?void 0:D.value)==null?void 0:A.pageData)==null?void 0:I.compData)==null?void 0:F.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:M.contents;a=(De=(W=p.cloneDeep(Se))==null?void 0:W[0])==null?void 0:De.label}let i=aa.value;(ce=aa.value)!=null&&ce.includes(`updateLoading${((J=Xt.value)==null?void 0:J.account)||((K=Xt.value)==null?void 0:K.账号)}`)?i=p.cloneDeep(aa).value:(b=aa.value)!=null&&b.includes(`loading${((C=Xt.value)==null?void 0:C.account)||((P=Xt.value)==null?void 0:P.账号)}`)&&(i=p.cloneDeep(_n).value+Jt+`loading${((V=Xt.value)==null?void 0:V.account)||((S=Xt.value)==null?void 0:S.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}});let s=[];if(((Le=(re=l==null?void 0:l.data)==null?void 0:re.result)==null?void 0:Le.length)>0){let Se="",ke=[];(Ve=(lt=l==null?void 0:l.data)==null?void 0:lt.result)==null||Ve.forEach(pe=>{var ve,ge,Me,Ze,Ce;((ge=(ve=pe==null?void 0:pe.value)==null?void 0:ve.pageData)==null?void 0:ge.comp)==="Form"&&((Ce=(Ze=(Me=pe==null?void 0:pe.value)==null?void 0:Me.pageData)==null?void 0:Ze.compData)==null||Ce.forEach(Re=>{(Re==null?void 0:Re.key)==="formContent"&&(ke=[...ke,...Re==null?void 0:Re.contents])}))});let z=ke==null?void 0:ke.find(pe=>(pe==null?void 0:pe.isMain)===!0);if(z?(Se=z==null?void 0:z.value,a=z==null?void 0:z.key):Se=(Ne=(ut=(Ue=(de=(te=(ae=(B=(be=(We=l==null?void 0:l.data)==null?void 0:We.result)==null?void 0:be[0])==null?void 0:B.value)==null?void 0:ae.pageData)==null?void 0:te.compData)==null?void 0:de.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:ut.find(pe=>{var ve,ge;return(pe==null?void 0:pe.key)===a||((ge=(ve=pe==null?void 0:pe.optionUrl)==null?void 0:ve.groupSelect)==null?void 0:ge[1])===a}))==null?void 0:Ne.value,(ie=aa.value)!=null&&ie.includes(`updateLoading${((E=Xt.value)==null?void 0:E.account)||((_e=Xt.value)==null?void 0:_e.账号)}`)){let pe=[],ve=[];const ge=await p.getInsofDataApi({key:{pageKey:(oe=aa.value.split(Jt+`updateLoading${((tt=Xt.value)==null?void 0:tt.account)||((ee=Xt.value)==null?void 0:ee.账号)}`))==null?void 0:oe[0],systemKey:sessionStorage.getItem("systemKey")}});if(((he=(we=ge==null?void 0:ge.data)==null?void 0:we.result)==null?void 0:he.length)>0){let Me=(Je=l==null?void 0:l.data)==null?void 0:Je.result,Ze=(et=p.cloneDeep(Me))==null?void 0:et.map(async Ce=>{var Re,Te,it,me,ue,He,le,Ie,ze,qe,O,Ee,ct,nt;if(((Re=Ce==null?void 0:Ce.key)==null?void 0:Re.type)==="structure"){let dt=(ue=(me=(it=(Te=Ce==null?void 0:Ce.value)==null?void 0:Te.pageData)==null?void 0:it.compData)==null?void 0:me.find(rt=>(rt==null?void 0:rt.key)==="parentFormPath"))==null?void 0:ue.contents;if(dt){let rt=await Be.getItemData(dt,sessionStorage.getItem("systemKey"),""),Oe=(ze=(Ie=(le=(He=Ce==null?void 0:Ce.value)==null?void 0:He.pageData)==null?void 0:le.compData)==null?void 0:Ie.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"))==null?void 0:ze.contents,Xe=rt==null?void 0:rt.filter(Ye=>(Ye==null?void 0:Ye.comp)==="Form");Xe==null||Xe.forEach(Ye=>{var at;(at=Ye==null?void 0:Ye.compData)==null||at.forEach(vt=>{var Tt,It;if((vt==null?void 0:vt.key)==="formContent"&&((Tt=vt==null?void 0:vt.contents)==null?void 0:Tt.some(Dt=>Oe==null?void 0:Oe.find(Nt=>(Nt==null?void 0:Nt.prop)===(Dt==null?void 0:Dt.prop))))){let Dt=Ye;Dt.compData=(It=Dt.compData)==null?void 0:It.map(Bt=>{var Ut;return(Bt==null?void 0:Bt.key)==="formContent"&&(Bt.contents=(Ut=Bt.contents)==null?void 0:Ut.map(Pt=>{var At;return Oe!=null&&Oe.find(qt=>(qt==null?void 0:qt.prop)===(Pt==null?void 0:Pt.prop))&&(Pt.value=(At=Oe==null?void 0:Oe.find(qt=>(qt==null?void 0:qt.prop)===(Pt==null?void 0:Pt.prop)))==null?void 0:At.value),Pt})),Bt});let Nt={};for(let Bt in Dt)Bt!=="id"&&(Nt[Bt]=Dt[Bt]);s.push({id:Ye==null?void 0:Ye.id,value:{pageData:Nt}})}})})}else if((O=(qe=ge==null?void 0:ge.data)==null?void 0:qe.result)!=null&&O.find(rt=>{var Oe,Xe,Ye,at;return((Xe=(Oe=rt==null?void 0:rt.value)==null?void 0:Oe.pageData)==null?void 0:Xe.name)===((at=(Ye=Ce==null?void 0:Ce.value)==null?void 0:Ye.pageData)==null?void 0:at.name)})){let rt=Ce==null?void 0:Ce.key;rt.pageKey=p.cloneDeep(_n).value+Jt+Se,s.push({id:(nt=(ct=(Ee=ge==null?void 0:ge.data)==null?void 0:Ee.result)==null?void 0:ct.find(Oe=>{var Xe,Ye,at,vt;return((Ye=(Xe=Oe==null?void 0:Oe.value)==null?void 0:Xe.pageData)==null?void 0:Ye.name)===((vt=(at=Ce==null?void 0:Ce.value)==null?void 0:at.pageData)==null?void 0:vt.name)}))==null?void 0:nt.id,key:rt,value:Ce==null?void 0:Ce.value})}else{let rt=Ce==null?void 0:Ce.key;rt.pageKey=p.cloneDeep(_n).value+Jt+Se,pe.push({key:rt,value:Ce==null?void 0:Ce.value})}}});await Promise.all(Ze),(x=(k=l==null?void 0:l.data)==null?void 0:k.result)==null||x.forEach(Ce=>{var Te,it,me;let Re=(Te=p.cloneDeep(Ce))==null?void 0:Te.key;Re.pageKey=p.cloneDeep(_n).value+Jt+Se+Jt+`updateLoading${((it=Xt.value)==null?void 0:it.account)||((me=Xt.value)==null?void 0:me.账号)}`,zn.setChildMenu(Re.pageKey),s.push({id:Ce==null?void 0:Ce.id,key:Re})})}if(Se===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),zn.setImportLoading(!1);return}if((s==null?void 0:s.length)>0){await p.batchUpdateInsofDataApi({dataList:s}),(R=s==null?void 0:s[0])!=null&&R.key&&await ka.setLogRecordAsync({type:"保存",data:s},(ne=s==null?void 0:s[0])==null?void 0:ne.key),(pe==null?void 0:pe.length)>0&&(await p.batchAddInsofDataApi({dataList:pe}),(m=pe==null?void 0:pe[0])!=null&&m.key&&await ka.setLogRecordAsync({type:"保存",data:pe},(T=pe==null?void 0:pe[0])==null?void 0:T.key));const Me=await p.getInsofDataApi({key:{pageKey:(H=aa.value.split(Jt+`updateLoading${((U=Xt.value)==null?void 0:U.account)||((j=Xt.value)==null?void 0:j.账号)}`))==null?void 0:H[0],systemKey:sessionStorage.getItem("systemKey")}});if(((X=(Z=Me==null?void 0:Me.data)==null?void 0:Z.result)==null?void 0:X.length)>0){let Ze=[],Ce=(Y=l==null?void 0:l.data)==null?void 0:Y.result;(fe=p.cloneDeep(Ce))==null||fe.forEach(Re=>{var Te,it,me,ue,He,le,Ie,ze,qe,O,Ee,ct;if(((Te=Re==null?void 0:Re.key)==null?void 0:Te.type)!=="structure"){let nt=(ue=(me=(it=Me==null?void 0:Me.data)==null?void 0:it.result)==null?void 0:me.filter(Xe=>{var Ye;return((Ye=Xe==null?void 0:Xe.key)==null?void 0:Ye.type)==="data"}))==null?void 0:ue.map(Xe=>Xe==null?void 0:Xe.id);Ze=[...Ze,...nt];let dt=(ze=(Ie=(le=(He=p.cloneDeep(Ce))==null?void 0:He.find(Xe=>{var Ye;return((Ye=Re==null?void 0:Re.key)==null?void 0:Ye.tableId)===(Xe==null?void 0:Xe.id)}))==null?void 0:le.value)==null?void 0:Ie.pageData)==null?void 0:ze.name,rt=(Ee=(O=(qe=Me==null?void 0:Me.data)==null?void 0:qe.result)==null?void 0:O.find(Xe=>{var Ye,at;return((at=(Ye=Xe==null?void 0:Xe.value)==null?void 0:Ye.pageData)==null?void 0:at.name)===dt}))==null?void 0:Ee.id,Oe=(ct=p.cloneDeep(Re))==null?void 0:ct.key;Oe.tableId=rt,Oe.pageKey=p.cloneDeep(_n).value+Jt+Se,ve.push({key:Oe,value:Re==null?void 0:Re.value})}}),(Ze==null?void 0:Ze.length)>0&&(Ze=[...new Set(Ze)],await p.batchDeleteInsofDataApi({ids:Ze})),(se=(q=l==null?void 0:l.data)==null?void 0:q.result)==null||se.forEach(Re=>{var it,me,ue;let Te=(it=p.cloneDeep(Re))==null?void 0:it.key;Te.pageKey=p.cloneDeep(_n).value+Jt+Se+Jt+`updateLoading${((me=Xt.value)==null?void 0:me.account)||((ue=Xt.value)==null?void 0:ue.账号)}`,zn.setChildMenu(Te.pageKey),s.push({id:Re==null?void 0:Re.id,key:Te})})}(ve==null?void 0:ve.length)>0&&(await p.batchAddInsofDataApi({dataList:ve}),($=pe==null?void 0:pe[0])!=null&&$.key&&await ka.setLogRecordAsync({type:"保存",data:ve},(Ae=ve==null?void 0:ve[0])==null?void 0:Ae.key)),p.ElMessage.success("保存成功")}}else{if(($e=(Fe=l==null?void 0:l.data)==null?void 0:Fe.result)==null||$e.forEach(pe=>{var ge;let ve=(ge=p.cloneDeep(pe))==null?void 0:ge.key;ve.pageKey=p.cloneDeep(_n).value+Jt+Se,zn.setChildMenu(ve.pageKey),s.push({id:pe==null?void 0:pe.id,key:ve})}),Se===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),zn.setImportLoading(!1),zn.setChildMenu("");return}(xe=s==null?void 0:s[0])!=null&&xe.key&&(await p.batchUpdateInsofDataApi({dataList:s}),await ka.setLogRecordAsync({type:"保存",data:s},(je=s==null?void 0:s[0])==null?void 0:je.key)),await Be.loadingConstruct(p.cloneDeep(_n).value+Jt+Se,p.cloneDeep(_n).value+Jt+Se+Jt+`updateLoading${((pt=Xt.value)==null?void 0:pt.account)||((G=Xt.value)==null?void 0:G.账号)}`),zn.setActiveMenuPath(p.cloneDeep(_n).value+Jt+Se+Jt+`updateLoading${((Qe=Xt.value)==null?void 0:Qe.account)||((ft=Xt.value)==null?void 0:ft.账号)}`),p.ElMessage.success("保存成功")}}zn.setImportLoading(!1)},mc={key:0,class:"method-content"},yc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const c=e.ref([]),i=Be.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(i),s=a,d=e.ref(!1),w=e.ref(),g=Be.useTableComp(p.pinia),{multipleTableConst:h}=p.storeToRefs(g),D=Be.useModelComp(p.pinia),A=e.ref(!1),I=Be.useMenuState(p.pinia),F=p.useLoginState(p.pinia),{itemData:M,isEdit:W,routeToChildPath:De,tableViewContents:J,lockingPage:K,payloadTypes:ce}=p.storeToRefs(D),{activeMenuPath:C,platform:P,childMenu:b}=p.storeToRefs(I),{loginUserInfo:V}=p.storeToRefs(F),S=e.ref(!1),re=(E,_e)=>{const ie=_e;return E==null?void 0:E.map(Fe=>{var $e;return Fe=($e=Fe==null?void 0:Fe.map((xe,je)=>{var pt,G;return xe!=null&&xe.id?{key:"id",value:xe==null?void 0:xe.id}:ie!=null&&ie.find(Qe=>Qe==null?void 0:Qe.id)||Fe!=null&&Fe.find(Qe=>Qe==null?void 0:Qe.id)?{key:(pt=ie[je-1])==null?void 0:pt.label,value:xe}:{key:(G=ie[je])==null?void 0:G.label,value:xe}}))==null?void 0:$e.filter(xe=>xe.key!=="操作"),Fe})},Le=async()=>{var E,_e;(E=c.value)!=null&&E.find(ie=>(ie==null?void 0:ie.buttonName)==="保存")&&await de((_e=c.value)==null?void 0:_e.find(ie=>(ie==null?void 0:ie.buttonName)==="保存")),await Il()};e.watch(()=>M.value,async()=>{W.value==="view"&&!S.value&&await Ne(p.cloneDeep(s.itemData)),S.value=!1},{deep:!0});const lt=()=>{d.value=!1,w.value=void 0},Ve=E=>E.map(_e=>{const ie={};for(const Fe in _e){const $e=_e[Fe];if(Fe.includes(h.value)){const xe=Fe.split(h.value);let je=ie;xe.forEach((pt,G)=>{G===xe.length-1?je[pt]=$e:(je[pt]||(je[pt]={}),je=je[pt])})}else ie[Fe]=$e}return ie}),We=async(E,_e,ie=[])=>{var $e,xe,je,pt,G,Qe,ft,tt,ee,oe,we,he,Je,et,k;let Fe=($e=p.cloneDeep(_e))==null?void 0:$e.filter(x=>(x==null?void 0:x.comp)!=="methodButton");if(E!=null&&E.includes("[")){let x=(Qe=(G=(pt=(je=(xe=p.cloneDeep(E))==null?void 0:xe.split("["))==null?void 0:je[1])==null?void 0:pt.split("]"))==null?void 0:G[0])==null?void 0:Qe.split(":"),R="";if(x!=null&&x[0]){let ne=(ft=Fe==null?void 0:Fe.find(m=>(m==null?void 0:m.name)===(x==null?void 0:x[0])))==null?void 0:ft.compData;if(!ne){let m=(tt=E==null?void 0:E.split("["))==null?void 0:tt[0],T=await Be.getItemData(m,sessionStorage.getItem("systemKey"),"",!1,"","",ie);ne=(ee=T==null?void 0:T.find(U=>(U==null?void 0:U.name)===(x==null?void 0:x[0])))==null?void 0:ee.compData}ne==null||ne.forEach(m=>{var T,U,j,H,Z,X;if((m==null?void 0:m.key)==="formContent")(T=m==null?void 0:m.contents)==null||T.forEach(Y=>{var fe;(Y==null?void 0:Y.key)===(x==null?void 0:x[1])&&(Array.isArray(Y==null?void 0:Y.value)?R=Y==null?void 0:Y.value:R=(fe=Y==null?void 0:Y.value)==null?void 0:fe.toString())});else if((m==null?void 0:m.key)==="tableContents"){let Y=[],fe=(U=ne==null?void 0:ne.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:U.contents,q=(x==null?void 0:x[1])??"";if(fe!=null&&fe.every(se=>Array.isArray(se))){let se=Be.getColumnChild((Z=fe==null?void 0:fe[0])==null?void 0:Z.filter($=>($==null?void 0:$.label)!=="操作"));(X=m.contents)==null||X.forEach($=>{let Ae={};$=$==null?void 0:$.filter(Se=>!(Se!=null&&Se.id)),se==null||se.forEach((Se,ke)=>{let z=$[ke];typeof $[ke]=="number"&&(z=$[ke].toString()),(q===""||q===Se.prop)&&(Ae[Se.prop]=z)}),Y.push(Ae)}),Y=Ve(Y)}else{let se=(j=fe==null?void 0:fe.map($=>$==null?void 0:$.label))==null?void 0:j.filter($=>$!=="操作");(H=m.contents)==null||H.forEach($=>{let Ae={};$=$==null?void 0:$.filter(Se=>!(Se!=null&&Se.id)),se==null||se.forEach((Se,ke)=>{let z=$[ke];typeof $[ke]=="number"&&(z=$[ke].toString()),(q===""||q===Se)&&(Ae[Se]=z)}),Y.push(Ae)})}R=Y}})}return R}else if(E!=null&&E.includes("/")){let x={};return(oe=p.cloneDeep(Fe))==null||oe.forEach((R,ne)=>{var m,T,U,j,H,Z,X,Y,fe,q,se,$,Ae,Se,ke,z,pe,ve,ge;if((R==null?void 0:R.comp)==="Table"){let Me=Array.isArray((U=(T=(m=R==null?void 0:R.compData)==null?void 0:m.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:T.contents)==null?void 0:U[0])?(X=(Z=(H=(j=R==null?void 0:R.compData)==null?void 0:j.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:H.contents)==null?void 0:Z[0])==null?void 0:X.some(Te=>Te==null?void 0:Te.children):[],Ze=(q=(fe=(Y=R==null?void 0:R.compData)==null?void 0:Y.find(Te=>(Te==null?void 0:Te.key)==="tableContents"))==null?void 0:fe.contents)==null?void 0:q.map(Te=>(Te!=null&&Te.find(it=>it==null?void 0:it.id)&&(Te=Te.slice(1)),Te)),Ce=(ke=(Se=(Ae=($=(se=R==null?void 0:R.compData)==null?void 0:se.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:$.contents)==null?void 0:Ae[0])==null?void 0:Se[0])==null?void 0:ke.label,Re=(pe=(z=R==null?void 0:R.compData)==null?void 0:z.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:pe.contents;if(Me)(Me==null?void 0:Me.length)===0?x[R.name]=x!=null&&x[R.name]?x[R.name]:re(Ze,Re):x[Ce]=re(Ze,Re);else{const Te=[];Re=Re.slice(1,Re.length-1),Re==null||Re.forEach((it,me)=>{Ze==null||Ze.forEach(ue=>{Te.push({key:it.label+ue[0],value:ue[me+1]})})}),x["form"+ne]=Te}}else{const Me=(ge=(ve=R.compData)==null?void 0:ve.find(Ce=>(Ce==null?void 0:Ce.key)==="formContent"))==null?void 0:ge.contents;x!=null&&x.form||(x.form=[]);const Ze=[];Me==null||Me.forEach(Ce=>{Ce.key!==""&&(Ce={key:(Ce==null?void 0:Ce.key)??(Ce==null?void 0:Ce.label),value:Ce==null?void 0:Ce.value},Ze.push(Ce))}),x.form=[...Ze,...p.cloneDeep(x==null?void 0:x.form)]}}),x}else{if(E==="createInsofDataApi"){let x=(we=p.cloneDeep(_e))==null?void 0:we[0];return x={comp:(he=p.cloneDeep(x))==null?void 0:he.comp,compData:(Je=p.cloneDeep(x))==null?void 0:Je.compData,name:(et=p.cloneDeep(x))==null?void 0:et.name,isShow:(k=p.cloneDeep(x))==null?void 0:k.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:C.value},value:{pageData:x}}}return E}},be=async(E,_e,ie)=>{var xe,je,pt;let Fe=await Be.getItemData(_e,sessionStorage.getItem("systemKey"),""),$e=Fe==null?void 0:Fe.find(G=>(G==null?void 0:G.name)===(ie==null?void 0:ie[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let G={};for(let he in p.cloneDeep(E))p.cloneDeep(E)[he]!=="loginUser"?G[he]=p.cloneDeep(E)[he]:G[he]=((xe=V.value)==null?void 0:xe.account)||((je=V.value)==null?void 0:je.账号);let Qe=[],ft=G;Array.isArray(E)||(ft=[G]),ft==null||ft.forEach(he=>{Qe.push({[he[ie[1]]]:he})});let tt=[],ee=Qe==null?void 0:Qe.map(he=>{var Je;return(Je=Object.keys(he))==null?void 0:Je[0]});Fe==null||Fe.forEach(he=>{var Je;(he==null?void 0:he.name)===(ie==null?void 0:ie[0])&&((Je=he==null?void 0:he.compData)==null||Je.forEach(et=>{var k;(et==null?void 0:et.key)==="tableContents"&&((k=et==null?void 0:et.contents)==null||k.forEach(x=>{x!=null&&x.some(R=>ee.includes(R))&&tt.push({[x.find(R=>R.id).id]:x.find(R=>ee.includes(R))})}))}))});let oe=tt==null?void 0:tt.map(he=>{var Je;return(Je=Object.keys(he))==null?void 0:Je[0]}),we=[];if(oe==null||oe.forEach(he=>{var k;let Je=(k=tt==null?void 0:tt.find(x=>{var R;return((R=Object.keys(x))==null?void 0:R[0].toString())===he.toString()}))==null?void 0:k[he],et=Qe==null?void 0:Qe.find(x=>{var R;return((R=Object.keys(x))==null?void 0:R[0])===Je});we.push({id:parseInt(he),value:{tableData:et[Je]}})}),(we==null?void 0:we.length)>0)return we}else if(($e==null?void 0:$e.comp)==="Form"){let G=p.cloneDeep($e);G.compData=(pt=G.compData)==null?void 0:pt.map(tt=>{var ee;return(tt==null?void 0:tt.key)==="formContent"&&(tt.contents=(ee=tt.contents)==null?void 0:ee.map(oe=>((oe==null?void 0:oe.key)===(ie==null?void 0:ie[1])&&(oe.value=(E==null?void 0:E[oe==null?void 0:oe.prop])||E),oe))),tt});let Qe={};for(let tt in G)tt!=="id"&&(Qe[tt]=G[tt]);let ft=[];if(ft.push({id:$e==null?void 0:$e.id,keyType:ie==null?void 0:ie[1],value:{pageData:Qe}}),(ft==null?void 0:ft.length)>0)return ft}}},B=async(E,_e,ie)=>{var xe,je,pt,G,Qe,ft,tt,ee,oe,we;let Fe=await Be.getItemData(_e,sessionStorage.getItem("systemKey"),""),$e=Fe==null?void 0:Fe.find(he=>(he==null?void 0:he.name)===(ie==null?void 0:ie[0]));if($e){if(($e==null?void 0:$e.comp)==="Table"){let he={};for(let Je in p.cloneDeep(E))p.cloneDeep(E)[Je]!=="loginUser"?he[Je]=p.cloneDeep(E)[Je]:he[Je]=((xe=V.value)==null?void 0:xe.account)||((je=V.value)==null?void 0:je.账号);await p.createInsofDataApi({key:{type:"data",pageKey:_e,tableId:$e==null?void 0:$e.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:he}})}else if(($e==null?void 0:$e.comp)==="Form"){let he=p.cloneDeep($e),Je=Object.keys(E),et="";(G=(pt=p.cloneDeep(he))==null?void 0:pt.compData)==null||G.forEach(T=>{var U,j;(T==null?void 0:T.key)==="formContent"&&((j=(U=p.cloneDeep(T))==null?void 0:U.contents)==null||j.forEach(H=>{var Z;Je.includes(H==null?void 0:H.key)&&(H==null?void 0:H.value)===((Z=V.value)==null?void 0:Z.姓名)&&(et=H==null?void 0:H.key)}))});let k=[];(Qe=Object.values(E[et]))==null||Qe.forEach(T=>{T!=null&&T.includes("(")&&k.push(T)}),k=[...new Set(k)];const x=k==null?void 0:k.map(async T=>{var X,Y,fe,q,se,$,Ae,Se,ke,z,pe,ve;let U="";($=(se=(q=(fe=(Y=(X=p.cloneDeep(T))==null?void 0:X.split("("))==null?void 0:Y[1])==null?void 0:fe.split(")"))==null?void 0:q[0])==null?void 0:se.split(":"))==null||$.forEach(ge=>{U=U===""?U+ge.replaceAll("'",""):U+"/"+ge.replaceAll("'","")});let j=[];(ve=(pe=(z=(ke=(Se=(Ae=p.cloneDeep(T))==null?void 0:Ae.split("<"))==null?void 0:Se[1])==null?void 0:ke.split(">"))==null?void 0:z[0])==null?void 0:pe.split(":"))==null||ve.forEach(ge=>{j.push(ge.replaceAll("'",""))});const H=await Be.getItemData(U,sessionStorage.getItem("systemKey"),"");let Z="";return H==null||H.forEach(ge=>{var Me;ge.name===(j==null?void 0:j[0])&&((Me=ge==null?void 0:ge.compData)==null||Me.forEach(Ze=>{var Ce;(Ze==null?void 0:Ze.key)==="formContent"&&((Ce=Ze.contents)==null||Ce.forEach(Re=>{(Re==null?void 0:Re.key)===(j==null?void 0:j[1])&&(Z=Re==null?void 0:Re.value)}))}))}),{[T]:Z}}),R=await Promise.all(x);he.compData=(tt=(ft=p.cloneDeep(he))==null?void 0:ft.compData)==null?void 0:tt.map(T=>{var U,j;return(T==null?void 0:T.key)==="formContent"&&(T.contents=(j=(U=p.cloneDeep(T))==null?void 0:U.contents)==null?void 0:j.map(H=>{var Z,X,Y,fe;return(Z=E[et])!=null&&Z[H==null?void 0:H.key]&&(E[et][H==null?void 0:H.key].includes("(")?H.value=(X=R==null?void 0:R.find(q=>{var se;return((se=Object.keys(q))==null?void 0:se[0])===E[et][H==null?void 0:H.key]}))==null?void 0:X[E[et][H==null?void 0:H.key]]:H.value=(fe=(Y=p.cloneDeep(E))==null?void 0:Y[et])==null?void 0:fe[H==null?void 0:H.key]),H})),T});const ne=await p.getInsofDataApi({key:{type:"structure",pageKey:_e,systemKey:sessionStorage.getItem("systemKey")}});let m="";((ee=ne==null?void 0:ne.data)==null?void 0:ee.type)==="success"&&((we=(oe=ne==null?void 0:ne.data)==null?void 0:oe.result)==null||we.forEach(T=>{var U,j;((j=(U=T==null?void 0:T.value)==null?void 0:U.pageData)==null?void 0:j.name)===(ie==null?void 0:ie[0])&&(m=T.id)}),await p.updateInsofDataApi({id:m,value:{pageData:he}}))}}},ae=(E,_e="",ie={})=>{for(const[Fe,$e]of Object.entries(E)){const xe=_e?`${_e}.${Fe}`:Fe;$e!==null&&typeof $e=="object"&&!Array.isArray($e)&&Object.prototype.toString.call($e)!=="[object Date]"?ae($e,xe,ie):ie[xe]=$e}return ie},te=async(E,_e,ie,Fe)=>{var je,pt,G,Qe,ft,tt,ee,oe,we,he,Je,et,k,x,R,ne,m,T,U,j,H,Z,X,Y,fe;let $e=await Be.getItemData(_e,sessionStorage.getItem("systemKey"),""),xe=$e==null?void 0:$e.find(q=>(q==null?void 0:q.name)===(ie==null?void 0:ie[0]));if(xe){if(!(ie!=null&&ie[1])&&(xe==null?void 0:xe.comp)==="Table"){let q={},se=[],$=(pt=(je=xe==null?void 0:xe.compData)==null?void 0:je.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:pt.contents;$!=null&&$.every(ke=>Array.isArray(ke))?se=(Qe=Be.getColumnChild((G=$==null?void 0:$[0])==null?void 0:G.filter(ke=>(ke==null?void 0:ke.label)!=="操作")))==null?void 0:Qe.map(ke=>ke==null?void 0:ke.prop):se=$==null?void 0:$.map(ke=>ke==null?void 0:ke.label);for(let ke in p.cloneDeep(E))if(p.cloneDeep(E)[ke]!=="loginUser"){let z=ae(p.cloneDeep(E)[ke]),pe={};for(let ve in z)if(se!=null&&se.find(ge=>ge===ve))pe[ve]=z[ve];else if(se!=null&&se.find(ge=>(ge==null?void 0:ge.toUpperCase())===(ve==null?void 0:ve.toUpperCase()))){let ge=se==null?void 0:se.find(Me=>(Me==null?void 0:Me.toUpperCase())===(ve==null?void 0:ve.toUpperCase()));pe[ge]=z[ve]}q[ke]=pe}else q[ke]=((ft=V.value)==null?void 0:ft.account)||((tt=V.value)==null?void 0:tt.账号);let Ae=await p.getInsofDataApi({keyLikes:{tableId:xe==null?void 0:xe.id}});if(((oe=(ee=Ae==null?void 0:Ae.data)==null?void 0:ee.result)==null?void 0:oe.length)>0){let ke=(he=(we=Ae==null?void 0:Ae.data)==null?void 0:we.result)==null?void 0:he.map(z=>z==null?void 0:z.id);(ke==null?void 0:ke.length)>0&&await p.batchDeleteInsofDataApi({ids:ke})}let Se=[];if((Je=xe==null?void 0:xe.compData)!=null&&Je.find(ke=>(ke==null?void 0:ke.key)==="pageColumn")&&((x=(k=(et=xe==null?void 0:xe.compData)==null?void 0:et.find(ke=>(ke==null?void 0:ke.key)==="pageColumn"))==null?void 0:k.contents)!=null&&x.includes("["))){const ke=await p.getInsofDataApi({id:xe==null?void 0:xe.tableId});let z=((T=(m=(ne=(R=ke==null?void 0:ke.data)==null?void 0:R.result)==null?void 0:ne[0])==null?void 0:m.key)==null?void 0:T.pageKey)??"";(U=Object.values(q))==null||U.forEach(pe=>{Se.push({key:{type:"data",pageKey:z,tableId:xe==null?void 0:xe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pe}})})}else(j=Object.values(q))==null||j.forEach(ke=>{Se.push({key:{type:"data",pageKey:_e,tableId:xe==null?void 0:xe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ke}})});(Se==null?void 0:Se.length)>0&&await p.batchAddInsofDataApi({dataList:Se})}else if(!(ie!=null&&ie[1])&&(xe==null?void 0:xe.comp)==="Form"){let q=p.cloneDeep(xe);q.compData=(Z=(H=p.cloneDeep(q))==null?void 0:H.compData)==null?void 0:Z.map(Ae=>{var Se,ke;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(ke=(Se=p.cloneDeep(Ae))==null?void 0:Se.contents)==null?void 0:ke.map(z=>{var pe,ve;return(pe=p.cloneDeep(E))!=null&&pe[z==null?void 0:z.key]&&(z.value=(ve=p.cloneDeep(E))==null?void 0:ve[z==null?void 0:z.key]),z})),Ae});const se=await p.getInsofDataApi({key:{type:"structure",pageKey:_e,systemKey:sessionStorage.getItem("systemKey")}});let $="";((X=se==null?void 0:se.data)==null?void 0:X.type)==="success"&&((fe=(Y=se==null?void 0:se.data)==null?void 0:Y.result)==null||fe.forEach(Ae=>{var Se,ke;((ke=(Se=Ae==null?void 0:Ae.value)==null?void 0:Se.pageData)==null?void 0:ke.name)===(ie==null?void 0:ie[0])&&($=Ae.id)}),await p.updateInsofDataApi({id:$,value:{pageData:q}}))}}},de=async E=>{var _e,ie,Fe,$e,xe,je,pt,G,Qe,ft,tt,ee,oe,we,he,Je;I.setImportLoading(!0);try{if(E.api){let et=new WeakMap;(ie=(_e=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ce.value})).data.result)==null?void 0:_e.filter(X=>{var Y,fe;return((Y=X==null?void 0:X.key)==null?void 0:Y.pageKey)!=="menu"&&((fe=X==null?void 0:X.key)==null?void 0:fe.pageKey)!=="secret"}))==null||ie.forEach(X=>{et[X.key.pageKey]?et[X.key.pageKey]=[...et[X.key.pageKey],X]:et[X.key.pageKey]=[X]});let x=await Be.getItemData((b==null?void 0:b.value)===""?C.value:b==null?void 0:b.value,sessionStorage.getItem("systemKey"),"",!1,"","",et),R="";if(x=x==null?void 0:x.map(X=>{var Y,fe,q,se,$,Ae,Se,ke,z,pe,ve,ge;if((X==null?void 0:X.comp)==="Form")X.compData=(Y=X.compData)==null?void 0:Y.map(Me=>{var Ze;return(Me==null?void 0:Me.key)==="formContent"&&(Me.contents=(Ze=Me.contents)==null?void 0:Ze.map(Ce=>{var Re;if((Ce==null?void 0:Ce.value)===""&&(Ce==null?void 0:Ce.type)==="Select"){let Te=Be.judgeContents((Re=p.cloneDeep(Ce))==null?void 0:Re.optionUrl,et);Ce.value=Ce.value||Te}return Ce})),Me});else if((X==null?void 0:X.comp)==="Table"&&(fe=X.compData)!=null&&fe.find(Me=>(Me==null?void 0:Me.key)==="pageColumn")){let Me=(se=(q=X.compData)==null?void 0:q.find(Te=>(Te==null?void 0:Te.key)==="pageColumn"))==null?void 0:se.contents,Ze=((Ae=($=X.compData)==null?void 0:$.find(Te=>(Te==null?void 0:Te.key)==="pageGroup"))==null?void 0:Ae.contents)??"",Ce=(z=(ke=(Se=Me==null?void 0:Me.split("["))==null?void 0:Se[1])==null?void 0:ke.split("]"))==null?void 0:z[0];R=((pe=Me==null?void 0:Me.split("["))==null?void 0:pe[0])+((ge=(ve=J.value)==null?void 0:ve.find(Te=>(Te==null?void 0:Te.key)===Ce))==null?void 0:ge.value)}return X}),!(R===""||R==="")){const X=await Be.getItemData(R,sessionStorage.getItem("systemKey"),"",!1,"","",et);x=x==null?void 0:x.map(Y=>{var fe,q,se,$,Ae,Se,ke,z,pe,ve,ge,Me,Ze;if((Y==null?void 0:Y.comp)==="Table"&&(fe=Y.compData)!=null&&fe.find(Ce=>(Ce==null?void 0:Ce.key)==="pageColumn")){let Ce=(se=(q=Y.compData)==null?void 0:q.find(ue=>(ue==null?void 0:ue.key)==="pageColumn"))==null?void 0:se.contents,Re=((Ae=($=Y.compData)==null?void 0:$.find(ue=>(ue==null?void 0:ue.key)==="pageGroup"))==null?void 0:Ae.contents)??"",Te=(z=(ke=(Se=Ce==null?void 0:Ce.split("["))==null?void 0:Se[1])==null?void 0:ke.split("]"))==null?void 0:z[0],it=((pe=Ce==null?void 0:Ce.split("["))==null?void 0:pe[0])+((ge=(ve=J.value)==null?void 0:ve.find(ue=>(ue==null?void 0:ue.key)===Te))==null?void 0:ge.value),me=(Me=X==null?void 0:X.find(ue=>(ue==null?void 0:ue.name)===(Re===""?s==null?void 0:s.compName:Re)))==null?void 0:Me.compData;Y.compData=(Ze=Y.compData)==null?void 0:Ze.map(ue=>{var He;return(ue==null?void 0:ue.key)==="tableContents"&&(ue.contents=(He=me==null?void 0:me.find(le=>(le==null?void 0:le.key)==="tableContents"))==null?void 0:He.contents),ue})}return Y})}let ne={};if((($e=(Fe=E==null?void 0:E.extraValues)==null?void 0:Fe.input)==null?void 0:$e.length)>0){const X=(je=(xe=E==null?void 0:E.extraValues)==null?void 0:xe.input)==null?void 0:je.map(async Y=>{var fe;Ue!=null&&Ue.find(q=>q===Y)?ne=await We(Y,x):ne[Object.keys(Y)[0]]=await We((fe=Object.values(Y))==null?void 0:fe[0],x,et)});await Promise.all(X)}else ne=await We("/",x);let m=!1;(G=(pt=E==null?void 0:E.extraValues)==null?void 0:pt.output)==null||G.forEach(X=>{var Y,fe;(fe=(Y=Object.values(X))==null?void 0:Y[0])!=null&&fe.includes(".doc")&&(m=!0)});let T;if(m){const X=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});T=await p.axios.post(E.api,ne,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{X.close()})}else T=await p.axios.post(E.api,ne,{headers:{"Content-Type":"application/json"}});let U=(ee=(tt=(ft=(Qe=p.cloneDeep(E))==null?void 0:Qe.extraValues)==null?void 0:ft.output)==null?void 0:tt.map(X=>{var Y,fe,q,se,$,Ae,Se,ke,z,pe,ve,ge,Me,Ze,Ce,Re;if(!((fe=(Y=Object.values(X))==null?void 0:Y[0])!=null&&fe.includes(".doc"))){let Te=(pe=(z=(ke=(se=p.cloneDeep((q=Object.values(X))==null?void 0:q[0]))==null?void 0:se.split("["))==null?void 0:ke[((Se=(Ae=p.cloneDeep(($=Object.values(X))==null?void 0:$[0]))==null?void 0:Ae.split("["))==null?void 0:Se.length)-1])==null?void 0:z.split("]"))==null?void 0:pe[0],it=Te==null?void 0:Te.split(":"),me=(Me=p.cloneDeep((ve=Object.values(X))==null?void 0:ve[0]))==null?void 0:Me.substring(0,p.cloneDeep((ge=Object.values(X))==null?void 0:ge[0]).lastIndexOf("["));if(me=(Ce=p.cloneDeep(me))==null?void 0:Ce.slice(0,((Ze=p.cloneDeep(me))==null?void 0:Ze.length)-1),me!=null&&me.includes("[")){let ue="";if((Re=wa(me,"/"))==null||Re.forEach(He=>{var le,Ie,ze,qe,O,Ee,ct;if(!(He!=null&&He.includes("[")))ue=ue===""?ue+He.replaceAll("/",""):ue+"/"+He.replaceAll("/","");else{let nt=p.cloneDeep(He).slice(1,((le=p.cloneDeep(He))==null?void 0:le.length)-1),dt=(Ee=(O=(qe=(ze=(Ie=p.cloneDeep(nt))==null?void 0:Ie.split("["))==null?void 0:ze[1])==null?void 0:qe.split("]"))==null?void 0:O[0])==null?void 0:Ee.split(":"),rt="",Oe=(ct=x==null?void 0:x.find(Xe=>(Xe==null?void 0:Xe.name)===(dt==null?void 0:dt[0])))==null?void 0:ct.compData;Oe==null||Oe.forEach(Xe=>{var Ye;(Xe==null?void 0:Xe.key)==="formContent"&&((Ye=Xe==null?void 0:Xe.contents)==null||Ye.forEach(at=>{(at==null?void 0:at.key)===(dt==null?void 0:dt[1])&&(rt=at==null?void 0:at.value)}))}),ue=ue===""?ue+rt.replaceAll("/",""):ue+"/"+rt.replaceAll("/","")}}),me=ue,me[(me==null?void 0:me.length)-1]!=="/")return me}}}))==null?void 0:ee.filter(X=>X);U=[...new Set(p.cloneDeep(U))];let j=U==null?void 0:U.map(async X=>{let Y=await Be.getItemData(X,sessionStorage.getItem("systemKey"),"",!1,"","",et);if((Y==null?void 0:Y.length)===0)return await Be.getParentContents(X)});await Promise.all(j);let H=[],Z=(he=(we=(oe=p.cloneDeep(E))==null?void 0:oe.extraValues)==null?void 0:we.output)==null?void 0:he.map(async X=>{var ke,z,pe,ve,ge,Me,Ze,Ce,Re,Te,it,me,ue,He,le,Ie,ze,qe,O,Ee,ct,nt,dt,rt,Oe,Xe,Ye,at,vt,Tt,It,wt,Dt,Nt,Bt,Ut,Pt,At,qt,bn,pn,kn,Tn,dn,In,fn,Bn,hn,qn,Xn,Gn,Kn,An,vn,Rn,Nn,an,xn,bt,Yt,gt,Yn,Vt,gn,Vn,on,On,Zt,Un,wn;if((z=(ke=Object.values(X))==null?void 0:ke[0])!=null&&z.includes(".doc")){var Y=new Blob([T.data],{type:"application/octet-stream;charset=UTF-8"}),fe=T.headers["content-disposition"],q=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),se=q.exec(fe),$=se==null?void 0:se[1],Ae=document.createElement("a"),Se=window.URL.createObjectURL(Y);w.value=[{name:$,blobUrl:Se}],d.value=!0}else{let Jn=(Te=(Re=(Ce=(ve=p.cloneDeep((pe=Object.values(X))==null?void 0:pe[0]))==null?void 0:ve.split("["))==null?void 0:Ce[((Ze=(Me=p.cloneDeep((ge=Object.values(X))==null?void 0:ge[0]))==null?void 0:Me.split("["))==null?void 0:Ze.length)-1])==null?void 0:Re.split("]"))==null?void 0:Te[0],Ft=Jn==null?void 0:Jn.split(":"),Wt=(ue=p.cloneDeep((it=Object.values(X))==null?void 0:it[0]))==null?void 0:ue.substring(0,p.cloneDeep((me=Object.values(X))==null?void 0:me[0]).lastIndexOf("["));if(Wt!=null&&Wt.includes("[")?Wt=(le=p.cloneDeep(Wt))==null?void 0:le.slice(0,((He=p.cloneDeep(Wt))==null?void 0:He.length)-1):Wt===""&&(Wt=C.value),Wt=Wt.replaceAll("<","[").replaceAll(">","]"),Wt!=null&&Wt.includes("[")){let kt="";(Ie=wa(Wt,"/"))==null||Ie.forEach((Ot,jt)=>{var Ht,Lt,ln,rn,Zn,Dn,Qn,Ba,sa,ha,Aa;if(!(Ot!=null&&Ot.includes("[")))kt=kt===""?kt+Ot.replaceAll("/",""):kt+"/"+Ot.replaceAll("/","");else{let Wn="",Cn="";(Ht=p.cloneDeep(Ot))!=null&&Ht.includes("]")?(Wn=p.cloneDeep(Ot).slice(1,((Lt=p.cloneDeep(Ot))==null?void 0:Lt.length)-1),Cn=(Qn=(Dn=(Zn=(rn=(ln=p.cloneDeep(Wn))==null?void 0:ln.split("["))==null?void 0:rn[1])==null?void 0:Zn.split("]"))==null?void 0:Dn[0])==null?void 0:Qn.split(":")):(Wn=p.cloneDeep(Ot).slice(1,(Ba=p.cloneDeep(Ot))==null?void 0:Ba.length),Cn=(sa=p.cloneDeep(Wn))==null?void 0:sa.split("/"));let ea="",ta=(ha=x==null?void 0:x.find(mn=>(mn==null?void 0:mn.name)===(Cn==null?void 0:Cn[0])))==null?void 0:ha.compData;ta==null||ta.forEach(mn=>{var Na;(mn==null?void 0:mn.key)==="formContent"&&((Na=mn==null?void 0:mn.contents)==null||Na.forEach(Qt=>{(Qt==null?void 0:Qt.key)===(Cn==null?void 0:Cn[1])&&(ea=Qt==null?void 0:Qt.value)}))}),((Aa=wa(Wt,"/"))==null?void 0:Aa.length)-1!==jt?kt=kt===""?kt+ea.replaceAll("/",""):kt+"/"+ea.replaceAll("/",""):kt=kt+l.value+ea.replaceAll("/","")}}),(ze=C.value)!=null&&ze.includes(kt)?Wt=C.value:Wt=kt}let sn=p.cloneDeep((qe=Object.keys(X))==null?void 0:qe[0]);if(((O=T==null?void 0:T.data)==null?void 0:O.statusCode)===200||((Ee=T==null?void 0:T.data)==null?void 0:Ee.code)===200){if(((nt=(ct=T==null?void 0:T.data)==null?void 0:ct.data)!=null&&nt[sn]||(rt=(dt=T==null?void 0:T.data)==null?void 0:dt.result)!=null&&rt[sn])&&(Ft==null?void 0:Ft.length)===1)return await te(((Xe=(Oe=T==null?void 0:T.data)==null?void 0:Oe.data)==null?void 0:Xe[sn])||((at=(Ye=T==null?void 0:T.data)==null?void 0:Ye.result)==null?void 0:at[sn]),p.cloneDeep(Wt),Ft,R);if((Tt=(vt=T==null?void 0:T.data)==null?void 0:vt.data)!=null&&Tt[sn]||(wt=(It=T==null?void 0:T.data)==null?void 0:It.result)!=null&&wt[sn]){let kt=await be(((Nt=(Dt=T==null?void 0:T.data)==null?void 0:Dt.data)==null?void 0:Nt[sn])||((Ut=(Bt=T==null?void 0:T.data)==null?void 0:Bt.result)==null?void 0:Ut[sn]),p.cloneDeep(Wt),Ft);return kt&&(H=[...H,...kt]),kt}else{if(!((Pt=T==null?void 0:T.data)!=null&&Pt.data)){let kt=await Be.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,"","",et);kt=kt==null?void 0:kt.map(jt=>{var Ht;return(jt==null?void 0:jt.name)===(Ft==null?void 0:Ft[0])&&(jt.compData=(Ht=jt.compData)==null?void 0:Ht.map(Lt=>{var ln;return(Lt==null?void 0:Lt.key)==="formContent"&&(Lt.contents=(ln=Lt.contents)==null?void 0:ln.map(rn=>{var Zn,Dn;return(rn==null?void 0:rn.key)===(Ft==null?void 0:Ft[1])&&(rn.value=(Dn=(Zn=T==null?void 0:T.data)==null?void 0:Zn.result)==null?void 0:Dn[sn==null?void 0:sn.replaceAll(":","")]),rn})),Lt})),jt});let Ot=[];(At=kt==null?void 0:kt.filter(jt=>(jt==null?void 0:jt.comp)==="Form"))==null||At.forEach(async jt=>{let Ht={};for(let Lt in jt)Lt!=="id"&&(Ht[Lt]=jt[Lt]);Ot.push({id:jt==null?void 0:jt.id,value:{pageData:Ht}})}),(Ot==null?void 0:Ot.length)>0&&await p.batchUpdateInsofDataApi({dataList:Ot});return}if((Ft==null?void 0:Ft.length)===1){const kt=(pn=(bn=(qt=T==null?void 0:T.data)==null?void 0:qt.data)==null?void 0:bn.path)==null?void 0:pn.path;let Ot="";(fn=(In=(dn=(Tn=(kn=kt==null?void 0:kt.split("("))==null?void 0:kn[1])==null?void 0:Tn.split(")"))==null?void 0:dn[0])==null?void 0:In.split(":"))==null||fn.forEach(Lt=>{var ln,rn;Ot=Ot===""?Ot+((ln=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:ln.trim()):Ot+"/"+((rn=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:rn.trim())});let jt=[(Gn=(Xn=(qn=(hn=(Bn=kt==null?void 0:kt.split("<"))==null?void 0:Bn[1])==null?void 0:hn.split(">"))==null?void 0:qn[0])==null?void 0:Xn.replaceAll("'",""))==null?void 0:Gn.trim()],Ht;return(vn=(An=(Kn=T==null?void 0:T.data)==null?void 0:Kn.data)==null?void 0:An.data)!=null&&vn[Ft==null?void 0:Ft[0]]?Ht=await te((an=(Nn=(Rn=T==null?void 0:T.data)==null?void 0:Rn.data)==null?void 0:Nn.data)==null?void 0:an[Ft==null?void 0:Ft[0]],Ot,Ft,R):Ht=await B((bt=(xn=T==null?void 0:T.data)==null?void 0:xn.data)==null?void 0:bt.data,Ot,jt,et),Ht}else{const kt=(Yn=(gt=(Yt=T==null?void 0:T.data)==null?void 0:Yt.data)==null?void 0:gt.path)==null?void 0:Yn.path;let Ot="";return(On=(on=(Vn=(gn=(Vt=kt==null?void 0:kt.split("("))==null?void 0:Vt[1])==null?void 0:gn.split(")"))==null?void 0:Vn[0])==null?void 0:on.split(":"))==null||On.forEach(Ht=>{var Lt,ln;Ot=Ot===""?Ot+((Lt=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:Lt.trim()):Ot+"/"+((ln=Ht==null?void 0:Ht.replaceAll("'",""))==null?void 0:ln.trim())}),await be((wn=(Un=(Zt=T==null?void 0:T.data)==null?void 0:Zt.data)==null?void 0:Un.data)==null?void 0:wn[Ft==null?void 0:Ft[0]],Ot,Ft)}}}}});if(await Promise.all(Z),(H==null?void 0:H.length)>0){let X=[];H==null||H.forEach(q=>{X!=null&&X.find(se=>{var $,Ae,Se,ke;return((Ae=($=se==null?void 0:se.value)==null?void 0:$.pageData)==null?void 0:Ae.name)===((ke=(Se=q==null?void 0:q.value)==null?void 0:Se.pageData)==null?void 0:ke.name)})||X.push(q)});let Y=[];X==null||X.forEach(q=>{var Ae,Se,ke,z;let se=p.cloneDeep(q);se.value.pageData.compData=(Ae=se.value.pageData.compData)==null?void 0:Ae.map(pe=>{var ve;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(ve=pe.contents)==null?void 0:ve.map(ge=>{var Ze,Ce,Re,Te;let Me=(Ze=p.cloneDeep(H))==null?void 0:Ze.find(it=>(it==null?void 0:it.keyType)===(ge==null?void 0:ge.key));if(Me){let it=(Te=(Re=(Ce=Me.value.pageData.compData)==null?void 0:Ce.find(me=>(me==null?void 0:me.key)==="formContent"))==null?void 0:Re.contents)==null?void 0:Te.find(me=>(me==null?void 0:me.key)===(ge==null?void 0:ge.key));ge.value=it==null?void 0:it.value}return ge})),pe}),Y.push({id:se==null?void 0:se.id,value:se==null?void 0:se.value});let $=[];(z=(ke=(Se=se==null?void 0:se.value)==null?void 0:Se.pageData)==null?void 0:ke.compData)==null||z.forEach(pe=>{var ve;(pe==null?void 0:pe.key)==="formContent"&&((ve=pe==null?void 0:pe.contents)==null||ve.forEach(ge=>{var Me,Ze,Ce,Re,Te,it;if((Ze=(Me=ge==null?void 0:ge.optionUrl)==null?void 0:Me.menuSelect)!=null&&Ze.find(me=>me==null?void 0:me.includes("[")))if($!=null&&$.find(me=>{var ue,He,le;return((ue=me==null?void 0:me.key)==null?void 0:ue.join(","))===((le=(He=ge==null?void 0:ge.optionUrl)==null?void 0:He.menuSelect)==null?void 0:le.join(","))})){let me=(Ce=$==null?void 0:$.find(ue=>{var He,le,Ie;return((He=ue==null?void 0:ue.key)==null?void 0:He.join(","))===((Ie=(le=ge==null?void 0:ge.optionUrl)==null?void 0:le.menuSelect)==null?void 0:Ie.join(","))}))==null?void 0:Ce.value;me.push({key:ge==null?void 0:ge.prop,groups:(Re=ge==null?void 0:ge.optionUrl)==null?void 0:Re.groupSelect,value:ge==null?void 0:ge.value}),$=$==null?void 0:$.map(ue=>{var He,le,Ie;return((He=ue==null?void 0:ue.key)==null?void 0:He.join(","))===((Ie=(le=ge==null?void 0:ge.optionUrl)==null?void 0:le.menuSelect)==null?void 0:Ie.join(","))&&(ue.value=me),ue})}else $.push({key:(Te=ge==null?void 0:ge.optionUrl)==null?void 0:Te.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(it=ge==null?void 0:ge.optionUrl)==null?void 0:it.groupSelect,value:ge==null?void 0:ge.value}]})}))}),($==null?void 0:$.length)>0&&($=$==null?void 0:$.map(pe=>{var ge;let ve="";return(ge=pe==null?void 0:pe.key)==null||ge.forEach(Me=>{var Ze;if(!(Me!=null&&Me.includes("[")))ve=ve===""?ve+Me:ve+"/"+Me;else{let Ce="",Re=(Ze=Me==null?void 0:Me.replaceAll("[","").replaceAll("]",""))==null?void 0:Ze.split(":");x==null||x.forEach(Te=>{var it;(Te==null?void 0:Te.name)===(Re==null?void 0:Re[0])&&((it=Te==null?void 0:Te.compData)==null||it.forEach(me=>{var ue;(me==null?void 0:me.key)==="formContent"&&((ue=me==null?void 0:me.contents)==null||ue.forEach(He=>{(He==null?void 0:He.prop)===(Re==null?void 0:Re[1])&&(Ce=He==null?void 0:He.value)}))}))}),ve=ve+l.value+Ce}}),pe.key=ve,pe})),$==null||$.forEach(pe=>{var Ze,Ce,Re;let ve=(Ze=et[pe.key])==null?void 0:Ze.find(Te=>{var it,me,ue,He,le,Ie,ze;return((me=(it=Te==null?void 0:Te.value)==null?void 0:it.pageData)==null?void 0:me.name)===((le=(He=(ue=pe==null?void 0:pe.value)==null?void 0:ue[0])==null?void 0:He.groups)==null?void 0:le[0])&&((ze=(Ie=Te==null?void 0:Te.value)==null?void 0:Ie.pageData)==null?void 0:ze.name)!==void 0}),ge=ve==null?void 0:ve.id,Me=(Ce=ve==null?void 0:ve.value)==null?void 0:Ce.pageData;Me.compData=(Re=Me.compData)==null?void 0:Re.map(Te=>{var it;return(Te==null?void 0:Te.key)==="formContent"&&(Te.contents=(it=Te.contents)==null?void 0:it.map(me=>{var He;let ue=(He=pe.value)==null?void 0:He.find(le=>(le==null?void 0:le.key)===(me==null?void 0:me.prop));return ue&&(me.value=ue.value),me})),Te}),Y.push({id:ge,value:{pageData:Me}})})});let fe=(Je=p.cloneDeep(H))==null?void 0:Je[0];(Y==null?void 0:Y.length)>0&&await p.batchUpdateInsofDataApi({dataList:Y})}D.setFreshContent(!0)}I.setImportLoading(!1)}catch{p.ElMessage.error("方法执行错误,请查看方法!"),I.setImportLoading(!1)}S.value=!0},Ue=["createInsofDataApi"],ut=fo(async E=>{de(E)},100),Ne=async E=>{var pt,G,Qe,ft,tt;const _e=p.cloneDeep(E);let ie,Fe=new WeakMap,$e=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ce.value});(G=(pt=$e.data.result)==null?void 0:pt.filter(ee=>{var oe,we;return((oe=ee==null?void 0:ee.key)==null?void 0:oe.pageKey)!=="menu"&&((we=ee==null?void 0:ee.key)==null?void 0:we.pageKey)!=="secret"}))==null||G.forEach(ee=>{Fe[ee.key.pageKey]?Fe[ee.key.pageKey]=[...Fe[ee.key.pageKey],ee]:Fe[ee.key.pageKey]=[ee]}),E!=null&&E[0].path&&(ie=await(_e==null?void 0:_e.map(async(ee,oe)=>{var ne,m,T,U,j,H,Z,X,Y,fe,q,se,$,Ae,Se,ke;const he=(ne=Fe[ee==null?void 0:ee.path])==null?void 0:ne.filter(z=>{var pe;return((pe=z==null?void 0:z.key)==null?void 0:pe.type)==="data"});let Je="";const et=await Be.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Fe);he==null||he.forEach(z=>{var pe,ve,ge,Me,Ze;((ve=(pe=z==null?void 0:z.value)==null?void 0:pe.tableData)==null?void 0:ve.算法名称)===((ge=_e==null?void 0:_e[oe])==null?void 0:ge.method)&&(Je=(Ze=(Me=z==null?void 0:z.value)==null?void 0:Me.tableData)==null?void 0:Ze.算法体)});const k=await Be.getItemData(ee==null?void 0:ee.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,Fe);let x="",R=(j=(U=(T=(m=k==null?void 0:k[0])==null?void 0:m.compData)==null?void 0:T.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:U.contents)==null?void 0:j.findIndex(z=>(z==null?void 0:z.prop)==="算法体");return(Z=(H=k==null?void 0:k[0])==null?void 0:H.compData)==null||Z.forEach(z=>{var pe;(z==null?void 0:z.key)==="tableContents"&&((pe=z==null?void 0:z.contents)==null||pe.forEach(ve=>{ve!=null&&ve.find(ge=>ge===(ee==null?void 0:ee.method))&&(x=ve[R])}))}),{buttonName:((X=_e==null?void 0:_e[oe])==null?void 0:X.method)||((q=(fe=(Y=he==null?void 0:he[0])==null?void 0:Y.value)==null?void 0:fe.tableData)==null?void 0:q.算法名称),api:(Je===""?(Ae=($=(se=he==null?void 0:he[0])==null?void 0:se.value)==null?void 0:$.tableData)==null?void 0:Ae.算法体:Je)||x,content:et==null?void 0:et.filter(z=>z.comp!=="methodButton"),extraContent:(Se=p.cloneDeep(ee.value))==null?void 0:Se.slice(1),methodName:(ee==null?void 0:ee.path)??"",extraValues:(ke=_e==null?void 0:_e[oe])==null?void 0:ke.data}})));const xe=_e==null?void 0:_e.map(async ee=>{var k,x,R,ne,m,T;const oe=(k=$e.data.result)==null?void 0:k.filter(U=>{var j,H,Z;return((j=U==null?void 0:U.key)==null?void 0:j.parentTable)===""&&((H=U==null?void 0:U.key)==null?void 0:H.type)==="method"&&((Z=U==null?void 0:U.key)==null?void 0:Z.methodName)===U.method}),we=oe==null?void 0:oe[0],he=(x=$e.data.result)==null?void 0:x.filter(U=>{var j,H;return((j=U==null?void 0:U.key)==null?void 0:j.type)==="methodData"&&((H=U==null?void 0:U.key)==null?void 0:H.tableId)===(we==null?void 0:we.id)}),Je=await Be.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Fe),et=he==null?void 0:he[0];return{buttonName:(R=we==null?void 0:we.key)==null?void 0:R.methodKey,api:(m=(ne=et==null?void 0:et.value)==null?void 0:ne.tableData)==null?void 0:m[0],content:Je==null?void 0:Je.filter(U=>U.comp!=="methodButton"),extraContent:(T=p.cloneDeep(ee.value))==null?void 0:T.slice(1),methodName:(ee==null?void 0:ee.method)??""}}),je=(Qe=E==null?void 0:E[0])!=null&&Qe.path&&((ft=E==null?void 0:E[0])==null?void 0:ft.path)!==""?await Promise.all(ie):await Promise.all(xe);c.value=je==null?void 0:je.filter(ee=>ee==null?void 0:ee.extraContent),(tt=c.value)==null||tt.forEach(ee=>{var oe;ee.api===""&&((oe=ee.content)==null||oe.forEach(we=>{var he;we.comp=="Table"&&D.setExtraContents(Be.methodTableToContent(we.compData,(he=ee.extraContent)==null?void 0:he[0]))}))})};return e.watch(()=>s.itemData,async()=>{W.value=="view"&&!S.value&&await Ne(p.cloneDeep(s.itemData)),S.value=!1},{immediate:!0,deep:!0}),(E,_e)=>{var ie,Fe,$e;return e.unref(W)!=="edit"?(e.openBlock(),e.createElementBlock("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ie=c.value)==null?void 0:ie.filter(xe=>(xe==null?void 0:xe.buttonName)!=="保存"),xe=>{var je;return e.openBlock(),e.createElementBlock("div",null,[xe.api!==""?(e.openBlock(),e.createBlock(e.unref(Gt._sfc_main),{key:0,disabled:e.unref(K)===e.unref(C)&&!((je=xe==null?void 0:xe.buttonName)!=null&&je.includes("预览")),class:"calculator-content",modelValue:xe.buttonName,onClickTrigger:pt=>e.unref(ut)(xe),loading:A.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(De)!==""&&(($e=e.unref(C))==null?void 0:$e[((Fe=e.unref(C))==null?void 0:Fe.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Gt._sfc_main),{key:0,class:"calculator-content",onClickTrigger:Le,modelValue:"保存"})):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:w.value,onDestroy:lt},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},bc=Rt._export_sfc(yc,[["__scopeId","data-v-5f1cdbc7"]]),kc={};function xc(a,c){return" 567 "}const wc=Rt._export_sfc(kc,[["render",xc]]),Dc={class:"module content"},Cc={class:"module data"},Ec={class:"module layout"},_c={class:"form-content"},Sc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:c}){const i=a,l=c,s=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),w=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),h=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),D=e.ref({}),A=e.ref([]),I=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:A.value},{key:"signConfig",contents:D.value}]}),F=J=>{var K;D.value=p.cloneDeep(J),l("change",(K=I())==null?void 0:K.compData)},M=J=>{var K,ce;if((J==null?void 0:J.buttonName)==="确认"){const C=p.cloneDeep(J==null?void 0:J.content);switch(d.value){case"create":A.value.push({...C,index:((K=A.value)==null?void 0:K.length)+1});break}l("change",(ce=I())==null?void 0:ce.compData),s.visible=!1}else s.visible=!1},W=(J,K)=>{var ce,C;switch(J){case"create":(ce=h.value)==null||ce.forEach(P=>{P.value=""}),d.value="create",s.visible=!0;break;case"update":(C=h.value)==null||C.forEach(P=>{P.value=K[P==null?void 0:P.prop]}),d.value="update",s.visible=!0;break;case"delete":A.value.splice(K,1),d.value="delete";break}},De=()=>{s.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,J=>{var K,ce;J&&(D.value=((K=J==null?void 0:J.find(C=>C.key==="signConfig"))==null?void 0:K.contents)??{},A.value=((ce=J==null?void 0:J.find(C=>C.key==="signTypeList"))==null?void 0:ce.contents)??[])},{immediate:!0}),(J,K)=>{const ce=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Dc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=P=>W("create"))},{icon:e.withCtx(()=>[e.createVNode(ce,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(P,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.label),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:V=>W("update",{...P,index:b+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:V=>W("delete",b)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ec,[e.createVNode(St.ssForm,{rowContents:g.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:De,width:s.width},{default:e.withCtx(()=>[e.createElementVNode("div",_c,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:w.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Tc=Rt._export_sfc(Sc,[["__scopeId","data-v-487e0536"]]),Ic=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:c}){const i=a,l=c,s=e.ref(1),d=e.computed(()=>{var I,F;return(I=i==null?void 0:i.stepConfig)!=null&&I.allowTrigger?s.value:(F=i==null?void 0:i.stepConfig)==null?void 0:F.active}),w=(I,F)=>{s.value=F,l("clickStep",I,F)},g=I=>St.getComponent(I),h=()=>{var F;const I=(F=i==null?void 0:i.stepList)==null?void 0:F.find((M,W)=>W+1===d.value);return console.log("findStep",I),I?I==null?void 0:I.children:[]},D=I=>{l("clickTrigger",I)},A=I=>{l("changeTrigger",I)};return(I,F)=>{var De,J,K,ce,C;const M=e.resolveComponent("el-step"),W=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(W,{direction:(De=a.stepConfig)==null?void 0:De.direction,active:d.value,"finish-status":"success",simple:(J=a.stepConfig)==null?void 0:J.simple,"align-center":((K=a.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(P,b)=>(e.openBlock(),e.createBlock(M,{key:b,class:"step-item",onClick:V=>w(P,b+1)},{title:e.withCtx(()=>[e.renderSlot(I.$slots,"title",{title:P==null?void 0:P.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(I.$slots,"description",{description:P==null?void 0:P.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ce=a.stepConfig)!=null&&ce.allowTrigger&&((C=a.stepConfig)!=null&&C.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(P,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(P==null?void 0:P.type)),{modelValue:P.value,"onUpdate:modelValue":V=>P.value=V,onClickTrigger:D,onChangeTrigger:A,content:P==null?void 0:P.content},e.createSlots({_:2},[e.renderList(I.$slots,(V,S)=>({name:S,fn:e.withCtx(re=>[e.renderSlot(I.$slots,S,e.mergeProps({ref_for:!0},re||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Bc=Rt._export_sfc(Ic,[["__scopeId","data-v-d7c99969"]]),Ac=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:c}){const i=a,l=c,s=e.ref({}),d=e.ref([]),w=(g,h)=>{l("clickStep",g,h)};return e.watch(()=>i==null?void 0:i.itemData,g=>{var h,D;d.value=(h=g==null?void 0:g.find(A=>(A==null?void 0:A.key)==="stepList"))==null?void 0:h.contents,s.value=(D=g==null?void 0:g.find(A=>(A==null?void 0:A.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(g,h)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Bc,{stepConfig:s.value,stepList:d.value,onClickStep:w},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:A})=>[e.createTextVNode(e.toDisplayString(A),1)]),description:e.withCtx(({description:A})=>[e.createTextVNode(e.toDisplayString(A),1)]),_:1},8,["stepConfig","stepList"])}}}),Nc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(c,i)=>{const l=e.resolveComponent("el-timeline-item"),s=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(s,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(d,w)=>(e.openBlock(),e.createBlock(l,{key:w,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Vc=Rt._export_sfc(Nc,[["__scopeId","data-v-4172a886"]]),Oc={class:"line-content"},Mc={class:"line-time"},zc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const c=a,i=e.ref({}),l=e.ref([]);return e.watch(()=>c==null?void 0:c.itemData,s=>{var d,w;l.value=(d=s==null?void 0:s.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:d.contents,i.value=(w=s==null?void 0:s.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:w.contents},{immediate:!0}),(s,d)=>(e.openBlock(),e.createBlock(Vc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:w,timestamp:g})=>[e.createElementVNode("span",Oc,e.toDisplayString(w),1),e.createElementVNode("span",Mc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Rc=Rt._export_sfc(zc,[["__scopeId","data-v-b4d9deed"]]),Pc={class:"tabs-content"},Fc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const c=a,i=e.ref([]);return e.watch(()=>c==null?void 0:c.itemData,l=>{const s=l.find(d=>(d==null?void 0:d.key)=="stepList");s?i.value=s.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):i.value=c==null?void 0:c.tabsData},{immediate:!0,deep:!0}),(l,s)=>(e.openBlock(),e.createElementBlock("div",Pc,[e.createVNode(St.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},Lc=Rt._export_sfc(Fc,[["__scopeId","data-v-40865f68"]]),Ja=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),$c={class:"type-select"},jc=["onClick"],Kc={class:"list-icon"},Uc={__name:"modelSelect",setup(a){const c=Ja(p.pinia),{itemData:i}=p.storeToRefs(c),l=s=>{const d=p.cloneDeep(i.value);d.push({comp:s.comp,name:s.name,compData:[]}),c.setItemData(d)};return(s,d)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",$c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(tr),(g,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:D=>l(g)},[e.createElementVNode("div",Kc,[e.createVNode(w,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,jc)]))),128))])}}},Wc=Rt._export_sfc(Uc,[["__scopeId","data-v-91799bf8"]]),Hc={class:"fill-content"},qc={class:"operate-content"},Xc={class:"collapse-title-content"},Gc={class:"collapse-title-item"},Yc={key:1},Jc=["onClick"],Zc={class:"icon-content"},Qc={key:0,class:"edit-content"},eu=["onClick"],tu={class:"comp-child"},nu={__name:"modelFill",setup(a){const c=Ja(p.pinia),{itemData:i,originalData:l}=p.storeToRefs(c),s=e.ref([]);e.ref([]);const d=e.ref([]),w=e.ref([]),g=M=>{var De;let W=(De=p.cloneDeep(w.value))==null?void 0:De.map((J,K)=>(M===K&&(J.content=!0),J));w.value=W},h=M=>{var De;let W=(De=p.cloneDeep(w.value))==null?void 0:De.map((J,K)=>(M===K&&(J.content=!1),J));w.value=W,s.value=p.cloneDeep(i.value)},D=(M,W)=>{var ce;let De=(ce=p.cloneDeep(w.value))==null?void 0:ce.map((C,P)=>(M===P&&(C.content=!1),C));w.value=De;const J=p.cloneDeep(i.value),K=J==null?void 0:J.filter((C,P)=>(P===M&&(C.name=W),C));c.setOriginalData(K),c.setItemData(K)};e.watch(()=>i.value,()=>{var M,W,De;!i.value||((M=i.value)==null?void 0:M.length)===0?s.value=[]:s.value=(W=p.cloneDeep(i.value))==null?void 0:W.filter(J=>(J==null?void 0:J.comp)!=="methodButton"),d.value=s.value,w.value=(De=p.cloneDeep(d.value))==null?void 0:De.map((J,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const A=M=>fa(M),I=(M,W,De)=>{var K,ce;if(!M)return;let J=p.cloneDeep(i.value);J=(K=J==null?void 0:J.map((C,P)=>(P===De&&(C.compData=M),C)))==null?void 0:K.filter(C=>(C==null?void 0:C.comp)!=="methodButton"),w.value=(ce=p.cloneDeep(J))==null?void 0:ce.map((C,P)=>({id:P,content:!1})),c.setOriginalData(J),c.setItemData(J)},F=M=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const W=p.cloneDeep(i.value),De=W==null?void 0:W.filter((J,K)=>K!==M);c.setOriginalData(De),c.setItemData(De),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(M,W)=>{const De=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Hc,[W[1]||(W[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",qc,[e.createVNode(bl.default,{class:"collapse-content",collapseContents:s.value},{title:e.withCtx(({item:J,index:K})=>{var ce,C,P,b,V,S,re,Le,lt,Ve;return[e.createElementVNode("div",Xc,[e.createElementVNode("div",Gc,[(C=(ce=w.value)==null?void 0:ce.find(We=>We.id===K))!=null&&C.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:J.name&&J.name!==""?"8px":"0px"})},e.toDisplayString(J.name),5)),(b=(P=w.value)==null?void 0:P.find(We=>We.id===K))!=null&&b.content?(e.openBlock(),e.createElementBlock("div",Yc,[e.createVNode(St._sfc_main$2,{modelValue:J.name,"onUpdate:modelValue":We=>J.name=We,onClick:W[0]||(W[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(S=(V=w.value)==null?void 0:V.find(We=>We.id===K))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(We=>g(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Jc))]),e.createElementVNode("div",Zc,[(Le=(re=w.value)==null?void 0:re.find(We=>We.id===K))!=null&&Le.content?(e.openBlock(),e.createElementBlock("div",Qc,[e.createVNode(De,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(We=>h(K),["stop"])},null,8,["onClick"]),e.createVNode(De,{name:"Save",onClick:e.withModifiers(We=>D(K,J.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ve=(lt=w.value)==null?void 0:lt.find(We=>We.id===K))!=null&&Ve.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(We=>F(K),["stop"]),class:"icon-content"},[e.createVNode(De,{name:"Delete",style:{width:"16px",height:"16px"}})],8,eu))])])]}),content:e.withCtx(({item:J,index:K})=>{var ce,C;return[e.createElementVNode("div",tu,[e.createTextVNode(e.toDisplayString(A(J.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A(J.comp+"Operate")),{itemContents:J==null?void 0:J.compData,originalItemContents:(C=(ce=d.value)==null?void 0:ce.find((P,b)=>b===K))==null?void 0:C.compData,onChange:P=>I(P,J,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},au=Rt._export_sfc(nu,[["__scopeId","data-v-a46a44b9"]]),ou={key:0,class:"show-content"},lu={style:{display:"flex"}},ru={__name:"modelShow",setup(a){const c=Ja(p.pinia),{itemData:i}=p.storeToRefs(c),l=e.ref([]);e.watch(()=>i.value,()=>{var d;!i.value||((d=i.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(i.value)},{deep:!0,immediate:!0});const s=d=>fa(d);return(d,w)=>{var g;return((g=l.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",ou,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",lu,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},iu=Rt._export_sfc(ru,[["__scopeId","data-v-3f3e863e"]]),su={class:"tabs-header"},cu={class:"tabs-list"},uu={class:"tab-name"},pu={class:"tab-actions"},du=["onClick"],fu=["onClick"],hu=["onClick"],vu={class:"model-operate"},gu={class:"model-select",style:{display:"unset"}},mu={class:"existing-components"},yu={class:"component-list"},bu=["onClick"],ku={class:"component-info"},xu={class:"component-type"},wu={class:"component-name"},Du={class:"model-fill"},Cu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:c}){const i=a,l=c,s=e.ref([]),d=e.ref(!1),w=e.ref(""),g=e.ref({title:""}),h=e.ref(-1),D=e.ref(!1),A=e.ref(-1),I=e.ref(new WeakMap),F=e.ref(null),M=Ja(p.pinia),{itemData:W}=p.storeToRefs(M),De=()=>{w.value="新增标签页",g.value.title="",h.value=-1,d.value=!0},J=Ne=>{w.value="修改标签页",g.value.title=s.value[Ne].title,h.value=Ne,d.value=!0},K=Ne=>{const E=P(Ne);I.value.delete(E),s.value.splice(Ne,1),ut()},ce=()=>{if(g.value.title.trim()){if(h.value===-1){const Ne={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:C()};s.value.push(Ne)}else s.value[h.value].title=g.value.title,s.value[h.value].value=g.value.title,s.value[h.value].label=g.value.title;d.value=!1,ut()}},C=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,P=Ne=>{const E=s.value[Ne];return E.id||(E.id=C()),E.id},b=Ne=>{var ie;A.value=Ne;const E=P(Ne);F.value=p.cloneDeep(W.value);let _e=I.value.get(E);!_e&&((ie=s.value[Ne].children)==null?void 0:ie.length)>0&&(_e=Le(s.value[Ne].children)),_e?M.setItemData(p.cloneDeep(_e)):M.setItemData([]),D.value=!0},V=e.computed(()=>{const Ne=Be.useModelComp(p.pinia),E=p.storeToRefs(Ne).itemData.value;return console.log("可用组件数据",E),!E||!Array.isArray(E)?[]:E.filter(_e=>{var ie;if(_e.comp==="Tabs"&&A.value>=0){const Fe=P(A.value);if((ie=_e.compData)==null?void 0:ie.some(xe=>{var je;return xe.key==="stepList"&&((je=xe.contents)==null?void 0:je.some(pt=>pt.id===Fe))}))return!1}return!0})}),S=Ne=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Ne]||Ne,re=Ne=>{var E;try{const _e=p.cloneDeep(Ne);_e.id=Date.now()+Math.random(),_e.comp==="Tabs"&&((E=_e.compData)==null||E.forEach(Fe=>{Fe.key==="stepList"&&Fe.contents&&Fe.contents.forEach($e=>{$e.id=C()})}));const ie=p.cloneDeep(W.value);ie.push(_e),M.setItemData(ie)}catch(_e){console.error("添加组件失败:",_e)}},Le=Ne=>Ne.map(E=>{var _e;switch(E.type){case"form":return{comp:"Form",name:E.value||"表单",compData:lt(E.content)};case"table":return{comp:"Table",name:E.value||"表格",compData:Ve(E.content)};default:return{comp:"Unknown",name:E.value||"",compData:((_e=E.content)==null?void 0:_e.originalData)||[]}}}),lt=Ne=>{if(!Ne)return[];const E=[];return Ne.rowContents&&E.push({key:"formContent",contents:Ne.rowContents}),Ne.buttonValue&&E.push({key:"formButton",contents:Ne.buttonValue}),typeof Ne.isEnableWrap<"u"&&E.push({key:"enableWrap",contents:Ne.isEnableWrap}),E},Ve=Ne=>[],We=()=>{if(A.value>=0&&A.value<s.value.length){const Ne=P(A.value);I.value.set(Ne,p.cloneDeep(W.value)),s.value[A.value].children=ae(W.value),console.log("保存后的数据",ae(W.value))}D.value=!1,A.value=-1,F.value=null,ut()},be=()=>{F.value&&M.setItemData(p.cloneDeep(F.value)),D.value=!1,A.value=-1,F.value=null},B=()=>{D.value&&be()},ae=Ne=>{if(!Array.isArray(Ne))throw new Error("sourceData must be an array");return Ne.map((E,_e)=>{if(!E||typeof E!="object")return E;const{comp:ie,name:Fe,compData:$e}=E;switch(ie){case"Form":return{type:"form",content:te($e||[]),value:"表单"};case"Table":return{type:"table",content:de($e||[]),value:"表格"};default:return{type:"xxx",content:Ue($e||[]),value:""}}})},te=Ne=>{const E={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},_e={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Ne.forEach((ie,Fe)=>{if(!ie||typeof ie!="object"){console.warn(`Invalid config at index ${Fe}:`,ie);return}const{key:$e,contents:xe}=ie,je=_e[$e];if(!je){console.warn(`Unknown Form config key: ${$e}`);return}$e==="enableWrap"?E[je]=!!xe:E[je]=Array.isArray(xe)?xe:[]}),E},de=Ne=>{const E={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},_e={header:"columns",tableContents:"tableData"};return Ne.forEach((ie,Fe)=>{if(!ie||typeof ie!="object"){console.warn(`Invalid config at index ${Fe}:`,ie);return}const{key:$e,contents:xe}=ie,je=_e[$e];if(!je){console.warn(`Unknown Table config key: ${$e}`);return}E[je]=Array.isArray(xe)?xe:[]}),E},Ue=Ne=>(console.log("Default conversion logic - to be implemented"),{originalData:Ne,processed:!1,componentType:"unknown"}),ut=()=>{const Ne=[{key:"stepList",contents:s.value}];l("change",Ne)};return e.watch(()=>i.itemContents,Ne=>{if(Ne&&Ne.length>0){const E=Ne.find(_e=>_e.key==="stepList");E&&E.contents&&(s.value=E.contents.map(_e=>({title:_e.title||"",value:_e.value||_e.title||"",label:_e.label||_e.title||"",children:_e.children||[],id:_e.id||C()})))}},{immediate:!0,deep:!0}),(Ne,E)=>{const _e=e.resolveComponent("svg-icon"),ie=e.resolveComponent("el-input"),Fe=e.resolveComponent("el-form-item"),$e=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",su,[E[6]||(E[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:De},[e.createVNode(_e,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),E[5]||(E[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",cu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(xe,je)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:je},[e.createElementVNode("span",uu,e.toDisplayString(xe.title),1),e.createElementVNode("div",pu,[e.createElementVNode("button",{onClick:pt=>J(je)},"修改标题",8,du),e.createElementVNode("button",{onClick:pt=>b(je)},"布局调整",8,fu),e.createElementVNode("button",{onClick:pt=>K(je)},"删除",8,hu)])]))),128))]),e.createVNode(Gt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=xe=>d.value=xe),title:w.value,onBeforeDestroy:E[3]||(E[3]=xe=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:E[1]||(E[1]=xe=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ce},"确定")]),default:e.withCtx(()=>[e.createVNode($e,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Fe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ie,{modelValue:g.value.title,"onUpdate:modelValue":E[0]||(E[0]=xe=>g.value.title=xe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Gt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":E[4]||(E[4]=xe=>D.value=xe),title:"布局调整",fullScreen:"",onBeforeDestroy:B},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:be},"取消"),e.createElementVNode("button",{onClick:We},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",vu,[e.createElementVNode("div",gu,[e.createVNode(Wc),e.createElementVNode("div",mu,[E[8]||(E[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",yu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,xe=>(e.openBlock(),e.createElementBlock("div",{key:xe.id,class:"component-item",onClick:je=>re(xe)},[e.createElementVNode("div",ku,[e.createElementVNode("span",xu,e.toDisplayString(S(xe.comp)),1),e.createElementVNode("span",wu,e.toDisplayString(xe.name),1)]),E[7]||(E[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,bu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Ne.innerWidth},[e.createVNode(iu)])),e.createElementVNode("div",Du,[e.createVNode(au)])])]),_:1},8,["modelValue"])])}}},Eu=Rt._export_sfc(Cu,[["__scopeId","data-v-9096ed0d"]]);function _u(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function Su(a){return{type:"line",...a}}function Tu(){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 Iu(a){return{type:"bar",barWidth:"60%",...a}}function Bu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Au(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const jn={line:{initBaseoptions:_u,initSeries:Su},bar:{initBaseoptions:Tu,initSeries:Iu},pie:{initBaseoptions:Bu,initSeries:Au}},Po=Be.useMenuState(p.pinia),Bl=(a,c)=>{var A;const i=[],l=[],{group:s,nameCol:d,valueCol:w}=c||{},g=a==null?void 0:a.find(I=>{const{name:F}=I;return F===s});if(!g)return{names:i,values:l};const h=(A=g==null?void 0:g.compData)==null?void 0:A.find(I=>{const{key:F}=I;return F==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(I=>{const F=I==null?void 0:I[0];let M=!1;p.isObject(F)&&(F!=null&&F.id)&&(M=!0);let W=d,De=w;M&&(W=W+1,De=De+1);const J=I==null?void 0:I[W],K=I==null?void 0:I[De];i.push(J),l.push(K)}),{names:i,values:l}},Nu=async a=>{const{menu:c,mainKey:i,detailGroup:l,detailNameCol:s,detailValueCol:d,isSelfDetail:w}=a||{};let g=null;const h=sessionStorage.getItem("systemKey");if(w&&Po.activeMenuPath&&(g=await Be.getItemData(`${Po.activeMenuPath}`,h,"")),!w){const D=c==null?void 0:c.join("/");g=await Be.getItemData(`${D}^${i}`,h,"")}return Bl(g,{group:l,nameCol:s,valueCol:d})},Vu=async a=>{const{menu:c,group:i,nameCol:l,valueCol:s}=a||{},d=c==null?void 0:c.join("/"),w=sessionStorage.getItem("systemKey"),g=await Be.getItemData(d,w,"");return Bl(g,{group:i,nameCol:l,valueCol:s})},ho=async(a,c)=>{const i={names:[],values:[]},{menu:l,group:s,nameCol:d,valueCol:w}=a||{};if(!l.length||!s)return i;const{mainKey:g,group:h,nameCol:D,valueCol:A,isSelfDetail:I}=c||{};return g&&h&&St.isNumber(D)&&St.isNumber(A)?await Nu({menu:l,mainKey:g,detailGroup:h,detailNameCol:D,detailValueCol:A,isSelfDetail:I}):St.isNumber(d)&&St.isNumber(w)?await Vu({menu:l,group:s,nameCol:d,valueCol:w}):i},Ou=async({chartBaseConfig:a,chartDataConfig:c,chartDetailConfig:i})=>{const{type:l,title:s}=a||{},d=jn==null?void 0:jn[l];if(!d)return;const{initBaseoptions:w,initSeries:g}=d,h=w();h.title.text=s??"";const{names:D,values:A}=await ho(c,i);if(!D||!A)return h;h.xAxis.data=D;const I=g({data:A});return h.series.push(I),h},Mu=async({chartBaseConfig:a,chartDataConfig:c,chartDetailConfig:i})=>{const{type:l,title:s}=a||{},d=jn==null?void 0:jn[l];if(!d)return;const{initBaseoptions:w,initSeries:g}=d,h=w();h.title.text=s??"";const{names:D,values:A}=await ho(c,i);if(!D||!A)return h;h.xAxis.data=D;const I=g({data:A});return h.series.push(I),h},zu=async({chartBaseConfig:a,chartDataConfig:c,chartDetailConfig:i})=>{const{type:l,title:s}=a||{},d=jn==null?void 0:jn[l];if(!d)return;const{initBaseoptions:w,initSeries:g}=d,h=w();h.title.text=s??"";const{names:D,values:A}=await ho(c,i);if(!D||!A)return h;const I=[];for(let M=0;M<D.length;M++){const W=D[M],De=A[M];I.push({name:W,value:De})}const F=g({data:I});return h.series.push(F),h},Ru=async(a=[])=>{var w,g,h;const c=((w=a==null?void 0:a.find(D=>D.key==="chartBaseConfig"))==null?void 0:w.contents)??{},i=((g=a==null?void 0:a.find(D=>D.key==="chartDataConfig"))==null?void 0:g.contents)??{},l=((h=a==null?void 0:a.find(D=>D.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:s}=c;let d={};return s==="line"&&(d=await Ou({chartBaseConfig:c,chartDataConfig:i,chartDetailConfig:l})),s==="bar"&&(d=await Mu({chartBaseConfig:c,chartDataConfig:i,chartDetailConfig:l})),s==="pie"&&(d=await zu({chartBaseConfig:c,chartDataConfig:i,chartDetailConfig:l})),d},Pu=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 c=a,i=e.ref({});e.onMounted(async()=>{const s=c==null?void 0:c.itemData;i.value=await Ru(s)});const l=e.computed(()=>(c==null?void 0:c.height)||"300px");return(s,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Or.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),Fu=Rt._export_sfc(Pu,[["__scopeId","data-v-d4c081e8"]]),Lu={class:"chart-module layout"},$u={class:"chart-module content"},ju={class:"chart-module content"},Ku={class:"form-content"},Uu={class:"dialog-footer"},Wu={class:"form-content"},Hu={class:"dialog-footer"},qu={class:"form-content"},Xu={class:"dialog-footer"},Gu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:c}){const i=a,l=c,s=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),w=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),h=()=>{var ee;d.value=w(),(ee=d.value)==null||ee.forEach(oe=>{var he;const we=oe==null?void 0:oe.prop;oe.value=(he=g==null?void 0:g.value)==null?void 0:he[we]}),s.visible=!0},D=ee=>{g.value=ee},A=()=>{var ee;s.visible=!1,l("change",(ee=ft())==null?void 0:ee.compData)},I=e.reactive({visible:!1,width:"840",title:"数据配置"}),F=e.ref([]),M=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],W=e.ref({}),De=()=>{const ee=F.value,oe=p.cloneDeep(ee);return oe==null||oe.forEach(we=>{var Je;const he=we==null?void 0:we.prop;we.value=(Je=W.value)==null?void 0:Je[he]}),oe},J=ee=>{var we;W.value=ee;const oe=De();F.value=oe,l("change",(we=ft())==null?void 0:we.compData)},K=async()=>{const ee=await Be.getMenusContent(),oe=De();oe==null||oe.forEach(we=>{(we==null?void 0:we.prop)==="menu"&&(we.contents=ee)}),F.value=oe,I.visible=!0,await xe(W.value.menu),await G(W.value.group)},ce=e.reactive({visible:!1,width:"840",title:"详情页配置"}),C=e.ref([]),P=()=>[{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:[]}],b=e.ref({}),V=()=>{const ee=C.value,oe=p.cloneDeep(ee);return oe==null||oe.forEach(we=>{var Je;const he=we==null?void 0:we.prop;we.value=(Je=b.value)==null?void 0:Je[he]}),oe},S=ee=>{var we;b.value=ee;const oe=V();C.value=oe,l("change",(we=ft())==null?void 0:we.compData)},re=async()=>{await B();const ee=p.cloneDeep(Le.value),oe=V();oe==null||oe.forEach(we=>{var Je;const he=we==null?void 0:we.prop;we.value=(Je=b==null?void 0:b.value)==null?void 0:Je[he],he==="mainKey"&&(we.contents=ee)}),C.value=oe,ce.visible=!0},Le=e.ref([]),lt=e.ref([]),Ve=e.ref({}),We=e.ref({}),be=()=>{const{compData:ee}=ie.value||{},oe=ee==null?void 0:ee.find(R=>{const{key:ne}=R;return ne==="header"}),we=(oe==null?void 0:oe.contents)||[],he=we==null?void 0:we.filter((R,ne)=>{const{label:m}=R;return m!=="操作"}),Je=he==null?void 0:he.findIndex((R,ne)=>{const{isMainKey:m}=R;return m});if(Je<0)return[];const et=ee==null?void 0:ee.find(R=>{const{key:ne}=R;return ne==="tableContents"}),k=(et==null?void 0:et.contents)||[];return k==null?void 0:k.map(R=>{const ne=R==null?void 0:R[0];let m=Je;p.isObject(ne)&&(ne!=null&&ne.id)&&(m=m+1);const T=R==null?void 0:R[m];return{label:T,value:T}})},B=async()=>{const ee=await be();Le.value=ee},ae=async ee=>{const oe=sessionStorage.getItem("systemKey");return await Be.getItemData(ee,oe,"")},te=async ee=>{const oe=ee;lt.value=oe==null?void 0:oe.map(we=>{const{name:he}=we;return Ve.value[he]=we,{label:he,value:he}})},de=ee=>{const{comp:oe,compData:we}=We.value||{};if(oe==="Table"){let he=V();he=he.filter(Je=>{const{prop:et}=Je;return et!=="formItems"}),je(he,we),C.value=he}},Ue=async()=>{var we,he;const ee=(we=b==null?void 0:b.value)==null?void 0:we.mainKey,oe=(he=W==null?void 0:W.value)==null?void 0:he.menu;if(ee){const et=`${oe==null?void 0:oe.join("/")}^${ee}`,k=await ae(et);await te(k);const x=V();x==null||x.forEach(R=>{(R==null?void 0:R.prop)==="group"&&(R.contents=lt.value)}),C.value=x}};e.watch(()=>{var ee;return(ee=b==null?void 0:b.value)==null?void 0:ee.mainKey},async(ee,oe)=>{ee!=oe&&ee&&await Ue()});const ut=async ee=>{const oe=Ve.value[ee];We.value=oe,await de()};e.watch(()=>{var ee;return(ee=b==null?void 0:b.value)==null?void 0:ee.group},async(ee,oe)=>{ee!=oe&&ee&&ut(ee)});const Ne=async()=>{var oe;await Ue();const ee=(oe=b.value)==null?void 0:oe.group;await ut(ee)},E=e.ref([]),_e=e.ref({}),ie=e.ref({}),Fe=async ee=>{const oe=ee==null?void 0:ee.join("/"),we=sessionStorage.getItem("systemKey");return await Be.getItemData(oe,we,"")},$e=async ee=>{const oe=await Fe(ee);E.value=oe==null?void 0:oe.map(we=>{const{name:he}=we;return _e.value[he]=we,{label:he,value:he}})},xe=async(ee,oe)=>{await $e(ee);const we=De();we==null||we.forEach(he=>{(he==null?void 0:he.prop)==="group"&&(he.contents=E.value)}),F.value=we};e.watch(()=>{var ee;return(ee=W==null?void 0:W.value)==null?void 0:ee.menu},async(ee,oe)=>{const we=ee==null?void 0:ee.join("/"),he=oe==null?void 0:oe.join("/");we!=he&&await xe(ee)});const je=(ee,oe)=>{const we=oe==null?void 0:oe.find(k=>{const{key:x}=k;return x==="header"}),he=(we==null?void 0:we.contents)||[],Je=he==null?void 0:he.filter((k,x)=>{const{label:R}=k;return R!=="操作"}),et=Je==null?void 0:Je.map((k,x)=>{const{label:R}=k;return{label:R,value:x}});ee==null||ee.forEach(k=>{const x=k==null?void 0:k.prop;(x==="nameCol"||x==="valueCol")&&(k.contents=et)})},pt=ee=>{const{comp:oe,compData:we}=ie.value||{};if(oe==="Table"){W.value.formItems=[];let he=De();he=he.filter(Je=>{const{prop:et}=Je;return et!=="formItems"}),je(he,we),F.value=he}},G=async ee=>{const oe=_e.value[ee];ie.value=oe,await pt()};e.watch(()=>{var ee;return(ee=W==null?void 0:W.value)==null?void 0:ee.group},async(ee,oe)=>{ee!=oe&&G(ee)});const Qe=async()=>{var we,he;const ee=(we=W.value)==null?void 0:we.menu;await xe(ee);const oe=(he=W.value)==null?void 0:he.group;await G(oe)},ft=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:W.value},{key:"chartDetailConfig",contents:b.value}]}),tt=()=>{s.visible=!1,I.visible=!1,ce.visible=!1};return e.onMounted(async()=>{var oe,we,he;F.value=M(),C.value=P();const ee=i==null?void 0:i.itemContents;g.value=((oe=ee==null?void 0:ee.find(Je=>Je.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},W.value=((we=ee==null?void 0:ee.find(Je=>Je.key==="chartDataConfig"))==null?void 0:we.contents)??{},await Qe(),b.value=((he=ee==null?void 0:ee.find(Je=>Je.key==="chartDetailConfig"))==null?void 0:he.contents)??{},await Ne()}),(ee,oe)=>{const we=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Lu,[oe[4]||(oe[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(we,{id:"themeButton",onClick:oe[0]||(oe[0]=he=>h())},{default:e.withCtx(()=>oe[3]||(oe[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",$u,[oe[6]||(oe[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(we,{id:"themeButton",onClick:oe[1]||(oe[1]=he=>K())},{default:e.withCtx(()=>oe[5]||(oe[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",ju,[oe[8]||(oe[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(we,{id:"themeButton",onClick:oe[2]||(oe[2]=he=>re())},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Gt.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:tt,width:s.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ku,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(we,{class:"cancel-button button",onClick:tt,id:"themeBorderButton"},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(we,{class:"ok-button button",onClick:A,id:"themeButton"},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:I.visible,title:I.title,onBeforeDestroy:tt,width:I.width},{default:e.withCtx(()=>[e.createElementVNode("div",Wu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:J},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hu,[e.createVNode(we,{class:"cancel-button button",onClick:tt,id:"themeBorderButton"},{default:e.withCtx(()=>oe[11]||(oe[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(we,{class:"ok-button button",onClick:tt,id:"themeButton"},{default:e.withCtx(()=>oe[12]||(oe[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:ce.visible,title:ce.title,onBeforeDestroy:tt,width:ce.width},{default:e.withCtx(()=>[e.createElementVNode("div",qu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Xu,[e.createVNode(we,{class:"cancel-button button",onClick:tt,id:"themeBorderButton"},{default:e.withCtx(()=>oe[13]||(oe[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(we,{class:"ok-button button",onClick:tt,id:"themeButton"},{default:e.withCtx(()=>oe[14]||(oe[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Yu=Rt._export_sfc(Gu,[["__scopeId","data-v-fe119645"]]);var $a={exports:{}},Ju=$a.exports,Fo;function Zu(){return Fo||(Fo=1,function(a,c){(function(i,l){l()})(Ju,function(){function i(D,A){return typeof A>"u"?A={autoBom:!1}:typeof A!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),A={autoBom:!A}),A.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function l(D,A,I){var F=new XMLHttpRequest;F.open("GET",D),F.responseType="blob",F.onload=function(){h(F.response,A,I)},F.onerror=function(){console.error("could not download file")},F.send()}function s(D){var A=new XMLHttpRequest;A.open("HEAD",D,!1);try{A.send()}catch{}return 200<=A.status&&299>=A.status}function d(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var A=document.createEvent("MouseEvents");A.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(A)}}var w=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof pa.commonjsGlobal=="object"&&pa.commonjsGlobal.global===pa.commonjsGlobal?pa.commonjsGlobal:void 0,g=w.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=w.saveAs||(typeof window!="object"||window!==w?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(D,A,I){var F=w.URL||w.webkitURL,M=document.createElement("a");A=A||D.name||"download",M.download=A,M.rel="noopener",typeof D=="string"?(M.href=D,M.origin===location.origin?d(M):s(M.href)?l(D,A,I):d(M,M.target="_blank")):(M.href=F.createObjectURL(D),setTimeout(function(){F.revokeObjectURL(M.href)},4e4),setTimeout(function(){d(M)},0))}:"msSaveOrOpenBlob"in navigator?function(D,A,I){if(A=A||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(i(D,I),A);else if(s(D))l(D,A,I);else{var F=document.createElement("a");F.href=D,F.target="_blank",setTimeout(function(){d(F)})}}:function(D,A,I,F){if(F=F||open("","_blank"),F&&(F.document.title=F.document.body.innerText="downloading..."),typeof D=="string")return l(D,A,I);var M=D.type==="application/octet-stream",W=/constructor/i.test(w.HTMLElement)||w.safari,De=/CriOS\/[\d]+/.test(navigator.userAgent);if((De||M&&W||g)&&typeof FileReader<"u"){var J=new FileReader;J.onloadend=function(){var C=J.result;C=De?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),F?F.location.href=C:location=C,F=null},J.readAsDataURL(D)}else{var K=w.URL||w.webkitURL,ce=K.createObjectURL(D);F?F.location=ce:location.href=ce,F=null,setTimeout(function(){K.revokeObjectURL(ce)},4e4)}});w.saveAs=h.saveAs=h,a.exports=h})}($a)),$a.exports}Zu();const ra=p.useLoginState(),{loginUserInfo:Ra}=p.storeToRefs(ra),$t=Be.useModelComp(p.pinia),ja=e.ref(!1),{itemData:Qu,itemGridData:Lo,curStructureCompIds:$o,isSubmitCurStructure:ep,isRefreshCurStructure:tp,freshContent:jo,routeToChildPath:np,payloadTypes:ap,pageMapState:Ha,itemExtendData:ya}=p.storeToRefs($t),Sn=Be.useMenuState(p.pinia),{activeTopMenuPath:op,activeMenuPath:zt,platform:qd,activeAsideMenu:lp,buttonTriggerType:rp}=p.storeToRefs(Sn),yn=ua.useUnit(p.pinia),{selectTitle:Ko}=p.storeToRefs(yn),ip=Be.useOriginalState(p.pinia),{originalPath:Za}=p.storeToRefs(ip),Uo=Be.useAuthorityState(p.pinia),qa=e.ref(!0),_a=e.ref(0),vo=e.ref([]),Sa=e.computed(async()=>{var c,i;const a=(c=zt.value)!=null&&c.startsWith("/")?(i=zt.value)==null?void 0:i.substring(1):zt.value;return(a==null?void 0:a.includes(Za.value))||await mp(a)}),sp=()=>{$t.setIsEdit("edit"),$t.setSubmitCurStructure(zt.value!=="/平台管理/菜单管理")},cp=()=>{$t.setIsEdit("view"),$t.setRefreshCurStructure(!0)},up=async a=>{var c;if((a==null?void 0:a.key)==="main"||Ko.value.length===1)Mt.value=await Be.getItemData(zt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Sa.value),yn.setSelectIndex(""),yn.setSelectMenu(""),yn.setSelectTitle([]);else{const i=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);Mt.value=await Be.getItemData(zt.value,sessionStorage.getItem("systemKey"),l,!1,[],await Sa.value);let s=-1;(c=Ko.value)==null||c.forEach((d,w)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(s=w),(s===-1||s>=w)&&i.push(d)}),yn.setSelectTitle(i),l!==""?yn.setSelectMenu(a==null?void 0:a.key):(yn.setSelectIndex(""),yn.setSelectMenu(""))}Mt.value=Ia(Mt.value),$t.setItemData(Mt.value),$t.setOriginalData(Mt.value)},ao=async(a,c,i,l="contentConfig")=>{var s;try{if(!Array.isArray(a))return;let d,w;c==="create"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i!=null&&i.startsWith("/")?i==null?void 0:i.substring(1):i,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(A=>(A==null?void 0:A.key)!=="tableContents")}}}})},w=p.batchAddInsofDataApi):c==="update"?(d={dataList:a==null?void 0:a.map(h=>{var D;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(D=h==null?void 0:h.compData)==null?void 0:D.filter(A=>(A==null?void 0:A.key)!=="tableContents")}}}})},w=p.batchUpdateInsofDataApi):c==="delete"&&(d={ids:a},w=p.batchDeleteInsofDataApi);const g=await w(d);if(((s=g==null?void 0:g.data)==null?void 0:s.code)===200)return g.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},Wo=async(a,c,i,l)=>{var s,d,w,g,h,D,A,I,F,M,W;try{const De=(d=(s=a==null?void 0:a.results)==null?void 0:s.filter(b=>!(b!=null&&b.id)||typeof(b==null?void 0:b.id)=="string"))==null?void 0:d.map(b=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:c,relatedInfo:i},value:{tableData:b}})),J=(g=(w=a==null?void 0:a.results)==null?void 0:w.filter(b=>(b==null?void 0:b.id)&&typeof(b==null?void 0:b.id)=="number"))==null?void 0:g.map(b=>({id:b==null?void 0:b.id,value:{tableData:b}})),K=JSON.parse(p.cloneDeep(JSON.stringify(a))),ce=(h=K==null?void 0:K.results)==null?void 0:h.map(b=>b.id);let C;i?C=(I=(A=(D=Ha.value)==null?void 0:D[zt.value])==null?void 0:A.filter(b=>{var V,S,re;return((V=b==null?void 0:b.key)==null?void 0:V.type)===c&&((re=(S=b==null?void 0:b.key)==null?void 0:S.relatedInfo)==null?void 0:re.target)===l}))==null?void 0:I.map(b=>b==null?void 0:b.id):C=(W=(M=(F=Ha.value)==null?void 0:F[zt.value])==null?void 0:M.filter(b=>{var V;return((V=b==null?void 0:b.key)==null?void 0:V.type)===c}))==null?void 0:W.map(b=>b==null?void 0:b.id);const P=C==null?void 0:C.filter(b=>!(ce!=null&&ce.includes(b))&&typeof b=="number");(De==null?void 0:De.length)>0&&await p.batchAddInsofDataApi({dataList:De}),(J==null?void 0:J.length)>0&&await p.batchUpdateInsofDataApi({dataList:J}),(P==null?void 0:P.length)>0&&await p.batchDeleteInsofDataApi({ids:P})}catch(De){throw new Error(De)}},pp=async a=>{var D,A,I,F;const c=JSON.parse(p.cloneDeep(JSON.stringify(Qu.value)));if(!ep.value)return Sn.setCacheStructures({key:rp.value,data:c}),p.ElMessage.success("已暂存");const i=c==null?void 0:c.map(M=>M.id),l=i.filter(M=>{var W;return!((W=$o.value)!=null&&W.includes(M))}),s=(D=$o.value)==null?void 0:D.filter(M=>!i.includes(M)),d=[...l,...s].filter(M=>typeof M!==null&&typeof M<"u"),w=c==null?void 0:c.filter(M=>!M.id),g=c==null?void 0:c.filter(M=>M.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(ao(d,"delete",a)),w&&(w==null?void 0:w.length)>0&&h.push(ao(w,"create",a)),g&&(g==null?void 0:g.length)>0&&h.push(ao(g,"update",a)),Lo.value&&h.push(await Wo(Lo.value,"gridLayout")),console.log("itemExtendData.value",ya.value),ya.value)for(const M in ya.value)h.push(await Wo((A=ya.value)==null?void 0:A[M],"extend",{target:M,compId:(F=(I=ya.value)==null?void 0:I[M])==null?void 0:F.compId},M));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),$t.setRefreshCurStructure(!0)}).catch(M=>{p.ElMessage.success(M)})},go=a=>fa(a),Mt=e.ref([]),dp=e.ref(["审批意见"]),fp=async a=>{var l,s,d,w,g,h;let c=p.cloneDeep(zt).value;c=c+Za.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const i=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:c}});if(((d=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:d.length)>0){const D=(g=(w=i==null?void 0:i.data)==null?void 0:w.result)==null?void 0:g.map(I=>I==null?void 0:I.id),A=await p.batchDeleteInsofDataApi({ids:D});((h=A==null?void 0:A.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await ra.setLogRecordAsync({type:"删除",data:a},c)):p.ElMessage.error("删除响应失败"),$t.setTableLoading(!1)}},Ho=async a=>{var c,i;try{let l=p.cloneDeep(zt).value,s=[];if(Array.isArray(a)){a==null||a.forEach(w=>{var g;s.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+Za.value+((g=Object.values(w==null?void 0:w.singleContent))==null?void 0:g[0])}}))});const d=await Promise.all(s);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(w=>{var g;return((g=w==null?void 0:w.data)==null?void 0:g.code)===200}))){const w=Array.from(new Set((c=d==null?void 0:d.flatMap(h=>{var D;return(D=h==null?void 0:h.data)==null?void 0:D.result}))==null?void 0:c.map(h=>h==null?void 0:h.id))),g=await p.batchDeleteInsofDataApi({ids:w});((i=g==null?void 0:g.data)==null?void 0:i.code)===200?(p.ElMessage.success("删除成功"),await ra.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await fp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{$t.setTableLoading(!1)}},hp=async a=>{var c,i,l;try{if(!a||!(a!=null&&a.data))return;const{id:s,...d}=p.cloneDeep(a==null?void 0:a.data),w=await p.createInsofDataApi({key:{type:"data",pageKey:zt.value,tableId:(c=a==null?void 0:a.to)==null?void 0:c.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((i=a==null?void 0:a.data)!=null&&i.id))return;const g=await p.deleteInsofDataApi({id:(l=a==null?void 0:a.data)==null?void 0:l.id}),h=await Promise.all([w,g]);(h==null?void 0:h.every(A=>{var I;return((I=A==null?void 0:A.data)==null?void 0:I.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(s){throw p.ElMessage.error(s),new Error(s)}},Al=e.ref(0),Xa=e.ref(null),mo=async(a,c="data",i)=>{var l,s,d,w,g,h,D,A,I,F,M,W,De,J,K,ce,C,P,b,V,S;if(Xa.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await Ho(a):await Be.deleteTableContents((s=a==null?void 0:a.singleContent)==null?void 0:s.id),await ra.setLogRecordAsync({type:"删除",data:a},zt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(re=>typeof(re==null?void 0:re.id)=="string")){const re=(w=a==null?void 0:a.selectItems)==null?void 0:w.map(Le=>({content:a==null?void 0:a.content,singleContent:Le,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await Ho(re)}else{const re=(g=a==null?void 0:a.selectItems)==null?void 0:g.map(Le=>Le==null?void 0:Le.id);await p.batchDeleteInsofDataApi({ids:re}),await ra.setLogRecordAsync({type:"删除",data:re},zt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let re={};for(let lt in a==null?void 0:a.singleContent)lt!=="id"&<!=="index"&&(re[lt]=a==null?void 0:a.singleContent[lt]);const Le=await Be.addTableContents(c,zt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(re),a==null?void 0:a.column,a,{param:i});Xa.value={resId:Le,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},$t.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let re=[],Le=[],lt=((D=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:D.id)??"",Ve=i==null?void 0:i.url,We="",be="";if(lt!==""&&((A=a==null?void 0:a.content)==null?void 0:A.length)>1&&typeof((F=(I=a==null?void 0:a.content)==null?void 0:I[0])==null?void 0:F.id)!="string"){const B=await p.getInsofDataApi({id:lt});We=((J=(De=(W=(M=B==null?void 0:B.data)==null?void 0:M.result)==null?void 0:W[0])==null?void 0:De.key)==null?void 0:J.tableId)??"",be=((P=(C=(ce=(K=B==null?void 0:B.data)==null?void 0:K.result)==null?void 0:ce[0])==null?void 0:C.key)==null?void 0:P.pageKey)??""}(b=a==null?void 0:a.singleContent)==null||b.forEach(B=>{let ae={};for(let te in B)te!=="id"&&te!=="index"&&(ae[te]=B[te]);typeof(B==null?void 0:B.id)=="number"?re.push({id:B==null?void 0:B.id,value:{tableData:ae}}):Le.push({key:{type:c,pageKey:Ve||be||zt.value,tableId:We||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ae}})}),(Le==null?void 0:Le.length)>0&&await p.batchAddInsofDataApi({dataList:Le}),(re==null?void 0:re.length)>0&&await p.batchUpdateInsofDataApi({dataList:re})}else{let re={},Le=(V=a==null?void 0:a.singleContent)==null?void 0:V.id;for(let lt in a==null?void 0:a.singleContent)lt!=="id"&<!=="index"&&(re[lt]=a==null?void 0:a.singleContent[lt]);await Be.fixTableContents(c,zt.value,a==null?void 0:a.index,Le,sessionStorage.getItem("systemKey"),Object.values(re),a==null?void 0:a.column)}$t.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await hp(a==null?void 0:a.value);$t.setTableLoading(!1),(S=a==null?void 0:a.column)!=null&&S.some(re=>re==null?void 0:re.isMainKey)||(Mt.value=await Be.getItemData(zt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Sa.value)),Mt.value=Ia(Mt.value)},vp=async a=>{var i,l,s;const c=await p.getInsofDataApi({id:a});return(s=(l=(i=c==null?void 0:c.data)==null?void 0:i.result)==null?void 0:l[0])==null?void 0:s.value},yo=async(a,c)=>{var s,d,w;if(ja.value||typeof(a==null?void 0:a.index)=="string")return;const i=await vp(a==null?void 0:a.index),l=(s=i==null?void 0:i.pageData)==null?void 0:s.name;await Be.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(g=>g.contents),name:l,isShow:(w=i==null?void 0:i.pageData)==null?void 0:w.isShow}),c&&(Sn.setActiveMenuPath(null),Sn.setActiveMenuPath(c))},bo=a=>{Mt.value=Ia(a),$t.setItemData(Mt.value),$t.setOriginalData(Mt.value)},gp=async a=>{var c;await e.nextTick(),(c=lp.value)!=null&&c.isRouter?Uo.setRouterPageStructure(a):Uo.setRouterPageStructure([])},mp=async a=>{var d,w,g,h,D,A;let c="",i="";(d=a==null?void 0:a.split("/"))==null||d.forEach((I,F)=>{var M;((M=a==null?void 0:a.split("/"))==null?void 0:M.length)-2>F&&(c=c===""?c+I:c+"/"+I)}),(w=a==null?void 0:a.split("/"))==null||w.forEach((I,F)=>{var M;((M=a==null?void 0:a.split("/"))==null?void 0:M.length)-1>F&&(i=i===""?i+I:i+"/"+I)}),c=c+"/",i=i+"/";let l=await p.getInsofDataApi({key:{pageKey:c,systemKey:sessionStorage.getItem("systemKey")}}),s=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}});return((h=(g=l==null?void 0:l.data)==null?void 0:g.result)==null?void 0:h.length)>0||((A=(D=s==null?void 0:s.data)==null?void 0:D.result)==null?void 0:A.length)>0},yp=e.ref(),$n=e.ref(null),bp=a=>{var D,A,I,F,M,W,De,J,K,ce,C,P,b,V,S,re,Le,lt,Ve,We;const c=(A=(D=Ha.value)==null?void 0:D[a])==null?void 0:A.filter(be=>{var B;return((B=be==null?void 0:be.key)==null?void 0:B.type)==="extend"});if((c==null?void 0:c.length)===0)return $n.value=null;yp.value=c;const i=(F=(I=c==null?void 0:c.find(be=>{var B,ae,te;return(te=(ae=(B=be==null?void 0:be.value)==null?void 0:B.tableData)==null?void 0:ae.执行任务)==null?void 0:te.includes("计时")}))==null?void 0:I.value)==null?void 0:F.tableData;if(!i)return $n.value=null;const l=(De=(W=(M=c==null?void 0:c.find(be=>{var B,ae,te;return(te=(ae=(B=be==null?void 0:be.value)==null?void 0:B.tableData)==null?void 0:ae.执行任务)==null?void 0:te.includes("计时")}))==null?void 0:M.key)==null?void 0:W.relatedInfo)==null?void 0:De.compId,s=(J=Mt.value)==null?void 0:J.find(be=>(be==null?void 0:be.id)===l);if(!s)return $n.value=null;const d=(ce=i==null?void 0:i.任务关键词)==null?void 0:ce[((K=i==null?void 0:i.任务关键词)==null?void 0:K.length)-1],w=(b=(P=(C=s==null?void 0:s.compData)==null?void 0:C.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:P.contents)==null?void 0:b.findIndex(be=>(be==null?void 0:be.prop)===d),g=(Le=(re=(S=(V=s==null?void 0:s.compData)==null?void 0:V.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:S.contents)==null?void 0:re.find(be=>be==null?void 0:be.isMainKey))==null?void 0:Le.prop,h=(We=(Ve=(lt=s==null?void 0:s.compData)==null?void 0:lt.find(be=>(be==null?void 0:be.key)==="tableContents"))==null?void 0:Ve.contents)==null?void 0:We[w];$n.value={prop:d,value:h,title:i==null?void 0:i.任务名称,task:i==null?void 0:i.执行任务,action:i==null?void 0:i.执行动作,runIn:i==null?void 0:i.执行交互,mainKeyProp:g},console.log("getPageExtendData:",i,c)},kp=()=>{var a,c;console.log("倒计时结束时"),Be.ElMessageBox.alert(`超时未提交,【${(c=(a=zt.value)==null?void 0:a.split("/"))==null?void 0:c[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Nl=()=>{var a,c,i,l;try{if(op.value!=="报告中心"||!((a=zt.value)!=null&&a.includes(Za.value)))return;const s=(c=Mt.value)==null?void 0:c.find(h=>{var D;return((D=h==null?void 0:h.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!s)return;const d={prop:"状态",value:"编制中"},w=(l=(i=s==null?void 0:s.compData)==null?void 0:i.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,g=w==null?void 0:w.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(d==null?void 0:d.value)&&$t.setLockingPage(zt.value)}catch(s){throw p.ElMessage.error(s),new Error(s)}},ko=e.ref([]),xp=e.computed(()=>{var a,c;return(c=(a=Ha.value)==null?void 0:a[zt.value])==null?void 0:c.filter(i=>{var l;return((l=i==null?void 0:i.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[zt.value,tp.value],async a=>{var d,w,g,h,D,A,I,F;if(!zt.value)return;$t.setLockingPage(""),Mt.value=[];let c=e.getCurrentInstance();(d=c==null?void 0:c.scope)==null||d.stop(),c=null,qa.value=!1,ja.value=!0;const i=(w=a==null?void 0:a[0])!=null&&w.startsWith("/")?(g=a==null?void 0:a[0])==null?void 0:g.substring(1):a==null?void 0:a[0];let l=new WeakMap;(D=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ap.value})).data.result)==null?void 0:h.filter(M=>{var W,De;return((W=M==null?void 0:M.key)==null?void 0:W.pageKey)!=="menu"&&((De=M==null?void 0:M.key)==null?void 0:De.pageKey)!=="secret"}))==null||D.forEach(M=>{l[M.key.pageKey]?l[M.key.pageKey]=[...l[M.key.pageKey],M]:l[M.key.pageKey]=[M]}),vo.value=l,i?(Sn.setContentLoading(!0),sessionStorage.setItem("pageKey",zt.value),Mt.value=await Be.getItemData(i,sessionStorage.getItem("systemKey"),"",!1,[],await Sa.value,l),await ra.setLogRecordAsync({type:"查询",data:Mt.value},zt.value),Mt.value=Ia(Mt.value),await gp(Mt.value),Nl(),bp(i),ko.value=(A=Mt.value)==null?void 0:A.map(M=>({label:M==null?void 0:M.name,value:M==null?void 0:M.id})),$t.setExtraContents([]),yn.setSelectTitle([]),yn.setSelectIndex(""),yn.setSelectMenu(""),$t.setItemData(Mt.value),$t.setOriginalData(Mt.value),$t.setCurStructureCompIds((I=Mt.value)==null?void 0:I.map(M=>M==null?void 0:M.id)),$t.setRefreshCurStructure(!1),yn.setSelectTitle((F=zt.value)==null?void 0:F.split("/").map(M=>({value:M.trim()}))),Sn.setChildMenu(""),Sn.setContentLoading(!1),$t.setTableLoading(!1),ja.value=!1):(Mt.value=[],ja.value=!1),e.nextTick(()=>{_a.value=_a.value++,qa.value=!0})},{immediate:!0});e.watch(()=>jo.value,async()=>{if(jo.value){let a=await Be.getItemData(zt.value,sessionStorage.getItem("systemKey"),"",!1,[],await Sa.value);Mt.value=Ia(a),$t.setFreshContent(!1),Nl()}},{deep:!0});const wp=async()=>{var s,d,w,g,h,D,A,I;Sn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((s=Ra.value)==null?void 0:s.account)||((d=Ra.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((w=Ra.value)==null?void 0:w.account)||((g=Ra.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let i=(D=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:D.map(F=>F==null?void 0:F.id);const l=(I=(A=c==null?void 0:c.data)==null?void 0:A.result)==null?void 0:I.map(F=>F==null?void 0:F.id);i=[...p.cloneDeep(i),...l],(i==null?void 0:i.length)>0&&(i!=null&&i.every(F=>F!==null&&F))&&(await p.batchDeleteInsofDataApi({ids:i}),await ra.setLogRecordAsync({type:"删除",data:i},zt.value)),Sn.setActiveMenuPath(np.value),Mt.value=null,$t.setRouteToChildPath(""),Sn.setChildMenu("")},Dp=a=>new RegExp("button","i").test(a),Cp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Vl=a=>{if(Cp(a)){const c=a==null?void 0:a.split("^");(c==null?void 0:c.length)>0&&(c!=null&&c[0])&&Sn.setLinkMenuInfo({path:c==null?void 0:c[0],data:c==null?void 0:c[1]})}},Ol=a=>{var c;$n.value&&($n.value={...$n.value,mainKeyPropValue:a==null?void 0:a[(c=$n.value)==null?void 0:c.mainKeyProp]})},Ep=a=>{Al.value=a},so=e.reactive({index:1,status:"",comp:null}),_p=(a,c)=>{so.index=c,so.comp=a},Sp={class:"layout"},Tp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:c}){const i=c,l=a;e.onMounted(async()=>{});const s=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var A;const D=(A=s==null?void 0:s.value)==null?void 0:A.find(I=>{const{key:F}=I;return F==="baseConfig"});return D==null?void 0:D.contents}),w=e.computed(()=>{var A;const D=(A=s==null?void 0:s.value)==null?void 0:A.find(I=>{const{key:F}=I;return F==="children"});return D==null?void 0:D.contents}),g=e.computed(()=>{let D=p.cloneDeep(w.value)||[];const A=D.length;let I=0;const F=[];if(D=D.map(M=>{const W=M.span;return W?(M.span=Number(W),I=I+M.span):F.push(M),M}),I<24){const M=Math.floor((24-I)/A);F.forEach(W=>{W.span=M})}return D}),h=D=>{i("rowClick",D)};return(D,A)=>{var M;const I=e.resolveComponent("el-col"),F=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Sp,[e.createVNode(F,{style:e.normalizeStyle({height:(M=d.value)==null?void 0:M.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(W,De)=>(e.openBlock(),e.createBlock(I,{span:W==null?void 0:W.span},{default:e.withCtx(()=>{var J;return[e.unref(qa)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(go)(W.comp)),{key:e.unref(_a),compName:W.name,index:(W==null?void 0:W.id)??De,height:(J=d.value)==null?void 0:J.height,itemData:W==null?void 0:W.compData,childItemData:W==null?void 0:W.itemChildData,onChange:e.unref(mo),onContentChange:e.unref(yo),onPageChange:e.unref(bo),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Ip=Rt._export_sfc(Tp,[["__scopeId","data-v-ab9a36ed"]]),Bp={class:"layout-operate"},Ap={class:"layout-module"},Np={class:"collapse-title-item"},Vp={class:"collapse-title"},Op={class:"icon-content"},Mp=["onClick"],zp={class:"comp-child"},Rp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:c}){const i=a,l=c;e.onMounted(()=>{De()});const s=e.ref({}),d=e.ref({}),w=e.ref([]),g=b=>[{label:"高度",prop:"height",type:"input",value:b==null?void 0:b.height}],h=b=>{d.value=b,l("change",P(),!0)},D=e.ref([]),A=e.ref([]),I=b=>[{label:"占比",prop:"span",type:"input",value:b==null?void 0:b.span}],F=e.computed(()=>{const b=i==null?void 0:i.itemContents;return p.cloneDeep(b)}),M=e.computed(()=>{const b=F==null?void 0:F.value,V=b==null?void 0:b.find(S=>{const{key:re}=S;return re==="baseConfig"});return V==null?void 0:V.contents}),W=e.computed(()=>{const b=F==null?void 0:F.value,V=b==null?void 0:b.find(S=>{const{key:re}=S;return re==="children"});return V==null?void 0:V.contents}),De=()=>{var b;s.value=F.value||{},D.value=(W==null?void 0:W.value)||[],w.value=g(),w.value=(b=w.value)==null?void 0:b.map(V=>{var re;const{prop:S}=V;return V.value=(re=M.value)==null?void 0:re[S],V})};e.watch(()=>{var b;return(b=W==null?void 0:W.value)==null?void 0:b.length},()=>{var b;D.value=(W==null?void 0:W.value)||[],A.value=(b=W.value)==null?void 0:b.map(V=>I(V))},{immediate:!0});const J=(b,V)=>{const S=p.cloneDeep(W==null?void 0:W.value);S[V].span=b.span,D.value=S,l("change",P(),!0)},K=b=>fa(b),ce=(b,V,S)=>{if(!b)return;const re=p.cloneDeep(W==null?void 0:W.value);re[S]&&(re[S].compData=b,D.value=re,l("change",P(),!0))},C=b=>{Be.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let V=p.cloneDeep(W==null?void 0:W.value);V=V==null?void 0:V.filter((S,re)=>b!==re),D.value=V,l("change",P(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},P=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:D==null?void 0:D.value}]});return(b,V)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Bp,[e.createElementVNode("div",Ap,[V[1]||(V[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(St.ssForm,{rowContents:w.value,isEnableWrap:!0,onChange:V[0]||(V[0]=re=>h(re))},null,8,["rowContents"])])]),e.createVNode(bl.default,{class:"collapse-content",collapseContents:W.value},{title:e.withCtx(({item:re,index:Le})=>[e.createElementVNode("div",Np,[e.createElementVNode("div",Vp,e.toDisplayString(re.name),1),e.createElementVNode("div",Op,[e.createElementVNode("div",{onClick:e.withModifiers(lt=>C(Le),["stop"]),class:"icon-content"},[e.createVNode(S,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Mp)])])]),content:e.withCtx(({item:re,index:Le})=>[e.createElementVNode("div",zp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:A.value[Le],key:Le,isEnableWrap:!0,onChange:lt=>J(lt,Le)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(re.comp+"Operate")),{itemContents:re==null?void 0:re.compData,originalItemContents:re.compData,onChange:lt=>ce(lt,re,Le)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Pp=Rt._export_sfc(Rp,[["__scopeId","data-v-ba05456e"]]),Fp=typeof window<"u";var qo;Fp&&((qo=window==null?void 0:window.navigator)!=null&&qo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function un(a){return a==null}function Ml(){}const Lp=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(Lp)));function $p(){const a=new Map;return{on(c,i){const l=a.get(c);l!=null&&l.add(i)||a.set(c,new Set([i]))},off(c,i){const l=a.get(c);l&&l.delete(i)},clear(c){const i=a.get(c);i&&i.clear()},clearAll(){a.clear()},emit(c,...i){const l=a.get(c);l&&l.forEach(s=>{s(...i)})}}}function Xo(a,c=16){if(typeof a!="function")return Ml;const i=(...d)=>{a(...d)};if(c<=0)return zl(i);let l=0,s;return function(...d){const w=Date.now(),g=w-l;clearTimeout(s),g>=c?(l=w,i(...d)):s=setTimeout(()=>{l=Date.now(),i(...d)},Math.max(0,c-g))}}function jp(a,c=100){if(typeof a!="function")return Ml;const i=(...s)=>{a(...s)};if(c<=0)return zl(i);let l;return function(...s){clearTimeout(l),l=setTimeout(()=>{i(...s)},c)}}function zl(a){if(typeof a!="function")return a;let c=!1,i,l;return function(...s){return i=s,c||(c=!0,l=Promise.resolve().then(()=>(c=!1,l=void 0,a(...i)))),l}}const Da=new Set,Rl=new WeakMap;function Kp(){Da.forEach(a=>{a(...Rl.get(a))}),Da.clear()}function nn(a,...c){if(typeof a!="function")return a;Rl.set(a,c),!Da.has(a)&&(Da.add(a),Da.size===1&&Promise.resolve().then(Kp))}const Pl=Symbol("LAYOUT_KEY"),Fl=Symbol("EMITTER_KEY");function Up(a){let c=0,i;for(let l=0,s=a.length;l<s;l++)i=a[l].y+a[l].h,i>c&&(c=i);return c}function co(a){const c=Array(a.length);for(let i=0,l=a.length;i<l;i++)c[i]=Wp(a[i]);return c}function Wp(a){return{...a}}function Ll(a,c){return!(a===c||a.x+a.w<=c.x||a.x>=c.x+c.w||a.y+a.h<=c.y||a.y>=c.y+c.h)}function ca(a,c,i){const l=jl(a),s=Kl(a),d=Array(a.length);for(let w=0,g=s.length;w<g;w++){let h=s[w];h.static||(h=Hp(l,h,c,i),l.push(h)),d[a.findIndex(D=>D.i===h.i)]=h,h.moved=!1}return d}function Hp(a,c,i,l){if(i)for(;c.y>0&&!Ca(a,c);)c.y--;else if(l){const d=l[c.i].y;for(;c.y>d&&!Ca(a,c);)c.y--}let s;for(;s=Ca(a,c);)c.y=s.y+s.h;return c}function qp(a,c){const i=jl(a);for(let l=0,s=a.length;l<s;l++){const d=a[l];if(d.x+d.w>c.cols&&(d.x=c.cols-d.w),d.x<0&&(d.x=0,d.w=c.cols),!d.static)i.push(d);else for(;Ca(i,d);)d.y++}return a}function Go(a,c){for(let i=0,l=a.length;i<l;i++)if(a[i].i===c)return a[i]}function Ca(a,c){for(let i=0,l=a.length;i<l;i++)if(Ll(a[i],c))return a[i]}function $l(a,c){return a.filter(i=>Ll(i,c))}function jl(a){return a.filter(c=>c.static)}function uo(a,c,i,l,s=!1,d=!1){if(c.static)return a;const w=c.x,g=c.y,h=l&&c.y>l;typeof i=="number"&&(c.x=i),typeof l=="number"&&(c.y=l),c.moved=!0;let D=Kl(a);h&&(D=D.reverse());const A=$l(D,c);if(d&&A.length)return c.x=w,c.y=g,c.moved=!1,a;for(let I=0,F=A.length;I<F;I++){const M=A[I];M.moved||c.y>M.y&&c.y-M.y>M.h/4||(M.static?a=Yo(a,M,c,s):a=Yo(a,c,M,s))}return a}function Yo(a,c,i,l){if(l){const s={x:i.x,y:i.y,w:i.w,h:i.h};if(s.y=Math.max(c.y-i.h,0),!Ca(a,s))return uo(a,i,void 0,s.y,!1)}return uo(a,i,void 0,i.y+1,!1)}function Xp(a,c,i,l){const s="translate3d("+c+"px,"+a+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:i+"px",height:l+"px",position:"absolute"}}function Gp(a,c,i,l){const s="translate3d("+c*-1+"px,"+a+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:i+"px",height:l+"px",position:"absolute"}}function Yp(a,c,i,l){return{top:a+"px",left:c+"px",width:i+"px",height:l+"px",position:"absolute"}}function Jp(a,c,i,l){return{top:a+"px",right:c+"px",width:i+"px",height:l+"px",position:"absolute"}}function Kl(a){return Array.from(a).sort(function(c,i){return c.y===i.y&&c.x===i.x?0:c.y>i.y||c.y===i.y&&c.x>i.x?1:-1})}function Zp(a,c){c=c||"Layout";const i=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(c+" must be an array!");for(let s=0,d=a.length;s<d;s++){const w=a[s];for(let g=0;g<i.length;g++)if(typeof w[i[g]]!="number")throw new Error("VueGridLayout: "+c+"["+s+"]."+i[g]+" must be a number!");if(w.i===void 0||w.i===null)throw new Error("VueGridLayout: "+c+"["+s+"].i cannot be null!");if(typeof w.i!="number"&&typeof w.i!="string")throw new Error("VueGridLayout: "+c+"["+s+"].i must be a string or number!");if(l.indexOf(w.i)>=0)throw new Error("VueGridLayout: "+c+"["+s+"].i must be unique!");if(l.push(w.i),w.static!==void 0&&typeof w.static!="boolean")throw new Error("VueGridLayout: "+c+"["+s+"].static must be a boolean!")}}function Qp(a,c="vgl"){const i=()=>`${c}-${a}`;return{b:i,be:l=>`${i()}__${l}`,bm:l=>`${i()}--${l}`,bem:(l,s)=>`${i()}__${l}--${s}`}}function Jo(a){return ed(a)}function ed(a){var c;const i=((c=a.target)==null?void 0:c.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:i.getBoundingClientRect(),s=a.clientX+i.scrollLeft-l.left,d=a.clientY+i.scrollTop-l.top;return{x:s,y:d}}function Zo(a,c,i,l){return td(a)?{deltaX:i-a,deltaY:l-c,lastX:a,lastY:c,x:i,y:l}:{deltaX:0,deltaY:0,lastX:i,lastY:l,x:i,y:l}}function td(a){return typeof a=="number"&&!Number.isNaN(a)}function nd(a,c){const i=Wl(a);let l=i[0];for(let s=1,d=i.length;s<d;s++){const w=i[s];c>a[w]&&(l=w)}return l}function Ul(a,c){if(!c[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return c[a]}function ad(a,c,i,l,s,d,w){if(c[l])return co(c[l]);let g=a;const h=Wl(i),D=h.slice(h.indexOf(l));for(let A=0,I=D.length;A<I;A++){const F=D[A];if(c[F]){g=c[F];break}}return g=co(g||[]),ca(qp(g,{cols:d}),w)}function Wl(a){return Object.keys(a).sort((c,i)=>a[c]-a[i])}let od="auto";function ld(){return typeof document<"u"}function Qo(){return ld()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):od}var xa={exports:{}},rd=xa.exports,el;function id(){return el||(el=1,function(a,c){(function(i,l){a.exports=l()})(rd,function(){function i(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function s(n){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function w(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,De(r.key),r)}}function g(n,t,o){return t&&w(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=De(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function D(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&I(n,t)}function A(n){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},A(n)}function I(n,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},I(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 M(n){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,r=A(n);if(t){var u=A(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,v){if(v&&(typeof v=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(f)}(this,o)}}function W(){return W=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,v){for(;!Object.prototype.hasOwnProperty.call(f,v)&&(f=A(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},W.apply(this,arguments)}function De(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var J=function(n){return!(!n||!n.Window)&&n instanceof n.Window},K=void 0,ce=void 0;function C(n){K=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),ce=n}function P(n){return J(n)?n:(n.ownerDocument||n).defaultView||ce.window}typeof window<"u"&&window&&C(window);var b=function(n){return!!n&&s(n)==="object"},V=function(n){return typeof n=="function"},S={window:function(n){return n===ce||J(n)},docFrag:function(n){return b(n)&&n.nodeType===11},object:b,func:V,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||s(n)!=="object")return!1;var t=P(n)||ce;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return b(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return b(n)&&n.length!==void 0&&V(n.splice)}};function re(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 Le(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var lt={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=lt.draggable,t.map.drag=lt,t.methodDict.drag="draggable",r.actions.drag=lt.defaults},listeners:{"interactions:before-action-move":re,"interactions:action-resume":re,"interactions:action-move":Le,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return S.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):S.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:re,move:Le,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Ve=lt,We={init:function(n){var t=n;We.document=t.document,We.DocumentFragment=t.DocumentFragment||be,We.SVGElement=t.SVGElement||be,We.SVGSVGElement=t.SVGSVGElement||be,We.SVGElementInstance=t.SVGElementInstance||be,We.Element=t.Element||be,We.HTMLElement=t.HTMLElement||We.Element,We.Event=t.Event,We.Touch=t.Touch||be,We.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 be(){}var B=We,ae={init:function(n){var t=B.Element,o=n.navigator||{};ae.supportsTouch="ontouchstart"in n||S.func(n.DocumentTouch)&&B.document instanceof n.DocumentTouch,ae.supportsPointerEvent=o.pointerEnabled!==!1&&!!B.PointerEvent,ae.isIOS=/iP(hone|od|ad)/.test(o.platform),ae.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ae.isIe9=/MSIE 9/.test(o.userAgent),ae.isOperaMobile=o.appName==="Opera"&&ae.supportsTouch&&/Presto/.test(o.userAgent),ae.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ae.pEventTypes=ae.supportsPointerEvent?B.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,ae.wheelEvent=B.document&&"onmousewheel"in B.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},te=ae;function de(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ue(n,t){for(;S.element(n);){if(Ne(n,t))return n;n=ut(n)}return null}function ut(n){var t=n.parentNode;if(S.docFrag(t)){for(;(t=t.host)&&S.docFrag(t););return t}return t}function Ne(n,t){return ce!==K&&(t=t.replace(/\/deep\//g," ")),n[te.prefixedMatchesSelector](t)}var E=function(n){return n.parentNode||n.host};function _e(n,t){for(var o,r=[],u=n;(o=E(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function ie(n,t,o){for(;S.element(n);){if(Ne(n,t))return!0;if((n=ut(n))===o)return Ne(n,t)}return!1}function Fe(n){return n.correspondingUseElement||n}function $e(n){var t=n instanceof B.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 xe(n){var t,o=$e(n);if(!te.isIOS7&&o){var r={x:(t=(t=P(n))||ce).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function je(n){for(var t=[];n;)t.push(n),n=ut(n);return t}function pt(n){return!!S.string(n)&&(B.document.querySelector(n),!0)}function G(n,t){for(var o in t)n[o]=t[o];return n}function Qe(n,t,o){return n==="parent"?ut(o):n==="self"?t.getRect(o):Ue(o,n)}function ft(n,t,o,r){var u=n;return S.string(u)?u=Qe(u,t,o):S.func(u)&&(u=u.apply(void 0,r)),S.element(u)&&(u=xe(u)),u}function tt(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ee(n){return!n||"x"in n&&"y"in n||((n=G({},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 oe(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 we(n,t,o){var r=o&&n.options[o];return tt(ft(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function he(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(_){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},S.string(n)&&n.search(" ")!==-1&&(n=Je(n)),S.array(n))return n.forEach(function(_){return he(_,t,o,r)}),r;if(S.object(n)&&(t=n,n=""),S.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(S.array(t))for(var u=0,f=t;u<f.length;u++){var v=f[u];he(n,v,o,r)}else if(S.object(t))for(var y in t)he(Je(y).map(function(_){return"".concat(n).concat(_)}),t[y],o,r);return r}function Je(n){return n.trim().split(/ +/)}var et=function(n,t){return Math.sqrt(n*n+t*t)},k=["webkit","moz"];function x(n,t){n.__set||(n.__set={});var o=function(u){if(k.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function R(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function ne(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function m(n){return n instanceof B.Event||n instanceof B.Touch}function T(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function U(n,t){return t=t||{x:0,y:0},te.isOperaMobile&&m(n)?(T("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):T("page",n,t),t}function j(n){return S.number(n.pointerId)?n.pointerId:n.identifier}function H(n,t,o){var r=t.length>1?X(t):t[0];U(r,n.page),function(u,f){f=f||{},te.isOperaMobile&&m(u)?T("screen",u,f):T("client",u,f)}(r,n.client),n.timeStamp=o}function Z(n){var t=[];return S.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 X(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function Y(n){if(!n.length)return null;var t=Z(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function fe(n,t){var o=t+"X",r=t+"Y",u=Z(n),f=u[0][o]-u[1][o],v=u[0][r]-u[1][r];return et(f,v)}function q(n,t){var o=t+"X",r=t+"Y",u=Z(n),f=u[1][o]-u[0][o],v=u[1][r]-u[0][r];return 180*Math.atan2(v,f)/Math.PI}function se(n){return S.string(n.pointerType)?n.pointerType:S.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof B.Touch?"touch":"mouse"}function $(n){var t=S.func(n.composedPath)?n.composedPath():n.path;return[Fe(t?t[0]:n.target),Fe(n.currentTarget)]}var Ae=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Ae.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Se=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},ke=function(n){return Se([],n)},z=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},pe=function(n,t){return n[z(n,t)]},ve=function(n){D(o,n);var t=M(o);function o(r,u,f){var v;d(this,o),(v=t.call(this,u._interaction)).dropzone=void 0,v.dragEvent=void 0,v.relatedTarget=void 0,v.draggable=void 0,v.propagationStopped=!1,v.immediatePropagationStopped=!1;var y=f==="dragleave"?r.prev:r.cur,_=y.element,L=y.dropzone;return v.type=f,v.target=_,v.currentTarget=_,v.dropzone=L,v.dragEvent=u,v.relatedTarget=u.target,v.draggable=u.interactable,v.timeStamp=u.timeStamp,v}return g(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,v=z(f,function(_){var L=_.dropzone,N=_.element;return L===r.dropzone&&N===r.target});u.activeDrops.splice(v,1);var y=new o(u,this.dragEvent,"dropdeactivate");y.dropzone=this.dropzone,y.target=this.target,this.dropzone.fire(y)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(Ae);function ge(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,v=u.element;t.dropzone=f,t.target=v,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Me(n,t){for(var o=function(f,v){for(var y=[],_=0,L=f.interactables.list;_<L.length;_++){var N=L[_];if(N.options.drop.enabled){var Q=N.options.drop.accept;if(!(S.element(Q)&&Q!==v||S.string(Q)&&!Ne(v,Q)||S.func(Q)&&!Q({dropzone:N,draggableElement:v})))for(var ye=0,Ke=N.getAllElements();ye<Ke.length;ye++){var Pe=Ke[ye];Pe!==v&&y.push({dropzone:N,element:Pe,rect:N.getRect(Pe)})}}}return y}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function Ze(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,v=[],y=0,_=r.activeDrops;y<_.length;y++){var L=_[y],N=L.dropzone,Q=L.element,ye=L.rect,Ke=N.dropCheck(t,o,u,f,Q,ye);v.push(Ke?Q:null)}var Pe=function(Ge){for(var st,ot,ht,yt=[],Ct=0;Ct<Ge.length;Ct++){var mt=Ge[Ct],xt=Ge[st];if(mt&&Ct!==st)if(xt){var tn=E(mt),Kt=E(xt);if(tn!==mt.ownerDocument)if(Kt!==mt.ownerDocument)if(tn!==Kt){yt=yt.length?yt:_e(xt);var cn=void 0;if(xt instanceof B.HTMLElement&&mt instanceof B.SVGElement&&!(mt instanceof B.SVGSVGElement)){if(mt===Kt)continue;cn=mt.ownerSVGElement}else cn=mt;for(var En=_e(cn,xt.ownerDocument),Pn=0;En[Pn]&&En[Pn]===yt[Pn];)Pn++;var za=[En[Pn-1],En[Pn],yt[Pn]];if(za[0])for(var ma=za[0].lastChild;ma;){if(ma===za[1]){st=Ct,yt=En;break}if(ma===za[2])break;ma=ma.previousSibling}}else ht=xt,(parseInt(P(ot=mt).getComputedStyle(ot).zIndex,10)||0)>=(parseInt(P(ht).getComputedStyle(ht).zIndex,10)||0)&&(st=Ct);else st=Ct}else st=Ct}return st}(v);return r.activeDrops[Pe]||null}function Ce(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new ve(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new ve(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new ve(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new ve(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new ve(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new ve(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function Re(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&ge(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function Te(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Me(t,o.element));var v=r,y=Ze(o,v,u);f.rejected=f.rejected&&!!y&&y.dropzone===f.cur.dropzone&&y.element===f.cur.element,f.cur.dropzone=y&&y.dropzone,f.cur.element=y&&y.element,f.events=Ce(o,0,v)}}var it={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(Ve),r.prototype.dropzone=function(f){return function(v,y){if(S.object(y)){if(v.options.drop.enabled=y.enabled!==!1,y.listeners){var _=he(y.listeners),L=Object.keys(_).reduce(function(Q,ye){return Q[/^(enter|leave)/.test(ye)?"drag".concat(ye):/^(activate|deactivate|move)/.test(ye)?"drop".concat(ye):ye]=_[ye],Q},{}),N=v.options.drop.listeners;N&&v.off(N),v.on(L),v.options.drop.listeners=L}return S.func(y.ondrop)&&v.on("drop",y.ondrop),S.func(y.ondropactivate)&&v.on("dropactivate",y.ondropactivate),S.func(y.ondropdeactivate)&&v.on("dropdeactivate",y.ondropdeactivate),S.func(y.ondragenter)&&v.on("dragenter",y.ondragenter),S.func(y.ondragleave)&&v.on("dragleave",y.ondragleave),S.func(y.ondropmove)&&v.on("dropmove",y.ondropmove),/^(pointer|center)$/.test(y.overlap)?v.options.drop.overlap=y.overlap:S.number(y.overlap)&&(v.options.drop.overlap=Math.max(Math.min(1,y.overlap),0)),"accept"in y&&(v.options.drop.accept=y.accept),"checker"in y&&(v.options.drop.checker=y.checker),v}return S.bool(y)?(v.options.drop.enabled=y,v):v.options.drop}(this,f)},r.prototype.dropCheck=function(f,v,y,_,L,N){return function(Q,ye,Ke,Pe,Ge,st,ot){var ht=!1;if(!(ot=ot||Q.getRect(st)))return!!Q.options.drop.checker&&Q.options.drop.checker(ye,Ke,ht,Q,st,Pe,Ge);var yt=Q.options.drop.overlap;if(yt==="pointer"){var Ct=we(Pe,Ge,"drag"),mt=U(ye);mt.x+=Ct.x,mt.y+=Ct.y;var xt=mt.x>ot.left&&mt.x<ot.right,tn=mt.y>ot.top&&mt.y<ot.bottom;ht=xt&&tn}var Kt=Pe.getRect(Ge);if(Kt&&yt==="center"){var cn=Kt.left+Kt.width/2,En=Kt.top+Kt.height/2;ht=cn>=ot.left&&cn<=ot.right&&En>=ot.top&&En<=ot.bottom}return Kt&&S.number(yt)&&(ht=Math.max(0,Math.min(ot.right,Kt.right)-Math.max(ot.left,Kt.left))*Math.max(0,Math.min(ot.bottom,Kt.bottom)-Math.max(ot.top,Kt.top))/(Kt.width*Kt.height)>=yt),Q.options.drop.checker&&(ht=Q.options.drop.checker(ye,Ke,ht,Q,st,Pe,Ge)),ht}(this,f,v,y,_,L,N)},o.dynamicDrop=function(f){return S.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},G(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=it.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Me(t,o.element),u.events=Ce(o,0,r),u.events.activate&&(ge(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":Te,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;Re(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;Te(n,t),Re(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:Me,getDrop:Ze,getDropEvents:Ce,fireDropEvents:Re,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},me=it;function ue(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(L){return L.pointer}),f=r==="start",v=r==="end",y=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=fe(u,y),o.box=Y(u),o.scale=1,o.ds=0,o.angle=q(u,y),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(v||t.pointers.length<2){var _=t.prevEvent;o.distance=_.distance,o.box=_.box,o.scale=_.scale,o.ds=0,o.angle=_.angle,o.da=0}else o.distance=fe(u,y),o.box=Y(u),o.scale=o.distance/t.gesture.startDistance,o.angle=q(u,y),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,S.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var He={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return S.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):S.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=He,t.methodDict.gesture="gesturable",r.actions.gesture=He.defaults},listeners:{"interactions:action-start":ue,"interactions:action-move":ue,"interactions:action-end":ue,"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}},le=He;function Ie(n,t,o,r,u,f,v){if(!t)return!1;if(t===!0){var y=S.number(f.width)?f.width:f.right-f.left,_=S.number(f.height)?f.height:f.bottom-f.top;if(v=Math.min(v,Math.abs((n==="left"||n==="right"?y:_)/2)),y<0&&(n==="left"?n="right":n==="right"&&(n="left")),_<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var L=y>=0?f.left:f.right;return o.x<L+v}if(n==="top"){var N=_>=0?f.top:f.bottom;return o.y<N+v}if(n==="right")return o.x>(y>=0?f.right:f.left)-v;if(n==="bottom")return o.y>(_>=0?f.bottom:f.top)-v}return!!S.element(r)&&(S.element(t)?t===r:ie(r,t,u))}function ze(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var qe,O,Ee={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ee.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),Ee.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(v,y,_){return S.object(y)?(v.options.resize.enabled=y.enabled!==!1,v.setPerAction("resize",y),v.setOnEvents("resize",y),S.string(y.axis)&&/^x$|^y$|^xy$/.test(y.axis)?v.options.resize.axis=y.axis:y.axis===null&&(v.options.resize.axis=_.defaults.actions.resize.axis),S.bool(y.preserveAspectRatio)?v.options.resize.preserveAspectRatio=y.preserveAspectRatio:S.bool(y.square)&&(v.options.resize.square=y.square),v):S.bool(y)?(v.options.resize.enabled=y,v):v.options.resize}(this,f,n)},t.map.resize=Ee,t.methodDict.resize="resizable",u.actions.resize=Ee.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:G({},f),corrected:G({},f),previous:G({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),ze(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,v=f==="reposition"||f==="negate",y=r.rect,_=r._rects,L=_.start,N=_.corrected,Q=_.delta,ye=_.previous;if(G(ye,N),v){if(G(N,y),f==="reposition"){if(N.top>N.bottom){var Ke=N.top;N.top=N.bottom,N.bottom=Ke}if(N.left>N.right){var Pe=N.left;N.left=N.right,N.right=Pe}}}else N.top=Math.min(y.top,L.bottom),N.bottom=Math.max(y.bottom,L.top),N.left=Math.min(y.left,L.right),N.right=Math.max(y.right,L.left);for(var Ge in N.width=N.right-N.left,N.height=N.bottom-N.top,N)Q[Ge]=N[Ge]-ye[Ge];u.edges=r.prepared.edges,u.rect=N,u.deltaRect=Q}})(n),ze(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var v=G({},t.coords.cur.page),y=o.options.resize;if(y&&y.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&y.mouseButtons)!=0)){if(S.object(y.edges)){var _={left:!1,right:!1,top:!1,bottom:!1};for(var L in _)_[L]=Ie(L,y.edges[L],v,t._latestPointer.eventTarget,r,u,y.margin||Ee.defaultMargin);_.left=_.left&&!_.right,_.top=_.top&&!_.bottom,(_.left||_.right||_.top||_.bottom)&&(n.action={name:"resize",edges:_})}else{var N=y.axis!=="y"&&v.x>u.right-Ee.defaultMargin,Q=y.axis!=="x"&&v.y>u.bottom-Ee.defaultMargin;(N||Q)&&(n.action={name:"resize",axes:(N?"x":"")+(Q?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=Ee.cursors,f=null;if(o)f=u[r+o];else if(t){for(var v="",y=0,_=["top","bottom","left","right"];y<_.length;y++){var L=_[y];t[L]&&(v+=L)}f=u[v]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},ct=Ee,nt={id:"actions",install:function(n){n.usePlugin(le),n.usePlugin(ct),n.usePlugin(Ve),n.usePlugin(me)}},dt=0,rt={request:function(n){return qe(n)},cancel:function(n){return O(n)},init:function(n){if(qe=n.requestAnimationFrame,O=n.cancelAnimationFrame,!qe)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];qe=n["".concat(r,"RequestAnimationFrame")],O=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}qe=qe&&qe.bind(n),O=O&&O.bind(n),qe||(qe=function(u){var f=Date.now(),v=Math.max(0,16-(f-dt)),y=n.setTimeout(function(){u(f+v)},v);return dt=f+v,y},O=function(u){return clearTimeout(u)})}},Oe={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(n){Oe.isScrolling=!0,rt.cancel(Oe.i),n.autoScroll=Oe,Oe.interaction=n,Oe.prevTime=Oe.now(),Oe.i=rt.request(Oe.scroll)},stop:function(){Oe.isScrolling=!1,Oe.interaction&&(Oe.interaction.autoScroll=null),rt.cancel(Oe.i)},scroll:function(){var n=Oe.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=Xe(u.container,t,o),v=Oe.now(),y=(v-Oe.prevTime)/1e3,_=u.speed*y;if(_>=1){var L={x:Oe.x*_,y:Oe.y*_};if(L.x||L.y){var N=Ye(f);S.window(f)?f.scrollBy(L.x,L.y):f&&(f.scrollLeft+=L.x,f.scrollTop+=L.y);var Q=Ye(f),ye={x:Q.x-N.x,y:Q.y-N.y};(ye.x||ye.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:ye,interaction:n,container:f})}Oe.prevTime=v}Oe.isScrolling&&(rt.cancel(Oe.i),Oe.i=rt.request(Oe.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()&&Oe.check(t.interactable,t.prepared.name))if(t.simulation)Oe.x=Oe.y=0;else{var r,u,f,v,y=t.interactable,_=t.element,L=t.prepared.name,N=y.options[L].autoScroll,Q=Xe(N.container,y,_);if(S.window(Q))v=o.clientX<Oe.margin,r=o.clientY<Oe.margin,u=o.clientX>Q.innerWidth-Oe.margin,f=o.clientY>Q.innerHeight-Oe.margin;else{var ye=$e(Q);v=o.clientX<ye.left+Oe.margin,r=o.clientY<ye.top+Oe.margin,u=o.clientX>ye.right-Oe.margin,f=o.clientY>ye.bottom-Oe.margin}Oe.x=u?1:v?-1:0,Oe.y=f?1:r?-1:0,Oe.isScrolling||(Oe.margin=N.margin,Oe.speed=N.speed,Oe.start(t))}}};function Xe(n,t,o){return(S.string(n)?Qe(n,t,o):n)||P(o)}function Ye(n){return S.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var at={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Oe,Oe.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Oe.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Oe.stop(),Oe.interaction&&(Oe.interaction=null)},"interactions:stop":Oe.stop,"interactions:action-move":function(n){return Oe.onInteractionMove(n)}}},vt=at;function Tt(n,t){var o=!1;return function(){return o||(ce.console.warn(t),o=!0),n.apply(this,arguments)}}function It(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function wt(n){return S.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Dt(n){return S.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Nt={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var v=function(y,_,L,N,Q){var ye=y.getRect(N),Ke=_.buttons||{0:1,1:4,3:8,4:16}[_.button],Pe={action:null,interactable:y,interaction:L,element:N,rect:ye,buttons:Ke};return Q.fire("auto-start:check",Pe),Pe.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,v,this,f,u):v},t.prototype.ignoreFrom=Tt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Tt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Dt,t.prototype.styleCursor=wt}};function Bt(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&qt(t,o,n,u)?n:null}function Ut(n,t,o,r,u,f,v){for(var y=0,_=r.length;y<_;y++){var L=r[y],N=u[y],Q=L.getAction(t,o,n,N);if(Q){var ye=Bt(Q,L,N,f,v);if(ye)return{action:ye,interactable:L,element:N}}}return{action:null,interactable:null,element:null}}function Pt(n,t,o,r,u){var f=[],v=[],y=r;function _(N){f.push(N),v.push(y)}for(;S.element(y);){f=[],v=[],u.interactables.forEachMatch(y,_);var L=Ut(n,t,o,f,v,r,u);if(L.action&&!L.interactable.options[L.action.name].manualStart)return L;y=ut(y)}return{action:null,interactable:null,element:null}}function At(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,It(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,kn(n,o),o.fire("autoStart:prepared",{interaction:n})}function qt(n,t,o,r){var u=n.options,f=u[o.name].max,v=u[o.name].maxPerElement,y=r.autoStart.maxInteractions,_=0,L=0,N=0;if(!(f&&v&&y))return!1;for(var Q=0,ye=r.interactions.list;Q<ye.length;Q++){var Ke=ye[Q],Pe=Ke.prepared.name;if(Ke.interacting()&&(++_>=y||Ke.interactable===n&&((L+=Pe===o.name?1:0)>=f||Ke.element===t&&(N++,Pe===o.name&&N>=v))))return!1}return y>0}function bn(n,t){return S.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function pn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function kn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var v=o.options[u.name].cursorChecker;f=S.func(v)?v(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}pn(n.element,f||"",t)}else t.autoStart.cursorElement&&pn(t.autoStart.cursorElement,"",t)}var Tn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Nt),o.base.actionChecker=null,o.base.styleCursor=!0,G(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return bn(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:qt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||At(o,Pt(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,v=o.event,y=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||At(u,Pt(u,f,v,y,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,v=u.prepared.name;v&&f&&(f.options[v].manualStart||!qt(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),kn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&pn(o.element,"",t)}},maxInteractions:bn,withinInteractionLimit:qt,validateAction:Bt},dn=Tn,In={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var v=Math.abs(u),y=Math.abs(f),_=o.interactable.options.drag,L=_.startAxis,N=v>y?"x":v<y?"y":"xy";if(o.prepared.axis=_.lockAxis==="start"?N[0]:_.lockAxis,N!=="xy"&&L!=="xy"&&L!==N){o.prepared.name=null;for(var Q=r,ye=function(Pe){if(Pe!==o.interactable){var Ge=o.interactable.options.drag;if(!Ge.manualStart&&Pe.testIgnoreAllow(Ge,Q,r)){var st=Pe.getAction(o.downPointer,o.downEvent,o,Q);if(st&&st.name==="drag"&&function(ot,ht){if(!ht)return!1;var yt=ht.options.drag.startAxis;return ot==="xy"||yt==="xy"||yt===ot}(N,Pe)&&dn.validateAction(st,Pe,Q,r,t))return Pe}}};S.element(Q);){var Ke=t.interactables.forEachMatch(Q,ye);if(Ke){o.prepared.name="drag",o.interactable=Ke,o.element=Q;break}Q=ut(Q)}}}}}};function fn(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 Bn={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(dn),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=fn(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;fn(t)>0&&(t.prepared.name=null)}},getHoldDuration:fn},hn=Bn,qn={id:"auto-start",install:function(n){n.usePlugin(dn),n.usePlugin(hn),n.usePlugin(In)}},Xn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):S.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Gn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Kn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Xn,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var v=r.options.preventDefault;if(v!=="never")if(v!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var y=P(f.target).document,_=u.getDocOptions(y);if(!_||!_.events||_.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||S.element(f.target)&&Ne(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||de(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Gn,n},{})};function An(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 vn(n){var t={};for(var o in n){var r=n[o];S.plainObject(r)?t[o]=vn(r):S.array(r)?t[o]=ke(r):t[o]=r}return t}var Rn=function(){function n(t){d(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=Nn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,v=this.interaction,y=function(L){var N=L.interactable.options[L.prepared.name],Q=N.modifiers;return Q&&Q.length?Q:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(ye){var Ke=N[ye];return Ke&&Ke.enabled&&{options:Ke,methods:Ke._methods}}).filter(function(ye){return!!ye})}(v);this.prepareStates(y),this.startEdges=G({},v.edges),this.edges=G({},this.startEdges),this.startOffset=(r=v.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var _=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=Nn(),this.startAll(_),this.result=this.setAll(_)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,v=t.edges;t.coords=G({},t.pageCoords),t.rect=G({},f),t.edges=G({},v);for(var y=u?this.states.slice(u):this.states,_=Nn(t.coords,t.rect),L=0;L<y.length;L++){var N,Q=y[L],ye=Q.options,Ke=G({},t.coords),Pe=null;(N=Q.methods)!=null&&N.set&&this.shouldDo(ye,r,o)&&(t.state=Q,Pe=Q.methods.set(t),oe(t.edges,t.rect,{x:t.coords.x-Ke.x,y:t.coords.y-Ke.y})),_.eventProps.push(Pe)}G(this.edges,t.edges),_.delta.x=t.coords.x-t.pageCoords.x,_.delta.y=t.coords.y-t.pageCoords.y,_.rectDelta.left=t.rect.left-f.left,_.rectDelta.right=t.rect.right-f.right,_.rectDelta.top=t.rect.top-f.top,_.rectDelta.bottom=t.rect.bottom-f.bottom;var Ge=this.result.coords,st=this.result.rect;if(Ge&&st){var ot=_.rect.left!==st.left||_.rect.right!==st.right||_.rect.top!==st.top||_.rect.bottom!==st.bottom;_.changed=ot||Ge.x!==_.coords.x||Ge.y!==_.coords.y}return _}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,v=this.result,y=this.startDelta,_=v.delta;r==="start"&&G(this.startDelta,v.delta);for(var L=0,N=[[f,y],[u,_]];L<N.length;L++){var Q=N[L],ye=Q[0],Ke=Q[1];ye.page.x+=Ke.x,ye.page.y+=Ke.y,ye.client.x+=Ke.x,ye.client.y+=Ke.y}var Pe=this.result.rectDelta,Ge=t.rect||o.rect;Ge.left+=Pe.left,Ge.right+=Pe.right,Ge.top+=Pe.top,Ge.bottom+=Pe.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,v=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=v,!v.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var y=o.coords.cur.page,_={x:t.modifiedCoords.x-y.x,y:t.modifiedCoords.y-y.y};v.coords.x+=_.x,v.coords.y+=_.y,v.delta.x+=_.x,v.delta.y+=_.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,v=0;v<u.length;v++){var y=u[v];t.state=y;var _=y.options,L=y.methods,N=L.beforeEnd&&L.beforeEnd(t);if(N)return this.endResult=N,!1;f=f||!f&&this.shouldDo(_,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=G({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var v=f[u];r.state=v,v.methods.stop&&v.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,v=r.name;this.states.push({options:u,methods:f,index:o,name:v})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var v=f.startDelta,y=f.result,_=y.delta,L=y.rectDelta,N=0,Q=[[r.start,v],[r.cur,_]];N<Q.length;N++){var ye=Q[N],Ke=ye[0],Pe=ye[1];Ke.page.x-=Pe.x,Ke.page.y-=Pe.y,Ke.client.x-=Pe.x,Ke.client.y-=Pe.y}u.left-=L.left,u.right-=L.right,u.top-=L.top,u.bottom-=L.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return vn(o)}),this.result=Nn(G({},t.result.coords),G({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function Nn(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function an(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var v=f||{};for(var y in v.enabled=v.enabled!==!1,o)y in v||(v[y]=o[y]);var _={options:v,methods:r,name:t,enable:function(){return v.enabled=!0,_},disable:function(){return v.enabled=!1,_}};return _};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function xn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var bt={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new Rn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":xn,"interactions:action-move":xn,"interactions:action-end":xn,"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)}}},Yt=bt,gt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Yn=function(n){D(o,n);var t=M(o);function o(r,u,f,v,y,_,L){var N;d(this,o),(N=t.call(this,r)).relatedTarget=null,N.screenX=void 0,N.screenY=void 0,N.button=void 0,N.buttons=void 0,N.ctrlKey=void 0,N.shiftKey=void 0,N.altKey=void 0,N.metaKey=void 0,N.page=void 0,N.client=void 0,N.delta=void 0,N.rect=void 0,N.x0=void 0,N.y0=void 0,N.t0=void 0,N.dt=void 0,N.duration=void 0,N.clientX0=void 0,N.clientY0=void 0,N.velocity=void 0,N.speed=void 0,N.swipe=void 0,N.axes=void 0,N.preEnd=void 0,y=y||r.element;var Q=r.interactable,ye=(Q&&Q.options||gt).deltaSource,Ke=we(Q,y,f),Pe=v==="start",Ge=v==="end",st=Pe?F(N):r.prevEvent,ot=Pe?r.coords.start:Ge?{page:st.page,client:st.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return N.page=G({},ot.page),N.client=G({},ot.client),N.rect=G({},r.rect),N.timeStamp=ot.timeStamp,Ge||(N.page.x-=Ke.x,N.page.y-=Ke.y,N.client.x-=Ke.x,N.client.y-=Ke.y),N.ctrlKey=u.ctrlKey,N.altKey=u.altKey,N.shiftKey=u.shiftKey,N.metaKey=u.metaKey,N.button=u.button,N.buttons=u.buttons,N.target=y,N.currentTarget=y,N.preEnd=_,N.type=L||f+(v||""),N.interactable=Q,N.t0=Pe?r.pointers[r.pointers.length-1].downTime:st.t0,N.x0=r.coords.start.page.x-Ke.x,N.y0=r.coords.start.page.y-Ke.y,N.clientX0=r.coords.start.client.x-Ke.x,N.clientY0=r.coords.start.client.y-Ke.y,N.delta=Pe||Ge?{x:0,y:0}:{x:N[ye].x-st[ye].x,y:N[ye].y-st[ye].y},N.dt=r.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=G({},r.coords.velocity[ye]),N.speed=et(N.velocity.x,N.velocity.y),N.swipe=Ge||v==="inertiastart"?N.getSwipe():null,N}return g(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,v=202.5<=u&&u<337.5;return{up:v,down:!v&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(Ae);Object.defineProperties(Yn.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 Vt=g(function n(t,o,r,u,f){d(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=r,this.downTime=u,this.downTarget=f}),gn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Vn=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),on=0,On=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Tt(function(N){this.move(N)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=on++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var v=function(N){Object.defineProperty(o._proxy,N,{get:function(){return f[N]}})};for(var y in gn)v(y);var _=function(N){Object.defineProperty(o._proxy,N,{value:function(){return f[N].apply(f,arguments)}})};for(var L in Vn)_(L);this._scopeFire("interactions:new",{interaction:this})}return g(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(It(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?G({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,v=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=et(u,f)>this.pointerMoveTolerance);var y,_,L,N=this.getPointerIndex(t),Q={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:v,interaction:this};v||(y=this.coords.velocity,_=this.coords.delta,L=Math.max(_.timeStamp/1e3,.001),y.page.x=_.page.x/L,y.page.y=_.page.y/L,y.client.x=_.client.x/L,y.client.y=_.client.y/L,y.timeStamp=L),this._scopeFire("interactions:move",Q),v||this.simulation||(this.interacting()&&(Q.type=null,this.move(Q)),this.pointerWasMoved&&R(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||ne(this.coords.delta),(t=G({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var v=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(v),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:v,curEventTarget:u,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=j(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:z(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,v,y,_=j(t),L=this.getPointerIndex(t),N=this.pointers[L];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new Vt(_,t,o,null,null),L=this.pointers.length,this.pointers.push(N)),H(this.coords.cur,this.pointers.map(function(Q){return Q.pointer}),this._now()),f=this.coords.delta,v=this.coords.prev,y=this.coords.cur,f.page.x=y.page.x-v.page.x,f.page.y=y.page.y-v.page.y,f.client.x=y.client.x-v.client.x,f.client.y=y.client.y-v.client.y,f.timeStamp=y.timeStamp-v.timeStamp,u&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=r,x(this.downPointer,t),this.interacting()||(R(this.coords.start,this.coords.cur),R(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:N,pointerIndex:L,interaction:this}),L}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new Yn(this,t,this.prepared.name,o,this.element,r,u)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,r=t.phase,u=t.preEnd,f=t.type,v=this.rect;if(v&&r==="move"&&(oe(this.edges,v,this.coords.delta[this.interactable.options.deltaSource]),v.width=v.right-v.left,v.height=v.bottom-v.top),this._scopeFire("interactions:before-action-".concat(r),t)===!1)return!1;var y=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=y),this._fireEvent(y),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Zt(n){Un(n.interaction)}function Un(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Jn(n.coords.cur,t),Jn(n.coords.delta,t),oe(n.edges,n.rect,t),t.x=0,t.y=0,!0}function wn(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 Jn(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}Vn.offsetBy="";var Ft={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=wn},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&&(Jn(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Zt,"interactions:before-action-move":Zt,"interactions:before-action-end":function(n){var t=n.interaction;if(Un(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=Ft,sn=function(){function n(t){d(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return g(n,[{key:"start",value:function(t){var o=this.interaction,r=kt(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=et(u.x,u.y),v=this.modification||(this.modification=new Rn(o));if(v.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=v.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>r.minSpeed&&f>r.endSpeed)this.startInertia();else{if(v.result=v.setAll(this.modifierArg),!v.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,r=kt(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var v=this.modification,y=this.modifierArg;y.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},v.result=v.setAll(y),v.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+v.result.delta.x,y:this.targetOffset.y+v.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=rt.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,v,y,_=this,L=this.interaction,N=kt(L).resistance,Q=(L._now()-this.t0)/1e3;if(Q<this.te){var ye,Ke=1-(Math.exp(-N*Q)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,v=this.modifiedOffset.y,ye={x:jt(y=Ke,t,r,f),y:jt(y,o,u,v)}):ye={x:this.targetOffset.x*Ke,y:this.targetOffset.y*Ke};var Pe={x:ye.x-this.currentOffset.x,y:ye.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,L.offsetBy(Pe),L.move(),this.onNextFrame(function(){return _.inertiaTick()})}else L.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,r=o._now()-this.t0,u=kt(o).smoothEndDuration;if(r<u){var f={x:Ht(r,0,this.targetOffset.x,u),y:Ht(r,0,this.targetOffset.y,u)},v={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=v.x,this.currentOffset.y+=v.y,o.offsetBy(v),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),R(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rt.cancel(this.timeout)}}]),n}();function kt(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ot={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(Wt),n.usePlugin(Yt),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 sn(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;S.element(u);){if(u===t.element){r.resume(n);break}u=ut(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":xn,"interactions:action-inertiastart":xn,"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 jt(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function Ht(n,t,o,r){return-o*(n/=r)*(n-2)+t}var Lt=Ot;function ln(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var rn=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=G({},t||{})}return g(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&ln(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&ln(t,o)}},{key:"on",value:function(t,o){var r=he(t,o);for(t in r)this.types[t]=Se(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=he(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,v=r[t];f<v.length;f++){var y=v[f],_=u.indexOf(y);_!==-1&&u.splice(_,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Zn=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,x(this,t)}return g(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Dn(n){return S.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Qn(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Ba={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:v,remove:y,addDelegate:function(N,Q,ye,Ke,Pe){var Ge=Dn(Pe);if(!r[ye]){r[ye]=[];for(var st=0;st<u.length;st++){var ot=u[st];v(ot,ye,_),v(ot,ye,L,!0)}}var ht=r[ye],yt=pe(ht,function(Ct){return Ct.selector===N&&Ct.context===Q});yt||(yt={selector:N,context:Q,listeners:[]},ht.push(yt)),yt.listeners.push({func:Ke,options:Ge})},removeDelegate:function(N,Q,ye,Ke,Pe){var Ge,st=Dn(Pe),ot=r[ye],ht=!1;if(ot)for(Ge=ot.length-1;Ge>=0;Ge--){var yt=ot[Ge];if(yt.selector===N&&yt.context===Q){for(var Ct=yt.listeners,mt=Ct.length-1;mt>=0;mt--){var xt=Ct[mt];if(xt.func===Ke&&Qn(xt.options,st)){Ct.splice(mt,1),Ct.length||(ot.splice(Ge,1),y(Q,ye,_),y(Q,ye,L,!0)),ht=!0;break}}if(ht)break}}},delegateListener:_,delegateUseCapture:L,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function v(N,Q,ye,Ke){if(N.addEventListener){var Pe=Dn(Ke),Ge=pe(o,function(st){return st.eventTarget===N});Ge||(Ge={eventTarget:N,events:{}},o.push(Ge)),Ge.events[Q]||(Ge.events[Q]=[]),pe(Ge.events[Q],function(st){return st.func===ye&&Qn(st.options,Pe)})||(N.addEventListener(Q,ye,f.supportsOptions?Pe:Pe.capture),Ge.events[Q].push({func:ye,options:Pe}))}}function y(N,Q,ye,Ke){if(N.addEventListener&&N.removeEventListener){var Pe=z(o,function(tn){return tn.eventTarget===N}),Ge=o[Pe];if(Ge&&Ge.events)if(Q!=="all"){var st=!1,ot=Ge.events[Q];if(ot){if(ye==="all"){for(var ht=ot.length-1;ht>=0;ht--){var yt=ot[ht];y(N,Q,yt.func,yt.options)}return}for(var Ct=Dn(Ke),mt=0;mt<ot.length;mt++){var xt=ot[mt];if(xt.func===ye&&Qn(xt.options,Ct)){N.removeEventListener(Q,ye,f.supportsOptions?Ct:Ct.capture),ot.splice(mt,1),ot.length===0&&(delete Ge.events[Q],st=!0);break}}}st&&!Object.keys(Ge.events).length&&o.splice(Pe,1)}else for(Q in Ge.events)Ge.events.hasOwnProperty(Q)&&y(N,Q,"all")}}function _(N,Q){for(var ye=Dn(Q),Ke=new Zn(N),Pe=r[N.type],Ge=$(N)[0],st=Ge;S.element(st);){for(var ot=0;ot<Pe.length;ot++){var ht=Pe[ot],yt=ht.selector,Ct=ht.context;if(Ne(st,yt)&&de(Ct,Ge)&&de(Ct,st)){var mt=ht.listeners;Ke.currentTarget=st;for(var xt=0;xt<mt.length;xt++){var tn=mt[xt];Qn(tn.options,ye)&&tn.func(Ke)}}}st=ut(st)}}function L(N){return _(N,!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}},sa={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=sa.methodOrder;t<o.length;t++){var r=o[t],u=sa[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,v=u.interactions.list;f<v.length;f++){var y=v[f],_=r;if(y.simulation&&y.simulation.allowResume&&y.pointerType===t)for(;_;){if(_===y.element)return y;_=ut(_)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var v=0,y=f.interactions.list;v<y.length;v++){var _=y[v];if(_.pointerType===r){if(_.simulation&&!ha(_,o))continue;if(_.interacting())return _;t||(t=_)}}if(t)return t;for(var L=0,N=f.interactions.list;L<N.length;L++){var Q=N[L];if(!(Q.pointerType!==r||/down/i.test(u)&&Q.simulation))return Q}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(ha(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function ha(n,t){return n.pointers.some(function(o){return o.id===t})}var Aa=sa,Wn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Cn(n,t){return function(o){var r=t.interactions.list,u=se(o),f=$(o),v=f[0],y=f[1],_=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var L=0,N=o.changedTouches;L<N.length;L++){var Q=N[L],ye={pointer:Q,pointerId:j(Q),pointerType:u,eventType:o.type,eventTarget:v,curEventTarget:y,scope:t},Ke=ea(ye);_.push([ye.pointer,ye.eventTarget,ye.curEventTarget,Ke])}}else{var Pe=!1;if(!te.supportsPointerEvent&&/mouse/.test(o.type)){for(var Ge=0;Ge<r.length&&!Pe;Ge++)Pe=r[Ge].pointerType!=="mouse"&&r[Ge].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var st={pointer:o,pointerId:j(o),pointerType:u,eventType:o.type,curEventTarget:y,eventTarget:v,scope:t},ot=ea(st);_.push([st.pointer,st.eventTarget,st.curEventTarget,ot])}}for(var ht=0;ht<_.length;ht++){var yt=_[ht],Ct=yt[0],mt=yt[1],xt=yt[2];yt[3][n](Ct,o,mt,xt)}}}function ea(n){var t=n.pointerType,o=n.scope,r={interaction:Aa.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function ta(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,v=r.events,y=v[t];for(var _ in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),v.delegatedEvents)y(o,_,v.delegateListener),y(o,_,v.delegateUseCapture,!0);for(var L=u&&u.events,N=0;N<f.length;N++){var Q=f[N];y(o,Q.type,Q.listener,L)}}var mn={id:"core/interactions",install:function(n){for(var t={},o=0;o<Wn.length;o++){var r=Wn[o];t[r]=Cn(r,n)}var u,f=te.pEventTypes;function v(){for(var y=0,_=n.interactions.list;y<_.length;y++){var L=_[y];if(L.pointerIsDown&&L.pointerType==="touch"&&!L._interacting)for(var N=function(){var Ke=ye[Q];n.documents.some(function(Pe){return de(Pe.doc,Ke.downTarget)})||L.removePointer(Ke.pointer,Ke.event)},Q=0,ye=L.pointers;Q<ye.length;Q++)N()}}(u=B.PointerEvent?[{type:f.down,listener:v},{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:v},{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(y){for(var _=0,L=n.interactions.list;_<L.length;_++)L[_].documentBlur(y)}}),n.prevTouchTime=0,n.Interaction=function(y){D(L,y);var _=M(L);function L(){return d(this,L),_.apply(this,arguments)}return g(L,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(N){n.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return n.now()}}]),L}(On),n.interactions={list:[],new:function(y){y.scopeFire=function(L,N){return n.fire(L,N)};var _=new n.Interaction(y);return n.interactions.list.push(_),_},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(Kn)},listeners:{"scope:add-document":function(n){return ta(n,"add")},"scope:remove-document":function(n){return ta(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:ta,doOnInteractions:Cn,methodNames:Wn},Na=mn,Qt=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(Qt||{}),nr=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new rn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||r,this._win=P(pt(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return g(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return S.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),S.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),S.func(o.onend)&&this.on("".concat(t,"end"),o.onend),S.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,v=(u=this._actions.map[t])==null?void 0:u.filterEventType,y=function(_){return(v==null||v(_))&&An(_,f._actions)};(S.array(o)||S.object(o))&&this._onOff(Qt.Off,t,o,void 0,y),(S.array(r)||S.object(r))&&this._onOff(Qt.On,t,r,void 0,y)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,v=this.options[t],y=o[f];f==="listeners"&&this.updatePerActionListeners(t,v.listeners,y),S.array(y)?v[f]=ke(y):S.plainObject(y)?(v[f]=G(v[f]||{},vn(y)),S.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(v[f].enabled=y.enabled!==!1)):S.bool(y)&&S.object(r.perAction[f])?v[f].enabled=y:v[f]=y}}},{key:"getRect",value:function(t){return t=t||(S.element(this.target)?this.target:null),S.string(this.target)&&(t=t||this._context.querySelector(this.target)),xe(t)}},{key:"rectChecker",value:function(t){var o=this;return S.func(t)?(this.getRect=function(r){var u=G({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(pt(o)||S.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return S.string(t)?Array.from(this._context.querySelectorAll(t)):S.func(t)&&t.getAllElements?t.getAllElements():S.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||de(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!S.element(r)&&(S.string(t)?ie(r,t,o):!!S.element(t)&&de(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!S.element(r))&&(S.string(t)?ie(r,t,o):!!S.element(t)&&de(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){S.object(o)&&!S.array(o)&&(u=r,r=null);var v=he(o,r,f);for(var y in v){y==="wheel"&&(y=te.wheelEvent);for(var _=0,L=v[y];_<L.length;_++){var N=L[_];An(y,this._actions)?this.events[t===Qt.On?"on":"off"](y,N):S.string(this.target)?this._scopeEvents[t===Qt.On?"addDelegate":"removeDelegate"](this.target,this._context,y,N,u):this._scopeEvents[t===Qt.On?"add":"remove"](this.target,y,N,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(Qt.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(Qt.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in S.object(t)||(t={}),this.options=vn(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,G(G({},o.perAction),o.actions[u])),this[f](t[u])}for(var v in t)v!=="getRect"?S.func(this[v])&&this[v](t[v]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,v=u.context,y=u.listeners;f===this.target&&v===this._context&&o.splice(r,1);for(var _=y.length-1;_>=0;_--)this._scopeEvents.removeDelegate(this.target,this._context,t,y[_][0],y[_][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),ar=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,v=S.string(f)?o.selectorMap[f]:f[o.scope.id],y=z(v,function(_){return _===u});v.splice(y,1)}})}return g(n,[{key:"new",value:function(t,o){o=G(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),S.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=S.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return pe(f,function(v){return v._context===r&&(u||v.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],v=void 0;if((S.string(f.target)?S.element(t)&&Ne(t,f.target):t===f.target)&&f.inContext(t)&&(v=o(f)),v!==void 0)return v}}}]),n}(),or=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=te,this.defaults=vn(gt),this.Eventable=rn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(v,y){var _=r.interactables.getExisting(v,y);return _||((_=r.interactables.new(v,y)).events.global=f.globalEvents),_};return u.getPointerAverage=X,u.getTouchBBox=Y,u.getTouchDistance=fe,u.getTouchAngle=q,u.getElementRect=xe,u.getElementClientRect=$e,u.matchesSelector=Ne,u.closest=Ue,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,v){return this.scope.usePlugin(f,v),this},u.isSet=function(f,v){return!!this.scope.interactables.get(f,v&&v.context)},u.on=Tt(function(f,v,y){if(S.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),S.array(f)){for(var _=0,L=f;_<L.length;_++){var N=L[_];this.on(N,v,y)}return this}if(S.object(f)){for(var Q in f)this.on(Q,f[Q],v);return this}return An(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(v):this.globalEvents[f]=[v]:this.scope.events.add(this.scope.document,f,v,{options:y}),this},"The interact.on() method is being deprecated"),u.off=Tt(function(f,v,y){if(S.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),S.array(f)){for(var _=0,L=f;_<L.length;_++){var N=L[_];this.off(N,v,y)}return this}if(S.object(f)){for(var Q in f)this.off(Q,f[Q],v);return this}var ye;return An(f,this.scope.actions)?f in this.globalEvents&&(ye=this.globalEvents[f].indexOf(v))!==-1&&this.globalEvents[f].splice(ye,1):this.scope.events.remove(this.scope.document,f,v,y),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return te.supportsTouch},u.supportsPointerEvent=function(){return te.supportsPointerEvent},u.stop=function(){for(var f=0,v=this.scope.interactions.list;f<v.length;f++)v[f].stop();return this},u.pointerMoveTolerance=function(f){return S.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,v){this.scope.addDocument(f,v)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=Yn,this.Interactable=void 0,this.interactables=new ar(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){D(f,r);var u=M(f);function f(){return d(this,f),u.apply(this,arguments)}return g(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(v){return W(A(f.prototype),"set",this).call(this,v),o.fire("interactable:set",{options:v,interactable:this}),this}},{key:"unset",value:function(){W(A(f.prototype),"unset",this).call(this);var v=o.interactables.list.indexOf(this);v<0||(o.interactables.list.splice(v,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(nr)}return g(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,S.window(r)&&C(r),B.init(r),te.init(r),rt.init(r),o.window=r,o.document=r.document,o.usePlugin(Na),o.usePlugin(Ba),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var r=0,u=this.listenerMaps.length,f=t.before.reduce(function(y,_){return y[_]=!0,y[wo(_)]=!0,y},{});r<u;r++){var v=this.listenerMaps[r].id;if(v&&(f[v]||f[wo(v)]))break}this.listenerMaps.splice(r,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var r=P(t);o=o?G({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=P(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function wo(n){return n&&n.replace(/\/.*$/,"")}var Do=new or,en=Do.interactStatic,lr=typeof globalThis<"u"?globalThis:window;Do.init(lr);var rr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,v=n.limits,y=v===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:v,_=n.offset,L=_===void 0?{x:0,y:0}:_,N={range:f,grid:n,x:null,y:null},Q=0;Q<t.length;Q++){var ye=t[Q],Ke=ye[0],Pe=ye[1],Ge=Math.round((r-L.x)/n[Ke]),st=Math.round((u-L.y)/n[Pe]);N[Ke]=Math.max(y.left,Math.min(y.right,Ge*n[Ke]+L.x)),N[Pe]=Math.max(y.top,Math.min(y.bottom,st*n[Pe]+L.y))}return N};return o.grid=n,o.coordFields=t,o}}),ir={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=G(t.snappers||{},rr),t.createSnapGrid=t.snappers.grid}},sr=ir,cr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,v=f.ratio,y=f.enabled,_=t.options,L=_.equalDelta,N=_.modifiers;v==="preserve"&&(v=o.width/o.height),t.startCoords=G({},u),t.startRect=G({},o),t.ratio=v,t.equalDelta=L;var Q=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var ye=(Q.left?1:-1)*(Q.top?1:-1);t.edgeSign={x:ye,y:ye}}else t.edgeSign={x:Q.left?-1:1,y:Q.top?-1:1};if(y!==!1&&G(r,Q),N!=null&&N.length){var Ke=new Rn(n.interaction);Ke.copyFrom(n.interaction.modification),Ke.prepareStates(N),t.subModification=Ke,Ke.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=G({},r),v=t.equalDelta?ur:pr;if(G(n.edges,u),v(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var y=G({},o);oe(u,y,{x:r.x-f.x,y:r.y-f.y});var _=t.subModification.setAll(l(l({},n),{},{rect:y,edges:u,pageCoords:r,prevCoords:r,prevRect:y})),L=_.delta;return _.changed&&(v(t,Math.abs(L.x)>Math.abs(L.y),_.coords,_.rect),G(r,_.coords)),_.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function ur(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function pr(n,t,o,r){var u=n.startRect,f=n.startCoords,v=n.ratio,y=n.edgeSign;if(t){var _=r.width/v;o.y=f.y+(_-u.height)*y.y}else{var L=r.height*v;o.x=f.x+(L-u.width)*y.x}}var dr=an(cr,"aspectRatio"),Co=function(){};Co._defaults={};var Va=Co;function na(n,t,o){return S.func(n)?ft(n,t.interactable,t.element,[o.x,o.y,t]):ft(n,t.interactable,t.element)}var Oa={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,v=r.options,y=v.elementRect,_=G({left:0,top:0,right:0,bottom:0},v.offset||{});if(t&&y){var L=na(v.restriction,u,f);if(L){var N=L.right-L.left-t.width,Q=L.bottom-L.top-t.height;N<0&&(_.left+=N,_.right+=N),Q<0&&(_.top+=Q,_.bottom+=Q)}_.left+=o.left-t.width*y.left,_.top+=o.top-t.height*y.top,_.right+=o.right-t.width*(1-y.right),_.bottom+=o.bottom-t.height*(1-y.bottom)}r.offset=_},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,v=na(u.restriction,o,t);if(v){var y=function(_){return!_||"left"in _&&"top"in _||((_=G({},_)).left=_.x||0,_.top=_.y||0,_.right=_.right||_.left+_.width,_.bottom=_.bottom||_.top+_.height),_}(v);t.x=Math.max(Math.min(y.right-f.right,t.x),y.left+f.left),t.y=Math.max(Math.min(y.bottom-f.bottom,t.y),y.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},fr=an(Oa,"restrict"),Eo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function So(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var va={noInner:Eo,noOuter:_o,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=tt(na(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,v=u.options;if(o){var y=G({},t),_=na(v.inner,r,y)||{},L=na(v.outer,r,y)||{};So(_,Eo),So(L,_o),o.top?t.y=Math.min(Math.max(L.top+f.top,y.y),_.top+f.top):o.bottom&&(t.y=Math.max(Math.min(L.bottom+f.bottom,y.y),_.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(L.left+f.left,y.x),_.left+f.left):o.right&&(t.x=Math.max(Math.min(L.right+f.right,y.x),_.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},hr=an(va,"restrictEdges"),vr=G({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Oa.defaults),gr=an({start:Oa.start,set:Oa.set,defaults:vr},"restrictRect"),mr={width:-1/0,height:-1/0},yr={width:1/0,height:1/0},br=an({start:function(n){return va.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var v=ee(na(f.min,t,n.coords))||mr,y=ee(na(f.max,t,n.coords))||yr;o.options={endOnly:f.endOnly,inner:G({},va.noInner),outer:G({},va.noOuter)},u.top?(o.options.inner.top=r.bottom-v.height,o.options.outer.top=r.bottom-y.height):u.bottom&&(o.options.inner.bottom=r.top+v.height,o.options.outer.bottom=r.top+y.height),u.left?(o.options.inner.left=r.right-v.width,o.options.outer.left=r.right-y.width):u.right&&(o.options.inner.right=r.left+v.width,o.options.outer.right=r.left+y.width),va.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Qa={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,v=n.state,y=n.startOffset,_=v.options,L=_.offsetWithOrigin?function(ye){var Ke=ye.interaction.element,Pe=tt(ft(ye.state.options.origin,null,null,[Ke])),Ge=Pe||we(ye.interactable,Ke,ye.interaction.prepared.name);return Ge}(n):{x:0,y:0};if(_.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=ft(_.offset,r,u,[o]);(t=tt(N)||{x:0,y:0}).x+=L.x,t.y+=L.y}var Q=_.relativePoints;v.offsets=f&&Q&&Q.length?Q.map(function(ye,Ke){return{index:Ke,relativePoint:ye,x:y.left-f.width*ye.x+t.x,y:y.top-f.height*ye.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,v=we(t.interactable,t.element,t.prepared.name),y=G({},o),_=[];u.offsetWithOrigin||(y.x-=v.x,y.y-=v.y);for(var L=0,N=f;L<N.length;L++)for(var Q=N[L],ye=y.x-Q.x,Ke=y.y-Q.y,Pe=0,Ge=u.targets.length;Pe<Ge;Pe++){var st=u.targets[Pe],ot=void 0;(ot=S.func(st)?st(ye,Ke,t._proxy,Q,Pe):st)&&_.push({x:(S.number(ot.x)?ot.x:ye)+Q.x,y:(S.number(ot.y)?ot.y:Ke)+Q.y,range:S.number(ot.range)?ot.range:u.range,source:st,index:Pe,offset:Q})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},yt=0;yt<_.length;yt++){var Ct=_[yt],mt=Ct.range,xt=Ct.x-y.x,tn=Ct.y-y.y,Kt=et(xt,tn),cn=Kt<=mt;mt===1/0&&ht.inRange&&ht.range!==1/0&&(cn=!1),ht.target&&!(cn?ht.inRange&&mt!==1/0?Kt/mt<ht.distance/ht.range:mt===1/0&&ht.range!==1/0||Kt<ht.distance:!ht.inRange&&Kt<ht.distance)||(ht.target=Ct,ht.distance=Kt,ht.range=mt,ht.inRange=cn,ht.delta.x=xt,ht.delta.y=tn)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),r.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},kr=an(Qa,"snap"),Ma={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Qa.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,v={x:r.x-f[0].x,y:r.y-f[0].y};o.options=G({},u),o.options.targets=[];for(var y=0,_=u.targets||[];y<_.length;y++){var L=_[y],N=void 0;if(N=S.func(L)?L(v.x,v.y,t):L){for(var Q=0,ye=o.targetFields;Q<ye.length;Q++){var Ke=ye[Q],Pe=Ke[0],Ge=Ke[1];if(Pe in N||Ge in N){N.x=N[Pe],N.y=N[Ge];break}}o.options.targets.push(N)}}var st=Qa.set(n);return o.options=u,st},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},xr=an(Ma,"snapSize"),eo={aspectRatio:dr,restrictEdges:hr,restrict:fr,restrictRect:gr,restrictSize:br,snapEdges:an({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Ma.start(n)):null},set:Ma.set,defaults:G(vn(Ma.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:kr,snapSize:xr,spring:Va,avoid:Va,transform:Va,rubberband:Va},wr={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(Yt),n.usePlugin(sr),t.modifiers=eo,eo){var r=eo[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Dr=wr,To=function(n){D(o,n);var t=M(o);function o(r,u,f,v,y,_){var L;if(d(this,o),x(F(L=t.call(this,y)),f),f!==u&&x(F(L),u),L.timeStamp=_,L.originalEvent=f,L.type=r,L.pointerId=j(u),L.pointerType=se(u),L.target=v,L.currentTarget=null,r==="tap"){var N=y.getPointerIndex(u);L.dt=L.timeStamp-y.pointers[N].downTime;var Q=L.timeStamp-y.tapTime;L.double=!!y.prevTap&&y.prevTap.type!=="doubletap"&&y.prevTap.target===L.target&&Q<500}else r==="doubletap"&&(L.dt=u.timeStamp-y.tapTime,L.double=!0);return L}return g(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(Ae),ga={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ga,n.defaults.actions.pointerEvents=ga.defaults,G(n.actions.phaselessTypes,ga.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&to(n),Hn({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,v=o.event,y=o.eventTarget,_=o.pointerIndex,L=u.pointers[_].hold,N=je(y),Q={interaction:u,pointer:f,event:v,eventTarget:y,type:"hold",targets:[],path:N,node:null},ye=0;ye<N.length;ye++){var Ke=N[ye];Q.node=Ke,r.fire("pointerEvents:collect-targets",Q)}if(Q.targets.length){for(var Pe=1/0,Ge=0,st=Q.targets;Ge<st.length;Ge++){var ot=st[Ge].eventable.options.holdDuration;ot<Pe&&(Pe=ot)}L.duration=Pe,L.timeout=setTimeout(function(){Hn({interaction:u,eventTarget:y,pointer:f,event:v,type:"hold"},r)},Pe)}})(n,t),Hn(n,t)},"interactions:up":function(n,t){to(n),Hn(n,t),function(o,r){var u=o.interaction,f=o.pointer,v=o.event,y=o.eventTarget;u.pointerWasMoved||Hn({interaction:u,eventTarget:y,pointer:f,event:v,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){to(n),Hn(n,t)}},PointerEvent:To,fire:Hn,collectEventTargets:Io,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Hn(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,v=n.type,y=n.targets,_=y===void 0?Io(n,t):y,L=new To(v,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:L});for(var N={interaction:o,pointer:r,event:u,eventTarget:f,targets:_,type:v,pointerEvent:L},Q=0;Q<_.length;Q++){var ye=_[Q];for(var Ke in ye.props||{})L[Ke]=ye.props[Ke];var Pe=we(ye.eventable,ye.node);if(L._subtractOrigin(Pe),L.eventable=ye.eventable,L.currentTarget=ye.node,ye.eventable.fire(L),L._addOrigin(Pe),L.immediatePropagationStopped||L.propagationStopped&&Q+1<_.length&&_[Q+1].node!==L.currentTarget)break}if(t.fire("pointerEvents:fired",N),v==="tap"){var Ge=L.double?Hn({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):L;o.prevTap=Ge,o.tapTime=Ge.timeStamp}return L}function Io(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,v=n.type,y=o.getPointerIndex(r),_=o.pointers[y];if(v==="tap"&&(o.pointerWasMoved||!_||_.downTarget!==f))return[];for(var L=je(f),N={interaction:o,pointer:r,event:u,eventTarget:f,type:v,path:L,targets:[],node:null},Q=0;Q<L.length;Q++){var ye=L[Q];N.node=ye,t.fire("pointerEvents:collect-targets",N)}return v==="hold"&&(N.targets=N.targets.filter(function(Ke){var Pe,Ge;return Ke.eventable.options.holdDuration===((Pe=o.pointers[y])==null||(Ge=Pe.hold)==null?void 0:Ge.duration)})),N.targets}function to(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Cr=Object.freeze({__proto__:null,default:ga});function Er(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var _r={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ga);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)]=Er,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var v=f[0].eventable.options.holdRepeatInterval;v<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},v))}}})},Sr=_r,Tr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return G(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(v){var y=v.events,_=y.options;y.types[u]&&y.types[u].length&&v.testIgnoreAllow(_,r,f)&&o.push({node:r,eventable:y,props:{interactable:v}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;G(o.events.options,t.pointerEvents.defaults),G(o.events.options,r.pointerEvents||{})}}},Ir=Tr,Br={id:"pointer-events",install:function(n){n.usePlugin(Cr),n.usePlugin(Sr),n.usePlugin(Ir)}},Ar=Br,Nr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var v=r.getAllElements(),y=f.window.Promise,_=y?[]:null,L=function(){var Q=v[N],ye=r.getRect(Q);if(!ye)return 1;var Ke,Pe=pe(f.interactions.list,function(ot){return ot.interacting()&&ot.interactable===r&&ot.element===Q&&ot.prepared.name===u.name});if(Pe)Pe.move(),_&&(Ke=Pe._reflowPromise||new y(function(ot){Pe._reflowResolve=ot}));else{var Ge=ee(ye),st=function(ot){return{coords:ot,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:f.now()});Ke=function(ot,ht,yt,Ct,mt){var xt=ot.interactions.new({pointerType:"reflow"}),tn={interaction:xt,event:mt,pointer:mt,eventTarget:yt,phase:"reflow"};xt.interactable=ht,xt.element=yt,xt.prevEvent=mt,xt.updatePointer(mt,mt,yt,!0),ne(xt.coords.delta),It(xt.prepared,Ct),xt._doPhase(tn);var Kt=ot.window,cn=Kt.Promise,En=cn?new cn(function(Pn){xt._reflowResolve=Pn}):void 0;return xt._reflowPromise=En,xt.start(Ct,ht,yt),xt._interacting?(xt.move(tn),xt.end(mt)):(xt.stop(),xt._reflowResolve()),xt.removePointer(mt,mt),En}(f,r,Q,u,st)}_&&_.push(Ke)},N=0;N<v.length&&!L();N++);return _&&y.all(_).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},Vr=Nr;if(en.use(Kn),en.use(Wt),en.use(Ar),en.use(Lt),en.use(Dr),en.use(qn),en.use(nt),en.use(vt),en.use(Vr),en.default=en,s(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(xa,xa.exports)),xa.exports}var sd=id();const tl=pa.getDefaultExportFromCjs(sd),Ga=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:c,emit:i}){const l=a,s=i,d=e.inject(Pl),w=e.inject(Fl);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),h=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let D=!1,A=!1,I=NaN,F=NaN,M=NaN,W=NaN,De=-1,J=-1,K=-1,ce=-1,C=l.x,P=l.y,b=l.w,V=l.h;const S=e.ref(),re=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:S,calcXY:ft});function Le(m){he(m)}function lt(){Je()}function Ve(m){un(l.isDraggable)&&(h.draggable=m)}function We(m){un(l.isResizable)&&(h.resizable=m)}function be(m){un(l.isBounded)&&(h.bounded=m)}function B(m){h.transformScale=m}function ae(m){h.rowHeight=m}function te(m){h.maxRows=m}function de(){h.rtl=Qo()==="rtl",Je()}function Ue(m){h.cols=Math.floor(m)}d.increaseItem(re),e.onBeforeMount(()=>{h.rtl=Qo()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=Ul(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,un(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,un(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,un(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{C=l.x,P=l.y,V=l.h,b=l.w,nn(xe)}),w.on("updateWidth",Le),w.on("compact",lt),w.on("setDraggable",Ve),w.on("setResizable",We),w.on("setBounded",be),w.on("setTransformScale",B),w.on("setRowHeight",ae),w.on("setMaxRows",te),w.on("directionchange",de),w.on("setColNum",Ue)}),e.onBeforeUnmount(()=>{w.off("updateWidth",Le),w.off("compact",lt),w.off("setDraggable",Ve),w.off("setResizable",We),w.off("setBounded",be),w.off("setTransformScale",B),w.off("setRowHeight",ae),w.off("setMaxRows",te),w.off("directionchange",de),w.off("setColNum",Ue),g.value&&(g.value.unset(),g.value=null),d.decreaseItem(re)}),c({state:h,wrapper:S});const ut=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Ne=e.computed(()=>h.resizable&&!l.static),E=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),_e=e.computed(()=>(h.draggable||h.resizable)&&!l.static),ie=Qp("item"),Fe=e.computed(()=>({[ie.b()]:!0,[ie.bm("resizable")]:Ne.value,[ie.bm("static")]:l.static,[ie.bm("resizing")]:h.isResizing,[ie.bm("dragging")]:h.isDragging,[ie.bm("transform")]:h.useCssTransforms,[ie.bm("rtl")]:E.value,[ie.bm("no-touch")]:ut&&_e.value})),$e=e.computed(()=>[ie.be("resizer"),E.value&&ie.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,m=>{h.draggable=m}),e.watch(()=>l.static,()=>{nn(x),nn(ne)}),e.watch(()=>h.draggable,()=>{nn(x)}),e.watch(()=>l.isResizable,m=>{h.resizable=m}),e.watch(()=>l.isBounded,m=>{h.bounded=m}),e.watch(()=>h.resizable,()=>{nn(ne)}),e.watch(()=>h.rowHeight,()=>{nn(xe),nn(je)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{nn(ne),nn(xe),nn(je)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(ne)}),e.watch(E,()=>{nn(ne),nn(xe)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const m=d.margin;!m||m[0]===h.margin[0]&&m[1]===h.margin[1]||(h.margin=m.map(Number),nn(xe),nn(je))});function xe(){l.x+l.w>h.cols?(C=0,b=l.w>h.cols?h.cols:l.w):(C=l.x,b=l.w);const m=Qe(C,P,b,V);h.isDragging&&(m.top=h.dragging.top,E.value?m.right=h.dragging.left:m.left=h.dragging.left),h.isResizing&&(m.width=h.resizing.width,m.height=h.resizing.height);let T;h.useCssTransforms?E.value?T=Gp(m.top,m.right,m.width,m.height):T=Xp(m.top,m.left,m.width,m.height):E.value?T=Jp(m.top,m.right,m.width,m.height):T=Yp(m.top,m.left,m.width,m.height),h.style=T}function je(){const m={};for(const T of["width","height"]){const U=h.style[T].match(/^(\d+)px$/);if(!U)return;m[T]=U[1]}s("container-resized",l.i,l.h,l.w,m.height,m.width)}function pt(m){if(l.static)return;const T=m.type;if(T==="resizestart"&&h.isResizing||T!=="resizestart"&&!h.isResizing)return;const U=Jo(m);if(un(U))return;const{x:j,y:H}=U,Z={width:0,height:0};let X;switch(T){case"resizestart":{ne(),De=b,J=V,X=Qe(C,P,b,V),Z.width=X.width,Z.height=X.height,h.resizing=Z,h.isResizing=!0;break}case"resizemove":{!m.edges.right&&!m.edges.left&&(M=j),!m.edges.top&&!m.edges.bottom&&(W=H);const Y=Zo(M,W,j,H);E.value?Z.width=h.resizing.width-Y.deltaX/h.transformScale:Z.width=h.resizing.width+Y.deltaX/h.transformScale,Z.height=h.resizing.height+Y.deltaY/h.transformScale,h.resizing=Z;break}case"resizeend":{X=Qe(C,P,b,V),Z.width=X.width,Z.height=X.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}X=we(Z.height,Z.width),X.w<l.minW&&(X.w=l.minW),X.w>l.maxW&&(X.w=l.maxW),X.h<l.minH&&(X.h=l.minH),X.h>l.maxH&&(X.h=l.maxH),X.h<1&&(X.h=1),X.w<1&&(X.w=1),M=j,W=H,(b!==X.w||V!==X.h)&&s("resize",l.i,X.h,X.w,Z.height,Z.width),m.type==="resizeend"&&(De!==b||J!==V)&&s("resized",l.i,X.h,X.w,Z.height,Z.width),w.emit("resizeEvent",m.type,l.i,C,P,X.h,X.w)}function G(m){if(l.static||h.isResizing)return;const T=m.type;if(T==="dragstart"&&h.isDragging||T!=="dragstart"&&!h.isDragging)return;const U=Jo(m);if(un(U))return;const{x:j,y:H}=U,Z=m.target;if(!Z.offsetParent)return;const X={top:0,left:0};switch(T){case"dragstart":{K=C,ce=P;const fe=Z.offsetParent.getBoundingClientRect(),q=Z.getBoundingClientRect(),se=q.left/h.transformScale,$=fe.left/h.transformScale,Ae=q.right/h.transformScale,Se=fe.right/h.transformScale,ke=q.top/h.transformScale,z=fe.top/h.transformScale;E.value?X.left=(Ae-Se)*-1:X.left=se-$,X.top=ke-z,h.dragging=X,h.isDragging=!0;break}case"dragmove":{const fe=Zo(I,F,j,H);if(E.value?X.left=h.dragging.left-fe.deltaX/h.transformScale:X.left=h.dragging.left+fe.deltaX/h.transformScale,X.top=h.dragging.top+fe.deltaY/h.transformScale,h.bounded){const q=Z.offsetParent.clientHeight-ee(l.h,h.rowHeight,h.margin[1]);X.top=oe(X.top,0,q);const se=tt(),$=h.containerWidth-ee(l.w,se,h.margin[0]);X.left=oe(X.left,0,$)}h.dragging=X;break}case"dragend":{const fe=Z.offsetParent.getBoundingClientRect(),q=Z.getBoundingClientRect(),se=q.left/h.transformScale,$=fe.left/h.transformScale,Ae=q.right/h.transformScale,Se=fe.right/h.transformScale,ke=q.top/h.transformScale,z=fe.top/h.transformScale;E.value?X.left=(Ae-Se)*-1:X.left=se-$,X.top=ke-z,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let Y;E.value,Y=ft(X.top,X.left),I=j,F=H,(C!==Y.x||P!==Y.y)&&s("move",l.i,Y.x,Y.y),m.type==="dragend"&&(K!==C||ce!==P)&&s("moved",l.i,Y.x,Y.y),w.emit("dragEvent",m.type,l.i,Y.x,Y.y,V,b)}function Qe(m,T,U,j){const H=tt();let Z;return E.value?Z={right:Math.round(H*m+(m+1)*h.margin[0]),top:Math.round(h.rowHeight*T+(T+1)*h.margin[1]),width:U===1/0?U:Math.round(H*U+Math.max(0,U-1)*h.margin[0]),height:j===1/0?j:Math.round(h.rowHeight*j+Math.max(0,j-1)*h.margin[1])}:Z={left:Math.round(H*m+(m+1)*h.margin[0]),top:Math.round(h.rowHeight*T+(T+1)*h.margin[1]),width:U===1/0?U:Math.round(H*U+Math.max(0,U-1)*h.margin[0]),height:j===1/0?j:Math.round(h.rowHeight*j+Math.max(0,j-1)*h.margin[1])},Z}function ft(m,T){const U=tt();let j=Math.round((T-h.margin[0])/(U+h.margin[0])),H=Math.round((m-h.margin[1])/(h.rowHeight+h.margin[1]));return j=Math.max(Math.min(j,h.cols-b),0),H=Math.max(Math.min(H,h.maxRows-V),0),{x:j,y:H}}function tt(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function ee(m,T,U){return Number.isFinite(m)?Math.round(T*m+Math.max(0,m-1)*U):m}function oe(m,T,U){return Math.max(Math.min(m,U),T)}function we(m,T,U=!1){const j=tt();let H=Math.round((T+h.margin[0])/(j+h.margin[0])),Z=0;return U?Z=Math.ceil((m+h.margin[1])/(h.rowHeight+h.margin[1])):Z=Math.round((m+h.margin[1])/(h.rowHeight+h.margin[1])),H=Math.max(Math.min(H,h.cols-C),0),Z=Math.max(Math.min(Z,h.maxRows-P),0),{w:H,h:Z}}function he(m,T){h.containerWidth=m}function Je(){xe()}function et(){!g.value&&S.value&&(g.value=tl(S.value),h.useStyleCursor||g.value.styleCursor(!1))}const k=Xo(G);function x(){if(et(),!!g.value)if(h.draggable&&!l.static){const m={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};g.value.draggable(m),D||(D=!0,g.value.on("dragstart dragmove dragend",T=>{T.type==="dragmove"?k(T):G(T)}))}else g.value.draggable({enabled:!1})}const R=Xo(pt);function ne(){if(et(),!!g.value)if(h.resizable&&!l.static){const m=Qe(0,0,l.maxW,l.maxH),T=Qe(0,0,l.minW,l.minH),U={edges:{left:E.value?`.${$e.value[0]}`:!1,right:E.value?!1:`.${$e.value[0]}`,bottom:`.${$e.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:T.height*h.transformScale,width:T.width*h.transformScale},max:{height:m.height*h.transformScale,width:m.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(U.modifiers=[tl.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(U),A||(A=!0,g.value.on("resizestart resizemove resizeend",j=>{j.type==="resizemove"?R(j):pt(j)}))}else g.value.resizable({enabled:!1})}return(m,T)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:S,class:e.normalizeClass(Fe.value),style:e.normalizeStyle(h.style)},[e.renderSlot(m.$slots,"default"),Ne.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass($e.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ia=typeof window<"u";var nl;ia&&(nl=window==null?void 0:window.navigator)!=null&&nl.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function al(a){return a!=null}function ol(){}const cd=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(cd)));const ud=ia&&("ontouchstart"in window||dd()>0),pd=ud?"pointerdown":"click";function dd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function fd(a,c,i=window.Event){const{type:l,bubbles:s=!1,cancelable:d=!1,...w}=c;if(!al(l)||l==="")return!1;let g;return al(i)?g=new i(l,{bubbles:s,cancelable:d}):(g=document.createEvent("HTMLEvents"),g.initEvent(l,s,d)),Object.assign(g,w),a.dispatchEvent(g)}const hd="clickoutside",vd=new Set;ia&&document.addEventListener(pd,a=>{const c=a.target,i=a.composedPath&&a.composedPath();vd.forEach(l=>{l!==c&&(i?!i.includes(l):!l.contains(c))&&(!l.__transferElement||l.__transferElement!==c&&!l.__transferElement.contains(c))&&fd(l,{type:hd})})},!0);const gd=[["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 Ka;if(ia){for(const a of gd)if(a[1]in document){Ka=a;break}}e.computed(()=>!1);const md=new Set,yd=new WeakMap;if(ia&&Ka){const a=Ka[2],c=Ka[4];document.addEventListener(c,()=>{if(md.forEach(i=>{i.value=!1}),document[a]){const i=yd.get(document[a]);i&&(i.value=!0)}},!1)}const Hl=new Map;Hl.set("x",0);Hl.set("y",0);var oa=[],bd=function(){return oa.some(function(a){return a.activeTargets.length>0})},kd=function(){return oa.some(function(a){return a.skippedTargets.length>0})},ll="ResizeObserver loop completed with undelivered notifications.",xd=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:ll}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=ll),window.dispatchEvent(a)},Ta;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ta||(Ta={}));var la=function(a){return Object.freeze(a)},wd=function(){function a(c,i){this.inlineSize=c,this.blockSize=i,la(this)}return a}(),ql=function(){function a(c,i,l,s){return this.x=c,this.y=i,this.width=l,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,la(this)}return a.prototype.toJSON=function(){var c=this,i=c.x,l=c.y,s=c.top,d=c.right,w=c.bottom,g=c.left,h=c.width,D=c.height;return{x:i,y:l,top:s,right:d,bottom:w,left:g,width:h,height:D}},a.fromRect=function(c){return new a(c.x,c.y,c.width,c.height)},a}(),xo=function(a){return a instanceof SVGElement&&"getBBox"in a},Xl=function(a){if(xo(a)){var c=a.getBBox(),i=c.width,l=c.height;return!i&&!l}var s=a,d=s.offsetWidth,w=s.offsetHeight;return!(d||w||a.getClientRects().length)},rl=function(a){var c;if(a instanceof Element)return!0;var i=(c=a==null?void 0:a.ownerDocument)===null||c===void 0?void 0:c.defaultView;return!!(i&&a instanceof i.Element)},Dd=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},Ea=typeof window<"u"?window:{},Pa=new WeakMap,il=/auto|scroll/,Cd=/^tb|vertical/,Ed=/msie|trident/i.test(Ea.navigator&&Ea.navigator.userAgent),Mn=function(a){return parseFloat(a||"0")},da=function(a,c,i){return a===void 0&&(a=0),c===void 0&&(c=0),i===void 0&&(i=!1),new wd((i?c:a)||0,(i?a:c)||0)},sl=la({devicePixelContentBoxSize:da(),borderBoxSize:da(),contentBoxSize:da(),contentRect:new ql(0,0,0,0)}),Gl=function(a,c){if(c===void 0&&(c=!1),Pa.has(a)&&!c)return Pa.get(a);if(Xl(a))return Pa.set(a,sl),sl;var i=getComputedStyle(a),l=xo(a)&&a.ownerSVGElement&&a.getBBox(),s=!Ed&&i.boxSizing==="border-box",d=Cd.test(i.writingMode||""),w=!l&&il.test(i.overflowY||""),g=!l&&il.test(i.overflowX||""),h=l?0:Mn(i.paddingTop),D=l?0:Mn(i.paddingRight),A=l?0:Mn(i.paddingBottom),I=l?0:Mn(i.paddingLeft),F=l?0:Mn(i.borderTopWidth),M=l?0:Mn(i.borderRightWidth),W=l?0:Mn(i.borderBottomWidth),De=l?0:Mn(i.borderLeftWidth),J=I+D,K=h+A,ce=De+M,C=F+W,P=g?a.offsetHeight-C-a.clientHeight:0,b=w?a.offsetWidth-ce-a.clientWidth:0,V=s?J+ce:0,S=s?K+C:0,re=l?l.width:Mn(i.width)-V-b,Le=l?l.height:Mn(i.height)-S-P,lt=re+J+b+ce,Ve=Le+K+P+C,We=la({devicePixelContentBoxSize:da(Math.round(re*devicePixelRatio),Math.round(Le*devicePixelRatio),d),borderBoxSize:da(lt,Ve,d),contentBoxSize:da(re,Le,d),contentRect:new ql(I,h,re,Le)});return Pa.set(a,We),We},Yl=function(a,c,i){var l=Gl(a,i),s=l.borderBoxSize,d=l.contentBoxSize,w=l.devicePixelContentBoxSize;switch(c){case Ta.DEVICE_PIXEL_CONTENT_BOX:return w;case Ta.BORDER_BOX:return s;default:return d}},_d=function(){function a(c){var i=Gl(c);this.target=c,this.contentRect=i.contentRect,this.borderBoxSize=la([i.borderBoxSize]),this.contentBoxSize=la([i.contentBoxSize]),this.devicePixelContentBoxSize=la([i.devicePixelContentBoxSize])}return a}(),Jl=function(a){if(Xl(a))return 1/0;for(var c=0,i=a.parentNode;i;)c+=1,i=i.parentNode;return c},Sd=function(){var a=1/0,c=[];oa.forEach(function(d){if(d.activeTargets.length!==0){var w=[];d.activeTargets.forEach(function(g){var h=new _d(g.target),D=Jl(g.target);w.push(h),g.lastReportedSize=Yl(g.target,g.observedBox),D<a&&(a=D)}),c.push(function(){d.callback.call(d.observer,w,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var i=0,l=c;i<l.length;i++){var s=l[i];s()}return a},cl=function(a){oa.forEach(function(c){c.activeTargets.splice(0,c.activeTargets.length),c.skippedTargets.splice(0,c.skippedTargets.length),c.observationTargets.forEach(function(i){i.isActive()&&(Jl(i.target)>a?c.activeTargets.push(i):c.skippedTargets.push(i))})})},Td=function(){var a=0;for(cl(a);bd();)a=Sd(),cl(a);return kd()&&xd(),a>0},oo,Zl=[],Id=function(){return Zl.splice(0).forEach(function(a){return a()})},Bd=function(a){if(!oo){var c=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Id()}).observe(i,l),oo=function(){i.textContent="".concat(c?c--:c++)}}Zl.push(a),oo()},Ad=function(a){Bd(function(){requestAnimationFrame(a)})},Ua=0,Nd=function(){return!!Ua},Vd=250,Od={attributes:!0,characterData:!0,childList:!0,subtree:!0},ul=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],pl=function(a){return a===void 0&&(a=0),Date.now()+a},lo=!1,Md=function(){function a(){var c=this;this.stopped=!0,this.listener=function(){return c.schedule()}}return a.prototype.run=function(c){var i=this;if(c===void 0&&(c=Vd),!lo){lo=!0;var l=pl(c);Ad(function(){var s=!1;try{s=Td()}finally{if(lo=!1,c=l-pl(),!Nd())return;s?i.run(1e3):c>0?i.run(c):i.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var c=this,i=function(){return c.observer&&c.observer.observe(document.body,Od)};document.body?i():Ea.addEventListener("DOMContentLoaded",i)},a.prototype.start=function(){var c=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ul.forEach(function(i){return Ea.addEventListener(i,c.listener,!0)}))},a.prototype.stop=function(){var c=this;this.stopped||(this.observer&&this.observer.disconnect(),ul.forEach(function(i){return Ea.removeEventListener(i,c.listener,!0)}),this.stopped=!0)},a}(),po=new Md,dl=function(a){!Ua&&a>0&&po.start(),Ua+=a,!Ua&&po.stop()},zd=function(a){return!xo(a)&&!Dd(a)&&getComputedStyle(a).display==="inline"},Rd=function(){function a(c,i){this.target=c,this.observedBox=i||Ta.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var c=Yl(this.target,this.observedBox,!0);return zd(this.target)&&(this.lastReportedSize=c),this.lastReportedSize.inlineSize!==c.inlineSize||this.lastReportedSize.blockSize!==c.blockSize},a}(),Pd=function(){function a(c,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=c,this.callback=i}return a}(),Fa=new WeakMap,fl=function(a,c){for(var i=0;i<a.length;i+=1)if(a[i].target===c)return i;return-1},La=function(){function a(){}return a.connect=function(c,i){var l=new Pd(c,i);Fa.set(c,l)},a.observe=function(c,i,l){var s=Fa.get(c),d=s.observationTargets.length===0;fl(s.observationTargets,i)<0&&(d&&oa.push(s),s.observationTargets.push(new Rd(i,l&&l.box)),dl(1),po.schedule())},a.unobserve=function(c,i){var l=Fa.get(c),s=fl(l.observationTargets,i),d=l.observationTargets.length===1;s>=0&&(d&&oa.splice(oa.indexOf(l),1),l.observationTargets.splice(s,1),dl(-1))},a.disconnect=function(c){var i=this,l=Fa.get(c);l.observationTargets.slice().forEach(function(s){return i.unobserve(c,s.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Fd=function(){function a(c){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof c!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");La.connect(this,c)}return a.prototype.observe=function(c,i){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(c))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");La.observe(this,c,i)},a.prototype.unobserve=function(c){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(c))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");La.unobserve(this,c)},a.prototype.disconnect=function(){La.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Ya=new WeakMap;function Ld(a){var c;for(let i=0,l=a.length;i<l;++i){const s=a[i],d=Ya.get(s.target);if(typeof d=="function"){const{inlineSize:w,blockSize:g}=((c=s.borderBoxSize)==null?void 0:c[0])??{},{offsetWidth:h,offsetHeight:D}=s.target;d(Object.assign(s,{offsetWidth:h,offsetHeight:D,width:w??h,height:g??D}))}}}const Ql=new(ia&&window.ResizeObserver||Fd)(Ld);function hl(a,c){Ya.set(a,c),Ql.observe(a)}function vl(a){Ya.has(a)&&(Ql.unobserve(a),Ya.delete(a))}function $d(a={}){let c=ol;const i=e.watch(()=>e.unref(a.target),s=>{c(),!(!s||typeof a.onResize!="function")&&(hl(s,a.onResize),c=()=>{vl(s),c=ol})},{immediate:!0}),l=()=>{i(),c()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:hl,unobserveResize:vl,unobserve:l}}const jd=e.ref(!1);e.computed(()=>jd.value);const gl="__theme_style__",ro="__theme_observer__",ml=e.reactive(new Map),yl=new Map;e.watch(ml,()=>{if(!ia)return;yl.clear();const a=document.head.querySelector(`#${gl}`);a&&document.head.removeChild(a);const c=document.createElement("style");let i=`.${ro} { width: 1px }`,l=1;for(const[s,[d,w]]of ml.entries())i+=` html.${d} .${ro}, .${w} .${ro} { width: ${++l}px }`,yl.set(l,s);c.textContent=i,c.id=gl,document.head.appendChild(c)});const er=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:c,emit:i}){const l=a,s=i,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),w=new Map,g=e.ref(l.layout),h=e.ref(),{observeResize:D,unobserveResize:A}=$d(),I=$p();I.on("resizeEvent",F),I.on("dragEvent",M),e.onBeforeMount(()=>{s("layout-before-mount",g.value)}),e.onMounted(()=>{s("layout-mounted",g.value),e.nextTick(()=>{Zp(g.value),d.originalLayout=g.value,e.nextTick(()=>{Le(),h.value&&D(h.value,jp(C,16)),ca(g.value,l.verticalCompact),s("layout-updated",g.value),ce(),C()})})}),e.onBeforeUnmount(()=>{I.clearAll(),h.value&&A(h.value)});function F(Ve,We,be,B,ae,te){S(Ve,We,be,B,ae,te)}function M(Ve,We,be,B,ae,te){V(Ve,We,be,B,ae,te)}e.watch(()=>d.width,(Ve,We)=>{e.nextTick(()=>{I.emit("updateWidth",Ve),We===-1&&e.nextTick(()=>{s("layout-ready",g.value)}),ce()})}),e.watch(()=>[l.layout,l.layout.length],()=>{g.value=l.layout,K()}),e.watch(()=>l.colNum,Ve=>{I.emit("setColNum",Ve)}),e.watch(()=>l.rowHeight,Ve=>{I.emit("setRowHeight",Ve)}),e.watch(()=>l.isDraggable,Ve=>{I.emit("setDraggable",Ve)}),e.watch(()=>l.isResizable,Ve=>{I.emit("setResizable",Ve)}),e.watch(()=>l.isBounded,Ve=>{I.emit("setBounded",Ve)}),e.watch(()=>l.transformScale,Ve=>{I.emit("setTransformScale",Ve)}),e.watch(()=>l.responsive,Ve=>{Ve||(s("update:layout",d.originalLayout),I.emit("setColNum",l.colNum)),C()}),e.watch(()=>l.maxRows,Ve=>{I.emit("setMaxRows",Ve)}),e.watch([()=>l.margin,()=>l.margin[1]],ce),e.provide(Pl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:W,decreaseItem:De})),e.provide(Fl,I),c({state:d,getItem:J,resizeEvent:S,dragEvent:V,layoutUpdate:K});function W(Ve){w.set(Ve.i,Ve)}function De(Ve){w.delete(Ve.i)}function J(Ve){return w.get(Ve)}function K(){if(!un(g.value)&&!un(d.originalLayout)){if(g.value.length!==d.originalLayout.length){const Ve=lt(g.value,d.originalLayout);if(Ve.length>0)if(g.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(Ve);else{const We=new Set(Ve.map(be=>be.i));d.originalLayout=d.originalLayout.filter(be=>!We.has(be.i))}d.lastLayoutLength=g.value.length,Le()}ca(g.value,l.verticalCompact),I.emit("updateWidth",d.width),ce(),s("layout-updated",g.value)}}function ce(){d.mergedStyle={height:P()}}function C(){h.value&&(d.width=h.value.offsetWidth),I.emit("resizeEvent")}function P(){if(!l.autoSize)return;const Ve=parseFloat(l.margin[1]);return Up(g.value)*(l.rowHeight+Ve)+Ve+"px"}let b;function V(Ve,We,be,B,ae,te){let de=Go(g.value,We);un(de)&&(de={h:0,w:0,x:0,y:0,i:""}),Ve==="dragstart"&&!l.verticalCompact&&(b=g.value.reduce((Ue,{i:ut,x:Ne,y:E})=>({...Ue,[ut]:{x:Ne,y:E}}),{})),Ve==="dragmove"||Ve==="dragstart"?(d.placeholder.i=We,d.placeholder.x=de.x,d.placeholder.y=de.y,d.placeholder.w=te,d.placeholder.h=ae,e.nextTick(()=>{d.isDragging=!0}),I.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),g.value=uo(g.value,de,be,B,!0,l.preventCollision),l.restoreOnDrag?(de.static=!0,ca(g.value,l.verticalCompact,b),de.static=!1):ca(g.value,l.verticalCompact),I.emit("compact"),ce(),Ve==="dragend"&&(b=void 0,s("layout-updated",g.value))}function S(Ve,We,be,B,ae,te){let de=Go(g.value,We);un(de)&&(de={h:0,w:0,x:0,y:0,i:""});let Ue;if(l.preventCollision){const ut=$l(g.value,{...de,w:te,h:ae}).filter(Ne=>Ne.i!==de.i);if(Ue=ut.length>0,Ue){let Ne=1/0,E=1/0;ut.forEach(_e=>{_e.x>de.x&&(Ne=Math.min(Ne,_e.x)),_e.y>de.y&&(E=Math.min(E,_e.y))}),Number.isFinite(Ne)&&(de.w=Ne-de.x),Number.isFinite(E)&&(de.h=E-de.y)}}Ue||(de.w=te,de.h=ae),Ve==="resizestart"||Ve==="resizemove"?(d.placeholder.i=We,d.placeholder.x=be,d.placeholder.y=B,d.placeholder.w=de.w,d.placeholder.h=de.h,e.nextTick(()=>{d.isDragging=!0}),I.emit("updateWidth",d.width)):Ve&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&re(),ca(g.value,l.verticalCompact),I.emit("compact"),ce(),Ve==="resizeend"&&s("layout-updated",g.value)}function re(){const Ve=nd(l.breakpoints,d.width);if(Ve===d.lastBreakpoint)return;const We=Ul(Ve,l.cols);!un(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=co(g.value));const be=ad(d.originalLayout,d.layouts,l.breakpoints,Ve,d.lastBreakpoint,We,l.verticalCompact);d.layouts[Ve]=be,d.lastBreakpoint!==Ve&&s("breakpoint-changed",Ve,be),g.value=be,s("update:layout",be),d.lastBreakpoint=Ve,I.emit("setColNum",We)}function Le(){d.layouts=Object.assign({},l.responsiveLayouts)}function lt(Ve,We){const be=new Set(We.map(de=>de.i)),B=new Set(Ve.map(de=>de.i)),ae=Ve.filter(de=>!be.has(de.i)),te=We.filter(de=>!B.has(de.i));return ae.concat(te)}return(Ve,We)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[Ve.$slots.default?e.renderSlot(Ve.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,be=>(e.openBlock(),e.createBlock(Ga,e.mergeProps({key:be.i,ref_for:!0},be),{default:e.withCtx(()=>[e.renderSlot(Ve.$slots,"item",{item:be})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Ga,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(c){console.error("vite-plugin-css-injected-by-js",c)}})();const Kd={key:0,class:"item-view-group"},Ud=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:c}){const i=Be.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(i),s=c,d=a,w=e.computed(()=>d==null?void 0:d.children),g=e.computed(()=>{var I,F,M,W;return((I=d==null?void 0:d.children)==null?void 0:I.length)>0&&((F=d==null?void 0:d.children)!=null&&F.every(De=>De==null?void 0:De.layout))?(W=(M=d==null?void 0:d.children)==null?void 0:M[0])==null?void 0:W.layout:"vertical"}),h=e.ref((d==null?void 0:d.level)+1),D=I=>{s("rowClick",I)},A=(I,F)=>{s("routeUrl",I,F)};return(I,F)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(er),{layout:w.value,"onUpdate:layout":F[0]||(F[0]=M=>w.value=M),"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(w.value,(M,W)=>(e.openBlock(),e.createBlock(e.unref(Ga),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var De,J,K,ce,C,P,b,V,S,re,Le,lt,Ve;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:W===((De=d==null?void 0:d.children)==null?void 0:De.length)-1?"0px":"24px"})},[((K=(J=M==null?void 0:M.component)==null?void 0:J.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&((ce=M==null?void 0:M.component)!=null&&ce.name)?(e.openBlock(),e.createElementBlock("div",Kd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(h.value.toString())>1?"0px":"8px",fontWeight:600-(h.value-1)*100>=400?600-(h.value-1)*100:400,fontSize:17-h.value>=14?17-h.value+"px":"14px"})},e.toDisplayString((C=M==null?void 0:M.component)==null?void 0:C.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(go)((P=M==null?void 0:M.component)==null?void 0:P.comp)),{pageLayout:g.value,config:{showIndex:(b=e.unref(Mt)[W])==null?void 0:b.showIndex,allowMove:(V=e.unref(Mt)[W])==null?void 0:V.allowMove,viewport:(S=e.unref(Mt)[W])==null?void 0:S.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(ko),itemData:(re=M==null?void 0:M.component)==null?void 0:re.compData,childItemData:(Le=M==null?void 0:M.component)==null?void 0:Le.itemChildData,key:e.unref(_a),cacheNewData:e.unref(Xa),onChange:e.unref(mo),index:(M==null?void 0:M.id)??W,onContentChange:e.unref(yo),onPageChange:e.unref(bo),parentTableId:(lt=M==null?void 0:M.component)==null?void 0:lt.tableId,allMapContents:e.unref(vo),children:(Ve=M==null?void 0:M.component)==null?void 0:Ve.children,level:h.value,onRowClick:D,onRouteUrl:A,onClickTrigger:e.unref(Vl),onClickMainKey:e.unref(Ol)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])]))}}),Wd=Rt._export_sfc(Ud,[["__scopeId","data-v-6e5a155a"]]),tr=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"}]),Hd={TABLE:ua.ssTable,FORM:Mo,TABLEOPERATE:es,TABLESTYLE:gs,TABLEEXTEND:ys,TABLEINTERACTION:xs,FORMOPERATE:zo,FOLD:Js,CALCULATOR:ac,METHODBUTTON:bc,AVATARUPLOAD:No.ssAvatar,SIGNATURE:No.ssSignature,FORMTOP:Mo,STEP:Ac,STEPOPERATE:js,TIMELINE:Rc,TIMELINEOPERATE:Xs,FORMTOPOPERATE:zo,SIGNATUREOPERATE:Tc,AVATARUPLOADOPERATE:wc,TABS:Lc,TABSOPERATE:Eu,CHART:Fu,CHARTOPERATE:Yu,LAYOUT:Ip,LAYOUTOPERATE:Pp,PARENTITEM:Wd};function fa(a){return Hd[a==null?void 0:a.toUpperCase()]||null}exports.De=er;exports.activeStepInfo=so;exports.affixItems=dp;exports.allMapContents=vo;exports.cacheNewData=Xa;exports.checkForTableContents=uc;exports.checkIsShowGroup=oc;exports.checkIsShowGroupForm=lc;exports.checkIsShowTable=sc;exports.clickMainKey=Ol;exports.clickSavePage=pp;exports.clickStep=_p;exports.clickTrigger=Vl;exports.compId=_a;exports.compNames=ko;exports.compShow=qa;exports.contentTransArray=ba;exports.contentTransArrayToAll=wa;exports.contentTransArrayToAllNoExtra=io;exports.debounce=fo;exports.existLayouts=xp;exports.formToExtraContent=cc;exports.generateLayouts=ds;exports.getComponent=fa;exports.getComponents=go;exports.getExtraContents=dc;exports.getSliceContLength=Ep;exports.gridRowHeight=is;exports.isUndefined=xl;exports.newContentTransArrayToAllNoExtra=ic;exports.onBack=cp;exports.onChange=mo;exports.onClick=up;exports.onContentChange=yo;exports.onExtendTaskEnd=kp;exports.onPageBack=wp;exports.onPageChange=bo;exports.onSaveBack=Il;exports.onSelectFixContent=sp;exports.showItems=Mt;exports.sliceTableLength=Al;exports.slotContent=tr;exports.st=Ga;exports.toolBar=$n;exports.verifyButton=Dp;
|