ss-component-new 1.2.197 → 1.2.199
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-Byqavztq.cjs → MTLLoader-DACeOwx8.cjs} +1 -1
- package/dist/{MTLLoader-Dgdauq0e.js → MTLLoader-DO6JtV2J.js} +1 -1
- package/dist/{OrbitControls-ClbU8eSj.js → OrbitControls-CVZSxhco.js} +1 -1
- package/dist/{OrbitControls-CqLjuVIG.cjs → OrbitControls-Dnwv1l-5.cjs} +1 -1
- package/dist/{URDFLoader-DvK8TeNl.js → URDFLoader-BNqQfPqb.js} +2 -2
- package/dist/{URDFLoader-CNdb489r.cjs → URDFLoader-BoSgd6gH.cjs} +1 -1
- package/dist/{animationData-D-BqiAM4.js → animationData-D3-99sWf.js} +2 -2
- package/dist/{animationData-unjhG8fw.cjs → animationData-DHASNMoi.cjs} +1 -1
- package/dist/{array-BalKa-G_.cjs → array-DuMZPpVP.cjs} +1 -1
- package/dist/{array-BWgaJn7i.js → array-DxkXasEB.js} +3 -3
- package/dist/{iconfont-Pr-FT7zi.js → iconfont-AyWwUMxc.js} +2 -2
- package/dist/{iconfont-B1_Xqnj1.cjs → iconfont-U7rG6UGs.cjs} +1 -1
- package/dist/{index-BESXbWVG.js → index-0lSRcHqv.js} +2 -2
- package/dist/{index-VnVlZEmb.js → index-3oQGURYh.js} +1 -1
- package/dist/{index-B3pt6yKi.js → index-4awf2rkD.js} +6 -6
- package/dist/{index-DufZVmKf.js → index-7MBVUN82.js} +9 -8
- package/dist/{index-DrUL3MEH.cjs → index-8w6PrNkw.cjs} +1 -1
- package/dist/index-9FU0RWoV.js +3297 -0
- package/dist/{index-jUgVakK7.js → index-B-d6-ohn.js} +3 -3
- package/dist/index-B2FiRoly.cjs +1 -0
- package/dist/{index-cZFinVc1.cjs → index-B6K14gG9.cjs} +1 -1
- package/dist/{index-BEvGe7qR.cjs → index-BCfX45g1.cjs} +1 -1
- package/dist/{index-CZ4PGO_D.cjs → index-BDcBHWC2.cjs} +1 -1
- package/dist/{index-Ce_RQRLx.js → index-BDhmy-7L.js} +20 -20
- package/dist/{index-BDrk1uN0.cjs → index-BJO_TiAy.cjs} +1 -1
- package/dist/{index-BLv0pdvk.js → index-BO3Qkqzh.js} +3 -3
- package/dist/{index-DSc4zqmL.cjs → index-BPTR1s4o.cjs} +10 -10
- package/dist/{index-Ca5TreCg.cjs → index-BQEwWecE.cjs} +1 -1
- package/dist/{index-B6dURO8P.cjs → index-BZ5_PpJp.cjs} +1 -1
- package/dist/{index-CAfFVPVi.cjs → index-BnITIl1C.cjs} +1 -1
- package/dist/{index-Dojr8FJ0.js → index-BseikzDK.js} +2 -2
- package/dist/{index-CLHjjvOb.js → index-BucMQlBB.js} +1 -1
- package/dist/{index-C0xcoS5Z.js → index-Bwb6w0wO.js} +4 -4
- package/dist/{index-BhEaMtAm.js → index-C1fTLujM.js} +3 -3
- package/dist/{index-Cac0w_Jv.js → index-C5jivsmi.js} +11 -11
- package/dist/{index-DDgET2j1.cjs → index-C71_AKGx.cjs} +1 -1
- package/dist/{index-gqQl6PZB.js → index-CFl9wC5o.js} +6 -6
- package/dist/{index-DtFLuXja.cjs → index-CLqCXsqK.cjs} +1 -1
- package/dist/{index-BAaCpfqG.js → index-CO41nOz7.js} +2 -2
- package/dist/{index-C4RjZOxz.cjs → index-CP6V9Df_.cjs} +1 -1
- package/dist/{index-DQsD0m6q.js → index-CT-1q_Sb.js} +1 -1
- package/dist/{index-By--71sB.cjs → index-CXC0u8pm.cjs} +1 -1
- package/dist/{index-BnrtLGSt.cjs → index-CcNuHoZS.cjs} +1 -1
- package/dist/{index-BHrd3Rnr.cjs → index-CdMT_Zkq.cjs} +1 -1
- package/dist/{index-RptNsNWL.js → index-CgelR-6I.js} +3 -3
- package/dist/{index-CVv0twLg.js → index-Chmm97CU.js} +5 -5
- package/dist/{index-DIlZjOW9.js → index-CmNMrF68.js} +12 -12
- package/dist/{index-Dm9WJT36.cjs → index-CnuMyt69.cjs} +1 -1
- package/dist/{index-DW1RCzWC.cjs → index-D-uo7H2E.cjs} +1 -1
- package/dist/{index-D67gjfOO.cjs → index-D31qdo3B.cjs} +1 -1
- package/dist/{index-B-UnOwnc.js → index-DEN8cJAm.js} +2 -2
- package/dist/{index-BP07Gnjo.cjs → index-DOItJqcJ.cjs} +11 -11
- package/dist/{index-CPQHD9wh.js → index-DRDKKizg.js} +8 -7
- package/dist/{index-BpwyXpsR.cjs → index-DYFZIY8j.cjs} +1 -1
- package/dist/{index-Qe7Q00Fv.cjs → index-D_DpNI2W.cjs} +1 -1
- package/dist/{index-mjz9Da8Y.cjs → index-DaRuwvRP.cjs} +1 -1
- package/dist/{index-BdG8TrO6.js → index-DfFq9kkn.js} +2 -2
- package/dist/{index-t-bCvak-.cjs → index-DiRujSe_.cjs} +1 -1
- package/dist/{index-DOEl-NDu.cjs → index-DjzwipY0.cjs} +1 -1
- package/dist/{index-DRjU_LhS.js → index-Dq9Tho6E.js} +3 -3
- package/dist/{index-CtK95uR8.cjs → index-DqdWYUrz.cjs} +1 -1
- package/dist/{index-DdFjT9Lv.js → index-DzElE7Kh.js} +1 -1
- package/dist/{index-ewzEcjMi.js → index-EzLiPHAn.js} +4 -4
- package/dist/{index-K6PeHL12.cjs → index-KaxOq1_-.cjs} +1 -1
- package/dist/{index-RWbnXgK_.js → index-Oy-hRR6Z.js} +4 -4
- package/dist/{index-Db2i8Ibt.js → index-RLfjsj4L.js} +2 -2
- package/dist/{index-CDb9M8-d.js → index-aWkZx7My.js} +2 -2
- package/dist/{index-DHtKscY6.js → index-gruT7omp.js} +1 -1
- package/dist/{index-B3Nii_wb.js → index-r48vNrKN.js} +2 -2
- package/dist/{index-BdCj8NzO.cjs → index-ub7lvsfV.cjs} +1 -1
- package/dist/{index-G1p03SY5.cjs → index-z78zgQsK.cjs} +1 -1
- package/dist/{index-BT4zPLtT.cjs → index-zAtSFM2v.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DU8QxF4Q.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DpRm1D1L.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BVGLC2SV.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-hMJCL1Qk.js} +9 -9
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bamq-CWP.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C8n9olfd.cjs} +49 -49
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dz5T_AqR.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DgCNtMnV.js} +1197 -1202
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Dy6rsh2c.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-B9POGhwa.js} +7 -7
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-CLRlyz4U.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-aE8dAbK9.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-DQnMqyCR.js → index.vue_vue_type_style_index_1_lang-CtOB5lpf.js} +467 -343
- package/dist/index.vue_vue_type_style_index_1_lang-UuP0ZBQR.cjs +3 -0
- package/dist/{isString-5Nawl-Uc.js → isString-D70CzuJZ.js} +1 -1
- package/dist/{isString-DKZ1g7Pn.cjs → isString-Do5yyRUw.cjs} +1 -1
- package/dist/{main-CyCvDC23.js → main-Bhc4rs1O.js} +5 -5
- package/dist/{main-DQ6Ak0EZ.cjs → main-QJTAJyAl.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-VYZ6-TKK.js → threeModel-poOL5V2M.js} +5 -5
- package/dist/{threeModel-zbyHE0xz.cjs → threeModel-r6kZdDei.cjs} +1 -1
- package/dist/{threePreview-DmwhnnFP.js → threePreview-BY1POvl8.js} +4 -4
- package/dist/{threePreview-eC4zdGe3.cjs → threePreview-DKs8aYcW.cjs} +1 -1
- package/dist/{threeSceneView-DcaisuD7.cjs → threeSceneView-Cuz_EMZU.cjs} +1 -1
- package/dist/{threeSceneView-B1Vh9-kH.js → threeSceneView-KKWkkD2y.js} +11 -11
- package/dist/{threeSceneViewForCPMPIP-CrUTpcSK.cjs → threeSceneViewForCPMPIP-DFMYV0Jz.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Bug3YpE6.js → threeSceneViewForCPMPIP-Dwa17cnT.js} +8 -8
- package/dist/{threeTrackPathView-SbLCNVjN.cjs → threeTrackPathView-BrPuXqrr.cjs} +1 -1
- package/dist/{threeTrackPathView-DoGfpu6-.js → threeTrackPathView-D4w6l9m2.js} +5 -5
- package/dist/{threeViewerHost-CMycPEys.js → threeViewerHost-DCU9cNEx.js} +4 -4
- package/dist/{threeViewerHost-DsgqzamS.cjs → threeViewerHost-krP0Lb0-.cjs} +1 -1
- package/dist/{urdfTree-CgNDwBy9.js → urdfTree-CQQPUmyr.js} +1 -1
- package/dist/{urdfTree-dEVNThOD.cjs → urdfTree-CcC8aW11.cjs} +1 -1
- package/dist/{workpieceTreePanel-DaS5Cegv.js → workpieceTreePanel-B6x641Qw.js} +4 -4
- package/dist/{workpieceTreePanel-N0OTMZ1G.cjs → workpieceTreePanel-Bm8mjA8R.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BcAmPr1D.js +0 -3112
- package/dist/index-DcJzP_x9.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_1_lang-DsHyjhmo.cjs +0 -3
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const bn=require("./index-DcJzP_x9.cjs"),e=require("vue"),v=require("./index-BP07Gnjo.cjs"),St=require("./index-DSc4zqmL.cjs"),Se=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bamq-CWP.cjs"),Xt=require("./index-Dm9WJT36.cjs"),Io=require("./threeViewerHost-DsgqzamS.cjs"),$t=require("./index-By--71sB.cjs"),zt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-DKZ1g7Pn.cjs"),No=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ao=require("./index-D67gjfOO.cjs"),gr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-BEvGe7qR.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),yn=require("./index-9hspBVrQ.cjs"),xn=require("./index-mjz9Da8Y.cjs");var $l=/\s/;function jl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var Kl=/^\s+/;function Ul(n){return n&&n.slice(0,jl(n)+1).replace(Kl,"")}var Vo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function Oo(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Vo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Vo:+n}var ro=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,b,g,f,x=0,_=!1,V=!1,R=!0;if(typeof n!="function")throw new TypeError(Xl);i=Oo(i)||0,v.isObject(s)&&(_=!!s.leading,V="maxWait"in s,u=V?Yl(Oo(s.maxWait)||0,i):u,R="trailing"in s?!!s.trailing:R);function Z(B){var E=r,ye=d;return r=d=void 0,x=B,b=n.apply(ye,E),b}function O(B){return x=B,g=setTimeout(K,i),_?Z(B):b}function ke(B){var E=B-f,ye=B-x,Xe=i-E;return V?Jl(Xe,u-ye):Xe}function Y(B){var E=B-f,ye=B-x;return f===void 0||E>=i||E<0||V&&ye>=u}function K(){var B=ro();if(Y(B))return ie(B);g=setTimeout(K,ke(B))}function ie(B){return g=void 0,R&&r?Z(B):(r=d=void 0,b)}function D(){g!==void 0&&clearTimeout(g),x=0,r=f=d=g=void 0}function $(){return g===void 0?b:ie(ro())}function y(){var B=ro(),E=Y(B);if(r=arguments,d=this,f=B,E){if(g===void 0)return O(f);if(V)return clearTimeout(g),g=setTimeout(K,i),Z(f)}return g===void 0&&(g=setTimeout(K,i)),b}return y.cancel=D,y.flush=$,y}var Zl="[object Boolean]";function mr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function yr(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__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(n,{emit:i}){const s=()=>{b.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var L;const S=(L=nt.value)==null?void 0:L.split("/");return(S==null?void 0:S.some(de=>(de==null?void 0:de.includes("updateLoading"))||(de==null?void 0:de.includes("loading"))))?!1:$e.value==="view"});const d=i,u=e.ref([]),b=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:x}=Io.useThreeSystem(),_=e.ref(),V=e.ref(!1),R=e.ref(!1),Z=e.ref([]),O=e.ref(),ke=e.ref(!1),Y=e.ref([]),K=bn.useFormToTableComp(v.pinia),ie=bn.useFormComp(v.pinia),D=e.ref(!1),$=e.ref(),y=v.useLoginState(v.pinia),{loginUserInfo:B}=v.storeToRefs(y),E=e.ref(),ye=e.ref(!0),Xe=$t.useModelComp(v.pinia),{tableViewContents:it,itemData:Ne,isEdit:$e,routeToChildPath:_e,lockingPage:A}=v.storeToRefs(Xe),te=e.ref(null),ce=e.ref(!1),ge=e.ref(!1),Ye=$t.useMenuState(),{activeMenuPath:nt}=v.storeToRefs(Ye),ee=Se.useOriginalState(v.pinia),{originalPath:z}=v.storeToRefs(ee),be=e.ref([]),xe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Fe=async S=>{ge.value=S,await fe("disabled",null,S,!0)},Oe=async S=>{await fe("operable",null,S,!0)};e.watch(()=>nt.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Ze=()=>{e.nextTick(()=>{J()})},qe=S=>{var G;u.value=(G=u.value)==null?void 0:G.map(L=>({...L,isFormColHidden:!(S!=null&&S.includes(L.label))}))};e.onUnmounted(()=>{te.value=null});const me=S=>{d("clickTrigger",S)},F=async S=>{var G,L,de,H,P,Ee;if(S===""){let oe="";(G=u.value)==null||G.forEach(ve=>{ve!=null&&ve.isMain&&(oe=ve==null?void 0:ve.value)});let X=await Se.getItemData(_e.value,sessionStorage.getItem("systemKey"),"");oe=((Ee=(P=(H=(de=(L=X==null?void 0:X[0])==null?void 0:L.compData)==null?void 0:de.find(ve=>(ve==null?void 0:ve.key)==="mainRouters"))==null?void 0:H.contents)==null?void 0:P[0])==null?void 0:Ee.routerContent)+z.value+oe;let q=await Se.getItemData(oe,sessionStorage.getItem("systemKey"),"");ke.value=!0,Y.value=q==null?void 0:q.filter(ve=>(ve==null?void 0:ve.comp)!=="methodButton"),d("routeUrl",Y.value)}},J=()=>{var G;const S=(G=te.value)==null?void 0:G.$el;S&&Se.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:L=>{const{oldIndex:de,newIndex:H}=L;if(de===H)return;const P=u.value.splice(de,1)[0];u.value.splice(H,0,P)}})},fe=async(S,G,L,de=!1)=>{var H,P,Ee,oe,X,ne,q,ve;try{Xe.setRefreshCurStructure(!1);const he=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((H=he==null?void 0:he.data)==null?void 0:H.code)===200){let we=(X=(oe=(Ee=(P=he==null?void 0:he.data)==null?void 0:P.result)==null?void 0:Ee[0])==null?void 0:oe.value)==null?void 0:X.pageData;de?we={...we,compData:(q=we==null?void 0:we.compData)==null?void 0:q.map(De=>{var ue;return(De==null?void 0:De.key)==="formContent"?{...De,contents:(ue=De==null?void 0:De.contents)==null?void 0:ue.map(Ae=>({...Ae,[S]:L}))}:De})}:we={...we,compData:(ne=we==null?void 0:we.compData)==null?void 0:ne.map(De=>{var ue;return(De==null?void 0:De.key)==="formContent"?{...De,contents:(ue=De==null?void 0:De.contents)==null?void 0:ue.map(Ae=>(Ae==null?void 0:Ae.prop)===(G==null?void 0:G.prop)?{...Ae,[S]:L}:Ae)}:De})};const j=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:we}});((ve=j==null?void 0:j.data)==null?void 0:ve.code)===200?(v.ElMessage.success("编辑成功"),Xe.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},pe=async(S,G)=>{await fe("label",G,S)},Q=async(S,G)=>{S&&await fe("type",G,S)},re=async(S,G,L)=>{await fe(G,L,S,!1)},ae=(S,G)=>{E.value===G?ye.value=!1:ye.value=!0,E.value=G==null?void 0:G.changeProp},se=async S=>{var L,de,H,P,Ee,oe,X,ne,q,ve,he,we,j,De,ue;let G=[];if((L=S==null?void 0:S.toString())!=null&&L.includes(".urdf")){if(S.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:x(S)}],g.value=!0,b.value=!0;return}if((de=S==null?void 0:S.toString())!=null&&de.includes(".stl")||(H=S==null?void 0:S.toString())!=null&&H.includes(".STL")||(P=S==null?void 0:S.toString())!=null&&P.includes(".obj")||(Ee=S==null?void 0:S.toString())!=null&&Ee.includes(".mtl")){const Qe=((oe=S==null?void 0:S.toString())==null?void 0:oe.split(",")).map(We=>({url:We,extension:x(We)}));f.value=Qe,g.value=!1,b.value=!0;return}if((X=S==null?void 0:S.toString())!=null&&X.includes(".stl")||(ne=S==null?void 0:S.toString())!=null&&ne.includes(".STL")||(q=S==null?void 0:S.toString())!=null&&q.includes(".obj")||(ve=S==null?void 0:S.toString())!=null&&ve.includes(".mtl")){let Ae,Qe=[],We={};if(Array.isArray(S)?Ae=S:Ae=S==null?void 0:S.split(","),Ae==null||Ae.forEach(rt=>{rt.includes(".mtl")?Qe.push(rt):We.blob=We.blob?We.blob+","+rt:rt}),(Qe==null?void 0:Qe.length)>0&&(We.mtlBlobs=Qe),(we=(he=Object.values(We))==null?void 0:he[0])!=null&&we.includes("http:"))G.push(We);else{const rt=new Blob([We.blob],{type:"application/octet-stream;charset=UTF-8"});let Re=URL.createObjectURL(rt),gt="";(j=S==null?void 0:S.split("/"))==null||j.forEach((tt,et)=>{var Be;et===((Be=S==null?void 0:S.split("/"))==null?void 0:Be.length)-1&&(gt=tt)}),(De=We.blob)!=null&&De.includes(".stl")&&(gt=(gt==null?void 0:gt.replaceAll(">",""))+".urdf"),O.value=[{name:gt,blobUrl:Re}],R.value=!0}}else{const Ae=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Qe=await v.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ae.close()}),We=new Blob([Qe.data],{type:"application/octet-stream;charset=UTF-8"});let rt=URL.createObjectURL(We),Re="";(ue=S==null?void 0:S.split("/"))==null||ue.forEach((gt,tt)=>{var et;tt===((et=S==null?void 0:S.split("/"))==null?void 0:et.length)-1&&(Re=gt)}),O.value=[{name:Re,blobUrl:rt}],R.value=!0}(G==null?void 0:G.length)>0&&ie.setBlobUrls(G)},Me=()=>{R.value=!1},ot=S=>{var P,Ee,oe,X;const G=(Ee=(P=v.cloneDeep(r.itemData))==null?void 0:P.find(ne=>(ne==null?void 0:ne.key)==="formContent"))==null?void 0:Ee.contents,L=v.cloneDeep(S.content);let de={};L&&((oe=Object.values(L))==null?void 0:oe.length)>0&&((X=Object.values(L))==null||X.forEach((ne,q)=>{de[G[q].key]=ne}));const H={content:de,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",H)},h=e.computed(()=>"http://222.92.178.198:62001"),C=async S=>{var he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et,Be,He,xt;if(!S)return;(we=(he=r==null?void 0:r.itemData)==null?void 0:he.find(ze=>(ze==null?void 0:ze.key)==="parentFormPath"))==null||we.contents;let G=it.value;(G==null?void 0:G.length)>0&&(G=G==null?void 0:G.map(ze=>{var je,Ke,M,Te;let Le=(je=ze==null?void 0:ze.key)==null?void 0:je.split("/");return(r==null?void 0:r.compName)===(Le==null?void 0:Le[0])&&(Ke=u.value)!=null&&Ke.find(at=>(at==null?void 0:at.prop)===(Le==null?void 0:Le[1]))&&(ze.value=(Te=(M=u.value)==null?void 0:M.find(at=>(at==null?void 0:at.prop)===(Le==null?void 0:Le[1])))==null?void 0:Te.value),ze}),Xe.setTableViewContents(G));const L=v.cloneDeep(r.itemData);let de=L==null?void 0:L.map(ze=>{var Le;return(ze==null?void 0:ze.key)==="formContent"&&((Le=ze.contents)==null||Le.map((je,Ke)=>{var M,Te,at,Ve,Ge,Ie,dt,ut,st,ft,yt,Nt,Rt,Vt,_t,Lt,kt,Ht,Yt;return je.type=(Te=(M=u.value)==null?void 0:M.find(Ot=>(Ot==null?void 0:Ot.prop)===(je==null?void 0:je.prop)))==null?void 0:Te.type,je.options=je!=null&&je.options?je.options:((Ge=(Ve=(at=je==null?void 0:je.key)==null?void 0:at.split("$"))==null?void 0:Ve[1])==null?void 0:Ge.length)>0?(st=(ut=bn.formGetOptions((dt=(Ie=je==null?void 0:je.key)==null?void 0:Ie.split("$"))==null?void 0:dt[1]))==null?void 0:ut.split(","))==null?void 0:st.map(Ot=>({label:Ot,value:Ot})):[],(ft=je==null?void 0:je.key)!=null&&ft.includes("$")&&(je.key=(Nt=(yt=je==null?void 0:je.key)==null?void 0:yt.split("$"))==null?void 0:Nt[0]),je.signature=(Vt=(Rt=u.value)==null?void 0:Rt.find(Ot=>(Ot==null?void 0:Ot.prop)===(je==null?void 0:je.prop)))==null?void 0:Vt.signature,je.isLoginUser=(Lt=(_t=u.value)==null?void 0:_t.find(Ot=>(Ot==null?void 0:Ot.prop)===(je==null?void 0:je.prop)))==null?void 0:Lt.isLoginUser,je.value=(kt=Object.values(S))==null?void 0:kt[Ke],je.isFormColHidden=(Yt=(Ht=u.value)==null?void 0:Ht.find(Ot=>(Ot==null?void 0:Ot.prop)===(je==null?void 0:je.prop)))==null?void 0:Yt.isFormColHidden,je})),ze}),H=u.value,P=(De=(j=v.cloneDeep(de))==null?void 0:j.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:De.contents;if(H=H==null?void 0:H.map(ze=>{var Le;return ze.value=(Le=P==null?void 0:P.find((je,Ke)=>((je==null?void 0:je.id)??Ke)===(ze==null?void 0:ze.id)))==null?void 0:Le.value,ze}),!ye.value){d("contentChange",{contents:de,index:r.index});return}let Ee="",oe=(Qe=(Ae=(ue=v.cloneDeep(de))==null?void 0:ue.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:Ae.contents)==null?void 0:Qe.find((ze,Le)=>{var je,Ke,M;return(ze==null?void 0:ze.label)===E.value||Le.toString()===((M=(Ke=(je=E.value)==null?void 0:je.split("t"))==null?void 0:Ke[1])==null?void 0:M.toString())}),X=(We=oe==null?void 0:oe.optionUrl)==null?void 0:We.menuSelect,ne=!0;if((gt=(Re=(rt=v.cloneDeep(de))==null?void 0:rt.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:Re.contents)==null||gt.forEach(ze=>{var Le,je,Ke,M,Te,at;ne&&((Ke=(je=(Le=ze==null?void 0:ze.optionUrl)==null?void 0:Le.groupSelect)==null?void 0:je[1])!=null&&Ke.includes("["))&&(Ee=(Te=(M=ze==null?void 0:ze.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Te[1],JSON.stringify(X)===JSON.stringify((at=ze==null?void 0:ze.optionUrl)==null?void 0:at.menuSelect)&&(ne=!1))}),(tt=oe==null?void 0:oe.optionUrl)!=null&&tt.menuSelect&&ye.value){let ze=await bn.getSelectRow(oe),Le,je=(et=oe==null?void 0:oe.optionUrl)==null?void 0:et.menuSelect;if(ze==null||ze.forEach(Ke=>{var M,Te,at,Ve,Ge,Ie,dt,ut,st,ft;Ee===((Te=(M=oe==null?void 0:oe.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Te[1])&&((Ge=(Ve=(at=oe==null?void 0:oe.optionUrl)==null?void 0:at.groupSelect)==null?void 0:Ve[1])!=null&&Ge.includes("["))&&((ft=v.cloneDeep(Ke))==null?void 0:ft[(st=(ut=(dt=(Ie=oe==null?void 0:oe.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:dt[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])===(oe==null?void 0:oe.value)&&(Le=Ke)}),Le){let Ke=v.cloneDeep(H);Ke=Ke==null?void 0:Ke.map(Te=>{var at,Ve,Ge,Ie,dt,ut,st,ft,yt,Nt,Rt;return(Le!=null&&Le[Te==null?void 0:Te.label]||Le!=null&&Le[(Ie=(Ge=(Ve=(at=Te==null?void 0:Te.optionUrl)==null?void 0:at.groupSelect)==null?void 0:Ve[1])==null?void 0:Ge.replaceAll("[",""))==null?void 0:Ie.replaceAll("]","")])&&((st=(ut=(dt=Te==null?void 0:Te.optionUrl)==null?void 0:dt.groupSelect)==null?void 0:ut[1])!=null&&st.includes("["))&&je!=null&&je.every(Vt=>{var _t,Lt;return(Lt=(_t=Te==null?void 0:Te.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:Lt.includes(Vt)})&&(Te.value=(Le==null?void 0:Le[Te==null?void 0:Te.label])||(Le==null?void 0:Le[(Rt=(Nt=(yt=(ft=Te==null?void 0:Te.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:yt[1])==null?void 0:Nt.replaceAll("[",""))==null?void 0:Rt.replaceAll("]","")]),Array.isArray(Te.value)&&Te.value.every(Vt=>(Vt==null?void 0:Vt.url)&&(Vt==null?void 0:Vt.name))&&(Te.type="Upload")),Te}),Ke=Ke==null?void 0:Ke.map(Te=>{var at,Ve,Ge;return(at=Te==null?void 0:Te.optionUrl)!=null&&at.oldMenuSelect&&(Te.optionUrl.menuSelect=(Ge=(Ve=v.cloneDeep(Te))==null?void 0:Ve.optionUrl)==null?void 0:Ge.oldMenuSelect),Te}),u.value=v.cloneDeep(Ke);let M=v.cloneDeep(Ke);M=M==null?void 0:M.map(Te=>{var at,Ve,Ge,Ie,dt,ut;return(Ve=(at=Te==null?void 0:Te.optionUrl)==null?void 0:at.menuSelect)!=null&&Ve.some(st=>st==null?void 0:st.includes("["))&&(Te.optionUrl.oldMenuSelect=(Ie=(Ge=v.cloneDeep(Te))==null?void 0:Ge.optionUrl)==null?void 0:Ie.menuSelect,Te.optionUrl.menuSelect=(ut=(dt=Te==null?void 0:Te.optionUrl)==null?void 0:dt.menuSelect)==null?void 0:ut.map(st=>{var ft,yt,Nt,Rt;if(st!=null&&st.includes("[")){let Vt=(yt=(ft=st==null?void 0:st.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:yt[1];st=(Rt=(Nt=v.cloneDeep(Ke))==null?void 0:Nt.find(_t=>(_t==null?void 0:_t.label)===Vt))==null?void 0:Rt.value}return st})),Te}),u.value=M}else u.value=H;de=de==null?void 0:de.map(Ke=>{var M;return(Ke==null?void 0:Ke.key)==="formContent"&&(Ke.contents=(M=Ke.contents)==null?void 0:M.map(Te=>{var at,Ve,Ge,Ie;return Te.value=((Ve=(at=u.value)==null?void 0:at.find(dt=>(dt==null?void 0:dt.label)===(Te==null?void 0:Te.key)))==null?void 0:Ve.value)??(Te==null?void 0:Te.value),Te.type=((Ie=(Ge=u.value)==null?void 0:Ge.find(dt=>(dt==null?void 0:dt.prop)===(Te==null?void 0:Te.key)))==null?void 0:Ie.type)??(Te==null?void 0:Te.type),Te})),Ke})}ye.value=!1,d("contentChange",{contents:de,index:r.index});let q=[],ve=[];if((He=v.cloneDeep((Be=de==null?void 0:de.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:Be.contents))==null||He.forEach(ze=>{var Le;Array.isArray(ze==null?void 0:ze.value)&&((Le=ze==null?void 0:ze.value)!=null&&Le.find(je=>{var Ke;return(Ke=je==null?void 0:je.url)==null?void 0:Ke.includes(".obj")}))&&(ve=ze==null?void 0:ze.value)}),(ve==null?void 0:ve.length)>0){const ze=(xt=v.cloneDeep(ve))==null?void 0:xt.filter(Le=>{var je;return(je=Le==null?void 0:Le.url)==null?void 0:je.includes(".obj")});ze==null||ze.forEach(Le=>{var Ke,M,Te,at;const je=(Ke=ve==null?void 0:ve.filter(Ve=>{var Ge;return(Ve==null?void 0:Ve.name)===(Le==null?void 0:Le.name)&&((Ge=Ve==null?void 0:Ve.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:Ke.map(Ve=>Ve==null?void 0:Ve.url);q.push({objUrl:Le==null?void 0:Le.url,mtlUrls:((M=ve==null?void 0:ve.filter(Ve=>{var Ge;return(Ve==null?void 0:Ve.name)===(Le==null?void 0:Le.name)&&((Ge=Ve==null?void 0:Ve.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:M.length)===1?(at=(Te=ve==null?void 0:ve.filter(Ve=>{var Ge;return(Ve==null?void 0:Ve.name)===(Le==null?void 0:Le.name)&&((Ge=Ve==null?void 0:Ve.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:Te[0])==null?void 0:at.url:je})}),ie.setObjUrl(q)}},I=S=>{if(!S)return;const G=[];let L="";for(let de of S)(de.includes("[")||L.includes("["))&&(L+=de.trim(),v.cloneDeep(L).split("【").length-1===v.cloneDeep(L).split("】").length-1&&v.cloneDeep(L).split("[").length-1===v.cloneDeep(L).split("]").length-1&&(G.push(L.replace(/\/\*[\s\S]*?\*\//g,"")),L=""));return G},W=(S,G,L)=>{let de="";const H=G==null?void 0:G.map(P=>{var Ee;return(Ee=P==null?void 0:P.value)==null?void 0:Ee.pageData});return H==null||H.forEach(P=>{var Ee;(P==null?void 0:P.name)===(S==null?void 0:S[0])&&((Ee=P==null?void 0:P.compData)==null||Ee.forEach(oe=>{var X;(oe==null?void 0:oe.key)==="formContent"&&((X=oe==null?void 0:oe.contents)==null||X.forEach(ne=>{var q;(ne==null?void 0:ne.prop)===(S==null?void 0:S[1])&&(de=(ne==null?void 0:ne.value)===""?Se.judgeContents((q=v.cloneDeep(ne))==null?void 0:q.optionUrl,L):ne==null?void 0:ne.value)}))}))}),de},w=(S,G,L,de)=>{var oe,X;let H="",P="";(oe=v.cloneDeep(G))==null||oe.forEach((ne,q)=>{ne!=null&&ne.includes("[")?P=P+z.value+S[q]:P=P===""?P+ne:P+"/"+ne});let Ee=(X=de[P])==null?void 0:X.map(ne=>{var q;return(q=ne==null?void 0:ne.value)==null?void 0:q.pageData});return Ee==null||Ee.forEach(ne=>{var q;(ne==null?void 0:ne.name)===(L==null?void 0:L[0])&&((q=ne==null?void 0:ne.compData)==null||q.forEach(ve=>{var he;(ve==null?void 0:ve.key)==="formContent"&&((he=ve==null?void 0:ve.contents)==null||he.forEach(we=>{(we==null?void 0:we.prop)===(L==null?void 0:L[1])&&(H=we==null?void 0:we.value)}))}))}),H};return e.watch(()=>r.itemData,async()=>{var Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et;const S=(Ee=r.itemData)==null?void 0:Ee.find(Be=>(Be==null?void 0:Be.key)==="formContent"),G=(oe=v.cloneDeep(r.itemData))==null?void 0:oe.find(Be=>(Be==null?void 0:Be.key)==="formButton"),L=(X=v.cloneDeep(r.itemData))==null?void 0:X.find(Be=>(Be==null?void 0:Be.key)==="formFlex"),de=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(Be=>(Be==null?void 0:Be.key)==="formWrap"),H=(q=v.cloneDeep(r.itemData))==null?void 0:q.find(Be=>(Be==null?void 0:Be.key)==="enableWrap");if((de==null?void 0:de.contents)==="纵向"?V.value=!1:V.value=!0,D.value=(H==null?void 0:H.contents)===void 0?!1:H==null?void 0:H.contents,$.value=typeof(L==null?void 0:L.contents)!="boolean"?!(!(L!=null&&L.contents)===""||((ve=L==null?void 0:L.contents)==null?void 0:ve.toUpperCase())==="VERTICAL"):L==null?void 0:L.contents,((he=S==null?void 0:S.contents)==null?void 0:he.length)>0&&Array.isArray(S==null?void 0:S.contents)){let Be=r.allMapContents;const He=(j=(we=v.cloneDeep(S))==null?void 0:we.contents)==null?void 0:j.map((M,Te)=>{var Vt,_t,Lt,kt,Ht,Yt,Ot,Aa,wa,Va,ja,Da,Ka,Ca,Ua,Wa,Ha,qa,Ga,Oa,ba,fa,_a,ka,na,ga,Xa;let at=(M==null?void 0:M.label)??(M==null?void 0:M.key)??"",Ve=(M==null?void 0:M.type)??"",Ge=(M==null?void 0:M.options)??[];if((Vt=M==null?void 0:M.key)!=null&&Vt.includes("$")&&(at=(_t=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:_t[0],((kt=(Lt=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Lt[1])==null?void 0:kt.length)>0)){const[wt,Zt]=(Yt=(Ht=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Ht[1])==null?void 0:Yt.split(/[()]/);Ve=((Ot=Se.FormType.find(mt=>(mt==null?void 0:mt.key)===wt))==null?void 0:Ot.value)??"",((Aa=Zt==null?void 0:Zt.split(","))==null?void 0:Aa.length)>0&&(Ge=(wa=Zt==null?void 0:Zt.split(","))==null?void 0:wa.map(mt=>({label:mt,value:mt})))}let Ie=[];M!=null&&M.contents&&!Array.isArray(M==null?void 0:M.contents)&&(Ie=(ja=(Va=M==null?void 0:M.contents)==null?void 0:Va.split(","))==null?void 0:ja.map(wt=>({label:wt,value:wt}))),((Da=M==null?void 0:M.optionUrl)==null?void 0:Da.selectRelateType)==="自定义绑定"&&(Ie=(Ca=(Ka=M==null?void 0:M.optionUrl)==null?void 0:Ka.defaultSelect)==null?void 0:Ca.map(wt=>({label:wt,value:wt})));let dt=!1,ut=(M==null?void 0:M.isFormColHidden)??!1,st=Se.judgeContents((Ua=v.cloneDeep(M))==null?void 0:Ua.optionUrl,Be),ft=st!==void 0&&st!==""?st:M!=null&&M.originalContent&&(M==null?void 0:M.originalContent)!==""?M.originalContent:M!=null&&M.value?M.value:(Ge==null?void 0:Ge.length)>0?(Wa=Ge==null?void 0:Ge[0])==null?void 0:Wa.value:(M==null?void 0:M.value)??"",yt=!1,Nt=st!==void 0||Ve===""?"Input":Ve;if((Array.isArray(st)&&(st!=null&&st.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url))))&&(Nt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||M!=null&&M.isLoginUser)dt=!0,ft=((Ha=B.value)==null?void 0:Ha.姓名)||((qa=B.value)==null?void 0:qa.account)||((Ga=B.value)==null?void 0:Ga.账号)||((Oa=B.value)==null?void 0:Oa.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||M!=null&&M.signature||M!=null&&M.isShow)if(yt=!0,(M==null?void 0:M.isShow)==="originalSignature")Nt="image",ft=h.value+"/"+((ba=B.value)==null?void 0:ba.signature);else{let wt=[...new Set(I(M.isShow))].map(Mt=>{var Ea,oa,ma,Qt;return{key:(Qt=(ma=(oa=(Ea=Mt==null?void 0:Mt.split("["))==null?void 0:Ea[1])==null?void 0:oa.split("]"))==null?void 0:ma[0])==null?void 0:Qt.split(":"),value:""}});(fa=Ne.value)==null||fa.forEach(Mt=>{wt==null||wt.forEach((ca,Ea)=>{var ma;let oa=ca==null?void 0:ca.key;(Mt==null?void 0:Mt.name)===(oa==null?void 0:oa[0].replaceAll("'",""))&&((ma=Mt==null?void 0:Mt.compData)==null||ma.forEach(Qt=>{var Ma;(Qt==null?void 0:Qt.key)==="formContent"&&((Ma=Qt==null?void 0:Qt.contents)==null||Ma.forEach(Tt=>{(Tt==null?void 0:Tt.prop)===(oa==null?void 0:oa[1].replaceAll("'",""))&&(wt[Ea].value=Tt==null?void 0:Tt.value)}))}))})});let Zt=wt==null?void 0:wt.map(Mt=>{var ca;return Mt.key="["+((ca=Mt.key)==null?void 0:ca.join(":"))+"]",Mt}),mt=M==null?void 0:M.isShow;Zt==null||Zt.forEach(Mt=>{Mt!=null&&Mt.value?mt=mt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):mt=mt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),mt!=null&&mt.includes("(")||(mt!=null&&mt.includes("==")?mt=((_a=mt==null?void 0:mt.split("==="))==null?void 0:_a[0])+"==='"+((ka=mt==null?void 0:mt.split("==="))==null?void 0:ka[1])+"'":mt=((na=mt==null?void 0:mt.split("="))==null?void 0:na[0])+"='"+((ga=mt==null?void 0:mt.split("="))==null?void 0:ga[1])+"'"),mt!=null&&mt.includes("=")&&!(mt!=null&&mt.includes("=="))&&!(mt!=null&&mt.includes("==="))&&(mt=mt==null?void 0:mt.replaceAll("=","==")),new Function(`if (${mt}) { return true } else { return false }`)()?(ut=!1,Nt="image",ft=h.value+"/"+((Xa=B.value)==null?void 0:Xa.signature)):ft=""}return Array.isArray(ft)&&ft.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(M.type="Upload"),M!=null&&M.isMainUrl&&(Nt="Url"),{label:at??"",name:"t"+Te,prop:v.cloneDeep(M==null?void 0:M.key),type:Nt,value:M!=null&&M.isNewDate&&ft===""?new Date:ft,id:(M==null?void 0:M.id)??Te,contents:(Ie==null?void 0:Ie.length)>0?Ie:Ge??[],width:(M==null?void 0:M.width)??1,isLoginUser:dt,config:M==null?void 0:M.config,optionUrl:(M==null?void 0:M.optionUrl)??M,isFormColHidden:ut,signature:yt,isMain:M==null?void 0:M.isMain,isMainUrl:M==null?void 0:M.isMainUrl,operable:(M==null?void 0:M.operable)??!1,disabled:(M==null?void 0:M.disabled)??!1}}),xt=He==null?void 0:He.map(M=>M==null?void 0:M.value);let ze="";xt==null||xt.forEach(M=>{M!==""&&M!==void 0&&(ze=ze===""?M:ze+"/"+M)}),K.setSelectArray(xt),K.setSelectString(ze);let Le=(De=v.cloneDeep(He))==null?void 0:De.map(M=>(M!=null&&M.value&&Se.IsJson(M==null?void 0:M.value)&&Array.isArray(JSON.parse(M==null?void 0:M.value))&&(M.value=JSON.parse(M.value)),M));Le=Le==null?void 0:Le.map(M=>{var Te,at,Ve,Ge,Ie,dt,ut,st;if((at=(Te=M==null?void 0:M.optionUrl)==null?void 0:Te.menuSelect)!=null&&at.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";M.optionUrl.oldMenuSelect=(Ge=(Ve=v.cloneDeep(M))==null?void 0:Ve.optionUrl)==null?void 0:Ge.menuSelect,M.optionUrl.menuSelect=(dt=(Ie=M==null?void 0:M.optionUrl)==null?void 0:Ie.menuSelect)==null?void 0:dt.map(yt=>{var Nt,Rt,Vt,_t,Lt,kt;if(yt!=null&&yt.includes("[")){let Ht=(Rt=(Nt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Nt.split(":"))==null?void 0:Rt[1];ft=W((Vt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Vt.split(":"),Be==null?void 0:Be[nt.value],Be),yt=((Lt=(_t=v.cloneDeep(Le))==null?void 0:_t.find(Yt=>(Yt==null?void 0:Yt.label)===Ht))==null?void 0:Lt.value)||W((kt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:kt.split(":"),Be==null?void 0:Be[nt.value],Be)}return yt}),ft!==""&&M.value===""&&(M.value=w(M.optionUrl.menuSelect,M.optionUrl.oldMenuSelect,(ut=M==null?void 0:M.optionUrl)==null?void 0:ut.groupSelect,Be),Array.isArray(M.value)&&((st=M.value)!=null&&st.every(yt=>yt==null?void 0:yt.url))&&(M.type="UPLOAD"))}return M}),u.value=Le,ge.value=((ue=u.value)==null?void 0:ue.every(M=>M==null?void 0:M.disabled))||A.value===nt.value,ce.value=(Ae=u.value)==null?void 0:Ae.every(M=>M==null?void 0:M.operable),be.value=(Qe=u.value)==null?void 0:Qe.map(M=>M==null?void 0:M.label);let je=[],Ke=[];if((We=v.cloneDeep(u.value))==null||We.forEach(M=>{var Te;Array.isArray(M==null?void 0:M.value)&&((Te=M==null?void 0:M.value)!=null&&Te.find(at=>{var Ve;return(Ve=at==null?void 0:at.url)==null?void 0:Ve.includes(".obj")}))&&(Ke=M==null?void 0:M.value)}),(Ke==null?void 0:Ke.length)>0){const M=(rt=v.cloneDeep(Ke))==null?void 0:rt.filter(Te=>{var at;return(at=Te==null?void 0:Te.url)==null?void 0:at.includes(".obj")});M==null||M.forEach(Te=>{var Ve,Ge,Ie,dt;const at=(Ve=Ke==null?void 0:Ke.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Te==null?void 0:Te.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Ve.map(ut=>ut==null?void 0:ut.url);je.push({objUrl:Te==null?void 0:Te.url,mtlUrls:((Ge=Ke==null?void 0:Ke.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Te==null?void 0:Te.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Ge.length)===1?(dt=(Ie=Ke==null?void 0:Ke.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Te==null?void 0:Te.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Ie[0])==null?void 0:dt.url:at})}),ie.setObjUrl(je)}(Re=v.cloneDeep(u.value))==null||Re.forEach(M=>{var Te,at,Ve,Ge,Ie,dt,ut,st,ft,yt,Nt,Rt,Vt;if((at=(Te=M==null?void 0:M.value)==null?void 0:Te.toString())!=null&&at.includes(".stl")||(Ge=(Ve=M==null?void 0:M.value)==null?void 0:Ve.toString())!=null&&Ge.includes(".STL")||(dt=(Ie=M==null?void 0:M.value)==null?void 0:Ie.toString())!=null&&dt.includes(".obj")||(st=(ut=M==null?void 0:M.value)==null?void 0:ut.toString())!=null&&st.includes(".mtl")||(yt=(ft=M==null?void 0:M.value)==null?void 0:ft.toString())!=null&&yt.includes(".urdf")){let _t={},Lt=[],kt;Array.isArray(M==null?void 0:M.value)?kt=M==null?void 0:M.value:kt=(Nt=M==null?void 0:M.value)==null?void 0:Nt.split(","),kt==null||kt.forEach(Ht=>{Ht.includes(".mtl")?Lt.push(Ht):_t.blob=_t.blob==="undefined"?Ht:_t.blob+","+Ht}),(Lt==null?void 0:Lt.length)>0&&(_t.mtlBlobs=Lt),(Vt=(Rt=Object.values(_t))==null?void 0:Rt[0])!=null&&Vt.includes("http:")}})}else u.value=[];let P=it.value;if((P==null?void 0:P.length)>0&&(P=P==null?void 0:P.map(Be=>{var xt,ze,Le,je;let He=(xt=Be==null?void 0:Be.key)==null?void 0:xt.split("/");return(r==null?void 0:r.compName)===(He==null?void 0:He[0])&&(ze=u.value)!=null&&ze.find(Ke=>(Ke==null?void 0:Ke.prop)===(He==null?void 0:He[1]))&&(Be.value=(je=(Le=u.value)==null?void 0:Le.find(Ke=>(Ke==null?void 0:Ke.prop)===(He==null?void 0:He[1])))==null?void 0:je.value),Be}),Xe.setTableViewContents(P)),r!=null&&r.formRules)_.value=r==null?void 0:r.formRules;else{let Be={};(gt=v.cloneDeep(u).value)==null||gt.forEach(He=>{(He==null?void 0:He.isMain)===!0&&(Be[(He==null?void 0:He.prop)??(He==null?void 0:He.name)]=[{required:!0,message:`${(He==null?void 0:He.prop)||(He==null?void 0:He.name)}不能为空`}])}),_.value=Be}if(((tt=G==null?void 0:G.contents)==null?void 0:tt.length)>0){const Be=[];(et=G==null?void 0:G.contents)==null||et.forEach((He,xt)=>{(He==null?void 0:He.label)!==""&&Be.push({label:(He==null?void 0:He.label)??"",id:(He==null?void 0:He.id)??xt,type:(He==null?void 0:He.type)??"",background:He==null?void 0:He.background})}),Z.value=Be}else Z.value=[]},{deep:!0,immediate:!0}),e.watch(()=>A.value,S=>{ge.value=S===nt.value},{immediate:!0}),(S,G)=>{const L=e.resolveComponent("svg-icon"),de=e.resolveComponent("el-switch"),H=e.resolveComponent("el-checkbox"),P=e.resolveComponent("el-popover"),Ee=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(St.ssForm,{rowContents:u.value,formRules:_.value,buttonValue:Z.value,isRowFlex:!1,isEnableWrap:D.value,onOnButtonClick:ot,onChange:C,formDisabled:ge.value,formLabelsOperable:ce.value,isButtonRow:V.value,onPreview:se,onBlurChange:ae,onHandleColEditChange:pe,onHandleColTypeChange:Q,onRouteUrl:F,onClickTrigger:me},{operateCol:e.withCtx(({renderColumns:oe,formDisabled:X,formLabelsOperable:ne})=>[e.createVNode(P,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ze},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode(L,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[G[1]||(G[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(de,{"model-value":X,"active-text":"禁用","inactive-text":"",onChange:Fe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(de,{"model-value":ne,"active-text":"编辑所有标签","inactive-text":"",onChange:Oe},null,8,["model-value"]),G[2]||(G[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ee,{modelValue:be.value,"onUpdate:modelValue":G[0]||(G[0]=q=>be.value=q),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:te,onChange:qe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe,q=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:q.label},[e.createVNode(H,{value:q.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(q.label),1)]),_:2},1032,["value"]),e.createVNode(P,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(L,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ve;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ve=Object.keys(q))==null?void 0:ve.filter(he=>{var we;return(we=xe.value)==null?void 0:we.find(j=>(j==null?void 0:j.value)===he)}),he=>{var we,j;return e.openBlock(),e.createElementBlock("div",{key:he},[e.createVNode(St._sfc_main$1,{value:q==null?void 0:q[he],"active-text":(j=(we=xe.value)==null?void 0:we.find(De=>(De==null?void 0:De.value)===he))==null?void 0:j.label,inactiveText:"",onChange:De=>re(De,he,q)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(L,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),R.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:O.value,onDestroy:Me},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Io.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=zt._export_sfc(oi,[["__scopeId","data-v-e237c271"]]),$n=e.ref(0),br=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>($n.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$n.value,children:br(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>($n.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$n.value,children:br(r==null?void 0:r.children)},r))},kr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=kr(r==null?void 0:r.children,i),r)),n)},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},Bt=[{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"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],Ia=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Se.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b);e.ref(0);const f=e.ref(""),x=e.ref([]),_=e.ref([]),V=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(B=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:D[B.key],id:g.value,contents:B==null?void 0:B.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},R=D=>{r("fixChange",v.cloneDeep(D))},Z=D=>{r("deleteChange",v.cloneDeep(D))},O=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},ke=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},Y=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(B=>{const E=Bt==null?void 0:Bt.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));E?D[E.key]=B.value:B!=null&&B.children&&B.children.length>0&&(D.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),D.id="id"+g.value,(y=x.value)==null||y.forEach(E=>{const ye=Bt==null?void 0:Bt.find(Xe=>(Xe==null?void 0:Xe.label)===(E==null?void 0:E.label));ye?D[ye.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},K=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},ie=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,$)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(B,E)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(B.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>O(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>V(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>ie(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(Cr,{tableChildContents:B==null?void 0:B.children,onDeleteChange:Z,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:Y},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=zt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Se.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b),f=e.ref(""),x=e.ref([]),_=e.ref([]),V=D=>{r("fixChange",v.cloneDeep(D))},R=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(B=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:D[B.key],id:g.value,contents:B==null?void 0:B.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},Z=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},O=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},ke=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(B=>{const E=Bt==null?void 0:Bt.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));E?D[E.key]=B.value:B!=null&&B.children&&B.children.length>0&&(D.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),D.id="idChild"+g.value,(y=x.value)==null||y.forEach(E=>{const ye=Bt==null?void 0:Bt.find(Xe=>(Xe==null?void 0:Xe.label)===(E==null?void 0:E.label));ye?D[ye.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},Y=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},K=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ie=D=>{r("deleteChange",D)};return(D,$)=>{const y=e.resolveComponent("svg-icon"),B=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(E,ye)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(E.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>Z(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>R(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>K(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:E==null?void 0:E.children,onDeleteChange:ie,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:O},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(B,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(B,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Cr=zt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},zi={class:"fix-content"},Li={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},ji={class:"fix-content-label"},Ki={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(!1),g=e.ref([]),f=e.ref(!1),x=e.ref([]),_=e.ref(!1),V=e.ref([]),R=e.ref(""),Z=e.ref(""),O=e.ref([]),ke=e.ref([]),Y=e.ref([]),K=e.ref([]),ie=e.ref(!1),D=e.ref([]),$=e.ref([]),y=e.ref(0),B=e.ref([]),E=e.ref([]),ye=e.ref([]),Xe=()=>{ie.value=!0;let h=[];Ta==null||Ta.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:C==null?void 0:C.options})}),D.value=h,$.value=h},it=()=>{var C,I,W;b.value=!0;let h=[];(W=(I=(C=Se.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:I.value)==null||W.forEach(w=>{y.value++,h.push({label:w==null?void 0:w.label,name:(w==null?void 0:w.name)||(w==null?void 0:w.label),type:w.type,value:(w==null?void 0:w.label)==="类型"?"Input":"",id:y.value,contents:w==null?void 0:w.options})}),B.value=h,E.value=h},Ne=h=>{h||(B.value=E.value)},$e=async h=>{var C,I,W,w,S,G,L,de,H,P,Ee,oe;if((h==null?void 0:h.类型)!==((I=(C=E.value)==null?void 0:C.find(X=>(X==null?void 0:X.label)==="类型"))==null?void 0:I.value)){let X=[],ne=await((S=(w=(W=Se.FormContent)==null?void 0:W.find(q=>(q==null?void 0:q.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(de=Se.FormContent)==null?void 0:de.find(q=>(q==null?void 0:q.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:H.value)==null?void 0:P.value):(L=(G=Se.FormContent)==null?void 0:G.find(q=>(q==null?void 0:q.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:L.value;if(ne==null||ne.forEach(q=>{y.value++,X.push({label:q==null?void 0:q.label,name:(q==null?void 0:q.name)||(q==null?void 0:q.label),type:q.type,value:q!=null&&q.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[q.label])??"",id:y.value,contents:q==null?void 0:q.options,prop:(q==null?void 0:q.prop)||(q==null?void 0:q.name)||(q==null?void 0:q.label)})}),h!=null&&h.菜单选项&&((Ee=h==null?void 0:h.菜单选项)==null?void 0:Ee.length)>0){const q=await Se.menuToContentType(h==null?void 0:h.菜单选项);X=X==null?void 0:X.map(ve=>((ve==null?void 0:ve.name)==="组信息选项"&&(ve.contents=q),ve))}E.value=await Se.selectToBase(v.cloneDeep(X)),B.value=await Se.selectToBase(v.cloneDeep(X))}else{let X=v.cloneDeep(B.value);if(X=X==null?void 0:X.map(ne=>(ne.value=h==null?void 0:h[ne.name],ne)),h!=null&&h.菜单选项&&((oe=h==null?void 0:h.菜单选项)==null?void 0:oe.length)>0){const ne=await Se.menuToContentType(h==null?void 0:h.菜单选项);X=X==null?void 0:X.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=ne),q))}X=Se.formToOptionsContents(X),E.value=await Se.selectToBase(v.cloneDeep(X))}},_e=async h=>{await $e(h),B.value=E.value},A=(h,C)=>{if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.selectRelateType)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.menuSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.groupSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(C==null?void 0:C.value)||C[h.key];if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=C[h.key];return mr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&C[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!C[h.key]?!1:C[h.key]},te=async h=>{var W,w,S,G,L,de,H,P,Ee;b.value=!0;let C=[];const I=await((S=(w=(W=Se.FormContent)==null?void 0:W.find(oe=>(oe==null?void 0:oe.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(de=Se.FormContent)==null?void 0:de.find(oe=>(oe==null?void 0:oe.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:H.value)==null?void 0:P.value):(L=(G=Se.FormContent)==null?void 0:G.find(oe=>(oe==null?void 0:oe.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:L.value;if(I==null||I.forEach(oe=>{y.value++,C.push({label:oe==null?void 0:oe.label,name:(oe==null?void 0:oe.name)||(oe==null?void 0:oe.label),type:oe.type,value:(oe==null?void 0:oe.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):A(oe,h),id:y.value,contents:oe==null?void 0:oe.options})}),h!=null&&h.menuSelect&&((Ee=h==null?void 0:h.menuSelect)==null?void 0:Ee.length)>0){const oe=await Se.menuToContentType(h==null?void 0:h.menuSelect);C=C==null?void 0:C.map(X=>((X==null?void 0:X.name)==="组信息选项"&&(X.contents=oe),X))}R.value=h==null?void 0:h.id,B.value=await Se.selectToBase(Se.formToOptionsContents(C)),E.value=await Se.selectToBase(Se.formToOptionsContents(C))},ce=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;ye.value=(C=v.cloneDeep(ye.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=ye.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ge=()=>{b.value=!1,B.value=[],R.value=""},Ye=async()=>{var W,w,S,G,L,de,H,P,Ee,oe;B.value=E.value;let h={};R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value);let C=await((S=(w=(W=Se.FormContent)==null?void 0:W.find(X=>{var ne,q;return(X==null?void 0:X.key)===(((q=(ne=B.value)==null?void 0:ne.find(ve=>(ve==null?void 0:ve.label)==="类型"))==null?void 0:q.value)??"label")}))==null?void 0:w.value)==null?void 0:S.value)??((L=(G=Se.FormContent)==null?void 0:G.find(X=>{var ne,q;return(X==null?void 0:X.key)===(((q=(ne=B.value)==null?void 0:ne.find(ve=>(ve==null?void 0:ve.label)==="类型"))==null?void 0:q.value)??"label")}))==null?void 0:L.value);if((de=B.value)==null||de.forEach(X=>{const ne=C==null?void 0:C.find(q=>(q==null?void 0:q.label)===(X==null?void 0:X.label));ne&&(h[ne.key]=X.value)}),h.name=h.label,(H=ye.value)!=null&&H.find(X=>X.id===h.id))ye.value=(P=ye.value)==null?void 0:P.map(X=>(X.id===h.id&&(X=h),X));else{let X=v.cloneDeep(ye.value);ye.value||(ye.value=[]),X.push(h),ye.value=X}ye.value=ye.value.map(({id:X,...ne})=>ne),b.value=!1,R.value="";let I=v.cloneDeep(s.originalItemContents);(Ee=v.cloneDeep(s.originalItemContents))!=null&&Ee.find(X=>(X==null?void 0:X.key)==="tableToForm")?I=(oe=v.cloneDeep(s.originalItemContents))==null?void 0:oe.map(X=>((X==null?void 0:X.key)==="tableToForm"&&(X.contents=ye.value),X)):I.push({key:"tableToForm",contents:ye.value}),r("change",I)},nt=h=>{ie.value=!0;let C=[];Ta==null||Ta.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,D.value=C,$.value=C};e.watch(()=>_.value,()=>{var C,I;let h=v.cloneDeep(s.originalItemContents);(C=v.cloneDeep(s.originalItemContents))!=null&&C.find(W=>(W==null?void 0:W.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="page"&&(W.contents=_.value),W)):h.push({key:"page",contents:_.value}),r("change",h)},{deep:!0});const ee=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;ke.value=(C=v.cloneDeep(ke.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="extraButton"&&(W.contents=ke.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>{var I,W,w,S,G;D.value=$.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(L=>{const de=Ta==null?void 0:Ta.find(H=>(H==null?void 0:H.label)===(L==null?void 0:L.label));de?h[de.key]=L.value:L!=null&&L.children&&L.children.length>0&&(h.children=L.children)}),(W=ke.value)!=null&&W.find(L=>L.id===h.id))ke.value=(w=ke.value)==null?void 0:w.map(L=>(L.id===h.id&&(L=h),L));else{let L=v.cloneDeep(ke.value)??[];L.push(h),ke.value=L}ie.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(L=>(L==null?void 0:L.key)==="extraButton")?C=(G=v.cloneDeep(s.originalItemContents))==null?void 0:G.map(L=>((L==null?void 0:L.key)==="extraButton"&&(L.contents=ke.value),L)):C.push({key:"extraButton",contents:ke.value}),r("change",C)},be=h=>{let C=v.cloneDeep($.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),$.value=C},xe=()=>{ie.value=!1,D.value=[],R.value=""},Fe=h=>{f.value=!0;let C=[];Ia==null||Ia.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,Y.value=C,K.value=C},Oe=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;O.value=(C=v.cloneDeep(O.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="rowButton"&&(W.contents=O.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ze=()=>{u.value=!0;let h=[];Bt==null||Bt.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),x.value=h,V.value=h},qe=()=>{f.value=!0;let h=[];Ia==null||Ia.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),Y.value=h,K.value=h},me=h=>{let C=v.cloneDeep(K.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=C},F=()=>{var I,W,w,S,G;Y.value=K.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=Y.value)==null||I.forEach(L=>{const de=Ia==null?void 0:Ia.find(H=>(H==null?void 0:H.label)===(L==null?void 0:L.label));de?h[de.key]=L.value:L!=null&&L.children&&L.children.length>0&&(h.children=L.children)}),(W=O.value)!=null&&W.find(L=>L.id===h.id))O.value=(w=O.value)==null?void 0:w.map(L=>(L.id===h.id&&(L=h),L));else{let L=v.cloneDeep(O.value);L.push(h),O.value=L}f.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(L=>(L==null?void 0:L.key)==="rowButton")?C=(G=v.cloneDeep(s.originalItemContents))==null?void 0:G.map(L=>((L==null?void 0:L.key)==="rowButton"&&(L.contents=O.value),L)):C.push({key:"rowButton",contents:O.value}),r("change",C)},J=()=>{f.value=!1,R.value="",K.value=[],Y.value=[]},fe=h=>{u.value=!0;let C=[];Bt==null||Bt.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),x.value=C,Z.value=h==null?void 0:h.id,V.value=C},pe=h=>{var C;g.value=kr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(C=v.cloneDeep(s.originalItemContents))==null?void 0:C.map(I=>{var W;return(I==null?void 0:I.key)==="header"&&(I.contents=(W=g.value)!=null&&W.some(w=>w==null?void 0:w.children)?[g.value]:g.value),I}))},Q=h=>{var I,W,w;h.type==="fix"?h.id!==""?g.value=wr(g.value,h):g.value=xr(g.value,h==null?void 0:h.contents):g.value=Dr(g.value,h),g.value=(I=g.value)!=null&&I.some(S=>S==null?void 0:S.children)?[g.value]:g.value,R.value="";let C=v.cloneDeep(s.originalItemContents);(W=v.cloneDeep(s.originalItemContents))!=null&&W.find(S=>(S==null?void 0:S.key)==="header")?C=(w=v.cloneDeep(s.originalItemContents))==null?void 0:w.map(S=>((S==null?void 0:S.key)==="header"&&(S.contents=g.value),S)):C.push({key:"header",contents:g.value}),r("change",C)},re=h=>{var I;u.value=!0;let C=[];Bt==null||Bt.forEach(W=>{y.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:h[W.key],id:y.value,contents:W==null?void 0:W.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&C.push({children:h==null?void 0:h.children,isFormColHidden:!0}),R.value=h==null?void 0:h.id,Z.value="",x.value=C,V.value=C},ae=h=>{let C=v.cloneDeep(V.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),V.value=C},se=()=>{u.value=!1,R.value="",Z.value="",V.value=[]},Me=()=>{var I,W,w,S,G,L;x.value=V.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=x.value)==null||I.forEach(de=>{const H=Bt==null?void 0:Bt.find(P=>(P==null?void 0:P.label)===(de==null?void 0:de.label));H?h[H.key]=de.value:de!=null&&de.children&&de.children.length>0&&(h.children=de.children)}),(W=g.value)!=null&&W.find(de=>de.id===h.id))g.value=(w=g.value)==null?void 0:w.map(de=>(de.id===h.id&&(de=h),de));else{let de=v.cloneDeep(g.value)??[];Z.value===""?de.push(h):de=de==null?void 0:de.map(H=>(H.id===Z.value&&(H.children||(H.children=[]),H.children.push(h)),H)),g.value=de}g.value=(S=g.value)!=null&&S.some(de=>de==null?void 0:de.children)?[g.value]:g.value,u.value=!1,R.value="",Z.value="";let C=v.cloneDeep(s.originalItemContents);(G=v.cloneDeep(s.originalItemContents))!=null&&G.find(de=>(de==null?void 0:de.key)==="header")?C=(L=v.cloneDeep(s.originalItemContents))==null?void 0:L.map(de=>((de==null?void 0:de.key)==="header"&&(de.contents=g.value),de)):C.push({key:"header",contents:g.value}),r("change",C)},ot=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;g.value=(C=v.cloneDeep(g.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>{var w;return(W==null?void 0:W.key)==="header"&&(W.contents=(w=g.value)!=null&&w.some(S=>S==null?void 0:S.children)?[g.value]:g.value),W})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,C,I,W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he,we;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(C=(h=d.value)==null?void 0:h.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:C.contents,O.value=(W=(I=d.value)==null?void 0:I.find(j=>(j==null?void 0:j.key)==="rowButton"))==null?void 0:W.contents,ke.value=(S=(w=d.value)==null?void 0:w.find(j=>(j==null?void 0:j.key)==="extraButton"))==null?void 0:S.contents,_.value=(L=(G=d.value)==null?void 0:G.find(j=>(j==null?void 0:j.key)==="page"))!=null&&L.contents?!!((H=(de=d.value)==null?void 0:de.find(j=>(j==null?void 0:j.key)==="page"))!=null&&H.contents):!1,ye.value=(Ee=(P=d.value)==null?void 0:P.find(j=>(j==null?void 0:j.key)==="tableToForm"))==null?void 0:Ee.contents,g.value=(oe=g.value)==null?void 0:oe.map((j,De)=>(Array.isArray(j)?j=ri(j):j={label:(j==null?void 0:j.label)??"",prop:(j==null?void 0:j.label)==="操作"?"operate":j==null?void 0:j.prop,width:j!=null&&j.width?parseInt(j.width):"",fixed:(j==null?void 0:j.fixed)??void 0,sortable:(j==null?void 0:j.sortable)??!1,align:(j==null?void 0:j.align)??"left",showOverflowTooltip:(j==null?void 0:j.showOverflowTooltip)??!0,isNotDrag:(j==null?void 0:j.isNotDrag)??!1,isEditCol:(j==null?void 0:j.isEditCol)??!1,isOperate:(j==null?void 0:j.isOperate)??!1,id:(j==null?void 0:j.id)??De,formMenuSelect:(j==null?void 0:j.formMenuSelect)??void 0,groupSelect:(j==null?void 0:j.groupSelect)??void 0},j)),g.value=(X=g.value)!=null&&X.every(j=>Array.isArray(j))?(ne=g.value)==null?void 0:ne[0]:g.value,O.value=(q=O.value)==null?void 0:q.map((j,De)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",textColor:(j==null?void 0:j.textColor)??"#000000",id:(j==null?void 0:j.id)??De}),ke.value=(ve=ke.value)==null?void 0:ve.map((j,De)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",background:(j==null?void 0:j.background)??"var(--ssComponent-primary-color)",id:(j==null?void 0:j.id)??De}),ye.value)ye.value=(we=ye.value)==null?void 0:we.map(j=>{y.value++;let De=j;return De.id=y.value,De});else{let j=[];const De=(he=Se.getColumnChild(v.cloneDeep(g.value)))==null?void 0:he.filter(ue=>(ue==null?void 0:ue.prop)!=="operate");De==null||De.forEach(ue=>{var Ae;y.value++,j.push({label:ue==null?void 0:ue.label,name:(ue==null?void 0:ue.prop)||(ue==null?void 0:ue.label),type:ue!=null&&ue.groupSelect?"Select":"Input",value:"",id:y.value,contents:ue==null?void 0:ue.options,menuSelect:ue==null?void 0:ue.formMenuSelect,groupSelect:(Ae=ue==null?void 0:ue.groupSelect)==null?void 0:Ae.split(":"),selectRelateType:"关联绑定列"})}),ye.value=j}},{deep:!0,immediate:!0}),(h,C)=>{const I=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(W,{class:"icon-content",onClick:Ze,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>fe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>re(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>ot(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(Cr,{tableChildContents:w==null?void 0:w.children,onDeleteChange:pe,onFixChange:Q},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",zi,[e.createElementVNode("div",Li,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:G=>Fe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>Oe(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Xe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",$i,[e.createElementVNode("div",ji,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ki,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:G=>nt(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>ee(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:it},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:G=>te(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>ce(w)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(St._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=w=>_.value=w)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:u.value,onBeforeDestroy:se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ae},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(W,{onClick:se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(W,{class:"ok-button button",onClick:Me,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:J,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:Y.value,key:Y.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(W,{onClick:J,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(W,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:ie.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(W,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(W,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:B.value,key:B.value,isEnableWrap:!0,onChange:$e,onChangeVisible:Ne,onBlurChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(W,{onClick:ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(W,{class:"ok-button button",onClick:Ye,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=zt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=$t.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=$t.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,b,g,f,x,_,V,R,Z,O,ke,Y,K,ie,D;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(b=n==null?void 0:n.value)==null?void 0:b.tableData)==null?void 0:g.y)||i,w:((x=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:x.w)||ds.value,h:((V=(_=n==null?void 0:n.value)==null?void 0:_.tableData)==null?void 0:V.h)||s,minW:((Z=(R=n==null?void 0:n.value)==null?void 0:R.tableData)==null?void 0:Z.minW)||ps.value,minH:((ke=(O=n==null?void 0:n.value)==null?void 0:O.tableData)==null?void 0:ke.minH)||vs.value,maxH:((K=(Y=n==null?void 0:n.value)==null?void 0:Y.tableData)==null?void 0:K.maxH)||hs.value,i:((D=(ie=n==null?void 0:n.value)==null?void 0:ie.tableData)==null?void 0:D.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,b,g,f,x,_;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((b=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:b.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((_=(x=(f=n==null?void 0:n.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return s*2},_r=(n,i,s)=>{var b,g;const r=(g=(b=ss.value)==null?void 0:b[us.value])==null?void 0:g.filter(f=>{var x;return((x=f==null?void 0:f.key)==null?void 0:x.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var x,_,V;return((V=(_=(x=f==null?void 0:f.value)==null?void 0:x.tableData)==null?void 0:_.component)==null?void 0:V.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,x)=>_r(f,x))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>_r(r,d)):[]},bs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var _;const f=bs(s==null?void 0:s.optionItems),x=g?(_=f[g==null?void 0:g.toUpperCase()])==null?void 0:_[s==null?void 0:s.target]:[];d.value=x==null?void 0:x.map(V=>{for(const[R,Z]of Object.entries((s==null?void 0:s.comp)||{}))if((V==null?void 0:V.prop)===R)return{...V,value:Z};return V})},{immediate:!0});const u=g=>St.getComponent(g),b=g=>{var f,x;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(_=>{var V;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(V=_==null?void 0:_.options)==null?void 0:V.map(R=>({...R,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):d.value=(x=d.value)==null?void 0:x.map(_=>{var V;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(V=_==null?void 0:_.options)==null?void 0:V.map(R=>({...R,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const x=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,V=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:V==null?void 0:V.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V==null?void 0:V.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(V.type)),{modelValue:V.value,"onUpdate:modelValue":R=>V.value=R,content:V==null?void 0:V.options,optionUrl:V==null?void 0:V.optionUrl,disabled:V==null?void 0:V.disabled,activeText:V==null?void 0:V.activeText,inactiveText:V==null?void 0:V.inactiveText,onChange:R=>b(V)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=zt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=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(n,{emit:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),b=K=>K==null?void 0:K.reduce((ie,D)=>(ie[D==null?void 0:D.prop]=D==null?void 0:D.rule,ie),{}),g=e.computed(()=>({formRules:b(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),x=e.ref(""),_=(K,ie,D)=>{var B;let $=[];(s==null?void 0:s.activeTabName)==="任务配置"?($=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:ie}]},{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:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&($=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(B=s==null?void 0:s.relatedData)==null?void 0:B.map(E=>({label:E==null?void 0:E.任务名称,value:E==null?void 0:E.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return D&&(D==null?void 0:D.length)>0?y=[...$,...V(K,ie,D)]:y=$,y},V=(K,ie,D)=>{const $=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return D?$==null?void 0:$.filter(y=>D==null?void 0:D.includes(y==null?void 0:y.prop)):$},R=(K,ie)=>{var E,ye,Xe,it,Ne,$e,_e,A,te;const D=((Ne=(it=(Xe=(ye=(E=s==null?void 0:s.comp)==null?void 0:E.compData)==null?void 0:ye.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:Xe.contents)==null?void 0:it.filter(ce=>(ce==null?void 0:ce.label)!=="操作"))==null?void 0:Ne.map(ce=>({value:ce==null?void 0:ce.prop,label:ce.label})))||[],$=/button/i,y=((te=(A=(_e=($e=s==null?void 0:s.comp)==null?void 0:$e.compData)==null?void 0:_e.filter(ce=>$.test(ce==null?void 0:ce.key)))==null?void 0:A.flatMap(ce=>ce==null?void 0:ce.contents))==null?void 0:te.map(ce=>({value:ce==null?void 0:ce.label,label:ce.label})))||[],B=_(D,y,K);f.value=ie?ks(B,ie):B,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(ce=>({prop:ce,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const Z=K=>{const ie=K==null?void 0:K[x.value];if(x.value==="执行任务"){if(!(ie!=null&&ie.join("/")))return;const D=ie==null?void 0:ie.join("/");R(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,K)}},O=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},ke=(K,ie)=>{x.value=ie==null?void 0:ie.changeProp,Z(K)},Y=K=>{r("onButtonClick",K)};return(K,ie)=>(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:O,onBlurChange:ke,onOnButtonClick:Y},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=zt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=zt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},zs={class:"fix-content"},Ls={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},js={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),b=e.ref([]),g=e.ref(!1),f=e.ref([]),x=e.ref([]),_=e.ref(""),V=e.ref(!1),R=e.ref(0),Z=e.ref([]),O=e.ref([]),ke=(A,te)=>{if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="selectRelateType"){const ce=te==null?void 0:te.optionUrl;return(ce==null?void 0:ce.selectRelateType)||te[A.key]}if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="menuSelect"){const ce=te==null?void 0:te.optionUrl;return(ce==null?void 0:ce.menuSelect)||te[A.key]}if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="groupSelect"){const ce=te==null?void 0:te.optionUrl;return(ce==null?void 0:ce.groupSelect)||te[A.key]}if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="originalContent")return(te==null?void 0:te.value)||te[A.key];if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="multiple"){const ce=te[A.key];return mr(ce)?ce:A.default}return(A==null?void 0:A.label)==="类型"&&te[A.key]===""?"Input":(A==null?void 0:A.key)==="isFormColHidden"&&!te[A.key]?!1:te[A.key]},Y=async A=>{var ge,Ye,nt,ee,z,be;d.value=!0;let te=[];const ce=await((nt=(Ye=(ge=Se.FormContent)==null?void 0:ge.find(xe=>(xe==null?void 0:xe.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:Ye.value)==null?void 0:nt.value)??((z=(ee=Se.FormContent)==null?void 0:ee.find(xe=>(xe==null?void 0:xe.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:z.value);if(ce==null||ce.forEach(xe=>{R.value++,te.push({label:xe==null?void 0:xe.label,name:xe==null?void 0:xe.label,type:xe.type,prop:xe==null?void 0:xe.prop,value:ke(xe,A),id:R.value,contents:xe==null?void 0:xe.options,width:(A==null?void 0:A.width)??1})}),A!=null&&A.menuSelect&&((be=A==null?void 0:A.menuSelect)==null?void 0:be.length)>0){const xe=await Se.menuToContentType(A==null?void 0:A.menuSelect);te=te==null?void 0:te.map(Fe=>((Fe==null?void 0:Fe.name)==="组信息选项"&&(Fe.contents=xe),Fe))}_.value=A==null?void 0:A.id,u.value=await Se.selectToBase(Se.formToOptionsContents(te)),b.value=await Se.selectToBase(Se.formToOptionsContents(te))},K=A=>{var ce;g.value=!0;let te=[];(ce=Se.FormButton)==null||ce.forEach(ge=>{R.value++,te.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,value:(ge==null?void 0:ge.label)==="类型"&&A[ge.key]===""?"normal":A[ge.key],id:R.value,contents:ge==null?void 0:ge.options})}),Z.value=te,O.value=te,_.value=A==null?void 0:A.id};e.watch(()=>V.value,()=>{var te,ce;let A=v.cloneDeep(s.originalItemContents);(te=v.cloneDeep(s.originalItemContents))!=null&&te.find(ge=>(ge==null?void 0:ge.key)==="enableWrap")?A=(ce=v.cloneDeep(s.originalItemContents))==null?void 0:ce.map(ge=>((ge==null?void 0:ge.key)==="enableWrap"&&(ge.contents=!V.value),ge)):A.push({key:"enableWrap",contents:!V.value}),r("change",A)},{deep:!0});const ie=()=>{var ce,ge,Ye,nt,ee;Z.value=O.value;let A={};if(_.value!==""?A.id=_.value:(R.value++,A.id="id"+R.value),(ce=Z.value)==null||ce.forEach(z=>{var xe;const be=(xe=Se.FormButton)==null?void 0:xe.find(Fe=>(Fe==null?void 0:Fe.label)===(z==null?void 0:z.label));be&&(A[be.key]=z.value)}),(ge=f.value)!=null&&ge.find(z=>z.id===A.id))f.value=(Ye=f.value)==null?void 0:Ye.map(z=>(z.id===A.id&&(z=A),z));else{let z=v.cloneDeep(f.value);f.value||(f.value=[]),z.push(A),f.value=z}g.value=!1,_.value="";let te=v.cloneDeep(s.originalItemContents);(nt=v.cloneDeep(s.originalItemContents))!=null&&nt.find(z=>(z==null?void 0:z.key)==="formButton")?te=(ee=v.cloneDeep(s.originalItemContents))==null?void 0:ee.map(z=>((z==null?void 0:z.key)==="formButton"&&(z.contents=f.value),z)):te.push({key:"formButton",contents:f.value}),r("change",te)},D=A=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ce;x.value=(te=v.cloneDeep(x.value))==null?void 0:te.filter(ge=>(ge==null?void 0:ge.id)!==(A==null?void 0:A.id)),r("change",(ce=v.cloneDeep(s.originalItemContents))==null?void 0:ce.map(ge=>((ge==null?void 0:ge.key)==="formContent"&&(ge.contents=x.value),ge))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=A=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ce;f.value=(te=v.cloneDeep(f.value))==null?void 0:te.filter(ge=>(ge==null?void 0:ge.id)!==(A==null?void 0:A.id)),r("change",(ce=v.cloneDeep(s.originalItemContents))==null?void 0:ce.map(ge=>((ge==null?void 0:ge.key)==="formButton"&&(ge.contents=f.value),ge))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var te;g.value=!0;let A=[];(te=Se.FormButton)==null||te.forEach(ce=>{R.value++,A.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,value:(ce==null?void 0:ce.label)==="类型"?"normal":"",id:R.value,contents:ce==null?void 0:ce.options})}),Z.value=A,O.value=A},B=()=>{var te,ce,ge;d.value=!0;let A=[];(ge=(ce=(te=Se.FormContent)==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="Input"))==null?void 0:ce.value)==null||ge.forEach(Ye=>{R.value++,A.push({label:Ye==null?void 0:Ye.label,name:Ye==null?void 0:Ye.label,type:Ye.type,value:(Ye==null?void 0:Ye.label)==="类型"?"Input":"",id:R.value,contents:Ye==null?void 0:Ye.options})}),u.value=A,b.value=A},E=A=>{let te=v.cloneDeep(O.value);te=te==null?void 0:te.map(ce=>(ce.value=A==null?void 0:A[ce.name],ce)),O.value=te},ye=A=>{const te=A.find(Ye=>(Ye==null?void 0:Ye.name)==="类型");if((te==null?void 0:te.value)!="Select")return;const ce=A.find(Ye=>(Ye==null?void 0:Ye.name)==="多选"),ge=A.find(Ye=>(Ye==null?void 0:Ye.name)==="初始值");ce!=null&&ce.value&&Bo.isString(ge.value)&&(ge.value=[ge.value]),!(ce!=null&&ce.value)&&!Bo.isString(ge.value)&&(ge.value="")},Xe=async A=>{var te,ce,ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze;if((A==null?void 0:A.类型)!==((ce=(te=b.value)==null?void 0:te.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:ce.value)){let qe=[];const me=await((nt=(Ye=(ge=Se.FormContent)==null?void 0:ge.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:Ye.value)==null?void 0:nt.value)?await((Fe=(xe=(be=Se.FormContent)==null?void 0:be.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:xe.value)==null?void 0:Fe.value):(z=(ee=Se.FormContent)==null?void 0:ee.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:z.value;if(me==null||me.forEach(F=>{var fe,pe;R.value++;const J=yr(F==null?void 0:F.default)?(A==null?void 0:A[F.label])??F.value??"":F==null?void 0:F.default;qe.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:J,prop:F==null?void 0:F.prop,id:R.value,contents:F==null?void 0:F.options,width:((pe=(fe=b.value)==null?void 0:fe[0])==null?void 0:pe.width)??1})}),A!=null&&A.菜单选项&&((Oe=A==null?void 0:A.菜单选项)==null?void 0:Oe.length)>0){const F=await Se.menuToContentType(A==null?void 0:A.菜单选项);qe=qe==null?void 0:qe.map(J=>((J==null?void 0:J.name)==="组信息选项"&&(J.contents=F),J))}ye(qe),b.value=await Se.selectToBase(v.cloneDeep(qe)),u.value=await Se.selectToBase(v.cloneDeep(qe))}else{let qe=v.cloneDeep(b.value);if(qe=qe==null?void 0:qe.map(me=>(me.value=A==null?void 0:A[me.name],me)),A!=null&&A.菜单选项&&((Ze=A==null?void 0:A.菜单选项)==null?void 0:Ze.length)>0){const me=await Se.menuToContentType(A==null?void 0:A.菜单选项);qe=qe==null?void 0:qe.map(F=>((F==null?void 0:F.name)==="组信息选项"&&(F.contents=me),F))}qe=Se.formToOptionsContents(qe),ye(qe),b.value=await Se.selectToBase(v.cloneDeep(qe))}},it=A=>{A||(u.value=b.value)},Ne=async A=>{await Xe(A),u.value=b.value},$e=vo(async()=>{var ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze,qe,me;u.value=b.value;let A={};A.width=((Ye=(ge=u.value)==null?void 0:ge[0])==null?void 0:Ye.width)??1,_.value!==""?A.id=_.value:(R.value++,A.id="id"+R.value);let te=await((z=(ee=(nt=Se.FormContent)==null?void 0:nt.find(F=>{var J,fe;return(F==null?void 0:F.key)===(((fe=(J=u.value)==null?void 0:J.find(pe=>(pe==null?void 0:pe.label)==="类型"))==null?void 0:fe.value)??"label")}))==null?void 0:ee.value)==null?void 0:z.value)??((xe=(be=Se.FormContent)==null?void 0:be.find(F=>{var J,fe;return(F==null?void 0:F.key)===(((fe=(J=u.value)==null?void 0:J.find(pe=>(pe==null?void 0:pe.label)==="类型"))==null?void 0:fe.value)??"label")}))==null?void 0:xe.value);if((Fe=u.value)==null||Fe.forEach(F=>{const J=te==null?void 0:te.find(fe=>(fe==null?void 0:fe.label)===(F==null?void 0:F.label));J&&(A[J.key]=F.value)}),A.width=A.width?A.width:1,A.key=A==null?void 0:A.label,A.isFormColHidden=A==null?void 0:A.isFormColHidden,(Oe=x.value)!=null&&Oe.find(F=>F.id===A.id))x.value=(Ze=x.value)==null?void 0:Ze.map(F=>(F.id===A.id&&(F=A),F));else{let F=v.cloneDeep(x.value);F.push(A),x.value=F}x.value=x.value.map(({id:F,...J})=>J),d.value=!1,_.value="";let ce=v.cloneDeep(s.originalItemContents);(qe=v.cloneDeep(s.originalItemContents))!=null&&qe.find(F=>(F==null?void 0:F.key)==="formContent")?ce=(me=v.cloneDeep(s.originalItemContents))==null?void 0:me.map(F=>((F==null?void 0:F.key)==="formContent"&&(F.contents=x.value),F)):ce.push({key:"formContent",contents:x.value}),r("change",ce)},300),_e=()=>{d.value=!1,g.value=!1,_.value="",b.value=[],O.value=[]};return e.watch(()=>s.originalItemContents,()=>{var te,ce,ge,Ye,nt,ee;if(!s.originalItemContents||s.originalItemContents.length===0)return;const A=v.cloneDeep(s.originalItemContents);x.value=((te=A==null?void 0:A.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:te.contents)??[],f.value=((ce=A==null?void 0:A.find(z=>(z==null?void 0:z.key)==="formButton"))==null?void 0:ce.contents)??[],V.value=(ge=A==null?void 0:A.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&ge.contents?!((Ye=A==null?void 0:A.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&Ye.contents):!0,x.value=(nt=v.cloneDeep(x.value))==null?void 0:nt.map((z,be)=>{var Fe;let xe=z;return xe.id=(z==null?void 0:z.id)??be,z!=null&&z.label||(z.label=(z==null?void 0:z.key)??(z==null?void 0:z.label)??""),z!=null&&z.type||(z.type=(z==null?void 0:z.type)??""),z.contents=((Fe=z==null?void 0:z.options)==null?void 0:Fe.length)===0?(z==null?void 0:z.contents)??"":z==null?void 0:z.options,xe}),x.value=Se.formToOptionsContents(x.value),f.value=(ee=f.value)==null?void 0:ee.map((z,be)=>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:be})},{deep:!0,immediate:!0}),(A,te)=>{const ce=e.resolveComponent("svg-icon"),ge=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[te[2]||(te[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ge,{class:"icon-content",id:"themeButton",onClick:B},{icon:e.withCtx(()=>[e.createVNode(ce,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[1]||(te[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Ye,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Vs,[e.createVNode(ce,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>Y(Ye)},null,8,["onClick"]),e.createVNode(ce,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>D(Ye)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[te[4]||(te[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ge,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(ce,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[3]||(te[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ye,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",zs,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Ls,[e.createVNode(ce,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>K(Ye)},null,8,["onClick"]),e.createVNode(ce,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>$(Ye)},null,8,["onClick"])])])]))),128))]),te[6]||(te[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[te[5]||(te[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(St._sfc_main$1,{modelValue:V.value,"onUpdate:modelValue":te[0]||(te[0]=Ye=>V.value=Ye)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Xe,onChangeVisible:it,onBlurChange:Ne},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(ge,{onClick:_e,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ge,{class:"ok-button button",onClick:e.unref($e),id:"themeButton"},{default:e.withCtx(()=>te[8]||(te[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:Z.value,key:Z.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:_e,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ie},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},zo=zt._export_sfc(js,[["__scopeId","data-v-20850524"]]),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(n,{emit:i}){const s=n,r=i,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),x=e.ref({}),_=e.ref([]),V=Y=>{var K;x.value=Y,r("change",(K=O())==null?void 0:K.compData)},R=(Y,K)=>{var ie,D;switch(Y){case"create":(ie=u.value)==null||ie.forEach($=>{$.value=""}),f.value="create",g.visible=!0;break;case"update":(D=u.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),f.value="update",g.visible=!0;break;case"delete":_.value.splice(K,1),f.value="delete";break}},Z=Y=>{var K,ie,D;if((Y==null?void 0:Y.buttonName)==="确认"){const $=v.cloneDeep(Y==null?void 0:Y.content);switch(Object.keys($).forEach(y=>{$[y]===""&&delete $[y]}),f.value){case"create":_.value.push({...$,index:((K=_.value)==null?void 0:K.length)+1});break;case"update":_.value=(ie=_.value)==null?void 0:ie.map(y=>y.index===($==null?void 0:$.index)?{...y,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:y);break}r("change",(D=O())==null?void 0:D.compData),g.visible=!1}else g.visible=!1},O=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),ke=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var K,ie;Y&&(x.value=((K=Y==null?void 0:Y.find(D=>D.key==="stepConfig"))==null?void 0:K.contents)??{},_.value=((ie=Y==null?void 0:Y.find(D=>D.key==="stepList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(Y,K)=>{const ie=e.resolveComponent("svg-icon"),D=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(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{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(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.title),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>R("delete",y)},{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:d.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:ke,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:Z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=zt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),b=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}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),V=Y=>{var K;u.value=Y,r("change",(K=O())==null?void 0:K.compData)},R=(Y,K)=>{var ie,D;switch(Y){case"create":(ie=f.value)==null||ie.forEach($=>{$.value=""}),d.value="create",_.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),d.value="update",_.visible=!0;break;case"delete":b.value.splice(K,1),d.value="delete";break}},Z=Y=>{var K,ie,D,$;if((Y==null?void 0:Y.buttonName)==="确认"){const y=v.cloneDeep(Y==null?void 0:Y.content);switch(Object.keys(y).forEach(B=>{y[B]===""&&delete y[B]}),d.value){case"create":(ie=b.value)==null||ie.push({...y,index:((K=b.value)==null?void 0:K.length)+1});break;case"update":b.value=(D=b.value)==null?void 0:D.map(B=>B.index===(y==null?void 0:y.index)?{...B,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:B);break}r("change",($=O())==null?void 0:$.compData),_.visible=!1}else _.visible=!1},O=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:u.value}]}),ke=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var K,ie;Y&&(u.value=((K=Y==null?void 0:Y.find(D=>D.key==="timeLineConfig"))==null?void 0:K.contents)??{},b.value=((ie=Y==null?void 0:Y.find(D=>D.key==="timeLineList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(Y,K)=>{const ie=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.content),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:g.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:ke,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:Z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=zt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=zt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),b=i,g=e.ref(!1),f=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var $;const D=v.cloneDeep(s.itemData);d.value=($=v.cloneDeep(D))==null?void 0:$.map(y=>{var B;if(y.key==="extra"){let E=[];(B=y.value)==null||B.forEach(ye=>{var Xe;E.push((Xe=Object.values(ye))==null?void 0:Xe[0])}),y.value=E}return y})},{deep:!0,immediate:!0});const V=(D,$,y,B)=>{var ye;let E={};((ye=D==null?void 0:D[0])==null?void 0:ye.contents)==="详情"&&(g.value=!0,E[$]=D,u.value=D==null?void 0:D.filter(Xe=>(Xe==null?void 0:Xe.key)!=="tableContentName"),f.value=E,x.value=y,_.value=B.id)},R=D=>{var Xe,it,Ne,$e;const $=(it=(Xe=Object.values(v.cloneDeep(f.value)))==null?void 0:Xe[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),y=($e=(Ne=Object.values(v.cloneDeep(f.value)))==null?void 0:Ne[0])==null?void 0:$e.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),B=y==null?void 0:y.map((_e,A)=>{var te;return A===D.index&&(_e==null?void 0:_e.comp)==="Table"&&(_e.compData=(te=_e.compData)==null?void 0:te.map(ce=>{var ge,Ye;return(ce==null?void 0:ce.key)==="tableContents"&&(ce.contents=(Ye=(ge=D.content)==null?void 0:ge.map(nt=>{let ee={};for(let z in nt)z!=="id"&&(ee[z]=nt[z]);return ee}))==null?void 0:Ye.map(nt=>Object.values(nt))),ce})),_e});B.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ye={};for(let _e in E)ye[_e]=B;f.value=ye},Z=()=>{g.value=!1,f.value={},x.value={},_.value=void 0,r.value++},O=D=>{var Xe,it,Ne,$e;const $=(it=(Xe=Object.values(v.cloneDeep(f.value)))==null?void 0:Xe[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),y=($e=(Ne=Object.values(v.cloneDeep(f.value)))==null?void 0:Ne[0])==null?void 0:$e.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),B=y==null?void 0:y.map((_e,A)=>(A===D.index&&(_e.compData=D.contents),_e));B.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ye={};for(let _e in E)ye[_e]=B;f.value=ye},ke=()=>{var $,y;let D={};for(let B in x.value)B===(($=Object.keys(f.value))==null?void 0:$[0])?D[B]=(y=Object.values(f.value))==null?void 0:y[0]:D[B]=x.value[B];b("change",{buttonName:"编辑",index:_.value,singleContent:D},"methodData"),g.value=!1,f.value={},x.value={},_.value=void 0},Y=()=>{g.value=!1,f.value={},x.value={},_.value=void 0},K=D=>{b("change",D,"methodData")},ie=D=>on(D);return(D,$)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(B==null?void 0:B.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(B.comp)),{itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,key:E,index:(B==null?void 0:B.id)??E,onContentClick:V,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:Y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(B.comp)),{itemData:B==null?void 0:B.compData,onChange:R,childItemData:B==null?void 0:B.itemChildData,key:E,onContentChange:O,index:(B==null?void 0:B.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:Z,id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=zt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Se.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),b=e.ref(),g=Se.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),x=$t.useModelComp(v.pinia),_=e.ref(!1),V=$t.useMenuState(v.pinia),R=v.useLoginState(v.pinia),{itemData:Z,isEdit:O,routeToChildPath:ke,tableViewContents:Y,lockingPage:K,payloadTypes:ie}=v.storeToRefs(x),{activeMenuPath:D,platform:$,childMenu:y}=v.storeToRefs(V),{loginUserInfo:B}=v.storeToRefs(R),E=e.ref(!1),ye=async()=>{var ee,z;(ee=i.value)!=null&&ee.find(be=>(be==null?void 0:be.buttonName)==="保存")&&await ce((z=i.value)==null?void 0:z.find(be=>(be==null?void 0:be.buttonName)==="保存")),await Se.onSaveBack()};e.watch(()=>Z.value,async()=>{O.value==="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{deep:!0});const Xe=()=>{u.value=!1,b.value=void 0},it=ee=>ee.map(z=>{const be={};for(const xe in z){const Fe=z[xe];if(xe.includes(f.value)){const Oe=xe.split(f.value);let Ze=be;Oe.forEach((qe,me)=>{me===Oe.length-1?Ze[qe]=Fe:(Ze[qe]||(Ze[qe]={}),Ze=Ze[qe])})}else be[xe]=Fe}return be}),Ne=async(ee,z,be=[])=>{var Fe,Oe,Ze,qe,me,F,J,fe,pe,Q,re,ae,se,Me,ot;let xe=(Fe=v.cloneDeep(z))==null?void 0:Fe.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(ee!=null&&ee.includes("[")){let h=(F=(me=(qe=(Ze=(Oe=v.cloneDeep(ee))==null?void 0:Oe.split("["))==null?void 0:Ze[1])==null?void 0:qe.split("]"))==null?void 0:me[0])==null?void 0:F.split(":"),C="";if(h!=null&&h[0]){let I=(J=xe==null?void 0:xe.find(W=>(W==null?void 0:W.name)===(h==null?void 0:h[0])))==null?void 0:J.compData;if(!I){let W=(fe=ee==null?void 0:ee.split("["))==null?void 0:fe[0],w=await Se.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",be);I=(pe=w==null?void 0:w.find(S=>(S==null?void 0:S.name)===(h==null?void 0:h[0])))==null?void 0:pe.compData}I==null||I.forEach(W=>{var w,S,G,L,de,H;if((W==null?void 0:W.key)==="formContent")(w=W==null?void 0:W.contents)==null||w.forEach(P=>{var Ee;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?C=P==null?void 0:P.value:C=(Ee=P==null?void 0:P.value)==null?void 0:Ee.toString())});else if((W==null?void 0:W.key)==="tableContents"){let P=[],Ee=(S=I==null?void 0:I.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:S.contents,oe=(h==null?void 0:h[1])??"";if(Ee!=null&&Ee.every(X=>Array.isArray(X))){let X=Se.getColumnChild((de=Ee==null?void 0:Ee[0])==null?void 0:de.filter(ne=>(ne==null?void 0:ne.label)!=="操作"));(H=W.contents)==null||H.forEach(ne=>{let q={};ne=ne==null?void 0:ne.filter(ve=>!(ve!=null&&ve.id)),X==null||X.forEach((ve,he)=>{let we=ne[he];typeof ne[he]=="number"&&(we=ne[he].toString()),(oe===""||oe===ve.prop)&&(q[ve.prop]=we)}),P.push(q)}),P=it(P)}else{let X=(G=Ee==null?void 0:Ee.map(ne=>ne==null?void 0:ne.label))==null?void 0:G.filter(ne=>ne!=="操作");(L=W.contents)==null||L.forEach(ne=>{let q={};ne=ne==null?void 0:ne.filter(ve=>!(ve!=null&&ve.id)),X==null||X.forEach((ve,he)=>{let we=ne[he];typeof ne[he]=="number"&&(we=ne[he].toString()),(oe===""||oe===ve)&&(q[ve]=we)}),P.push(q)})}C=P}})}return C}else if(ee!=null&&ee.includes("/")){let h={};return(Q=v.cloneDeep(xe))==null||Q.forEach((C,I)=>{var W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he,we,j,De,ue;if((C==null?void 0:C.comp)==="Table"){let Ae=Array.isArray((S=(w=(W=C==null?void 0:C.compData)==null?void 0:W.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:w.contents)==null?void 0:S[0])?(H=(de=(L=(G=C==null?void 0:C.compData)==null?void 0:G.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:L.contents)==null?void 0:de[0])==null?void 0:H.some(Re=>Re==null?void 0:Re.children):[],Qe=(oe=(Ee=(P=C==null?void 0:C.compData)==null?void 0:P.find(Re=>(Re==null?void 0:Re.key)==="tableContents"))==null?void 0:Ee.contents)==null?void 0:oe.map(Re=>(Re!=null&&Re.find(gt=>gt==null?void 0:gt.id)&&(Re=Re.slice(1)),Re)),We=(he=(ve=(q=(ne=(X=C==null?void 0:C.compData)==null?void 0:X.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:ne.contents)==null?void 0:q[0])==null?void 0:ve[0])==null?void 0:he.label,rt=(j=(we=C==null?void 0:C.compData)==null?void 0:we.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:j.contents;if(Ae)(Ae==null?void 0:Ae.length)===0?h[C.name]=h!=null&&h[C.name]?h[C.name]:Se.tableToForm(Qe,rt):h[We]=Se.tableToForm(Qe,rt);else{const Re=[];rt=rt.slice(1,rt.length-1),rt==null||rt.forEach((gt,tt)=>{Qe==null||Qe.forEach(et=>{Re.push({key:gt.label+et[0],value:et[tt+1]})})}),h["form"+I]=Re}}else{const Ae=(ue=(De=C.compData)==null?void 0:De.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:ue.contents;h!=null&&h.form||(h.form=[]);const Qe=[];Ae==null||Ae.forEach(We=>{We.key!==""&&(We={key:(We==null?void 0:We.key)??(We==null?void 0:We.label),value:We==null?void 0:We.value},Qe.push(We))}),h.form=[...Qe,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(ee==="createInsofDataApi"){let h=(re=v.cloneDeep(z))==null?void 0:re[0];return h={comp:(ae=v.cloneDeep(h))==null?void 0:ae.comp,compData:(se=v.cloneDeep(h))==null?void 0:se.compData,name:(Me=v.cloneDeep(h))==null?void 0:Me.name,isShow:(ot=v.cloneDeep(h))==null?void 0:ot.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:h}}}return ee}},$e=async(ee,z,be)=>{var Oe,Ze,qe;let xe=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),Fe=xe==null?void 0:xe.find(me=>(me==null?void 0:me.name)===(be==null?void 0:be[0]));if(Fe){if((Fe==null?void 0:Fe.comp)==="Table"){let me={};for(let ae in v.cloneDeep(ee))v.cloneDeep(ee)[ae]!=="loginUser"?me[ae]=v.cloneDeep(ee)[ae]:me[ae]=((Oe=B.value)==null?void 0:Oe.account)||((Ze=B.value)==null?void 0:Ze.账号);let F=[],J=me;Array.isArray(ee)||(J=[me]),J==null||J.forEach(ae=>{F.push({[ae[be[1]]]:ae})});let fe=[],pe=F==null?void 0:F.map(ae=>{var se;return(se=Object.keys(ae))==null?void 0:se[0]});xe==null||xe.forEach(ae=>{var se;(ae==null?void 0:ae.name)===(be==null?void 0:be[0])&&((se=ae==null?void 0:ae.compData)==null||se.forEach(Me=>{var ot;(Me==null?void 0:Me.key)==="tableContents"&&((ot=Me==null?void 0:Me.contents)==null||ot.forEach(h=>{h!=null&&h.some(C=>pe.includes(C))&&fe.push({[h.find(C=>C.id).id]:h.find(C=>pe.includes(C))})}))}))});let Q=fe==null?void 0:fe.map(ae=>{var se;return(se=Object.keys(ae))==null?void 0:se[0]}),re=[];if(Q==null||Q.forEach(ae=>{var ot;let se=(ot=fe==null?void 0:fe.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0].toString())===ae.toString()}))==null?void 0:ot[ae],Me=F==null?void 0:F.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0])===se});re.push({id:parseInt(ae),value:{tableData:Me[se]}})}),(re==null?void 0:re.length)>0)return re}else if((Fe==null?void 0:Fe.comp)==="Form"){let me=v.cloneDeep(Fe);me.compData=(qe=me.compData)==null?void 0:qe.map(fe=>{var pe;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(pe=fe.contents)==null?void 0:pe.map(Q=>((Q==null?void 0:Q.key)===(be==null?void 0:be[1])&&(Q.value=(ee==null?void 0:ee[Q==null?void 0:Q.prop])||ee),Q))),fe});let F={};for(let fe in me)fe!=="id"&&(F[fe]=me[fe]);let J=[];if(J.push({id:Fe==null?void 0:Fe.id,keyType:be==null?void 0:be[1],value:{pageData:F}}),(J==null?void 0:J.length)>0)return J}}},_e=async(ee,z,be)=>{var Oe,Ze,qe,me,F,J,fe,pe,Q,re;let xe=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),Fe=xe==null?void 0:xe.find(ae=>(ae==null?void 0:ae.name)===(be==null?void 0:be[0]));if(Fe){if((Fe==null?void 0:Fe.comp)==="Table"){let ae={};for(let se in v.cloneDeep(ee))v.cloneDeep(ee)[se]!=="loginUser"?ae[se]=v.cloneDeep(ee)[se]:ae[se]=((Oe=B.value)==null?void 0:Oe.account)||((Ze=B.value)==null?void 0:Ze.账号);await v.createInsofDataApi({key:{type:"data",pageKey:z,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ae}})}else if((Fe==null?void 0:Fe.comp)==="Form"){let ae=v.cloneDeep(Fe),se=Object.keys(ee),Me="";(me=(qe=v.cloneDeep(ae))==null?void 0:qe.compData)==null||me.forEach(w=>{var S,G;(w==null?void 0:w.key)==="formContent"&&((G=(S=v.cloneDeep(w))==null?void 0:S.contents)==null||G.forEach(L=>{var de;se.includes(L==null?void 0:L.key)&&(L==null?void 0:L.value)===((de=B.value)==null?void 0:de.姓名)&&(Me=L==null?void 0:L.key)}))});let ot=[];(F=Object.values(ee[Me]))==null||F.forEach(w=>{w!=null&&w.includes("(")&&ot.push(w)}),ot=[...new Set(ot)];const h=ot==null?void 0:ot.map(async w=>{var H,P,Ee,oe,X,ne,q,ve,he,we,j,De;let S="";(ne=(X=(oe=(Ee=(P=(H=v.cloneDeep(w))==null?void 0:H.split("("))==null?void 0:P[1])==null?void 0:Ee.split(")"))==null?void 0:oe[0])==null?void 0:X.split(":"))==null||ne.forEach(ue=>{S=S===""?S+ue.replaceAll("'",""):S+"/"+ue.replaceAll("'","")});let G=[];(De=(j=(we=(he=(ve=(q=v.cloneDeep(w))==null?void 0:q.split("<"))==null?void 0:ve[1])==null?void 0:he.split(">"))==null?void 0:we[0])==null?void 0:j.split(":"))==null||De.forEach(ue=>{G.push(ue.replaceAll("'",""))});const L=await Se.getItemData(S,sessionStorage.getItem("systemKey"),"");let de="";return L==null||L.forEach(ue=>{var Ae;ue.name===(G==null?void 0:G[0])&&((Ae=ue==null?void 0:ue.compData)==null||Ae.forEach(Qe=>{var We;(Qe==null?void 0:Qe.key)==="formContent"&&((We=Qe.contents)==null||We.forEach(rt=>{(rt==null?void 0:rt.key)===(G==null?void 0:G[1])&&(de=rt==null?void 0:rt.value)}))}))}),{[w]:de}}),C=await Promise.all(h);ae.compData=(fe=(J=v.cloneDeep(ae))==null?void 0:J.compData)==null?void 0:fe.map(w=>{var S,G;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(G=(S=v.cloneDeep(w))==null?void 0:S.contents)==null?void 0:G.map(L=>{var de,H,P,Ee;return(de=ee[Me])!=null&&de[L==null?void 0:L.key]&&(ee[Me][L==null?void 0:L.key].includes("(")?L.value=(H=C==null?void 0:C.find(oe=>{var X;return((X=Object.keys(oe))==null?void 0:X[0])===ee[Me][L==null?void 0:L.key]}))==null?void 0:H[ee[Me][L==null?void 0:L.key]]:L.value=(Ee=(P=v.cloneDeep(ee))==null?void 0:P[Me])==null?void 0:Ee[L==null?void 0:L.key]),L})),w});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let W="";((pe=I==null?void 0:I.data)==null?void 0:pe.type)==="success"&&((re=(Q=I==null?void 0:I.data)==null?void 0:Q.result)==null||re.forEach(w=>{var S,G;((G=(S=w==null?void 0:w.value)==null?void 0:S.pageData)==null?void 0:G.name)===(be==null?void 0:be[0])&&(W=w.id)}),await v.updateInsofDataApi({id:W,value:{pageData:ae}}))}}},A=(ee,z="",be={})=>{for(const[xe,Fe]of Object.entries(ee)){const Oe=z?`${z}.${xe}`:xe;Fe!==null&&typeof Fe=="object"&&!Array.isArray(Fe)&&Object.prototype.toString.call(Fe)!=="[object Date]"?A(Fe,Oe,be):be[Oe]=Fe}return be},te=async(ee,z,be,xe)=>{var Ze,qe,me,F,J,fe,pe,Q,re,ae,se,Me,ot,h,C,I,W,w,S,G,L,de,H,P,Ee;let Fe=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),Oe=Fe==null?void 0:Fe.find(oe=>(oe==null?void 0:oe.name)===(be==null?void 0:be[0]));if(Oe){if(!(be!=null&&be[1])&&(Oe==null?void 0:Oe.comp)==="Table"){let oe={},X=[],ne=(qe=(Ze=Oe==null?void 0:Oe.compData)==null?void 0:Ze.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:qe.contents;ne!=null&&ne.every(he=>Array.isArray(he))?X=(F=Se.getColumnChild((me=ne==null?void 0:ne[0])==null?void 0:me.filter(he=>(he==null?void 0:he.label)!=="操作")))==null?void 0:F.map(he=>he==null?void 0:he.prop):X=ne==null?void 0:ne.map(he=>he==null?void 0:he.label);for(let he in v.cloneDeep(ee))if(v.cloneDeep(ee)[he]!=="loginUser"){let we=A(v.cloneDeep(ee)[he]),j={};for(let De in we)if(X!=null&&X.find(ue=>ue===De))j[De]=we[De];else if(X!=null&&X.find(ue=>(ue==null?void 0:ue.toUpperCase())===(De==null?void 0:De.toUpperCase()))){let ue=X==null?void 0:X.find(Ae=>(Ae==null?void 0:Ae.toUpperCase())===(De==null?void 0:De.toUpperCase()));j[ue]=we[De]}oe[he]=j}else oe[he]=((J=B.value)==null?void 0:J.account)||((fe=B.value)==null?void 0:fe.账号);let q=await v.getInsofDataApi({keyLikes:{tableId:Oe==null?void 0:Oe.id}});if(((Q=(pe=q==null?void 0:q.data)==null?void 0:pe.result)==null?void 0:Q.length)>0){let he=(ae=(re=q==null?void 0:q.data)==null?void 0:re.result)==null?void 0:ae.map(we=>we==null?void 0:we.id);(he==null?void 0:he.length)>0&&await v.batchDeleteInsofDataApi({ids:he})}let ve=[];if((se=Oe==null?void 0:Oe.compData)!=null&&se.find(he=>(he==null?void 0:he.key)==="pageColumn")&&((h=(ot=(Me=Oe==null?void 0:Oe.compData)==null?void 0:Me.find(he=>(he==null?void 0:he.key)==="pageColumn"))==null?void 0:ot.contents)!=null&&h.includes("["))){const he=await v.getInsofDataApi({id:Oe==null?void 0:Oe.tableId});let we=((w=(W=(I=(C=he==null?void 0:he.data)==null?void 0:C.result)==null?void 0:I[0])==null?void 0:W.key)==null?void 0:w.pageKey)??"";(S=Object.values(oe))==null||S.forEach(j=>{ve.push({key:{type:"data",pageKey:we,tableId:Oe==null?void 0:Oe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:j}})})}else(G=Object.values(oe))==null||G.forEach(he=>{ve.push({key:{type:"data",pageKey:z,tableId:Oe==null?void 0:Oe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:he}})});(ve==null?void 0:ve.length)>0&&await v.batchAddInsofDataApi({dataList:ve})}else if(!(be!=null&&be[1])&&(Oe==null?void 0:Oe.comp)==="Form"){let oe=v.cloneDeep(Oe);oe.compData=(de=(L=v.cloneDeep(oe))==null?void 0:L.compData)==null?void 0:de.map(q=>{var ve,he;return(q==null?void 0:q.key)==="formContent"&&(q.contents=(he=(ve=v.cloneDeep(q))==null?void 0:ve.contents)==null?void 0:he.map(we=>{var j,De;return(j=v.cloneDeep(ee))!=null&&j[we==null?void 0:we.key]&&(we.value=(De=v.cloneDeep(ee))==null?void 0:De[we==null?void 0:we.key]),we})),q});const X=await v.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let ne="";((H=X==null?void 0:X.data)==null?void 0:H.type)==="success"&&((Ee=(P=X==null?void 0:X.data)==null?void 0:P.result)==null||Ee.forEach(q=>{var ve,he;((he=(ve=q==null?void 0:q.value)==null?void 0:ve.pageData)==null?void 0:he.name)===(be==null?void 0:be[0])&&(ne=q.id)}),await v.updateInsofDataApi({id:ne,value:{pageData:oe}}))}}},ce=async ee=>{var z,be,xe,Fe,Oe,Ze,qe,me,F,J,fe,pe,Q,re,ae,se;V.setImportLoading(!0);try{if(ee.api){let Me=new WeakMap;(be=(z=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value})).data.result)==null?void 0:z.filter(H=>{var P,Ee;return((P=H==null?void 0:H.key)==null?void 0:P.pageKey)!=="menu"&&((Ee=H==null?void 0:H.key)==null?void 0:Ee.pageKey)!=="secret"}))==null||be.forEach(H=>{Me[H.key.pageKey]?Me[H.key.pageKey]=[...Me[H.key.pageKey],H]:Me[H.key.pageKey]=[H]});let h=await Se.getItemData((y==null?void 0:y.value)===""?D.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Me),C="";if(h=h==null?void 0:h.map(H=>{var P,Ee,oe,X,ne,q,ve,he,we,j,De,ue;if((H==null?void 0:H.comp)==="Form")H.compData=(P=H.compData)==null?void 0:P.map(Ae=>{var Qe;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(Qe=Ae.contents)==null?void 0:Qe.map(We=>{var rt;if((We==null?void 0:We.value)===""&&(We==null?void 0:We.type)==="Select"){let Re=Se.judgeContents((rt=v.cloneDeep(We))==null?void 0:rt.optionUrl,Me);We.value=We.value||Re}return We})),Ae});else if((H==null?void 0:H.comp)==="Table"&&(Ee=H.compData)!=null&&Ee.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn")){let Ae=(X=(oe=H.compData)==null?void 0:oe.find(Re=>(Re==null?void 0:Re.key)==="pageColumn"))==null?void 0:X.contents,Qe=((q=(ne=H.compData)==null?void 0:ne.find(Re=>(Re==null?void 0:Re.key)==="pageGroup"))==null?void 0:q.contents)??"",We=(we=(he=(ve=Ae==null?void 0:Ae.split("["))==null?void 0:ve[1])==null?void 0:he.split("]"))==null?void 0:we[0];C=((j=Ae==null?void 0:Ae.split("["))==null?void 0:j[0])+((ue=(De=Y.value)==null?void 0:De.find(Re=>(Re==null?void 0:Re.key)===We))==null?void 0:ue.value)}return H}),!(C===""||C==="")){const H=await Se.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Me);h=h==null?void 0:h.map(P=>{var Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe;if((P==null?void 0:P.comp)==="Table"&&(Ee=P.compData)!=null&&Ee.find(We=>(We==null?void 0:We.key)==="pageColumn")){let We=(X=(oe=P.compData)==null?void 0:oe.find(et=>(et==null?void 0:et.key)==="pageColumn"))==null?void 0:X.contents,rt=((q=(ne=P.compData)==null?void 0:ne.find(et=>(et==null?void 0:et.key)==="pageGroup"))==null?void 0:q.contents)??"",Re=(we=(he=(ve=We==null?void 0:We.split("["))==null?void 0:ve[1])==null?void 0:he.split("]"))==null?void 0:we[0],gt=((j=We==null?void 0:We.split("["))==null?void 0:j[0])+((ue=(De=Y.value)==null?void 0:De.find(et=>(et==null?void 0:et.key)===Re))==null?void 0:ue.value),tt=(Ae=H==null?void 0:H.find(et=>(et==null?void 0:et.name)===(rt===""?d==null?void 0:d.compName:rt)))==null?void 0:Ae.compData;P.compData=(Qe=P.compData)==null?void 0:Qe.map(et=>{var Be;return(et==null?void 0:et.key)==="tableContents"&&(et.contents=(Be=tt==null?void 0:tt.find(He=>(He==null?void 0:He.key)==="tableContents"))==null?void 0:Be.contents),et})}return P})}let I={};if(((Fe=(xe=ee==null?void 0:ee.extraValues)==null?void 0:xe.input)==null?void 0:Fe.length)>0){const H=(Ze=(Oe=ee==null?void 0:ee.extraValues)==null?void 0:Oe.input)==null?void 0:Ze.map(async P=>{var Ee;ge!=null&&ge.find(oe=>oe===P)?I=await Ne(P,h):I[Object.keys(P)[0]]=await Ne((Ee=Object.values(P))==null?void 0:Ee[0],h,Me)});await Promise.all(H)}else I=await Ne("/",h);let W=!1;(me=(qe=ee==null?void 0:ee.extraValues)==null?void 0:qe.output)==null||me.forEach(H=>{var P,Ee;(Ee=(P=Object.values(H))==null?void 0:P[0])!=null&&Ee.includes(".doc")&&(W=!0)});let w;if(W){const H=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await v.axios.post(ee.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{H.close()})}else w=await v.axios.post(ee.api,I,{headers:{"Content-Type":"application/json"}});let S=(pe=(fe=(J=(F=v.cloneDeep(ee))==null?void 0:F.extraValues)==null?void 0:J.output)==null?void 0:fe.map(H=>{var P,Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe,We,rt;if(!((Ee=(P=Object.values(H))==null?void 0:P[0])!=null&&Ee.includes(".doc"))){let Re=(j=(we=(he=(X=v.cloneDeep((oe=Object.values(H))==null?void 0:oe[0]))==null?void 0:X.split("["))==null?void 0:he[((ve=(q=v.cloneDeep((ne=Object.values(H))==null?void 0:ne[0]))==null?void 0:q.split("["))==null?void 0:ve.length)-1])==null?void 0:we.split("]"))==null?void 0:j[0],gt=Re==null?void 0:Re.split(":"),tt=(Ae=v.cloneDeep((De=Object.values(H))==null?void 0:De[0]))==null?void 0:Ae.substring(0,v.cloneDeep((ue=Object.values(H))==null?void 0:ue[0]).lastIndexOf("["));if(tt=(We=v.cloneDeep(tt))==null?void 0:We.slice(0,((Qe=v.cloneDeep(tt))==null?void 0:Qe.length)-1),tt!=null&&tt.includes("[")){let et="";if((rt=Se.contentTransArrayToAll(tt,"/"))==null||rt.forEach(Be=>{var He,xt,ze,Le,je,Ke,M;if(!(Be!=null&&Be.includes("[")))et=et===""?et+Be.replaceAll("/",""):et+"/"+Be.replaceAll("/","");else{let Te=v.cloneDeep(Be).slice(1,((He=v.cloneDeep(Be))==null?void 0:He.length)-1),at=(Ke=(je=(Le=(ze=(xt=v.cloneDeep(Te))==null?void 0:xt.split("["))==null?void 0:ze[1])==null?void 0:Le.split("]"))==null?void 0:je[0])==null?void 0:Ke.split(":"),Ve="",Ge=(M=h==null?void 0:h.find(Ie=>(Ie==null?void 0:Ie.name)===(at==null?void 0:at[0])))==null?void 0:M.compData;Ge==null||Ge.forEach(Ie=>{var dt;(Ie==null?void 0:Ie.key)==="formContent"&&((dt=Ie==null?void 0:Ie.contents)==null||dt.forEach(ut=>{(ut==null?void 0:ut.key)===(at==null?void 0:at[1])&&(Ve=ut==null?void 0:ut.value)}))}),et=et===""?et+Ve.replaceAll("/",""):et+"/"+Ve.replaceAll("/","")}}),tt=et,tt[(tt==null?void 0:tt.length)-1]!=="/")return tt}}}))==null?void 0:pe.filter(H=>H);S=[...new Set(v.cloneDeep(S))];let G=S==null?void 0:S.map(async H=>{let P=await Se.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",Me);if((P==null?void 0:P.length)===0)return await Se.getParentContents(H)});await Promise.all(G);let L=[],de=(ae=(re=(Q=v.cloneDeep(ee))==null?void 0:Q.extraValues)==null?void 0:re.output)==null?void 0:ae.map(async H=>{var he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et,Be,He,xt,ze,Le,je,Ke,M,Te,at,Ve,Ge,Ie,dt,ut,st,ft,yt,Nt,Rt,Vt,_t,Lt,kt,Ht,Yt,Ot,Aa,wa,Va,ja,Da,Ka,Ca,Ua,Wa,Ha,qa,Ga,Oa,ba,fa,_a,ka,na,ga,Xa,wt,Zt,mt,fn,Mt,ca,Ea,oa,ma,Qt;if((we=(he=Object.values(H))==null?void 0:he[0])!=null&&we.includes(".doc")){var P=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),Ee=w.headers["content-disposition"],oe=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),X=oe.exec(Ee),ne=X==null?void 0:X[1],q=document.createElement("a"),ve=window.URL.createObjectURL(P);b.value=[{name:ne,blobUrl:ve}],u.value=!0}else{let Ma=(Re=(rt=(We=(De=v.cloneDeep((j=Object.values(H))==null?void 0:j[0]))==null?void 0:De.split("["))==null?void 0:We[((Qe=(Ae=v.cloneDeep((ue=Object.values(H))==null?void 0:ue[0]))==null?void 0:Ae.split("["))==null?void 0:Qe.length)-1])==null?void 0:rt.split("]"))==null?void 0:Re[0],Tt=Ma==null?void 0:Ma.split(":"),qt=(et=v.cloneDeep((gt=Object.values(H))==null?void 0:gt[0]))==null?void 0:et.substring(0,v.cloneDeep((tt=Object.values(H))==null?void 0:tt[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(He=v.cloneDeep(qt))==null?void 0:He.slice(0,((Be=v.cloneDeep(qt))==null?void 0:Be.length)-1):qt===""&&(qt=D.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Et="";(xt=Se.contentTransArrayToAll(qt,"/"))==null||xt.forEach((At,Ut)=>{var Wt,Ft,ua,la,za,Ya,La,Ja,En,rn,vn;if(!(At!=null&&At.includes("[")))Et=Et===""?Et+At.replaceAll("/",""):Et+"/"+At.replaceAll("/","");else{let ln="",va="";(Wt=v.cloneDeep(At))!=null&&Wt.includes("]")?(ln=v.cloneDeep(At).slice(1,((Ft=v.cloneDeep(At))==null?void 0:Ft.length)-1),va=(La=(Ya=(za=(la=(ua=v.cloneDeep(ln))==null?void 0:ua.split("["))==null?void 0:la[1])==null?void 0:za.split("]"))==null?void 0:Ya[0])==null?void 0:La.split(":")):(ln=v.cloneDeep(At).slice(1,(Ja=v.cloneDeep(At))==null?void 0:Ja.length),va=(En=v.cloneDeep(ln))==null?void 0:En.split("/"));let Za="",sn=(rn=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(va==null?void 0:va[0])))==null?void 0:rn.compData;sn==null||sn.forEach(ia=>{var Sn;(ia==null?void 0:ia.key)==="formContent"&&((Sn=ia==null?void 0:ia.contents)==null||Sn.forEach(Fa=>{(Fa==null?void 0:Fa.key)===(va==null?void 0:va[1])&&(Za=Fa==null?void 0:Fa.value)}))}),((vn=Se.contentTransArrayToAll(qt,"/"))==null?void 0:vn.length)-1!==Ut?Et=Et===""?Et+Za.replaceAll("/",""):Et+"/"+Za.replaceAll("/",""):Et=Et+r.value+Za.replaceAll("/","")}}),(ze=D.value)!=null&&ze.includes(Et)?qt=D.value:qt=Et}let ra=v.cloneDeep((Le=Object.keys(H))==null?void 0:Le[0]);if(((je=w==null?void 0:w.data)==null?void 0:je.statusCode)===200||((Ke=w==null?void 0:w.data)==null?void 0:Ke.code)===200){if(((Te=(M=w==null?void 0:w.data)==null?void 0:M.data)!=null&&Te[ra]||(Ve=(at=w==null?void 0:w.data)==null?void 0:at.result)!=null&&Ve[ra])&&(Tt==null?void 0:Tt.length)===1)return await te(((Ie=(Ge=w==null?void 0:w.data)==null?void 0:Ge.data)==null?void 0:Ie[ra])||((ut=(dt=w==null?void 0:w.data)==null?void 0:dt.result)==null?void 0:ut[ra]),v.cloneDeep(qt),Tt,C);if((ft=(st=w==null?void 0:w.data)==null?void 0:st.data)!=null&&ft[ra]||(Nt=(yt=w==null?void 0:w.data)==null?void 0:yt.result)!=null&&Nt[ra]){let Et=await $e(((Vt=(Rt=w==null?void 0:w.data)==null?void 0:Rt.data)==null?void 0:Vt[ra])||((Lt=(_t=w==null?void 0:w.data)==null?void 0:_t.result)==null?void 0:Lt[ra]),v.cloneDeep(qt),Tt);return Et&&(L=[...L,...Et]),Et}else{if(!((kt=w==null?void 0:w.data)!=null&&kt.data)){let Et=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Me);Et=Et==null?void 0:Et.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(Tt==null?void 0:Tt[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map(Ft=>{var ua;return(Ft==null?void 0:Ft.key)==="formContent"&&(Ft.contents=(ua=Ft.contents)==null?void 0:ua.map(la=>{var za,Ya;return(la==null?void 0:la.key)===(Tt==null?void 0:Tt[1])&&(la.value=(Ya=(za=w==null?void 0:w.data)==null?void 0:za.result)==null?void 0:Ya[ra==null?void 0:ra.replaceAll(":","")]),la})),Ft})),Ut});let At=[];(Ht=Et==null?void 0:Et.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ht.forEach(async Ut=>{let Wt={};for(let Ft in Ut)Ft!=="id"&&(Wt[Ft]=Ut[Ft]);At.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(At==null?void 0:At.length)>0&&await v.batchUpdateInsofDataApi({dataList:At});return}if((Tt==null?void 0:Tt.length)===1){const Et=(Aa=(Ot=(Yt=w==null?void 0:w.data)==null?void 0:Yt.data)==null?void 0:Ot.path)==null?void 0:Aa.path;let At="";(Ka=(Da=(ja=(Va=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:Va.split(")"))==null?void 0:ja[0])==null?void 0:Da.split(":"))==null||Ka.forEach(Ft=>{var ua,la;At=At===""?At+((ua=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:ua.trim()):At+"/"+((la=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:la.trim())});let Ut=[(qa=(Ha=(Wa=(Ua=(Ca=Et==null?void 0:Et.split("<"))==null?void 0:Ca[1])==null?void 0:Ua.split(">"))==null?void 0:Wa[0])==null?void 0:Ha.replaceAll("'",""))==null?void 0:qa.trim()],Wt;return(ba=(Oa=(Ga=w==null?void 0:w.data)==null?void 0:Ga.data)==null?void 0:Oa.data)!=null&&ba[Tt==null?void 0:Tt[0]]?Wt=await te((ka=(_a=(fa=w==null?void 0:w.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ka[Tt==null?void 0:Tt[0]],At,Tt,C):Wt=await _e((ga=(na=w==null?void 0:w.data)==null?void 0:na.data)==null?void 0:ga.data,At,Ut,Me),Wt}else{const Et=(Zt=(wt=(Xa=w==null?void 0:w.data)==null?void 0:Xa.data)==null?void 0:wt.path)==null?void 0:Zt.path;let At="";return(Ea=(ca=(Mt=(fn=(mt=Et==null?void 0:Et.split("("))==null?void 0:mt[1])==null?void 0:fn.split(")"))==null?void 0:Mt[0])==null?void 0:ca.split(":"))==null||Ea.forEach(Wt=>{var Ft,ua;At=At===""?At+((Ft=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:Ft.trim()):At+"/"+((ua=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:ua.trim())}),await $e((Qt=(ma=(oa=w==null?void 0:w.data)==null?void 0:oa.data)==null?void 0:ma.data)==null?void 0:Qt[Tt==null?void 0:Tt[0]],At,Tt)}}}}});if(await Promise.all(de),(L==null?void 0:L.length)>0){let H=[];L==null||L.forEach(oe=>{H!=null&&H.find(X=>{var ne,q,ve,he;return((q=(ne=X==null?void 0:X.value)==null?void 0:ne.pageData)==null?void 0:q.name)===((he=(ve=oe==null?void 0:oe.value)==null?void 0:ve.pageData)==null?void 0:he.name)})||H.push(oe)});let P=[];H==null||H.forEach(oe=>{var q,ve,he,we;let X=v.cloneDeep(oe);X.value.pageData.compData=(q=X.value.pageData.compData)==null?void 0:q.map(j=>{var De;return(j==null?void 0:j.key)==="formContent"&&(j.contents=(De=j.contents)==null?void 0:De.map(ue=>{var Qe,We,rt,Re;let Ae=(Qe=v.cloneDeep(L))==null?void 0:Qe.find(gt=>(gt==null?void 0:gt.keyType)===(ue==null?void 0:ue.key));if(Ae){let gt=(Re=(rt=(We=Ae.value.pageData.compData)==null?void 0:We.find(tt=>(tt==null?void 0:tt.key)==="formContent"))==null?void 0:rt.contents)==null?void 0:Re.find(tt=>(tt==null?void 0:tt.key)===(ue==null?void 0:ue.key));ue.value=gt==null?void 0:gt.value}return ue})),j}),P.push({id:X==null?void 0:X.id,value:X==null?void 0:X.value});let ne=[];(we=(he=(ve=X==null?void 0:X.value)==null?void 0:ve.pageData)==null?void 0:he.compData)==null||we.forEach(j=>{var De;(j==null?void 0:j.key)==="formContent"&&((De=j==null?void 0:j.contents)==null||De.forEach(ue=>{var Ae,Qe,We,rt,Re,gt;if((Qe=(Ae=ue==null?void 0:ue.optionUrl)==null?void 0:Ae.menuSelect)!=null&&Qe.find(tt=>tt==null?void 0:tt.includes("[")))if(ne!=null&&ne.find(tt=>{var et,Be,He;return((et=tt==null?void 0:tt.key)==null?void 0:et.join(","))===((He=(Be=ue==null?void 0:ue.optionUrl)==null?void 0:Be.menuSelect)==null?void 0:He.join(","))})){let tt=(We=ne==null?void 0:ne.find(et=>{var Be,He,xt;return((Be=et==null?void 0:et.key)==null?void 0:Be.join(","))===((xt=(He=ue==null?void 0:ue.optionUrl)==null?void 0:He.menuSelect)==null?void 0:xt.join(","))}))==null?void 0:We.value;tt.push({key:ue==null?void 0:ue.prop,groups:(rt=ue==null?void 0:ue.optionUrl)==null?void 0:rt.groupSelect,value:ue==null?void 0:ue.value}),ne=ne==null?void 0:ne.map(et=>{var Be,He,xt;return((Be=et==null?void 0:et.key)==null?void 0:Be.join(","))===((xt=(He=ue==null?void 0:ue.optionUrl)==null?void 0:He.menuSelect)==null?void 0:xt.join(","))&&(et.value=tt),et})}else ne.push({key:(Re=ue==null?void 0:ue.optionUrl)==null?void 0:Re.menuSelect,value:[{key:ue==null?void 0:ue.prop,groups:(gt=ue==null?void 0:ue.optionUrl)==null?void 0:gt.groupSelect,value:ue==null?void 0:ue.value}]})}))}),(ne==null?void 0:ne.length)>0&&(ne=ne==null?void 0:ne.map(j=>{var ue;let De="";return(ue=j==null?void 0:j.key)==null||ue.forEach(Ae=>{var Qe;if(!(Ae!=null&&Ae.includes("[")))De=De===""?De+Ae:De+"/"+Ae;else{let We="",rt=(Qe=Ae==null?void 0:Ae.replaceAll("[","").replaceAll("]",""))==null?void 0:Qe.split(":");h==null||h.forEach(Re=>{var gt;(Re==null?void 0:Re.name)===(rt==null?void 0:rt[0])&&((gt=Re==null?void 0:Re.compData)==null||gt.forEach(tt=>{var et;(tt==null?void 0:tt.key)==="formContent"&&((et=tt==null?void 0:tt.contents)==null||et.forEach(Be=>{(Be==null?void 0:Be.prop)===(rt==null?void 0:rt[1])&&(We=Be==null?void 0:Be.value)}))}))}),De=De+r.value+We}}),j.key=De,j})),ne==null||ne.forEach(j=>{var Qe,We,rt;let De=(Qe=Me[j.key])==null?void 0:Qe.find(Re=>{var gt,tt,et,Be,He,xt,ze;return((tt=(gt=Re==null?void 0:Re.value)==null?void 0:gt.pageData)==null?void 0:tt.name)===((He=(Be=(et=j==null?void 0:j.value)==null?void 0:et[0])==null?void 0:Be.groups)==null?void 0:He[0])&&((ze=(xt=Re==null?void 0:Re.value)==null?void 0:xt.pageData)==null?void 0:ze.name)!==void 0}),ue=De==null?void 0:De.id,Ae=(We=De==null?void 0:De.value)==null?void 0:We.pageData;Ae.compData=(rt=Ae.compData)==null?void 0:rt.map(Re=>{var gt;return(Re==null?void 0:Re.key)==="formContent"&&(Re.contents=(gt=Re.contents)==null?void 0:gt.map(tt=>{var Be;let et=(Be=j.value)==null?void 0:Be.find(He=>(He==null?void 0:He.key)===(tt==null?void 0:tt.prop));return et&&(tt.value=et.value),tt})),Re}),P.push({id:ue,value:{pageData:Ae}})})});let Ee=(se=v.cloneDeep(L))==null?void 0:se[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}x.setFreshContent(!0)}V.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),V.setImportLoading(!1)}E.value=!0},ge=["createInsofDataApi"],Ye=vo(async ee=>{ce(ee)},100),nt=async ee=>{var qe,me,F,J,fe;const z=v.cloneDeep(ee);let be,xe=new WeakMap,Fe=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value});(me=(qe=Fe.data.result)==null?void 0:qe.filter(pe=>{var Q,re;return((Q=pe==null?void 0:pe.key)==null?void 0:Q.pageKey)!=="menu"&&((re=pe==null?void 0:pe.key)==null?void 0:re.pageKey)!=="secret"}))==null||me.forEach(pe=>{xe[pe.key.pageKey]?xe[pe.key.pageKey]=[...xe[pe.key.pageKey],pe]:xe[pe.key.pageKey]=[pe]}),ee!=null&&ee[0].path&&(be=await(z==null?void 0:z.map(async(pe,Q)=>{var I,W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he;const ae=(I=xe[pe==null?void 0:pe.path])==null?void 0:I.filter(we=>{var j;return((j=we==null?void 0:we.key)==null?void 0:j.type)==="data"});let se="";const Me=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);ae==null||ae.forEach(we=>{var j,De,ue,Ae,Qe;((De=(j=we==null?void 0:we.value)==null?void 0:j.tableData)==null?void 0:De.算法名称)===((ue=z==null?void 0:z[Q])==null?void 0:ue.method)&&(se=(Qe=(Ae=we==null?void 0:we.value)==null?void 0:Ae.tableData)==null?void 0:Qe.算法体)});const ot=await Se.getItemData(pe==null?void 0:pe.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);let h="",C=(G=(S=(w=(W=ot==null?void 0:ot[0])==null?void 0:W.compData)==null?void 0:w.find(we=>(we==null?void 0:we.key)==="header"))==null?void 0:S.contents)==null?void 0:G.findIndex(we=>(we==null?void 0:we.prop)==="算法体");return(de=(L=ot==null?void 0:ot[0])==null?void 0:L.compData)==null||de.forEach(we=>{var j;(we==null?void 0:we.key)==="tableContents"&&((j=we==null?void 0:we.contents)==null||j.forEach(De=>{De!=null&&De.find(ue=>ue===(pe==null?void 0:pe.method))&&(h=De[C])}))}),{buttonName:((H=z==null?void 0:z[Q])==null?void 0:H.method)||((oe=(Ee=(P=ae==null?void 0:ae[0])==null?void 0:P.value)==null?void 0:Ee.tableData)==null?void 0:oe.算法名称),api:(se===""?(q=(ne=(X=ae==null?void 0:ae[0])==null?void 0:X.value)==null?void 0:ne.tableData)==null?void 0:q.算法体:se)||h,content:Me==null?void 0:Me.filter(we=>we.comp!=="methodButton"),extraContent:(ve=v.cloneDeep(pe.value))==null?void 0:ve.slice(1),methodName:(pe==null?void 0:pe.path)??"",extraValues:(he=z==null?void 0:z[Q])==null?void 0:he.data}})));const Oe=z==null?void 0:z.map(async pe=>{var ot,h,C,I,W,w;const Q=(ot=Fe.data.result)==null?void 0:ot.filter(S=>{var G,L,de;return((G=S==null?void 0:S.key)==null?void 0:G.parentTable)===""&&((L=S==null?void 0:S.key)==null?void 0:L.type)==="method"&&((de=S==null?void 0:S.key)==null?void 0:de.methodName)===S.method}),re=Q==null?void 0:Q[0],ae=(h=Fe.data.result)==null?void 0:h.filter(S=>{var G,L;return((G=S==null?void 0:S.key)==null?void 0:G.type)==="methodData"&&((L=S==null?void 0:S.key)==null?void 0:L.tableId)===(re==null?void 0:re.id)}),se=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe),Me=ae==null?void 0:ae[0];return{buttonName:(C=re==null?void 0:re.key)==null?void 0:C.methodKey,api:(W=(I=Me==null?void 0:Me.value)==null?void 0:I.tableData)==null?void 0:W[0],content:se==null?void 0:se.filter(S=>S.comp!=="methodButton"),extraContent:(w=v.cloneDeep(pe.value))==null?void 0:w.slice(1),methodName:(pe==null?void 0:pe.method)??""}}),Ze=(F=ee==null?void 0:ee[0])!=null&&F.path&&((J=ee==null?void 0:ee[0])==null?void 0:J.path)!==""?await Promise.all(be):await Promise.all(Oe);i.value=Ze==null?void 0:Ze.filter(pe=>pe==null?void 0:pe.extraContent),(fe=i.value)==null||fe.forEach(pe=>{var Q;pe.api===""&&((Q=pe.content)==null||Q.forEach(re=>{var ae;re.comp=="Table"&&x.setExtraContents(Se.methodTableToContent(re.compData,(ae=pe.extraContent)==null?void 0:ae[0]))}))})};return e.watch(()=>d.itemData,async()=>{O.value=="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{immediate:!0,deep:!0}),(ee,z)=>{var be,xe,Fe;return e.unref(O)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((be=i.value)==null?void 0:be.filter(Oe=>(Oe==null?void 0:Oe.buttonName)!=="保存"),Oe=>{var Ze;return e.openBlock(),e.createElementBlock("div",null,[Oe.api!==""?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,disabled:e.unref(K)===e.unref(D)&&!((Ze=Oe==null?void 0:Oe.buttonName)!=null&&Ze.includes("预览")),class:"calculator-content",modelValue:Oe.buttonName,onClickTrigger:qe=>e.unref(Ye)(Oe),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ke)!==""&&((Fe=e.unref(D))==null?void 0:Fe[((xe=e.unref(D))==null?void 0:xe.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ye,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Xe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=zt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=zt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),b=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}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),x=e.ref({}),_=e.ref([]),V=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:x.value}]}),R=Y=>{var K;x.value=v.cloneDeep(Y),r("change",(K=V())==null?void 0:K.compData)},Z=Y=>{var K,ie;if((Y==null?void 0:Y.buttonName)==="确认"){const D=v.cloneDeep(Y==null?void 0:Y.content);switch(u.value){case"create":_.value.push({...D,index:((K=_.value)==null?void 0:K.length)+1});break}r("change",(ie=V())==null?void 0:ie.compData),d.visible=!1}else d.visible=!1},O=(Y,K)=>{var ie,D;switch(Y){case"create":(ie=f.value)==null||ie.forEach($=>{$.value=""}),u.value="create",d.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),u.value="update",d.visible=!0;break;case"delete":_.value.splice(K,1),u.value="delete";break}},ke=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var K,ie;Y&&(x.value=((K=Y==null?void 0:Y.find(D=>D.key==="signConfig"))==null?void 0:K.contents)??{},_.value=((ie=Y==null?void 0:Y.find(D=>D.key==="signTypeList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(Y,K)=>{const ie=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.label),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>O("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>O("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(St.ssForm,{rowContents:g.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:ke,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:Z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=zt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var V,R;return(V=s==null?void 0:s.stepConfig)!=null&&V.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),b=(V,R)=>{d.value=R,r("clickStep",V,R)},g=V=>St.getComponent(V),f=()=>{var R;const V=(R=s==null?void 0:s.stepList)==null?void 0:R.find((Z,O)=>O+1===u.value);return console.log("findStep",V),V?V==null?void 0:V.children:[]},x=V=>{r("clickTrigger",V)},_=V=>{r("changeTrigger",V)};return(V,R)=>{var ke,Y,K,ie,D;const Z=e.resolveComponent("el-step"),O=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(O,{direction:(ke=n.stepConfig)==null?void 0:ke.direction,active:u.value,"finish-status":"success",simple:(Y=n.stepConfig)==null?void 0:Y.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,($,y)=>(e.openBlock(),e.createBlock(Z,{key:y,class:"step-item",onClick:B=>b($,y+1)},{title:e.withCtx(()=>[e.renderSlot(V.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(V.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ie=n.stepConfig)!=null&&ie.allowTrigger&&((D=n.stepConfig)!=null&&D.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),($,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":B=>$.value=B,onClickTrigger:x,onChangeTrigger:_,content:$==null?void 0:$.content},e.createSlots({_:2},[e.renderList(V.$slots,(B,E)=>({name:E,fn:e.withCtx(ye=>[e.renderSlot(V.$slots,E,e.mergeProps({ref_for:!0},ye||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=zt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),b=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,x;u.value=(f=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:f.contents,d.value=(x=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(g,f)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(x,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,b)=>(e.openBlock(),e.createBlock(r,{key:b,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=zt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,b;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(b=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(b),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=zt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(St.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=zt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Oc={class:"type-select"},Mc=["onClick"],zc={class:"list-icon"},Lc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:x=>r(g)},[e.createElementVNode("div",zc,[e.createVNode(b,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=zt._export_sfc(Lc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},jc={class:"collapse-title-item"},Kc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),b=e.ref([]),g=Z=>{var ke;let O=(ke=v.cloneDeep(b.value))==null?void 0:ke.map((Y,K)=>(Z===K&&(Y.content=!0),Y));b.value=O},f=Z=>{var ke;let O=(ke=v.cloneDeep(b.value))==null?void 0:ke.map((Y,K)=>(Z===K&&(Y.content=!1),Y));b.value=O,d.value=v.cloneDeep(s.value)},x=(Z,O)=>{var ie;let ke=(ie=v.cloneDeep(b.value))==null?void 0:ie.map((D,$)=>(Z===$&&(D.content=!1),D));b.value=ke;const Y=v.cloneDeep(s.value),K=Y==null?void 0:Y.filter((D,$)=>($===Z&&(D.name=O),D));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var Z,O,ke;!s.value||((Z=s.value)==null?void 0:Z.length)===0?d.value=[]:d.value=(O=v.cloneDeep(s.value))==null?void 0:O.filter(Y=>(Y==null?void 0:Y.comp)!=="methodButton"),u.value=d.value,b.value=(ke=v.cloneDeep(u.value))==null?void 0:ke.map((Y,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const _=Z=>on(Z),V=(Z,O,ke)=>{var K,ie;if(!Z)return;let Y=v.cloneDeep(s.value);Y=(K=Y==null?void 0:Y.map((D,$)=>($===ke&&(D.compData=Z),D)))==null?void 0:K.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),b.value=(ie=v.cloneDeep(Y))==null?void 0:ie.map((D,$)=>({id:$,content:!1})),i.setOriginalData(Y),i.setItemData(Y)},R=Z=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const O=v.cloneDeep(s.value),ke=O==null?void 0:O.filter((Y,K)=>K!==Z);i.setOriginalData(ke),i.setItemData(ke),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(Z,O)=>{const ke=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[O[1]||(O[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(gr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:Y,index:K})=>{var ie,D,$,y,B,E,ye,Xe,it,Ne;return[e.createElementVNode("div",$c,[e.createElementVNode("div",jc,[(D=(ie=b.value)==null?void 0:ie.find($e=>$e.id===K))!=null&&D.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:Y.name&&Y.name!==""?"8px":"0px"})},e.toDisplayString(Y.name),5)),(y=($=b.value)==null?void 0:$.find($e=>$e.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",Kc,[e.createVNode(St._sfc_main$2,{modelValue:Y.name,"onUpdate:modelValue":$e=>Y.name=$e,onClick:O[0]||(O[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(E=(B=b.value)==null?void 0:B.find($e=>$e.id===K))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers($e=>g(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Xe=(ye=b.value)==null?void 0:ye.find($e=>$e.id===K))!=null&&Xe.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(ke,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers($e=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(ke,{name:"Save",onClick:e.withModifiers($e=>x(K,Y.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ne=(it=b.value)==null?void 0:it.find($e=>$e.id===K))!=null&&Ne.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers($e=>R(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:Y,index:K})=>{var ie,D;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(_(Y.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(Y.comp+"Operate")),{itemContents:Y==null?void 0:Y.compData,originalItemContents:(D=(ie=u.value)==null?void 0:ie.find(($,y)=>y===K))==null?void 0:D.compData,onChange:$=>V($,Y,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=zt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>on(u);return(u,b)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=zt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),x=e.ref(!1),_=e.ref(-1),V=e.ref(new WeakMap),R=e.ref(null),Z=Qn(v.pinia),{itemData:O}=v.storeToRefs(Z),ke=()=>{b.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},Y=ee=>{b.value="修改标签页",g.value.title=d.value[ee].title,f.value=ee,u.value=!0},K=ee=>{const z=$(ee);V.value.delete(z),d.value.splice(ee,1),nt()},ie=()=>{if(g.value.title.trim()){if(f.value===-1){const ee={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:D()};d.value.push(ee)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,nt()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=ee=>{const z=d.value[ee];return z.id||(z.id=D()),z.id},y=ee=>{var xe;_.value=ee;const z=$(ee);R.value=v.cloneDeep(O.value);let be=V.value.get(z);!be&&((xe=d.value[ee].children)==null?void 0:xe.length)>0&&(be=Xe(d.value[ee].children)),be?Z.setItemData(v.cloneDeep(be)):Z.setItemData([]),x.value=!0},B=e.computed(()=>{const ee=$t.useModelComp(v.pinia),z=v.storeToRefs(ee).itemData.value;return console.log("可用组件数据",z),!z||!Array.isArray(z)?[]:z.filter(be=>{var xe;if(be.comp==="Tabs"&&_.value>=0){const Fe=$(_.value);if((xe=be.compData)==null?void 0:xe.some(Ze=>{var qe;return Ze.key==="stepList"&&((qe=Ze.contents)==null?void 0:qe.some(me=>me.id===Fe))}))return!1}return!0})}),E=ee=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ee]||ee,ye=ee=>{var z;try{const be=v.cloneDeep(ee);be.id=Date.now()+Math.random(),be.comp==="Tabs"&&((z=be.compData)==null||z.forEach(Fe=>{Fe.key==="stepList"&&Fe.contents&&Fe.contents.forEach(Oe=>{Oe.id=D()})}));const xe=v.cloneDeep(O.value);xe.push(be),Z.setItemData(xe)}catch(be){console.error("添加组件失败:",be)}},Xe=ee=>ee.map(z=>{var be;switch(z.type){case"form":return{comp:"Form",name:z.value||"表单",compData:it(z.content)};case"table":return{comp:"Table",name:z.value||"表格",compData:Ne(z.content)};default:return{comp:"Unknown",name:z.value||"",compData:((be=z.content)==null?void 0:be.originalData)||[]}}}),it=ee=>{if(!ee)return[];const z=[];return ee.rowContents&&z.push({key:"formContent",contents:ee.rowContents}),ee.buttonValue&&z.push({key:"formButton",contents:ee.buttonValue}),typeof ee.isEnableWrap<"u"&&z.push({key:"enableWrap",contents:ee.isEnableWrap}),z},Ne=ee=>[],$e=()=>{if(_.value>=0&&_.value<d.value.length){const ee=$(_.value);V.value.set(ee,v.cloneDeep(O.value)),d.value[_.value].children=te(O.value),console.log("保存后的数据",te(O.value))}x.value=!1,_.value=-1,R.value=null,nt()},_e=()=>{R.value&&Z.setItemData(v.cloneDeep(R.value)),x.value=!1,_.value=-1,R.value=null},A=()=>{x.value&&_e()},te=ee=>{if(!Array.isArray(ee))throw new Error("sourceData must be an array");return ee.map((z,be)=>{if(!z||typeof z!="object")return z;const{comp:xe,name:Fe,compData:Oe}=z;switch(xe){case"Form":return{type:"form",content:ce(Oe||[]),value:"表单"};case"Table":return{type:"table",content:ge(Oe||[]),value:"表格"};default:return{type:"xxx",content:Ye(Oe||[]),value:""}}})},ce=ee=>{const z={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},be={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ee.forEach((xe,Fe)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Fe}:`,xe);return}const{key:Oe,contents:Ze}=xe,qe=be[Oe];if(!qe){console.warn(`Unknown Form config key: ${Oe}`);return}Oe==="enableWrap"?z[qe]=!!Ze:z[qe]=Array.isArray(Ze)?Ze:[]}),z},ge=ee=>{const z={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},be={header:"columns",tableContents:"tableData"};return ee.forEach((xe,Fe)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Fe}:`,xe);return}const{key:Oe,contents:Ze}=xe,qe=be[Oe];if(!qe){console.warn(`Unknown Table config key: ${Oe}`);return}z[qe]=Array.isArray(Ze)?Ze:[]}),z},Ye=ee=>(console.log("Default conversion logic - to be implemented"),{originalData:ee,processed:!1,componentType:"unknown"}),nt=()=>{const ee=[{key:"stepList",contents:d.value}];r("change",ee)};return e.watch(()=>s.itemContents,ee=>{if(ee&&ee.length>0){const z=ee.find(be=>be.key==="stepList");z&&z.contents&&(d.value=z.contents.map(be=>({title:be.title||"",value:be.value||be.title||"",label:be.label||be.title||"",children:be.children||[],id:be.id||D()})))}},{immediate:!0,deep:!0}),(ee,z)=>{const be=e.resolveComponent("svg-icon"),xe=e.resolveComponent("el-input"),Fe=e.resolveComponent("el-form-item"),Oe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[z[6]||(z[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ke},[e.createVNode(be,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),z[5]||(z[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Ze,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",nu,e.toDisplayString(Ze.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:me=>Y(qe)},"修改标题",8,ru),e.createElementVNode("button",{onClick:me=>y(qe)},"布局调整",8,lu),e.createElementVNode("button",{onClick:me=>K(qe)},"删除",8,iu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":z[2]||(z[2]=Ze=>u.value=Ze),title:b.value,onBeforeDestroy:z[3]||(z[3]=Ze=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:z[1]||(z[1]=Ze=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ie},"确定")]),default:e.withCtx(()=>[e.createVNode(Oe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Fe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(xe,{modelValue:g.value.title,"onUpdate:modelValue":z[0]||(z[0]=Ze=>g.value.title=Ze),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":z[4]||(z[4]=Ze=>x.value=Ze),title:"布局调整",fullScreen:"",onBeforeDestroy:A},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:_e},"取消"),e.createElementVNode("button",{onClick:$e},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[z[8]||(z[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,Ze=>(e.openBlock(),e.createElementBlock("div",{key:Ze.id,class:"component-item",onClick:qe=>ye(Ze)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(E(Ze.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(Ze.name),1)]),z[7]||(z[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:ee.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=zt._export_sfc(mu,[["__scopeId","data-v-9096ed0d"]]);function bu(){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 ku(n){return{type:"line",...n}}function xu(){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 wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Na={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},Lo=$t.useMenuState(v.pinia),Er=(n,i)=>{var _;const s=[],r=[],{group:d,nameCol:u,valueCol:b}=i||{},g=n==null?void 0:n.find(V=>{const{name:R}=V;return R===d});if(!g)return{names:s,values:r};const f=(_=g==null?void 0:g.compData)==null?void 0:_.find(V=>{const{key:R}=V;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(V=>{const R=V==null?void 0:V[0];let Z=!1;v.isObject(R)&&(R!=null&&R.id)&&(Z=!0);let O=u,ke=b;Z&&(O=O+1,ke=ke+1);const Y=V==null?void 0:V[O],K=V==null?void 0:V[ke];s.push(Y),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:b}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(b&&Lo.activeMenuPath&&(g=await Se.getItemData(`${Lo.activeMenuPath}`,f,"")),!b){const x=i==null?void 0:i.join("/");g=await Se.getItemData(`${x}^${s}`,f,"")}return Er(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),g=await Se.getItemData(u,b,"");return Er(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:b}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:x,valueCol:_,isSelfDetail:V}=i||{};return g&&f&&St.isNumber(x)&&St.isNumber(_)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:x,detailValueCol:_,isSelfDetail:V}):St.isNumber(u)&&St.isNumber(b)?await Eu({menu:r,group:d,nameCol:u,valueCol:b}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const V=g({data:_});return f.series.push(V),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const V=g({data:_});return f.series.push(V),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;const V=[];for(let Z=0;Z<x.length;Z++){const O=x[Z],ke=_[Z];V.push({name:O,value:ke})}const R=g({data:V});return f.series.push(R),f},Bu=async(n=[])=>{var b,g,f;const i=((b=n==null?void 0:n.find(x=>x.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((g=n==null?void 0:n.find(x=>x.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(x=>x.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=zt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},zu={class:"form-content"},Lu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},ju=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var Q;u.value=b(),(Q=u.value)==null||Q.forEach(re=>{var se;const ae=re==null?void 0:re.prop;re.value=(se=g==null?void 0:g.value)==null?void 0:se[ae]}),d.visible=!0},x=Q=>{g.value=Q},_=()=>{var Q;d.visible=!1,r("change",(Q=fe())==null?void 0:Q.compData)},V=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=e.ref([]),Z=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],O=e.ref({}),ke=()=>{const Q=R.value,re=v.cloneDeep(Q);return re==null||re.forEach(ae=>{var Me;const se=ae==null?void 0:ae.prop;ae.value=(Me=O.value)==null?void 0:Me[se]}),re},Y=Q=>{var ae;O.value=Q;const re=ke();R.value=re,r("change",(ae=fe())==null?void 0:ae.compData)},K=async()=>{const Q=await Se.getMenusContent(),re=ke();re==null||re.forEach(ae=>{(ae==null?void 0:ae.prop)==="menu"&&(ae.contents=Q)}),R.value=re,V.visible=!0,await Ze(O.value.menu),await F(O.value.group)},ie=e.reactive({visible:!1,width:"840",title:"详情页配置"}),D=e.ref([]),$=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),B=()=>{const Q=D.value,re=v.cloneDeep(Q);return re==null||re.forEach(ae=>{var Me;const se=ae==null?void 0:ae.prop;ae.value=(Me=y.value)==null?void 0:Me[se]}),re},E=Q=>{var ae;y.value=Q;const re=B();D.value=re,r("change",(ae=fe())==null?void 0:ae.compData)},ye=async()=>{await A();const Q=v.cloneDeep(Xe.value),re=B();re==null||re.forEach(ae=>{var Me;const se=ae==null?void 0:ae.prop;ae.value=(Me=y==null?void 0:y.value)==null?void 0:Me[se],se==="mainKey"&&(ae.contents=Q)}),D.value=re,ie.visible=!0},Xe=e.ref([]),it=e.ref([]),Ne=e.ref({}),$e=e.ref({}),_e=()=>{const{compData:Q}=xe.value||{},re=Q==null?void 0:Q.find(I=>{const{key:W}=I;return W==="header"}),ae=(re==null?void 0:re.contents)||[],se=ae==null?void 0:ae.filter((I,W)=>{const{label:w}=I;return w!=="操作"}),Me=se==null?void 0:se.findIndex((I,W)=>{const{isMainKey:w}=I;return w});if(Me<0)return[];const ot=Q==null?void 0:Q.find(I=>{const{key:W}=I;return W==="tableContents"}),h=(ot==null?void 0:ot.contents)||[];return h==null?void 0:h.map(I=>{const W=I==null?void 0:I[0];let w=Me;v.isObject(W)&&(W!=null&&W.id)&&(w=w+1);const S=I==null?void 0:I[w];return{label:S,value:S}})},A=async()=>{const Q=await _e();Xe.value=Q},te=async Q=>{const re=sessionStorage.getItem("systemKey");return await Se.getItemData(Q,re,"")},ce=async Q=>{const re=Q;it.value=re==null?void 0:re.map(ae=>{const{name:se}=ae;return Ne.value[se]=ae,{label:se,value:se}})},ge=Q=>{const{comp:re,compData:ae}=$e.value||{};if(re==="Table"){let se=B();se=se.filter(Me=>{const{prop:ot}=Me;return ot!=="formItems"}),qe(se,ae),D.value=se}},Ye=async()=>{var ae,se;const Q=(ae=y==null?void 0:y.value)==null?void 0:ae.mainKey,re=(se=O==null?void 0:O.value)==null?void 0:se.menu;if(Q){const ot=`${re==null?void 0:re.join("/")}^${Q}`,h=await te(ot);await ce(h);const C=B();C==null||C.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=it.value)}),D.value=C}};e.watch(()=>{var Q;return(Q=y==null?void 0:y.value)==null?void 0:Q.mainKey},async(Q,re)=>{Q!=re&&Q&&await Ye()});const nt=async Q=>{const re=Ne.value[Q];$e.value=re,await ge()};e.watch(()=>{var Q;return(Q=y==null?void 0:y.value)==null?void 0:Q.group},async(Q,re)=>{Q!=re&&Q&&nt(Q)});const ee=async()=>{var re;await Ye();const Q=(re=y.value)==null?void 0:re.group;await nt(Q)},z=e.ref([]),be=e.ref({}),xe=e.ref({}),Fe=async Q=>{const re=Q==null?void 0:Q.join("/"),ae=sessionStorage.getItem("systemKey");return await Se.getItemData(re,ae,"")},Oe=async Q=>{const re=await Fe(Q);z.value=re==null?void 0:re.map(ae=>{const{name:se}=ae;return be.value[se]=ae,{label:se,value:se}})},Ze=async(Q,re)=>{await Oe(Q);const ae=ke();ae==null||ae.forEach(se=>{(se==null?void 0:se.prop)==="group"&&(se.contents=z.value)}),R.value=ae};e.watch(()=>{var Q;return(Q=O==null?void 0:O.value)==null?void 0:Q.menu},async(Q,re)=>{const ae=Q==null?void 0:Q.join("/"),se=re==null?void 0:re.join("/");ae!=se&&await Ze(Q)});const qe=(Q,re)=>{const ae=re==null?void 0:re.find(h=>{const{key:C}=h;return C==="header"}),se=(ae==null?void 0:ae.contents)||[],Me=se==null?void 0:se.filter((h,C)=>{const{label:I}=h;return I!=="操作"}),ot=Me==null?void 0:Me.map((h,C)=>{const{label:I}=h;return{label:I,value:C}});Q==null||Q.forEach(h=>{const C=h==null?void 0:h.prop;(C==="nameCol"||C==="valueCol")&&(h.contents=ot)})},me=Q=>{const{comp:re,compData:ae}=xe.value||{};if(re==="Table"){O.value.formItems=[];let se=ke();se=se.filter(Me=>{const{prop:ot}=Me;return ot!=="formItems"}),qe(se,ae),R.value=se}},F=async Q=>{const re=be.value[Q];xe.value=re,await me()};e.watch(()=>{var Q;return(Q=O==null?void 0:O.value)==null?void 0:Q.group},async(Q,re)=>{Q!=re&&F(Q)});const J=async()=>{var ae,se;const Q=(ae=O.value)==null?void 0:ae.menu;await Ze(Q);const re=(se=O.value)==null?void 0:se.group;await F(re)},fe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:O.value},{key:"chartDetailConfig",contents:y.value}]}),pe=()=>{d.visible=!1,V.visible=!1,ie.visible=!1};return e.onMounted(async()=>{var re,ae,se;R.value=Z(),D.value=$();const Q=s==null?void 0:s.itemContents;g.value=((re=Q==null?void 0:Q.find(Me=>Me.key==="chartBaseConfig"))==null?void 0:re.contents)??{},O.value=((ae=Q==null?void 0:Q.find(Me=>Me.key==="chartDataConfig"))==null?void 0:ae.contents)??{},await J(),y.value=((se=Q==null?void 0:Q.find(Me=>Me.key==="chartDetailConfig"))==null?void 0:se.contents)??{},await ee()}),(Q,re)=>{const ae=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[re[4]||(re[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(ae,{id:"themeButton",onClick:re[0]||(re[0]=se=>f())},{default:e.withCtx(()=>re[3]||(re[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[re[6]||(re[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(ae,{id:"themeButton",onClick:re[1]||(re[1]=se=>K())},{default:e.withCtx(()=>re[5]||(re[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[re[8]||(re[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(ae,{id:"themeButton",onClick:re[2]||(re[2]=se=>ye())},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:pe,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",zu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lu,[e.createVNode(ae,{class:"cancel-button button",onClick:pe,id:"themeBorderButton"},{default:e.withCtx(()=>re[9]||(re[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(ae,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>re[10]||(re[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:V.visible,title:V.title,onBeforeDestroy:pe,width:V.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(ae,{class:"cancel-button button",onClick:pe,id:"themeBorderButton"},{default:e.withCtx(()=>re[11]||(re[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ae,{class:"ok-button button",onClick:pe,id:"themeButton"},{default:e.withCtx(()=>re[12]||(re[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:ie.visible,title:ie.title,onBeforeDestroy:pe,width:ie.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(ae,{class:"cancel-button button",onClick:pe,id:"themeBorderButton"},{default:e.withCtx(()=>re[13]||(re[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ae,{class:"ok-button button",onClick:pe,id:"themeButton"},{default:e.withCtx(()=>re[14]||(re[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Ku=zt._export_sfc(ju,[["__scopeId","data-v-fe119645"]]);var Ln={exports:{}},Uu=Ln.exports,Fo;function Wu(){return Fo||(Fo=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(x,_){return typeof _>"u"?_={autoBom:!1}:typeof _!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),_={autoBom:!_}),_.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(x.type)?new Blob(["\uFEFF",x],{type:x.type}):x}function r(x,_,V){var R=new XMLHttpRequest;R.open("GET",x),R.responseType="blob",R.onload=function(){f(R.response,_,V)},R.onerror=function(){console.error("could not download file")},R.send()}function d(x){var _=new XMLHttpRequest;_.open("HEAD",x,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function u(x){try{x.dispatchEvent(new MouseEvent("click"))}catch{var _=document.createEvent("MouseEvents");_.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),x.dispatchEvent(_)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Se.commonjsGlobal=="object"&&Se.commonjsGlobal.global===Se.commonjsGlobal?Se.commonjsGlobal:void 0,g=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(x,_,V){var R=b.URL||b.webkitURL,Z=document.createElement("a");_=_||x.name||"download",Z.download=_,Z.rel="noopener",typeof x=="string"?(Z.href=x,Z.origin===location.origin?u(Z):d(Z.href)?r(x,_,V):u(Z,Z.target="_blank")):(Z.href=R.createObjectURL(x),setTimeout(function(){R.revokeObjectURL(Z.href)},4e4),setTimeout(function(){u(Z)},0))}:"msSaveOrOpenBlob"in navigator?function(x,_,V){if(_=_||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(s(x,V),_);else if(d(x))r(x,_,V);else{var R=document.createElement("a");R.href=x,R.target="_blank",setTimeout(function(){u(R)})}}:function(x,_,V,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof x=="string")return r(x,_,V);var Z=x.type==="application/octet-stream",O=/constructor/i.test(b.HTMLElement)||b.safari,ke=/CriOS\/[\d]+/.test(navigator.userAgent);if((ke||Z&&O||g)&&typeof FileReader<"u"){var Y=new FileReader;Y.onloadend=function(){var D=Y.result;D=ke?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=D:location=D,R=null},Y.readAsDataURL(x)}else{var K=b.URL||b.webkitURL,ie=K.createObjectURL(x);R?R.location=ie:location.href=ie,R=null,setTimeout(function(){K.revokeObjectURL(ie)},4e4)}});b.saveAs=f.saveAs=f,n.exports=f})}(Ln)),Ln.exports}Wu();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DSc4zqmL.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Sr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Tr=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),b=d==null?void 0:d.filter(_=>_!==(u==null?void 0:u[s])),g=s+1,f=Tr(b,u,g),x=[];x.push(d==null?void 0:d[0]),f==null||f.forEach(_=>{x.push(_)}),d=x}return d})),r},eo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(b=>b===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let b=v.cloneDeep(i),g=u==null?void 0:u.filter(V=>V!==(b==null?void 0:b[r])),f=r+1,x=eo(g,b,s,f),_=[];_.push(u==null?void 0:u[0]),x==null||x.forEach(V=>{_.push(V)}),u=_}return u})),d},go=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(b=>Array.isArray(b))&&(u!=null&&u.every(b=>Array.isArray(b)&&b.length===1)?u=u==null?void 0:u.map(b=>((b==null?void 0:b[0])===s&&(b=[r]),b)):u=u==null?void 0:u.map(b=>{if(b!=null&&b.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=b==null?void 0:b.filter(R=>R!==(g==null?void 0:g[d])),x=d+1,_=go(f,g,s,r,x),V=[];V.push(b==null?void 0:b[0]),_==null||_.forEach(R=>{V.push(R)}),b=V}return b})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:jn,DynamicIcon:Sr,ssDialog:Xt.ssDialog,ssInput:St._sfc_main$2},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=$t.useMenuState(),b=$t.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),x=e.ref(0),_=Pl.useRouter(),V=e.ref(),{asideMenus:R,menuTriggerType:Z,platform:O}=v.storeToRefs(u),{fixMenuStatus:ke}=v.storeToRefs(b),Y=e.computed(()=>r==null?void 0:r.mode),K=me=>me==null?void 0:me.map(J=>{var fe,pe;return!(J!=null&&J.children)||((fe=J==null?void 0:J.children)==null?void 0:fe.length)===0?J.config=d.value:J!=null&&J.children&&((pe=J==null?void 0:J.children)==null?void 0:pe.length)>0&&(J.children=K(J.children)),J}),ie=e.computed(()=>{let me=[...R.value];if((me==null?void 0:me.length)===0)return _.push("/"),[];const F=Xe(me,E.value);return F.isFlag||(me=F==null?void 0:F.data),me=me==null?void 0:me.map(J=>{var fe,pe;return!(J!=null&&J.children)||((fe=J==null?void 0:J.children)==null?void 0:fe.length)===0?J.config=d.value:J!=null&&J.children&&((pe=J==null?void 0:J.children)==null?void 0:pe.length)>0&&(J.children=K(J.children)),J}),me}),D=async(me,F)=>{b.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(me==null?void 0:me.path),u.setActiveAsideMenu(me),me.isRouter?_.push(me.path):_.push("/"),s("node-click",me,F)},$=async me=>{const F=v.findNodeByPropInTree(ie.value,"path",me);u.setActiveAsideMenu(F),b.setRouteToChildPath(""),ke.value?b.setFixMenuStatus(!1):Z.value==="click"?x.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(me):(u.setMenuTriggerType("click"),u.setActiveMenuPath(me)),me!=null&&me.startsWith("/")?_.push(me):_.push("/"),x.value++},y=me=>{u.setActiveMenuPath(me)},B=me=>{const F=document.documentElement;me==null||me.forEach(J=>{F.style.setProperty(J.name,J.value)})};e.onMounted(()=>{x.value=1});const E=e.computed(()=>{const me=sessionStorage.getItem("authority");return me?JSON.parse(me):[]});e.watch(()=>O.value,me=>{me==="browser"?B(yn.browserVerticalMenuClasses):me==="client"?(B(yn.clientHorizontalMenuClasses),B(yn.clientVerticalMenuClasses)):me==="three"&&(B(yn.threeHorizontalMenuClasses),B(yn.threeVerticalMenuClasses))},{immediate:!0});const ye=(me,F)=>{function J(fe){fe==null||fe.forEach(pe=>{var re,ae;const Q=(re=pe==null?void 0:pe.path)!=null&&re.startsWith("/")?(ae=pe==null?void 0:pe.path)==null?void 0:ae.substring(1):pe==null?void 0:pe.path;pe.show=F==null?void 0:F.some(se=>se==null?void 0:se.includes(Q)),pe.children&&J(pe.children)})}return J(me),me},Xe=(me,F)=>{if(Array.isArray(F)){const J=Array.from(new Set(F==null?void 0:F.map(fe=>fe.substring(0,fe.lastIndexOf("/")))));return{data:ye(me,J),isFlag:!1}}else return{isFlag:(F==null?void 0:F.toUpperCase())==="SUPERADMIN"}},it=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Ne=me=>on(me),$e=e.ref({}),_e=e.ref([]),A=e.ref({}),te=e.ref({}),ce=me=>{switch(me){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},ge=e.ref({}),Ye=me=>{u.setCacheInputMenu({type:it.type,data:me}),u.setIsRefreshMenus(!0)},nt=async(me,F,J)=>{var fe,pe,Q,re,ae,se,Me,ot,h,C,I,W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et,Be,He,xt,ze;if(F==="create"){let Le=(J==null?void 0:J.title)+"(1)",je=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ke=(pe=(fe=je==null?void 0:je.data)==null?void 0:fe.result)==null?void 0:pe[0],M=(Q=Ke==null?void 0:Ke.value)==null?void 0:Q.pageData;M.compData=(re=M.compData)==null?void 0:re.map(Ve=>{var Ge;return(Ve==null?void 0:Ve.key)==="menuContents"&&(Ve.contents=eo(Ve.contents,(Ge=J==null?void 0:J.path)==null?void 0:Ge.split("/"),Le)),Ve}),await v.updateInsofDataApi({id:Ke==null?void 0:Ke.id,value:{pageData:M}});let Te=(se=(ae=J==null?void 0:J.path)==null?void 0:ae.split("/"))==null?void 0:se.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}),at=await Se.getItemData((h=(ot=(Me=J==null?void 0:J.path)==null?void 0:Me.split("/"))==null?void 0:ot.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(Te.push(Le),Te=Te==null?void 0:Te.join("/"),(at==null?void 0:at.length)>0){let Ve=at==null?void 0:at[0],Ge=(I=(C=Ve==null?void 0:Ve.compData)==null?void 0:C.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:I.contents;if(((W=Ge==null?void 0:Ge[0])==null?void 0:W.directiveLabel)==="#isMain"){let Ie=(w=Ge==null?void 0:Ge[0])==null?void 0:w.prop,dt=(G=(S=Ve==null?void 0:Ve.compData)==null?void 0:S.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:G.contents,ut;dt==null||dt.forEach(st=>{var ft,yt;if(st.length===1)((ft=st==null?void 0:st[0])==null?void 0:ft[Ie])===(J==null?void 0:J.title)&&(ut=st==null?void 0:st[0],ut[Ie]=Le);else{let Nt=(yt=Ge==null?void 0:Ge.filter(_t=>_t!=="操作"))==null?void 0:yt.map(_t=>_t==null?void 0:_t.prop),Rt=st==null?void 0:st.filter(_t=>!(_t!=null&&_t.id)),Vt=Se.getValueToObjectValue(Rt,Nt);Vt[Ie]=Le,ut=Vt}}),await v.createInsofDataApi({key:{type:"data",pageKey:(H=(de=(L=J==null?void 0:J.path)==null?void 0:L.split("/"))==null?void 0:de.filter((st,ft)=>{var yt,Nt;return ft!==((Nt=(yt=J==null?void 0:J.path)==null?void 0:yt.split("/"))==null?void 0:Nt.length)-1}))==null?void 0:H.join("/"),tableId:Ve==null?void 0:Ve.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Ee=f.value)==null?void 0:Ee.dept)||((oe=f.value)==null?void 0:oe.部门名称)},value:{tableData:ut}})}}await Se.newLoadingConstruct(J==null?void 0:J.path,Te),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((q=(ne=(X=J==null?void 0:J.path)==null?void 0:X.split("/"))==null?void 0:ne.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}))==null?void 0:q.join("/")),u.setActiveTopMenuPath((he=(ve=J==null?void 0:J.path)==null?void 0:ve.split("/"))==null?void 0:he[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(F==="update")V.value=J;else if(F==="delete"){let Le=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:J==null?void 0:J.path}}),je=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ke=(j=(we=je==null?void 0:je.data)==null?void 0:we.result)==null?void 0:j[0],M=(De=Ke==null?void 0:Ke.value)==null?void 0:De.pageData;if(M.compData=(ue=M.compData)==null?void 0:ue.map(Ve=>{var Ge;return(Ve==null?void 0:Ve.key)==="menuContents"&&(Ve.contents=Tr(Ve.contents,(Ge=J==null?void 0:J.path)==null?void 0:Ge.split("/"))),Ve}),await v.updateInsofDataApi({id:Ke==null?void 0:Ke.id,value:{pageData:M}}),((Qe=(Ae=Le==null?void 0:Le.data)==null?void 0:Ae.result)==null?void 0:Qe.length)>0){let Ve=(rt=(We=Le==null?void 0:Le.data)==null?void 0:We.result)==null?void 0:rt.map(Ge=>Ge==null?void 0:Ge.id);(Ve==null?void 0:Ve.length)>0&&await v.batchDeleteInsofDataApi({ids:Ve})}let Te=await Se.getItemData((tt=(gt=(Re=J==null?void 0:J.path)==null?void 0:Re.split("/"))==null?void 0:gt.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}))==null?void 0:tt.join("/"),sessionStorage.getItem("systemKey"),""),at=[];(Te==null?void 0:Te.length)>0&&(Te==null||Te.forEach(Ve=>{var Ie,dt,ut,st,ft,yt,Nt,Rt,Vt,_t,Lt;let Ge=(st=(ut=(dt=(Ie=Ve==null?void 0:Ve.compData)==null?void 0:Ie.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:dt.contents)==null?void 0:ut[0])==null?void 0:st.prop;((Rt=(Nt=(yt=(ft=Ve==null?void 0:Ve.compData)==null?void 0:ft.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:yt.contents)==null?void 0:Nt[0])==null?void 0:Rt.directiveLabel)==="#isMain"&&((Lt=(_t=(Vt=Ve==null?void 0:Ve.compData)==null?void 0:Vt.find(kt=>(kt==null?void 0:kt.key)==="tableContents"))==null?void 0:_t.contents)==null||Lt.forEach(kt=>{var Ht,Yt,Ot;(kt==null?void 0:kt.length)>1?(kt==null?void 0:kt[1])===(J==null?void 0:J.title)&&at.push((Ht=kt==null?void 0:kt[0])==null?void 0:Ht.id):((Yt=kt==null?void 0:kt[0])==null?void 0:Yt[Ge])===(J==null?void 0:J.title)&&at.push((Ot=kt==null?void 0:kt[0])==null?void 0:Ot.id)}))})),(at==null?void 0:at.length)>0&&await v.batchDeleteInsofDataApi({ids:at}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((He=(Be=(et=J==null?void 0:J.path)==null?void 0:et.split("/"))==null?void 0:Be.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}))==null?void 0:He.join("/")),u.setActiveTopMenuPath((ze=(xt=J==null?void 0:J.path)==null?void 0:xt.split("/"))==null?void 0:ze[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},ee=async(me,F)=>{var ot,h,C,I,W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et;let J=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),fe=(h=(ot=J==null?void 0:J.data)==null?void 0:ot.result)==null?void 0:h[0],pe=(C=fe==null?void 0:fe.value)==null?void 0:C.pageData;pe.compData=(I=pe.compData)==null?void 0:I.map(Be=>{var He,xt;return(Be==null?void 0:Be.key)==="menuContents"&&(Be.contents=go(Be.contents,(He=F==null?void 0:F.path)==null?void 0:He.split("/"),F==null?void 0:F.title,(xt=me==null?void 0:me.target)==null?void 0:xt.value)),Be}),fe!=null&&fe.id&&await v.updateInsofDataApi({id:fe==null?void 0:fe.id,value:{pageData:pe}});let Q=(w=(W=F==null?void 0:F.path)==null?void 0:W.split("/"))==null?void 0:w.filter((Be,He)=>{var xt,ze;return He!==((ze=(xt=F==null?void 0:F.path)==null?void 0:xt.split("/"))==null?void 0:ze.length)-1}),re=Q==null?void 0:Q.join("/");Q.push((S=me==null?void 0:me.target)==null?void 0:S.value),Q=Q==null?void 0:Q.join("/");let ae=await Se.getItemData(re,sessionStorage.getItem("systemKey"),"");if(((P=(H=(de=(L=(G=ae==null?void 0:ae[0])==null?void 0:G.compData)==null?void 0:L.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:de.contents)==null?void 0:H[0])==null?void 0:P.directiveLabel)==="#isMain"){let Be=(q=(ne=(X=(oe=(Ee=ae==null?void 0:ae[0])==null?void 0:Ee.compData)==null?void 0:oe.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:X.contents)==null?void 0:ne[0])==null?void 0:q.prop,He=(we=(he=(ve=ae==null?void 0:ae[0])==null?void 0:ve.compData)==null?void 0:he.find(Le=>(Le==null?void 0:Le.key)==="tableContents"))==null?void 0:we.contents,xt=(Ae=(ue=(De=(j=ae==null?void 0:ae[0])==null?void 0:j.compData)==null?void 0:De.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:ue.contents)==null?void 0:Ae.map(Le=>Le==null?void 0:Le.prop),ze;if(He==null||He.forEach(Le=>{var Ke;let je=Se.getValueToObjectValue(Le,xt);(je==null?void 0:je[Be])===F.title&&(ze=je,ze[Be]=(Ke=me==null?void 0:me.target)==null?void 0:Ke.value)}),ze){let Le={};for(let Ke in ze)Ke!=="id"&&(Le[Ke]=ze==null?void 0:ze[Ke]);let je=[{id:ze==null?void 0:ze.id,value:{tableData:Le}}];await v.batchUpdateInsofDataApi({dataList:je})}}let se=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:F==null?void 0:F.path}}),Me=(We=(Qe=se==null?void 0:se.data)==null?void 0:Qe.result)==null?void 0:We.map(Be=>({id:Be==null?void 0:Be.id,key:Be==null?void 0:Be.key}));Me=Me==null?void 0:Me.map(Be=>(Be.key.pageKey=Q,Be)),(Me==null?void 0:Me.length)>0&&await v.batchUpdateInsofDataApi({dataList:Me}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((gt=(Re=(rt=F==null?void 0:F.path)==null?void 0:rt.split("/"))==null?void 0:Re.filter((Be,He)=>{var xt,ze;return He!==((ze=(xt=F==null?void 0:F.path)==null?void 0:xt.split("/"))==null?void 0:ze.length)-1}))==null?void 0:gt.join("/")),u.setActiveTopMenuPath((et=(tt=F==null?void 0:F.path)==null?void 0:tt.split("/"))==null?void 0:et[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),V.value=void 0},z=async(me,F)=>{it.type=ce(F==null?void 0:F.operateType),await nt(F,it.type,me),te.value=me,ge.value=F},be=()=>{it.show=!1},xe=me=>me==null?void 0:me.filter(F=>F.allowInherit),Fe=()=>{var J,fe,pe,Q,re;let me;it.type==="create"&&(me=((J=te.value)==null?void 0:J.path)+"/"+A.value[(fe=A.value)==null?void 0:fe.prop]),it.type==="update"&&(me=(pe=te.value)==null?void 0:pe.path);const F={...te.value,config:xe((Q=te.value)==null?void 0:Q.config),children:[],childMenus:[],title:A.value[(re=A.value)==null?void 0:re.prop],path:me};console.log("clickSubmitForm",ge.value,te.value,F),Ye(F),it.show=!1},Oe=me=>{var J,fe;const F=(J=me==null?void 0:me.contents)==null?void 0:J.find(pe=>pe.key==="formContent");F&&(A.value=(fe=F==null?void 0:F.contents)==null?void 0:fe.reduce((pe,Q)=>(pe[Q.key]=Q.value,pe.prop=Q.key,pe),{}))},Ze=e.ref(!1);return{isCollapse:Ze,handleMenuCollapse:()=>{Ze.value=!Ze.value},handleCompChange:Oe,dialogForm:$e,dialogRenderComps:_e,getComponents:Ne,clickSubmitForm:Fe,dialogInfo:it,beforeDialogDestroy:be,clickMenuIcon:z,mode:Y,renderMenuList:ie,clickMenu:D,openMenu:$,closeMenu:y,changeMenuStyle:B,fixElement:V,onBlur:ee}}}}e.defineComponent(Ir());const $a=v.useLoginState(),{loginUserInfo:An}=v.storeToRefs($a),Pt=$t.useModelComp(v.pinia),Fn=e.ref(!1),{itemData:Hu,itemGridData:en,curStructureCompIds:Ro,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:Po,routeToChildPath:Xu,payloadTypes:mo,pageMapState:Kn,itemExtendData:Vn}=v.storeToRefs(Pt),Kt=$t.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:vt,platform:Kp,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(Kt),ha=Se.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Gt}=v.storeToRefs(ha),ed=Se.useOriginalState(v.pinia),{originalPath:to}=v.storeToRefs(ed),Jt=e.ref(),$o=$t.useAuthorityState(v.pinia),Un=e.ref(!0),pn=e.ref(0),Wn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=vt.value)!=null&&i.startsWith("/")?(s=vt.value)==null?void 0:s.substring(1):vt.value;return(n==null?void 0:n.includes(to.value))||await ud(n)}),td=()=>{Pt.setItemGridData([]),Pt.setIsEdit("edit"),Pt.setSubmitCurStructure(vt.value!=="/平台管理/菜单管理")},ad=()=>{Pt.setIsEdit("view"),Pt.setRefreshCurStructure(!0)},nd=async n=>{var b,g,f;let i=Qu.value,s=i==null?void 0:i.findIndex(x=>(x==null?void 0:x.value)===(n==null?void 0:n.value)),r=(b=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)==="parent"))==null?void 0:b.map(x=>x==null?void 0:x.value),d=r==null?void 0:r[0],u=(f=(g=i==null?void 0:i.filter((x,_)=>!(x!=null&&x.condition)&&_<=s))==null?void 0:g.map(x=>x.value))==null?void 0:f.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)!=="child"),ha.setSelectTitle(i),ha.setChooseTitle([])),Kt.setActiveMenuPath(d)},lo=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,b;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},b=v.batchDeleteInsofDataApi);const g=await b(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},jo=async(n,i,s,r)=>{var d,u,b,g,f,x,_,V,R,Z,O;try{const ke=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),Y=(g=(b=n==null?void 0:n.results)==null?void 0:b.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),ie=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let D;s?D=(V=(_=(x=Kn.value)==null?void 0:x[vt.value])==null?void 0:_.filter(y=>{var B,E,ye;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i&&((ye=(E=y==null?void 0:y.key)==null?void 0:E.relatedInfo)==null?void 0:ye.target)===r}))==null?void 0:V.map(y=>y==null?void 0:y.id):D=(O=(Z=(R=Kn.value)==null?void 0:R[vt.value])==null?void 0:Z.filter(y=>{var B;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i}))==null?void 0:O.map(y=>y==null?void 0:y.id);const $=D==null?void 0:D.filter(y=>!(ie!=null&&ie.includes(y))&&typeof y=="number");(ke==null?void 0:ke.length)>0&&await v.batchAddInsofDataApi({dataList:ke}),(Y==null?void 0:Y.length)>0&&await v.batchUpdateInsofDataApi({dataList:Y}),($==null?void 0:$.length)>0&&await v.batchDeleteInsofDataApi({ids:$})}catch(ke){throw new Error(ke)}},od=async n=>{var x,_,V,R,Z,O,ke,Y,K,ie;Kt.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return Kt.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(D=>D.id),r=s.filter(D=>{var $;return!(($=Ro.value)!=null&&$.includes(D))}),d=(x=Ro.value)==null?void 0:x.filter(D=>!s.includes(D)),u=[...r,...d].filter(D=>typeof D!==null&&typeof D<"u"),b=i==null?void 0:i.filter(D=>!D.id),g=i==null?void 0:i.filter(D=>D.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(lo(u,"delete",n)),b&&(b==null?void 0:b.length)>0&&f.push(lo(b,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(lo(g,"update",n)),en.value&&((_=en.value)!=null&&_.isDelete&&((R=(V=en.value)==null?void 0:V.results)==null?void 0:R.length)>0&&((O=(Z=en.value)==null?void 0:Z.results)!=null&&O.every(D=>typeof D=="number"))?await v.batchDeleteInsofDataApi({ids:(ke=en.value)==null?void 0:ke.results}):(console.log("itemGridData.value",en.value),f.push(await jo(en.value,"gridLayout")))),Vn.value)for(const D in Vn.value)f.push(await jo((Y=Vn.value)==null?void 0:Y[D],"extend",{target:D,compId:(ie=(K=Vn.value)==null?void 0:K[D])==null?void 0:ie.compId},D));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),Pt.setRefreshCurStructure(!0)}).catch(D=>{v.ElMessage.success(D)}),Kt.setContentLoading(!1)},Hn=n=>on(n),pt=e.ref([]),rd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),ld=async n=>{var r,d,u,b,g,f;let i=v.cloneDeep(vt).value;i=i+to.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const x=(g=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:g.map(V=>V==null?void 0:V.id),_=await v.batchDeleteInsofDataApi({ids:x});((f=_==null?void 0:_.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await $a.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),Pt.setTableLoading(!1)}},Ko=async n=>{var i,s;try{let r=v.cloneDeep(vt).value,d=[];if(Array.isArray(n)){n==null||n.forEach(b=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+to.value+((g=Object.values(b==null?void 0:b.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(b=>{var g;return((g=b==null?void 0:b.data)==null?void 0:g.code)===200}))){const b=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var x;return(x=f==null?void 0:f.data)==null?void 0:x.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:b});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await $a.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await ld(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{Pt.setTableLoading(!1)}},id=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:vt.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const b=await Promise.all([u]);(b==null?void 0:b.every(f=>{var x;return((x=f==null?void 0:f.data)==null?void 0:x.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),qn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,b,g,f,x,_,V,R,Z,O,ke,Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e,_e,A,te,ce,ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze,qe,me,F,J,fe,pe,Q,re,ae,se,Me,ot,h,C,I,W,w,S,G,L,de,H,P,Ee,oe,X,ne;qn.value=null;let r=vt.value;if((d=Jt.value)!=null&&d.compData&&((u=Jt.value)==null?void 0:u.compData)!==vt.value&&(r=r+"/"+((g=(b=Gt.value)==null?void 0:b[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await Ko(n):await Se.deleteTableContents((x=n==null?void 0:n.singleContent)==null?void 0:x.id,n),await $a.setLogRecordAsync({type:"删除",data:n},vt.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((_=n==null?void 0:n.selectItems)!=null&&_.every(q=>typeof(q==null?void 0:q.id)=="string")){const q=(V=n==null?void 0:n.selectItems)==null?void 0:V.map(ve=>({content:n==null?void 0:n.content,singleContent:ve,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await Ko(q)}else{const q=(R=n==null?void 0:n.selectItems)==null?void 0:R.map(ve=>ve==null?void 0:ve.id);await v.batchDeleteInsofDataApi({ids:q}),await $a.setLogRecordAsync({type:"删除",data:q},vt.value)}else if((n==null?void 0:n.buttonName)==="新增"){let q={};for(let he in n==null?void 0:n.singleContent)he!=="id"&&he!=="index"&&(q[he]=n==null?void 0:n.singleContent[he]);const ve=await Se.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(q),n==null?void 0:n.column,n,{param:s});if(qn.value={resId:ve,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((O=(Z=n==null?void 0:n.column)==null?void 0:Z[0])==null?void 0:O.directiveLabel)==="#isMain"&&((Y=(ke=n==null?void 0:n.column)==null?void 0:ke[0])==null?void 0:Y.directiveColor)!==!0){let he=(D=n==null?void 0:n.singleContent)==null?void 0:D[(ie=(K=n==null?void 0:n.column)==null?void 0:K[0])==null?void 0:ie.prop],we=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),j=vt.value+"/"+(he==null?void 0:he.slice(0,(he==null?void 0:he.length)-3)),De=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:j}}),ue=(y=($=we==null?void 0:we.data)==null?void 0:$.result)==null?void 0:y[0],Ae=(B=ue==null?void 0:ue.value)==null?void 0:B.pageData;if(Ae.compData=(E=Ae.compData)==null?void 0:E.map(Qe=>((Qe==null?void 0:Qe.key)==="menuContents"&&(Qe.contents=eo(Qe.contents,j==null?void 0:j.split("/"),he)),Qe)),await v.updateInsofDataApi({id:ue==null?void 0:ue.id,value:{pageData:Ae}}),((Xe=(ye=De==null?void 0:De.data)==null?void 0:ye.result)==null?void 0:Xe.length)>0)await Se.newLoadingConstruct(j,vt.value+"/"+he);else{let Qe=await v.getInsofDataApi({key:{pageKey:vt.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((Ne=(it=Qe==null?void 0:Qe.data)==null?void 0:it.result)==null?void 0:Ne.length)>=1?await Se.newLoadingCutFirstConstruct(vt.value+"/",vt.value+"/"+he):await Se.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+he)}Kt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),Kt.setIsRefreshMenus(!1),Kt.setIsRefreshMenus(!0),Kt.setActiveMenuPath((_e=($e=j==null?void 0:j.split("/"))==null?void 0:$e.filter((Qe,We)=>{var rt;return We!==((rt=j==null?void 0:j.split("/"))==null?void 0:rt.length)-1}))==null?void 0:_e.join("/"))}Pt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((te=(A=n==null?void 0:n.column)==null?void 0:A[0])==null?void 0:te.directiveLabel)==="#isMain"&&((ge=(ce=n==null?void 0:n.column)==null?void 0:ce[0])==null?void 0:ge.directiveColor)!==!0){let q=(ee=n==null?void 0:n.singleContent)==null?void 0:ee[(nt=(Ye=n==null?void 0:n.column)==null?void 0:Ye[0])==null?void 0:nt.prop];if(St.isNumber((z=n==null?void 0:n.singleContent)==null?void 0:z.id)){let ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),he=await v.getInsofDataApi({id:(be=n==null?void 0:n.singleContent)==null?void 0:be.id}),we=(F=(Ze=(Oe=(Fe=(xe=he==null?void 0:he.data)==null?void 0:xe.result)==null?void 0:Fe[0])==null?void 0:Oe.value)==null?void 0:Ze.tableData)==null?void 0:F[(me=(qe=n==null?void 0:n.column)==null?void 0:qe[0])==null?void 0:me.prop],j=vt.value+"/"+we,De=(fe=(J=ve==null?void 0:ve.data)==null?void 0:J.result)==null?void 0:fe[0],ue=(pe=De==null?void 0:De.value)==null?void 0:pe.pageData;ue.compData=(Q=ue.compData)==null?void 0:Q.map(Ae=>((Ae==null?void 0:Ae.key)==="menuContents"&&(Ae.contents=go(Ae.contents,j==null?void 0:j.split("/"),we,q)),Ae)),await v.updateInsofDataApi({id:De==null?void 0:De.id,value:{pageData:ue}}),Kt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),Kt.setIsRefreshMenus(!1),Kt.setIsRefreshMenus(!0),Kt.setActiveMenuPath((ae=(re=j==null?void 0:j.split("/"))==null?void 0:re.filter((Ae,Qe)=>{var We;return Qe!==((We=j==null?void 0:j.split("/"))==null?void 0:We.length)-1}))==null?void 0:ae.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let q=[],ve=[],he=((Me=(se=n==null?void 0:n.content)==null?void 0:se[0])==null?void 0:Me.id)??"",we=s==null?void 0:s.url,j="",De="";if(he!==""&&((ot=n==null?void 0:n.content)==null?void 0:ot.length)>1&&typeof((C=(h=n==null?void 0:n.content)==null?void 0:h[0])==null?void 0:C.id)!="string"){const ue=await v.getInsofDataApi({id:he});j=((S=(w=(W=(I=ue==null?void 0:ue.data)==null?void 0:I.result)==null?void 0:W[0])==null?void 0:w.key)==null?void 0:S.tableId)??"",De=((H=(de=(L=(G=ue==null?void 0:ue.data)==null?void 0:G.result)==null?void 0:L[0])==null?void 0:de.key)==null?void 0:H.pageKey)??""}(P=n==null?void 0:n.singleContent)==null||P.forEach(ue=>{let Ae={};for(let Qe in ue)Qe!=="id"&&Qe!=="index"&&(Ae[Qe]=ue[Qe]);typeof(ue==null?void 0:ue.id)=="number"?q.push({id:ue==null?void 0:ue.id,value:{tableData:Ae}}):ve.push({key:{type:i,pageKey:we||De||vt.value,tableId:j||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ae}})}),(ve==null?void 0:ve.length)>0&&await v.batchAddInsofDataApi({dataList:ve}),(q==null?void 0:q.length)>0&&await v.batchUpdateInsofDataApi({dataList:q})}else{let q={},ve=(Ee=n==null?void 0:n.singleContent)==null?void 0:Ee.id;for(let he in n==null?void 0:n.singleContent)he!=="id"&&he!=="index"&&(q[he]=n==null?void 0:n.singleContent[he]);await Se.fixTableContents(i,r,n==null?void 0:n.index,ve,sessionStorage.getItem("systemKey"),Object.values(q),n==null?void 0:n.column,n)}Pt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await id(n==null?void 0:n.value);Pt.setTableLoading(!1),(oe=n==null?void 0:n.column)!=null&&oe.some(q=>q==null?void 0:q.isMainKey),pt.value=await Se.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),pt.value=(X=pt.value)==null?void 0:X.filter(q=>{var ve;return((ve=q==null?void 0:q.compData)==null?void 0:ve.length)>0}),pt.value=(ne=pt.value)==null?void 0:ne.filter(q=>(q==null?void 0:q.comp)!==""),pt.value=Se.getDeepDiffItems(pt.value),bo.value&&(n==null?void 0:n.buttonName)!=="删除"&&Pt.setRefreshCurStructure(!0)},sd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,b;if(Fn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await sd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Se.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(Kt.setActiveMenuPath(null),Kt.setActiveMenuPath(i))},Yn=async n=>{pt.value=Se.getDeepDiffItems(n),Pt.setItemData(pt.value),Pt.setOriginalData(pt.value)},cd=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?$o.setRouterPageStructure(n):$o.setRouterPageStructure([])},ud=async n=>{var u,b,g,f,x,_;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((V,R)=>{var Z;((Z=n==null?void 0:n.split("/"))==null?void 0:Z.length)-2>R&&(i=i===""?i+V:i+"/"+V)}),(b=n==null?void 0:n.split("/"))==null||b.forEach((V,R)=>{var Z;((Z=n==null?void 0:n.split("/"))==null?void 0:Z.length)-1>R&&(s=s===""?s+V:s+"/"+V)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((_=(x=d==null?void 0:d.data)==null?void 0:x.result)==null?void 0:_.length)>0},dd=e.ref(),Ba=e.ref(null),pd=n=>{var x,_,V,R,Z,O,ke,Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e;const i=(_=(x=Kn.value)==null?void 0:x[n])==null?void 0:_.filter(_e=>{var A;return((A=_e==null?void 0:_e.key)==null?void 0:A.type)==="extend"});if((i==null?void 0:i.length)===0)return Ba.value=null;dd.value=i;const s=(R=(V=i==null?void 0:i.find(_e=>{var A,te,ce;return(ce=(te=(A=_e==null?void 0:_e.value)==null?void 0:A.tableData)==null?void 0:te.执行任务)==null?void 0:ce.includes("计时")}))==null?void 0:V.value)==null?void 0:R.tableData;if(!s)return Ba.value=null;const r=(ke=(O=(Z=i==null?void 0:i.find(_e=>{var A,te,ce;return(ce=(te=(A=_e==null?void 0:_e.value)==null?void 0:A.tableData)==null?void 0:te.执行任务)==null?void 0:ce.includes("计时")}))==null?void 0:Z.key)==null?void 0:O.relatedInfo)==null?void 0:ke.compId,d=(Y=pt.value)==null?void 0:Y.find(_e=>(_e==null?void 0:_e.id)===r);if(!d)return Ba.value=null;const u=(ie=s==null?void 0:s.任务关键词)==null?void 0:ie[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],b=(y=($=(D=d==null?void 0:d.compData)==null?void 0:D.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:$.contents)==null?void 0:y.findIndex(_e=>(_e==null?void 0:_e.prop)===u),g=(Xe=(ye=(E=(B=d==null?void 0:d.compData)==null?void 0:B.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:E.contents)==null?void 0:ye.find(_e=>_e==null?void 0:_e.isMainKey))==null?void 0:Xe.prop,f=($e=(Ne=(it=d==null?void 0:d.compData)==null?void 0:it.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:Ne.contents)==null?void 0:$e[b];Ba.value={prop:u,value:f,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:g},console.log("getPageExtendData:",s,i)},fd=()=>{var n,i;console.log("倒计时结束时"),$t.ElMessageBox.alert(`超时未提交,【${(i=(n=vt.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=vt.value)!=null&&n.includes(to.value)))return;const d=(i=pt.value)==null?void 0:i.find(f=>{var x;return((x=f==null?void 0:f.comp)==null?void 0:x.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},b=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=b==null?void 0:b.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&Pt.setLockingPage(vt.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},yo=e.ref([]),vd=e.computed(()=>{var n,i;return(i=(n=Kn.value)==null?void 0:n[vt.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{ha.setSelectTitle([]),ha.setChooseTitle([])},{deep:!0});e.watch(()=>[Gt.value],async()=>{var r,d,u,b,g,f,x,_,V,R,Z,O,ke,Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e,_e,A,te,ce,ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze,qe,me,F,J;if(((r=Jt.value)==null?void 0:r.compData)===vt.value||((d=Gt.value)==null?void 0:d.length)===0)return;Kt.setContentLoading(!0);let n=new WeakMap;if((b=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:u.filter(fe=>{var pe,Q;return((pe=fe==null?void 0:fe.key)==null?void 0:pe.pageKey)!=="menu"&&((Q=fe==null?void 0:fe.key)==null?void 0:Q.pageKey)!=="secret"}))==null||b.forEach(fe=>{n[fe.key.pageKey]?n[fe.key.pageKey]=[...n[fe.key.pageKey],fe]:n[fe.key.pageKey]=[fe]}),pt.value=await Se.getItemData(vt.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=pt.value)!=null&&g.find(fe=>(fe==null?void 0:fe.comp)==="")),Jt.value=(f=pt.value)==null?void 0:f.find(fe=>(fe==null?void 0:fe.comp)===""),((x=Jt.value)==null?void 0:x.compData)===vt.value){let fe=(_=vt.value)==null?void 0:_.split("/").map(pe=>({value:pe.trim()}));fe=[...fe,...Gt.value??[]]}else{let fe=(R=(V=Jt.value)==null?void 0:V.compData)==null?void 0:R.split("/").map(pe=>({value:pe.trim(),condition:"parent"}));if(!(!fe||(fe==null?void 0:fe.length)===0)){let pe=await Se.getItemData((Z=Jt.value)==null?void 0:Z.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);pe=pe==null?void 0:pe.filter(se=>{var Me,ot,h;return Array.isArray(se==null?void 0:se.compData)&&((h=(ot=(Me=se==null?void 0:se.compData)==null?void 0:Me.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:ot.contents)==null?void 0:h.find(C=>(C==null?void 0:C.directiveLabel)==="#isMain"))});let Q=(ie=(K=(Y=(ke=(O=pe==null?void 0:pe[0])==null?void 0:O.compData)==null?void 0:ke.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Y.contents)==null?void 0:K.find(se=>(se==null?void 0:se.directiveLabel)==="#isMain"))==null?void 0:ie.prop,re=(B=(y=($=(D=pe==null?void 0:pe[0])==null?void 0:D.compData)==null?void 0:$.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:y.contents)==null?void 0:B.findIndex(se=>(se==null?void 0:se.directiveLabel)==="#isMain"),ae=(it=(Xe=(ye=(E=pe==null?void 0:pe[0])==null?void 0:E.compData)==null?void 0:ye.find(se=>(se==null?void 0:se.key)==="tableContents"))==null?void 0:Xe.contents)==null?void 0:it.map(se=>{var Me;return(se==null?void 0:se.length)>1?se==null?void 0:se[re+1]:(Me=se==null?void 0:se[0])==null?void 0:Me[Q]});if(ae=ae==null?void 0:ae.map(se=>({label:se,value:se})),(Ne=Gt.value)==null||Ne.length,((_e=($e=Gt.value)==null?void 0:$e[0])==null?void 0:_e.value)!==""){let se=await Se.getItemData(vt.value+"/"+((te=(A=Gt.value)==null?void 0:A[0])==null?void 0:te.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value);se||(await Se.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+((ge=(ce=Gt.value)==null?void 0:ce[0])==null?void 0:ge.value)),se=await Se.getItemData(vt.value+"/"+((nt=(Ye=Gt.value)==null?void 0:Ye[0])==null?void 0:nt.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=se}}(fe==null?void 0:fe.length)>0&&((z=(ee=Gt.value)==null?void 0:ee[0])==null?void 0:z.value)===""&&(pt.value=[])}pt.value=(be=pt.value)==null?void 0:be.filter(fe=>(fe==null?void 0:fe.comp)!=="");let s="";if(!pt.value){let fe=(Oe=(Fe=(xe=vt.value)==null?void 0:xe.split("/"))==null?void 0:Fe.filter((pe,Q)=>{var re,ae;return Q!==((ae=(re=vt.value)==null?void 0:re.split("/"))==null?void 0:ae.length)-1}))==null?void 0:Oe.join("/");pt.value=await Se.getItemData(fe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(F=(Ze=vt.value)==null?void 0:Ze.split("/"))==null?void 0:F[((me=(qe=vt.value)==null?void 0:qe.split("/"))==null?void 0:me.length)-1]}await $a.setLogRecordAsync({type:"查询",data:pt.value},vt.value),s!==""&&(pt.value=(J=pt.value)==null?void 0:J.map(fe=>{var pe;return fe!=null&&fe.isShow&&(fe.compData=(pe=fe==null?void 0:fe.compData)==null?void 0:pe.map(Q=>{var re,ae,se,Me,ot;if((Q==null?void 0:Q.key)==="tableContents"){let h=[],C="";C=(Me=(se=(ae=(re=fe==null?void 0:fe.compData)==null?void 0:re.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:ae.contents)==null?void 0:se[0])==null?void 0:Me.prop,h=(ot=Q.contents)==null?void 0:ot.filter(I=>(I==null?void 0:I[C])===s||(I==null?void 0:I[1])===s),Q.contents=h}return Q})),fe})),pt.value=Se.getDeepDiffItems(pt.value),Kt.setContentLoading(!1)},{deep:!0});const hd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(b=>{var g,f,x;if((b==null?void 0:b.title)===(u==null?void 0:u[0])){let _=u.slice(1);Array.isArray(b==null?void 0:b.childMenus)&&((g=b==null?void 0:b.childMenus)==null?void 0:g.length)===0||(_!=null&&_[0]&&(_==null?void 0:_.length)!==0?r(b==null?void 0:b.childMenus,_):s=(x=(f=b==null?void 0:b.childMenus)==null?void 0:f[0])==null?void 0:x.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[vt.value,Gu.value],async n=>{var u,b,g,f,x,_,V,R,Z,O,ke,Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e,_e,A,te,ce,ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze,qe,me,F,J,fe,pe,Q,re,ae,se,Me,ot;if(!vt.value)return;Pt.setLockingPage(""),pt.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Un.value=!1,Fn.value=!0;const s=(b=n==null?void 0:n[0])!=null&&b.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((x=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:f.filter(h=>{var C,I;return((C=h==null?void 0:h.key)==null?void 0:C.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||x.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Wn.value=r,s){Kt.setContentLoading(!0),sessionStorage.setItem("pageKey",vt.value),ha.setSelectTitle([]),pt.value=await Se.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((_=pt.value)!=null&&_.find(I=>(I==null?void 0:I.comp)==="")),Jt.value=(V=pt.value)==null?void 0:V.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((R=Jt.value)!=null&&R.compData)){let I=hd(Zu.value,(Z=vt.value)==null?void 0:Z.split("/")),W=await Se.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);W!=null&&W.find(w=>(w==null?void 0:w.comp)==="")?h=(ke=(O=W==null?void 0:W.find(w=>(w==null?void 0:w.comp)===""))==null?void 0:O.compData)==null?void 0:ke.split("/").map(w=>({value:w.trim(),condition:"parent"})):ha.setChooseTitle([])}if(((Y=Jt.value)==null?void 0:Y.compData)===vt.value){let I=(K=vt.value)==null?void 0:K.split("/").map(W=>({value:W.trim()}));I=[...I,...Gt.value??[]],ha.setSelectTitle(I)}else{let I=[],W=(D=(ie=Jt.value)==null?void 0:ie.compData)==null?void 0:D.split("/").map(G=>({value:G.trim(),condition:"parent"}));if(!W||(W==null?void 0:W.length)===0)W=h,(W==null?void 0:W.length)===0&&(Jt.value={compData:vt.value});else{let G=await Se.getItemData(($=Jt.value)==null?void 0:$.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);G=G==null?void 0:G.filter(P=>{var Ee,oe,X;return Array.isArray(P==null?void 0:P.compData)&&((X=(oe=(Ee=P==null?void 0:P.compData)==null?void 0:Ee.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:oe.contents)==null?void 0:X.find(ne=>(ne==null?void 0:ne.directiveLabel)==="#isMain"))});let L=(Xe=(ye=(E=(B=(y=G==null?void 0:G[0])==null?void 0:y.compData)==null?void 0:B.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:E.contents)==null?void 0:ye.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Xe.prop,de=(_e=($e=(Ne=(it=G==null?void 0:G[0])==null?void 0:it.compData)==null?void 0:Ne.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:$e.contents)==null?void 0:_e.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),H=(ge=(ce=(te=(A=G==null?void 0:G[0])==null?void 0:A.compData)==null?void 0:te.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:ce.contents)==null?void 0:ge.map(P=>{var Ee;return(P==null?void 0:P.length)>1?P==null?void 0:P[de+1]:(Ee=P==null?void 0:P[0])==null?void 0:Ee[L]});if(H=H==null?void 0:H.map(P=>({label:P,value:P})),((Ye=Gt.value)==null?void 0:Ye.length)===0&&ha.setChooseTitle([{value:"",condition:"child",options:H,parentContent:(nt=Jt.value)==null?void 0:nt.compData}]),((z=(ee=Gt.value)==null?void 0:ee[0])==null?void 0:z.value)!==""){let P=await Se.getItemData(vt.value+"/"+((xe=(be=Gt.value)==null?void 0:be[0])==null?void 0:xe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Se.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+((Oe=(Fe=Gt.value)==null?void 0:Fe[0])==null?void 0:Oe.value)),P=await Se.getItemData(vt.value+"/"+((qe=(Ze=Gt.value)==null?void 0:Ze[0])==null?void 0:qe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=P}}(W==null?void 0:W.length)>0&&((F=(me=Gt.value)==null?void 0:me[0])==null?void 0:F.value)===""&&(pt.value=[]),I=[...I,...W??[]],I=[...I,...Gt.value??[]];let w=(J=vt.value)==null?void 0:J.split("/").map(G=>({value:G.trim()})),S=w==null?void 0:w.filter(G=>!(I!=null&&I.find(L=>(L==null?void 0:L.value)===(G==null?void 0:G.value))));I=[...I,...S??[]],ha.setSelectTitle(I)}pt.value=(fe=pt.value)==null?void 0:fe.filter(I=>(I==null?void 0:I.comp)!=="");let C="";if(!pt.value){let I=(Q=(pe=s==null?void 0:s.split("/"))==null?void 0:pe.filter((W,w)=>{var S;return w!==((S=s==null?void 0:s.split("/"))==null?void 0:S.length)-1}))==null?void 0:Q.join("/");pt.value=await Se.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),C=(ae=s==null?void 0:s.split("/"))==null?void 0:ae[((re=s==null?void 0:s.split("/"))==null?void 0:re.length)-1]}await $a.setLogRecordAsync({type:"查询",data:pt.value},vt.value),C!==""&&(pt.value=(se=pt.value)==null?void 0:se.map(I=>{var W;return I!=null&&I.isShow&&(I.compData=(W=I==null?void 0:I.compData)==null?void 0:W.map(w=>{var S,G,L,de,H;if((w==null?void 0:w.key)==="tableContents"){let P=[],Ee="";Ee=(de=(L=(G=(S=I==null?void 0:I.compData)==null?void 0:S.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:G.contents)==null?void 0:L[0])==null?void 0:de.prop,P=(H=w.contents)==null?void 0:H.filter(oe=>(oe==null?void 0:oe[Ee])===C||(oe==null?void 0:oe[1])===C),w.contents=P}return w})),I})),pt.value=Se.getDeepDiffItems(pt.value),await cd(pt.value),Or(),pd(s),yo.value=(Me=pt.value)==null?void 0:Me.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),Pt.setExtraContents([]),ha.setSelectIndex(""),ha.setSelectMenu(""),Pt.setItemData(pt.value),Pt.setOriginalData(pt.value),Pt.setCurStructureCompIds((ot=pt.value)==null?void 0:ot.map(I=>I==null?void 0:I.id)),Pt.setRefreshCurStructure(!1),Kt.setChildMenu(""),Kt.setContentLoading(!1),Pt.setTableLoading(!1),Fn.value=!1}else pt.value=[],Fn.value=!1;e.nextTick(()=>{pn.value=pn.value++,Un.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{var n,i,s,r,d,u,b,g,f,x,_,V,R,Z,O;if(Po.value){let ke=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:n.filter(y=>{var B,E;return((B=y==null?void 0:y.key)==null?void 0:B.pageKey)!=="menu"&&((E=y==null?void 0:y.key)==null?void 0:E.pageKey)!=="secret"}))==null||i.forEach(y=>{ke[y.key.pageKey]?ke[y.key.pageKey]=[...ke[y.key.pageKey],y]:ke[y.key.pageKey]=[y]});let K=vt.value;(s=Jt.value)!=null&&s.compData&&((r=Jt.value)==null?void 0:r.compData)!==vt.value&&(K=K+"/"+((u=(d=Gt.value)==null?void 0:d[0])==null?void 0:u.value));const ie=(g=(b=vt.value)==null?void 0:b[0])!=null&&g.startsWith("/")?(x=(f=vt.value)==null?void 0:f[0])==null?void 0:x.substring(1):(_=vt.value)==null?void 0:_[0];let D=await Se.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),$="";if(!pt.value){let y=(R=(V=ie==null?void 0:ie.split("/"))==null?void 0:V.filter((B,E)=>{var ye;return E!==((ye=ie==null?void 0:ie.split("/"))==null?void 0:ye.length)-1}))==null?void 0:R.join("/");D=await Se.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,ke),$=(O=ie==null?void 0:ie.split("/"))==null?void 0:O[((Z=ie==null?void 0:ie.split("/"))==null?void 0:Z.length)-1]}$!==""&&(D=D==null?void 0:D.map(y=>{var B;return y!=null&&y.isShow&&(y.compData=(B=y==null?void 0:y.compData)==null?void 0:B.map(E=>{var ye,Xe,it,Ne,$e;if((E==null?void 0:E.key)==="tableContents"){let _e=[],A="";A=(Ne=(it=(Xe=(ye=y==null?void 0:y.compData)==null?void 0:ye.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:Xe.contents)==null?void 0:it[0])==null?void 0:Ne.prop,_e=($e=E.contents)==null?void 0:$e.filter(te=>(te==null?void 0:te[A])===$||(te==null?void 0:te[1])===$),E.contents=_e}return E})),y})),D=D==null?void 0:D.filter(y=>(y==null?void 0:y.comp)!==""),pt.value=Se.getDeepDiffItems(D),Pt.setFreshContent(!1),Or()}},{deep:!0});const gd=async()=>{var d,u,b,g,f,x,_,V;Kt.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=An.value)==null?void 0:d.account)||((u=An.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=An.value)==null?void 0:b.account)||((g=An.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(x=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:x.map(R=>R==null?void 0:R.id);const r=(V=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:V.map(R=>R==null?void 0:R.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(R=>R!==null&&R))&&(await v.batchDeleteInsofDataApi({ids:s}),await $a.setLogRecordAsync({type:"删除",data:s},vt.value)),Kt.setActiveMenuPath(Xu.value),pt.value=null,Pt.setRouteToChildPath(""),Kt.setChildMenu("")},md=n=>new RegExp("button","i").test(n),yd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(yd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&Kt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zr=n=>{var i;Ba.value&&(Ba.value={...Ba.value,mainKeyPropValue:n==null?void 0:n[(i=Ba.value)==null?void 0:i.mainKeyProp]})},bd=n=>{Vr.value=n},un=e.reactive({index:0,comp:null}),kd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:xd(i,s)}))}),Lr=(n,i)=>{var f,x,_,V,R;const s=i?n:n-2,r=(f=pt.value)==null?void 0:f[s],d=(_=(x=r==null?void 0:r.compData)==null?void 0:x.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:_.contents,u=d==null?void 0:d.findIndex(Z=>(Z==null?void 0:Z.isMainKey)&&(Z==null?void 0:Z.label)!=="操作"),b=u===-1?0:u,g=(R=(V=r==null?void 0:r.compData)==null?void 0:V.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:R.contents;return{valid:g==null?void 0:g.every(Z=>Z==null?void 0:Z[b+1]),length:(g==null?void 0:g.length)||0}},xd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=Lr(i,!0);un.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,b;const i=n+1;if(i>1&&((d=(r=(s=pt.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=Lr(i);g?(un.index=i,un.comp=(u=pt.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else un.index=i,un.comp=(b=pt.value)==null?void 0:b[n]},bo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>bo.value,n=>{n&&Fr(0)},{immediate:!0});const wd={class:"layout"},Dd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(V=>{const{key:R}=V;return R==="baseConfig"});return x==null?void 0:x.contents}),b=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(V=>{const{key:R}=V;return R==="children"});return x==null?void 0:x.contents}),g=e.computed(()=>{let x=v.cloneDeep(b.value)||[];const _=x.length;let V=0;const R=[];if(x=x.map(Z=>{const O=Z.span;return O?(Z.span=Number(O),V=V+Z.span):R.push(Z),Z}),V<24){const Z=Math.floor((24-V)/_);R.forEach(O=>{O.span=Z})}return x}),f=x=>{s("rowClick",x)};return(x,_)=>{var Z;const V=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",wd,[e.createVNode(R,{style:e.normalizeStyle({height:(Z=u.value)==null?void 0:Z.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(O,ke)=>(e.openBlock(),e.createBlock(V,{span:O==null?void 0:O.span},{default:e.withCtx(()=>{var Y;return[e.unref(Un)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(O.comp)),{key:e.unref(pn),compName:O.name,index:(O==null?void 0:O.id)??ke,height:(Y=u.value)==null?void 0:Y.height,itemData:O==null?void 0:O.compData,childItemData:O==null?void 0:O.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Cd=zt._export_sfc(Dd,[["__scopeId","data-v-ab9a36ed"]]),_d={class:"layout-operate"},Ed={class:"layout-module"},Sd={class:"collapse-title-item"},Td={class:"collapse-title"},Id={class:"icon-content"},Bd=["onClick"],Nd={class:"comp-child"},Ad=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{ke()});const d=e.ref({}),u=e.ref({}),b=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",$(),!0)},x=e.ref([]),_=e.ref([]),V=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),Z=e.computed(()=>{const y=R==null?void 0:R.value,B=y==null?void 0:y.find(E=>{const{key:ye}=E;return ye==="baseConfig"});return B==null?void 0:B.contents}),O=e.computed(()=>{const y=R==null?void 0:R.value,B=y==null?void 0:y.find(E=>{const{key:ye}=E;return ye==="children"});return B==null?void 0:B.contents}),ke=()=>{var y;d.value=R.value||{},x.value=(O==null?void 0:O.value)||[],b.value=g(),b.value=(y=b.value)==null?void 0:y.map(B=>{var ye;const{prop:E}=B;return B.value=(ye=Z.value)==null?void 0:ye[E],B})};e.watch(()=>{var y;return(y=O==null?void 0:O.value)==null?void 0:y.length},()=>{var y;x.value=(O==null?void 0:O.value)||[],_.value=(y=O.value)==null?void 0:y.map(B=>V(B))},{immediate:!0});const Y=(y,B)=>{const E=v.cloneDeep(O==null?void 0:O.value);E[B].span=y.span,x.value=E,r("change",$(),!0)},K=y=>on(y),ie=(y,B,E)=>{if(!y)return;const ye=v.cloneDeep(O==null?void 0:O.value);ye[E]&&(ye[E].compData=y,x.value=ye,r("change",$(),!0))},D=y=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let B=v.cloneDeep(O==null?void 0:O.value);B=B==null?void 0:B.filter((E,ye)=>y!==ye),x.value=B,r("change",$(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:x==null?void 0:x.value}]});return(y,B)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",Ed,[B[1]||(B[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(St.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:B[0]||(B[0]=ye=>f(ye))},null,8,["rowContents"])])]),e.createVNode(gr.default,{class:"collapse-content",collapseContents:O.value},{title:e.withCtx(({item:ye,index:Xe})=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Td,e.toDisplayString(ye.name),1),e.createElementVNode("div",Id,[e.createElementVNode("div",{onClick:e.withModifiers(it=>D(Xe),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Bd)])])]),content:e.withCtx(({item:ye,index:Xe})=>[e.createElementVNode("div",Nd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:_.value[Xe],key:Xe,isEnableWrap:!0,onChange:it=>Y(it,Xe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(ye.comp+"Operate")),{itemContents:ye==null?void 0:ye.compData,originalItemContents:ye.compData,onChange:it=>ie(it,ye,Xe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Vd=zt._export_sfc(Ad,[["__scopeId","data-v-ba05456e"]]),Od=typeof window<"u";var Uo;Od&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(n){return n==null}function Rr(){}const Md=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(Md)));function zd(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Wo(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const b=Date.now(),g=b-r;clearTimeout(d),g>=i?(r=b,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function Ld(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const wn=new Set,$r=new WeakMap;function Fd(){wn.forEach(n=>{n(...$r.get(n))}),wn.clear()}function aa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!wn.has(n)&&(wn.add(n),wn.size===1&&Promise.resolve().then(Fd))}const jr=Symbol("LAYOUT_KEY"),Kr=Symbol("EMITTER_KEY");function Rd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=Pd(n[s]);return i}function Pd(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function cn(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let b=0,g=d.length;b<g;b++){let f=d[b];f.static||(f=$d(r,f,i,s),r.push(f)),u[n.findIndex(x=>x.i===f.i)]=f,f.moved=!1}return u}function $d(n,i,s,r){if(s)for(;i.y>0&&!Dn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Dn(n,i);)i.y--}let d;for(;d=Dn(n,i);)i.y=d.y+d.h;return i}function jd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Dn(s,u);)u.y++}return n}function Ho(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Dn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const b=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let x=qr(n);f&&(x=x.reverse());const _=Wr(x,i);if(u&&_.length)return i.x=b,i.y=g,i.moved=!1,n;for(let V=0,R=_.length;V<R;V++){const Z=_[V];Z.moved||i.y>Z.y&&i.y-Z.y>Z.h/4||(Z.static?n=qo(n,Z,i,d):n=qo(n,i,Z,d))}return n}function qo(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Dn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function Kd(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Ud(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function qd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const b=n[d];for(let g=0;g<s.length;g++)if(typeof b[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Gd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Go(n){return Xd(n)}function Xd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Xo(n,i,s,r){return Yd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Yd(n){return typeof n=="number"&&!Number.isNaN(n)}function Jd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const b=s[d];i>n[b]&&(r=b)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Zd(n,i,s,r,d,u,b){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),x=f.slice(f.indexOf(r));for(let _=0,V=x.length;_<V;_++){const R=x[_];if(i[R]){g=i[R];break}}return g=uo(g||[]),cn(jd(g,{cols:u}),b)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let Qd="auto";function ep(){return typeof document<"u"}function Yo(){return ep()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Qd}var kn={exports:{}},tp=kn.exports,Jo;function ap(){return Jo||(Jo=1,function(n,i){(function(s,r){n.exports=r()})(tp,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function b(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,ke(l.key),l)}}function g(a,t,o){return t&&b(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=ke(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function x(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&V(a,t)}function _(a){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(a)}function V(a,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},V(a,t)}function R(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Z(a){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,l=_(a);if(t){var c=_(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function O(){return O=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=_(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},O.apply(this,arguments)}function ke(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var Y=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,ie=void 0;function D(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),ie=a}function $(a){return Y(a)?a:(a.ownerDocument||a).defaultView||ie.window}typeof window<"u"&&window&&D(window);var y=function(a){return!!a&&d(a)==="object"},B=function(a){return typeof a=="function"},E={window:function(a){return a===ie||Y(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:B,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=$(a)||ie;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&B(a.splice)}};function ye(a){var t=a.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 Xe(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var it={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=it.draggable,t.map.drag=it,t.methodDict.drag="draggable",l.actions.drag=it.defaults},listeners:{"interactions:before-action-move":ye,"interactions:action-resume":ye,"interactions:action-move":Xe,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return E.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):E.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:ye,move:Xe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Ne=it,$e={init:function(a){var t=a;$e.document=t.document,$e.DocumentFragment=t.DocumentFragment||_e,$e.SVGElement=t.SVGElement||_e,$e.SVGSVGElement=t.SVGSVGElement||_e,$e.SVGElementInstance=t.SVGElementInstance||_e,$e.Element=t.Element||_e,$e.HTMLElement=t.HTMLElement||$e.Element,$e.Event=t.Event,$e.Touch=t.Touch||_e,$e.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 _e(){}var A=$e,te={init:function(a){var t=A.Element,o=a.navigator||{};te.supportsTouch="ontouchstart"in a||E.func(a.DocumentTouch)&&A.document instanceof a.DocumentTouch,te.supportsPointerEvent=o.pointerEnabled!==!1&&!!A.PointerEvent,te.isIOS=/iP(hone|od|ad)/.test(o.platform),te.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),te.isIe9=/MSIE 9/.test(o.userAgent),te.isOperaMobile=o.appName==="Opera"&&te.supportsTouch&&/Presto/.test(o.userAgent),te.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",te.pEventTypes=te.supportsPointerEvent?A.PointerEvent===a.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,te.wheelEvent=A.document&&"onmousewheel"in A.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ce=te;function ge(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Ye(a,t){for(;E.element(a);){if(ee(a,t))return a;a=nt(a)}return null}function nt(a){var t=a.parentNode;if(E.docFrag(t)){for(;(t=t.host)&&E.docFrag(t););return t}return t}function ee(a,t){return ie!==K&&(t=t.replace(/\/deep\//g," ")),a[ce.prefixedMatchesSelector](t)}var z=function(a){return a.parentNode||a.host};function be(a,t){for(var o,l=[],c=a;(o=z(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function xe(a,t,o){for(;E.element(a);){if(ee(a,t))return!0;if((a=nt(a))===o)return ee(a,t)}return!1}function Fe(a){return a.correspondingUseElement||a}function Oe(a){var t=a instanceof A.SVGElement?a.getBoundingClientRect():a.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 Ze(a){var t,o=Oe(a);if(!ce.isIOS7&&o){var l={x:(t=(t=$(a))||ie).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function qe(a){for(var t=[];a;)t.push(a),a=nt(a);return t}function me(a){return!!E.string(a)&&(A.document.querySelector(a),!0)}function F(a,t){for(var o in t)a[o]=t[o];return a}function J(a,t,o){return a==="parent"?nt(o):a==="self"?t.getRect(o):Ye(o,a)}function fe(a,t,o,l){var c=a;return E.string(c)?c=J(c,t,o):E.func(c)&&(c=c.apply(void 0,l)),E.element(c)&&(c=Ze(c)),c}function pe(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function Q(a){return!a||"x"in a&&"y"in a||((a=F({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function re(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function ae(a,t,o){var l=o&&a.options[o];return pe(fe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function se(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},E.string(a)&&a.search(" ")!==-1&&(a=Me(a)),E.array(a))return a.forEach(function(T){return se(T,t,o,l)}),l;if(E.object(a)&&(t=a,a=""),E.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(E.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];se(a,m,o,l)}else if(E.object(t))for(var k in t)se(Me(k).map(function(T){return"".concat(a).concat(T)}),t[k],o,l);return l}function Me(a){return a.trim().split(/ +/)}var ot=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function C(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function W(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function w(a){return a instanceof A.Event||a instanceof A.Touch}function S(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function G(a,t){return t=t||{x:0,y:0},ce.isOperaMobile&&w(a)?(S("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):S("page",a,t),t}function L(a){return E.number(a.pointerId)?a.pointerId:a.identifier}function de(a,t,o){var l=t.length>1?P(t):t[0];G(l,a.page),function(c,p){p=p||{},ce.isOperaMobile&&w(c)?S("screen",c,p):S("client",c,p)}(l,a.client),a.timeStamp=o}function H(a){var t=[];return E.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Ee(a){if(!a.length)return null;var t=H(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function oe(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return ot(p,m)}function X(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function ne(a){return E.string(a.pointerType)?a.pointerType:E.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof A.Touch?"touch":"mouse"}function q(a){var t=E.func(a.composedPath)?a.composedPath():a.path;return[Fe(t?t[0]:a.target),Fe(a.currentTarget)]}var ve=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(ve.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var he=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},we=function(a){return he([],a)},j=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},De=function(a,t){return a[j(a,t)]},ue=function(a){x(o,a);var t=Z(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var k=p==="dragleave"?l.prev:l.cur,T=k.element,U=k.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=U,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=j(p,function(T){var U=T.dropzone,N=T.element;return U===l.dropzone&&N===l.target});c.activeDrops.splice(m,1);var k=new o(c,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(ve);function Ae(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Qe(a,t){for(var o=function(p,m){for(var k=[],T=0,U=p.interactables.list;T<U.length;T++){var N=U[T];if(N.options.drop.enabled){var le=N.options.drop.accept;if(!(E.element(le)&&le!==m||E.string(le)&&!ee(m,le)||E.func(le)&&!le({dropzone:N,draggableElement:m})))for(var Ce=0,Ue=N.getAllElements();Ce<Ue.length;Ce++){var Pe=Ue[Ce];Pe!==m&&k.push({dropzone:N,element:Pe,rect:N.getRect(Pe)})}}}return k}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function We(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],k=0,T=l.activeDrops;k<T.length;k++){var U=T[k],N=U.dropzone,le=U.element,Ce=U.rect,Ue=N.dropCheck(t,o,c,p,le,Ce);m.push(Ue?le:null)}var Pe=function(Je){for(var ct,lt,ht,Dt=[],It=0;It<Je.length;It++){var bt=Je[It],Ct=Je[ct];if(bt&&It!==ct)if(Ct){var ta=z(bt),jt=z(Ct);if(ta!==bt.ownerDocument)if(jt!==bt.ownerDocument)if(ta!==jt){Dt=Dt.length?Dt:be(Ct);var da=void 0;if(Ct instanceof A.HTMLElement&&bt instanceof A.SVGElement&&!(bt instanceof A.SVGSVGElement)){if(bt===jt)continue;da=bt.ownerSVGElement}else da=bt;for(var ya=be(da,Ct.ownerDocument),Sa=0;ya[Sa]&&ya[Sa]===Dt[Sa];)Sa++;var Nn=[ya[Sa-1],ya[Sa],Dt[Sa]];if(Nn[0])for(var mn=Nn[0].lastChild;mn;){if(mn===Nn[1]){ct=It,Dt=ya;break}if(mn===Nn[2])break;mn=mn.previousSibling}}else ht=Ct,(parseInt($(lt=bt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt($(ht).getComputedStyle(ht).zIndex,10)||0)&&(ct=It);else ct=It}else ct=It}return ct}(m);return l.activeDrops[Pe]||null}function rt(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new ue(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new ue(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new ue(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new ue(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new ue(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new ue(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function Re(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&Ae(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function gt(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=Qe(t,o.element));var m=l,k=We(o,m,c);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=rt(o,0,m)}}var tt={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(Ne),l.prototype.dropzone=function(p){return function(m,k){if(E.object(k)){if(m.options.drop.enabled=k.enabled!==!1,k.listeners){var T=se(k.listeners),U=Object.keys(T).reduce(function(le,Ce){return le[/^(enter|leave)/.test(Ce)?"drag".concat(Ce):/^(activate|deactivate|move)/.test(Ce)?"drop".concat(Ce):Ce]=T[Ce],le},{}),N=m.options.drop.listeners;N&&m.off(N),m.on(U),m.options.drop.listeners=U}return E.func(k.ondrop)&&m.on("drop",k.ondrop),E.func(k.ondropactivate)&&m.on("dropactivate",k.ondropactivate),E.func(k.ondropdeactivate)&&m.on("dropdeactivate",k.ondropdeactivate),E.func(k.ondragenter)&&m.on("dragenter",k.ondragenter),E.func(k.ondragleave)&&m.on("dragleave",k.ondragleave),E.func(k.ondropmove)&&m.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?m.options.drop.overlap=k.overlap:E.number(k.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(m.options.drop.accept=k.accept),"checker"in k&&(m.options.drop.checker=k.checker),m}return E.bool(k)?(m.options.drop.enabled=k,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,k,T,U,N){return function(le,Ce,Ue,Pe,Je,ct,lt){var ht=!1;if(!(lt=lt||le.getRect(ct)))return!!le.options.drop.checker&&le.options.drop.checker(Ce,Ue,ht,le,ct,Pe,Je);var Dt=le.options.drop.overlap;if(Dt==="pointer"){var It=ae(Pe,Je,"drag"),bt=G(Ce);bt.x+=It.x,bt.y+=It.y;var Ct=bt.x>lt.left&&bt.x<lt.right,ta=bt.y>lt.top&&bt.y<lt.bottom;ht=Ct&&ta}var jt=Pe.getRect(Je);if(jt&&Dt==="center"){var da=jt.left+jt.width/2,ya=jt.top+jt.height/2;ht=da>=lt.left&&da<=lt.right&&ya>=lt.top&&ya<=lt.bottom}return jt&&E.number(Dt)&&(ht=Math.max(0,Math.min(lt.right,jt.right)-Math.max(lt.left,jt.left))*Math.max(0,Math.min(lt.bottom,jt.bottom)-Math.max(lt.top,jt.top))/(jt.width*jt.height)>=Dt),le.options.drop.checker&&(ht=le.options.drop.checker(Ce,Ue,ht,le,ct,Pe,Je)),ht}(this,p,m,k,T,U,N)},o.dynamicDrop=function(p){return E.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},F(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=tt.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.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(a,t){var o=a.interaction,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=Qe(t,o.element),c.events=rt(o,0,l),c.events.activate&&(Ae(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":gt,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;Re(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;gt(a,t),Re(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.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:Qe,getDrop:We,getDropEvents:rt,fireDropEvents:Re,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},et=tt;function Be(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(U){return U.pointer}),p=l==="start",m=l==="end",k=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=oe(c,k),o.box=Ee(c),o.scale=1,o.ds=0,o.angle=X(c,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=oe(c,k),o.box=Ee(c),o.scale=o.distance/t.gesture.startDistance,o.angle=X(c,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,E.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(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return E.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):E.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=He,t.methodDict.gesture="gesturable",l.actions.gesture=He.defaults},listeners:{"interactions:action-start":Be,"interactions:action-move":Be,"interactions:action-end":Be,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},xt=He;function ze(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var k=E.number(p.width)?p.width:p.right-p.left,T=E.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?k:T)/2)),k<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var U=k>=0?p.left:p.right;return o.x<U+m}if(a==="top"){var N=T>=0?p.top:p.bottom;return o.y<N+m}if(a==="right")return o.x>(k>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!E.element(l)&&(E.element(t)?t===l:xe(l,t,c))}function Le(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var je,Ke,M={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;M.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),M.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,k,T){return E.object(k)?(m.options.resize.enabled=k.enabled!==!1,m.setPerAction("resize",k),m.setOnEvents("resize",k),E.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?m.options.resize.axis=k.axis:k.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),E.bool(k.preserveAspectRatio)?m.options.resize.preserveAspectRatio=k.preserveAspectRatio:E.bool(k.square)&&(m.options.resize.square=k.square),m):E.bool(k)?(m.options.resize.enabled=k,m):m.options.resize}(this,p,a)},t.map.resize=M,t.methodDict.resize="resizable",c.actions.resize=M.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:F({},p),corrected:F({},p),previous:F({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),Le(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",k=l.rect,T=l._rects,U=T.start,N=T.corrected,le=T.delta,Ce=T.previous;if(F(Ce,N),m){if(F(N,k),p==="reposition"){if(N.top>N.bottom){var Ue=N.top;N.top=N.bottom,N.bottom=Ue}if(N.left>N.right){var Pe=N.left;N.left=N.right,N.right=Pe}}}else N.top=Math.min(k.top,U.bottom),N.bottom=Math.max(k.bottom,U.top),N.left=Math.min(k.left,U.right),N.right=Math.max(k.right,U.left);for(var Je in N.width=N.right-N.left,N.height=N.bottom-N.top,N)le[Je]=N[Je]-Ce[Je];c.edges=l.prepared.edges,c.rect=N,c.deltaRect=le}})(a),Le(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=F({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(E.object(k.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var U in T)T[U]=ze(U,k.edges[U],m,t._latestPointer.eventTarget,l,c,k.margin||M.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var N=k.axis!=="y"&&m.x>c.right-M.defaultMargin,le=k.axis!=="x"&&m.y>c.bottom-M.defaultMargin;(N||le)&&(a.action={name:"resize",axes:(N?"x":"")+(le?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,l=a.name,c=M.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",k=0,T=["top","bottom","left","right"];k<T.length;k++){var U=T[k];t[U]&&(m+=U)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Te=M,at={id:"actions",install:function(a){a.usePlugin(xt),a.usePlugin(Te),a.usePlugin(Ne),a.usePlugin(et)}},Ve=0,Ge={request:function(a){return je(a)},cancel:function(a){return Ke(a)},init:function(a){if(je=a.requestAnimationFrame,Ke=a.cancelAnimationFrame,!je)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];je=a["".concat(l,"RequestAnimationFrame")],Ke=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}je=je&&je.bind(a),Ke=Ke&&Ke.bind(a),je||(je=function(c){var p=Date.now(),m=Math.max(0,16-(p-Ve)),k=a.setTimeout(function(){c(p+m)},m);return Ve=p+m,k},Ke=function(c){return clearTimeout(c)})}},Ie={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(a){Ie.isScrolling=!0,Ge.cancel(Ie.i),a.autoScroll=Ie,Ie.interaction=a,Ie.prevTime=Ie.now(),Ie.i=Ge.request(Ie.scroll)},stop:function(){Ie.isScrolling=!1,Ie.interaction&&(Ie.interaction.autoScroll=null),Ge.cancel(Ie.i)},scroll:function(){var a=Ie.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=dt(c.container,t,o),m=Ie.now(),k=(m-Ie.prevTime)/1e3,T=c.speed*k;if(T>=1){var U={x:Ie.x*T,y:Ie.y*T};if(U.x||U.y){var N=ut(p);E.window(p)?p.scrollBy(U.x,U.y):p&&(p.scrollLeft+=U.x,p.scrollTop+=U.y);var le=ut(p),Ce={x:le.x-N.x,y:le.y-N.y};(Ce.x||Ce.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:Ce,interaction:a,container:p})}Ie.prevTime=m}Ie.isScrolling&&(Ge.cancel(Ie.i),Ie.i=Ge.request(Ie.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&Ie.check(t.interactable,t.prepared.name))if(t.simulation)Ie.x=Ie.y=0;else{var l,c,p,m,k=t.interactable,T=t.element,U=t.prepared.name,N=k.options[U].autoScroll,le=dt(N.container,k,T);if(E.window(le))m=o.clientX<Ie.margin,l=o.clientY<Ie.margin,c=o.clientX>le.innerWidth-Ie.margin,p=o.clientY>le.innerHeight-Ie.margin;else{var Ce=Oe(le);m=o.clientX<Ce.left+Ie.margin,l=o.clientY<Ce.top+Ie.margin,c=o.clientX>Ce.right-Ie.margin,p=o.clientY>Ce.bottom-Ie.margin}Ie.x=c?1:m?-1:0,Ie.y=p?1:l?-1:0,Ie.isScrolling||(Ie.margin=N.margin,Ie.speed=N.speed,Ie.start(t))}}};function dt(a,t,o){return(E.string(a)?J(a,t,o):a)||$(o)}function ut(a){return E.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var st={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=Ie,Ie.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Ie.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Ie.stop(),Ie.interaction&&(Ie.interaction=null)},"interactions:stop":Ie.stop,"interactions:action-move":function(a){return Ie.onInteractionMove(a)}}},ft=st;function yt(a,t){var o=!1;return function(){return o||(ie.console.warn(t),o=!0),a.apply(this,arguments)}}function Nt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Rt(a){return E.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Vt(a){return E.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var _t={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(k,T,U,N,le){var Ce=k.getRect(N),Ue=T.buttons||{0:1,1:4,3:8,4:16}[T.button],Pe={action:null,interactable:k,interaction:U,element:N,rect:Ce,buttons:Ue};return le.fire("auto-start:check",Pe),Pe.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=yt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=yt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Vt,t.prototype.styleCursor=Rt}};function Lt(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Ot(t,o,a,c)?a:null}function kt(a,t,o,l,c,p,m){for(var k=0,T=l.length;k<T;k++){var U=l[k],N=c[k],le=U.getAction(t,o,a,N);if(le){var Ce=Lt(le,U,N,p,m);if(Ce)return{action:Ce,interactable:U,element:N}}}return{action:null,interactable:null,element:null}}function Ht(a,t,o,l,c){var p=[],m=[],k=l;function T(N){p.push(N),m.push(k)}for(;E.element(k);){p=[],m=[],c.interactables.forEachMatch(k,T);var U=kt(a,t,o,p,m,l,c);if(U.action&&!U.interactable.options[U.action.name].manualStart)return U;k=nt(k)}return{action:null,interactable:null,element:null}}function Yt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,Nt(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Va(a,o),o.fire("autoStart:prepared",{interaction:a})}function Ot(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,k=l.autoStart.maxInteractions,T=0,U=0,N=0;if(!(p&&m&&k))return!1;for(var le=0,Ce=l.interactions.list;le<Ce.length;le++){var Ue=Ce[le],Pe=Ue.prepared.name;if(Ue.interacting()&&(++T>=k||Ue.interactable===a&&((U+=Pe===o.name?1:0)>=p||Ue.element===t&&(N++,Pe===o.name&&N>=m))))return!1}return k>0}function Aa(a,t){return E.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function wa(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Va(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=E.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}wa(a.element,p||"",t)}else t.autoStart.cursorElement&&wa(t.autoStart.cursorElement,"",t)}var ja={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(_t),o.base.actionChecker=null,o.base.styleCursor=!0,F(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return Aa(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ot,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||Yt(o,Ht(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Yt(c,Ht(c,p,m,k,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Ot(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Va(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&wa(o.element,"",t)}},maxInteractions:Aa,withinInteractionLimit:Ot,validateAction:Lt},Da=ja,Ka={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),k=Math.abs(p),T=o.interactable.options.drag,U=T.startAxis,N=m>k?"x":m<k?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?N[0]:T.lockAxis,N!=="xy"&&U!=="xy"&&U!==N){o.prepared.name=null;for(var le=l,Ce=function(Pe){if(Pe!==o.interactable){var Je=o.interactable.options.drag;if(!Je.manualStart&&Pe.testIgnoreAllow(Je,le,l)){var ct=Pe.getAction(o.downPointer,o.downEvent,o,le);if(ct&&ct.name==="drag"&&function(lt,ht){if(!ht)return!1;var Dt=ht.options.drag.startAxis;return lt==="xy"||Dt==="xy"||Dt===lt}(N,Pe)&&Da.validateAction(ct,Pe,le,l,t))return Pe}}};E.element(le);){var Ue=t.interactables.forEachMatch(le,Ce);if(Ue){o.prepared.name="drag",o.interactable=Ue,o.element=le;break}le=nt(le)}}}}}};function Ca(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var Ua={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(Da),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=Ca(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;Ca(t)>0&&(t.prepared.name=null)}},getHoldDuration:Ca},Wa=Ua,Ha={id:"auto-start",install:function(a){a.usePlugin(Da),a.usePlugin(Wa),a.usePlugin(Ka)}},qa=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):E.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Ga(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Oa={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=qa,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=$(p.target).document,T=c.getDocOptions(k);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||E.element(p.target)&&ee(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||ge(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Ga,a},{})};function ba(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function fa(a){var t={};for(var o in a){var l=a[o];E.plainObject(l)?t[o]=fa(l):E.array(l)?t[o]=we(l):t[o]=l}return t}var _a=function(){function a(t){u(this,a),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=ka(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,k=function(U){var N=U.interactable.options[U.prepared.name],le=N.modifiers;return le&&le.length?le:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ce){var Ue=N[Ce];return Ue&&Ue.enabled&&{options:Ue,methods:Ue._methods}}).filter(function(Ce){return!!Ce})}(m);this.prepareStates(k),this.startEdges=F({},m.edges),this.edges=F({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ka(),this.startAll(T),this.result=this.setAll(T)}},{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,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=F({},t.pageCoords),t.rect=F({},p),t.edges=F({},m);for(var k=c?this.states.slice(c):this.states,T=ka(t.coords,t.rect),U=0;U<k.length;U++){var N,le=k[U],Ce=le.options,Ue=F({},t.coords),Pe=null;(N=le.methods)!=null&&N.set&&this.shouldDo(Ce,l,o)&&(t.state=le,Pe=le.methods.set(t),re(t.edges,t.rect,{x:t.coords.x-Ue.x,y:t.coords.y-Ue.y})),T.eventProps.push(Pe)}F(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var Je=this.result.coords,ct=this.result.rect;if(Je&&ct){var lt=T.rect.left!==ct.left||T.rect.right!==ct.right||T.rect.top!==ct.top||T.rect.bottom!==ct.bottom;T.changed=lt||Je.x!==T.coords.x||Je.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,k=this.startDelta,T=m.delta;l==="start"&&F(this.startDelta,m.delta);for(var U=0,N=[[p,k],[c,T]];U<N.length;U++){var le=N[U],Ce=le[0],Ue=le[1];Ce.page.x+=Ue.x,Ce.page.y+=Ue.y,Ce.client.x+=Ue.x,Ce.client.y+=Ue.y}var Pe=this.result.rectDelta,Je=t.rect||o.rect;Je.left+=Pe.left,Je.right+=Pe.right,Je.top+=Pe.top,Je.bottom+=Pe.bottom,Je.width=Je.right-Je.left,Je.height=Je.bottom-Je.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,T={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var k=c[m];t.state=k;var T=k.options,U=k.methods,N=U.beforeEnd&&U.beforeEnd(t);if(N)return this.endResult=N,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=F({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,k=p.result,T=k.delta,U=k.rectDelta,N=0,le=[[l.start,m],[l.cur,T]];N<le.length;N++){var Ce=le[N],Ue=Ce[0],Pe=Ce[1];Ue.page.x-=Pe.x,Ue.page.y-=Pe.y,Ue.client.x-=Pe.x,Ue.client.y-=Pe.y}c.left-=U.left,c.right-=U.right,c.top-=U.top,c.bottom-=U.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return fa(o)}),this.result=ka(F({},t.result.coords),F({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ka(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var k in m.enabled=m.enabled!==!1,o)k in m||(m[k]=o[k]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function ga(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new _a(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":ga,"interactions:action-move":ga,"interactions:action-end":ga,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},wt=Xa,Zt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},mt=function(a){x(o,a);var t=Z(o);function o(l,c,p,m,k,T,U){var N;u(this,o),(N=t.call(this,l)).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,k=k||l.element;var le=l.interactable,Ce=(le&&le.options||Zt).deltaSource,Ue=ae(le,k,p),Pe=m==="start",Je=m==="end",ct=Pe?R(N):l.prevEvent,lt=Pe?l.coords.start:Je?{page:ct.page,client:ct.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return N.page=F({},lt.page),N.client=F({},lt.client),N.rect=F({},l.rect),N.timeStamp=lt.timeStamp,Je||(N.page.x-=Ue.x,N.page.y-=Ue.y,N.client.x-=Ue.x,N.client.y-=Ue.y),N.ctrlKey=c.ctrlKey,N.altKey=c.altKey,N.shiftKey=c.shiftKey,N.metaKey=c.metaKey,N.button=c.button,N.buttons=c.buttons,N.target=k,N.currentTarget=k,N.preEnd=T,N.type=U||p+(m||""),N.interactable=le,N.t0=Pe?l.pointers[l.pointers.length-1].downTime:ct.t0,N.x0=l.coords.start.page.x-Ue.x,N.y0=l.coords.start.page.y-Ue.y,N.clientX0=l.coords.start.client.x-Ue.x,N.clientY0=l.coords.start.client.y-Ue.y,N.delta=Pe||Je?{x:0,y:0}:{x:N[Ce].x-ct[Ce].x,y:N[Ce].y-ct[Ce].y},N.dt=l.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=F({},l.coords.velocity[Ce]),N.speed=ot(N.velocity.x,N.velocity.y),N.swipe=Je||m==="inertiastart"?N.getSwipe():null,N}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(ve);Object.defineProperties(mt.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var fn=g(function a(t,o,l,c,p){u(this,a),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=l,this.downTime=c,this.downTarget=p}),Mt=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),ca=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ea=0,oa=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),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=yt(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=Ea++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(N){Object.defineProperty(o._proxy,N,{get:function(){return p[N]}})};for(var k in Mt)m(k);var T=function(N){Object.defineProperty(o._proxy,N,{value:function(){return p[N].apply(p,arguments)}})};for(var U in ca)T(U);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Nt(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?F({},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,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=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&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ot(c,p)>this.pointerMoveTolerance);var k,T,U,N=this.getPointerIndex(t),le={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(k=this.coords.velocity,T=this.coords.delta,U=Math.max(T.timeStamp/1e3,.001),k.page.x=T.page.x/U,k.page.y=T.page.y/U,k.client.x=T.client.x/U,k.client.y=T.client.y/U,k.timeStamp=U),this._scopeFire("interactions:move",le),m||this.simulation||(this.interacting()&&(le.type=null,this.move(le)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||W(this.coords.delta),(t=F({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,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,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=L(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:j(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,k,T=L(t),U=this.getPointerIndex(t),N=this.pointers[U];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new fn(T,t,o,null,null),U=this.pointers.length,this.pointers.push(N)),de(this.coords.cur,this.pointers.map(function(le){return le.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-m.page.x,p.page.y=k.page.y-m.page.y,p.client.x=k.client.x-m.client.x,p.client.y=k.client.y-m.client.y,p.timeStamp=k.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=l,C(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:N,pointerIndex:U,interaction:this}),U}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new mt(this,t,this.prepared.name,o,this.element,l,c)}},{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,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(re(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function ma(a){Qt(a.interaction)}function Qt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return Tt(a.coords.cur,t),Tt(a.coords.delta,t),re(a.edges,a.rect,t),t.x=0,t.y=0,!0}function Ma(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Tt(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}ca.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=Ma},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(Tt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":ma,"interactions:before-action-move":ma,"interactions:before-action-end":function(a){var t=a.interaction;if(Qt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ra=qt,Et=function(){function a(t){u(this,a),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(a,[{key:"start",value:function(t){var o=this.interaction,l=At(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=ot(c.x,c.y),m=this.modification||(this.modification=new _a(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.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,l=At(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(k),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.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=Ge.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,k,T=this,U=this.interaction,N=At(U).resistance,le=(U._now()-this.t0)/1e3;if(le<this.te){var Ce,Ue=1-(Math.exp(-N*le)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,Ce={x:Wt(k=Ue,t,l,p),y:Wt(k,o,c,m)}):Ce={x:this.targetOffset.x*Ue,y:this.targetOffset.y*Ue};var Pe={x:Ce.x-this.currentOffset.x,y:Ce.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,U.offsetBy(Pe),U.move(),this.onNextFrame(function(){return T.inertiaTick()})}else U.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,l=o._now()-this.t0,c=At(o).smoothEndDuration;if(l<c){var p={x:Ft(l,0,this.targetOffset.x,c),y:Ft(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),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,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ge.cancel(this.timeout)}}]),a}();function At(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(ra),a.usePlugin(wt),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;E.element(c);){if(c===t.element){l.resume(a);break}c=nt(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ga,"interactions:action-inertiastart":ga,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Wt(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Ft(a,t,o,l){return-o*(a/=l)*(a-2)+t}var ua=Ut;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var za=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=F({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=se(t,o);for(t in l)this.types[t]=he(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=se(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var k=m[p],T=c.indexOf(k);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ya=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function La(a){return E.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Ja(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var En={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:k,addDelegate:function(N,le,Ce,Ue,Pe){var Je=La(Pe);if(!l[Ce]){l[Ce]=[];for(var ct=0;ct<c.length;ct++){var lt=c[ct];m(lt,Ce,T),m(lt,Ce,U,!0)}}var ht=l[Ce],Dt=De(ht,function(It){return It.selector===N&&It.context===le});Dt||(Dt={selector:N,context:le,listeners:[]},ht.push(Dt)),Dt.listeners.push({func:Ue,options:Je})},removeDelegate:function(N,le,Ce,Ue,Pe){var Je,ct=La(Pe),lt=l[Ce],ht=!1;if(lt)for(Je=lt.length-1;Je>=0;Je--){var Dt=lt[Je];if(Dt.selector===N&&Dt.context===le){for(var It=Dt.listeners,bt=It.length-1;bt>=0;bt--){var Ct=It[bt];if(Ct.func===Ue&&Ja(Ct.options,ct)){It.splice(bt,1),It.length||(lt.splice(Je,1),k(le,Ce,T),k(le,Ce,U,!0)),ht=!0;break}}if(ht)break}}},delegateListener:T,delegateUseCapture:U,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(N,le,Ce,Ue){if(N.addEventListener){var Pe=La(Ue),Je=De(o,function(ct){return ct.eventTarget===N});Je||(Je={eventTarget:N,events:{}},o.push(Je)),Je.events[le]||(Je.events[le]=[]),De(Je.events[le],function(ct){return ct.func===Ce&&Ja(ct.options,Pe)})||(N.addEventListener(le,Ce,p.supportsOptions?Pe:Pe.capture),Je.events[le].push({func:Ce,options:Pe}))}}function k(N,le,Ce,Ue){if(N.addEventListener&&N.removeEventListener){var Pe=j(o,function(ta){return ta.eventTarget===N}),Je=o[Pe];if(Je&&Je.events)if(le!=="all"){var ct=!1,lt=Je.events[le];if(lt){if(Ce==="all"){for(var ht=lt.length-1;ht>=0;ht--){var Dt=lt[ht];k(N,le,Dt.func,Dt.options)}return}for(var It=La(Ue),bt=0;bt<lt.length;bt++){var Ct=lt[bt];if(Ct.func===Ce&&Ja(Ct.options,It)){N.removeEventListener(le,Ce,p.supportsOptions?It:It.capture),lt.splice(bt,1),lt.length===0&&(delete Je.events[le],ct=!0);break}}}ct&&!Object.keys(Je.events).length&&o.splice(Pe,1)}else for(le in Je.events)Je.events.hasOwnProperty(le)&&k(N,le,"all")}}function T(N,le){for(var Ce=La(le),Ue=new Ya(N),Pe=l[N.type],Je=q(N)[0],ct=Je;E.element(ct);){for(var lt=0;lt<Pe.length;lt++){var ht=Pe[lt],Dt=ht.selector,It=ht.context;if(ee(ct,Dt)&&ge(It,Je)&&ge(It,ct)){var bt=ht.listeners;Ue.currentTarget=ct;for(var Ct=0;Ct<bt.length;Ct++){var ta=bt[Ct];Ja(ta.options,Ce)&&ta.func(Ue)}}}ct=nt(ct)}}function U(N){return T(N,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=rn.methodOrder;t<o.length;t++){var l=o[t],c=rn[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var k=m[p],T=l;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;T;){if(T===k.element)return k;T=nt(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,k=p.interactions.list;m<k.length;m++){var T=k[m];if(T.pointerType===l){if(T.simulation&&!vn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var U=0,N=p.interactions.list;U<N.length;U++){var le=N[U];if(!(le.pointerType!==l||/down/i.test(c)&&le.simulation))return le}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(vn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function vn(a,t){return a.pointers.some(function(o){return o.id===t})}var ln=rn,va=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Za(a,t){return function(o){var l=t.interactions.list,c=ne(o),p=q(o),m=p[0],k=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var U=0,N=o.changedTouches;U<N.length;U++){var le=N[U],Ce={pointer:le,pointerId:L(le),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:k,scope:t},Ue=sn(Ce);T.push([Ce.pointer,Ce.eventTarget,Ce.curEventTarget,Ue])}}else{var Pe=!1;if(!ce.supportsPointerEvent&&/mouse/.test(o.type)){for(var Je=0;Je<l.length&&!Pe;Je++)Pe=l[Je].pointerType!=="mouse"&&l[Je].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var ct={pointer:o,pointerId:L(o),pointerType:c,eventType:o.type,curEventTarget:k,eventTarget:m,scope:t},lt=sn(ct);T.push([ct.pointer,ct.eventTarget,ct.curEventTarget,lt])}}for(var ht=0;ht<T.length;ht++){var Dt=T[ht],It=Dt[0],bt=Dt[1],Ct=Dt[2];Dt[3][a](It,o,bt,Ct)}}}function sn(a){var t=a.pointerType,o=a.scope,l={interaction:ln.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,k=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)k(o,T,m.delegateListener),k(o,T,m.delegateUseCapture,!0);for(var U=c&&c.events,N=0;N<p.length;N++){var le=p[N];k(o,le.type,le.listener,U)}}var Sn={id:"core/interactions",install:function(a){for(var t={},o=0;o<va.length;o++){var l=va[o];t[l]=Za(l,a)}var c,p=ce.pEventTypes;function m(){for(var k=0,T=a.interactions.list;k<T.length;k++){var U=T[k];if(U.pointerIsDown&&U.pointerType==="touch"&&!U._interacting)for(var N=function(){var Ue=Ce[le];a.documents.some(function(Pe){return ge(Pe.doc,Ue.downTarget)})||U.removePointer(Ue.pointer,Ue.event)},le=0,Ce=U.pointers;le<Ce.length;le++)N()}}(c=A.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var T=0,U=a.interactions.list;T<U.length;T++)U[T].documentBlur(k)}}),a.prevTouchTime=0,a.Interaction=function(k){x(U,k);var T=Z(U);function U(){return u(this,U),T.apply(this,arguments)}return g(U,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(N){a.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return a.now()}}]),U}(oa),a.interactions={list:[],new:function(k){k.scopeFire=function(U,N){return a.fire(U,N)};var T=new a.Interaction(k);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Oa)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Za,methodNames:va},Fa=Sn,Ra=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Ra||{}),ll=function(){function a(t,o,l,c){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new za,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||l,this._win=$(me(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return E.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),E.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),E.func(o.onend)&&this.on("".concat(t,"end"),o.onend),E.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,k=function(T){return(m==null||m(T))&&ba(T,p._actions)};(E.array(o)||E.object(o))&&this._onOff(Ra.Off,t,o,void 0,k),(E.array(l)||E.object(l))&&this._onOff(Ra.On,t,l,void 0,k)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,k),E.array(k)?m[p]=we(k):E.plainObject(k)?(m[p]=F(m[p]||{},fa(k)),E.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=k.enabled!==!1)):E.bool(k)&&E.object(l.perAction[p])?m[p].enabled=k:m[p]=k}}},{key:"getRect",value:function(t){return t=t||(E.element(this.target)?this.target:null),E.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ze(t)}},{key:"rectChecker",value:function(t){var o=this;return E.func(t)?(this.getRect=function(l){var c=F({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(me(o)||E.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][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 E.string(t)?Array.from(this._context.querySelectorAll(t)):E.func(t)&&t.getAllElements?t.getAllElements():E.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ge(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!E.element(l)&&(E.string(t)?xe(l,t,o):!!E.element(t)&&ge(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!E.element(l))&&(E.string(t)?xe(l,t,o):!!E.element(t)&&ge(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){E.object(o)&&!E.array(o)&&(c=l,l=null);var m=se(o,l,p);for(var k in m){k==="wheel"&&(k=ce.wheelEvent);for(var T=0,U=m[k];T<U.length;T++){var N=U[T];ba(k,this._actions)?this.events[t===Ra.On?"on":"off"](k,N):E.string(this.target)?this._scopeEvents[t===Ra.On?"addDelegate":"removeDelegate"](this.target,this._context,k,N,c):this._scopeEvents[t===Ra.On?"add":"remove"](this.target,k,N,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(Ra.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(Ra.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in E.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,F(F({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?E.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,k=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=k.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[T][0],k[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=E.string(p)?o.selectorMap[p]:p[o.scope.id],k=j(m,function(T){return T===c});m.splice(k,1)}})}return g(a,[{key:"new",value:function(t,o){o=F(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),E.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=E.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return De(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((E.string(p.target)?E.element(t)&&ee(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ce,this.defaults=fa(Zt),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,k){var T=l.interactables.getExisting(m,k);return T||((T=l.interactables.new(m,k)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Ee,c.getTouchDistance=oe,c.getTouchAngle=X,c.getElementRect=Ze,c.getElementClientRect=Oe,c.matchesSelector=ee,c.closest=Ye,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=yt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,U=p;T<U.length;T++){var N=U[T];this.on(N,m,k)}return this}if(E.object(p)){for(var le in p)this.on(le,p[le],m);return this}return ba(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:k}),this},"The interact.on() method is being deprecated"),c.off=yt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,U=p;T<U.length;T++){var N=U[T];this.off(N,m,k)}return this}if(E.object(p)){for(var le in p)this.off(le,p[le],m);return this}var Ce;return ba(p,this.scope.actions)?p in this.globalEvents&&(Ce=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(Ce,1):this.scope.events.remove(this.scope.document,p,m,k),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return ce.supportsTouch},c.supportsPointerEvent=function(){return ce.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return E.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=mt,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){x(p,l);var c=Z(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return O(_(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){O(_(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,E.window(l)&&D(l),A.init(l),ce.init(l),Ge.init(l),o.window=l,o.document=l.document,o.usePlugin(Fa),o.usePlugin(En),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 l=0,c=this.listenerMaps.length,p=t.before.reduce(function(k,T){return k[T]=!0,k[xo(T)]=!0,k},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[xo(m)]))break}this.listenerMaps.splice(l,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 l=$(t);o=o?F({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=$(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{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()}}]),a}();function xo(a){return a&&a.replace(/\/.*$/,"")}var wo=new sl,ea=wo.interactStatic,cl=typeof globalThis<"u"?globalThis:window;wo.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,k=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,U=T===void 0?{x:0,y:0}:T,N={range:p,grid:a,x:null,y:null},le=0;le<t.length;le++){var Ce=t[le],Ue=Ce[0],Pe=Ce[1],Je=Math.round((l-U.x)/a[Ue]),ct=Math.round((c-U.y)/a[Pe]);N[Ue]=Math.max(k.left,Math.min(k.right,Je*a[Ue]+U.x)),N[Pe]=Math.max(k.top,Math.min(k.bottom,ct*a[Pe]+U.y))}return N};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=F(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,k=p.enabled,T=t.options,U=T.equalDelta,N=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=F({},c),t.startRect=F({},o),t.ratio=m,t.equalDelta=U;var le=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var Ce=(le.left?1:-1)*(le.top?1:-1);t.edgeSign={x:Ce,y:Ce}}else t.edgeSign={x:le.left?-1:1,y:le.top?-1:1};if(k!==!1&&F(l,le),N!=null&&N.length){var Ue=new _a(a.interaction);Ue.copyFrom(a.interaction.modification),Ue.prepareStates(N),t.subModification=Ue,Ue.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=F({},l),m=t.equalDelta?vl:hl;if(F(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var k=F({},o);re(c,k,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:k,edges:c,pageCoords:l,prevCoords:l,prevRect:k})),U=T.delta;return T.changed&&(m(t,Math.abs(U.x)>Math.abs(U.y),T.coords,T.rect),F(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,k=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*k.y}else{var U=l.height*m;o.x=p.x+(U-c.width)*k.x}}var gl=na(fl,"aspectRatio"),Do=function(){};Do._defaults={};var Tn=Do;function Qa(a,t,o){return E.func(a)?fe(a,t.interactable,t.element,[o.x,o.y,t]):fe(a,t.interactable,t.element)}var In={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,k=m.elementRect,T=F({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&k){var U=Qa(m.restriction,c,p);if(U){var N=U.right-U.left-t.width,le=U.bottom-U.top-t.height;N<0&&(T.left+=N,T.right+=N),le<0&&(T.top+=le,T.bottom+=le)}T.left+=o.left-t.width*k.left,T.top+=o.top-t.height*k.top,T.right+=o.right-t.width*(1-k.right),T.bottom+=o.bottom-t.height*(1-k.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=Qa(c.restriction,o,t);if(m){var k=function(T){return!T||"left"in T&&"top"in T||((T=F({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(m);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=na(In,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var hn={noInner:Co,noOuter:_o,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=pe(Qa(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var k=F({},t),T=Qa(m.inner,l,k)||{},U=Qa(m.outer,l,k)||{};Eo(T,Co),Eo(U,_o),o.top?t.y=Math.min(Math.max(U.top+p.top,k.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(U.bottom+p.bottom,k.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(U.left+p.left,k.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(U.right+p.right,k.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=na(hn,"restrictEdges"),bl=F({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},In.defaults),kl=na({start:In.start,set:In.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=na({start:function(a){return hn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=Q(Qa(p.min,t,a.coords))||xl,k=Q(Qa(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:F({},hn.noInner),outer:F({},hn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-k.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+k.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-k.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+k.width),hn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ao={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,k=a.startOffset,T=m.options,U=T.offsetWithOrigin?function(Ce){var Ue=Ce.interaction.element,Pe=pe(fe(Ce.state.options.origin,null,null,[Ue])),Je=Pe||ae(Ce.interactable,Ue,Ce.interaction.prepared.name);return Je}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=fe(T.offset,l,c,[o]);(t=pe(N)||{x:0,y:0}).x+=U.x,t.y+=U.y}var le=T.relativePoints;m.offsets=p&&le&&le.length?le.map(function(Ce,Ue){return{index:Ue,relativePoint:Ce,x:k.left-p.width*Ce.x+t.x,y:k.top-p.height*Ce.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=ae(t.interactable,t.element,t.prepared.name),k=F({},o),T=[];c.offsetWithOrigin||(k.x-=m.x,k.y-=m.y);for(var U=0,N=p;U<N.length;U++)for(var le=N[U],Ce=k.x-le.x,Ue=k.y-le.y,Pe=0,Je=c.targets.length;Pe<Je;Pe++){var ct=c.targets[Pe],lt=void 0;(lt=E.func(ct)?ct(Ce,Ue,t._proxy,le,Pe):ct)&&T.push({x:(E.number(lt.x)?lt.x:Ce)+le.x,y:(E.number(lt.y)?lt.y:Ue)+le.y,range:E.number(lt.range)?lt.range:c.range,source:ct,index:Pe,offset:le})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Dt=0;Dt<T.length;Dt++){var It=T[Dt],bt=It.range,Ct=It.x-k.x,ta=It.y-k.y,jt=ot(Ct,ta),da=jt<=bt;bt===1/0&&ht.inRange&&ht.range!==1/0&&(da=!1),ht.target&&!(da?ht.inRange&&bt!==1/0?jt/bt<ht.distance/ht.range:bt===1/0&&ht.range!==1/0||jt<ht.distance:!ht.inRange&&jt<ht.distance)||(ht.target=It,ht.distance=jt,ht.range=bt,ht.inRange=da,ht.delta.x=Ct,ht.delta.y=ta)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),l.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=na(ao,"snap"),Bn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],ao.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=F({},c),o.options.targets=[];for(var k=0,T=c.targets||[];k<T.length;k++){var U=T[k],N=void 0;if(N=E.func(U)?U(m.x,m.y,t):U){for(var le=0,Ce=o.targetFields;le<Ce.length;le++){var Ue=Ce[le],Pe=Ue[0],Je=Ue[1];if(Pe in N||Je in N){N.x=N[Pe],N.y=N[Je];break}}o.options.targets.push(N)}}var ct=ao.set(a);return o.options=c,ct},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=na(Bn,"snapSize"),no={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Bn.start(a)):null},set:Bn.set,defaults:F(fa(Bn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:Tn,avoid:Tn,transform:Tn,rubberband:Tn},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(wt),a.usePlugin(pl),t.modifiers=no,no){var l=no[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,So=function(a){x(o,a);var t=Z(o);function o(l,c,p,m,k,T){var U;if(u(this,o),C(R(U=t.call(this,k)),p),p!==c&&C(R(U),c),U.timeStamp=T,U.originalEvent=p,U.type=l,U.pointerId=L(c),U.pointerType=ne(c),U.target=m,U.currentTarget=null,l==="tap"){var N=k.getPointerIndex(c);U.dt=U.timeStamp-k.pointers[N].downTime;var le=U.timeStamp-k.tapTime;U.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===U.target&&le<500}else l==="doubletap"&&(U.dt=c.timeStamp-k.tapTime,U.double=!0);return U}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(ve),gn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=gn,a.defaults.actions.pointerEvents=gn.defaults,F(a.actions.phaselessTypes,gn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&oo(a),Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget,T=o.pointerIndex,U=c.pointers[T].hold,N=qe(k),le={interaction:c,pointer:p,event:m,eventTarget:k,type:"hold",targets:[],path:N,node:null},Ce=0;Ce<N.length;Ce++){var Ue=N[Ce];le.node=Ue,l.fire("pointerEvents:collect-targets",le)}if(le.targets.length){for(var Pe=1/0,Je=0,ct=le.targets;Je<ct.length;Je++){var lt=ct[Je].eventable.options.holdDuration;lt<Pe&&(Pe=lt)}U.duration=Pe,U.timeout=setTimeout(function(){Pa({interaction:c,eventTarget:k,pointer:p,event:m,type:"hold"},l)},Pe)}})(a,t),Pa(a,t)},"interactions:up":function(a,t){oo(a),Pa(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerWasMoved||Pa({interaction:c,eventTarget:k,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){oo(a),Pa(a,t)}},PointerEvent:So,fire:Pa,collectEventTargets:To,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 Pa(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=a.targets,T=k===void 0?To(a,t):k,U=new So(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:U});for(var N={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:U},le=0;le<T.length;le++){var Ce=T[le];for(var Ue in Ce.props||{})U[Ue]=Ce.props[Ue];var Pe=ae(Ce.eventable,Ce.node);if(U._subtractOrigin(Pe),U.eventable=Ce.eventable,U.currentTarget=Ce.node,Ce.eventable.fire(U),U._addOrigin(Pe),U.immediatePropagationStopped||U.propagationStopped&&le+1<T.length&&T[le+1].node!==U.currentTarget)break}if(t.fire("pointerEvents:fired",N),m==="tap"){var Je=U.double?Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):U;o.prevTap=Je,o.tapTime=Je.timeStamp}return U}function To(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=o.getPointerIndex(l),T=o.pointers[k];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var U=qe(p),N={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:U,targets:[],node:null},le=0;le<U.length;le++){var Ce=U[le];N.node=Ce,t.fire("pointerEvents:collect-targets",N)}return m==="hold"&&(N.targets=N.targets.filter(function(Ue){var Pe,Je;return Ue.eventable.options.holdDuration===((Pe=o.pointers[k])==null||(Je=Pe.hold)==null?void 0:Je.duration)})),N.targets}function oo(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:gn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(gn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Il,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return F(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var k=m.events,T=k.options;k.types[c]&&k.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:k,props:{interactable:m}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,l=a.options;F(o.events.options,t.pointerEvents.defaults),F(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,zl={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),k=p.window.Promise,T=k?[]:null,U=function(){var le=m[N],Ce=l.getRect(le);if(!Ce)return 1;var Ue,Pe=De(p.interactions.list,function(lt){return lt.interacting()&<.interactable===l&<.element===le&<.prepared.name===c.name});if(Pe)Pe.move(),T&&(Ue=Pe._reflowPromise||new k(function(lt){Pe._reflowResolve=lt}));else{var Je=Q(Ce),ct=function(lt){return{coords:lt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Je.x,y:Je.y},client:{x:Je.x,y:Je.y},timeStamp:p.now()});Ue=function(lt,ht,Dt,It,bt){var Ct=lt.interactions.new({pointerType:"reflow"}),ta={interaction:Ct,event:bt,pointer:bt,eventTarget:Dt,phase:"reflow"};Ct.interactable=ht,Ct.element=Dt,Ct.prevEvent=bt,Ct.updatePointer(bt,bt,Dt,!0),W(Ct.coords.delta),Nt(Ct.prepared,It),Ct._doPhase(ta);var jt=lt.window,da=jt.Promise,ya=da?new da(function(Sa){Ct._reflowResolve=Sa}):void 0;return Ct._reflowPromise=ya,Ct.start(It,ht,Dt),Ct._interacting?(Ct.move(ta),Ct.end(bt)):(Ct.stop(),Ct._reflowResolve()),Ct.removePointer(bt,bt),ya}(p,l,le,c,ct)}T&&T.push(Ue)},N=0;N<m.length&&!U();N++);return T&&k.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},Ll=zl;if(ea.use(Oa),ea.use(ra),ea.use(Ml),ea.use(ua),ea.use(Sl),ea.use(Ha),ea.use(at),ea.use(ft),ea.use(Ll),ea.default=ea,d(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(kn,kn.exports)),kn.exports}var np=ap();const Zo=Se.getDefaultExportFromCjs(np),Jn=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(n,{expose:i,emit:s}){const r=n,d=s,u=e.inject(jr),b=e.inject(Kr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let x=!1,_=!1,V=NaN,R=NaN,Z=NaN,O=NaN,ke=-1,Y=-1,K=-1,ie=-1,D=r.x,$=r.y,y=r.w,B=r.h;const E=e.ref(),ye=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:E,calcXY:fe});function Xe(w){se(w)}function it(){Me()}function Ne(w){pa(r.isDraggable)&&(f.draggable=w)}function $e(w){pa(r.isResizable)&&(f.resizable=w)}function _e(w){pa(r.isBounded)&&(f.bounded=w)}function A(w){f.transformScale=w}function te(w){f.rowHeight=w}function ce(w){f.maxRows=w}function ge(){f.rtl=Yo()==="rtl",Me()}function Ye(w){f.cols=Math.floor(w)}u.increaseItem(ye),e.onBeforeMount(()=>{f.rtl=Yo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,pa(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,pa(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,pa(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{D=r.x,$=r.y,B=r.h,y=r.w,aa(Ze)}),b.on("updateWidth",Xe),b.on("compact",it),b.on("setDraggable",Ne),b.on("setResizable",$e),b.on("setBounded",_e),b.on("setTransformScale",A),b.on("setRowHeight",te),b.on("setMaxRows",ce),b.on("directionchange",ge),b.on("setColNum",Ye)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Xe),b.off("compact",it),b.off("setDraggable",Ne),b.off("setResizable",$e),b.off("setBounded",_e),b.off("setTransformScale",A),b.off("setRowHeight",te),b.off("setMaxRows",ce),b.off("directionchange",ge),b.off("setColNum",Ye),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(ye)}),i({state:f,wrapper:E});const nt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ee=e.computed(()=>f.resizable&&!r.static),z=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),be=e.computed(()=>(f.draggable||f.resizable)&&!r.static),xe=Gd("item"),Fe=e.computed(()=>({[xe.b()]:!0,[xe.bm("resizable")]:ee.value,[xe.bm("static")]:r.static,[xe.bm("resizing")]:f.isResizing,[xe.bm("dragging")]:f.isDragging,[xe.bm("transform")]:f.useCssTransforms,[xe.bm("rtl")]:z.value,[xe.bm("no-touch")]:nt&&be.value})),Oe=e.computed(()=>[xe.be("resizer"),z.value&&xe.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,w=>{f.draggable=w}),e.watch(()=>r.static,()=>{aa(C),aa(W)}),e.watch(()=>f.draggable,()=>{aa(C)}),e.watch(()=>r.isResizable,w=>{f.resizable=w}),e.watch(()=>r.isBounded,w=>{f.bounded=w}),e.watch(()=>f.resizable,()=>{aa(W)}),e.watch(()=>f.rowHeight,()=>{aa(Ze),aa(qe)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(W),aa(Ze),aa(qe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(W)}),e.watch(z,()=>{aa(W),aa(Ze)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const w=u.margin;!w||w[0]===f.margin[0]&&w[1]===f.margin[1]||(f.margin=w.map(Number),aa(Ze),aa(qe))});function Ze(){r.x+r.w>f.cols?(D=0,y=r.w>f.cols?f.cols:r.w):(D=r.x,y=r.w);const w=J(D,$,y,B);f.isDragging&&(w.top=f.dragging.top,z.value?w.right=f.dragging.left:w.left=f.dragging.left),f.isResizing&&(w.width=f.resizing.width,w.height=f.resizing.height);let S;f.useCssTransforms?z.value?S=Ud(w.top,w.right,w.width,w.height):S=Kd(w.top,w.left,w.width,w.height):z.value?S=Hd(w.top,w.right,w.width,w.height):S=Wd(w.top,w.left,w.width,w.height),f.style=S}function qe(){const w={};for(const S of["width","height"]){const G=f.style[S].match(/^(\d+)px$/);if(!G)return;w[S]=G[1]}d("container-resized",r.i,r.h,r.w,w.height,w.width)}function me(w){if(r.static)return;const S=w.type;if(S==="resizestart"&&f.isResizing||S!=="resizestart"&&!f.isResizing)return;const G=Go(w);if(pa(G))return;const{x:L,y:de}=G,H={width:0,height:0};let P;switch(S){case"resizestart":{W(),ke=y,Y=B,P=J(D,$,y,B),H.width=P.width,H.height=P.height,f.resizing=H,f.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(Z=L),!w.edges.top&&!w.edges.bottom&&(O=de);const Ee=Xo(Z,O,L,de);z.value?H.width=f.resizing.width-Ee.deltaX/f.transformScale:H.width=f.resizing.width+Ee.deltaX/f.transformScale,H.height=f.resizing.height+Ee.deltaY/f.transformScale,f.resizing=H;break}case"resizeend":{P=J(D,$,y,B),H.width=P.width,H.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=ae(H.height,H.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),Z=L,O=de,(y!==P.w||B!==P.h)&&d("resize",r.i,P.h,P.w,H.height,H.width),w.type==="resizeend"&&(ke!==y||Y!==B)&&d("resized",r.i,P.h,P.w,H.height,H.width),b.emit("resizeEvent",w.type,r.i,D,$,P.h,P.w)}function F(w){if(r.static||f.isResizing)return;const S=w.type;if(S==="dragstart"&&f.isDragging||S!=="dragstart"&&!f.isDragging)return;const G=Go(w);if(pa(G))return;const{x:L,y:de}=G,H=w.target;if(!H.offsetParent)return;const P={top:0,left:0};switch(S){case"dragstart":{K=D,ie=$;const oe=H.offsetParent.getBoundingClientRect(),X=H.getBoundingClientRect(),ne=X.left/f.transformScale,q=oe.left/f.transformScale,ve=X.right/f.transformScale,he=oe.right/f.transformScale,we=X.top/f.transformScale,j=oe.top/f.transformScale;z.value?P.left=(ve-he)*-1:P.left=ne-q,P.top=we-j,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const oe=Xo(V,R,L,de);if(z.value?P.left=f.dragging.left-oe.deltaX/f.transformScale:P.left=f.dragging.left+oe.deltaX/f.transformScale,P.top=f.dragging.top+oe.deltaY/f.transformScale,f.bounded){const X=H.offsetParent.clientHeight-Q(r.h,f.rowHeight,f.margin[1]);P.top=re(P.top,0,X);const ne=pe(),q=f.containerWidth-Q(r.w,ne,f.margin[0]);P.left=re(P.left,0,q)}f.dragging=P;break}case"dragend":{const oe=H.offsetParent.getBoundingClientRect(),X=H.getBoundingClientRect(),ne=X.left/f.transformScale,q=oe.left/f.transformScale,ve=X.right/f.transformScale,he=oe.right/f.transformScale,we=X.top/f.transformScale,j=oe.top/f.transformScale;z.value?P.left=(ve-he)*-1:P.left=ne-q,P.top=we-j,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Ee;z.value,Ee=fe(P.top,P.left),V=L,R=de,(D!==Ee.x||$!==Ee.y)&&d("move",r.i,Ee.x,Ee.y),w.type==="dragend"&&(K!==D||ie!==$)&&d("moved",r.i,Ee.x,Ee.y),b.emit("dragEvent",w.type,r.i,Ee.x,Ee.y,B,y)}function J(w,S,G,L){const de=pe();let H;return z.value?H={right:Math.round(de*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:G===1/0?G:Math.round(de*G+Math.max(0,G-1)*f.margin[0]),height:L===1/0?L:Math.round(f.rowHeight*L+Math.max(0,L-1)*f.margin[1])}:H={left:Math.round(de*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:G===1/0?G:Math.round(de*G+Math.max(0,G-1)*f.margin[0]),height:L===1/0?L:Math.round(f.rowHeight*L+Math.max(0,L-1)*f.margin[1])},H}function fe(w,S){const G=pe();let L=Math.round((S-f.margin[0])/(G+f.margin[0])),de=Math.round((w-f.margin[1])/(f.rowHeight+f.margin[1]));return L=Math.max(Math.min(L,f.cols-y),0),de=Math.max(Math.min(de,f.maxRows-B),0),{x:L,y:de}}function pe(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Q(w,S,G){return Number.isFinite(w)?Math.round(S*w+Math.max(0,w-1)*G):w}function re(w,S,G){return Math.max(Math.min(w,G),S)}function ae(w,S,G=!1){const L=pe();let de=Math.round((S+f.margin[0])/(L+f.margin[0])),H=0;return G?H=Math.ceil((w+f.margin[1])/(f.rowHeight+f.margin[1])):H=Math.round((w+f.margin[1])/(f.rowHeight+f.margin[1])),de=Math.max(Math.min(de,f.cols-D),0),H=Math.max(Math.min(H,f.maxRows-$),0),{w:de,h:H}}function se(w,S){f.containerWidth=w}function Me(){Ze()}function ot(){!g.value&&E.value&&(g.value=Zo(E.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Wo(F);function C(){if(ot(),!!g.value)if(f.draggable&&!r.static){const w={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(w),x||(x=!0,g.value.on("dragstart dragmove dragend",S=>{S.type==="dragmove"?h(S):F(S)}))}else g.value.draggable({enabled:!1})}const I=Wo(me);function W(){if(ot(),!!g.value)if(f.resizable&&!r.static){const w=J(0,0,r.maxW,r.maxH),S=J(0,0,r.minW,r.minH),G={edges:{left:z.value?`.${Oe.value[0]}`:!1,right:z.value?!1:`.${Oe.value[0]}`,bottom:`.${Oe.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:S.height*f.transformScale,width:S.width*f.transformScale},max:{height:w.height*f.transformScale,width:w.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(G.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(G),_||(_=!0,g.value.on("resizestart resizemove resizeend",L=>{L.type==="resizemove"?I(L):me(L)}))}else g.value.resizable({enabled:!1})}return(w,S)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass(Fe.value),style:e.normalizeStyle(f.style)},[e.renderSlot(w.$slots,"default"),ee.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Oe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),nn=typeof window<"u";var Qo;nn&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function er(n){return n!=null}function tr(){}const op=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(op)));const rp=nn&&("ontouchstart"in window||ip()>0),lp=rp?"pointerdown":"click";function ip(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function sp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...b}=i;if(!er(r)||r==="")return!1;let g;return er(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,b),n.dispatchEvent(g)}const cp="clickoutside",up=new Set;nn&&document.addEventListener(lp,n=>{const i=n.target,s=n.composedPath&&n.composedPath();up.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&sp(r,{type:cp})})},!0);const dp=[["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 Rn;if(nn){for(const n of dp)if(n[1]in document){Rn=n;break}}e.computed(()=>!1);const pp=new Set,fp=new WeakMap;if(nn&&Rn){const n=Rn[2],i=Rn[4];document.addEventListener(i,()=>{if(pp.forEach(s=>{s.value=!1}),document[n]){const s=fp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var tn=[],vp=function(){return tn.some(function(n){return n.activeTargets.length>0})},hp=function(){return tn.some(function(n){return n.skippedTargets.length>0})},ar="ResizeObserver loop completed with undelivered notifications.",gp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ar}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ar),window.dispatchEvent(n)},_n;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_n||(_n={}));var an=function(n){return Object.freeze(n)},mp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,an(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,an(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,b=i.bottom,g=i.left,f=i.width,x=i.height;return{x:s,y:r,top:d,right:u,bottom:b,left:g,width:f,height:x}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),ko=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(ko(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,b=d.offsetHeight;return!(u||b||n.getClientRects().length)},nr=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},yp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Cn=typeof window<"u"?window:{},On=new WeakMap,or=/auto|scroll/,bp=/^tb|vertical/,kp=/msie|trident/i.test(Cn.navigator&&Cn.navigator.userAgent),xa=function(n){return parseFloat(n||"0")},dn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new mp((s?i:n)||0,(s?n:i)||0)},rr=an({devicePixelContentBoxSize:dn(),borderBoxSize:dn(),contentBoxSize:dn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),On.has(n)&&!i)return On.get(n);if(Zr(n))return On.set(n,rr),rr;var s=getComputedStyle(n),r=ko(n)&&n.ownerSVGElement&&n.getBBox(),d=!kp&&s.boxSizing==="border-box",u=bp.test(s.writingMode||""),b=!r&&or.test(s.overflowY||""),g=!r&&or.test(s.overflowX||""),f=r?0:xa(s.paddingTop),x=r?0:xa(s.paddingRight),_=r?0:xa(s.paddingBottom),V=r?0:xa(s.paddingLeft),R=r?0:xa(s.borderTopWidth),Z=r?0:xa(s.borderRightWidth),O=r?0:xa(s.borderBottomWidth),ke=r?0:xa(s.borderLeftWidth),Y=V+x,K=f+_,ie=ke+Z,D=R+O,$=g?n.offsetHeight-D-n.clientHeight:0,y=b?n.offsetWidth-ie-n.clientWidth:0,B=d?Y+ie:0,E=d?K+D:0,ye=r?r.width:xa(s.width)-B-y,Xe=r?r.height:xa(s.height)-E-$,it=ye+Y+y+ie,Ne=Xe+K+$+D,$e=an({devicePixelContentBoxSize:dn(Math.round(ye*devicePixelRatio),Math.round(Xe*devicePixelRatio),u),borderBoxSize:dn(it,Ne,u),contentBoxSize:dn(ye,Xe,u),contentRect:new Jr(V,f,ye,Xe)});return On.set(n,$e),$e},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,b=r.devicePixelContentBoxSize;switch(i){case _n.DEVICE_PIXEL_CONTENT_BOX:return b;case _n.BORDER_BOX:return d;default:return u}},xp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=an([s.borderBoxSize]),this.contentBoxSize=an([s.contentBoxSize]),this.devicePixelContentBoxSize=an([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},wp=function(){var n=1/0,i=[];tn.forEach(function(u){if(u.activeTargets.length!==0){var b=[];u.activeTargets.forEach(function(g){var f=new xp(g.target),x=tl(g.target);b.push(f),g.lastReportedSize=el(g.target,g.observedBox),x<n&&(n=x)}),i.push(function(){u.callback.call(u.observer,b,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},lr=function(n){tn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Dp=function(){var n=0;for(lr(n);vp();)n=wp(),lr(n);return hp()&&gp(),n>0},io,al=[],Cp=function(){return al.splice(0).forEach(function(n){return n()})},_p=function(n){if(!io){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cp()}).observe(s,r),io=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),io()},Ep=function(n){_p(function(){requestAnimationFrame(n)})},Pn=0,Sp=function(){return!!Pn},Tp=250,Ip={attributes:!0,characterData:!0,childList:!0,subtree:!0},ir=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sr=function(n){return n===void 0&&(n=0),Date.now()+n},so=!1,Bp=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Tp),!so){so=!0;var r=sr(i);Ep(function(){var d=!1;try{d=Dp()}finally{if(so=!1,i=r-sr(),!Sp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ip)};document.body?s():Cn.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ir.forEach(function(s){return Cn.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ir.forEach(function(s){return Cn.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Bp,cr=function(n){!Pn&&n>0&&fo.start(),Pn+=n,!Pn&&fo.stop()},Np=function(n){return!ko(n)&&!yp(n)&&getComputedStyle(n).display==="inline"},Ap=function(){function n(i,s){this.target=i,this.observedBox=s||_n.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Np(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Vp=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Mn=new WeakMap,ur=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Vp(i,s);Mn.set(i,r)},n.observe=function(i,s,r){var d=Mn.get(i),u=d.observationTargets.length===0;ur(d.observationTargets,s)<0&&(u&&tn.push(d),d.observationTargets.push(new Ap(s,r&&r.box)),cr(1),fo.schedule())},n.unobserve=function(i,s){var r=Mn.get(i),d=ur(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&tn.splice(tn.indexOf(r),1),r.observationTargets.splice(d,1),cr(-1))},n.disconnect=function(i){var s=this,r=Mn.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Op=function(){function n(i){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof i!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zn.connect(this,i)}return n.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nr(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.prototype.unobserve=function(i){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nr(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Mp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:b,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:x}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:x,width:b??f,height:g??x}))}}}const nl=new(nn&&window.ResizeObserver||Op)(Mp);function dr(n,i){Zn.set(n,i),nl.observe(n)}function pr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function zp(n={}){let i=tr;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(dr(d,n.onResize),i=()=>{pr(d),i=tr})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:dr,unobserveResize:pr,unobserve:r}}const Lp=e.ref(!1);e.computed(()=>Lp.value);const fr="__theme_style__",co="__theme_observer__",vr=e.reactive(new Map),hr=new Map;e.watch(vr,()=>{if(!nn)return;hr.clear();const n=document.head.querySelector(`#${fr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${co} { width: 1px }`,r=1;for(const[d,[u,b]]of vr.entries())s+=` html.${u} .${co}, .${b} .${co} { width: ${++r}px }`,hr.set(r,d);i.textContent=s,i.id=fr,document.head.appendChild(i)});const ol=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(n,{expose:i,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:x,unobserveResize:_}=zp(),V=zd();V.on("resizeEvent",R),V.on("dragEvent",Z),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{qd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Xe(),f.value&&x(f.value,Ld(D,16)),cn(g.value,r.verticalCompact),d("layout-updated",g.value),ie(),D()})})}),e.onBeforeUnmount(()=>{V.clearAll(),f.value&&_(f.value)});function R(Ne,$e,_e,A,te,ce){E(Ne,$e,_e,A,te,ce)}function Z(Ne,$e,_e,A,te,ce){B(Ne,$e,_e,A,te,ce)}e.watch(()=>u.width,(Ne,$e)=>{e.nextTick(()=>{V.emit("updateWidth",Ne),$e===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),ie()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,Ne=>{V.emit("setColNum",Ne)}),e.watch(()=>r.rowHeight,Ne=>{V.emit("setRowHeight",Ne)}),e.watch(()=>r.isDraggable,Ne=>{V.emit("setDraggable",Ne)}),e.watch(()=>r.isResizable,Ne=>{V.emit("setResizable",Ne)}),e.watch(()=>r.isBounded,Ne=>{V.emit("setBounded",Ne)}),e.watch(()=>r.transformScale,Ne=>{V.emit("setTransformScale",Ne)}),e.watch(()=>r.responsive,Ne=>{Ne||(d("update:layout",u.originalLayout),V.emit("setColNum",r.colNum)),D()}),e.watch(()=>r.maxRows,Ne=>{V.emit("setMaxRows",Ne)}),e.watch([()=>r.margin,()=>r.margin[1]],ie),e.provide(jr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:O,decreaseItem:ke})),e.provide(Kr,V),i({state:u,getItem:Y,resizeEvent:E,dragEvent:B,layoutUpdate:K});function O(Ne){b.set(Ne.i,Ne)}function ke(Ne){b.delete(Ne.i)}function Y(Ne){return b.get(Ne)}function K(){if(!pa(g.value)&&!pa(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Ne=it(g.value,u.originalLayout);if(Ne.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Ne);else{const $e=new Set(Ne.map(_e=>_e.i));u.originalLayout=u.originalLayout.filter(_e=>!$e.has(_e.i))}u.lastLayoutLength=g.value.length,Xe()}cn(g.value,r.verticalCompact),V.emit("updateWidth",u.width),ie(),d("layout-updated",g.value)}}function ie(){u.mergedStyle={height:$()}}function D(){f.value&&(u.width=f.value.offsetWidth),V.emit("resizeEvent")}function $(){if(!r.autoSize)return;const Ne=parseFloat(r.margin[1]);return Rd(g.value)*(r.rowHeight+Ne)+Ne+"px"}let y;function B(Ne,$e,_e,A,te,ce){let ge=Ho(g.value,$e);pa(ge)&&(ge={h:0,w:0,x:0,y:0,i:""}),Ne==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Ye,{i:nt,x:ee,y:z})=>({...Ye,[nt]:{x:ee,y:z}}),{})),Ne==="dragmove"||Ne==="dragstart"?(u.placeholder.i=$e,u.placeholder.x=ge.x,u.placeholder.y=ge.y,u.placeholder.w=ce,u.placeholder.h=te,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,ge,_e,A,!0,r.preventCollision),r.restoreOnDrag?(ge.static=!0,cn(g.value,r.verticalCompact,y),ge.static=!1):cn(g.value,r.verticalCompact),V.emit("compact"),ie(),Ne==="dragend"&&(y=void 0,d("layout-updated",g.value))}function E(Ne,$e,_e,A,te,ce){let ge=Ho(g.value,$e);pa(ge)&&(ge={h:0,w:0,x:0,y:0,i:""});let Ye;if(r.preventCollision){const nt=Wr(g.value,{...ge,w:ce,h:te}).filter(ee=>ee.i!==ge.i);if(Ye=nt.length>0,Ye){let ee=1/0,z=1/0;nt.forEach(be=>{be.x>ge.x&&(ee=Math.min(ee,be.x)),be.y>ge.y&&(z=Math.min(z,be.y))}),Number.isFinite(ee)&&(ge.w=ee-ge.x),Number.isFinite(z)&&(ge.h=z-ge.y)}}Ye||(ge.w=ce,ge.h=te),Ne==="resizestart"||Ne==="resizemove"?(u.placeholder.i=$e,u.placeholder.x=_e,u.placeholder.y=A,u.placeholder.w=ge.w,u.placeholder.h=ge.h,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):Ne&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&ye(),cn(g.value,r.verticalCompact),V.emit("compact"),ie(),Ne==="resizeend"&&d("layout-updated",g.value)}function ye(){const Ne=Jd(r.breakpoints,u.width);if(Ne===u.lastBreakpoint)return;const $e=Gr(Ne,r.cols);!pa(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const _e=Zd(u.originalLayout,u.layouts,r.breakpoints,Ne,u.lastBreakpoint,$e,r.verticalCompact);u.layouts[Ne]=_e,u.lastBreakpoint!==Ne&&d("breakpoint-changed",Ne,_e),g.value=_e,d("update:layout",_e),u.lastBreakpoint=Ne,V.emit("setColNum",$e)}function Xe(){u.layouts=Object.assign({},r.responsiveLayouts)}function it(Ne,$e){const _e=new Set($e.map(ge=>ge.i)),A=new Set(Ne.map(ge=>ge.i)),te=Ne.filter(ge=>!_e.has(ge.i)),ce=$e.filter(ge=>!A.has(ge.i));return te.concat(ce)}return(Ne,$e)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Ne.$slots.default?e.renderSlot(Ne.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,_e=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:_e.i,ref_for:!0},_e),{default:e.withCtx(()=>[e.renderSlot(Ne.$slots,"item",{item:_e})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.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(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Fp={key:0,class:"item-view-group"},Rp={key:0,class:"item-view-group"},Pp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=$t.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,b=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var R,Z,O,ke;return((R=u==null?void 0:u.children)==null?void 0:R.length)>0&&((Z=u==null?void 0:u.children)!=null&&Z.every(Y=>Y==null?void 0:Y.layout))?(ke=(O=u==null?void 0:u.children)==null?void 0:O[0])==null?void 0:ke.layout:"vertical"}),f=e.computed(()=>{var R,Z;return((Z=(R=u==null?void 0:u.children)==null?void 0:R[0])==null?void 0:Z.isGridLayout)||!1}),x=e.ref((u==null?void 0:u.level)+1),_=R=>{d("rowClick",R)},V=(R,Z)=>{d("routeUrl",R,Z)};return(R,Z)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:b.value,"onUpdate:layout":Z[0]||(Z[0]=O=>b.value=O),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(O,ke)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:O.i,x:O.x,y:O.y,"min-h":O.minH,"max-h":O.maxH,"min-w":O.minW,w:O.w,h:O.h,i:O.i},{default:e.withCtx(()=>{var Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ke===((Y=u==null?void 0:u.children)==null?void 0:Y.length)-1?"0px":"24px"})},[((ie=(K=O==null?void 0:O.component)==null?void 0:K.comp)==null?void 0:ie.toUpperCase())!=="TABLE"&&((D=O==null?void 0:O.component)!=null&&D.name)?(e.openBlock(),e.createElementBlock("div",Fp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(($=O==null?void 0:O.component)==null?void 0:$.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)((y=O==null?void 0:O.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(B=e.unref(pt)[ke])==null?void 0:B.showIndex,allowMove:(E=e.unref(pt)[ke])==null?void 0:E.allowMove,viewport:(ye=e.unref(pt)[ke])==null?void 0:ye.viewport},compName:O==null?void 0:O.component.name,compNames:e.unref(yo),itemData:(Xe=O==null?void 0:O.component)==null?void 0:Xe.compData,childItemData:(it=O==null?void 0:O.component)==null?void 0:it.itemChildData,key:e.unref(pn),cacheNewData:e.unref(qn),onChange:e.unref(Gn),index:(O==null?void 0:O.id)??ke,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(Ne=O==null?void 0:O.component)==null?void 0:Ne.tableId,allMapContents:e.unref(Wn),children:($e=O==null?void 0:O.component)==null?void 0:$e.children,level:x.value,onRowClick:_,onRouteUrl:V,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(zr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(O,ke)=>{var Y,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(O==null?void 0:O.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ke)===((Y=u==null?void 0:u.children)==null?void 0:Y.length)-1?"0px":"24px"})},[((K=O==null?void 0:O.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&O.name?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(O.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(O.comp)),{compName:O.name,itemData:O==null?void 0:O.compData,childItemData:O==null?void 0:O.itemChildData,key:e.unref(pn),onChange:e.unref(Gn),index:(O==null?void 0:O.id)??ke,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:O==null?void 0:O.tableId,allMapContents:e.unref(Wn),children:O==null?void 0:O.children,level:x.value,onRowClick:_,onRouteUrl:V},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$p=zt._export_sfc(Pp,[["__scopeId","data-v-e672653d"]]),rl=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"}]),jp={TABLE:bn.ssTable,FORM:Mo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:zo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Ao.ssAvatar,SIGNATURE:Ao.ssSignature,FORMTOP:Mo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:zo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:Ku,LAYOUT:Cd,LAYOUTOPERATE:Vd,PARENTITEM:$p};function on(n){return jp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Sr;exports.activeStepInfo=un;exports.addSelectMenu=eo;exports.affixItems=rd;exports.allMapContents=Wn;exports.cacheNewData=qn;exports.clickMainKey=zr;exports.clickSavePage=od;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=pn;exports.compNames=yo;exports.compShow=Un;exports.debounce=vo;exports.existLayouts=vd;exports.generateLayouts=ys;exports.getComponent=on;exports.getComponents=Hn;exports.getSliceContLength=bd;exports.gridRowHeight=fs;exports.isStepLayout=bo;exports.isUndefined=yr;exports.onBack=ad;exports.onChange=Gn;exports.onClick=nd;exports.onContentChange=Xn;exports.onExtendTaskEnd=fd;exports.onPageBack=gd;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Jt;exports.setComponent=Ir;exports.showItems=pt;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=jn;exports.st=Jn;exports.stepItems=kd;exports.toolBar=Ba;exports.verifyButton=md;
|
|
1
|
+
"use strict";const bn=require("./index-B2FiRoly.cjs"),e=require("vue"),v=require("./index-DOItJqcJ.cjs"),St=require("./index-BPTR1s4o.cjs"),Se=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C8n9olfd.cjs"),Xt=require("./index-CnuMyt69.cjs"),Io=require("./threeViewerHost-krP0Lb0-.cjs"),$t=require("./index-CXC0u8pm.cjs"),zt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-Do5yyRUw.cjs"),No=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ao=require("./index-D31qdo3B.cjs"),gr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-BCfX45g1.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),yn=require("./index-9hspBVrQ.cjs"),xn=require("./index-DaRuwvRP.cjs");var $l=/\s/;function jl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var Kl=/^\s+/;function Ul(n){return n&&n.slice(0,jl(n)+1).replace(Kl,"")}var Vo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function Oo(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Vo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Vo:+n}var ro=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,b,g,f,x=0,_=!1,V=!1,R=!0;if(typeof n!="function")throw new TypeError(Xl);i=Oo(i)||0,v.isObject(s)&&(_=!!s.leading,V="maxWait"in s,u=V?Yl(Oo(s.maxWait)||0,i):u,R="trailing"in s?!!s.trailing:R);function Z(B){var E=r,ye=d;return r=d=void 0,x=B,b=n.apply(ye,E),b}function O(B){return x=B,g=setTimeout(K,i),_?Z(B):b}function ke(B){var E=B-f,ye=B-x,Xe=i-E;return V?Jl(Xe,u-ye):Xe}function Y(B){var E=B-f,ye=B-x;return f===void 0||E>=i||E<0||V&&ye>=u}function K(){var B=ro();if(Y(B))return ie(B);g=setTimeout(K,ke(B))}function ie(B){return g=void 0,R&&r?Z(B):(r=d=void 0,b)}function D(){g!==void 0&&clearTimeout(g),x=0,r=f=d=g=void 0}function $(){return g===void 0?b:ie(ro())}function y(){var B=ro(),E=Y(B);if(r=arguments,d=this,f=B,E){if(g===void 0)return O(f);if(V)return clearTimeout(g),g=setTimeout(K,i),Z(f)}return g===void 0&&(g=setTimeout(K,i)),b}return y.cancel=D,y.flush=$,y}var Zl="[object Boolean]";function mr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function yr(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__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(n,{emit:i}){const s=()=>{b.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var L;const S=(L=nt.value)==null?void 0:L.split("/");return(S==null?void 0:S.some(de=>(de==null?void 0:de.includes("updateLoading"))||(de==null?void 0:de.includes("loading"))))?!1:$e.value==="view"});const d=i,u=e.ref([]),b=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:x}=Io.useThreeSystem(),_=e.ref(),V=e.ref(!1),R=e.ref(!1),Z=e.ref([]),O=e.ref(),ke=e.ref(!1),Y=e.ref([]),K=bn.useFormToTableComp(v.pinia),ie=bn.useFormComp(v.pinia),D=e.ref(!1),$=e.ref(),y=v.useLoginState(v.pinia),{loginUserInfo:B}=v.storeToRefs(y),E=e.ref(),ye=e.ref(!0),Xe=$t.useModelComp(v.pinia),{tableViewContents:it,itemData:Ne,isEdit:$e,routeToChildPath:_e,lockingPage:A}=v.storeToRefs(Xe),te=e.ref(null),ce=e.ref(!1),ge=e.ref(!1),Ye=$t.useMenuState(),{activeMenuPath:nt}=v.storeToRefs(Ye),ee=Se.useOriginalState(v.pinia),{originalPath:z}=v.storeToRefs(ee),be=e.ref([]),xe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Fe=async S=>{ge.value=S,await fe("disabled",null,S,!0)},Oe=async S=>{await fe("operable",null,S,!0)};e.watch(()=>nt.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Ze=()=>{e.nextTick(()=>{J()})},qe=S=>{var G;u.value=(G=u.value)==null?void 0:G.map(L=>({...L,isFormColHidden:!(S!=null&&S.includes(L.label))}))};e.onUnmounted(()=>{te.value=null});const me=S=>{d("clickTrigger",S)},F=async S=>{var G,L,de,H,P,Ee;if(S===""){let oe="";(G=u.value)==null||G.forEach(ve=>{ve!=null&&ve.isMain&&(oe=ve==null?void 0:ve.value)});let X=await Se.getItemData(_e.value,sessionStorage.getItem("systemKey"),"");oe=((Ee=(P=(H=(de=(L=X==null?void 0:X[0])==null?void 0:L.compData)==null?void 0:de.find(ve=>(ve==null?void 0:ve.key)==="mainRouters"))==null?void 0:H.contents)==null?void 0:P[0])==null?void 0:Ee.routerContent)+z.value+oe;let q=await Se.getItemData(oe,sessionStorage.getItem("systemKey"),"");ke.value=!0,Y.value=q==null?void 0:q.filter(ve=>(ve==null?void 0:ve.comp)!=="methodButton"),d("routeUrl",Y.value)}},J=()=>{var G;const S=(G=te.value)==null?void 0:G.$el;S&&Se.Sortable.create(S,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:L=>{const{oldIndex:de,newIndex:H}=L;if(de===H)return;const P=u.value.splice(de,1)[0];u.value.splice(H,0,P)}})},fe=async(S,G,L,de=!1)=>{var H,P,Ee,oe,X,ne,q,ve;try{Xe.setRefreshCurStructure(!1);const he=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((H=he==null?void 0:he.data)==null?void 0:H.code)===200){let we=(X=(oe=(Ee=(P=he==null?void 0:he.data)==null?void 0:P.result)==null?void 0:Ee[0])==null?void 0:oe.value)==null?void 0:X.pageData;de?we={...we,compData:(q=we==null?void 0:we.compData)==null?void 0:q.map(De=>{var ue;return(De==null?void 0:De.key)==="formContent"?{...De,contents:(ue=De==null?void 0:De.contents)==null?void 0:ue.map(Ae=>({...Ae,[S]:L}))}:De})}:we={...we,compData:(ne=we==null?void 0:we.compData)==null?void 0:ne.map(De=>{var ue;return(De==null?void 0:De.key)==="formContent"?{...De,contents:(ue=De==null?void 0:De.contents)==null?void 0:ue.map(Ae=>(Ae==null?void 0:Ae.prop)===(G==null?void 0:G.prop)?{...Ae,[S]:L}:Ae)}:De})};const j=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:we}});((ve=j==null?void 0:j.data)==null?void 0:ve.code)===200?(v.ElMessage.success("编辑成功"),Xe.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},pe=async(S,G)=>{await fe("label",G,S)},Q=async(S,G)=>{S&&await fe("type",G,S)},re=async(S,G,L)=>{await fe(G,L,S,!1)},ae=(S,G)=>{E.value===G?ye.value=!1:ye.value=!0,E.value=G==null?void 0:G.changeProp},se=async S=>{var L,de,H,P,Ee,oe,X,ne,q,ve,he,we,j,De,ue;let G=[];if((L=S==null?void 0:S.toString())!=null&&L.includes(".urdf")){if(S.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:S,extension:x(S)}],g.value=!0,b.value=!0;return}if((de=S==null?void 0:S.toString())!=null&&de.includes(".stl")||(H=S==null?void 0:S.toString())!=null&&H.includes(".STL")||(P=S==null?void 0:S.toString())!=null&&P.includes(".obj")||(Ee=S==null?void 0:S.toString())!=null&&Ee.includes(".mtl")){const Qe=((oe=S==null?void 0:S.toString())==null?void 0:oe.split(",")).map(We=>({url:We,extension:x(We)}));f.value=Qe,g.value=!1,b.value=!0;return}if((X=S==null?void 0:S.toString())!=null&&X.includes(".stl")||(ne=S==null?void 0:S.toString())!=null&&ne.includes(".STL")||(q=S==null?void 0:S.toString())!=null&&q.includes(".obj")||(ve=S==null?void 0:S.toString())!=null&&ve.includes(".mtl")){let Ae,Qe=[],We={};if(Array.isArray(S)?Ae=S:Ae=S==null?void 0:S.split(","),Ae==null||Ae.forEach(rt=>{rt.includes(".mtl")?Qe.push(rt):We.blob=We.blob?We.blob+","+rt:rt}),(Qe==null?void 0:Qe.length)>0&&(We.mtlBlobs=Qe),(we=(he=Object.values(We))==null?void 0:he[0])!=null&&we.includes("http:"))G.push(We);else{const rt=new Blob([We.blob],{type:"application/octet-stream;charset=UTF-8"});let Re=URL.createObjectURL(rt),gt="";(j=S==null?void 0:S.split("/"))==null||j.forEach((tt,et)=>{var Be;et===((Be=S==null?void 0:S.split("/"))==null?void 0:Be.length)-1&&(gt=tt)}),(De=We.blob)!=null&&De.includes(".stl")&&(gt=(gt==null?void 0:gt.replaceAll(">",""))+".urdf"),O.value=[{name:gt,blobUrl:Re}],R.value=!0}}else{const Ae=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Qe=await v.axios.get(S,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ae.close()}),We=new Blob([Qe.data],{type:"application/octet-stream;charset=UTF-8"});let rt=URL.createObjectURL(We),Re="";(ue=S==null?void 0:S.split("/"))==null||ue.forEach((gt,tt)=>{var et;tt===((et=S==null?void 0:S.split("/"))==null?void 0:et.length)-1&&(Re=gt)}),O.value=[{name:Re,blobUrl:rt}],R.value=!0}(G==null?void 0:G.length)>0&&ie.setBlobUrls(G)},Me=()=>{R.value=!1},ot=S=>{var P,Ee,oe,X;const G=(Ee=(P=v.cloneDeep(r.itemData))==null?void 0:P.find(ne=>(ne==null?void 0:ne.key)==="formContent"))==null?void 0:Ee.contents,L=v.cloneDeep(S.content);let de={};L&&((oe=Object.values(L))==null?void 0:oe.length)>0&&((X=Object.values(L))==null||X.forEach((ne,q)=>{de[G[q].key]=ne}));const H={content:de,index:r==null?void 0:r.index,buttonName:S==null?void 0:S.buttonName};d("change",H)},h=e.computed(()=>"http://222.92.178.198:62001"),C=async S=>{var he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et,Be,He,xt;if(!S)return;(we=(he=r==null?void 0:r.itemData)==null?void 0:he.find(ze=>(ze==null?void 0:ze.key)==="parentFormPath"))==null||we.contents;let G=it.value;(G==null?void 0:G.length)>0&&(G=G==null?void 0:G.map(ze=>{var je,Ke,M,Te;let Le=(je=ze==null?void 0:ze.key)==null?void 0:je.split("/");return(r==null?void 0:r.compName)===(Le==null?void 0:Le[0])&&(Ke=u.value)!=null&&Ke.find(at=>(at==null?void 0:at.prop)===(Le==null?void 0:Le[1]))&&(ze.value=(Te=(M=u.value)==null?void 0:M.find(at=>(at==null?void 0:at.prop)===(Le==null?void 0:Le[1])))==null?void 0:Te.value),ze}),Xe.setTableViewContents(G));const L=v.cloneDeep(r.itemData);let de=L==null?void 0:L.map(ze=>{var Le;return(ze==null?void 0:ze.key)==="formContent"&&((Le=ze.contents)==null||Le.map((je,Ke)=>{var M,Te,at,Ve,Ge,Ie,dt,ut,st,ft,yt,Nt,Rt,Vt,_t,Lt,kt,Ht,Yt;return je.type=(Te=(M=u.value)==null?void 0:M.find(Ot=>(Ot==null?void 0:Ot.prop)===(je==null?void 0:je.prop)))==null?void 0:Te.type,je.options=je!=null&&je.options?je.options:((Ge=(Ve=(at=je==null?void 0:je.key)==null?void 0:at.split("$"))==null?void 0:Ve[1])==null?void 0:Ge.length)>0?(st=(ut=bn.formGetOptions((dt=(Ie=je==null?void 0:je.key)==null?void 0:Ie.split("$"))==null?void 0:dt[1]))==null?void 0:ut.split(","))==null?void 0:st.map(Ot=>({label:Ot,value:Ot})):[],(ft=je==null?void 0:je.key)!=null&&ft.includes("$")&&(je.key=(Nt=(yt=je==null?void 0:je.key)==null?void 0:yt.split("$"))==null?void 0:Nt[0]),je.signature=(Vt=(Rt=u.value)==null?void 0:Rt.find(Ot=>(Ot==null?void 0:Ot.prop)===(je==null?void 0:je.prop)))==null?void 0:Vt.signature,je.isLoginUser=(Lt=(_t=u.value)==null?void 0:_t.find(Ot=>(Ot==null?void 0:Ot.prop)===(je==null?void 0:je.prop)))==null?void 0:Lt.isLoginUser,je.value=(kt=Object.values(S))==null?void 0:kt[Ke],je.isFormColHidden=(Yt=(Ht=u.value)==null?void 0:Ht.find(Ot=>(Ot==null?void 0:Ot.prop)===(je==null?void 0:je.prop)))==null?void 0:Yt.isFormColHidden,je})),ze}),H=u.value,P=(De=(j=v.cloneDeep(de))==null?void 0:j.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:De.contents;if(H=H==null?void 0:H.map(ze=>{var Le;return ze.value=(Le=P==null?void 0:P.find((je,Ke)=>((je==null?void 0:je.id)??Ke)===(ze==null?void 0:ze.id)))==null?void 0:Le.value,ze}),!ye.value){d("contentChange",{contents:de,index:r.index});return}let Ee="",oe=(Qe=(Ae=(ue=v.cloneDeep(de))==null?void 0:ue.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:Ae.contents)==null?void 0:Qe.find((ze,Le)=>{var je,Ke,M;return(ze==null?void 0:ze.label)===E.value||Le.toString()===((M=(Ke=(je=E.value)==null?void 0:je.split("t"))==null?void 0:Ke[1])==null?void 0:M.toString())}),X=(We=oe==null?void 0:oe.optionUrl)==null?void 0:We.menuSelect,ne=!0;if((gt=(Re=(rt=v.cloneDeep(de))==null?void 0:rt.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:Re.contents)==null||gt.forEach(ze=>{var Le,je,Ke,M,Te,at;ne&&((Ke=(je=(Le=ze==null?void 0:ze.optionUrl)==null?void 0:Le.groupSelect)==null?void 0:je[1])!=null&&Ke.includes("["))&&(Ee=(Te=(M=ze==null?void 0:ze.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Te[1],JSON.stringify(X)===JSON.stringify((at=ze==null?void 0:ze.optionUrl)==null?void 0:at.menuSelect)&&(ne=!1))}),(tt=oe==null?void 0:oe.optionUrl)!=null&&tt.menuSelect&&ye.value){let ze=await bn.getSelectRow(oe),Le,je=(et=oe==null?void 0:oe.optionUrl)==null?void 0:et.menuSelect;if(ze==null||ze.forEach(Ke=>{var M,Te,at,Ve,Ge,Ie,dt,ut,st,ft;Ee===((Te=(M=oe==null?void 0:oe.optionUrl)==null?void 0:M.groupSelect)==null?void 0:Te[1])&&((Ge=(Ve=(at=oe==null?void 0:oe.optionUrl)==null?void 0:at.groupSelect)==null?void 0:Ve[1])!=null&&Ge.includes("["))&&((ft=v.cloneDeep(Ke))==null?void 0:ft[(st=(ut=(dt=(Ie=oe==null?void 0:oe.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:dt[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])===(oe==null?void 0:oe.value)&&(Le=Ke)}),Le){let Ke=v.cloneDeep(H);Ke=Ke==null?void 0:Ke.map(Te=>{var at,Ve,Ge,Ie,dt,ut,st,ft,yt,Nt,Rt;return(Le!=null&&Le[Te==null?void 0:Te.label]||Le!=null&&Le[(Ie=(Ge=(Ve=(at=Te==null?void 0:Te.optionUrl)==null?void 0:at.groupSelect)==null?void 0:Ve[1])==null?void 0:Ge.replaceAll("[",""))==null?void 0:Ie.replaceAll("]","")])&&((st=(ut=(dt=Te==null?void 0:Te.optionUrl)==null?void 0:dt.groupSelect)==null?void 0:ut[1])!=null&&st.includes("["))&&je!=null&&je.every(Vt=>{var _t,Lt;return(Lt=(_t=Te==null?void 0:Te.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:Lt.includes(Vt)})&&(Te.value=(Le==null?void 0:Le[Te==null?void 0:Te.label])||(Le==null?void 0:Le[(Rt=(Nt=(yt=(ft=Te==null?void 0:Te.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:yt[1])==null?void 0:Nt.replaceAll("[",""))==null?void 0:Rt.replaceAll("]","")]),Array.isArray(Te.value)&&Te.value.every(Vt=>(Vt==null?void 0:Vt.url)&&(Vt==null?void 0:Vt.name))&&(Te.type="Upload")),Te}),Ke=Ke==null?void 0:Ke.map(Te=>{var at,Ve,Ge;return(at=Te==null?void 0:Te.optionUrl)!=null&&at.oldMenuSelect&&(Te.optionUrl.menuSelect=(Ge=(Ve=v.cloneDeep(Te))==null?void 0:Ve.optionUrl)==null?void 0:Ge.oldMenuSelect),Te}),u.value=v.cloneDeep(Ke);let M=v.cloneDeep(Ke);M=M==null?void 0:M.map(Te=>{var at,Ve,Ge,Ie,dt,ut;return(Ve=(at=Te==null?void 0:Te.optionUrl)==null?void 0:at.menuSelect)!=null&&Ve.some(st=>st==null?void 0:st.includes("["))&&(Te.optionUrl.oldMenuSelect=(Ie=(Ge=v.cloneDeep(Te))==null?void 0:Ge.optionUrl)==null?void 0:Ie.menuSelect,Te.optionUrl.menuSelect=(ut=(dt=Te==null?void 0:Te.optionUrl)==null?void 0:dt.menuSelect)==null?void 0:ut.map(st=>{var ft,yt,Nt,Rt;if(st!=null&&st.includes("[")){let Vt=(yt=(ft=st==null?void 0:st.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:yt[1];st=(Rt=(Nt=v.cloneDeep(Ke))==null?void 0:Nt.find(_t=>(_t==null?void 0:_t.label)===Vt))==null?void 0:Rt.value}return st})),Te}),u.value=M}else u.value=H;de=de==null?void 0:de.map(Ke=>{var M;return(Ke==null?void 0:Ke.key)==="formContent"&&(Ke.contents=(M=Ke.contents)==null?void 0:M.map(Te=>{var at,Ve,Ge,Ie;return Te.value=((Ve=(at=u.value)==null?void 0:at.find(dt=>(dt==null?void 0:dt.label)===(Te==null?void 0:Te.key)))==null?void 0:Ve.value)??(Te==null?void 0:Te.value),Te.type=((Ie=(Ge=u.value)==null?void 0:Ge.find(dt=>(dt==null?void 0:dt.prop)===(Te==null?void 0:Te.key)))==null?void 0:Ie.type)??(Te==null?void 0:Te.type),Te})),Ke})}ye.value=!1,d("contentChange",{contents:de,index:r.index});let q=[],ve=[];if((He=v.cloneDeep((Be=de==null?void 0:de.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:Be.contents))==null||He.forEach(ze=>{var Le;Array.isArray(ze==null?void 0:ze.value)&&((Le=ze==null?void 0:ze.value)!=null&&Le.find(je=>{var Ke;return(Ke=je==null?void 0:je.url)==null?void 0:Ke.includes(".obj")}))&&(ve=ze==null?void 0:ze.value)}),(ve==null?void 0:ve.length)>0){const ze=(xt=v.cloneDeep(ve))==null?void 0:xt.filter(Le=>{var je;return(je=Le==null?void 0:Le.url)==null?void 0:je.includes(".obj")});ze==null||ze.forEach(Le=>{var Ke,M,Te,at;const je=(Ke=ve==null?void 0:ve.filter(Ve=>{var Ge;return(Ve==null?void 0:Ve.name)===(Le==null?void 0:Le.name)&&((Ge=Ve==null?void 0:Ve.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:Ke.map(Ve=>Ve==null?void 0:Ve.url);q.push({objUrl:Le==null?void 0:Le.url,mtlUrls:((M=ve==null?void 0:ve.filter(Ve=>{var Ge;return(Ve==null?void 0:Ve.name)===(Le==null?void 0:Le.name)&&((Ge=Ve==null?void 0:Ve.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:M.length)===1?(at=(Te=ve==null?void 0:ve.filter(Ve=>{var Ge;return(Ve==null?void 0:Ve.name)===(Le==null?void 0:Le.name)&&((Ge=Ve==null?void 0:Ve.url)==null?void 0:Ge.includes(".mtl"))}))==null?void 0:Te[0])==null?void 0:at.url:je})}),ie.setObjUrl(q)}},I=S=>{if(!S)return;const G=[];let L="";for(let de of S)(de.includes("[")||L.includes("["))&&(L+=de.trim(),v.cloneDeep(L).split("【").length-1===v.cloneDeep(L).split("】").length-1&&v.cloneDeep(L).split("[").length-1===v.cloneDeep(L).split("]").length-1&&(G.push(L.replace(/\/\*[\s\S]*?\*\//g,"")),L=""));return G},W=(S,G,L)=>{let de="";const H=G==null?void 0:G.map(P=>{var Ee;return(Ee=P==null?void 0:P.value)==null?void 0:Ee.pageData});return H==null||H.forEach(P=>{var Ee;(P==null?void 0:P.name)===(S==null?void 0:S[0])&&((Ee=P==null?void 0:P.compData)==null||Ee.forEach(oe=>{var X;(oe==null?void 0:oe.key)==="formContent"&&((X=oe==null?void 0:oe.contents)==null||X.forEach(ne=>{var q;(ne==null?void 0:ne.prop)===(S==null?void 0:S[1])&&(de=(ne==null?void 0:ne.value)===""?Se.judgeContents((q=v.cloneDeep(ne))==null?void 0:q.optionUrl,L):ne==null?void 0:ne.value)}))}))}),de},w=(S,G,L,de)=>{var oe,X;let H="",P="";(oe=v.cloneDeep(G))==null||oe.forEach((ne,q)=>{ne!=null&&ne.includes("[")?P=P+z.value+S[q]:P=P===""?P+ne:P+"/"+ne});let Ee=(X=de[P])==null?void 0:X.map(ne=>{var q;return(q=ne==null?void 0:ne.value)==null?void 0:q.pageData});return Ee==null||Ee.forEach(ne=>{var q;(ne==null?void 0:ne.name)===(L==null?void 0:L[0])&&((q=ne==null?void 0:ne.compData)==null||q.forEach(ve=>{var he;(ve==null?void 0:ve.key)==="formContent"&&((he=ve==null?void 0:ve.contents)==null||he.forEach(we=>{(we==null?void 0:we.prop)===(L==null?void 0:L[1])&&(H=we==null?void 0:we.value)}))}))}),H};return e.watch(()=>r.itemData,async()=>{var Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et;const S=(Ee=r.itemData)==null?void 0:Ee.find(Be=>(Be==null?void 0:Be.key)==="formContent"),G=(oe=v.cloneDeep(r.itemData))==null?void 0:oe.find(Be=>(Be==null?void 0:Be.key)==="formButton"),L=(X=v.cloneDeep(r.itemData))==null?void 0:X.find(Be=>(Be==null?void 0:Be.key)==="formFlex"),de=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(Be=>(Be==null?void 0:Be.key)==="formWrap"),H=(q=v.cloneDeep(r.itemData))==null?void 0:q.find(Be=>(Be==null?void 0:Be.key)==="enableWrap");if((de==null?void 0:de.contents)==="纵向"?V.value=!1:V.value=!0,D.value=(H==null?void 0:H.contents)===void 0?!1:H==null?void 0:H.contents,$.value=typeof(L==null?void 0:L.contents)!="boolean"?!(!(L!=null&&L.contents)===""||((ve=L==null?void 0:L.contents)==null?void 0:ve.toUpperCase())==="VERTICAL"):L==null?void 0:L.contents,((he=S==null?void 0:S.contents)==null?void 0:he.length)>0&&Array.isArray(S==null?void 0:S.contents)){let Be=r.allMapContents;const He=(j=(we=v.cloneDeep(S))==null?void 0:we.contents)==null?void 0:j.map((M,Te)=>{var Vt,_t,Lt,kt,Ht,Yt,Ot,Aa,wa,Va,ja,Da,Ka,Ca,Ua,Wa,Ha,qa,Ga,Oa,ba,fa,_a,ka,na,ga,Xa;let at=(M==null?void 0:M.label)??(M==null?void 0:M.key)??"",Ve=(M==null?void 0:M.type)??"",Ge=(M==null?void 0:M.options)??[];if((Vt=M==null?void 0:M.key)!=null&&Vt.includes("$")&&(at=(_t=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:_t[0],((kt=(Lt=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Lt[1])==null?void 0:kt.length)>0)){const[wt,Zt]=(Yt=(Ht=v.cloneDeep(M==null?void 0:M.key).split("$"))==null?void 0:Ht[1])==null?void 0:Yt.split(/[()]/);Ve=((Ot=Se.FormType.find(mt=>(mt==null?void 0:mt.key)===wt))==null?void 0:Ot.value)??"",((Aa=Zt==null?void 0:Zt.split(","))==null?void 0:Aa.length)>0&&(Ge=(wa=Zt==null?void 0:Zt.split(","))==null?void 0:wa.map(mt=>({label:mt,value:mt})))}let Ie=[];M!=null&&M.contents&&!Array.isArray(M==null?void 0:M.contents)&&(Ie=(ja=(Va=M==null?void 0:M.contents)==null?void 0:Va.split(","))==null?void 0:ja.map(wt=>({label:wt,value:wt}))),((Da=M==null?void 0:M.optionUrl)==null?void 0:Da.selectRelateType)==="自定义绑定"&&(Ie=(Ca=(Ka=M==null?void 0:M.optionUrl)==null?void 0:Ka.defaultSelect)==null?void 0:Ca.map(wt=>({label:wt,value:wt})));let dt=!1,ut=(M==null?void 0:M.isFormColHidden)??!1,st=Se.judgeContents((Ua=v.cloneDeep(M))==null?void 0:Ua.optionUrl,Be),ft=st!==void 0&&st!==""?st:M!=null&&M.originalContent&&(M==null?void 0:M.originalContent)!==""?M.originalContent:M!=null&&M.value?M.value:(Ge==null?void 0:Ge.length)>0?(Wa=Ge==null?void 0:Ge[0])==null?void 0:Wa.value:(M==null?void 0:M.value)??"",yt=!1,Nt=st!==void 0||Ve===""?"Input":Ve;if((Array.isArray(st)&&(st!=null&&st.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(wt=>(wt==null?void 0:wt.name)&&(wt==null?void 0:wt.url))))&&(Nt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||M!=null&&M.isLoginUser)dt=!0,ft=((Ha=B.value)==null?void 0:Ha.姓名)||((qa=B.value)==null?void 0:qa.account)||((Ga=B.value)==null?void 0:Ga.账号)||((Oa=B.value)==null?void 0:Oa.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||M!=null&&M.signature||M!=null&&M.isShow)if(yt=!0,(M==null?void 0:M.isShow)==="originalSignature")Nt="image",ft=h.value+"/"+((ba=B.value)==null?void 0:ba.signature);else{let wt=[...new Set(I(M.isShow))].map(Mt=>{var Ea,oa,ma,Qt;return{key:(Qt=(ma=(oa=(Ea=Mt==null?void 0:Mt.split("["))==null?void 0:Ea[1])==null?void 0:oa.split("]"))==null?void 0:ma[0])==null?void 0:Qt.split(":"),value:""}});(fa=Ne.value)==null||fa.forEach(Mt=>{wt==null||wt.forEach((ca,Ea)=>{var ma;let oa=ca==null?void 0:ca.key;(Mt==null?void 0:Mt.name)===(oa==null?void 0:oa[0].replaceAll("'",""))&&((ma=Mt==null?void 0:Mt.compData)==null||ma.forEach(Qt=>{var Ma;(Qt==null?void 0:Qt.key)==="formContent"&&((Ma=Qt==null?void 0:Qt.contents)==null||Ma.forEach(Tt=>{(Tt==null?void 0:Tt.prop)===(oa==null?void 0:oa[1].replaceAll("'",""))&&(wt[Ea].value=Tt==null?void 0:Tt.value)}))}))})});let Zt=wt==null?void 0:wt.map(Mt=>{var ca;return Mt.key="["+((ca=Mt.key)==null?void 0:ca.join(":"))+"]",Mt}),mt=M==null?void 0:M.isShow;Zt==null||Zt.forEach(Mt=>{Mt!=null&&Mt.value?mt=mt.replaceAll(Mt==null?void 0:Mt.key,"'"+(Mt==null?void 0:Mt.value)+"'"):mt=mt.replaceAll(Mt==null?void 0:Mt.key,"undefined")}),mt!=null&&mt.includes("(")||(mt!=null&&mt.includes("==")?mt=((_a=mt==null?void 0:mt.split("==="))==null?void 0:_a[0])+"==='"+((ka=mt==null?void 0:mt.split("==="))==null?void 0:ka[1])+"'":mt=((na=mt==null?void 0:mt.split("="))==null?void 0:na[0])+"='"+((ga=mt==null?void 0:mt.split("="))==null?void 0:ga[1])+"'"),mt!=null&&mt.includes("=")&&!(mt!=null&&mt.includes("=="))&&!(mt!=null&&mt.includes("==="))&&(mt=mt==null?void 0:mt.replaceAll("=","==")),new Function(`if (${mt}) { return true } else { return false }`)()?(ut=!1,Nt="image",ft=h.value+"/"+((Xa=B.value)==null?void 0:Xa.signature)):ft=""}return Array.isArray(ft)&&ft.every(wt=>(wt==null?void 0:wt.url)&&(wt==null?void 0:wt.name))&&(M.type="Upload"),M!=null&&M.isMainUrl&&(Nt="Url"),{label:at??"",name:"t"+Te,prop:v.cloneDeep(M==null?void 0:M.key),type:Nt,value:M!=null&&M.isNewDate&&ft===""?new Date:ft,id:(M==null?void 0:M.id)??Te,contents:(Ie==null?void 0:Ie.length)>0?Ie:Ge??[],width:(M==null?void 0:M.width)??1,isLoginUser:dt,config:M==null?void 0:M.config,optionUrl:(M==null?void 0:M.optionUrl)??M,isFormColHidden:ut,signature:yt,isMain:M==null?void 0:M.isMain,isMainUrl:M==null?void 0:M.isMainUrl,operable:(M==null?void 0:M.operable)??!1,disabled:(M==null?void 0:M.disabled)??!1}}),xt=He==null?void 0:He.map(M=>M==null?void 0:M.value);let ze="";xt==null||xt.forEach(M=>{M!==""&&M!==void 0&&(ze=ze===""?M:ze+"/"+M)}),K.setSelectArray(xt),K.setSelectString(ze);let Le=(De=v.cloneDeep(He))==null?void 0:De.map(M=>(M!=null&&M.value&&Se.IsJson(M==null?void 0:M.value)&&Array.isArray(JSON.parse(M==null?void 0:M.value))&&(M.value=JSON.parse(M.value)),M));Le=Le==null?void 0:Le.map(M=>{var Te,at,Ve,Ge,Ie,dt,ut,st;if((at=(Te=M==null?void 0:M.optionUrl)==null?void 0:Te.menuSelect)!=null&&at.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";M.optionUrl.oldMenuSelect=(Ge=(Ve=v.cloneDeep(M))==null?void 0:Ve.optionUrl)==null?void 0:Ge.menuSelect,M.optionUrl.menuSelect=(dt=(Ie=M==null?void 0:M.optionUrl)==null?void 0:Ie.menuSelect)==null?void 0:dt.map(yt=>{var Nt,Rt,Vt,_t,Lt,kt;if(yt!=null&&yt.includes("[")){let Ht=(Rt=(Nt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Nt.split(":"))==null?void 0:Rt[1];ft=W((Vt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Vt.split(":"),Be==null?void 0:Be[nt.value],Be),yt=((Lt=(_t=v.cloneDeep(Le))==null?void 0:_t.find(Yt=>(Yt==null?void 0:Yt.label)===Ht))==null?void 0:Lt.value)||W((kt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:kt.split(":"),Be==null?void 0:Be[nt.value],Be)}return yt}),ft!==""&&M.value===""&&(M.value=w(M.optionUrl.menuSelect,M.optionUrl.oldMenuSelect,(ut=M==null?void 0:M.optionUrl)==null?void 0:ut.groupSelect,Be),Array.isArray(M.value)&&((st=M.value)!=null&&st.every(yt=>yt==null?void 0:yt.url))&&(M.type="UPLOAD"))}return M}),u.value=Le,ge.value=((ue=u.value)==null?void 0:ue.every(M=>M==null?void 0:M.disabled))||A.value===nt.value,ce.value=(Ae=u.value)==null?void 0:Ae.every(M=>M==null?void 0:M.operable),be.value=(Qe=u.value)==null?void 0:Qe.map(M=>M==null?void 0:M.label);let je=[],Ke=[];if((We=v.cloneDeep(u.value))==null||We.forEach(M=>{var Te;Array.isArray(M==null?void 0:M.value)&&((Te=M==null?void 0:M.value)!=null&&Te.find(at=>{var Ve;return(Ve=at==null?void 0:at.url)==null?void 0:Ve.includes(".obj")}))&&(Ke=M==null?void 0:M.value)}),(Ke==null?void 0:Ke.length)>0){const M=(rt=v.cloneDeep(Ke))==null?void 0:rt.filter(Te=>{var at;return(at=Te==null?void 0:Te.url)==null?void 0:at.includes(".obj")});M==null||M.forEach(Te=>{var Ve,Ge,Ie,dt;const at=(Ve=Ke==null?void 0:Ke.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Te==null?void 0:Te.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Ve.map(ut=>ut==null?void 0:ut.url);je.push({objUrl:Te==null?void 0:Te.url,mtlUrls:((Ge=Ke==null?void 0:Ke.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Te==null?void 0:Te.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Ge.length)===1?(dt=(Ie=Ke==null?void 0:Ke.filter(ut=>{var st;return(ut==null?void 0:ut.name)===(Te==null?void 0:Te.name)&&((st=ut==null?void 0:ut.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:Ie[0])==null?void 0:dt.url:at})}),ie.setObjUrl(je)}(Re=v.cloneDeep(u.value))==null||Re.forEach(M=>{var Te,at,Ve,Ge,Ie,dt,ut,st,ft,yt,Nt,Rt,Vt;if((at=(Te=M==null?void 0:M.value)==null?void 0:Te.toString())!=null&&at.includes(".stl")||(Ge=(Ve=M==null?void 0:M.value)==null?void 0:Ve.toString())!=null&&Ge.includes(".STL")||(dt=(Ie=M==null?void 0:M.value)==null?void 0:Ie.toString())!=null&&dt.includes(".obj")||(st=(ut=M==null?void 0:M.value)==null?void 0:ut.toString())!=null&&st.includes(".mtl")||(yt=(ft=M==null?void 0:M.value)==null?void 0:ft.toString())!=null&&yt.includes(".urdf")){let _t={},Lt=[],kt;Array.isArray(M==null?void 0:M.value)?kt=M==null?void 0:M.value:kt=(Nt=M==null?void 0:M.value)==null?void 0:Nt.split(","),kt==null||kt.forEach(Ht=>{Ht.includes(".mtl")?Lt.push(Ht):_t.blob=_t.blob==="undefined"?Ht:_t.blob+","+Ht}),(Lt==null?void 0:Lt.length)>0&&(_t.mtlBlobs=Lt),(Vt=(Rt=Object.values(_t))==null?void 0:Rt[0])!=null&&Vt.includes("http:")}})}else u.value=[];let P=it.value;if((P==null?void 0:P.length)>0&&(P=P==null?void 0:P.map(Be=>{var xt,ze,Le,je;let He=(xt=Be==null?void 0:Be.key)==null?void 0:xt.split("/");return(r==null?void 0:r.compName)===(He==null?void 0:He[0])&&(ze=u.value)!=null&&ze.find(Ke=>(Ke==null?void 0:Ke.prop)===(He==null?void 0:He[1]))&&(Be.value=(je=(Le=u.value)==null?void 0:Le.find(Ke=>(Ke==null?void 0:Ke.prop)===(He==null?void 0:He[1])))==null?void 0:je.value),Be}),Xe.setTableViewContents(P)),r!=null&&r.formRules)_.value=r==null?void 0:r.formRules;else{let Be={};(gt=v.cloneDeep(u).value)==null||gt.forEach(He=>{(He==null?void 0:He.isMain)===!0&&(Be[(He==null?void 0:He.prop)??(He==null?void 0:He.name)]=[{required:!0,message:`${(He==null?void 0:He.prop)||(He==null?void 0:He.name)}不能为空`}])}),_.value=Be}if(((tt=G==null?void 0:G.contents)==null?void 0:tt.length)>0){const Be=[];(et=G==null?void 0:G.contents)==null||et.forEach((He,xt)=>{(He==null?void 0:He.label)!==""&&Be.push({label:(He==null?void 0:He.label)??"",id:(He==null?void 0:He.id)??xt,type:(He==null?void 0:He.type)??"",background:He==null?void 0:He.background})}),Z.value=Be}else Z.value=[]},{deep:!0,immediate:!0}),e.watch(()=>A.value,S=>{ge.value=S===nt.value},{immediate:!0}),(S,G)=>{const L=e.resolveComponent("svg-icon"),de=e.resolveComponent("el-switch"),H=e.resolveComponent("el-checkbox"),P=e.resolveComponent("el-popover"),Ee=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(St.ssForm,{rowContents:u.value,formRules:_.value,buttonValue:Z.value,isRowFlex:!1,isEnableWrap:D.value,onOnButtonClick:ot,onChange:C,formDisabled:ge.value,formLabelsOperable:ce.value,isButtonRow:V.value,onPreview:se,onBlurChange:ae,onHandleColEditChange:pe,onHandleColTypeChange:Q,onRouteUrl:F,onClickTrigger:me},{operateCol:e.withCtx(({renderColumns:oe,formDisabled:X,formLabelsOperable:ne})=>[e.createVNode(P,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ze},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode(L,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[G[1]||(G[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(de,{"model-value":X,"active-text":"禁用","inactive-text":"",onChange:Fe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(de,{"model-value":ne,"active-text":"编辑所有标签","inactive-text":"",onChange:Oe},null,8,["model-value"]),G[2]||(G[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ee,{modelValue:be.value,"onUpdate:modelValue":G[0]||(G[0]=q=>be.value=q),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:te,onChange:qe},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe,q=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:q.label},[e.createVNode(H,{value:q.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(q.label),1)]),_:2},1032,["value"]),e.createVNode(P,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(L,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ve;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ve=Object.keys(q))==null?void 0:ve.filter(he=>{var we;return(we=xe.value)==null?void 0:we.find(j=>(j==null?void 0:j.value)===he)}),he=>{var we,j;return e.openBlock(),e.createElementBlock("div",{key:he},[e.createVNode(St._sfc_main$1,{value:q==null?void 0:q[he],"active-text":(j=(we=xe.value)==null?void 0:we.find(De=>(De==null?void 0:De.value)===he))==null?void 0:j.label,inactiveText:"",onChange:De=>re(De,he,q)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode(L,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),R.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:O.value,onDestroy:Me},null,8,["fileDataList"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Io.ThreeViewerHost,{files:f.value,onGetAnimationData:S.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=zt._export_sfc(oi,[["__scopeId","data-v-e237c271"]]),$n=e.ref(0),br=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>($n.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$n.value,children:br(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>($n.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$n.value,children:br(r==null?void 0:r.children)},r))},kr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=kr(r==null?void 0:r.children,i),r)),n)},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},Bt=[{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"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],Ia=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Se.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b);e.ref(0);const f=e.ref(""),x=e.ref([]),_=e.ref([]),V=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(B=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:D[B.key],id:g.value,contents:B==null?void 0:B.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},R=D=>{r("fixChange",v.cloneDeep(D))},Z=D=>{r("deleteChange",v.cloneDeep(D))},O=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},ke=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},Y=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(B=>{const E=Bt==null?void 0:Bt.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));E?D[E.key]=B.value:B!=null&&B.children&&B.children.length>0&&(D.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),D.id="id"+g.value,(y=x.value)==null||y.forEach(E=>{const ye=Bt==null?void 0:Bt.find(Xe=>(Xe==null?void 0:Xe.label)===(E==null?void 0:E.label));ye?D[ye.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},K=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},ie=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,$)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(B,E)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(B.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>O(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>V(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>ie(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(Cr,{tableChildContents:B==null?void 0:B.children,onDeleteChange:Z,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:Y},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=zt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),b=Se.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(b),f=e.ref(""),x=e.ref([]),_=e.ref([]),V=D=>{r("fixChange",v.cloneDeep(D))},R=D=>{var y;d.value=!0;let $=[];Bt==null||Bt.forEach(B=>{let E=v.cloneDeep(g.value)+1;b.setTableIndex(E),$.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:D[B.key],id:g.value,contents:B==null?void 0:B.options})}),D!=null&&D.children&&((y=D==null?void 0:D.children)==null?void 0:y.length)>0&&$.push({children:D==null?void 0:D.children,isFormColHidden:!0}),f.value=D==null?void 0:D.id,x.value=$,_.value=$},Z=D=>{d.value=!0;let $=[];Bt==null||Bt.forEach(y=>{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),$.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=D==null?void 0:D.id,x.value=$,_.value=$},O=D=>{let $=v.cloneDeep(_.value);$=$==null?void 0:$.map(y=>(y.children||(y.value=D==null?void 0:D[y.name]),y)),_.value=$},ke=()=>{var $,y;x.value=_.value;let D={};if(f.value!=="")D.id=f.value,($=x.value)==null||$.forEach(B=>{const E=Bt==null?void 0:Bt.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));E?D[E.key]=B.value:B!=null&&B.children&&B.children.length>0&&(D.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;b.setTableIndex(B),D.id="idChild"+g.value,(y=x.value)==null||y.forEach(E=>{const ye=Bt==null?void 0:Bt.find(Xe=>(Xe==null?void 0:Xe.label)===(E==null?void 0:E.label));ye?D[ye.key]=E.value:E!=null&&E.children&&E.children.length>0&&(D.children=E.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(D),id:u.value,type:"add"})}f.value="",x.value=[],_.value=[]},Y=()=>{d.value=!1,f.value="",u.value="",x.value=[],_.value=[]},K=D=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",D),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ie=D=>{r("deleteChange",D)};return(D,$)=>{const y=e.resolveComponent("svg-icon"),B=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(E,ye)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(E.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>Z(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>R(E)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>K(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:E==null?void 0:E.children,onDeleteChange:ie,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:O},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(B,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(B,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Cr=zt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},zi={class:"fix-content"},Li={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},ji={class:"fix-content-label"},Ki={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(!1),g=e.ref([]),f=e.ref(!1),x=e.ref([]),_=e.ref(!1),V=e.ref([]),R=e.ref(""),Z=e.ref(""),O=e.ref([]),ke=e.ref([]),Y=e.ref([]),K=e.ref([]),ie=e.ref(!1),D=e.ref([]),$=e.ref([]),y=e.ref(0),B=e.ref([]),E=e.ref([]),ye=e.ref([]),Xe=()=>{ie.value=!0;let h=[];Ta==null||Ta.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:(C==null?void 0:C.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:C==null?void 0:C.options})}),D.value=h,$.value=h},it=()=>{var C,I,W;b.value=!0;let h=[];(W=(I=(C=Se.FormContent)==null?void 0:C.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:I.value)==null||W.forEach(w=>{y.value++,h.push({label:w==null?void 0:w.label,name:(w==null?void 0:w.name)||(w==null?void 0:w.label),type:w.type,value:(w==null?void 0:w.label)==="类型"?"Input":"",id:y.value,contents:w==null?void 0:w.options})}),B.value=h,E.value=h},Ne=h=>{h||(B.value=E.value)},$e=async h=>{var C,I,W,w,S,G,L,de,H,P,Ee,oe;if((h==null?void 0:h.类型)!==((I=(C=E.value)==null?void 0:C.find(X=>(X==null?void 0:X.label)==="类型"))==null?void 0:I.value)){let X=[],ne=await((S=(w=(W=Se.FormContent)==null?void 0:W.find(q=>(q==null?void 0:q.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(de=Se.FormContent)==null?void 0:de.find(q=>(q==null?void 0:q.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:H.value)==null?void 0:P.value):(L=(G=Se.FormContent)==null?void 0:G.find(q=>(q==null?void 0:q.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:L.value;if(ne==null||ne.forEach(q=>{y.value++,X.push({label:q==null?void 0:q.label,name:(q==null?void 0:q.name)||(q==null?void 0:q.label),type:q.type,value:q!=null&&q.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[q.label])??"",id:y.value,contents:q==null?void 0:q.options,prop:(q==null?void 0:q.prop)||(q==null?void 0:q.name)||(q==null?void 0:q.label)})}),h!=null&&h.菜单选项&&((Ee=h==null?void 0:h.菜单选项)==null?void 0:Ee.length)>0){const q=await Se.menuToContentType(h==null?void 0:h.菜单选项);X=X==null?void 0:X.map(ve=>((ve==null?void 0:ve.name)==="组信息选项"&&(ve.contents=q),ve))}E.value=await Se.selectToBase(v.cloneDeep(X)),B.value=await Se.selectToBase(v.cloneDeep(X))}else{let X=v.cloneDeep(B.value);if(X=X==null?void 0:X.map(ne=>(ne.value=h==null?void 0:h[ne.name],ne)),h!=null&&h.菜单选项&&((oe=h==null?void 0:h.菜单选项)==null?void 0:oe.length)>0){const ne=await Se.menuToContentType(h==null?void 0:h.菜单选项);X=X==null?void 0:X.map(q=>((q==null?void 0:q.name)==="组信息选项"&&(q.contents=ne),q))}X=Se.formToOptionsContents(X),E.value=await Se.selectToBase(v.cloneDeep(X))}},_e=async h=>{await $e(h),B.value=E.value},A=(h,C)=>{if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.selectRelateType)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.menuSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=C==null?void 0:C.optionUrl;return(I==null?void 0:I.groupSelect)||C[h.key]}if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(C==null?void 0:C.value)||C[h.key];if((C==null?void 0:C.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=C[h.key];return mr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&C[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!C[h.key]?!1:C[h.key]},te=async h=>{var W,w,S,G,L,de,H,P,Ee;b.value=!0;let C=[];const I=await((S=(w=(W=Se.FormContent)==null?void 0:W.find(oe=>(oe==null?void 0:oe.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:w.value)==null?void 0:S.value)?await((P=(H=(de=Se.FormContent)==null?void 0:de.find(oe=>(oe==null?void 0:oe.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:H.value)==null?void 0:P.value):(L=(G=Se.FormContent)==null?void 0:G.find(oe=>(oe==null?void 0:oe.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:L.value;if(I==null||I.forEach(oe=>{y.value++,C.push({label:oe==null?void 0:oe.label,name:(oe==null?void 0:oe.name)||(oe==null?void 0:oe.label),type:oe.type,value:(oe==null?void 0:oe.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):A(oe,h),id:y.value,contents:oe==null?void 0:oe.options})}),h!=null&&h.menuSelect&&((Ee=h==null?void 0:h.menuSelect)==null?void 0:Ee.length)>0){const oe=await Se.menuToContentType(h==null?void 0:h.menuSelect);C=C==null?void 0:C.map(X=>((X==null?void 0:X.name)==="组信息选项"&&(X.contents=oe),X))}R.value=h==null?void 0:h.id,B.value=await Se.selectToBase(Se.formToOptionsContents(C)),E.value=await Se.selectToBase(Se.formToOptionsContents(C))},ce=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;ye.value=(C=v.cloneDeep(ye.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=ye.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ge=()=>{b.value=!1,B.value=[],R.value=""},Ye=async()=>{var W,w,S,G,L,de,H,P,Ee,oe;B.value=E.value;let h={};R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value);let C=await((S=(w=(W=Se.FormContent)==null?void 0:W.find(X=>{var ne,q;return(X==null?void 0:X.key)===(((q=(ne=B.value)==null?void 0:ne.find(ve=>(ve==null?void 0:ve.label)==="类型"))==null?void 0:q.value)??"label")}))==null?void 0:w.value)==null?void 0:S.value)??((L=(G=Se.FormContent)==null?void 0:G.find(X=>{var ne,q;return(X==null?void 0:X.key)===(((q=(ne=B.value)==null?void 0:ne.find(ve=>(ve==null?void 0:ve.label)==="类型"))==null?void 0:q.value)??"label")}))==null?void 0:L.value);if((de=B.value)==null||de.forEach(X=>{const ne=C==null?void 0:C.find(q=>(q==null?void 0:q.label)===(X==null?void 0:X.label));ne&&(h[ne.key]=X.value)}),h.name=h.label,(H=ye.value)!=null&&H.find(X=>X.id===h.id))ye.value=(P=ye.value)==null?void 0:P.map(X=>(X.id===h.id&&(X=h),X));else{let X=v.cloneDeep(ye.value);ye.value||(ye.value=[]),X.push(h),ye.value=X}ye.value=ye.value.map(({id:X,...ne})=>ne),b.value=!1,R.value="";let I=v.cloneDeep(s.originalItemContents);(Ee=v.cloneDeep(s.originalItemContents))!=null&&Ee.find(X=>(X==null?void 0:X.key)==="tableToForm")?I=(oe=v.cloneDeep(s.originalItemContents))==null?void 0:oe.map(X=>((X==null?void 0:X.key)==="tableToForm"&&(X.contents=ye.value),X)):I.push({key:"tableToForm",contents:ye.value}),r("change",I)},nt=h=>{ie.value=!0;let C=[];Ta==null||Ta.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,D.value=C,$.value=C};e.watch(()=>_.value,()=>{var C,I;let h=v.cloneDeep(s.originalItemContents);(C=v.cloneDeep(s.originalItemContents))!=null&&C.find(W=>(W==null?void 0:W.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="page"&&(W.contents=_.value),W)):h.push({key:"page",contents:_.value}),r("change",h)},{deep:!0});const ee=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;ke.value=(C=v.cloneDeep(ke.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="extraButton"&&(W.contents=ke.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>{var I,W,w,S,G;D.value=$.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(L=>{const de=Ta==null?void 0:Ta.find(H=>(H==null?void 0:H.label)===(L==null?void 0:L.label));de?h[de.key]=L.value:L!=null&&L.children&&L.children.length>0&&(h.children=L.children)}),(W=ke.value)!=null&&W.find(L=>L.id===h.id))ke.value=(w=ke.value)==null?void 0:w.map(L=>(L.id===h.id&&(L=h),L));else{let L=v.cloneDeep(ke.value)??[];L.push(h),ke.value=L}ie.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(L=>(L==null?void 0:L.key)==="extraButton")?C=(G=v.cloneDeep(s.originalItemContents))==null?void 0:G.map(L=>((L==null?void 0:L.key)==="extraButton"&&(L.contents=ke.value),L)):C.push({key:"extraButton",contents:ke.value}),r("change",C)},be=h=>{let C=v.cloneDeep($.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),$.value=C},xe=()=>{ie.value=!1,D.value=[],R.value=""},Fe=h=>{f.value=!0;let C=[];Ia==null||Ia.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),R.value=h==null?void 0:h.id,Y.value=C,K.value=C},Oe=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;O.value=(C=v.cloneDeep(O.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="rowButton"&&(W.contents=O.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ze=()=>{u.value=!0;let h=[];Bt==null||Bt.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),x.value=h,V.value=h},qe=()=>{f.value=!0;let h=[];Ia==null||Ia.forEach(C=>{y.value++,h.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:"",id:y.value,contents:C==null?void 0:C.options})}),Y.value=h,K.value=h},me=h=>{let C=v.cloneDeep(K.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=C},F=()=>{var I,W,w,S,G;Y.value=K.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=Y.value)==null||I.forEach(L=>{const de=Ia==null?void 0:Ia.find(H=>(H==null?void 0:H.label)===(L==null?void 0:L.label));de?h[de.key]=L.value:L!=null&&L.children&&L.children.length>0&&(h.children=L.children)}),(W=O.value)!=null&&W.find(L=>L.id===h.id))O.value=(w=O.value)==null?void 0:w.map(L=>(L.id===h.id&&(L=h),L));else{let L=v.cloneDeep(O.value);L.push(h),O.value=L}f.value=!1,R.value="";let C=v.cloneDeep(s.originalItemContents);(S=v.cloneDeep(s.originalItemContents))!=null&&S.find(L=>(L==null?void 0:L.key)==="rowButton")?C=(G=v.cloneDeep(s.originalItemContents))==null?void 0:G.map(L=>((L==null?void 0:L.key)==="rowButton"&&(L.contents=O.value),L)):C.push({key:"rowButton",contents:O.value}),r("change",C)},J=()=>{f.value=!1,R.value="",K.value=[],Y.value=[]},fe=h=>{u.value=!0;let C=[];Bt==null||Bt.forEach(I=>{y.value++,C.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),x.value=C,Z.value=h==null?void 0:h.id,V.value=C},pe=h=>{var C;g.value=kr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(C=v.cloneDeep(s.originalItemContents))==null?void 0:C.map(I=>{var W;return(I==null?void 0:I.key)==="header"&&(I.contents=(W=g.value)!=null&&W.some(w=>w==null?void 0:w.children)?[g.value]:g.value),I}))},Q=h=>{var I,W,w;h.type==="fix"?h.id!==""?g.value=wr(g.value,h):g.value=xr(g.value,h==null?void 0:h.contents):g.value=Dr(g.value,h),g.value=(I=g.value)!=null&&I.some(S=>S==null?void 0:S.children)?[g.value]:g.value,R.value="";let C=v.cloneDeep(s.originalItemContents);(W=v.cloneDeep(s.originalItemContents))!=null&&W.find(S=>(S==null?void 0:S.key)==="header")?C=(w=v.cloneDeep(s.originalItemContents))==null?void 0:w.map(S=>((S==null?void 0:S.key)==="header"&&(S.contents=g.value),S)):C.push({key:"header",contents:g.value}),r("change",C)},re=h=>{var I;u.value=!0;let C=[];Bt==null||Bt.forEach(W=>{y.value++,C.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:h[W.key],id:y.value,contents:W==null?void 0:W.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&C.push({children:h==null?void 0:h.children,isFormColHidden:!0}),R.value=h==null?void 0:h.id,Z.value="",x.value=C,V.value=C},ae=h=>{let C=v.cloneDeep(V.value);C=C==null?void 0:C.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),V.value=C},se=()=>{u.value=!1,R.value="",Z.value="",V.value=[]},Me=()=>{var I,W,w,S,G,L;x.value=V.value;let h={};if(R.value!==""?h.id=R.value:(y.value++,h.id="id"+y.value),(I=x.value)==null||I.forEach(de=>{const H=Bt==null?void 0:Bt.find(P=>(P==null?void 0:P.label)===(de==null?void 0:de.label));H?h[H.key]=de.value:de!=null&&de.children&&de.children.length>0&&(h.children=de.children)}),(W=g.value)!=null&&W.find(de=>de.id===h.id))g.value=(w=g.value)==null?void 0:w.map(de=>(de.id===h.id&&(de=h),de));else{let de=v.cloneDeep(g.value)??[];Z.value===""?de.push(h):de=de==null?void 0:de.map(H=>(H.id===Z.value&&(H.children||(H.children=[]),H.children.push(h)),H)),g.value=de}g.value=(S=g.value)!=null&&S.some(de=>de==null?void 0:de.children)?[g.value]:g.value,u.value=!1,R.value="",Z.value="";let C=v.cloneDeep(s.originalItemContents);(G=v.cloneDeep(s.originalItemContents))!=null&&G.find(de=>(de==null?void 0:de.key)==="header")?C=(L=v.cloneDeep(s.originalItemContents))==null?void 0:L.map(de=>((de==null?void 0:de.key)==="header"&&(de.contents=g.value),de)):C.push({key:"header",contents:g.value}),r("change",C)},ot=h=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var C,I;g.value=(C=v.cloneDeep(g.value))==null?void 0:C.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>{var w;return(W==null?void 0:W.key)==="header"&&(W.contents=(w=g.value)!=null&&w.some(S=>S==null?void 0:S.children)?[g.value]:g.value),W})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,C,I,W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he,we;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(C=(h=d.value)==null?void 0:h.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:C.contents,O.value=(W=(I=d.value)==null?void 0:I.find(j=>(j==null?void 0:j.key)==="rowButton"))==null?void 0:W.contents,ke.value=(S=(w=d.value)==null?void 0:w.find(j=>(j==null?void 0:j.key)==="extraButton"))==null?void 0:S.contents,_.value=(L=(G=d.value)==null?void 0:G.find(j=>(j==null?void 0:j.key)==="page"))!=null&&L.contents?!!((H=(de=d.value)==null?void 0:de.find(j=>(j==null?void 0:j.key)==="page"))!=null&&H.contents):!1,ye.value=(Ee=(P=d.value)==null?void 0:P.find(j=>(j==null?void 0:j.key)==="tableToForm"))==null?void 0:Ee.contents,g.value=(oe=g.value)==null?void 0:oe.map((j,De)=>(Array.isArray(j)?j=ri(j):j={label:(j==null?void 0:j.label)??"",prop:(j==null?void 0:j.label)==="操作"?"operate":j==null?void 0:j.prop,width:j!=null&&j.width?parseInt(j.width):"",fixed:(j==null?void 0:j.fixed)??void 0,sortable:(j==null?void 0:j.sortable)??!1,align:(j==null?void 0:j.align)??"left",showOverflowTooltip:(j==null?void 0:j.showOverflowTooltip)??!0,isNotDrag:(j==null?void 0:j.isNotDrag)??!1,isEditCol:(j==null?void 0:j.isEditCol)??!1,isOperate:(j==null?void 0:j.isOperate)??!1,id:(j==null?void 0:j.id)??De,formMenuSelect:(j==null?void 0:j.formMenuSelect)??void 0,groupSelect:(j==null?void 0:j.groupSelect)??void 0},j)),g.value=(X=g.value)!=null&&X.every(j=>Array.isArray(j))?(ne=g.value)==null?void 0:ne[0]:g.value,O.value=(q=O.value)==null?void 0:q.map((j,De)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",textColor:(j==null?void 0:j.textColor)??"#000000",id:(j==null?void 0:j.id)??De}),ke.value=(ve=ke.value)==null?void 0:ve.map((j,De)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",background:(j==null?void 0:j.background)??"var(--ssComponent-primary-color)",id:(j==null?void 0:j.id)??De}),ye.value)ye.value=(we=ye.value)==null?void 0:we.map(j=>{y.value++;let De=j;return De.id=y.value,De});else{let j=[];const De=(he=Se.getColumnChild(v.cloneDeep(g.value)))==null?void 0:he.filter(ue=>(ue==null?void 0:ue.prop)!=="operate");De==null||De.forEach(ue=>{var Ae;y.value++,j.push({label:ue==null?void 0:ue.label,name:(ue==null?void 0:ue.prop)||(ue==null?void 0:ue.label),type:ue!=null&&ue.groupSelect?"Select":"Input",value:"",id:y.value,contents:ue==null?void 0:ue.options,menuSelect:ue==null?void 0:ue.formMenuSelect,groupSelect:(Ae=ue==null?void 0:ue.groupSelect)==null?void 0:Ae.split(":"),selectRelateType:"关联绑定列"})}),ye.value=j}},{deep:!0,immediate:!0}),(h,C)=>{const I=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[C[2]||(C[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(W,{class:"icon-content",onClick:Ze,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[1]||(C[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>fe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>re(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>ot(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(Cr,{tableChildContents:w==null?void 0:w.children,onDeleteChange:pe,onFixChange:Q},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[C[4]||(C[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:qe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[3]||(C[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",zi,[e.createElementVNode("div",Li,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:G=>Fe(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>Oe(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[C[6]||(C[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Xe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[5]||(C[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",$i,[e.createElementVNode("div",ji,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ki,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:G=>nt(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>ee(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[C[8]||(C[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:it},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[C[7]||(C[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(w,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:G=>te(w)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:G=>ce(w)},null,8,["onClick"])])])]))),128))]),C[10]||(C[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[C[9]||(C[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(St._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=w=>_.value=w)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:u.value,onBeforeDestroy:se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ae},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(W,{onClick:se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[11]||(C[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(W,{class:"ok-button button",onClick:Me,id:"themeButton"},{default:e.withCtx(()=>C[12]||(C[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:f.value,onBeforeDestroy:J,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:Y.value,key:Y.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(W,{onClick:J,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[13]||(C[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(W,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>C[14]||(C[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:ie.value,onBeforeDestroy:xe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(W,{onClick:xe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[15]||(C[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(W,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>C[16]||(C[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:B.value,key:B.value,isEnableWrap:!0,onChange:$e,onChangeVisible:Ne,onBlurChange:_e},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(W,{onClick:ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[17]||(C[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(W,{class:"ok-button button",onClick:Ye,id:"themeButton"},{default:e.withCtx(()=>C[18]||(C[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=zt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=$t.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=$t.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,b,g,f,x,_,V,R,Z,O,ke,Y,K,ie,D;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(b=n==null?void 0:n.value)==null?void 0:b.tableData)==null?void 0:g.y)||i,w:((x=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:x.w)||ds.value,h:((V=(_=n==null?void 0:n.value)==null?void 0:_.tableData)==null?void 0:V.h)||s,minW:((Z=(R=n==null?void 0:n.value)==null?void 0:R.tableData)==null?void 0:Z.minW)||ps.value,minH:((ke=(O=n==null?void 0:n.value)==null?void 0:O.tableData)==null?void 0:ke.minH)||vs.value,maxH:((K=(Y=n==null?void 0:n.value)==null?void 0:Y.tableData)==null?void 0:K.maxH)||hs.value,i:((D=(ie=n==null?void 0:n.value)==null?void 0:ie.tableData)==null?void 0:D.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,b,g,f,x,_;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((b=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:b.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((_=(x=(f=n==null?void 0:n.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:x.contents)==null?void 0:_.length)/5);return s*2},_r=(n,i,s)=>{var b,g;const r=(g=(b=ss.value)==null?void 0:b[us.value])==null?void 0:g.filter(f=>{var x;return((x=f==null?void 0:f.key)==null?void 0:x.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var x,_,V;return((V=(_=(x=f==null?void 0:f.value)==null?void 0:x.tableData)==null?void 0:_.component)==null?void 0:V.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,x)=>_r(f,x))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>_r(r,d)):[]},bs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var _;const f=bs(s==null?void 0:s.optionItems),x=g?(_=f[g==null?void 0:g.toUpperCase()])==null?void 0:_[s==null?void 0:s.target]:[];d.value=x==null?void 0:x.map(V=>{for(const[R,Z]of Object.entries((s==null?void 0:s.comp)||{}))if((V==null?void 0:V.prop)===R)return{...V,value:Z};return V})},{immediate:!0});const u=g=>St.getComponent(g),b=g=>{var f,x;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(_=>{var V;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(V=_==null?void 0:_.options)==null?void 0:V.map(R=>({...R,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):d.value=(x=d.value)==null?void 0:x.map(_=>{var V;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(V=_==null?void 0:_.options)==null?void 0:V.map(R=>({...R,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const x=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,V=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:V==null?void 0:V.prop},{default:e.withCtx(()=>[e.createVNode(x,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V==null?void 0:V.label)+":",1)]),_:2},1024),e.createVNode(x,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(V.type)),{modelValue:V.value,"onUpdate:modelValue":R=>V.value=R,content:V==null?void 0:V.options,optionUrl:V==null?void 0:V.optionUrl,disabled:V==null?void 0:V.disabled,activeText:V==null?void 0:V.activeText,inactiveText:V==null?void 0:V.inactiveText,onChange:R=>b(V)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=zt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=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(n,{emit:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),b=K=>K==null?void 0:K.reduce((ie,D)=>(ie[D==null?void 0:D.prop]=D==null?void 0:D.rule,ie),{}),g=e.computed(()=>({formRules:b(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),x=e.ref(""),_=(K,ie,D)=>{var B;let $=[];(s==null?void 0:s.activeTabName)==="任务配置"?($=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:ie}]},{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:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&($=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(B=s==null?void 0:s.relatedData)==null?void 0:B.map(E=>({label:E==null?void 0:E.任务名称,value:E==null?void 0:E.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return D&&(D==null?void 0:D.length)>0?y=[...$,...V(K,ie,D)]:y=$,y},V=(K,ie,D)=>{const $=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return D?$==null?void 0:$.filter(y=>D==null?void 0:D.includes(y==null?void 0:y.prop)):$},R=(K,ie)=>{var E,ye,Xe,it,Ne,$e,_e,A,te;const D=((Ne=(it=(Xe=(ye=(E=s==null?void 0:s.comp)==null?void 0:E.compData)==null?void 0:ye.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:Xe.contents)==null?void 0:it.filter(ce=>(ce==null?void 0:ce.label)!=="操作"))==null?void 0:Ne.map(ce=>({value:ce==null?void 0:ce.prop,label:ce.label})))||[],$=/button/i,y=((te=(A=(_e=($e=s==null?void 0:s.comp)==null?void 0:$e.compData)==null?void 0:_e.filter(ce=>$.test(ce==null?void 0:ce.key)))==null?void 0:A.flatMap(ce=>ce==null?void 0:ce.contents))==null?void 0:te.map(ce=>({value:ce==null?void 0:ce.label,label:ce.label})))||[],B=_(D,y,K);f.value=ie?ks(B,ie):B,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(ce=>({prop:ce,rule:d})))};e.onMounted(()=>{R(null,s==null?void 0:s.extendItem)});const Z=K=>{const ie=K==null?void 0:K[x.value];if(x.value==="执行任务"){if(!(ie!=null&&ie.join("/")))return;const D=ie==null?void 0:ie.join("/");R(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,K)}},O=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},ke=(K,ie)=>{x.value=ie==null?void 0:ie.changeProp,Z(K)},Y=K=>{r("onButtonClick",K)};return(K,ie)=>(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:O,onBlurChange:ke,onOnButtonClick:Y},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=zt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=zt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},zs={class:"fix-content"},Ls={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},js={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),b=e.ref([]),g=e.ref(!1),f=e.ref([]),x=e.ref([]),_=e.ref(""),V=e.ref(!1),R=e.ref(0),Z=e.ref([]),O=e.ref([]),ke=(A,te)=>{if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="selectRelateType"){const ce=te==null?void 0:te.optionUrl;return(ce==null?void 0:ce.selectRelateType)||te[A.key]}if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="menuSelect"){const ce=te==null?void 0:te.optionUrl;return(ce==null?void 0:ce.menuSelect)||te[A.key]}if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="groupSelect"){const ce=te==null?void 0:te.optionUrl;return(ce==null?void 0:ce.groupSelect)||te[A.key]}if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="originalContent")return(te==null?void 0:te.value)||te[A.key];if((te==null?void 0:te.type)=="Select"&&(A==null?void 0:A.key)==="multiple"){const ce=te[A.key];return mr(ce)?ce:A.default}return(A==null?void 0:A.label)==="类型"&&te[A.key]===""?"Input":(A==null?void 0:A.key)==="isFormColHidden"&&!te[A.key]?!1:te[A.key]},Y=async A=>{var ge,Ye,nt,ee,z,be;d.value=!0;let te=[];const ce=await((nt=(Ye=(ge=Se.FormContent)==null?void 0:ge.find(xe=>(xe==null?void 0:xe.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:Ye.value)==null?void 0:nt.value)??((z=(ee=Se.FormContent)==null?void 0:ee.find(xe=>(xe==null?void 0:xe.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:z.value);if(ce==null||ce.forEach(xe=>{R.value++,te.push({label:xe==null?void 0:xe.label,name:xe==null?void 0:xe.label,type:xe.type,prop:xe==null?void 0:xe.prop,value:ke(xe,A),id:R.value,contents:xe==null?void 0:xe.options,width:(A==null?void 0:A.width)??1})}),A!=null&&A.menuSelect&&((be=A==null?void 0:A.menuSelect)==null?void 0:be.length)>0){const xe=await Se.menuToContentType(A==null?void 0:A.menuSelect);te=te==null?void 0:te.map(Fe=>((Fe==null?void 0:Fe.name)==="组信息选项"&&(Fe.contents=xe),Fe))}_.value=A==null?void 0:A.id,u.value=await Se.selectToBase(Se.formToOptionsContents(te)),b.value=await Se.selectToBase(Se.formToOptionsContents(te))},K=A=>{var ce;g.value=!0;let te=[];(ce=Se.FormButton)==null||ce.forEach(ge=>{R.value++,te.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,value:(ge==null?void 0:ge.label)==="类型"&&A[ge.key]===""?"normal":A[ge.key],id:R.value,contents:ge==null?void 0:ge.options})}),Z.value=te,O.value=te,_.value=A==null?void 0:A.id};e.watch(()=>V.value,()=>{var te,ce;let A=v.cloneDeep(s.originalItemContents);(te=v.cloneDeep(s.originalItemContents))!=null&&te.find(ge=>(ge==null?void 0:ge.key)==="enableWrap")?A=(ce=v.cloneDeep(s.originalItemContents))==null?void 0:ce.map(ge=>((ge==null?void 0:ge.key)==="enableWrap"&&(ge.contents=!V.value),ge)):A.push({key:"enableWrap",contents:!V.value}),r("change",A)},{deep:!0});const ie=()=>{var ce,ge,Ye,nt,ee;Z.value=O.value;let A={};if(_.value!==""?A.id=_.value:(R.value++,A.id="id"+R.value),(ce=Z.value)==null||ce.forEach(z=>{var xe;const be=(xe=Se.FormButton)==null?void 0:xe.find(Fe=>(Fe==null?void 0:Fe.label)===(z==null?void 0:z.label));be&&(A[be.key]=z.value)}),(ge=f.value)!=null&&ge.find(z=>z.id===A.id))f.value=(Ye=f.value)==null?void 0:Ye.map(z=>(z.id===A.id&&(z=A),z));else{let z=v.cloneDeep(f.value);f.value||(f.value=[]),z.push(A),f.value=z}g.value=!1,_.value="";let te=v.cloneDeep(s.originalItemContents);(nt=v.cloneDeep(s.originalItemContents))!=null&&nt.find(z=>(z==null?void 0:z.key)==="formButton")?te=(ee=v.cloneDeep(s.originalItemContents))==null?void 0:ee.map(z=>((z==null?void 0:z.key)==="formButton"&&(z.contents=f.value),z)):te.push({key:"formButton",contents:f.value}),r("change",te)},D=A=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ce;x.value=(te=v.cloneDeep(x.value))==null?void 0:te.filter(ge=>(ge==null?void 0:ge.id)!==(A==null?void 0:A.id)),r("change",(ce=v.cloneDeep(s.originalItemContents))==null?void 0:ce.map(ge=>((ge==null?void 0:ge.key)==="formContent"&&(ge.contents=x.value),ge))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=A=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var te,ce;f.value=(te=v.cloneDeep(f.value))==null?void 0:te.filter(ge=>(ge==null?void 0:ge.id)!==(A==null?void 0:A.id)),r("change",(ce=v.cloneDeep(s.originalItemContents))==null?void 0:ce.map(ge=>((ge==null?void 0:ge.key)==="formButton"&&(ge.contents=f.value),ge))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var te;g.value=!0;let A=[];(te=Se.FormButton)==null||te.forEach(ce=>{R.value++,A.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,value:(ce==null?void 0:ce.label)==="类型"?"normal":"",id:R.value,contents:ce==null?void 0:ce.options})}),Z.value=A,O.value=A},B=()=>{var te,ce,ge;d.value=!0;let A=[];(ge=(ce=(te=Se.FormContent)==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="Input"))==null?void 0:ce.value)==null||ge.forEach(Ye=>{R.value++,A.push({label:Ye==null?void 0:Ye.label,name:Ye==null?void 0:Ye.label,type:Ye.type,value:(Ye==null?void 0:Ye.label)==="类型"?"Input":"",id:R.value,contents:Ye==null?void 0:Ye.options})}),u.value=A,b.value=A},E=A=>{let te=v.cloneDeep(O.value);te=te==null?void 0:te.map(ce=>(ce.value=A==null?void 0:A[ce.name],ce)),O.value=te},ye=A=>{const te=A.find(Ye=>(Ye==null?void 0:Ye.name)==="类型");if((te==null?void 0:te.value)!="Select")return;const ce=A.find(Ye=>(Ye==null?void 0:Ye.name)==="多选"),ge=A.find(Ye=>(Ye==null?void 0:Ye.name)==="初始值");ce!=null&&ce.value&&Bo.isString(ge.value)&&(ge.value=[ge.value]),!(ce!=null&&ce.value)&&!Bo.isString(ge.value)&&(ge.value="")},Xe=async A=>{var te,ce,ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze;if((A==null?void 0:A.类型)!==((ce=(te=b.value)==null?void 0:te.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:ce.value)){let qe=[];const me=await((nt=(Ye=(ge=Se.FormContent)==null?void 0:ge.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:Ye.value)==null?void 0:nt.value)?await((Fe=(xe=(be=Se.FormContent)==null?void 0:be.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:xe.value)==null?void 0:Fe.value):(z=(ee=Se.FormContent)==null?void 0:ee.find(F=>(F==null?void 0:F.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:z.value;if(me==null||me.forEach(F=>{var fe,pe;R.value++;const J=yr(F==null?void 0:F.default)?(A==null?void 0:A[F.label])??F.value??"":F==null?void 0:F.default;qe.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:J,prop:F==null?void 0:F.prop,id:R.value,contents:F==null?void 0:F.options,width:((pe=(fe=b.value)==null?void 0:fe[0])==null?void 0:pe.width)??1})}),A!=null&&A.菜单选项&&((Oe=A==null?void 0:A.菜单选项)==null?void 0:Oe.length)>0){const F=await Se.menuToContentType(A==null?void 0:A.菜单选项);qe=qe==null?void 0:qe.map(J=>((J==null?void 0:J.name)==="组信息选项"&&(J.contents=F),J))}ye(qe),b.value=await Se.selectToBase(v.cloneDeep(qe)),u.value=await Se.selectToBase(v.cloneDeep(qe))}else{let qe=v.cloneDeep(b.value);if(qe=qe==null?void 0:qe.map(me=>(me.value=A==null?void 0:A[me.name],me)),A!=null&&A.菜单选项&&((Ze=A==null?void 0:A.菜单选项)==null?void 0:Ze.length)>0){const me=await Se.menuToContentType(A==null?void 0:A.菜单选项);qe=qe==null?void 0:qe.map(F=>((F==null?void 0:F.name)==="组信息选项"&&(F.contents=me),F))}qe=Se.formToOptionsContents(qe),ye(qe),b.value=await Se.selectToBase(v.cloneDeep(qe))}},it=A=>{A||(u.value=b.value)},Ne=async A=>{await Xe(A),u.value=b.value},$e=vo(async()=>{var ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze,qe,me;u.value=b.value;let A={};A.width=((Ye=(ge=u.value)==null?void 0:ge[0])==null?void 0:Ye.width)??1,_.value!==""?A.id=_.value:(R.value++,A.id="id"+R.value);let te=await((z=(ee=(nt=Se.FormContent)==null?void 0:nt.find(F=>{var J,fe;return(F==null?void 0:F.key)===(((fe=(J=u.value)==null?void 0:J.find(pe=>(pe==null?void 0:pe.label)==="类型"))==null?void 0:fe.value)??"label")}))==null?void 0:ee.value)==null?void 0:z.value)??((xe=(be=Se.FormContent)==null?void 0:be.find(F=>{var J,fe;return(F==null?void 0:F.key)===(((fe=(J=u.value)==null?void 0:J.find(pe=>(pe==null?void 0:pe.label)==="类型"))==null?void 0:fe.value)??"label")}))==null?void 0:xe.value);if((Fe=u.value)==null||Fe.forEach(F=>{const J=te==null?void 0:te.find(fe=>(fe==null?void 0:fe.label)===(F==null?void 0:F.label));J&&(A[J.key]=F.value)}),A.width=A.width?A.width:1,A.key=A==null?void 0:A.label,A.isFormColHidden=A==null?void 0:A.isFormColHidden,(Oe=x.value)!=null&&Oe.find(F=>F.id===A.id))x.value=(Ze=x.value)==null?void 0:Ze.map(F=>(F.id===A.id&&(F=A),F));else{let F=v.cloneDeep(x.value);F.push(A),x.value=F}x.value=x.value.map(({id:F,...J})=>J),d.value=!1,_.value="";let ce=v.cloneDeep(s.originalItemContents);(qe=v.cloneDeep(s.originalItemContents))!=null&&qe.find(F=>(F==null?void 0:F.key)==="formContent")?ce=(me=v.cloneDeep(s.originalItemContents))==null?void 0:me.map(F=>((F==null?void 0:F.key)==="formContent"&&(F.contents=x.value),F)):ce.push({key:"formContent",contents:x.value}),r("change",ce)},300),_e=()=>{d.value=!1,g.value=!1,_.value="",b.value=[],O.value=[]};return e.watch(()=>s.originalItemContents,()=>{var te,ce,ge,Ye,nt,ee;if(!s.originalItemContents||s.originalItemContents.length===0)return;const A=v.cloneDeep(s.originalItemContents);x.value=((te=A==null?void 0:A.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:te.contents)??[],f.value=((ce=A==null?void 0:A.find(z=>(z==null?void 0:z.key)==="formButton"))==null?void 0:ce.contents)??[],V.value=(ge=A==null?void 0:A.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&ge.contents?!((Ye=A==null?void 0:A.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&Ye.contents):!0,x.value=(nt=v.cloneDeep(x.value))==null?void 0:nt.map((z,be)=>{var Fe;let xe=z;return xe.id=(z==null?void 0:z.id)??be,z!=null&&z.label||(z.label=(z==null?void 0:z.key)??(z==null?void 0:z.label)??""),z!=null&&z.type||(z.type=(z==null?void 0:z.type)??""),z.contents=((Fe=z==null?void 0:z.options)==null?void 0:Fe.length)===0?(z==null?void 0:z.contents)??"":z==null?void 0:z.options,xe}),x.value=Se.formToOptionsContents(x.value),f.value=(ee=f.value)==null?void 0:ee.map((z,be)=>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:be})},{deep:!0,immediate:!0}),(A,te)=>{const ce=e.resolveComponent("svg-icon"),ge=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[te[2]||(te[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ge,{class:"icon-content",id:"themeButton",onClick:B},{icon:e.withCtx(()=>[e.createVNode(ce,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[1]||(te[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(Ye,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Vs,[e.createVNode(ce,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>Y(Ye)},null,8,["onClick"]),e.createVNode(ce,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>D(Ye)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[te[4]||(te[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ge,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(ce,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[te[3]||(te[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ye,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",zs,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Ls,[e.createVNode(ce,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>K(Ye)},null,8,["onClick"]),e.createVNode(ce,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ee=>$(Ye)},null,8,["onClick"])])])]))),128))]),te[6]||(te[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[te[5]||(te[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(St._sfc_main$1,{modelValue:V.value,"onUpdate:modelValue":te[0]||(te[0]=Ye=>V.value=Ye)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Xe,onChangeVisible:it,onBlurChange:Ne},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(ge,{onClick:_e,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ge,{class:"ok-button button",onClick:e.unref($e),id:"themeButton"},{default:e.withCtx(()=>te[8]||(te[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:Z.value,key:Z.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:_e,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ie},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},zo=zt._export_sfc(js,[["__scopeId","data-v-20850524"]]),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(n,{emit:i}){const s=n,r=i,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),x=e.ref({}),_=e.ref([]),V=Y=>{var K;x.value=Y,r("change",(K=O())==null?void 0:K.compData)},R=(Y,K)=>{var ie,D;switch(Y){case"create":(ie=u.value)==null||ie.forEach($=>{$.value=""}),f.value="create",g.visible=!0;break;case"update":(D=u.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),f.value="update",g.visible=!0;break;case"delete":_.value.splice(K,1),f.value="delete";break}},Z=Y=>{var K,ie,D;if((Y==null?void 0:Y.buttonName)==="确认"){const $=v.cloneDeep(Y==null?void 0:Y.content);switch(Object.keys($).forEach(y=>{$[y]===""&&delete $[y]}),f.value){case"create":_.value.push({...$,index:((K=_.value)==null?void 0:K.length)+1});break;case"update":_.value=(ie=_.value)==null?void 0:ie.map(y=>y.index===($==null?void 0:$.index)?{...y,title:$==null?void 0:$.title,description:$==null?void 0:$.description}:y);break}r("change",(D=O())==null?void 0:D.compData),g.visible=!1}else g.visible=!1},O=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:x.value}]}),ke=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var K,ie;Y&&(x.value=((K=Y==null?void 0:Y.find(D=>D.key==="stepConfig"))==null?void 0:K.contents)??{},_.value=((ie=Y==null?void 0:Y.find(D=>D.key==="stepList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(Y,K)=>{const ie=e.resolveComponent("svg-icon"),D=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(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{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(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.title),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>R("delete",y)},{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:d.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:ke,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:Z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=zt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),b=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}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),x=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),V=Y=>{var K;u.value=Y,r("change",(K=O())==null?void 0:K.compData)},R=(Y,K)=>{var ie,D;switch(Y){case"create":(ie=f.value)==null||ie.forEach($=>{$.value=""}),d.value="create",_.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),d.value="update",_.visible=!0;break;case"delete":b.value.splice(K,1),d.value="delete";break}},Z=Y=>{var K,ie,D,$;if((Y==null?void 0:Y.buttonName)==="确认"){const y=v.cloneDeep(Y==null?void 0:Y.content);switch(Object.keys(y).forEach(B=>{y[B]===""&&delete y[B]}),d.value){case"create":(ie=b.value)==null||ie.push({...y,index:((K=b.value)==null?void 0:K.length)+1});break;case"update":b.value=(D=b.value)==null?void 0:D.map(B=>B.index===(y==null?void 0:y.index)?{...B,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:B);break}r("change",($=O())==null?void 0:$.compData),_.visible=!1}else _.visible=!1},O=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:u.value}]}),ke=()=>{_.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var K,ie;Y&&(u.value=((K=Y==null?void 0:Y.find(D=>D.key==="timeLineConfig"))==null?void 0:K.contents)??{},b.value=((ie=Y==null?void 0:Y.find(D=>D.key==="timeLineList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(Y,K)=>{const ie=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.content),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>R("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>R("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(St.ssForm,{rowContents:g.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:ke,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:x.value,onOnButtonClick:Z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=zt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=zt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),b=i,g=e.ref(!1),f=e.ref({}),x=e.ref({}),_=e.ref();e.watch(()=>[s.itemData],()=>{var $;const D=v.cloneDeep(s.itemData);d.value=($=v.cloneDeep(D))==null?void 0:$.map(y=>{var B;if(y.key==="extra"){let E=[];(B=y.value)==null||B.forEach(ye=>{var Xe;E.push((Xe=Object.values(ye))==null?void 0:Xe[0])}),y.value=E}return y})},{deep:!0,immediate:!0});const V=(D,$,y,B)=>{var ye;let E={};((ye=D==null?void 0:D[0])==null?void 0:ye.contents)==="详情"&&(g.value=!0,E[$]=D,u.value=D==null?void 0:D.filter(Xe=>(Xe==null?void 0:Xe.key)!=="tableContentName"),f.value=E,x.value=y,_.value=B.id)},R=D=>{var Xe,it,Ne,$e;const $=(it=(Xe=Object.values(v.cloneDeep(f.value)))==null?void 0:Xe[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),y=($e=(Ne=Object.values(v.cloneDeep(f.value)))==null?void 0:Ne[0])==null?void 0:$e.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),B=y==null?void 0:y.map((_e,A)=>{var te;return A===D.index&&(_e==null?void 0:_e.comp)==="Table"&&(_e.compData=(te=_e.compData)==null?void 0:te.map(ce=>{var ge,Ye;return(ce==null?void 0:ce.key)==="tableContents"&&(ce.contents=(Ye=(ge=D.content)==null?void 0:ge.map(nt=>{let ee={};for(let z in nt)z!=="id"&&(ee[z]=nt[z]);return ee}))==null?void 0:Ye.map(nt=>Object.values(nt))),ce})),_e});B.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ye={};for(let _e in E)ye[_e]=B;f.value=ye},Z=()=>{g.value=!1,f.value={},x.value={},_.value=void 0,r.value++},O=D=>{var Xe,it,Ne,$e;const $=(it=(Xe=Object.values(v.cloneDeep(f.value)))==null?void 0:Xe[0])==null?void 0:it.filter(_e=>(_e==null?void 0:_e.key)==="tableContentName"),y=($e=(Ne=Object.values(v.cloneDeep(f.value)))==null?void 0:Ne[0])==null?void 0:$e.filter(_e=>(_e==null?void 0:_e.key)!=="tableContentName"),B=y==null?void 0:y.map((_e,A)=>(A===D.index&&(_e.compData=D.contents),_e));B.unshift($==null?void 0:$[0]);let E=v.cloneDeep(f.value),ye={};for(let _e in E)ye[_e]=B;f.value=ye},ke=()=>{var $,y;let D={};for(let B in x.value)B===(($=Object.keys(f.value))==null?void 0:$[0])?D[B]=(y=Object.values(f.value))==null?void 0:y[0]:D[B]=x.value[B];b("change",{buttonName:"编辑",index:_.value,singleContent:D},"methodData"),g.value=!1,f.value={},x.value={},_.value=void 0},Y=()=>{g.value=!1,f.value={},x.value={},_.value=void 0},K=D=>{b("change",D,"methodData")},ie=D=>on(D);return(D,$)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(B==null?void 0:B.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(B.comp)),{itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,key:E,index:(B==null?void 0:B.id)??E,onContentClick:V,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:g.value,onBeforeDestroy:Y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(B,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ie(B.comp)),{itemData:B==null?void 0:B.compData,onChange:R,childItemData:B==null?void 0:B.itemChildData,key:E,onContentChange:O,index:(B==null?void 0:B.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:Z,id:"themeBorderButton"},{default:e.withCtx(()=>$[0]||($[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=zt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Se.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),b=e.ref(),g=Se.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),x=$t.useModelComp(v.pinia),_=e.ref(!1),V=$t.useMenuState(v.pinia),R=v.useLoginState(v.pinia),{itemData:Z,isEdit:O,routeToChildPath:ke,tableViewContents:Y,lockingPage:K,payloadTypes:ie}=v.storeToRefs(x),{activeMenuPath:D,platform:$,childMenu:y}=v.storeToRefs(V),{loginUserInfo:B}=v.storeToRefs(R),E=e.ref(!1),ye=async()=>{var ee,z;(ee=i.value)!=null&&ee.find(be=>(be==null?void 0:be.buttonName)==="保存")&&await ce((z=i.value)==null?void 0:z.find(be=>(be==null?void 0:be.buttonName)==="保存")),await Se.onSaveBack()};e.watch(()=>Z.value,async()=>{O.value==="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{deep:!0});const Xe=()=>{u.value=!1,b.value=void 0},it=ee=>ee.map(z=>{const be={};for(const xe in z){const Fe=z[xe];if(xe.includes(f.value)){const Oe=xe.split(f.value);let Ze=be;Oe.forEach((qe,me)=>{me===Oe.length-1?Ze[qe]=Fe:(Ze[qe]||(Ze[qe]={}),Ze=Ze[qe])})}else be[xe]=Fe}return be}),Ne=async(ee,z,be=[])=>{var Fe,Oe,Ze,qe,me,F,J,fe,pe,Q,re,ae,se,Me,ot;let xe=(Fe=v.cloneDeep(z))==null?void 0:Fe.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(ee!=null&&ee.includes("[")){let h=(F=(me=(qe=(Ze=(Oe=v.cloneDeep(ee))==null?void 0:Oe.split("["))==null?void 0:Ze[1])==null?void 0:qe.split("]"))==null?void 0:me[0])==null?void 0:F.split(":"),C="";if(h!=null&&h[0]){let I=(J=xe==null?void 0:xe.find(W=>(W==null?void 0:W.name)===(h==null?void 0:h[0])))==null?void 0:J.compData;if(!I){let W=(fe=ee==null?void 0:ee.split("["))==null?void 0:fe[0],w=await Se.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",be);I=(pe=w==null?void 0:w.find(S=>(S==null?void 0:S.name)===(h==null?void 0:h[0])))==null?void 0:pe.compData}I==null||I.forEach(W=>{var w,S,G,L,de,H;if((W==null?void 0:W.key)==="formContent")(w=W==null?void 0:W.contents)==null||w.forEach(P=>{var Ee;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?C=P==null?void 0:P.value:C=(Ee=P==null?void 0:P.value)==null?void 0:Ee.toString())});else if((W==null?void 0:W.key)==="tableContents"){let P=[],Ee=(S=I==null?void 0:I.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:S.contents,oe=(h==null?void 0:h[1])??"";if(Ee!=null&&Ee.every(X=>Array.isArray(X))){let X=Se.getColumnChild((de=Ee==null?void 0:Ee[0])==null?void 0:de.filter(ne=>(ne==null?void 0:ne.label)!=="操作"));(H=W.contents)==null||H.forEach(ne=>{let q={};ne=ne==null?void 0:ne.filter(ve=>!(ve!=null&&ve.id)),X==null||X.forEach((ve,he)=>{let we=ne[he];typeof ne[he]=="number"&&(we=ne[he].toString()),(oe===""||oe===ve.prop)&&(q[ve.prop]=we)}),P.push(q)}),P=it(P)}else{let X=(G=Ee==null?void 0:Ee.map(ne=>ne==null?void 0:ne.label))==null?void 0:G.filter(ne=>ne!=="操作");(L=W.contents)==null||L.forEach(ne=>{let q={};ne=ne==null?void 0:ne.filter(ve=>!(ve!=null&&ve.id)),X==null||X.forEach((ve,he)=>{let we=ne[he];typeof ne[he]=="number"&&(we=ne[he].toString()),(oe===""||oe===ve)&&(q[ve]=we)}),P.push(q)})}C=P}})}return C}else if(ee!=null&&ee.includes("/")){let h={};return(Q=v.cloneDeep(xe))==null||Q.forEach((C,I)=>{var W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he,we,j,De,ue;if((C==null?void 0:C.comp)==="Table"){let Ae=Array.isArray((S=(w=(W=C==null?void 0:C.compData)==null?void 0:W.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:w.contents)==null?void 0:S[0])?(H=(de=(L=(G=C==null?void 0:C.compData)==null?void 0:G.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:L.contents)==null?void 0:de[0])==null?void 0:H.some(Re=>Re==null?void 0:Re.children):[],Qe=(oe=(Ee=(P=C==null?void 0:C.compData)==null?void 0:P.find(Re=>(Re==null?void 0:Re.key)==="tableContents"))==null?void 0:Ee.contents)==null?void 0:oe.map(Re=>(Re!=null&&Re.find(gt=>gt==null?void 0:gt.id)&&(Re=Re.slice(1)),Re)),We=(he=(ve=(q=(ne=(X=C==null?void 0:C.compData)==null?void 0:X.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:ne.contents)==null?void 0:q[0])==null?void 0:ve[0])==null?void 0:he.label,rt=(j=(we=C==null?void 0:C.compData)==null?void 0:we.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:j.contents;if(Ae)(Ae==null?void 0:Ae.length)===0?h[C.name]=h!=null&&h[C.name]?h[C.name]:Se.tableToForm(Qe,rt):h[We]=Se.tableToForm(Qe,rt);else{const Re=[];rt=rt.slice(1,rt.length-1),rt==null||rt.forEach((gt,tt)=>{Qe==null||Qe.forEach(et=>{Re.push({key:gt.label+et[0],value:et[tt+1]})})}),h["form"+I]=Re}}else{const Ae=(ue=(De=C.compData)==null?void 0:De.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:ue.contents;h!=null&&h.form||(h.form=[]);const Qe=[];Ae==null||Ae.forEach(We=>{We.key!==""&&(We={key:(We==null?void 0:We.key)??(We==null?void 0:We.label),value:We==null?void 0:We.value},Qe.push(We))}),h.form=[...Qe,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(ee==="createInsofDataApi"){let h=(re=v.cloneDeep(z))==null?void 0:re[0];return h={comp:(ae=v.cloneDeep(h))==null?void 0:ae.comp,compData:(se=v.cloneDeep(h))==null?void 0:se.compData,name:(Me=v.cloneDeep(h))==null?void 0:Me.name,isShow:(ot=v.cloneDeep(h))==null?void 0:ot.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:h}}}return ee}},$e=async(ee,z,be)=>{var Oe,Ze,qe;let xe=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),Fe=xe==null?void 0:xe.find(me=>(me==null?void 0:me.name)===(be==null?void 0:be[0]));if(Fe){if((Fe==null?void 0:Fe.comp)==="Table"){let me={};for(let ae in v.cloneDeep(ee))v.cloneDeep(ee)[ae]!=="loginUser"?me[ae]=v.cloneDeep(ee)[ae]:me[ae]=((Oe=B.value)==null?void 0:Oe.account)||((Ze=B.value)==null?void 0:Ze.账号);let F=[],J=me;Array.isArray(ee)||(J=[me]),J==null||J.forEach(ae=>{F.push({[ae[be[1]]]:ae})});let fe=[],pe=F==null?void 0:F.map(ae=>{var se;return(se=Object.keys(ae))==null?void 0:se[0]});xe==null||xe.forEach(ae=>{var se;(ae==null?void 0:ae.name)===(be==null?void 0:be[0])&&((se=ae==null?void 0:ae.compData)==null||se.forEach(Me=>{var ot;(Me==null?void 0:Me.key)==="tableContents"&&((ot=Me==null?void 0:Me.contents)==null||ot.forEach(h=>{h!=null&&h.some(C=>pe.includes(C))&&fe.push({[h.find(C=>C.id).id]:h.find(C=>pe.includes(C))})}))}))});let Q=fe==null?void 0:fe.map(ae=>{var se;return(se=Object.keys(ae))==null?void 0:se[0]}),re=[];if(Q==null||Q.forEach(ae=>{var ot;let se=(ot=fe==null?void 0:fe.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0].toString())===ae.toString()}))==null?void 0:ot[ae],Me=F==null?void 0:F.find(h=>{var C;return((C=Object.keys(h))==null?void 0:C[0])===se});re.push({id:parseInt(ae),value:{tableData:Me[se]}})}),(re==null?void 0:re.length)>0)return re}else if((Fe==null?void 0:Fe.comp)==="Form"){let me=v.cloneDeep(Fe);me.compData=(qe=me.compData)==null?void 0:qe.map(fe=>{var pe;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(pe=fe.contents)==null?void 0:pe.map(Q=>((Q==null?void 0:Q.key)===(be==null?void 0:be[1])&&(Q.value=(ee==null?void 0:ee[Q==null?void 0:Q.prop])||ee),Q))),fe});let F={};for(let fe in me)fe!=="id"&&(F[fe]=me[fe]);let J=[];if(J.push({id:Fe==null?void 0:Fe.id,keyType:be==null?void 0:be[1],value:{pageData:F}}),(J==null?void 0:J.length)>0)return J}}},_e=async(ee,z,be)=>{var Oe,Ze,qe,me,F,J,fe,pe,Q,re;let xe=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),Fe=xe==null?void 0:xe.find(ae=>(ae==null?void 0:ae.name)===(be==null?void 0:be[0]));if(Fe){if((Fe==null?void 0:Fe.comp)==="Table"){let ae={};for(let se in v.cloneDeep(ee))v.cloneDeep(ee)[se]!=="loginUser"?ae[se]=v.cloneDeep(ee)[se]:ae[se]=((Oe=B.value)==null?void 0:Oe.account)||((Ze=B.value)==null?void 0:Ze.账号);await v.createInsofDataApi({key:{type:"data",pageKey:z,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ae}})}else if((Fe==null?void 0:Fe.comp)==="Form"){let ae=v.cloneDeep(Fe),se=Object.keys(ee),Me="";(me=(qe=v.cloneDeep(ae))==null?void 0:qe.compData)==null||me.forEach(w=>{var S,G;(w==null?void 0:w.key)==="formContent"&&((G=(S=v.cloneDeep(w))==null?void 0:S.contents)==null||G.forEach(L=>{var de;se.includes(L==null?void 0:L.key)&&(L==null?void 0:L.value)===((de=B.value)==null?void 0:de.姓名)&&(Me=L==null?void 0:L.key)}))});let ot=[];(F=Object.values(ee[Me]))==null||F.forEach(w=>{w!=null&&w.includes("(")&&ot.push(w)}),ot=[...new Set(ot)];const h=ot==null?void 0:ot.map(async w=>{var H,P,Ee,oe,X,ne,q,ve,he,we,j,De;let S="";(ne=(X=(oe=(Ee=(P=(H=v.cloneDeep(w))==null?void 0:H.split("("))==null?void 0:P[1])==null?void 0:Ee.split(")"))==null?void 0:oe[0])==null?void 0:X.split(":"))==null||ne.forEach(ue=>{S=S===""?S+ue.replaceAll("'",""):S+"/"+ue.replaceAll("'","")});let G=[];(De=(j=(we=(he=(ve=(q=v.cloneDeep(w))==null?void 0:q.split("<"))==null?void 0:ve[1])==null?void 0:he.split(">"))==null?void 0:we[0])==null?void 0:j.split(":"))==null||De.forEach(ue=>{G.push(ue.replaceAll("'",""))});const L=await Se.getItemData(S,sessionStorage.getItem("systemKey"),"");let de="";return L==null||L.forEach(ue=>{var Ae;ue.name===(G==null?void 0:G[0])&&((Ae=ue==null?void 0:ue.compData)==null||Ae.forEach(Qe=>{var We;(Qe==null?void 0:Qe.key)==="formContent"&&((We=Qe.contents)==null||We.forEach(rt=>{(rt==null?void 0:rt.key)===(G==null?void 0:G[1])&&(de=rt==null?void 0:rt.value)}))}))}),{[w]:de}}),C=await Promise.all(h);ae.compData=(fe=(J=v.cloneDeep(ae))==null?void 0:J.compData)==null?void 0:fe.map(w=>{var S,G;return(w==null?void 0:w.key)==="formContent"&&(w.contents=(G=(S=v.cloneDeep(w))==null?void 0:S.contents)==null?void 0:G.map(L=>{var de,H,P,Ee;return(de=ee[Me])!=null&&de[L==null?void 0:L.key]&&(ee[Me][L==null?void 0:L.key].includes("(")?L.value=(H=C==null?void 0:C.find(oe=>{var X;return((X=Object.keys(oe))==null?void 0:X[0])===ee[Me][L==null?void 0:L.key]}))==null?void 0:H[ee[Me][L==null?void 0:L.key]]:L.value=(Ee=(P=v.cloneDeep(ee))==null?void 0:P[Me])==null?void 0:Ee[L==null?void 0:L.key]),L})),w});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let W="";((pe=I==null?void 0:I.data)==null?void 0:pe.type)==="success"&&((re=(Q=I==null?void 0:I.data)==null?void 0:Q.result)==null||re.forEach(w=>{var S,G;((G=(S=w==null?void 0:w.value)==null?void 0:S.pageData)==null?void 0:G.name)===(be==null?void 0:be[0])&&(W=w.id)}),await v.updateInsofDataApi({id:W,value:{pageData:ae}}))}}},A=(ee,z="",be={})=>{for(const[xe,Fe]of Object.entries(ee)){const Oe=z?`${z}.${xe}`:xe;Fe!==null&&typeof Fe=="object"&&!Array.isArray(Fe)&&Object.prototype.toString.call(Fe)!=="[object Date]"?A(Fe,Oe,be):be[Oe]=Fe}return be},te=async(ee,z,be,xe)=>{var Ze,qe,me,F,J,fe,pe,Q,re,ae,se,Me,ot,h,C,I,W,w,S,G,L,de,H,P,Ee;let Fe=await Se.getItemData(z,sessionStorage.getItem("systemKey"),""),Oe=Fe==null?void 0:Fe.find(oe=>(oe==null?void 0:oe.name)===(be==null?void 0:be[0]));if(Oe){if(!(be!=null&&be[1])&&(Oe==null?void 0:Oe.comp)==="Table"){let oe={},X=[],ne=(qe=(Ze=Oe==null?void 0:Oe.compData)==null?void 0:Ze.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:qe.contents;ne!=null&&ne.every(he=>Array.isArray(he))?X=(F=Se.getColumnChild((me=ne==null?void 0:ne[0])==null?void 0:me.filter(he=>(he==null?void 0:he.label)!=="操作")))==null?void 0:F.map(he=>he==null?void 0:he.prop):X=ne==null?void 0:ne.map(he=>he==null?void 0:he.label);for(let he in v.cloneDeep(ee))if(v.cloneDeep(ee)[he]!=="loginUser"){let we=A(v.cloneDeep(ee)[he]),j={};for(let De in we)if(X!=null&&X.find(ue=>ue===De))j[De]=we[De];else if(X!=null&&X.find(ue=>(ue==null?void 0:ue.toUpperCase())===(De==null?void 0:De.toUpperCase()))){let ue=X==null?void 0:X.find(Ae=>(Ae==null?void 0:Ae.toUpperCase())===(De==null?void 0:De.toUpperCase()));j[ue]=we[De]}oe[he]=j}else oe[he]=((J=B.value)==null?void 0:J.account)||((fe=B.value)==null?void 0:fe.账号);let q=await v.getInsofDataApi({keyLikes:{tableId:Oe==null?void 0:Oe.id}});if(((Q=(pe=q==null?void 0:q.data)==null?void 0:pe.result)==null?void 0:Q.length)>0){let he=(ae=(re=q==null?void 0:q.data)==null?void 0:re.result)==null?void 0:ae.map(we=>we==null?void 0:we.id);(he==null?void 0:he.length)>0&&await v.batchDeleteInsofDataApi({ids:he})}let ve=[];if((se=Oe==null?void 0:Oe.compData)!=null&&se.find(he=>(he==null?void 0:he.key)==="pageColumn")&&((h=(ot=(Me=Oe==null?void 0:Oe.compData)==null?void 0:Me.find(he=>(he==null?void 0:he.key)==="pageColumn"))==null?void 0:ot.contents)!=null&&h.includes("["))){const he=await v.getInsofDataApi({id:Oe==null?void 0:Oe.tableId});let we=((w=(W=(I=(C=he==null?void 0:he.data)==null?void 0:C.result)==null?void 0:I[0])==null?void 0:W.key)==null?void 0:w.pageKey)??"";(S=Object.values(oe))==null||S.forEach(j=>{ve.push({key:{type:"data",pageKey:we,tableId:Oe==null?void 0:Oe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:j}})})}else(G=Object.values(oe))==null||G.forEach(he=>{ve.push({key:{type:"data",pageKey:z,tableId:Oe==null?void 0:Oe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:he}})});(ve==null?void 0:ve.length)>0&&await v.batchAddInsofDataApi({dataList:ve})}else if(!(be!=null&&be[1])&&(Oe==null?void 0:Oe.comp)==="Form"){let oe=v.cloneDeep(Oe);oe.compData=(de=(L=v.cloneDeep(oe))==null?void 0:L.compData)==null?void 0:de.map(q=>{var ve,he;return(q==null?void 0:q.key)==="formContent"&&(q.contents=(he=(ve=v.cloneDeep(q))==null?void 0:ve.contents)==null?void 0:he.map(we=>{var j,De;return(j=v.cloneDeep(ee))!=null&&j[we==null?void 0:we.key]&&(we.value=(De=v.cloneDeep(ee))==null?void 0:De[we==null?void 0:we.key]),we})),q});const X=await v.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let ne="";((H=X==null?void 0:X.data)==null?void 0:H.type)==="success"&&((Ee=(P=X==null?void 0:X.data)==null?void 0:P.result)==null||Ee.forEach(q=>{var ve,he;((he=(ve=q==null?void 0:q.value)==null?void 0:ve.pageData)==null?void 0:he.name)===(be==null?void 0:be[0])&&(ne=q.id)}),await v.updateInsofDataApi({id:ne,value:{pageData:oe}}))}}},ce=async ee=>{var z,be,xe,Fe,Oe,Ze,qe,me,F,J,fe,pe,Q,re,ae,se;V.setImportLoading(!0);try{if(ee.api){let Me=new WeakMap;(be=(z=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value})).data.result)==null?void 0:z.filter(H=>{var P,Ee;return((P=H==null?void 0:H.key)==null?void 0:P.pageKey)!=="menu"&&((Ee=H==null?void 0:H.key)==null?void 0:Ee.pageKey)!=="secret"}))==null||be.forEach(H=>{Me[H.key.pageKey]?Me[H.key.pageKey]=[...Me[H.key.pageKey],H]:Me[H.key.pageKey]=[H]});let h=await Se.getItemData((y==null?void 0:y.value)===""?D.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Me),C="";if(h=h==null?void 0:h.map(H=>{var P,Ee,oe,X,ne,q,ve,he,we,j,De,ue;if((H==null?void 0:H.comp)==="Form")H.compData=(P=H.compData)==null?void 0:P.map(Ae=>{var Qe;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(Qe=Ae.contents)==null?void 0:Qe.map(We=>{var rt;if((We==null?void 0:We.value)===""&&(We==null?void 0:We.type)==="Select"){let Re=Se.judgeContents((rt=v.cloneDeep(We))==null?void 0:rt.optionUrl,Me);We.value=We.value||Re}return We})),Ae});else if((H==null?void 0:H.comp)==="Table"&&(Ee=H.compData)!=null&&Ee.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn")){let Ae=(X=(oe=H.compData)==null?void 0:oe.find(Re=>(Re==null?void 0:Re.key)==="pageColumn"))==null?void 0:X.contents,Qe=((q=(ne=H.compData)==null?void 0:ne.find(Re=>(Re==null?void 0:Re.key)==="pageGroup"))==null?void 0:q.contents)??"",We=(we=(he=(ve=Ae==null?void 0:Ae.split("["))==null?void 0:ve[1])==null?void 0:he.split("]"))==null?void 0:we[0];C=((j=Ae==null?void 0:Ae.split("["))==null?void 0:j[0])+((ue=(De=Y.value)==null?void 0:De.find(Re=>(Re==null?void 0:Re.key)===We))==null?void 0:ue.value)}return H}),!(C===""||C==="")){const H=await Se.getItemData(C,sessionStorage.getItem("systemKey"),"",!1,"","",Me);h=h==null?void 0:h.map(P=>{var Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe;if((P==null?void 0:P.comp)==="Table"&&(Ee=P.compData)!=null&&Ee.find(We=>(We==null?void 0:We.key)==="pageColumn")){let We=(X=(oe=P.compData)==null?void 0:oe.find(et=>(et==null?void 0:et.key)==="pageColumn"))==null?void 0:X.contents,rt=((q=(ne=P.compData)==null?void 0:ne.find(et=>(et==null?void 0:et.key)==="pageGroup"))==null?void 0:q.contents)??"",Re=(we=(he=(ve=We==null?void 0:We.split("["))==null?void 0:ve[1])==null?void 0:he.split("]"))==null?void 0:we[0],gt=((j=We==null?void 0:We.split("["))==null?void 0:j[0])+((ue=(De=Y.value)==null?void 0:De.find(et=>(et==null?void 0:et.key)===Re))==null?void 0:ue.value),tt=(Ae=H==null?void 0:H.find(et=>(et==null?void 0:et.name)===(rt===""?d==null?void 0:d.compName:rt)))==null?void 0:Ae.compData;P.compData=(Qe=P.compData)==null?void 0:Qe.map(et=>{var Be;return(et==null?void 0:et.key)==="tableContents"&&(et.contents=(Be=tt==null?void 0:tt.find(He=>(He==null?void 0:He.key)==="tableContents"))==null?void 0:Be.contents),et})}return P})}let I={};if(((Fe=(xe=ee==null?void 0:ee.extraValues)==null?void 0:xe.input)==null?void 0:Fe.length)>0){const H=(Ze=(Oe=ee==null?void 0:ee.extraValues)==null?void 0:Oe.input)==null?void 0:Ze.map(async P=>{var Ee;ge!=null&&ge.find(oe=>oe===P)?I=await Ne(P,h):I[Object.keys(P)[0]]=await Ne((Ee=Object.values(P))==null?void 0:Ee[0],h,Me)});await Promise.all(H)}else I=await Ne("/",h);let W=!1;(me=(qe=ee==null?void 0:ee.extraValues)==null?void 0:qe.output)==null||me.forEach(H=>{var P,Ee;(Ee=(P=Object.values(H))==null?void 0:P[0])!=null&&Ee.includes(".doc")&&(W=!0)});let w;if(W){const H=St.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});w=await v.axios.post(ee.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{H.close()})}else w=await v.axios.post(ee.api,I,{headers:{"Content-Type":"application/json"}});let S=(pe=(fe=(J=(F=v.cloneDeep(ee))==null?void 0:F.extraValues)==null?void 0:J.output)==null?void 0:fe.map(H=>{var P,Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe,We,rt;if(!((Ee=(P=Object.values(H))==null?void 0:P[0])!=null&&Ee.includes(".doc"))){let Re=(j=(we=(he=(X=v.cloneDeep((oe=Object.values(H))==null?void 0:oe[0]))==null?void 0:X.split("["))==null?void 0:he[((ve=(q=v.cloneDeep((ne=Object.values(H))==null?void 0:ne[0]))==null?void 0:q.split("["))==null?void 0:ve.length)-1])==null?void 0:we.split("]"))==null?void 0:j[0],gt=Re==null?void 0:Re.split(":"),tt=(Ae=v.cloneDeep((De=Object.values(H))==null?void 0:De[0]))==null?void 0:Ae.substring(0,v.cloneDeep((ue=Object.values(H))==null?void 0:ue[0]).lastIndexOf("["));if(tt=(We=v.cloneDeep(tt))==null?void 0:We.slice(0,((Qe=v.cloneDeep(tt))==null?void 0:Qe.length)-1),tt!=null&&tt.includes("[")){let et="";if((rt=Se.contentTransArrayToAll(tt,"/"))==null||rt.forEach(Be=>{var He,xt,ze,Le,je,Ke,M;if(!(Be!=null&&Be.includes("[")))et=et===""?et+Be.replaceAll("/",""):et+"/"+Be.replaceAll("/","");else{let Te=v.cloneDeep(Be).slice(1,((He=v.cloneDeep(Be))==null?void 0:He.length)-1),at=(Ke=(je=(Le=(ze=(xt=v.cloneDeep(Te))==null?void 0:xt.split("["))==null?void 0:ze[1])==null?void 0:Le.split("]"))==null?void 0:je[0])==null?void 0:Ke.split(":"),Ve="",Ge=(M=h==null?void 0:h.find(Ie=>(Ie==null?void 0:Ie.name)===(at==null?void 0:at[0])))==null?void 0:M.compData;Ge==null||Ge.forEach(Ie=>{var dt;(Ie==null?void 0:Ie.key)==="formContent"&&((dt=Ie==null?void 0:Ie.contents)==null||dt.forEach(ut=>{(ut==null?void 0:ut.key)===(at==null?void 0:at[1])&&(Ve=ut==null?void 0:ut.value)}))}),et=et===""?et+Ve.replaceAll("/",""):et+"/"+Ve.replaceAll("/","")}}),tt=et,tt[(tt==null?void 0:tt.length)-1]!=="/")return tt}}}))==null?void 0:pe.filter(H=>H);S=[...new Set(v.cloneDeep(S))];let G=S==null?void 0:S.map(async H=>{let P=await Se.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",Me);if((P==null?void 0:P.length)===0)return await Se.getParentContents(H)});await Promise.all(G);let L=[],de=(ae=(re=(Q=v.cloneDeep(ee))==null?void 0:Q.extraValues)==null?void 0:re.output)==null?void 0:ae.map(async H=>{var he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et,Be,He,xt,ze,Le,je,Ke,M,Te,at,Ve,Ge,Ie,dt,ut,st,ft,yt,Nt,Rt,Vt,_t,Lt,kt,Ht,Yt,Ot,Aa,wa,Va,ja,Da,Ka,Ca,Ua,Wa,Ha,qa,Ga,Oa,ba,fa,_a,ka,na,ga,Xa,wt,Zt,mt,fn,Mt,ca,Ea,oa,ma,Qt;if((we=(he=Object.values(H))==null?void 0:he[0])!=null&&we.includes(".doc")){var P=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"}),Ee=w.headers["content-disposition"],oe=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),X=oe.exec(Ee),ne=X==null?void 0:X[1],q=document.createElement("a"),ve=window.URL.createObjectURL(P);b.value=[{name:ne,blobUrl:ve}],u.value=!0}else{let Ma=(Re=(rt=(We=(De=v.cloneDeep((j=Object.values(H))==null?void 0:j[0]))==null?void 0:De.split("["))==null?void 0:We[((Qe=(Ae=v.cloneDeep((ue=Object.values(H))==null?void 0:ue[0]))==null?void 0:Ae.split("["))==null?void 0:Qe.length)-1])==null?void 0:rt.split("]"))==null?void 0:Re[0],Tt=Ma==null?void 0:Ma.split(":"),qt=(et=v.cloneDeep((gt=Object.values(H))==null?void 0:gt[0]))==null?void 0:et.substring(0,v.cloneDeep((tt=Object.values(H))==null?void 0:tt[0]).lastIndexOf("["));if(qt!=null&&qt.includes("[")?qt=(He=v.cloneDeep(qt))==null?void 0:He.slice(0,((Be=v.cloneDeep(qt))==null?void 0:Be.length)-1):qt===""&&(qt=D.value),qt=qt.replaceAll("<","[").replaceAll(">","]"),qt!=null&&qt.includes("[")){let Et="";(xt=Se.contentTransArrayToAll(qt,"/"))==null||xt.forEach((At,Ut)=>{var Wt,Ft,ua,la,za,Ya,La,Ja,En,rn,vn;if(!(At!=null&&At.includes("[")))Et=Et===""?Et+At.replaceAll("/",""):Et+"/"+At.replaceAll("/","");else{let ln="",va="";(Wt=v.cloneDeep(At))!=null&&Wt.includes("]")?(ln=v.cloneDeep(At).slice(1,((Ft=v.cloneDeep(At))==null?void 0:Ft.length)-1),va=(La=(Ya=(za=(la=(ua=v.cloneDeep(ln))==null?void 0:ua.split("["))==null?void 0:la[1])==null?void 0:za.split("]"))==null?void 0:Ya[0])==null?void 0:La.split(":")):(ln=v.cloneDeep(At).slice(1,(Ja=v.cloneDeep(At))==null?void 0:Ja.length),va=(En=v.cloneDeep(ln))==null?void 0:En.split("/"));let Za="",sn=(rn=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(va==null?void 0:va[0])))==null?void 0:rn.compData;sn==null||sn.forEach(ia=>{var Sn;(ia==null?void 0:ia.key)==="formContent"&&((Sn=ia==null?void 0:ia.contents)==null||Sn.forEach(Fa=>{(Fa==null?void 0:Fa.key)===(va==null?void 0:va[1])&&(Za=Fa==null?void 0:Fa.value)}))}),((vn=Se.contentTransArrayToAll(qt,"/"))==null?void 0:vn.length)-1!==Ut?Et=Et===""?Et+Za.replaceAll("/",""):Et+"/"+Za.replaceAll("/",""):Et=Et+r.value+Za.replaceAll("/","")}}),(ze=D.value)!=null&&ze.includes(Et)?qt=D.value:qt=Et}let ra=v.cloneDeep((Le=Object.keys(H))==null?void 0:Le[0]);if(((je=w==null?void 0:w.data)==null?void 0:je.statusCode)===200||((Ke=w==null?void 0:w.data)==null?void 0:Ke.code)===200){if(((Te=(M=w==null?void 0:w.data)==null?void 0:M.data)!=null&&Te[ra]||(Ve=(at=w==null?void 0:w.data)==null?void 0:at.result)!=null&&Ve[ra])&&(Tt==null?void 0:Tt.length)===1)return await te(((Ie=(Ge=w==null?void 0:w.data)==null?void 0:Ge.data)==null?void 0:Ie[ra])||((ut=(dt=w==null?void 0:w.data)==null?void 0:dt.result)==null?void 0:ut[ra]),v.cloneDeep(qt),Tt,C);if((ft=(st=w==null?void 0:w.data)==null?void 0:st.data)!=null&&ft[ra]||(Nt=(yt=w==null?void 0:w.data)==null?void 0:yt.result)!=null&&Nt[ra]){let Et=await $e(((Vt=(Rt=w==null?void 0:w.data)==null?void 0:Rt.data)==null?void 0:Vt[ra])||((Lt=(_t=w==null?void 0:w.data)==null?void 0:_t.result)==null?void 0:Lt[ra]),v.cloneDeep(qt),Tt);return Et&&(L=[...L,...Et]),Et}else{if(!((kt=w==null?void 0:w.data)!=null&&kt.data)){let Et=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Me);Et=Et==null?void 0:Et.map(Ut=>{var Wt;return(Ut==null?void 0:Ut.name)===(Tt==null?void 0:Tt[0])&&(Ut.compData=(Wt=Ut.compData)==null?void 0:Wt.map(Ft=>{var ua;return(Ft==null?void 0:Ft.key)==="formContent"&&(Ft.contents=(ua=Ft.contents)==null?void 0:ua.map(la=>{var za,Ya;return(la==null?void 0:la.key)===(Tt==null?void 0:Tt[1])&&(la.value=(Ya=(za=w==null?void 0:w.data)==null?void 0:za.result)==null?void 0:Ya[ra==null?void 0:ra.replaceAll(":","")]),la})),Ft})),Ut});let At=[];(Ht=Et==null?void 0:Et.filter(Ut=>(Ut==null?void 0:Ut.comp)==="Form"))==null||Ht.forEach(async Ut=>{let Wt={};for(let Ft in Ut)Ft!=="id"&&(Wt[Ft]=Ut[Ft]);At.push({id:Ut==null?void 0:Ut.id,value:{pageData:Wt}})}),(At==null?void 0:At.length)>0&&await v.batchUpdateInsofDataApi({dataList:At});return}if((Tt==null?void 0:Tt.length)===1){const Et=(Aa=(Ot=(Yt=w==null?void 0:w.data)==null?void 0:Yt.data)==null?void 0:Ot.path)==null?void 0:Aa.path;let At="";(Ka=(Da=(ja=(Va=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:Va.split(")"))==null?void 0:ja[0])==null?void 0:Da.split(":"))==null||Ka.forEach(Ft=>{var ua,la;At=At===""?At+((ua=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:ua.trim()):At+"/"+((la=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:la.trim())});let Ut=[(qa=(Ha=(Wa=(Ua=(Ca=Et==null?void 0:Et.split("<"))==null?void 0:Ca[1])==null?void 0:Ua.split(">"))==null?void 0:Wa[0])==null?void 0:Ha.replaceAll("'",""))==null?void 0:qa.trim()],Wt;return(ba=(Oa=(Ga=w==null?void 0:w.data)==null?void 0:Ga.data)==null?void 0:Oa.data)!=null&&ba[Tt==null?void 0:Tt[0]]?Wt=await te((ka=(_a=(fa=w==null?void 0:w.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ka[Tt==null?void 0:Tt[0]],At,Tt,C):Wt=await _e((ga=(na=w==null?void 0:w.data)==null?void 0:na.data)==null?void 0:ga.data,At,Ut,Me),Wt}else{const Et=(Zt=(wt=(Xa=w==null?void 0:w.data)==null?void 0:Xa.data)==null?void 0:wt.path)==null?void 0:Zt.path;let At="";return(Ea=(ca=(Mt=(fn=(mt=Et==null?void 0:Et.split("("))==null?void 0:mt[1])==null?void 0:fn.split(")"))==null?void 0:Mt[0])==null?void 0:ca.split(":"))==null||Ea.forEach(Wt=>{var Ft,ua;At=At===""?At+((Ft=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:Ft.trim()):At+"/"+((ua=Wt==null?void 0:Wt.replaceAll("'",""))==null?void 0:ua.trim())}),await $e((Qt=(ma=(oa=w==null?void 0:w.data)==null?void 0:oa.data)==null?void 0:ma.data)==null?void 0:Qt[Tt==null?void 0:Tt[0]],At,Tt)}}}}});if(await Promise.all(de),(L==null?void 0:L.length)>0){let H=[];L==null||L.forEach(oe=>{H!=null&&H.find(X=>{var ne,q,ve,he;return((q=(ne=X==null?void 0:X.value)==null?void 0:ne.pageData)==null?void 0:q.name)===((he=(ve=oe==null?void 0:oe.value)==null?void 0:ve.pageData)==null?void 0:he.name)})||H.push(oe)});let P=[];H==null||H.forEach(oe=>{var q,ve,he,we;let X=v.cloneDeep(oe);X.value.pageData.compData=(q=X.value.pageData.compData)==null?void 0:q.map(j=>{var De;return(j==null?void 0:j.key)==="formContent"&&(j.contents=(De=j.contents)==null?void 0:De.map(ue=>{var Qe,We,rt,Re;let Ae=(Qe=v.cloneDeep(L))==null?void 0:Qe.find(gt=>(gt==null?void 0:gt.keyType)===(ue==null?void 0:ue.key));if(Ae){let gt=(Re=(rt=(We=Ae.value.pageData.compData)==null?void 0:We.find(tt=>(tt==null?void 0:tt.key)==="formContent"))==null?void 0:rt.contents)==null?void 0:Re.find(tt=>(tt==null?void 0:tt.key)===(ue==null?void 0:ue.key));ue.value=gt==null?void 0:gt.value}return ue})),j}),P.push({id:X==null?void 0:X.id,value:X==null?void 0:X.value});let ne=[];(we=(he=(ve=X==null?void 0:X.value)==null?void 0:ve.pageData)==null?void 0:he.compData)==null||we.forEach(j=>{var De;(j==null?void 0:j.key)==="formContent"&&((De=j==null?void 0:j.contents)==null||De.forEach(ue=>{var Ae,Qe,We,rt,Re,gt;if((Qe=(Ae=ue==null?void 0:ue.optionUrl)==null?void 0:Ae.menuSelect)!=null&&Qe.find(tt=>tt==null?void 0:tt.includes("[")))if(ne!=null&&ne.find(tt=>{var et,Be,He;return((et=tt==null?void 0:tt.key)==null?void 0:et.join(","))===((He=(Be=ue==null?void 0:ue.optionUrl)==null?void 0:Be.menuSelect)==null?void 0:He.join(","))})){let tt=(We=ne==null?void 0:ne.find(et=>{var Be,He,xt;return((Be=et==null?void 0:et.key)==null?void 0:Be.join(","))===((xt=(He=ue==null?void 0:ue.optionUrl)==null?void 0:He.menuSelect)==null?void 0:xt.join(","))}))==null?void 0:We.value;tt.push({key:ue==null?void 0:ue.prop,groups:(rt=ue==null?void 0:ue.optionUrl)==null?void 0:rt.groupSelect,value:ue==null?void 0:ue.value}),ne=ne==null?void 0:ne.map(et=>{var Be,He,xt;return((Be=et==null?void 0:et.key)==null?void 0:Be.join(","))===((xt=(He=ue==null?void 0:ue.optionUrl)==null?void 0:He.menuSelect)==null?void 0:xt.join(","))&&(et.value=tt),et})}else ne.push({key:(Re=ue==null?void 0:ue.optionUrl)==null?void 0:Re.menuSelect,value:[{key:ue==null?void 0:ue.prop,groups:(gt=ue==null?void 0:ue.optionUrl)==null?void 0:gt.groupSelect,value:ue==null?void 0:ue.value}]})}))}),(ne==null?void 0:ne.length)>0&&(ne=ne==null?void 0:ne.map(j=>{var ue;let De="";return(ue=j==null?void 0:j.key)==null||ue.forEach(Ae=>{var Qe;if(!(Ae!=null&&Ae.includes("[")))De=De===""?De+Ae:De+"/"+Ae;else{let We="",rt=(Qe=Ae==null?void 0:Ae.replaceAll("[","").replaceAll("]",""))==null?void 0:Qe.split(":");h==null||h.forEach(Re=>{var gt;(Re==null?void 0:Re.name)===(rt==null?void 0:rt[0])&&((gt=Re==null?void 0:Re.compData)==null||gt.forEach(tt=>{var et;(tt==null?void 0:tt.key)==="formContent"&&((et=tt==null?void 0:tt.contents)==null||et.forEach(Be=>{(Be==null?void 0:Be.prop)===(rt==null?void 0:rt[1])&&(We=Be==null?void 0:Be.value)}))}))}),De=De+r.value+We}}),j.key=De,j})),ne==null||ne.forEach(j=>{var Qe,We,rt;let De=(Qe=Me[j.key])==null?void 0:Qe.find(Re=>{var gt,tt,et,Be,He,xt,ze;return((tt=(gt=Re==null?void 0:Re.value)==null?void 0:gt.pageData)==null?void 0:tt.name)===((He=(Be=(et=j==null?void 0:j.value)==null?void 0:et[0])==null?void 0:Be.groups)==null?void 0:He[0])&&((ze=(xt=Re==null?void 0:Re.value)==null?void 0:xt.pageData)==null?void 0:ze.name)!==void 0}),ue=De==null?void 0:De.id,Ae=(We=De==null?void 0:De.value)==null?void 0:We.pageData;Ae.compData=(rt=Ae.compData)==null?void 0:rt.map(Re=>{var gt;return(Re==null?void 0:Re.key)==="formContent"&&(Re.contents=(gt=Re.contents)==null?void 0:gt.map(tt=>{var Be;let et=(Be=j.value)==null?void 0:Be.find(He=>(He==null?void 0:He.key)===(tt==null?void 0:tt.prop));return et&&(tt.value=et.value),tt})),Re}),P.push({id:ue,value:{pageData:Ae}})})});let Ee=(se=v.cloneDeep(L))==null?void 0:se[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}x.setFreshContent(!0)}V.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),V.setImportLoading(!1)}E.value=!0},ge=["createInsofDataApi"],Ye=vo(async ee=>{ce(ee)},100),nt=async ee=>{var qe,me,F,J,fe;const z=v.cloneDeep(ee);let be,xe=new WeakMap,Fe=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ie.value});(me=(qe=Fe.data.result)==null?void 0:qe.filter(pe=>{var Q,re;return((Q=pe==null?void 0:pe.key)==null?void 0:Q.pageKey)!=="menu"&&((re=pe==null?void 0:pe.key)==null?void 0:re.pageKey)!=="secret"}))==null||me.forEach(pe=>{xe[pe.key.pageKey]?xe[pe.key.pageKey]=[...xe[pe.key.pageKey],pe]:xe[pe.key.pageKey]=[pe]}),ee!=null&&ee[0].path&&(be=await(z==null?void 0:z.map(async(pe,Q)=>{var I,W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he;const ae=(I=xe[pe==null?void 0:pe.path])==null?void 0:I.filter(we=>{var j;return((j=we==null?void 0:we.key)==null?void 0:j.type)==="data"});let se="";const Me=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);ae==null||ae.forEach(we=>{var j,De,ue,Ae,Qe;((De=(j=we==null?void 0:we.value)==null?void 0:j.tableData)==null?void 0:De.算法名称)===((ue=z==null?void 0:z[Q])==null?void 0:ue.method)&&(se=(Qe=(Ae=we==null?void 0:we.value)==null?void 0:Ae.tableData)==null?void 0:Qe.算法体)});const ot=await Se.getItemData(pe==null?void 0:pe.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe);let h="",C=(G=(S=(w=(W=ot==null?void 0:ot[0])==null?void 0:W.compData)==null?void 0:w.find(we=>(we==null?void 0:we.key)==="header"))==null?void 0:S.contents)==null?void 0:G.findIndex(we=>(we==null?void 0:we.prop)==="算法体");return(de=(L=ot==null?void 0:ot[0])==null?void 0:L.compData)==null||de.forEach(we=>{var j;(we==null?void 0:we.key)==="tableContents"&&((j=we==null?void 0:we.contents)==null||j.forEach(De=>{De!=null&&De.find(ue=>ue===(pe==null?void 0:pe.method))&&(h=De[C])}))}),{buttonName:((H=z==null?void 0:z[Q])==null?void 0:H.method)||((oe=(Ee=(P=ae==null?void 0:ae[0])==null?void 0:P.value)==null?void 0:Ee.tableData)==null?void 0:oe.算法名称),api:(se===""?(q=(ne=(X=ae==null?void 0:ae[0])==null?void 0:X.value)==null?void 0:ne.tableData)==null?void 0:q.算法体:se)||h,content:Me==null?void 0:Me.filter(we=>we.comp!=="methodButton"),extraContent:(ve=v.cloneDeep(pe.value))==null?void 0:ve.slice(1),methodName:(pe==null?void 0:pe.path)??"",extraValues:(he=z==null?void 0:z[Q])==null?void 0:he.data}})));const Oe=z==null?void 0:z.map(async pe=>{var ot,h,C,I,W,w;const Q=(ot=Fe.data.result)==null?void 0:ot.filter(S=>{var G,L,de;return((G=S==null?void 0:S.key)==null?void 0:G.parentTable)===""&&((L=S==null?void 0:S.key)==null?void 0:L.type)==="method"&&((de=S==null?void 0:S.key)==null?void 0:de.methodName)===S.method}),re=Q==null?void 0:Q[0],ae=(h=Fe.data.result)==null?void 0:h.filter(S=>{var G,L;return((G=S==null?void 0:S.key)==null?void 0:G.type)==="methodData"&&((L=S==null?void 0:S.key)==null?void 0:L.tableId)===(re==null?void 0:re.id)}),se=await Se.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,xe),Me=ae==null?void 0:ae[0];return{buttonName:(C=re==null?void 0:re.key)==null?void 0:C.methodKey,api:(W=(I=Me==null?void 0:Me.value)==null?void 0:I.tableData)==null?void 0:W[0],content:se==null?void 0:se.filter(S=>S.comp!=="methodButton"),extraContent:(w=v.cloneDeep(pe.value))==null?void 0:w.slice(1),methodName:(pe==null?void 0:pe.method)??""}}),Ze=(F=ee==null?void 0:ee[0])!=null&&F.path&&((J=ee==null?void 0:ee[0])==null?void 0:J.path)!==""?await Promise.all(be):await Promise.all(Oe);i.value=Ze==null?void 0:Ze.filter(pe=>pe==null?void 0:pe.extraContent),(fe=i.value)==null||fe.forEach(pe=>{var Q;pe.api===""&&((Q=pe.content)==null||Q.forEach(re=>{var ae;re.comp=="Table"&&x.setExtraContents(Se.methodTableToContent(re.compData,(ae=pe.extraContent)==null?void 0:ae[0]))}))})};return e.watch(()=>d.itemData,async()=>{O.value=="view"&&!E.value&&await nt(v.cloneDeep(d.itemData)),E.value=!1},{immediate:!0,deep:!0}),(ee,z)=>{var be,xe,Fe;return e.unref(O)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((be=i.value)==null?void 0:be.filter(Oe=>(Oe==null?void 0:Oe.buttonName)!=="保存"),Oe=>{var Ze;return e.openBlock(),e.createElementBlock("div",null,[Oe.api!==""?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,disabled:e.unref(K)===e.unref(D)&&!((Ze=Oe==null?void 0:Oe.buttonName)!=null&&Ze.includes("预览")),class:"calculator-content",modelValue:Oe.buttonName,onClickTrigger:qe=>e.unref(Ye)(Oe),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ke)!==""&&((Fe=e.unref(D))==null?void 0:Fe[((xe=e.unref(D))==null?void 0:xe.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ye,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(St.ssFilePreview,{key:0,fileDataList:b.value,onDestroy:Xe},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=zt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=zt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),b=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}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),x=e.ref({}),_=e.ref([]),V=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:x.value}]}),R=Y=>{var K;x.value=v.cloneDeep(Y),r("change",(K=V())==null?void 0:K.compData)},Z=Y=>{var K,ie;if((Y==null?void 0:Y.buttonName)==="确认"){const D=v.cloneDeep(Y==null?void 0:Y.content);switch(u.value){case"create":_.value.push({...D,index:((K=_.value)==null?void 0:K.length)+1});break}r("change",(ie=V())==null?void 0:ie.compData),d.visible=!1}else d.visible=!1},O=(Y,K)=>{var ie,D;switch(Y){case"create":(ie=f.value)==null||ie.forEach($=>{$.value=""}),u.value="create",d.visible=!0;break;case"update":(D=f.value)==null||D.forEach($=>{$.value=K[$==null?void 0:$.prop]}),u.value="update",d.visible=!0;break;case"delete":_.value.splice(K,1),u.value="delete";break}},ke=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var K,ie;Y&&(x.value=((K=Y==null?void 0:Y.find(D=>D.key==="signConfig"))==null?void 0:K.contents)??{},_.value=((ie=Y==null?void 0:Y.find(D=>D.key==="signTypeList"))==null?void 0:ie.contents)??[])},{immediate:!0}),(Y,K)=>{const ie=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(D,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=$=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,($,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString($==null?void 0:$.label),1),e.createElementVNode("div",null,[e.createVNode(D,{type:"primary",size:"small",onClick:B=>O("update",{...$,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(D,{type:"danger",size:"small",onClick:B=>O("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(St.ssForm,{rowContents:g.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:ke,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:Z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=zt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var V,R;return(V=s==null?void 0:s.stepConfig)!=null&&V.allowTrigger?d.value:(R=s==null?void 0:s.stepConfig)==null?void 0:R.active}),b=(V,R)=>{d.value=R,r("clickStep",V,R)},g=V=>St.getComponent(V),f=()=>{var R;const V=(R=s==null?void 0:s.stepList)==null?void 0:R.find((Z,O)=>O+1===u.value);return console.log("findStep",V),V?V==null?void 0:V.children:[]},x=V=>{r("clickTrigger",V)},_=V=>{r("changeTrigger",V)};return(V,R)=>{var ke,Y,K,ie,D;const Z=e.resolveComponent("el-step"),O=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(O,{direction:(ke=n.stepConfig)==null?void 0:ke.direction,active:u.value,"finish-status":"success",simple:(Y=n.stepConfig)==null?void 0:Y.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,($,y)=>(e.openBlock(),e.createBlock(Z,{key:y,class:"step-item",onClick:B=>b($,y+1)},{title:e.withCtx(()=>[e.renderSlot(V.$slots,"title",{title:$==null?void 0:$.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(V.$slots,"description",{description:$==null?void 0:$.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ie=n.stepConfig)!=null&&ie.allowTrigger&&((D=n.stepConfig)!=null&&D.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),($,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g($==null?void 0:$.type)),{modelValue:$.value,"onUpdate:modelValue":B=>$.value=B,onClickTrigger:x,onChangeTrigger:_,content:$==null?void 0:$.content},e.createSlots({_:2},[e.renderList(V.$slots,(B,E)=>({name:E,fn:e.withCtx(ye=>[e.renderSlot(V.$slots,E,e.mergeProps({ref_for:!0},ye||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=zt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),b=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,x;u.value=(f=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:f.contents,d.value=(x=g==null?void 0:g.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:x.contents},{immediate:!0,deep:!0}),(g,f)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(x,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,b)=>(e.openBlock(),e.createBlock(r,{key:b,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=zt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,b;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(b=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(b),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=zt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(St.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=zt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Oc={class:"type-select"},Mc=["onClick"],zc={class:"list-icon"},Lc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:x=>r(g)},[e.createElementVNode("div",zc,[e.createVNode(b,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=zt._export_sfc(Lc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},jc={class:"collapse-title-item"},Kc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),b=e.ref([]),g=Z=>{var ke;let O=(ke=v.cloneDeep(b.value))==null?void 0:ke.map((Y,K)=>(Z===K&&(Y.content=!0),Y));b.value=O},f=Z=>{var ke;let O=(ke=v.cloneDeep(b.value))==null?void 0:ke.map((Y,K)=>(Z===K&&(Y.content=!1),Y));b.value=O,d.value=v.cloneDeep(s.value)},x=(Z,O)=>{var ie;let ke=(ie=v.cloneDeep(b.value))==null?void 0:ie.map((D,$)=>(Z===$&&(D.content=!1),D));b.value=ke;const Y=v.cloneDeep(s.value),K=Y==null?void 0:Y.filter((D,$)=>($===Z&&(D.name=O),D));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var Z,O,ke;!s.value||((Z=s.value)==null?void 0:Z.length)===0?d.value=[]:d.value=(O=v.cloneDeep(s.value))==null?void 0:O.filter(Y=>(Y==null?void 0:Y.comp)!=="methodButton"),u.value=d.value,b.value=(ke=v.cloneDeep(u.value))==null?void 0:ke.map((Y,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const _=Z=>on(Z),V=(Z,O,ke)=>{var K,ie;if(!Z)return;let Y=v.cloneDeep(s.value);Y=(K=Y==null?void 0:Y.map((D,$)=>($===ke&&(D.compData=Z),D)))==null?void 0:K.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),b.value=(ie=v.cloneDeep(Y))==null?void 0:ie.map((D,$)=>({id:$,content:!1})),i.setOriginalData(Y),i.setItemData(Y)},R=Z=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const O=v.cloneDeep(s.value),ke=O==null?void 0:O.filter((Y,K)=>K!==Z);i.setOriginalData(ke),i.setItemData(ke),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(Z,O)=>{const ke=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[O[1]||(O[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(gr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:Y,index:K})=>{var ie,D,$,y,B,E,ye,Xe,it,Ne;return[e.createElementVNode("div",$c,[e.createElementVNode("div",jc,[(D=(ie=b.value)==null?void 0:ie.find($e=>$e.id===K))!=null&&D.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:Y.name&&Y.name!==""?"8px":"0px"})},e.toDisplayString(Y.name),5)),(y=($=b.value)==null?void 0:$.find($e=>$e.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",Kc,[e.createVNode(St._sfc_main$2,{modelValue:Y.name,"onUpdate:modelValue":$e=>Y.name=$e,onClick:O[0]||(O[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(E=(B=b.value)==null?void 0:B.find($e=>$e.id===K))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers($e=>g(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Xe=(ye=b.value)==null?void 0:ye.find($e=>$e.id===K))!=null&&Xe.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(ke,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers($e=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(ke,{name:"Save",onClick:e.withModifiers($e=>x(K,Y.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ne=(it=b.value)==null?void 0:it.find($e=>$e.id===K))!=null&&Ne.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers($e=>R(K),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:Y,index:K})=>{var ie,D;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(_(Y.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_(Y.comp+"Operate")),{itemContents:Y==null?void 0:Y.compData,originalItemContents:(D=(ie=u.value)==null?void 0:ie.find(($,y)=>y===K))==null?void 0:D.compData,onChange:$=>V($,Y,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=zt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>on(u);return(u,b)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,x)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:x},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:x},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=zt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),b=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),x=e.ref(!1),_=e.ref(-1),V=e.ref(new WeakMap),R=e.ref(null),Z=Qn(v.pinia),{itemData:O}=v.storeToRefs(Z),ke=()=>{b.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},Y=ee=>{b.value="修改标签页",g.value.title=d.value[ee].title,f.value=ee,u.value=!0},K=ee=>{const z=$(ee);V.value.delete(z),d.value.splice(ee,1),nt()},ie=()=>{if(g.value.title.trim()){if(f.value===-1){const ee={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:D()};d.value.push(ee)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,nt()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,$=ee=>{const z=d.value[ee];return z.id||(z.id=D()),z.id},y=ee=>{var xe;_.value=ee;const z=$(ee);R.value=v.cloneDeep(O.value);let be=V.value.get(z);!be&&((xe=d.value[ee].children)==null?void 0:xe.length)>0&&(be=Xe(d.value[ee].children)),be?Z.setItemData(v.cloneDeep(be)):Z.setItemData([]),x.value=!0},B=e.computed(()=>{const ee=$t.useModelComp(v.pinia),z=v.storeToRefs(ee).itemData.value;return console.log("可用组件数据",z),!z||!Array.isArray(z)?[]:z.filter(be=>{var xe;if(be.comp==="Tabs"&&_.value>=0){const Fe=$(_.value);if((xe=be.compData)==null?void 0:xe.some(Ze=>{var qe;return Ze.key==="stepList"&&((qe=Ze.contents)==null?void 0:qe.some(me=>me.id===Fe))}))return!1}return!0})}),E=ee=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ee]||ee,ye=ee=>{var z;try{const be=v.cloneDeep(ee);be.id=Date.now()+Math.random(),be.comp==="Tabs"&&((z=be.compData)==null||z.forEach(Fe=>{Fe.key==="stepList"&&Fe.contents&&Fe.contents.forEach(Oe=>{Oe.id=D()})}));const xe=v.cloneDeep(O.value);xe.push(be),Z.setItemData(xe)}catch(be){console.error("添加组件失败:",be)}},Xe=ee=>ee.map(z=>{var be;switch(z.type){case"form":return{comp:"Form",name:z.value||"表单",compData:it(z.content)};case"table":return{comp:"Table",name:z.value||"表格",compData:Ne(z.content)};default:return{comp:"Unknown",name:z.value||"",compData:((be=z.content)==null?void 0:be.originalData)||[]}}}),it=ee=>{if(!ee)return[];const z=[];return ee.rowContents&&z.push({key:"formContent",contents:ee.rowContents}),ee.buttonValue&&z.push({key:"formButton",contents:ee.buttonValue}),typeof ee.isEnableWrap<"u"&&z.push({key:"enableWrap",contents:ee.isEnableWrap}),z},Ne=ee=>[],$e=()=>{if(_.value>=0&&_.value<d.value.length){const ee=$(_.value);V.value.set(ee,v.cloneDeep(O.value)),d.value[_.value].children=te(O.value),console.log("保存后的数据",te(O.value))}x.value=!1,_.value=-1,R.value=null,nt()},_e=()=>{R.value&&Z.setItemData(v.cloneDeep(R.value)),x.value=!1,_.value=-1,R.value=null},A=()=>{x.value&&_e()},te=ee=>{if(!Array.isArray(ee))throw new Error("sourceData must be an array");return ee.map((z,be)=>{if(!z||typeof z!="object")return z;const{comp:xe,name:Fe,compData:Oe}=z;switch(xe){case"Form":return{type:"form",content:ce(Oe||[]),value:"表单"};case"Table":return{type:"table",content:ge(Oe||[]),value:"表格"};default:return{type:"xxx",content:Ye(Oe||[]),value:""}}})},ce=ee=>{const z={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},be={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ee.forEach((xe,Fe)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Fe}:`,xe);return}const{key:Oe,contents:Ze}=xe,qe=be[Oe];if(!qe){console.warn(`Unknown Form config key: ${Oe}`);return}Oe==="enableWrap"?z[qe]=!!Ze:z[qe]=Array.isArray(Ze)?Ze:[]}),z},ge=ee=>{const z={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},be={header:"columns",tableContents:"tableData"};return ee.forEach((xe,Fe)=>{if(!xe||typeof xe!="object"){console.warn(`Invalid config at index ${Fe}:`,xe);return}const{key:Oe,contents:Ze}=xe,qe=be[Oe];if(!qe){console.warn(`Unknown Table config key: ${Oe}`);return}z[qe]=Array.isArray(Ze)?Ze:[]}),z},Ye=ee=>(console.log("Default conversion logic - to be implemented"),{originalData:ee,processed:!1,componentType:"unknown"}),nt=()=>{const ee=[{key:"stepList",contents:d.value}];r("change",ee)};return e.watch(()=>s.itemContents,ee=>{if(ee&&ee.length>0){const z=ee.find(be=>be.key==="stepList");z&&z.contents&&(d.value=z.contents.map(be=>({title:be.title||"",value:be.value||be.title||"",label:be.label||be.title||"",children:be.children||[],id:be.id||D()})))}},{immediate:!0,deep:!0}),(ee,z)=>{const be=e.resolveComponent("svg-icon"),xe=e.resolveComponent("el-input"),Fe=e.resolveComponent("el-form-item"),Oe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[z[6]||(z[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ke},[e.createVNode(be,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),z[5]||(z[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Ze,qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:qe},[e.createElementVNode("span",nu,e.toDisplayString(Ze.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:me=>Y(qe)},"修改标题",8,ru),e.createElementVNode("button",{onClick:me=>y(qe)},"布局调整",8,lu),e.createElementVNode("button",{onClick:me=>K(qe)},"删除",8,iu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":z[2]||(z[2]=Ze=>u.value=Ze),title:b.value,onBeforeDestroy:z[3]||(z[3]=Ze=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:z[1]||(z[1]=Ze=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ie},"确定")]),default:e.withCtx(()=>[e.createVNode(Oe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Fe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(xe,{modelValue:g.value.title,"onUpdate:modelValue":z[0]||(z[0]=Ze=>g.value.title=Ze),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:x.value,"onUpdate:modelValue":z[4]||(z[4]=Ze=>x.value=Ze),title:"布局调整",fullScreen:"",onBeforeDestroy:A},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:_e},"取消"),e.createElementVNode("button",{onClick:$e},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[z[8]||(z[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,Ze=>(e.openBlock(),e.createElementBlock("div",{key:Ze.id,class:"component-item",onClick:qe=>ye(Ze)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(E(Ze.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(Ze.name),1)]),z[7]||(z[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:ee.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=zt._export_sfc(mu,[["__scopeId","data-v-9096ed0d"]]);function bu(){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 ku(n){return{type:"line",...n}}function xu(){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 wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Na={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},Lo=$t.useMenuState(v.pinia),Er=(n,i)=>{var _;const s=[],r=[],{group:d,nameCol:u,valueCol:b}=i||{},g=n==null?void 0:n.find(V=>{const{name:R}=V;return R===d});if(!g)return{names:s,values:r};const f=(_=g==null?void 0:g.compData)==null?void 0:_.find(V=>{const{key:R}=V;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(V=>{const R=V==null?void 0:V[0];let Z=!1;v.isObject(R)&&(R!=null&&R.id)&&(Z=!0);let O=u,ke=b;Z&&(O=O+1,ke=ke+1);const Y=V==null?void 0:V[O],K=V==null?void 0:V[ke];s.push(Y),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:b}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(b&&Lo.activeMenuPath&&(g=await Se.getItemData(`${Lo.activeMenuPath}`,f,"")),!b){const x=i==null?void 0:i.join("/");g=await Se.getItemData(`${x}^${s}`,f,"")}return Er(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),g=await Se.getItemData(u,b,"");return Er(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:b}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:x,valueCol:_,isSelfDetail:V}=i||{};return g&&f&&St.isNumber(x)&&St.isNumber(_)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:x,detailValueCol:_,isSelfDetail:V}):St.isNumber(u)&&St.isNumber(b)?await Eu({menu:r,group:d,nameCol:u,valueCol:b}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const V=g({data:_});return f.series.push(V),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;f.xAxis.data=x;const V=g({data:_});return f.series.push(V),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Na==null?void 0:Na[r];if(!u)return;const{initBaseoptions:b,initSeries:g}=u,f=b();f.title.text=d??"";const{names:x,values:_}=await ho(i,s);if(!x||!_)return f;const V=[];for(let Z=0;Z<x.length;Z++){const O=x[Z],ke=_[Z];V.push({name:O,value:ke})}const R=g({data:V});return f.series.push(R),f},Bu=async(n=[])=>{var b,g,f;const i=((b=n==null?void 0:n.find(x=>x.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((g=n==null?void 0:n.find(x=>x.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(x=>x.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=zt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},zu={class:"form-content"},Lu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},ju=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var Q;u.value=b(),(Q=u.value)==null||Q.forEach(re=>{var se;const ae=re==null?void 0:re.prop;re.value=(se=g==null?void 0:g.value)==null?void 0:se[ae]}),d.visible=!0},x=Q=>{g.value=Q},_=()=>{var Q;d.visible=!1,r("change",(Q=fe())==null?void 0:Q.compData)},V=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=e.ref([]),Z=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],O=e.ref({}),ke=()=>{const Q=R.value,re=v.cloneDeep(Q);return re==null||re.forEach(ae=>{var Me;const se=ae==null?void 0:ae.prop;ae.value=(Me=O.value)==null?void 0:Me[se]}),re},Y=Q=>{var ae;O.value=Q;const re=ke();R.value=re,r("change",(ae=fe())==null?void 0:ae.compData)},K=async()=>{const Q=await Se.getMenusContent(),re=ke();re==null||re.forEach(ae=>{(ae==null?void 0:ae.prop)==="menu"&&(ae.contents=Q)}),R.value=re,V.visible=!0,await Ze(O.value.menu),await F(O.value.group)},ie=e.reactive({visible:!1,width:"840",title:"详情页配置"}),D=e.ref([]),$=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),B=()=>{const Q=D.value,re=v.cloneDeep(Q);return re==null||re.forEach(ae=>{var Me;const se=ae==null?void 0:ae.prop;ae.value=(Me=y.value)==null?void 0:Me[se]}),re},E=Q=>{var ae;y.value=Q;const re=B();D.value=re,r("change",(ae=fe())==null?void 0:ae.compData)},ye=async()=>{await A();const Q=v.cloneDeep(Xe.value),re=B();re==null||re.forEach(ae=>{var Me;const se=ae==null?void 0:ae.prop;ae.value=(Me=y==null?void 0:y.value)==null?void 0:Me[se],se==="mainKey"&&(ae.contents=Q)}),D.value=re,ie.visible=!0},Xe=e.ref([]),it=e.ref([]),Ne=e.ref({}),$e=e.ref({}),_e=()=>{const{compData:Q}=xe.value||{},re=Q==null?void 0:Q.find(I=>{const{key:W}=I;return W==="header"}),ae=(re==null?void 0:re.contents)||[],se=ae==null?void 0:ae.filter((I,W)=>{const{label:w}=I;return w!=="操作"}),Me=se==null?void 0:se.findIndex((I,W)=>{const{isMainKey:w}=I;return w});if(Me<0)return[];const ot=Q==null?void 0:Q.find(I=>{const{key:W}=I;return W==="tableContents"}),h=(ot==null?void 0:ot.contents)||[];return h==null?void 0:h.map(I=>{const W=I==null?void 0:I[0];let w=Me;v.isObject(W)&&(W!=null&&W.id)&&(w=w+1);const S=I==null?void 0:I[w];return{label:S,value:S}})},A=async()=>{const Q=await _e();Xe.value=Q},te=async Q=>{const re=sessionStorage.getItem("systemKey");return await Se.getItemData(Q,re,"")},ce=async Q=>{const re=Q;it.value=re==null?void 0:re.map(ae=>{const{name:se}=ae;return Ne.value[se]=ae,{label:se,value:se}})},ge=Q=>{const{comp:re,compData:ae}=$e.value||{};if(re==="Table"){let se=B();se=se.filter(Me=>{const{prop:ot}=Me;return ot!=="formItems"}),qe(se,ae),D.value=se}},Ye=async()=>{var ae,se;const Q=(ae=y==null?void 0:y.value)==null?void 0:ae.mainKey,re=(se=O==null?void 0:O.value)==null?void 0:se.menu;if(Q){const ot=`${re==null?void 0:re.join("/")}^${Q}`,h=await te(ot);await ce(h);const C=B();C==null||C.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=it.value)}),D.value=C}};e.watch(()=>{var Q;return(Q=y==null?void 0:y.value)==null?void 0:Q.mainKey},async(Q,re)=>{Q!=re&&Q&&await Ye()});const nt=async Q=>{const re=Ne.value[Q];$e.value=re,await ge()};e.watch(()=>{var Q;return(Q=y==null?void 0:y.value)==null?void 0:Q.group},async(Q,re)=>{Q!=re&&Q&&nt(Q)});const ee=async()=>{var re;await Ye();const Q=(re=y.value)==null?void 0:re.group;await nt(Q)},z=e.ref([]),be=e.ref({}),xe=e.ref({}),Fe=async Q=>{const re=Q==null?void 0:Q.join("/"),ae=sessionStorage.getItem("systemKey");return await Se.getItemData(re,ae,"")},Oe=async Q=>{const re=await Fe(Q);z.value=re==null?void 0:re.map(ae=>{const{name:se}=ae;return be.value[se]=ae,{label:se,value:se}})},Ze=async(Q,re)=>{await Oe(Q);const ae=ke();ae==null||ae.forEach(se=>{(se==null?void 0:se.prop)==="group"&&(se.contents=z.value)}),R.value=ae};e.watch(()=>{var Q;return(Q=O==null?void 0:O.value)==null?void 0:Q.menu},async(Q,re)=>{const ae=Q==null?void 0:Q.join("/"),se=re==null?void 0:re.join("/");ae!=se&&await Ze(Q)});const qe=(Q,re)=>{const ae=re==null?void 0:re.find(h=>{const{key:C}=h;return C==="header"}),se=(ae==null?void 0:ae.contents)||[],Me=se==null?void 0:se.filter((h,C)=>{const{label:I}=h;return I!=="操作"}),ot=Me==null?void 0:Me.map((h,C)=>{const{label:I}=h;return{label:I,value:C}});Q==null||Q.forEach(h=>{const C=h==null?void 0:h.prop;(C==="nameCol"||C==="valueCol")&&(h.contents=ot)})},me=Q=>{const{comp:re,compData:ae}=xe.value||{};if(re==="Table"){O.value.formItems=[];let se=ke();se=se.filter(Me=>{const{prop:ot}=Me;return ot!=="formItems"}),qe(se,ae),R.value=se}},F=async Q=>{const re=be.value[Q];xe.value=re,await me()};e.watch(()=>{var Q;return(Q=O==null?void 0:O.value)==null?void 0:Q.group},async(Q,re)=>{Q!=re&&F(Q)});const J=async()=>{var ae,se;const Q=(ae=O.value)==null?void 0:ae.menu;await Ze(Q);const re=(se=O.value)==null?void 0:se.group;await F(re)},fe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:O.value},{key:"chartDetailConfig",contents:y.value}]}),pe=()=>{d.visible=!1,V.visible=!1,ie.visible=!1};return e.onMounted(async()=>{var re,ae,se;R.value=Z(),D.value=$();const Q=s==null?void 0:s.itemContents;g.value=((re=Q==null?void 0:Q.find(Me=>Me.key==="chartBaseConfig"))==null?void 0:re.contents)??{},O.value=((ae=Q==null?void 0:Q.find(Me=>Me.key==="chartDataConfig"))==null?void 0:ae.contents)??{},await J(),y.value=((se=Q==null?void 0:Q.find(Me=>Me.key==="chartDetailConfig"))==null?void 0:se.contents)??{},await ee()}),(Q,re)=>{const ae=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[re[4]||(re[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(ae,{id:"themeButton",onClick:re[0]||(re[0]=se=>f())},{default:e.withCtx(()=>re[3]||(re[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[re[6]||(re[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(ae,{id:"themeButton",onClick:re[1]||(re[1]=se=>K())},{default:e.withCtx(()=>re[5]||(re[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[re[8]||(re[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(ae,{id:"themeButton",onClick:re[2]||(re[2]=se=>ye())},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:pe,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",zu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lu,[e.createVNode(ae,{class:"cancel-button button",onClick:pe,id:"themeBorderButton"},{default:e.withCtx(()=>re[9]||(re[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(ae,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>re[10]||(re[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:V.visible,title:V.title,onBeforeDestroy:pe,width:V.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(ae,{class:"cancel-button button",onClick:pe,id:"themeBorderButton"},{default:e.withCtx(()=>re[11]||(re[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ae,{class:"ok-button button",onClick:pe,id:"themeButton"},{default:e.withCtx(()=>re[12]||(re[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:ie.visible,title:ie.title,onBeforeDestroy:pe,width:ie.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(ae,{class:"cancel-button button",onClick:pe,id:"themeBorderButton"},{default:e.withCtx(()=>re[13]||(re[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ae,{class:"ok-button button",onClick:pe,id:"themeButton"},{default:e.withCtx(()=>re[14]||(re[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Ku=zt._export_sfc(ju,[["__scopeId","data-v-fe119645"]]);var Ln={exports:{}},Uu=Ln.exports,Fo;function Wu(){return Fo||(Fo=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(x,_){return typeof _>"u"?_={autoBom:!1}:typeof _!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),_={autoBom:!_}),_.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(x.type)?new Blob(["\uFEFF",x],{type:x.type}):x}function r(x,_,V){var R=new XMLHttpRequest;R.open("GET",x),R.responseType="blob",R.onload=function(){f(R.response,_,V)},R.onerror=function(){console.error("could not download file")},R.send()}function d(x){var _=new XMLHttpRequest;_.open("HEAD",x,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function u(x){try{x.dispatchEvent(new MouseEvent("click"))}catch{var _=document.createEvent("MouseEvents");_.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),x.dispatchEvent(_)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Se.commonjsGlobal=="object"&&Se.commonjsGlobal.global===Se.commonjsGlobal?Se.commonjsGlobal:void 0,g=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(x,_,V){var R=b.URL||b.webkitURL,Z=document.createElement("a");_=_||x.name||"download",Z.download=_,Z.rel="noopener",typeof x=="string"?(Z.href=x,Z.origin===location.origin?u(Z):d(Z.href)?r(x,_,V):u(Z,Z.target="_blank")):(Z.href=R.createObjectURL(x),setTimeout(function(){R.revokeObjectURL(Z.href)},4e4),setTimeout(function(){u(Z)},0))}:"msSaveOrOpenBlob"in navigator?function(x,_,V){if(_=_||x.name||"download",typeof x!="string")navigator.msSaveOrOpenBlob(s(x,V),_);else if(d(x))r(x,_,V);else{var R=document.createElement("a");R.href=x,R.target="_blank",setTimeout(function(){u(R)})}}:function(x,_,V,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof x=="string")return r(x,_,V);var Z=x.type==="application/octet-stream",O=/constructor/i.test(b.HTMLElement)||b.safari,ke=/CriOS\/[\d]+/.test(navigator.userAgent);if((ke||Z&&O||g)&&typeof FileReader<"u"){var Y=new FileReader;Y.onloadend=function(){var D=Y.result;D=ke?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=D:location=D,R=null},Y.readAsDataURL(x)}else{var K=b.URL||b.webkitURL,ie=K.createObjectURL(x);R?R.location=ie:location.href=ie,R=null,setTimeout(function(){K.revokeObjectURL(ie)},4e4)}});b.saveAs=f.saveAs=f,n.exports=f})}(Ln)),Ln.exports}Wu();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BPTR1s4o.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Sr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Tr=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),b=d==null?void 0:d.filter(_=>_!==(u==null?void 0:u[s])),g=s+1,f=Tr(b,u,g),x=[];x.push(d==null?void 0:d[0]),f==null||f.forEach(_=>{x.push(_)}),d=x}return d})),r},eo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(b=>b===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let b=v.cloneDeep(i),g=u==null?void 0:u.filter(V=>V!==(b==null?void 0:b[r])),f=r+1,x=eo(g,b,s,f),_=[];_.push(u==null?void 0:u[0]),x==null||x.forEach(V=>{_.push(V)}),u=_}return u})),d},go=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(b=>Array.isArray(b))&&(u!=null&&u.every(b=>Array.isArray(b)&&b.length===1)?u=u==null?void 0:u.map(b=>((b==null?void 0:b[0])===s&&(b=[r]),b)):u=u==null?void 0:u.map(b=>{if(b!=null&&b.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=b==null?void 0:b.filter(R=>R!==(g==null?void 0:g[d])),x=d+1,_=go(f,g,s,r,x),V=[];V.push(b==null?void 0:b[0]),_==null||_.forEach(R=>{V.push(R)}),b=V}return b})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:jn,DynamicIcon:Sr,ssDialog:Xt.ssDialog,ssInput:St._sfc_main$2},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=$t.useMenuState(),b=$t.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),x=e.ref(0),_=Pl.useRouter(),V=e.ref(),{asideMenus:R,menuTriggerType:Z,platform:O}=v.storeToRefs(u),{fixMenuStatus:ke}=v.storeToRefs(b),Y=e.computed(()=>r==null?void 0:r.mode),K=me=>me==null?void 0:me.map(J=>{var fe,pe;return!(J!=null&&J.children)||((fe=J==null?void 0:J.children)==null?void 0:fe.length)===0?J.config=d.value:J!=null&&J.children&&((pe=J==null?void 0:J.children)==null?void 0:pe.length)>0&&(J.children=K(J.children)),J}),ie=e.computed(()=>{let me=[...R.value];if((me==null?void 0:me.length)===0)return _.push("/"),[];const F=Xe(me,E.value);return F.isFlag||(me=F==null?void 0:F.data),me=me==null?void 0:me.map(J=>{var fe,pe;return!(J!=null&&J.children)||((fe=J==null?void 0:J.children)==null?void 0:fe.length)===0?J.config=d.value:J!=null&&J.children&&((pe=J==null?void 0:J.children)==null?void 0:pe.length)>0&&(J.children=K(J.children)),J}),me}),D=async(me,F)=>{b.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(me==null?void 0:me.path),u.setActiveAsideMenu(me),me.isRouter?_.push(me.path):_.push("/"),s("node-click",me,F)},$=async me=>{const F=v.findNodeByPropInTree(ie.value,"path",me);u.setActiveAsideMenu(F),b.setRouteToChildPath(""),ke.value?b.setFixMenuStatus(!1):Z.value==="click"?x.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(me):(u.setMenuTriggerType("click"),u.setActiveMenuPath(me)),me!=null&&me.startsWith("/")?_.push(me):_.push("/"),x.value++},y=me=>{u.setActiveMenuPath(me)},B=me=>{const F=document.documentElement;me==null||me.forEach(J=>{F.style.setProperty(J.name,J.value)})};e.onMounted(()=>{x.value=1});const E=e.computed(()=>{const me=sessionStorage.getItem("authority");return me?JSON.parse(me):[]});e.watch(()=>O.value,me=>{me==="browser"?B(yn.browserVerticalMenuClasses):me==="client"?(B(yn.clientHorizontalMenuClasses),B(yn.clientVerticalMenuClasses)):me==="three"&&(B(yn.threeHorizontalMenuClasses),B(yn.threeVerticalMenuClasses))},{immediate:!0});const ye=(me,F)=>{function J(fe){fe==null||fe.forEach(pe=>{var re,ae;const Q=(re=pe==null?void 0:pe.path)!=null&&re.startsWith("/")?(ae=pe==null?void 0:pe.path)==null?void 0:ae.substring(1):pe==null?void 0:pe.path;pe.show=F==null?void 0:F.some(se=>se==null?void 0:se.includes(Q)),pe.children&&J(pe.children)})}return J(me),me},Xe=(me,F)=>{if(Array.isArray(F)){const J=Array.from(new Set(F==null?void 0:F.map(fe=>fe.substring(0,fe.lastIndexOf("/")))));return{data:ye(me,J),isFlag:!1}}else return{isFlag:(F==null?void 0:F.toUpperCase())==="SUPERADMIN"}},it=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Ne=me=>on(me),$e=e.ref({}),_e=e.ref([]),A=e.ref({}),te=e.ref({}),ce=me=>{switch(me){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},ge=e.ref({}),Ye=me=>{u.setCacheInputMenu({type:it.type,data:me}),u.setIsRefreshMenus(!0)},nt=async(me,F,J)=>{var fe,pe,Q,re,ae,se,Me,ot,h,C,I,W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et,Be,He,xt,ze;if(F==="create"){let Le=(J==null?void 0:J.title)+"(1)",je=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ke=(pe=(fe=je==null?void 0:je.data)==null?void 0:fe.result)==null?void 0:pe[0],M=(Q=Ke==null?void 0:Ke.value)==null?void 0:Q.pageData;M.compData=(re=M.compData)==null?void 0:re.map(Ve=>{var Ge;return(Ve==null?void 0:Ve.key)==="menuContents"&&(Ve.contents=eo(Ve.contents,(Ge=J==null?void 0:J.path)==null?void 0:Ge.split("/"),Le)),Ve}),await v.updateInsofDataApi({id:Ke==null?void 0:Ke.id,value:{pageData:M}});let Te=(se=(ae=J==null?void 0:J.path)==null?void 0:ae.split("/"))==null?void 0:se.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}),at=await Se.getItemData((h=(ot=(Me=J==null?void 0:J.path)==null?void 0:Me.split("/"))==null?void 0:ot.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(Te.push(Le),Te=Te==null?void 0:Te.join("/"),(at==null?void 0:at.length)>0){let Ve=at==null?void 0:at[0],Ge=(I=(C=Ve==null?void 0:Ve.compData)==null?void 0:C.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:I.contents;if(((W=Ge==null?void 0:Ge[0])==null?void 0:W.directiveLabel)==="#isMain"){let Ie=(w=Ge==null?void 0:Ge[0])==null?void 0:w.prop,dt=(G=(S=Ve==null?void 0:Ve.compData)==null?void 0:S.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:G.contents,ut;dt==null||dt.forEach(st=>{var ft,yt;if(st.length===1)((ft=st==null?void 0:st[0])==null?void 0:ft[Ie])===(J==null?void 0:J.title)&&(ut=st==null?void 0:st[0],ut[Ie]=Le);else{let Nt=(yt=Ge==null?void 0:Ge.filter(_t=>_t!=="操作"))==null?void 0:yt.map(_t=>_t==null?void 0:_t.prop),Rt=st==null?void 0:st.filter(_t=>!(_t!=null&&_t.id)),Vt=Se.getValueToObjectValue(Rt,Nt);Vt[Ie]=Le,ut=Vt}}),await v.createInsofDataApi({key:{type:"data",pageKey:(H=(de=(L=J==null?void 0:J.path)==null?void 0:L.split("/"))==null?void 0:de.filter((st,ft)=>{var yt,Nt;return ft!==((Nt=(yt=J==null?void 0:J.path)==null?void 0:yt.split("/"))==null?void 0:Nt.length)-1}))==null?void 0:H.join("/"),tableId:Ve==null?void 0:Ve.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Ee=f.value)==null?void 0:Ee.dept)||((oe=f.value)==null?void 0:oe.部门名称)},value:{tableData:ut}})}}await Se.newLoadingConstruct(J==null?void 0:J.path,Te),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((q=(ne=(X=J==null?void 0:J.path)==null?void 0:X.split("/"))==null?void 0:ne.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}))==null?void 0:q.join("/")),u.setActiveTopMenuPath((he=(ve=J==null?void 0:J.path)==null?void 0:ve.split("/"))==null?void 0:he[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(F==="update")V.value=J;else if(F==="delete"){let Le=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:J==null?void 0:J.path}}),je=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ke=(j=(we=je==null?void 0:je.data)==null?void 0:we.result)==null?void 0:j[0],M=(De=Ke==null?void 0:Ke.value)==null?void 0:De.pageData;if(M.compData=(ue=M.compData)==null?void 0:ue.map(Ve=>{var Ge;return(Ve==null?void 0:Ve.key)==="menuContents"&&(Ve.contents=Tr(Ve.contents,(Ge=J==null?void 0:J.path)==null?void 0:Ge.split("/"))),Ve}),await v.updateInsofDataApi({id:Ke==null?void 0:Ke.id,value:{pageData:M}}),((Qe=(Ae=Le==null?void 0:Le.data)==null?void 0:Ae.result)==null?void 0:Qe.length)>0){let Ve=(rt=(We=Le==null?void 0:Le.data)==null?void 0:We.result)==null?void 0:rt.map(Ge=>Ge==null?void 0:Ge.id);(Ve==null?void 0:Ve.length)>0&&await v.batchDeleteInsofDataApi({ids:Ve})}let Te=await Se.getItemData((tt=(gt=(Re=J==null?void 0:J.path)==null?void 0:Re.split("/"))==null?void 0:gt.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}))==null?void 0:tt.join("/"),sessionStorage.getItem("systemKey"),""),at=[];(Te==null?void 0:Te.length)>0&&(Te==null||Te.forEach(Ve=>{var Ie,dt,ut,st,ft,yt,Nt,Rt,Vt,_t,Lt;let Ge=(st=(ut=(dt=(Ie=Ve==null?void 0:Ve.compData)==null?void 0:Ie.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:dt.contents)==null?void 0:ut[0])==null?void 0:st.prop;((Rt=(Nt=(yt=(ft=Ve==null?void 0:Ve.compData)==null?void 0:ft.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:yt.contents)==null?void 0:Nt[0])==null?void 0:Rt.directiveLabel)==="#isMain"&&((Lt=(_t=(Vt=Ve==null?void 0:Ve.compData)==null?void 0:Vt.find(kt=>(kt==null?void 0:kt.key)==="tableContents"))==null?void 0:_t.contents)==null||Lt.forEach(kt=>{var Ht,Yt,Ot;(kt==null?void 0:kt.length)>1?(kt==null?void 0:kt[1])===(J==null?void 0:J.title)&&at.push((Ht=kt==null?void 0:kt[0])==null?void 0:Ht.id):((Yt=kt==null?void 0:kt[0])==null?void 0:Yt[Ge])===(J==null?void 0:J.title)&&at.push((Ot=kt==null?void 0:kt[0])==null?void 0:Ot.id)}))})),(at==null?void 0:at.length)>0&&await v.batchDeleteInsofDataApi({ids:at}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((He=(Be=(et=J==null?void 0:J.path)==null?void 0:et.split("/"))==null?void 0:Be.filter((Ve,Ge)=>{var Ie,dt;return Ge!==((dt=(Ie=J==null?void 0:J.path)==null?void 0:Ie.split("/"))==null?void 0:dt.length)-1}))==null?void 0:He.join("/")),u.setActiveTopMenuPath((ze=(xt=J==null?void 0:J.path)==null?void 0:xt.split("/"))==null?void 0:ze[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},ee=async(me,F)=>{var ot,h,C,I,W,w,S,G,L,de,H,P,Ee,oe,X,ne,q,ve,he,we,j,De,ue,Ae,Qe,We,rt,Re,gt,tt,et;let J=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),fe=(h=(ot=J==null?void 0:J.data)==null?void 0:ot.result)==null?void 0:h[0],pe=(C=fe==null?void 0:fe.value)==null?void 0:C.pageData;pe.compData=(I=pe.compData)==null?void 0:I.map(Be=>{var He,xt;return(Be==null?void 0:Be.key)==="menuContents"&&(Be.contents=go(Be.contents,(He=F==null?void 0:F.path)==null?void 0:He.split("/"),F==null?void 0:F.title,(xt=me==null?void 0:me.target)==null?void 0:xt.value)),Be}),fe!=null&&fe.id&&await v.updateInsofDataApi({id:fe==null?void 0:fe.id,value:{pageData:pe}});let Q=(w=(W=F==null?void 0:F.path)==null?void 0:W.split("/"))==null?void 0:w.filter((Be,He)=>{var xt,ze;return He!==((ze=(xt=F==null?void 0:F.path)==null?void 0:xt.split("/"))==null?void 0:ze.length)-1}),re=Q==null?void 0:Q.join("/");Q.push((S=me==null?void 0:me.target)==null?void 0:S.value),Q=Q==null?void 0:Q.join("/");let ae=await Se.getItemData(re,sessionStorage.getItem("systemKey"),"");if(((P=(H=(de=(L=(G=ae==null?void 0:ae[0])==null?void 0:G.compData)==null?void 0:L.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:de.contents)==null?void 0:H[0])==null?void 0:P.directiveLabel)==="#isMain"){let Be=(q=(ne=(X=(oe=(Ee=ae==null?void 0:ae[0])==null?void 0:Ee.compData)==null?void 0:oe.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:X.contents)==null?void 0:ne[0])==null?void 0:q.prop,He=(we=(he=(ve=ae==null?void 0:ae[0])==null?void 0:ve.compData)==null?void 0:he.find(Le=>(Le==null?void 0:Le.key)==="tableContents"))==null?void 0:we.contents,xt=(Ae=(ue=(De=(j=ae==null?void 0:ae[0])==null?void 0:j.compData)==null?void 0:De.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:ue.contents)==null?void 0:Ae.map(Le=>Le==null?void 0:Le.prop),ze;if(He==null||He.forEach(Le=>{var Ke;let je=Se.getValueToObjectValue(Le,xt);(je==null?void 0:je[Be])===F.title&&(ze=je,ze[Be]=(Ke=me==null?void 0:me.target)==null?void 0:Ke.value)}),ze){let Le={};for(let Ke in ze)Ke!=="id"&&(Le[Ke]=ze==null?void 0:ze[Ke]);let je=[{id:ze==null?void 0:ze.id,value:{tableData:Le}}];await v.batchUpdateInsofDataApi({dataList:je})}}let se=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:F==null?void 0:F.path}}),Me=(We=(Qe=se==null?void 0:se.data)==null?void 0:Qe.result)==null?void 0:We.map(Be=>({id:Be==null?void 0:Be.id,key:Be==null?void 0:Be.key}));Me=Me==null?void 0:Me.map(Be=>(Be.key.pageKey=Q,Be)),(Me==null?void 0:Me.length)>0&&await v.batchUpdateInsofDataApi({dataList:Me}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((gt=(Re=(rt=F==null?void 0:F.path)==null?void 0:rt.split("/"))==null?void 0:Re.filter((Be,He)=>{var xt,ze;return He!==((ze=(xt=F==null?void 0:F.path)==null?void 0:xt.split("/"))==null?void 0:ze.length)-1}))==null?void 0:gt.join("/")),u.setActiveTopMenuPath((et=(tt=F==null?void 0:F.path)==null?void 0:tt.split("/"))==null?void 0:et[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),V.value=void 0},z=async(me,F)=>{it.type=ce(F==null?void 0:F.operateType),await nt(F,it.type,me),te.value=me,ge.value=F},be=()=>{it.show=!1},xe=me=>me==null?void 0:me.filter(F=>F.allowInherit),Fe=()=>{var J,fe,pe,Q,re;let me;it.type==="create"&&(me=((J=te.value)==null?void 0:J.path)+"/"+A.value[(fe=A.value)==null?void 0:fe.prop]),it.type==="update"&&(me=(pe=te.value)==null?void 0:pe.path);const F={...te.value,config:xe((Q=te.value)==null?void 0:Q.config),children:[],childMenus:[],title:A.value[(re=A.value)==null?void 0:re.prop],path:me};console.log("clickSubmitForm",ge.value,te.value,F),Ye(F),it.show=!1},Oe=me=>{var J,fe;const F=(J=me==null?void 0:me.contents)==null?void 0:J.find(pe=>pe.key==="formContent");F&&(A.value=(fe=F==null?void 0:F.contents)==null?void 0:fe.reduce((pe,Q)=>(pe[Q.key]=Q.value,pe.prop=Q.key,pe),{}))},Ze=e.ref(!1);return{isCollapse:Ze,handleMenuCollapse:()=>{Ze.value=!Ze.value},handleCompChange:Oe,dialogForm:$e,dialogRenderComps:_e,getComponents:Ne,clickSubmitForm:Fe,dialogInfo:it,beforeDialogDestroy:be,clickMenuIcon:z,mode:Y,renderMenuList:ie,clickMenu:D,openMenu:$,closeMenu:y,changeMenuStyle:B,fixElement:V,onBlur:ee}}}}e.defineComponent(Ir());const $a=v.useLoginState(),{loginUserInfo:An}=v.storeToRefs($a),Pt=$t.useModelComp(v.pinia),Fn=e.ref(!1),{itemData:Hu,itemGridData:en,curStructureCompIds:Ro,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:Po,routeToChildPath:Xu,payloadTypes:mo,pageMapState:Kn,itemExtendData:Vn}=v.storeToRefs(Pt),Kt=$t.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:vt,platform:Kp,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(Kt),ha=Se.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Gt}=v.storeToRefs(ha),ed=Se.useOriginalState(v.pinia),{originalPath:to}=v.storeToRefs(ed),Jt=e.ref(),$o=$t.useAuthorityState(v.pinia),Un=e.ref(!0),pn=e.ref(0),Wn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=vt.value)!=null&&i.startsWith("/")?(s=vt.value)==null?void 0:s.substring(1):vt.value;return(n==null?void 0:n.includes(to.value))||await ud(n)}),td=()=>{Pt.setItemGridData([]),Pt.setIsEdit("edit"),Pt.setSubmitCurStructure(vt.value!=="/平台管理/菜单管理")},ad=()=>{Pt.setIsEdit("view"),Pt.setRefreshCurStructure(!0)},nd=async n=>{var b,g,f;let i=Qu.value,s=i==null?void 0:i.findIndex(x=>(x==null?void 0:x.value)===(n==null?void 0:n.value)),r=(b=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)==="parent"))==null?void 0:b.map(x=>x==null?void 0:x.value),d=r==null?void 0:r[0],u=(f=(g=i==null?void 0:i.filter((x,_)=>!(x!=null&&x.condition)&&_<=s))==null?void 0:g.map(x=>x.value))==null?void 0:f.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(x=>(x==null?void 0:x.condition)!=="child"),ha.setSelectTitle(i),ha.setChooseTitle([])),Kt.setActiveMenuPath(d)},lo=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,b;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var x;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(x=f==null?void 0:f.compData)==null?void 0:x.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},b=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},b=v.batchDeleteInsofDataApi);const g=await b(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},jo=async(n,i,s,r)=>{var d,u,b,g,f,x,_,V,R,Z,O;try{const ke=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),Y=(g=(b=n==null?void 0:n.results)==null?void 0:b.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),ie=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let D;s?D=(V=(_=(x=Kn.value)==null?void 0:x[vt.value])==null?void 0:_.filter(y=>{var B,E,ye;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i&&((ye=(E=y==null?void 0:y.key)==null?void 0:E.relatedInfo)==null?void 0:ye.target)===r}))==null?void 0:V.map(y=>y==null?void 0:y.id):D=(O=(Z=(R=Kn.value)==null?void 0:R[vt.value])==null?void 0:Z.filter(y=>{var B;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i}))==null?void 0:O.map(y=>y==null?void 0:y.id);const $=D==null?void 0:D.filter(y=>!(ie!=null&&ie.includes(y))&&typeof y=="number");(ke==null?void 0:ke.length)>0&&await v.batchAddInsofDataApi({dataList:ke}),(Y==null?void 0:Y.length)>0&&await v.batchUpdateInsofDataApi({dataList:Y}),($==null?void 0:$.length)>0&&await v.batchDeleteInsofDataApi({ids:$})}catch(ke){throw new Error(ke)}},od=async n=>{var x,_,V,R,Z,O,ke,Y,K,ie;Kt.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return Kt.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(D=>D.id),r=s.filter(D=>{var $;return!(($=Ro.value)!=null&&$.includes(D))}),d=(x=Ro.value)==null?void 0:x.filter(D=>!s.includes(D)),u=[...r,...d].filter(D=>typeof D!==null&&typeof D<"u"),b=i==null?void 0:i.filter(D=>!D.id),g=i==null?void 0:i.filter(D=>D.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(lo(u,"delete",n)),b&&(b==null?void 0:b.length)>0&&f.push(lo(b,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(lo(g,"update",n)),en.value&&((_=en.value)!=null&&_.isDelete&&((R=(V=en.value)==null?void 0:V.results)==null?void 0:R.length)>0&&((O=(Z=en.value)==null?void 0:Z.results)!=null&&O.every(D=>typeof D=="number"))?await v.batchDeleteInsofDataApi({ids:(ke=en.value)==null?void 0:ke.results}):(console.log("itemGridData.value",en.value),f.push(await jo(en.value,"gridLayout")))),Vn.value)for(const D in Vn.value)f.push(await jo((Y=Vn.value)==null?void 0:Y[D],"extend",{target:D,compId:(ie=(K=Vn.value)==null?void 0:K[D])==null?void 0:ie.compId},D));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),Pt.setRefreshCurStructure(!0)}).catch(D=>{v.ElMessage.success(D)}),Kt.setContentLoading(!1)},Hn=n=>on(n),pt=e.ref([]),rd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),ld=async n=>{var r,d,u,b,g,f;let i=v.cloneDeep(vt).value;i=i+to.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const x=(g=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:g.map(V=>V==null?void 0:V.id),_=await v.batchDeleteInsofDataApi({ids:x});((f=_==null?void 0:_.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await $a.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),Pt.setTableLoading(!1)}},Ko=async n=>{var i,s;try{let r=v.cloneDeep(vt).value,d=[];if(Array.isArray(n)){n==null||n.forEach(b=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+to.value+((g=Object.values(b==null?void 0:b.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(b=>{var g;return((g=b==null?void 0:b.data)==null?void 0:g.code)===200}))){const b=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var x;return(x=f==null?void 0:f.data)==null?void 0:x.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:b});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await $a.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await ld(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{Pt.setTableLoading(!1)}},id=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:vt.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const b=await Promise.all([u]);(b==null?void 0:b.every(f=>{var x;return((x=f==null?void 0:f.data)==null?void 0:x.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),qn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,b,g,f,x,_,V,R,Z,O,ke,Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e,_e,A,te,ce,ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze,qe,me,F,J,fe,pe,Q,re,ae,se,Me,ot,h,C,I,W,w,S,G,L,de,H,P,Ee,oe,X,ne;qn.value=null;let r=vt.value;if((d=Jt.value)!=null&&d.compData&&((u=Jt.value)==null?void 0:u.compData)!==vt.value&&(r=r+"/"+((g=(b=Gt.value)==null?void 0:b[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await Ko(n):await Se.deleteTableContents((x=n==null?void 0:n.singleContent)==null?void 0:x.id,n),await $a.setLogRecordAsync({type:"删除",data:n},vt.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((_=n==null?void 0:n.selectItems)!=null&&_.every(q=>typeof(q==null?void 0:q.id)=="string")){const q=(V=n==null?void 0:n.selectItems)==null?void 0:V.map(ve=>({content:n==null?void 0:n.content,singleContent:ve,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await Ko(q)}else{const q=(R=n==null?void 0:n.selectItems)==null?void 0:R.map(ve=>ve==null?void 0:ve.id);await v.batchDeleteInsofDataApi({ids:q}),await $a.setLogRecordAsync({type:"删除",data:q},vt.value)}else if((n==null?void 0:n.buttonName)==="新增"){let q={};for(let he in n==null?void 0:n.singleContent)he!=="id"&&he!=="index"&&(q[he]=n==null?void 0:n.singleContent[he]);const ve=await Se.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(q),n==null?void 0:n.column,n,{param:s});if(qn.value={resId:ve,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((O=(Z=n==null?void 0:n.column)==null?void 0:Z[0])==null?void 0:O.directiveLabel)==="#isMain"&&((Y=(ke=n==null?void 0:n.column)==null?void 0:ke[0])==null?void 0:Y.directiveColor)!==!0){let he=(D=n==null?void 0:n.singleContent)==null?void 0:D[(ie=(K=n==null?void 0:n.column)==null?void 0:K[0])==null?void 0:ie.prop],we=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),j=vt.value+"/"+(he==null?void 0:he.slice(0,(he==null?void 0:he.length)-3)),De=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:j}}),ue=(y=($=we==null?void 0:we.data)==null?void 0:$.result)==null?void 0:y[0],Ae=(B=ue==null?void 0:ue.value)==null?void 0:B.pageData;if(Ae.compData=(E=Ae.compData)==null?void 0:E.map(Qe=>((Qe==null?void 0:Qe.key)==="menuContents"&&(Qe.contents=eo(Qe.contents,j==null?void 0:j.split("/"),he)),Qe)),await v.updateInsofDataApi({id:ue==null?void 0:ue.id,value:{pageData:Ae}}),((Xe=(ye=De==null?void 0:De.data)==null?void 0:ye.result)==null?void 0:Xe.length)>0)await Se.newLoadingConstruct(j,vt.value+"/"+he);else{let Qe=await v.getInsofDataApi({key:{pageKey:vt.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((Ne=(it=Qe==null?void 0:Qe.data)==null?void 0:it.result)==null?void 0:Ne.length)>=1?await Se.newLoadingCutFirstConstruct(vt.value+"/",vt.value+"/"+he):await Se.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+he)}Kt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),Kt.setIsRefreshMenus(!1),Kt.setIsRefreshMenus(!0),Kt.setActiveMenuPath((_e=($e=j==null?void 0:j.split("/"))==null?void 0:$e.filter((Qe,We)=>{var rt;return We!==((rt=j==null?void 0:j.split("/"))==null?void 0:rt.length)-1}))==null?void 0:_e.join("/"))}Pt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((te=(A=n==null?void 0:n.column)==null?void 0:A[0])==null?void 0:te.directiveLabel)==="#isMain"&&((ge=(ce=n==null?void 0:n.column)==null?void 0:ce[0])==null?void 0:ge.directiveColor)!==!0){let q=(ee=n==null?void 0:n.singleContent)==null?void 0:ee[(nt=(Ye=n==null?void 0:n.column)==null?void 0:Ye[0])==null?void 0:nt.prop];if(St.isNumber((z=n==null?void 0:n.singleContent)==null?void 0:z.id)){let ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),he=await v.getInsofDataApi({id:(be=n==null?void 0:n.singleContent)==null?void 0:be.id}),we=(F=(Ze=(Oe=(Fe=(xe=he==null?void 0:he.data)==null?void 0:xe.result)==null?void 0:Fe[0])==null?void 0:Oe.value)==null?void 0:Ze.tableData)==null?void 0:F[(me=(qe=n==null?void 0:n.column)==null?void 0:qe[0])==null?void 0:me.prop],j=vt.value+"/"+we,De=(fe=(J=ve==null?void 0:ve.data)==null?void 0:J.result)==null?void 0:fe[0],ue=(pe=De==null?void 0:De.value)==null?void 0:pe.pageData;ue.compData=(Q=ue.compData)==null?void 0:Q.map(Ae=>((Ae==null?void 0:Ae.key)==="menuContents"&&(Ae.contents=go(Ae.contents,j==null?void 0:j.split("/"),we,q)),Ae)),await v.updateInsofDataApi({id:De==null?void 0:De.id,value:{pageData:ue}}),Kt.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),Kt.setIsRefreshMenus(!1),Kt.setIsRefreshMenus(!0),Kt.setActiveMenuPath((ae=(re=j==null?void 0:j.split("/"))==null?void 0:re.filter((Ae,Qe)=>{var We;return Qe!==((We=j==null?void 0:j.split("/"))==null?void 0:We.length)-1}))==null?void 0:ae.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let q=[],ve=[],he=((Me=(se=n==null?void 0:n.content)==null?void 0:se[0])==null?void 0:Me.id)??"",we=s==null?void 0:s.url,j="",De="";if(he!==""&&((ot=n==null?void 0:n.content)==null?void 0:ot.length)>1&&typeof((C=(h=n==null?void 0:n.content)==null?void 0:h[0])==null?void 0:C.id)!="string"){const ue=await v.getInsofDataApi({id:he});j=((S=(w=(W=(I=ue==null?void 0:ue.data)==null?void 0:I.result)==null?void 0:W[0])==null?void 0:w.key)==null?void 0:S.tableId)??"",De=((H=(de=(L=(G=ue==null?void 0:ue.data)==null?void 0:G.result)==null?void 0:L[0])==null?void 0:de.key)==null?void 0:H.pageKey)??""}(P=n==null?void 0:n.singleContent)==null||P.forEach(ue=>{let Ae={};for(let Qe in ue)Qe!=="id"&&Qe!=="index"&&(Ae[Qe]=ue[Qe]);typeof(ue==null?void 0:ue.id)=="number"?q.push({id:ue==null?void 0:ue.id,value:{tableData:Ae}}):ve.push({key:{type:i,pageKey:we||De||vt.value,tableId:j||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ae}})}),(ve==null?void 0:ve.length)>0&&await v.batchAddInsofDataApi({dataList:ve}),(q==null?void 0:q.length)>0&&await v.batchUpdateInsofDataApi({dataList:q})}else{let q={},ve=(Ee=n==null?void 0:n.singleContent)==null?void 0:Ee.id;for(let he in n==null?void 0:n.singleContent)he!=="id"&&he!=="index"&&(q[he]=n==null?void 0:n.singleContent[he]);await Se.fixTableContents(i,r,n==null?void 0:n.index,ve,sessionStorage.getItem("systemKey"),Object.values(q),n==null?void 0:n.column,n)}Pt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await id(n==null?void 0:n.value);Pt.setTableLoading(!1),(oe=n==null?void 0:n.column)!=null&&oe.some(q=>q==null?void 0:q.isMainKey),pt.value=await Se.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),pt.value=(X=pt.value)==null?void 0:X.filter(q=>{var ve;return((ve=q==null?void 0:q.compData)==null?void 0:ve.length)>0}),pt.value=(ne=pt.value)==null?void 0:ne.filter(q=>(q==null?void 0:q.comp)!==""),pt.value=Se.getDeepDiffItems(pt.value),bo.value&&(n==null?void 0:n.buttonName)!=="删除"&&Pt.setRefreshCurStructure(!0)},sd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,b;if(Fn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await sd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Se.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(Kt.setActiveMenuPath(null),Kt.setActiveMenuPath(i))},Yn=async n=>{pt.value=Se.getDeepDiffItems(n),Pt.setItemData(pt.value),Pt.setOriginalData(pt.value)},cd=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?$o.setRouterPageStructure(n):$o.setRouterPageStructure([])},ud=async n=>{var u,b,g,f,x,_;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((V,R)=>{var Z;((Z=n==null?void 0:n.split("/"))==null?void 0:Z.length)-2>R&&(i=i===""?i+V:i+"/"+V)}),(b=n==null?void 0:n.split("/"))==null||b.forEach((V,R)=>{var Z;((Z=n==null?void 0:n.split("/"))==null?void 0:Z.length)-1>R&&(s=s===""?s+V:s+"/"+V)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((_=(x=d==null?void 0:d.data)==null?void 0:x.result)==null?void 0:_.length)>0},dd=e.ref(),Ba=e.ref(null),pd=n=>{var x,_,V,R,Z,O,ke,Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e;const i=(_=(x=Kn.value)==null?void 0:x[n])==null?void 0:_.filter(_e=>{var A;return((A=_e==null?void 0:_e.key)==null?void 0:A.type)==="extend"});if((i==null?void 0:i.length)===0)return Ba.value=null;dd.value=i;const s=(R=(V=i==null?void 0:i.find(_e=>{var A,te,ce;return(ce=(te=(A=_e==null?void 0:_e.value)==null?void 0:A.tableData)==null?void 0:te.执行任务)==null?void 0:ce.includes("计时")}))==null?void 0:V.value)==null?void 0:R.tableData;if(!s)return Ba.value=null;const r=(ke=(O=(Z=i==null?void 0:i.find(_e=>{var A,te,ce;return(ce=(te=(A=_e==null?void 0:_e.value)==null?void 0:A.tableData)==null?void 0:te.执行任务)==null?void 0:ce.includes("计时")}))==null?void 0:Z.key)==null?void 0:O.relatedInfo)==null?void 0:ke.compId,d=(Y=pt.value)==null?void 0:Y.find(_e=>(_e==null?void 0:_e.id)===r);if(!d)return Ba.value=null;const u=(ie=s==null?void 0:s.任务关键词)==null?void 0:ie[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],b=(y=($=(D=d==null?void 0:d.compData)==null?void 0:D.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:$.contents)==null?void 0:y.findIndex(_e=>(_e==null?void 0:_e.prop)===u),g=(Xe=(ye=(E=(B=d==null?void 0:d.compData)==null?void 0:B.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:E.contents)==null?void 0:ye.find(_e=>_e==null?void 0:_e.isMainKey))==null?void 0:Xe.prop,f=($e=(Ne=(it=d==null?void 0:d.compData)==null?void 0:it.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:Ne.contents)==null?void 0:$e[b];Ba.value={prop:u,value:f,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:g},console.log("getPageExtendData:",s,i)},fd=()=>{var n,i;console.log("倒计时结束时"),$t.ElMessageBox.alert(`超时未提交,【${(i=(n=vt.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=vt.value)!=null&&n.includes(to.value)))return;const d=(i=pt.value)==null?void 0:i.find(f=>{var x;return((x=f==null?void 0:f.comp)==null?void 0:x.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},b=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=b==null?void 0:b.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&Pt.setLockingPage(vt.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},yo=e.ref([]),vd=e.computed(()=>{var n,i;return(i=(n=Kn.value)==null?void 0:n[vt.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{ha.setSelectTitle([]),ha.setChooseTitle([])},{deep:!0});e.watch(()=>[Gt.value],async()=>{var r,d,u,b,g,f,x,_,V,R,Z,O,ke,Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e,_e,A,te,ce,ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze,qe,me,F,J;if(((r=Jt.value)==null?void 0:r.compData)===vt.value||((d=Gt.value)==null?void 0:d.length)===0)return;Kt.setContentLoading(!0);let n=new WeakMap;if((b=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:u.filter(fe=>{var pe,Q;return((pe=fe==null?void 0:fe.key)==null?void 0:pe.pageKey)!=="menu"&&((Q=fe==null?void 0:fe.key)==null?void 0:Q.pageKey)!=="secret"}))==null||b.forEach(fe=>{n[fe.key.pageKey]?n[fe.key.pageKey]=[...n[fe.key.pageKey],fe]:n[fe.key.pageKey]=[fe]}),pt.value=await Se.getItemData(vt.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=pt.value)!=null&&g.find(fe=>(fe==null?void 0:fe.comp)==="")),Jt.value=(f=pt.value)==null?void 0:f.find(fe=>(fe==null?void 0:fe.comp)===""),((x=Jt.value)==null?void 0:x.compData)===vt.value){let fe=(_=vt.value)==null?void 0:_.split("/").map(pe=>({value:pe.trim()}));fe=[...fe,...Gt.value??[]]}else{let fe=(R=(V=Jt.value)==null?void 0:V.compData)==null?void 0:R.split("/").map(pe=>({value:pe.trim(),condition:"parent"}));if(!(!fe||(fe==null?void 0:fe.length)===0)){let pe=await Se.getItemData((Z=Jt.value)==null?void 0:Z.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);pe=pe==null?void 0:pe.filter(se=>{var Me,ot,h;return Array.isArray(se==null?void 0:se.compData)&&((h=(ot=(Me=se==null?void 0:se.compData)==null?void 0:Me.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:ot.contents)==null?void 0:h.find(C=>(C==null?void 0:C.directiveLabel)==="#isMain"))});let Q=(ie=(K=(Y=(ke=(O=pe==null?void 0:pe[0])==null?void 0:O.compData)==null?void 0:ke.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Y.contents)==null?void 0:K.find(se=>(se==null?void 0:se.directiveLabel)==="#isMain"))==null?void 0:ie.prop,re=(B=(y=($=(D=pe==null?void 0:pe[0])==null?void 0:D.compData)==null?void 0:$.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:y.contents)==null?void 0:B.findIndex(se=>(se==null?void 0:se.directiveLabel)==="#isMain"),ae=(it=(Xe=(ye=(E=pe==null?void 0:pe[0])==null?void 0:E.compData)==null?void 0:ye.find(se=>(se==null?void 0:se.key)==="tableContents"))==null?void 0:Xe.contents)==null?void 0:it.map(se=>{var Me;return(se==null?void 0:se.length)>1?se==null?void 0:se[re+1]:(Me=se==null?void 0:se[0])==null?void 0:Me[Q]});if(ae=ae==null?void 0:ae.map(se=>({label:se,value:se})),(Ne=Gt.value)==null||Ne.length,((_e=($e=Gt.value)==null?void 0:$e[0])==null?void 0:_e.value)!==""){let se=await Se.getItemData(vt.value+"/"+((te=(A=Gt.value)==null?void 0:A[0])==null?void 0:te.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value);se||(await Se.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+((ge=(ce=Gt.value)==null?void 0:ce[0])==null?void 0:ge.value)),se=await Se.getItemData(vt.value+"/"+((nt=(Ye=Gt.value)==null?void 0:Ye[0])==null?void 0:nt.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=se}}(fe==null?void 0:fe.length)>0&&((z=(ee=Gt.value)==null?void 0:ee[0])==null?void 0:z.value)===""&&(pt.value=[])}pt.value=(be=pt.value)==null?void 0:be.filter(fe=>(fe==null?void 0:fe.comp)!=="");let s="";if(!pt.value){let fe=(Oe=(Fe=(xe=vt.value)==null?void 0:xe.split("/"))==null?void 0:Fe.filter((pe,Q)=>{var re,ae;return Q!==((ae=(re=vt.value)==null?void 0:re.split("/"))==null?void 0:ae.length)-1}))==null?void 0:Oe.join("/");pt.value=await Se.getItemData(fe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(F=(Ze=vt.value)==null?void 0:Ze.split("/"))==null?void 0:F[((me=(qe=vt.value)==null?void 0:qe.split("/"))==null?void 0:me.length)-1]}await $a.setLogRecordAsync({type:"查询",data:pt.value},vt.value),s!==""&&(pt.value=(J=pt.value)==null?void 0:J.map(fe=>{var pe;return fe!=null&&fe.isShow&&(fe.compData=(pe=fe==null?void 0:fe.compData)==null?void 0:pe.map(Q=>{var re,ae,se,Me,ot;if((Q==null?void 0:Q.key)==="tableContents"){let h=[],C="";C=(Me=(se=(ae=(re=fe==null?void 0:fe.compData)==null?void 0:re.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:ae.contents)==null?void 0:se[0])==null?void 0:Me.prop,h=(ot=Q.contents)==null?void 0:ot.filter(I=>(I==null?void 0:I[C])===s||(I==null?void 0:I[1])===s),Q.contents=h}return Q})),fe})),pt.value=Se.getDeepDiffItems(pt.value),Kt.setContentLoading(!1)},{deep:!0});const hd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(b=>{var g,f,x;if((b==null?void 0:b.title)===(u==null?void 0:u[0])){let _=u.slice(1);Array.isArray(b==null?void 0:b.childMenus)&&((g=b==null?void 0:b.childMenus)==null?void 0:g.length)===0||(_!=null&&_[0]&&(_==null?void 0:_.length)!==0?r(b==null?void 0:b.childMenus,_):s=(x=(f=b==null?void 0:b.childMenus)==null?void 0:f[0])==null?void 0:x.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[vt.value,Gu.value],async n=>{var u,b,g,f,x,_,V,R,Z,O,ke,Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e,_e,A,te,ce,ge,Ye,nt,ee,z,be,xe,Fe,Oe,Ze,qe,me,F,J,fe,pe,Q,re,ae,se,Me,ot;if(!vt.value)return;Pt.setLockingPage(""),pt.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Un.value=!1,Fn.value=!0;const s=(b=n==null?void 0:n[0])!=null&&b.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((x=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:f.filter(h=>{var C,I;return((C=h==null?void 0:h.key)==null?void 0:C.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||x.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Wn.value=r,s){Kt.setContentLoading(!0),sessionStorage.setItem("pageKey",vt.value),ha.setSelectTitle([]),pt.value=await Se.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((_=pt.value)!=null&&_.find(I=>(I==null?void 0:I.comp)==="")),Jt.value=(V=pt.value)==null?void 0:V.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((R=Jt.value)!=null&&R.compData)){let I=hd(Zu.value,(Z=vt.value)==null?void 0:Z.split("/")),W=await Se.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);W!=null&&W.find(w=>(w==null?void 0:w.comp)==="")?h=(ke=(O=W==null?void 0:W.find(w=>(w==null?void 0:w.comp)===""))==null?void 0:O.compData)==null?void 0:ke.split("/").map(w=>({value:w.trim(),condition:"parent"})):ha.setChooseTitle([])}if(((Y=Jt.value)==null?void 0:Y.compData)===vt.value){let I=(K=vt.value)==null?void 0:K.split("/").map(W=>({value:W.trim()}));I=[...I,...Gt.value??[]],ha.setSelectTitle(I)}else{let I=[],W=(D=(ie=Jt.value)==null?void 0:ie.compData)==null?void 0:D.split("/").map(G=>({value:G.trim(),condition:"parent"}));if(!W||(W==null?void 0:W.length)===0)W=h,(W==null?void 0:W.length)===0&&(Jt.value={compData:vt.value});else{let G=await Se.getItemData(($=Jt.value)==null?void 0:$.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);G=G==null?void 0:G.filter(P=>{var Ee,oe,X;return Array.isArray(P==null?void 0:P.compData)&&((X=(oe=(Ee=P==null?void 0:P.compData)==null?void 0:Ee.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:oe.contents)==null?void 0:X.find(ne=>(ne==null?void 0:ne.directiveLabel)==="#isMain"))});let L=(Xe=(ye=(E=(B=(y=G==null?void 0:G[0])==null?void 0:y.compData)==null?void 0:B.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:E.contents)==null?void 0:ye.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Xe.prop,de=(_e=($e=(Ne=(it=G==null?void 0:G[0])==null?void 0:it.compData)==null?void 0:Ne.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:$e.contents)==null?void 0:_e.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),H=(ge=(ce=(te=(A=G==null?void 0:G[0])==null?void 0:A.compData)==null?void 0:te.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:ce.contents)==null?void 0:ge.map(P=>{var Ee;return(P==null?void 0:P.length)>1?P==null?void 0:P[de+1]:(Ee=P==null?void 0:P[0])==null?void 0:Ee[L]});if(H=H==null?void 0:H.map(P=>({label:P,value:P})),((Ye=Gt.value)==null?void 0:Ye.length)===0&&ha.setChooseTitle([{value:"",condition:"child",options:H,parentContent:(nt=Jt.value)==null?void 0:nt.compData}]),((z=(ee=Gt.value)==null?void 0:ee[0])==null?void 0:z.value)!==""){let P=await Se.getItemData(vt.value+"/"+((xe=(be=Gt.value)==null?void 0:be[0])==null?void 0:xe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Se.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+((Oe=(Fe=Gt.value)==null?void 0:Fe[0])==null?void 0:Oe.value)),P=await Se.getItemData(vt.value+"/"+((qe=(Ze=Gt.value)==null?void 0:Ze[0])==null?void 0:qe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=P}}(W==null?void 0:W.length)>0&&((F=(me=Gt.value)==null?void 0:me[0])==null?void 0:F.value)===""&&(pt.value=[]),I=[...I,...W??[]],I=[...I,...Gt.value??[]];let w=(J=vt.value)==null?void 0:J.split("/").map(G=>({value:G.trim()})),S=w==null?void 0:w.filter(G=>!(I!=null&&I.find(L=>(L==null?void 0:L.value)===(G==null?void 0:G.value))));I=[...I,...S??[]],ha.setSelectTitle(I)}pt.value=(fe=pt.value)==null?void 0:fe.filter(I=>(I==null?void 0:I.comp)!=="");let C="";if(!pt.value){let I=(Q=(pe=s==null?void 0:s.split("/"))==null?void 0:pe.filter((W,w)=>{var S;return w!==((S=s==null?void 0:s.split("/"))==null?void 0:S.length)-1}))==null?void 0:Q.join("/");pt.value=await Se.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),C=(ae=s==null?void 0:s.split("/"))==null?void 0:ae[((re=s==null?void 0:s.split("/"))==null?void 0:re.length)-1]}await $a.setLogRecordAsync({type:"查询",data:pt.value},vt.value),C!==""&&(pt.value=(se=pt.value)==null?void 0:se.map(I=>{var W;return I!=null&&I.isShow&&(I.compData=(W=I==null?void 0:I.compData)==null?void 0:W.map(w=>{var S,G,L,de,H;if((w==null?void 0:w.key)==="tableContents"){let P=[],Ee="";Ee=(de=(L=(G=(S=I==null?void 0:I.compData)==null?void 0:S.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:G.contents)==null?void 0:L[0])==null?void 0:de.prop,P=(H=w.contents)==null?void 0:H.filter(oe=>(oe==null?void 0:oe[Ee])===C||(oe==null?void 0:oe[1])===C),w.contents=P}return w})),I})),pt.value=Se.getDeepDiffItems(pt.value),await cd(pt.value),Or(),pd(s),yo.value=(Me=pt.value)==null?void 0:Me.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),Pt.setExtraContents([]),ha.setSelectIndex(""),ha.setSelectMenu(""),Pt.setItemData(pt.value),Pt.setOriginalData(pt.value),Pt.setCurStructureCompIds((ot=pt.value)==null?void 0:ot.map(I=>I==null?void 0:I.id)),Pt.setRefreshCurStructure(!1),Kt.setChildMenu(""),Kt.setContentLoading(!1),Pt.setTableLoading(!1),Fn.value=!1}else pt.value=[],Fn.value=!1;e.nextTick(()=>{pn.value=pn.value++,Un.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{var n,i,s,r,d,u,b,g,f,x,_,V,R,Z,O;if(Po.value){let ke=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:n.filter(y=>{var B,E;return((B=y==null?void 0:y.key)==null?void 0:B.pageKey)!=="menu"&&((E=y==null?void 0:y.key)==null?void 0:E.pageKey)!=="secret"}))==null||i.forEach(y=>{ke[y.key.pageKey]?ke[y.key.pageKey]=[...ke[y.key.pageKey],y]:ke[y.key.pageKey]=[y]});let K=vt.value;(s=Jt.value)!=null&&s.compData&&((r=Jt.value)==null?void 0:r.compData)!==vt.value&&(K=K+"/"+((u=(d=Gt.value)==null?void 0:d[0])==null?void 0:u.value));const ie=(g=(b=vt.value)==null?void 0:b[0])!=null&&g.startsWith("/")?(x=(f=vt.value)==null?void 0:f[0])==null?void 0:x.substring(1):(_=vt.value)==null?void 0:_[0];let D=await Se.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),$="";if(!pt.value){let y=(R=(V=ie==null?void 0:ie.split("/"))==null?void 0:V.filter((B,E)=>{var ye;return E!==((ye=ie==null?void 0:ie.split("/"))==null?void 0:ye.length)-1}))==null?void 0:R.join("/");D=await Se.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,ke),$=(O=ie==null?void 0:ie.split("/"))==null?void 0:O[((Z=ie==null?void 0:ie.split("/"))==null?void 0:Z.length)-1]}$!==""&&(D=D==null?void 0:D.map(y=>{var B;return y!=null&&y.isShow&&(y.compData=(B=y==null?void 0:y.compData)==null?void 0:B.map(E=>{var ye,Xe,it,Ne,$e;if((E==null?void 0:E.key)==="tableContents"){let _e=[],A="";A=(Ne=(it=(Xe=(ye=y==null?void 0:y.compData)==null?void 0:ye.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:Xe.contents)==null?void 0:it[0])==null?void 0:Ne.prop,_e=($e=E.contents)==null?void 0:$e.filter(te=>(te==null?void 0:te[A])===$||(te==null?void 0:te[1])===$),E.contents=_e}return E})),y})),D=D==null?void 0:D.filter(y=>(y==null?void 0:y.comp)!==""),pt.value=Se.getDeepDiffItems(D),Pt.setFreshContent(!1),Or()}},{deep:!0});const gd=async()=>{var d,u,b,g,f,x,_,V;Kt.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=An.value)==null?void 0:d.account)||((u=An.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=An.value)==null?void 0:b.account)||((g=An.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(x=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:x.map(R=>R==null?void 0:R.id);const r=(V=(_=i==null?void 0:i.data)==null?void 0:_.result)==null?void 0:V.map(R=>R==null?void 0:R.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(R=>R!==null&&R))&&(await v.batchDeleteInsofDataApi({ids:s}),await $a.setLogRecordAsync({type:"删除",data:s},vt.value)),Kt.setActiveMenuPath(Xu.value),pt.value=null,Pt.setRouteToChildPath(""),Kt.setChildMenu("")},md=n=>new RegExp("button","i").test(n),yd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(yd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&Kt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},zr=n=>{var i;Ba.value&&(Ba.value={...Ba.value,mainKeyPropValue:n==null?void 0:n[(i=Ba.value)==null?void 0:i.mainKeyProp]})},bd=n=>{Vr.value=n},un=e.reactive({index:0,comp:null}),kd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:xd(i,s)}))}),Lr=(n,i)=>{var f,x,_,V,R;const s=i?n:n-2,r=(f=pt.value)==null?void 0:f[s],d=(_=(x=r==null?void 0:r.compData)==null?void 0:x.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:_.contents,u=d==null?void 0:d.findIndex(Z=>(Z==null?void 0:Z.isMainKey)&&(Z==null?void 0:Z.label)!=="操作"),b=u===-1?0:u,g=(R=(V=r==null?void 0:r.compData)==null?void 0:V.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:R.contents;return{valid:g==null?void 0:g.every(Z=>Z==null?void 0:Z[b+1]),length:(g==null?void 0:g.length)||0}},xd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=Lr(i,!0);un.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,b;const i=n+1;if(i>1&&((d=(r=(s=pt.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=Lr(i);g?(un.index=i,un.comp=(u=pt.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else un.index=i,un.comp=(b=pt.value)==null?void 0:b[n]},bo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>bo.value,n=>{n&&Fr(0)},{immediate:!0});const wd={class:"layout"},Dd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(V=>{const{key:R}=V;return R==="baseConfig"});return x==null?void 0:x.contents}),b=e.computed(()=>{var _;const x=(_=d==null?void 0:d.value)==null?void 0:_.find(V=>{const{key:R}=V;return R==="children"});return x==null?void 0:x.contents}),g=e.computed(()=>{let x=v.cloneDeep(b.value)||[];const _=x.length;let V=0;const R=[];if(x=x.map(Z=>{const O=Z.span;return O?(Z.span=Number(O),V=V+Z.span):R.push(Z),Z}),V<24){const Z=Math.floor((24-V)/_);R.forEach(O=>{O.span=Z})}return x}),f=x=>{s("rowClick",x)};return(x,_)=>{var Z;const V=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",wd,[e.createVNode(R,{style:e.normalizeStyle({height:(Z=u.value)==null?void 0:Z.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(O,ke)=>(e.openBlock(),e.createBlock(V,{span:O==null?void 0:O.span},{default:e.withCtx(()=>{var Y;return[e.unref(Un)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(O.comp)),{key:e.unref(pn),compName:O.name,index:(O==null?void 0:O.id)??ke,height:(Y=u.value)==null?void 0:Y.height,itemData:O==null?void 0:O.compData,childItemData:O==null?void 0:O.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Cd=zt._export_sfc(Dd,[["__scopeId","data-v-ab9a36ed"]]),_d={class:"layout-operate"},Ed={class:"layout-module"},Sd={class:"collapse-title-item"},Td={class:"collapse-title"},Id={class:"icon-content"},Bd=["onClick"],Nd={class:"comp-child"},Ad=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{ke()});const d=e.ref({}),u=e.ref({}),b=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",$(),!0)},x=e.ref([]),_=e.ref([]),V=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],R=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),Z=e.computed(()=>{const y=R==null?void 0:R.value,B=y==null?void 0:y.find(E=>{const{key:ye}=E;return ye==="baseConfig"});return B==null?void 0:B.contents}),O=e.computed(()=>{const y=R==null?void 0:R.value,B=y==null?void 0:y.find(E=>{const{key:ye}=E;return ye==="children"});return B==null?void 0:B.contents}),ke=()=>{var y;d.value=R.value||{},x.value=(O==null?void 0:O.value)||[],b.value=g(),b.value=(y=b.value)==null?void 0:y.map(B=>{var ye;const{prop:E}=B;return B.value=(ye=Z.value)==null?void 0:ye[E],B})};e.watch(()=>{var y;return(y=O==null?void 0:O.value)==null?void 0:y.length},()=>{var y;x.value=(O==null?void 0:O.value)||[],_.value=(y=O.value)==null?void 0:y.map(B=>V(B))},{immediate:!0});const Y=(y,B)=>{const E=v.cloneDeep(O==null?void 0:O.value);E[B].span=y.span,x.value=E,r("change",$(),!0)},K=y=>on(y),ie=(y,B,E)=>{if(!y)return;const ye=v.cloneDeep(O==null?void 0:O.value);ye[E]&&(ye[E].compData=y,x.value=ye,r("change",$(),!0))},D=y=>{$t.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let B=v.cloneDeep(O==null?void 0:O.value);B=B==null?void 0:B.filter((E,ye)=>y!==ye),x.value=B,r("change",$(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},$=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:x==null?void 0:x.value}]});return(y,B)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_d,[e.createElementVNode("div",Ed,[B[1]||(B[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(St.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:B[0]||(B[0]=ye=>f(ye))},null,8,["rowContents"])])]),e.createVNode(gr.default,{class:"collapse-content",collapseContents:O.value},{title:e.withCtx(({item:ye,index:Xe})=>[e.createElementVNode("div",Sd,[e.createElementVNode("div",Td,e.toDisplayString(ye.name),1),e.createElementVNode("div",Id,[e.createElementVNode("div",{onClick:e.withModifiers(it=>D(Xe),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Bd)])])]),content:e.withCtx(({item:ye,index:Xe})=>[e.createElementVNode("div",Nd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(St.ssForm,{rowContents:_.value[Xe],key:Xe,isEnableWrap:!0,onChange:it=>Y(it,Xe)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(ye.comp+"Operate")),{itemContents:ye==null?void 0:ye.compData,originalItemContents:ye.compData,onChange:it=>ie(it,ye,Xe)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Vd=zt._export_sfc(Ad,[["__scopeId","data-v-ba05456e"]]),Od=typeof window<"u";var Uo;Od&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(n){return n==null}function Rr(){}const Md=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(Md)));function zd(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Wo(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const b=Date.now(),g=b-r;clearTimeout(d),g>=i?(r=b,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function Ld(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const wn=new Set,$r=new WeakMap;function Fd(){wn.forEach(n=>{n(...$r.get(n))}),wn.clear()}function aa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!wn.has(n)&&(wn.add(n),wn.size===1&&Promise.resolve().then(Fd))}const jr=Symbol("LAYOUT_KEY"),Kr=Symbol("EMITTER_KEY");function Rd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=Pd(n[s]);return i}function Pd(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function cn(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let b=0,g=d.length;b<g;b++){let f=d[b];f.static||(f=$d(r,f,i,s),r.push(f)),u[n.findIndex(x=>x.i===f.i)]=f,f.moved=!1}return u}function $d(n,i,s,r){if(s)for(;i.y>0&&!Dn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Dn(n,i);)i.y--}let d;for(;d=Dn(n,i);)i.y=d.y+d.h;return i}function jd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Dn(s,u);)u.y++}return n}function Ho(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Dn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const b=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let x=qr(n);f&&(x=x.reverse());const _=Wr(x,i);if(u&&_.length)return i.x=b,i.y=g,i.moved=!1,n;for(let V=0,R=_.length;V<R;V++){const Z=_[V];Z.moved||i.y>Z.y&&i.y-Z.y>Z.h/4||(Z.static?n=qo(n,Z,i,d):n=qo(n,i,Z,d))}return n}function qo(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Dn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function Kd(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Ud(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function qd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const b=n[d];for(let g=0;g<s.length;g++)if(typeof b[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Gd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Go(n){return Xd(n)}function Xd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Xo(n,i,s,r){return Yd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Yd(n){return typeof n=="number"&&!Number.isNaN(n)}function Jd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const b=s[d];i>n[b]&&(r=b)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Zd(n,i,s,r,d,u,b){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),x=f.slice(f.indexOf(r));for(let _=0,V=x.length;_<V;_++){const R=x[_];if(i[R]){g=i[R];break}}return g=uo(g||[]),cn(jd(g,{cols:u}),b)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let Qd="auto";function ep(){return typeof document<"u"}function Yo(){return ep()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Qd}var kn={exports:{}},tp=kn.exports,Jo;function ap(){return Jo||(Jo=1,function(n,i){(function(s,r){n.exports=r()})(tp,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function b(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,ke(l.key),l)}}function g(a,t,o){return t&&b(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=ke(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function x(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&V(a,t)}function _(a){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(a)}function V(a,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},V(a,t)}function R(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Z(a){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,l=_(a);if(t){var c=_(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(p)}(this,o)}}function O(){return O=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=_(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},O.apply(this,arguments)}function ke(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var Y=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,ie=void 0;function D(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),ie=a}function $(a){return Y(a)?a:(a.ownerDocument||a).defaultView||ie.window}typeof window<"u"&&window&&D(window);var y=function(a){return!!a&&d(a)==="object"},B=function(a){return typeof a=="function"},E={window:function(a){return a===ie||Y(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:B,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=$(a)||ie;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&B(a.splice)}};function ye(a){var t=a.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 Xe(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var it={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=it.draggable,t.map.drag=it,t.methodDict.drag="draggable",l.actions.drag=it.defaults},listeners:{"interactions:before-action-move":ye,"interactions:action-resume":ye,"interactions:action-move":Xe,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return E.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):E.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:ye,move:Xe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Ne=it,$e={init:function(a){var t=a;$e.document=t.document,$e.DocumentFragment=t.DocumentFragment||_e,$e.SVGElement=t.SVGElement||_e,$e.SVGSVGElement=t.SVGSVGElement||_e,$e.SVGElementInstance=t.SVGElementInstance||_e,$e.Element=t.Element||_e,$e.HTMLElement=t.HTMLElement||$e.Element,$e.Event=t.Event,$e.Touch=t.Touch||_e,$e.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 _e(){}var A=$e,te={init:function(a){var t=A.Element,o=a.navigator||{};te.supportsTouch="ontouchstart"in a||E.func(a.DocumentTouch)&&A.document instanceof a.DocumentTouch,te.supportsPointerEvent=o.pointerEnabled!==!1&&!!A.PointerEvent,te.isIOS=/iP(hone|od|ad)/.test(o.platform),te.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),te.isIe9=/MSIE 9/.test(o.userAgent),te.isOperaMobile=o.appName==="Opera"&&te.supportsTouch&&/Presto/.test(o.userAgent),te.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",te.pEventTypes=te.supportsPointerEvent?A.PointerEvent===a.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,te.wheelEvent=A.document&&"onmousewheel"in A.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ce=te;function ge(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Ye(a,t){for(;E.element(a);){if(ee(a,t))return a;a=nt(a)}return null}function nt(a){var t=a.parentNode;if(E.docFrag(t)){for(;(t=t.host)&&E.docFrag(t););return t}return t}function ee(a,t){return ie!==K&&(t=t.replace(/\/deep\//g," ")),a[ce.prefixedMatchesSelector](t)}var z=function(a){return a.parentNode||a.host};function be(a,t){for(var o,l=[],c=a;(o=z(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function xe(a,t,o){for(;E.element(a);){if(ee(a,t))return!0;if((a=nt(a))===o)return ee(a,t)}return!1}function Fe(a){return a.correspondingUseElement||a}function Oe(a){var t=a instanceof A.SVGElement?a.getBoundingClientRect():a.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 Ze(a){var t,o=Oe(a);if(!ce.isIOS7&&o){var l={x:(t=(t=$(a))||ie).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function qe(a){for(var t=[];a;)t.push(a),a=nt(a);return t}function me(a){return!!E.string(a)&&(A.document.querySelector(a),!0)}function F(a,t){for(var o in t)a[o]=t[o];return a}function J(a,t,o){return a==="parent"?nt(o):a==="self"?t.getRect(o):Ye(o,a)}function fe(a,t,o,l){var c=a;return E.string(c)?c=J(c,t,o):E.func(c)&&(c=c.apply(void 0,l)),E.element(c)&&(c=Ze(c)),c}function pe(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function Q(a){return!a||"x"in a&&"y"in a||((a=F({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function re(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function ae(a,t,o){var l=o&&a.options[o];return pe(fe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function se(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},E.string(a)&&a.search(" ")!==-1&&(a=Me(a)),E.array(a))return a.forEach(function(T){return se(T,t,o,l)}),l;if(E.object(a)&&(t=a,a=""),E.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(E.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];se(a,m,o,l)}else if(E.object(t))for(var k in t)se(Me(k).map(function(T){return"".concat(a).concat(T)}),t[k],o,l);return l}function Me(a){return a.trim().split(/ +/)}var ot=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function C(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function W(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function w(a){return a instanceof A.Event||a instanceof A.Touch}function S(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function G(a,t){return t=t||{x:0,y:0},ce.isOperaMobile&&w(a)?(S("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):S("page",a,t),t}function L(a){return E.number(a.pointerId)?a.pointerId:a.identifier}function de(a,t,o){var l=t.length>1?P(t):t[0];G(l,a.page),function(c,p){p=p||{},ce.isOperaMobile&&w(c)?S("screen",c,p):S("client",c,p)}(l,a.client),a.timeStamp=o}function H(a){var t=[];return E.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Ee(a){if(!a.length)return null;var t=H(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function oe(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return ot(p,m)}function X(a,t){var o=t+"X",l=t+"Y",c=H(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function ne(a){return E.string(a.pointerType)?a.pointerType:E.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof A.Touch?"touch":"mouse"}function q(a){var t=E.func(a.composedPath)?a.composedPath():a.path;return[Fe(t?t[0]:a.target),Fe(a.currentTarget)]}var ve=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(ve.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var he=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},we=function(a){return he([],a)},j=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},De=function(a,t){return a[j(a,t)]},ue=function(a){x(o,a);var t=Z(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var k=p==="dragleave"?l.prev:l.cur,T=k.element,U=k.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=U,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=j(p,function(T){var U=T.dropzone,N=T.element;return U===l.dropzone&&N===l.target});c.activeDrops.splice(m,1);var k=new o(c,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(ve);function Ae(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Qe(a,t){for(var o=function(p,m){for(var k=[],T=0,U=p.interactables.list;T<U.length;T++){var N=U[T];if(N.options.drop.enabled){var le=N.options.drop.accept;if(!(E.element(le)&&le!==m||E.string(le)&&!ee(m,le)||E.func(le)&&!le({dropzone:N,draggableElement:m})))for(var Ce=0,Ue=N.getAllElements();Ce<Ue.length;Ce++){var Pe=Ue[Ce];Pe!==m&&k.push({dropzone:N,element:Pe,rect:N.getRect(Pe)})}}}return k}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function We(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],k=0,T=l.activeDrops;k<T.length;k++){var U=T[k],N=U.dropzone,le=U.element,Ce=U.rect,Ue=N.dropCheck(t,o,c,p,le,Ce);m.push(Ue?le:null)}var Pe=function(Je){for(var ct,lt,ht,Dt=[],It=0;It<Je.length;It++){var bt=Je[It],Ct=Je[ct];if(bt&&It!==ct)if(Ct){var ta=z(bt),jt=z(Ct);if(ta!==bt.ownerDocument)if(jt!==bt.ownerDocument)if(ta!==jt){Dt=Dt.length?Dt:be(Ct);var da=void 0;if(Ct instanceof A.HTMLElement&&bt instanceof A.SVGElement&&!(bt instanceof A.SVGSVGElement)){if(bt===jt)continue;da=bt.ownerSVGElement}else da=bt;for(var ya=be(da,Ct.ownerDocument),Sa=0;ya[Sa]&&ya[Sa]===Dt[Sa];)Sa++;var Nn=[ya[Sa-1],ya[Sa],Dt[Sa]];if(Nn[0])for(var mn=Nn[0].lastChild;mn;){if(mn===Nn[1]){ct=It,Dt=ya;break}if(mn===Nn[2])break;mn=mn.previousSibling}}else ht=Ct,(parseInt($(lt=bt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt($(ht).getComputedStyle(ht).zIndex,10)||0)&&(ct=It);else ct=It}else ct=It}return ct}(m);return l.activeDrops[Pe]||null}function rt(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new ue(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new ue(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new ue(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new ue(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new ue(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new ue(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function Re(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&Ae(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function gt(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=Qe(t,o.element));var m=l,k=We(o,m,c);p.rejected=p.rejected&&!!k&&k.dropzone===p.cur.dropzone&&k.element===p.cur.element,p.cur.dropzone=k&&k.dropzone,p.cur.element=k&&k.element,p.events=rt(o,0,m)}}var tt={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(Ne),l.prototype.dropzone=function(p){return function(m,k){if(E.object(k)){if(m.options.drop.enabled=k.enabled!==!1,k.listeners){var T=se(k.listeners),U=Object.keys(T).reduce(function(le,Ce){return le[/^(enter|leave)/.test(Ce)?"drag".concat(Ce):/^(activate|deactivate|move)/.test(Ce)?"drop".concat(Ce):Ce]=T[Ce],le},{}),N=m.options.drop.listeners;N&&m.off(N),m.on(U),m.options.drop.listeners=U}return E.func(k.ondrop)&&m.on("drop",k.ondrop),E.func(k.ondropactivate)&&m.on("dropactivate",k.ondropactivate),E.func(k.ondropdeactivate)&&m.on("dropdeactivate",k.ondropdeactivate),E.func(k.ondragenter)&&m.on("dragenter",k.ondragenter),E.func(k.ondragleave)&&m.on("dragleave",k.ondragleave),E.func(k.ondropmove)&&m.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?m.options.drop.overlap=k.overlap:E.number(k.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(m.options.drop.accept=k.accept),"checker"in k&&(m.options.drop.checker=k.checker),m}return E.bool(k)?(m.options.drop.enabled=k,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,k,T,U,N){return function(le,Ce,Ue,Pe,Je,ct,lt){var ht=!1;if(!(lt=lt||le.getRect(ct)))return!!le.options.drop.checker&&le.options.drop.checker(Ce,Ue,ht,le,ct,Pe,Je);var Dt=le.options.drop.overlap;if(Dt==="pointer"){var It=ae(Pe,Je,"drag"),bt=G(Ce);bt.x+=It.x,bt.y+=It.y;var Ct=bt.x>lt.left&&bt.x<lt.right,ta=bt.y>lt.top&&bt.y<lt.bottom;ht=Ct&&ta}var jt=Pe.getRect(Je);if(jt&&Dt==="center"){var da=jt.left+jt.width/2,ya=jt.top+jt.height/2;ht=da>=lt.left&&da<=lt.right&&ya>=lt.top&&ya<=lt.bottom}return jt&&E.number(Dt)&&(ht=Math.max(0,Math.min(lt.right,jt.right)-Math.max(lt.left,jt.left))*Math.max(0,Math.min(lt.bottom,jt.bottom)-Math.max(lt.top,jt.top))/(jt.width*jt.height)>=Dt),le.options.drop.checker&&(ht=le.options.drop.checker(Ce,Ue,ht,le,ct,Pe,Je)),ht}(this,p,m,k,T,U,N)},o.dynamicDrop=function(p){return E.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},F(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=tt.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.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(a,t){var o=a.interaction,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=Qe(t,o.element),c.events=rt(o,0,l),c.events.activate&&(Ae(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":gt,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;Re(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;gt(a,t),Re(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.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:Qe,getDrop:We,getDropEvents:rt,fireDropEvents:Re,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},et=tt;function Be(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(U){return U.pointer}),p=l==="start",m=l==="end",k=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=oe(c,k),o.box=Ee(c),o.scale=1,o.ds=0,o.angle=X(c,k),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=oe(c,k),o.box=Ee(c),o.scale=o.distance/t.gesture.startDistance,o.angle=X(c,k),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,E.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(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return E.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):E.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=He,t.methodDict.gesture="gesturable",l.actions.gesture=He.defaults},listeners:{"interactions:action-start":Be,"interactions:action-move":Be,"interactions:action-end":Be,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},xt=He;function ze(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var k=E.number(p.width)?p.width:p.right-p.left,T=E.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?k:T)/2)),k<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var U=k>=0?p.left:p.right;return o.x<U+m}if(a==="top"){var N=T>=0?p.top:p.bottom;return o.y<N+m}if(a==="right")return o.x>(k>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!E.element(l)&&(E.element(t)?t===l:xe(l,t,c))}function Le(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var je,Ke,M={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;M.cursors=function(p){return p.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),M.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,k,T){return E.object(k)?(m.options.resize.enabled=k.enabled!==!1,m.setPerAction("resize",k),m.setOnEvents("resize",k),E.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?m.options.resize.axis=k.axis:k.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),E.bool(k.preserveAspectRatio)?m.options.resize.preserveAspectRatio=k.preserveAspectRatio:E.bool(k.square)&&(m.options.resize.square=k.square),m):E.bool(k)?(m.options.resize.enabled=k,m):m.options.resize}(this,p,a)},t.map.resize=M,t.methodDict.resize="resizable",c.actions.resize=M.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:F({},p),corrected:F({},p),previous:F({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),Le(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",k=l.rect,T=l._rects,U=T.start,N=T.corrected,le=T.delta,Ce=T.previous;if(F(Ce,N),m){if(F(N,k),p==="reposition"){if(N.top>N.bottom){var Ue=N.top;N.top=N.bottom,N.bottom=Ue}if(N.left>N.right){var Pe=N.left;N.left=N.right,N.right=Pe}}}else N.top=Math.min(k.top,U.bottom),N.bottom=Math.max(k.bottom,U.top),N.left=Math.min(k.left,U.right),N.right=Math.max(k.right,U.left);for(var Je in N.width=N.right-N.left,N.height=N.bottom-N.top,N)le[Je]=N[Je]-Ce[Je];c.edges=l.prepared.edges,c.rect=N,c.deltaRect=le}})(a),Le(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=F({},t.coords.cur.page),k=o.options.resize;if(k&&k.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&k.mouseButtons)!=0)){if(E.object(k.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var U in T)T[U]=ze(U,k.edges[U],m,t._latestPointer.eventTarget,l,c,k.margin||M.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var N=k.axis!=="y"&&m.x>c.right-M.defaultMargin,le=k.axis!=="x"&&m.y>c.bottom-M.defaultMargin;(N||le)&&(a.action={name:"resize",axes:(N?"x":"")+(le?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,l=a.name,c=M.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",k=0,T=["top","bottom","left","right"];k<T.length;k++){var U=T[k];t[U]&&(m+=U)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Te=M,at={id:"actions",install:function(a){a.usePlugin(xt),a.usePlugin(Te),a.usePlugin(Ne),a.usePlugin(et)}},Ve=0,Ge={request:function(a){return je(a)},cancel:function(a){return Ke(a)},init:function(a){if(je=a.requestAnimationFrame,Ke=a.cancelAnimationFrame,!je)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];je=a["".concat(l,"RequestAnimationFrame")],Ke=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}je=je&&je.bind(a),Ke=Ke&&Ke.bind(a),je||(je=function(c){var p=Date.now(),m=Math.max(0,16-(p-Ve)),k=a.setTimeout(function(){c(p+m)},m);return Ve=p+m,k},Ke=function(c){return clearTimeout(c)})}},Ie={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(a){Ie.isScrolling=!0,Ge.cancel(Ie.i),a.autoScroll=Ie,Ie.interaction=a,Ie.prevTime=Ie.now(),Ie.i=Ge.request(Ie.scroll)},stop:function(){Ie.isScrolling=!1,Ie.interaction&&(Ie.interaction.autoScroll=null),Ge.cancel(Ie.i)},scroll:function(){var a=Ie.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=dt(c.container,t,o),m=Ie.now(),k=(m-Ie.prevTime)/1e3,T=c.speed*k;if(T>=1){var U={x:Ie.x*T,y:Ie.y*T};if(U.x||U.y){var N=ut(p);E.window(p)?p.scrollBy(U.x,U.y):p&&(p.scrollLeft+=U.x,p.scrollTop+=U.y);var le=ut(p),Ce={x:le.x-N.x,y:le.y-N.y};(Ce.x||Ce.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:Ce,interaction:a,container:p})}Ie.prevTime=m}Ie.isScrolling&&(Ge.cancel(Ie.i),Ie.i=Ge.request(Ie.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&Ie.check(t.interactable,t.prepared.name))if(t.simulation)Ie.x=Ie.y=0;else{var l,c,p,m,k=t.interactable,T=t.element,U=t.prepared.name,N=k.options[U].autoScroll,le=dt(N.container,k,T);if(E.window(le))m=o.clientX<Ie.margin,l=o.clientY<Ie.margin,c=o.clientX>le.innerWidth-Ie.margin,p=o.clientY>le.innerHeight-Ie.margin;else{var Ce=Oe(le);m=o.clientX<Ce.left+Ie.margin,l=o.clientY<Ce.top+Ie.margin,c=o.clientX>Ce.right-Ie.margin,p=o.clientY>Ce.bottom-Ie.margin}Ie.x=c?1:m?-1:0,Ie.y=p?1:l?-1:0,Ie.isScrolling||(Ie.margin=N.margin,Ie.speed=N.speed,Ie.start(t))}}};function dt(a,t,o){return(E.string(a)?J(a,t,o):a)||$(o)}function ut(a){return E.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var st={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=Ie,Ie.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Ie.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,Ie.stop(),Ie.interaction&&(Ie.interaction=null)},"interactions:stop":Ie.stop,"interactions:action-move":function(a){return Ie.onInteractionMove(a)}}},ft=st;function yt(a,t){var o=!1;return function(){return o||(ie.console.warn(t),o=!0),a.apply(this,arguments)}}function Nt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Rt(a){return E.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Vt(a){return E.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var _t={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(k,T,U,N,le){var Ce=k.getRect(N),Ue=T.buttons||{0:1,1:4,3:8,4:16}[T.button],Pe={action:null,interactable:k,interaction:U,element:N,rect:Ce,buttons:Ue};return le.fire("auto-start:check",Pe),Pe.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=yt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=yt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Vt,t.prototype.styleCursor=Rt}};function Lt(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Ot(t,o,a,c)?a:null}function kt(a,t,o,l,c,p,m){for(var k=0,T=l.length;k<T;k++){var U=l[k],N=c[k],le=U.getAction(t,o,a,N);if(le){var Ce=Lt(le,U,N,p,m);if(Ce)return{action:Ce,interactable:U,element:N}}}return{action:null,interactable:null,element:null}}function Ht(a,t,o,l,c){var p=[],m=[],k=l;function T(N){p.push(N),m.push(k)}for(;E.element(k);){p=[],m=[],c.interactables.forEachMatch(k,T);var U=kt(a,t,o,p,m,l,c);if(U.action&&!U.interactable.options[U.action.name].manualStart)return U;k=nt(k)}return{action:null,interactable:null,element:null}}function Yt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,Nt(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Va(a,o),o.fire("autoStart:prepared",{interaction:a})}function Ot(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,k=l.autoStart.maxInteractions,T=0,U=0,N=0;if(!(p&&m&&k))return!1;for(var le=0,Ce=l.interactions.list;le<Ce.length;le++){var Ue=Ce[le],Pe=Ue.prepared.name;if(Ue.interacting()&&(++T>=k||Ue.interactable===a&&((U+=Pe===o.name?1:0)>=p||Ue.element===t&&(N++,Pe===o.name&&N>=m))))return!1}return k>0}function Aa(a,t){return E.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function wa(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Va(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=E.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}wa(a.element,p||"",t)}else t.autoStart.cursorElement&&wa(t.autoStart.cursorElement,"",t)}var ja={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(_t),o.base.actionChecker=null,o.base.styleCursor=!0,F(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return Aa(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Ot,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||Yt(o,Ht(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||Yt(c,Ht(c,p,m,k,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Ot(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Va(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&wa(o.element,"",t)}},maxInteractions:Aa,withinInteractionLimit:Ot,validateAction:Lt},Da=ja,Ka={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),k=Math.abs(p),T=o.interactable.options.drag,U=T.startAxis,N=m>k?"x":m<k?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?N[0]:T.lockAxis,N!=="xy"&&U!=="xy"&&U!==N){o.prepared.name=null;for(var le=l,Ce=function(Pe){if(Pe!==o.interactable){var Je=o.interactable.options.drag;if(!Je.manualStart&&Pe.testIgnoreAllow(Je,le,l)){var ct=Pe.getAction(o.downPointer,o.downEvent,o,le);if(ct&&ct.name==="drag"&&function(lt,ht){if(!ht)return!1;var Dt=ht.options.drag.startAxis;return lt==="xy"||Dt==="xy"||Dt===lt}(N,Pe)&&Da.validateAction(ct,Pe,le,l,t))return Pe}}};E.element(le);){var Ue=t.interactables.forEachMatch(le,Ce);if(Ue){o.prepared.name="drag",o.interactable=Ue,o.element=le;break}le=nt(le)}}}}}};function Ca(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var Ua={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(Da),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=Ca(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;Ca(t)>0&&(t.prepared.name=null)}},getHoldDuration:Ca},Wa=Ua,Ha={id:"auto-start",install:function(a){a.usePlugin(Da),a.usePlugin(Wa),a.usePlugin(Ka)}},qa=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):E.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Ga(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Oa={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=qa,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var k=$(p.target).document,T=c.getDocOptions(k);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||E.element(p.target)&&ee(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||ge(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Ga,a},{})};function ba(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function fa(a){var t={};for(var o in a){var l=a[o];E.plainObject(l)?t[o]=fa(l):E.array(l)?t[o]=we(l):t[o]=l}return t}var _a=function(){function a(t){u(this,a),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=ka(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,k=function(U){var N=U.interactable.options[U.prepared.name],le=N.modifiers;return le&&le.length?le:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ce){var Ue=N[Ce];return Ue&&Ue.enabled&&{options:Ue,methods:Ue._methods}}).filter(function(Ce){return!!Ce})}(m);this.prepareStates(k),this.startEdges=F({},m.edges),this.edges=F({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ka(),this.startAll(T),this.result=this.setAll(T)}},{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,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=F({},t.pageCoords),t.rect=F({},p),t.edges=F({},m);for(var k=c?this.states.slice(c):this.states,T=ka(t.coords,t.rect),U=0;U<k.length;U++){var N,le=k[U],Ce=le.options,Ue=F({},t.coords),Pe=null;(N=le.methods)!=null&&N.set&&this.shouldDo(Ce,l,o)&&(t.state=le,Pe=le.methods.set(t),re(t.edges,t.rect,{x:t.coords.x-Ue.x,y:t.coords.y-Ue.y})),T.eventProps.push(Pe)}F(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var Je=this.result.coords,ct=this.result.rect;if(Je&&ct){var lt=T.rect.left!==ct.left||T.rect.right!==ct.right||T.rect.top!==ct.top||T.rect.bottom!==ct.bottom;T.changed=lt||Je.x!==T.coords.x||Je.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,k=this.startDelta,T=m.delta;l==="start"&&F(this.startDelta,m.delta);for(var U=0,N=[[p,k],[c,T]];U<N.length;U++){var le=N[U],Ce=le[0],Ue=le[1];Ce.page.x+=Ue.x,Ce.page.y+=Ue.y,Ce.client.x+=Ue.x,Ce.client.y+=Ue.y}var Pe=this.result.rectDelta,Je=t.rect||o.rect;Je.left+=Pe.left,Je.right+=Pe.right,Je.top+=Pe.top,Je.bottom+=Pe.bottom,Je.width=Je.right-Je.left,Je.height=Je.bottom-Je.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var k=o.coords.cur.page,T={x:t.modifiedCoords.x-k.x,y:t.modifiedCoords.y-k.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var k=c[m];t.state=k;var T=k.options,U=k.methods,N=U.beforeEnd&&U.beforeEnd(t);if(N)return this.endResult=N,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=F({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,k=p.result,T=k.delta,U=k.rectDelta,N=0,le=[[l.start,m],[l.cur,T]];N<le.length;N++){var Ce=le[N],Ue=Ce[0],Pe=Ce[1];Ue.page.x-=Pe.x,Ue.page.y-=Pe.y,Ue.client.x-=Pe.x,Ue.client.y-=Pe.y}c.left-=U.left,c.right-=U.right,c.top-=U.top,c.bottom-=U.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return fa(o)}),this.result=ka(F({},t.result.coords),F({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ka(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var k in m.enabled=m.enabled!==!1,o)k in m||(m[k]=o[k]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function ga(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new _a(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":ga,"interactions:action-move":ga,"interactions:action-end":ga,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},wt=Xa,Zt={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},mt=function(a){x(o,a);var t=Z(o);function o(l,c,p,m,k,T,U){var N;u(this,o),(N=t.call(this,l)).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,k=k||l.element;var le=l.interactable,Ce=(le&&le.options||Zt).deltaSource,Ue=ae(le,k,p),Pe=m==="start",Je=m==="end",ct=Pe?R(N):l.prevEvent,lt=Pe?l.coords.start:Je?{page:ct.page,client:ct.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return N.page=F({},lt.page),N.client=F({},lt.client),N.rect=F({},l.rect),N.timeStamp=lt.timeStamp,Je||(N.page.x-=Ue.x,N.page.y-=Ue.y,N.client.x-=Ue.x,N.client.y-=Ue.y),N.ctrlKey=c.ctrlKey,N.altKey=c.altKey,N.shiftKey=c.shiftKey,N.metaKey=c.metaKey,N.button=c.button,N.buttons=c.buttons,N.target=k,N.currentTarget=k,N.preEnd=T,N.type=U||p+(m||""),N.interactable=le,N.t0=Pe?l.pointers[l.pointers.length-1].downTime:ct.t0,N.x0=l.coords.start.page.x-Ue.x,N.y0=l.coords.start.page.y-Ue.y,N.clientX0=l.coords.start.client.x-Ue.x,N.clientY0=l.coords.start.client.y-Ue.y,N.delta=Pe||Je?{x:0,y:0}:{x:N[Ce].x-ct[Ce].x,y:N[Ce].y-ct[Ce].y},N.dt=l.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=F({},l.coords.velocity[Ce]),N.speed=ot(N.velocity.x,N.velocity.y),N.swipe=Je||m==="inertiastart"?N.getSwipe():null,N}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(ve);Object.defineProperties(mt.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var fn=g(function a(t,o,l,c,p){u(this,a),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=l,this.downTime=c,this.downTarget=p}),Mt=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),ca=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ea=0,oa=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),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=yt(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=Ea++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(N){Object.defineProperty(o._proxy,N,{get:function(){return p[N]}})};for(var k in Mt)m(k);var T=function(N){Object.defineProperty(o._proxy,N,{value:function(){return p[N].apply(p,arguments)}})};for(var U in ca)T(U);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(Nt(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?F({},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,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=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&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ot(c,p)>this.pointerMoveTolerance);var k,T,U,N=this.getPointerIndex(t),le={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(k=this.coords.velocity,T=this.coords.delta,U=Math.max(T.timeStamp/1e3,.001),k.page.x=T.page.x/U,k.page.y=T.page.y/U,k.client.x=T.client.x/U,k.client.y=T.client.y/U,k.timeStamp=U),this._scopeFire("interactions:move",le),m||this.simulation||(this.interacting()&&(le.type=null,this.move(le)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||W(this.coords.delta),(t=F({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,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,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=L(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:j(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,k,T=L(t),U=this.getPointerIndex(t),N=this.pointers[U];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new fn(T,t,o,null,null),U=this.pointers.length,this.pointers.push(N)),de(this.coords.cur,this.pointers.map(function(le){return le.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,k=this.coords.cur,p.page.x=k.page.x-m.page.x,p.page.y=k.page.y-m.page.y,p.client.x=k.client.x-m.client.x,p.client.y=k.client.y-m.client.y,p.timeStamp=k.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=l,C(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:N,pointerIndex:U,interaction:this}),U}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new mt(this,t,this.prepared.name,o,this.element,l,c)}},{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,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(re(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var k=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function ma(a){Qt(a.interaction)}function Qt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return Tt(a.coords.cur,t),Tt(a.coords.delta,t),re(a.edges,a.rect,t),t.x=0,t.y=0,!0}function Ma(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Tt(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}ca.offsetBy="";var qt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=Ma},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(Tt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":ma,"interactions:before-action-move":ma,"interactions:before-action-end":function(a){var t=a.interaction;if(Qt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},ra=qt,Et=function(){function a(t){u(this,a),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(a,[{key:"start",value:function(t){var o=this.interaction,l=At(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=ot(c.x,c.y),m=this.modification||(this.modification=new _a(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.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,l=At(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(k),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.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=Ge.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,k,T=this,U=this.interaction,N=At(U).resistance,le=(U._now()-this.t0)/1e3;if(le<this.te){var Ce,Ue=1-(Math.exp(-N*le)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,Ce={x:Wt(k=Ue,t,l,p),y:Wt(k,o,c,m)}):Ce={x:this.targetOffset.x*Ue,y:this.targetOffset.y*Ue};var Pe={x:Ce.x-this.currentOffset.x,y:Ce.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,U.offsetBy(Pe),U.move(),this.onNextFrame(function(){return T.inertiaTick()})}else U.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,l=o._now()-this.t0,c=At(o).smoothEndDuration;if(l<c){var p={x:Ft(l,0,this.targetOffset.x,c),y:Ft(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),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,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ge.cancel(this.timeout)}}]),a}();function At(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ut={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(ra),a.usePlugin(wt),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;E.element(c);){if(c===t.element){l.resume(a);break}c=nt(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ga,"interactions:action-inertiastart":ga,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Wt(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Ft(a,t,o,l){return-o*(a/=l)*(a-2)+t}var ua=Ut;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var za=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=F({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=se(t,o);for(t in l)this.types[t]=he(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=se(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var k=m[p],T=c.indexOf(k);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ya=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,C(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function La(a){return E.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Ja(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var En={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:k,addDelegate:function(N,le,Ce,Ue,Pe){var Je=La(Pe);if(!l[Ce]){l[Ce]=[];for(var ct=0;ct<c.length;ct++){var lt=c[ct];m(lt,Ce,T),m(lt,Ce,U,!0)}}var ht=l[Ce],Dt=De(ht,function(It){return It.selector===N&&It.context===le});Dt||(Dt={selector:N,context:le,listeners:[]},ht.push(Dt)),Dt.listeners.push({func:Ue,options:Je})},removeDelegate:function(N,le,Ce,Ue,Pe){var Je,ct=La(Pe),lt=l[Ce],ht=!1;if(lt)for(Je=lt.length-1;Je>=0;Je--){var Dt=lt[Je];if(Dt.selector===N&&Dt.context===le){for(var It=Dt.listeners,bt=It.length-1;bt>=0;bt--){var Ct=It[bt];if(Ct.func===Ue&&Ja(Ct.options,ct)){It.splice(bt,1),It.length||(lt.splice(Je,1),k(le,Ce,T),k(le,Ce,U,!0)),ht=!0;break}}if(ht)break}}},delegateListener:T,delegateUseCapture:U,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(N,le,Ce,Ue){if(N.addEventListener){var Pe=La(Ue),Je=De(o,function(ct){return ct.eventTarget===N});Je||(Je={eventTarget:N,events:{}},o.push(Je)),Je.events[le]||(Je.events[le]=[]),De(Je.events[le],function(ct){return ct.func===Ce&&Ja(ct.options,Pe)})||(N.addEventListener(le,Ce,p.supportsOptions?Pe:Pe.capture),Je.events[le].push({func:Ce,options:Pe}))}}function k(N,le,Ce,Ue){if(N.addEventListener&&N.removeEventListener){var Pe=j(o,function(ta){return ta.eventTarget===N}),Je=o[Pe];if(Je&&Je.events)if(le!=="all"){var ct=!1,lt=Je.events[le];if(lt){if(Ce==="all"){for(var ht=lt.length-1;ht>=0;ht--){var Dt=lt[ht];k(N,le,Dt.func,Dt.options)}return}for(var It=La(Ue),bt=0;bt<lt.length;bt++){var Ct=lt[bt];if(Ct.func===Ce&&Ja(Ct.options,It)){N.removeEventListener(le,Ce,p.supportsOptions?It:It.capture),lt.splice(bt,1),lt.length===0&&(delete Je.events[le],ct=!0);break}}}ct&&!Object.keys(Je.events).length&&o.splice(Pe,1)}else for(le in Je.events)Je.events.hasOwnProperty(le)&&k(N,le,"all")}}function T(N,le){for(var Ce=La(le),Ue=new Ya(N),Pe=l[N.type],Je=q(N)[0],ct=Je;E.element(ct);){for(var lt=0;lt<Pe.length;lt++){var ht=Pe[lt],Dt=ht.selector,It=ht.context;if(ee(ct,Dt)&&ge(It,Je)&&ge(It,ct)){var bt=ht.listeners;Ue.currentTarget=ct;for(var Ct=0;Ct<bt.length;Ct++){var ta=bt[Ct];Ja(ta.options,Ce)&&ta.func(Ue)}}}ct=nt(ct)}}function U(N){return T(N,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=rn.methodOrder;t<o.length;t++){var l=o[t],c=rn[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var k=m[p],T=l;if(k.simulation&&k.simulation.allowResume&&k.pointerType===t)for(;T;){if(T===k.element)return k;T=nt(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,k=p.interactions.list;m<k.length;m++){var T=k[m];if(T.pointerType===l){if(T.simulation&&!vn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var U=0,N=p.interactions.list;U<N.length;U++){var le=N[U];if(!(le.pointerType!==l||/down/i.test(c)&&le.simulation))return le}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(vn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function vn(a,t){return a.pointers.some(function(o){return o.id===t})}var ln=rn,va=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Za(a,t){return function(o){var l=t.interactions.list,c=ne(o),p=q(o),m=p[0],k=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var U=0,N=o.changedTouches;U<N.length;U++){var le=N[U],Ce={pointer:le,pointerId:L(le),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:k,scope:t},Ue=sn(Ce);T.push([Ce.pointer,Ce.eventTarget,Ce.curEventTarget,Ue])}}else{var Pe=!1;if(!ce.supportsPointerEvent&&/mouse/.test(o.type)){for(var Je=0;Je<l.length&&!Pe;Je++)Pe=l[Je].pointerType!=="mouse"&&l[Je].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var ct={pointer:o,pointerId:L(o),pointerType:c,eventType:o.type,curEventTarget:k,eventTarget:m,scope:t},lt=sn(ct);T.push([ct.pointer,ct.eventTarget,ct.curEventTarget,lt])}}for(var ht=0;ht<T.length;ht++){var Dt=T[ht],It=Dt[0],bt=Dt[1],Ct=Dt[2];Dt[3][a](It,o,bt,Ct)}}}function sn(a){var t=a.pointerType,o=a.scope,l={interaction:ln.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,k=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)k(o,T,m.delegateListener),k(o,T,m.delegateUseCapture,!0);for(var U=c&&c.events,N=0;N<p.length;N++){var le=p[N];k(o,le.type,le.listener,U)}}var Sn={id:"core/interactions",install:function(a){for(var t={},o=0;o<va.length;o++){var l=va[o];t[l]=Za(l,a)}var c,p=ce.pEventTypes;function m(){for(var k=0,T=a.interactions.list;k<T.length;k++){var U=T[k];if(U.pointerIsDown&&U.pointerType==="touch"&&!U._interacting)for(var N=function(){var Ue=Ce[le];a.documents.some(function(Pe){return ge(Pe.doc,Ue.downTarget)})||U.removePointer(Ue.pointer,Ue.event)},le=0,Ce=U.pointers;le<Ce.length;le++)N()}}(c=A.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(k){for(var T=0,U=a.interactions.list;T<U.length;T++)U[T].documentBlur(k)}}),a.prevTouchTime=0,a.Interaction=function(k){x(U,k);var T=Z(U);function U(){return u(this,U),T.apply(this,arguments)}return g(U,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(N){a.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return a.now()}}]),U}(oa),a.interactions={list:[],new:function(k){k.scopeFire=function(U,N){return a.fire(U,N)};var T=new a.Interaction(k);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Oa)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Za,methodNames:va},Fa=Sn,Ra=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Ra||{}),ll=function(){function a(t,o,l,c){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new za,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||l,this._win=$(me(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return E.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),E.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),E.func(o.onend)&&this.on("".concat(t,"end"),o.onend),E.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,k=function(T){return(m==null||m(T))&&ba(T,p._actions)};(E.array(o)||E.object(o))&&this._onOff(Ra.Off,t,o,void 0,k),(E.array(l)||E.object(l))&&this._onOff(Ra.On,t,l,void 0,k)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],k=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,k),E.array(k)?m[p]=we(k):E.plainObject(k)?(m[p]=F(m[p]||{},fa(k)),E.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=k.enabled!==!1)):E.bool(k)&&E.object(l.perAction[p])?m[p].enabled=k:m[p]=k}}},{key:"getRect",value:function(t){return t=t||(E.element(this.target)?this.target:null),E.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ze(t)}},{key:"rectChecker",value:function(t){var o=this;return E.func(t)?(this.getRect=function(l){var c=F({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(me(o)||E.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][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 E.string(t)?Array.from(this._context.querySelectorAll(t)):E.func(t)&&t.getAllElements?t.getAllElements():E.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ge(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!E.element(l)&&(E.string(t)?xe(l,t,o):!!E.element(t)&&ge(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!E.element(l))&&(E.string(t)?xe(l,t,o):!!E.element(t)&&ge(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){E.object(o)&&!E.array(o)&&(c=l,l=null);var m=se(o,l,p);for(var k in m){k==="wheel"&&(k=ce.wheelEvent);for(var T=0,U=m[k];T<U.length;T++){var N=U[T];ba(k,this._actions)?this.events[t===Ra.On?"on":"off"](k,N):E.string(this.target)?this._scopeEvents[t===Ra.On?"addDelegate":"removeDelegate"](this.target,this._context,k,N,c):this._scopeEvents[t===Ra.On?"add":"remove"](this.target,k,N,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(Ra.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(Ra.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in E.object(t)||(t={}),this.options=fa(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,F(F({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?E.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,k=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=k.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,k[T][0],k[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=E.string(p)?o.selectorMap[p]:p[o.scope.id],k=j(m,function(T){return T===c});m.splice(k,1)}})}return g(a,[{key:"new",value:function(t,o){o=F(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),E.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=E.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return De(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((E.string(p.target)?E.element(t)&&ee(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ce,this.defaults=fa(Zt),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,k){var T=l.interactables.getExisting(m,k);return T||((T=l.interactables.new(m,k)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Ee,c.getTouchDistance=oe,c.getTouchAngle=X,c.getElementRect=Ze,c.getElementClientRect=Oe,c.matchesSelector=ee,c.closest=Ye,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=yt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,U=p;T<U.length;T++){var N=U[T];this.on(N,m,k)}return this}if(E.object(p)){for(var le in p)this.on(le,p[le],m);return this}return ba(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:k}),this},"The interact.on() method is being deprecated"),c.off=yt(function(p,m,k){if(E.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),E.array(p)){for(var T=0,U=p;T<U.length;T++){var N=U[T];this.off(N,m,k)}return this}if(E.object(p)){for(var le in p)this.off(le,p[le],m);return this}var Ce;return ba(p,this.scope.actions)?p in this.globalEvents&&(Ce=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(Ce,1):this.scope.events.remove(this.scope.document,p,m,k),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return ce.supportsTouch},c.supportsPointerEvent=function(){return ce.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return E.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=mt,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){x(p,l);var c=Z(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return O(_(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){O(_(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,E.window(l)&&D(l),A.init(l),ce.init(l),Ge.init(l),o.window=l,o.document=l.document,o.usePlugin(Fa),o.usePlugin(En),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 l=0,c=this.listenerMaps.length,p=t.before.reduce(function(k,T){return k[T]=!0,k[xo(T)]=!0,k},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[xo(m)]))break}this.listenerMaps.splice(l,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 l=$(t);o=o?F({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=$(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{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()}}]),a}();function xo(a){return a&&a.replace(/\/.*$/,"")}var wo=new sl,ea=wo.interactStatic,cl=typeof globalThis<"u"?globalThis:window;wo.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,k=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,U=T===void 0?{x:0,y:0}:T,N={range:p,grid:a,x:null,y:null},le=0;le<t.length;le++){var Ce=t[le],Ue=Ce[0],Pe=Ce[1],Je=Math.round((l-U.x)/a[Ue]),ct=Math.round((c-U.y)/a[Pe]);N[Ue]=Math.max(k.left,Math.min(k.right,Je*a[Ue]+U.x)),N[Pe]=Math.max(k.top,Math.min(k.bottom,ct*a[Pe]+U.y))}return N};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=F(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,k=p.enabled,T=t.options,U=T.equalDelta,N=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=F({},c),t.startRect=F({},o),t.ratio=m,t.equalDelta=U;var le=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var Ce=(le.left?1:-1)*(le.top?1:-1);t.edgeSign={x:Ce,y:Ce}}else t.edgeSign={x:le.left?-1:1,y:le.top?-1:1};if(k!==!1&&F(l,le),N!=null&&N.length){var Ue=new _a(a.interaction);Ue.copyFrom(a.interaction.modification),Ue.prepareStates(N),t.subModification=Ue,Ue.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=F({},l),m=t.equalDelta?vl:hl;if(F(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var k=F({},o);re(c,k,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:k,edges:c,pageCoords:l,prevCoords:l,prevRect:k})),U=T.delta;return T.changed&&(m(t,Math.abs(U.x)>Math.abs(U.y),T.coords,T.rect),F(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,k=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*k.y}else{var U=l.height*m;o.x=p.x+(U-c.width)*k.x}}var gl=na(fl,"aspectRatio"),Do=function(){};Do._defaults={};var Tn=Do;function Qa(a,t,o){return E.func(a)?fe(a,t.interactable,t.element,[o.x,o.y,t]):fe(a,t.interactable,t.element)}var In={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,k=m.elementRect,T=F({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&k){var U=Qa(m.restriction,c,p);if(U){var N=U.right-U.left-t.width,le=U.bottom-U.top-t.height;N<0&&(T.left+=N,T.right+=N),le<0&&(T.top+=le,T.bottom+=le)}T.left+=o.left-t.width*k.left,T.top+=o.top-t.height*k.top,T.right+=o.right-t.width*(1-k.right),T.bottom+=o.bottom-t.height*(1-k.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=Qa(c.restriction,o,t);if(m){var k=function(T){return!T||"left"in T&&"top"in T||((T=F({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(m);t.x=Math.max(Math.min(k.right-p.right,t.x),k.left+p.left),t.y=Math.max(Math.min(k.bottom-p.bottom,t.y),k.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=na(In,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var hn={noInner:Co,noOuter:_o,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=pe(Qa(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var k=F({},t),T=Qa(m.inner,l,k)||{},U=Qa(m.outer,l,k)||{};Eo(T,Co),Eo(U,_o),o.top?t.y=Math.min(Math.max(U.top+p.top,k.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(U.bottom+p.bottom,k.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(U.left+p.left,k.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(U.right+p.right,k.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=na(hn,"restrictEdges"),bl=F({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},In.defaults),kl=na({start:In.start,set:In.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=na({start:function(a){return hn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=Q(Qa(p.min,t,a.coords))||xl,k=Q(Qa(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:F({},hn.noInner),outer:F({},hn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-k.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+k.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-k.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+k.width),hn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ao={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,k=a.startOffset,T=m.options,U=T.offsetWithOrigin?function(Ce){var Ue=Ce.interaction.element,Pe=pe(fe(Ce.state.options.origin,null,null,[Ue])),Je=Pe||ae(Ce.interactable,Ue,Ce.interaction.prepared.name);return Je}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=fe(T.offset,l,c,[o]);(t=pe(N)||{x:0,y:0}).x+=U.x,t.y+=U.y}var le=T.relativePoints;m.offsets=p&&le&&le.length?le.map(function(Ce,Ue){return{index:Ue,relativePoint:Ce,x:k.left-p.width*Ce.x+t.x,y:k.top-p.height*Ce.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=ae(t.interactable,t.element,t.prepared.name),k=F({},o),T=[];c.offsetWithOrigin||(k.x-=m.x,k.y-=m.y);for(var U=0,N=p;U<N.length;U++)for(var le=N[U],Ce=k.x-le.x,Ue=k.y-le.y,Pe=0,Je=c.targets.length;Pe<Je;Pe++){var ct=c.targets[Pe],lt=void 0;(lt=E.func(ct)?ct(Ce,Ue,t._proxy,le,Pe):ct)&&T.push({x:(E.number(lt.x)?lt.x:Ce)+le.x,y:(E.number(lt.y)?lt.y:Ue)+le.y,range:E.number(lt.range)?lt.range:c.range,source:ct,index:Pe,offset:le})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Dt=0;Dt<T.length;Dt++){var It=T[Dt],bt=It.range,Ct=It.x-k.x,ta=It.y-k.y,jt=ot(Ct,ta),da=jt<=bt;bt===1/0&&ht.inRange&&ht.range!==1/0&&(da=!1),ht.target&&!(da?ht.inRange&&bt!==1/0?jt/bt<ht.distance/ht.range:bt===1/0&&ht.range!==1/0||jt<ht.distance:!ht.inRange&&jt<ht.distance)||(ht.target=It,ht.distance=jt,ht.range=bt,ht.inRange=da,ht.delta.x=Ct,ht.delta.y=ta)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),l.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=na(ao,"snap"),Bn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],ao.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=F({},c),o.options.targets=[];for(var k=0,T=c.targets||[];k<T.length;k++){var U=T[k],N=void 0;if(N=E.func(U)?U(m.x,m.y,t):U){for(var le=0,Ce=o.targetFields;le<Ce.length;le++){var Ue=Ce[le],Pe=Ue[0],Je=Ue[1];if(Pe in N||Je in N){N.x=N[Pe],N.y=N[Je];break}}o.options.targets.push(N)}}var ct=ao.set(a);return o.options=c,ct},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=na(Bn,"snapSize"),no={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Bn.start(a)):null},set:Bn.set,defaults:F(fa(Bn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:Tn,avoid:Tn,transform:Tn,rubberband:Tn},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(wt),a.usePlugin(pl),t.modifiers=no,no){var l=no[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,So=function(a){x(o,a);var t=Z(o);function o(l,c,p,m,k,T){var U;if(u(this,o),C(R(U=t.call(this,k)),p),p!==c&&C(R(U),c),U.timeStamp=T,U.originalEvent=p,U.type=l,U.pointerId=L(c),U.pointerType=ne(c),U.target=m,U.currentTarget=null,l==="tap"){var N=k.getPointerIndex(c);U.dt=U.timeStamp-k.pointers[N].downTime;var le=U.timeStamp-k.tapTime;U.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===U.target&&le<500}else l==="doubletap"&&(U.dt=c.timeStamp-k.tapTime,U.double=!0);return U}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(ve),gn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=gn,a.defaults.actions.pointerEvents=gn.defaults,F(a.actions.phaselessTypes,gn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&oo(a),Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget,T=o.pointerIndex,U=c.pointers[T].hold,N=qe(k),le={interaction:c,pointer:p,event:m,eventTarget:k,type:"hold",targets:[],path:N,node:null},Ce=0;Ce<N.length;Ce++){var Ue=N[Ce];le.node=Ue,l.fire("pointerEvents:collect-targets",le)}if(le.targets.length){for(var Pe=1/0,Je=0,ct=le.targets;Je<ct.length;Je++){var lt=ct[Je].eventable.options.holdDuration;lt<Pe&&(Pe=lt)}U.duration=Pe,U.timeout=setTimeout(function(){Pa({interaction:c,eventTarget:k,pointer:p,event:m,type:"hold"},l)},Pe)}})(a,t),Pa(a,t)},"interactions:up":function(a,t){oo(a),Pa(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,k=o.eventTarget;c.pointerWasMoved||Pa({interaction:c,eventTarget:k,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){oo(a),Pa(a,t)}},PointerEvent:So,fire:Pa,collectEventTargets:To,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 Pa(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=a.targets,T=k===void 0?To(a,t):k,U=new So(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:U});for(var N={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:U},le=0;le<T.length;le++){var Ce=T[le];for(var Ue in Ce.props||{})U[Ue]=Ce.props[Ue];var Pe=ae(Ce.eventable,Ce.node);if(U._subtractOrigin(Pe),U.eventable=Ce.eventable,U.currentTarget=Ce.node,Ce.eventable.fire(U),U._addOrigin(Pe),U.immediatePropagationStopped||U.propagationStopped&&le+1<T.length&&T[le+1].node!==U.currentTarget)break}if(t.fire("pointerEvents:fired",N),m==="tap"){var Je=U.double?Pa({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):U;o.prevTap=Je,o.tapTime=Je.timeStamp}return U}function To(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,k=o.getPointerIndex(l),T=o.pointers[k];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var U=qe(p),N={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:U,targets:[],node:null},le=0;le<U.length;le++){var Ce=U[le];N.node=Ce,t.fire("pointerEvents:collect-targets",N)}return m==="hold"&&(N.targets=N.targets.filter(function(Ue){var Pe,Je;return Ue.eventable.options.holdDuration===((Pe=o.pointers[k])==null||(Je=Pe.hold)==null?void 0:Je.duration)})),N.targets}function oo(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:gn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(gn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Il,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return F(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var k=m.events,T=k.options;k.types[c]&&k.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:k,props:{interactable:m}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,l=a.options;F(o.events.options,t.pointerEvents.defaults),F(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,zl={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),k=p.window.Promise,T=k?[]:null,U=function(){var le=m[N],Ce=l.getRect(le);if(!Ce)return 1;var Ue,Pe=De(p.interactions.list,function(lt){return lt.interacting()&<.interactable===l&<.element===le&<.prepared.name===c.name});if(Pe)Pe.move(),T&&(Ue=Pe._reflowPromise||new k(function(lt){Pe._reflowResolve=lt}));else{var Je=Q(Ce),ct=function(lt){return{coords:lt,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:Je.x,y:Je.y},client:{x:Je.x,y:Je.y},timeStamp:p.now()});Ue=function(lt,ht,Dt,It,bt){var Ct=lt.interactions.new({pointerType:"reflow"}),ta={interaction:Ct,event:bt,pointer:bt,eventTarget:Dt,phase:"reflow"};Ct.interactable=ht,Ct.element=Dt,Ct.prevEvent=bt,Ct.updatePointer(bt,bt,Dt,!0),W(Ct.coords.delta),Nt(Ct.prepared,It),Ct._doPhase(ta);var jt=lt.window,da=jt.Promise,ya=da?new da(function(Sa){Ct._reflowResolve=Sa}):void 0;return Ct._reflowPromise=ya,Ct.start(It,ht,Dt),Ct._interacting?(Ct.move(ta),Ct.end(bt)):(Ct.stop(),Ct._reflowResolve()),Ct.removePointer(bt,bt),ya}(p,l,le,c,ct)}T&&T.push(Ue)},N=0;N<m.length&&!U();N++);return T&&k.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},Ll=zl;if(ea.use(Oa),ea.use(ra),ea.use(Ml),ea.use(ua),ea.use(Sl),ea.use(Ha),ea.use(at),ea.use(ft),ea.use(Ll),ea.default=ea,d(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(kn,kn.exports)),kn.exports}var np=ap();const Zo=Se.getDefaultExportFromCjs(np),Jn=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(n,{expose:i,emit:s}){const r=n,d=s,u=e.inject(jr),b=e.inject(Kr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let x=!1,_=!1,V=NaN,R=NaN,Z=NaN,O=NaN,ke=-1,Y=-1,K=-1,ie=-1,D=r.x,$=r.y,y=r.w,B=r.h;const E=e.ref(),ye=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:E,calcXY:fe});function Xe(w){se(w)}function it(){Me()}function Ne(w){pa(r.isDraggable)&&(f.draggable=w)}function $e(w){pa(r.isResizable)&&(f.resizable=w)}function _e(w){pa(r.isBounded)&&(f.bounded=w)}function A(w){f.transformScale=w}function te(w){f.rowHeight=w}function ce(w){f.maxRows=w}function ge(){f.rtl=Yo()==="rtl",Me()}function Ye(w){f.cols=Math.floor(w)}u.increaseItem(ye),e.onBeforeMount(()=>{f.rtl=Yo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,pa(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,pa(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,pa(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{D=r.x,$=r.y,B=r.h,y=r.w,aa(Ze)}),b.on("updateWidth",Xe),b.on("compact",it),b.on("setDraggable",Ne),b.on("setResizable",$e),b.on("setBounded",_e),b.on("setTransformScale",A),b.on("setRowHeight",te),b.on("setMaxRows",ce),b.on("directionchange",ge),b.on("setColNum",Ye)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Xe),b.off("compact",it),b.off("setDraggable",Ne),b.off("setResizable",$e),b.off("setBounded",_e),b.off("setTransformScale",A),b.off("setRowHeight",te),b.off("setMaxRows",ce),b.off("directionchange",ge),b.off("setColNum",Ye),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(ye)}),i({state:f,wrapper:E});const nt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ee=e.computed(()=>f.resizable&&!r.static),z=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),be=e.computed(()=>(f.draggable||f.resizable)&&!r.static),xe=Gd("item"),Fe=e.computed(()=>({[xe.b()]:!0,[xe.bm("resizable")]:ee.value,[xe.bm("static")]:r.static,[xe.bm("resizing")]:f.isResizing,[xe.bm("dragging")]:f.isDragging,[xe.bm("transform")]:f.useCssTransforms,[xe.bm("rtl")]:z.value,[xe.bm("no-touch")]:nt&&be.value})),Oe=e.computed(()=>[xe.be("resizer"),z.value&&xe.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,w=>{f.draggable=w}),e.watch(()=>r.static,()=>{aa(C),aa(W)}),e.watch(()=>f.draggable,()=>{aa(C)}),e.watch(()=>r.isResizable,w=>{f.resizable=w}),e.watch(()=>r.isBounded,w=>{f.bounded=w}),e.watch(()=>f.resizable,()=>{aa(W)}),e.watch(()=>f.rowHeight,()=>{aa(Ze),aa(qe)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(W),aa(Ze),aa(qe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(W)}),e.watch(z,()=>{aa(W),aa(Ze)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const w=u.margin;!w||w[0]===f.margin[0]&&w[1]===f.margin[1]||(f.margin=w.map(Number),aa(Ze),aa(qe))});function Ze(){r.x+r.w>f.cols?(D=0,y=r.w>f.cols?f.cols:r.w):(D=r.x,y=r.w);const w=J(D,$,y,B);f.isDragging&&(w.top=f.dragging.top,z.value?w.right=f.dragging.left:w.left=f.dragging.left),f.isResizing&&(w.width=f.resizing.width,w.height=f.resizing.height);let S;f.useCssTransforms?z.value?S=Ud(w.top,w.right,w.width,w.height):S=Kd(w.top,w.left,w.width,w.height):z.value?S=Hd(w.top,w.right,w.width,w.height):S=Wd(w.top,w.left,w.width,w.height),f.style=S}function qe(){const w={};for(const S of["width","height"]){const G=f.style[S].match(/^(\d+)px$/);if(!G)return;w[S]=G[1]}d("container-resized",r.i,r.h,r.w,w.height,w.width)}function me(w){if(r.static)return;const S=w.type;if(S==="resizestart"&&f.isResizing||S!=="resizestart"&&!f.isResizing)return;const G=Go(w);if(pa(G))return;const{x:L,y:de}=G,H={width:0,height:0};let P;switch(S){case"resizestart":{W(),ke=y,Y=B,P=J(D,$,y,B),H.width=P.width,H.height=P.height,f.resizing=H,f.isResizing=!0;break}case"resizemove":{!w.edges.right&&!w.edges.left&&(Z=L),!w.edges.top&&!w.edges.bottom&&(O=de);const Ee=Xo(Z,O,L,de);z.value?H.width=f.resizing.width-Ee.deltaX/f.transformScale:H.width=f.resizing.width+Ee.deltaX/f.transformScale,H.height=f.resizing.height+Ee.deltaY/f.transformScale,f.resizing=H;break}case"resizeend":{P=J(D,$,y,B),H.width=P.width,H.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=ae(H.height,H.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),Z=L,O=de,(y!==P.w||B!==P.h)&&d("resize",r.i,P.h,P.w,H.height,H.width),w.type==="resizeend"&&(ke!==y||Y!==B)&&d("resized",r.i,P.h,P.w,H.height,H.width),b.emit("resizeEvent",w.type,r.i,D,$,P.h,P.w)}function F(w){if(r.static||f.isResizing)return;const S=w.type;if(S==="dragstart"&&f.isDragging||S!=="dragstart"&&!f.isDragging)return;const G=Go(w);if(pa(G))return;const{x:L,y:de}=G,H=w.target;if(!H.offsetParent)return;const P={top:0,left:0};switch(S){case"dragstart":{K=D,ie=$;const oe=H.offsetParent.getBoundingClientRect(),X=H.getBoundingClientRect(),ne=X.left/f.transformScale,q=oe.left/f.transformScale,ve=X.right/f.transformScale,he=oe.right/f.transformScale,we=X.top/f.transformScale,j=oe.top/f.transformScale;z.value?P.left=(ve-he)*-1:P.left=ne-q,P.top=we-j,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const oe=Xo(V,R,L,de);if(z.value?P.left=f.dragging.left-oe.deltaX/f.transformScale:P.left=f.dragging.left+oe.deltaX/f.transformScale,P.top=f.dragging.top+oe.deltaY/f.transformScale,f.bounded){const X=H.offsetParent.clientHeight-Q(r.h,f.rowHeight,f.margin[1]);P.top=re(P.top,0,X);const ne=pe(),q=f.containerWidth-Q(r.w,ne,f.margin[0]);P.left=re(P.left,0,q)}f.dragging=P;break}case"dragend":{const oe=H.offsetParent.getBoundingClientRect(),X=H.getBoundingClientRect(),ne=X.left/f.transformScale,q=oe.left/f.transformScale,ve=X.right/f.transformScale,he=oe.right/f.transformScale,we=X.top/f.transformScale,j=oe.top/f.transformScale;z.value?P.left=(ve-he)*-1:P.left=ne-q,P.top=we-j,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Ee;z.value,Ee=fe(P.top,P.left),V=L,R=de,(D!==Ee.x||$!==Ee.y)&&d("move",r.i,Ee.x,Ee.y),w.type==="dragend"&&(K!==D||ie!==$)&&d("moved",r.i,Ee.x,Ee.y),b.emit("dragEvent",w.type,r.i,Ee.x,Ee.y,B,y)}function J(w,S,G,L){const de=pe();let H;return z.value?H={right:Math.round(de*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:G===1/0?G:Math.round(de*G+Math.max(0,G-1)*f.margin[0]),height:L===1/0?L:Math.round(f.rowHeight*L+Math.max(0,L-1)*f.margin[1])}:H={left:Math.round(de*w+(w+1)*f.margin[0]),top:Math.round(f.rowHeight*S+(S+1)*f.margin[1]),width:G===1/0?G:Math.round(de*G+Math.max(0,G-1)*f.margin[0]),height:L===1/0?L:Math.round(f.rowHeight*L+Math.max(0,L-1)*f.margin[1])},H}function fe(w,S){const G=pe();let L=Math.round((S-f.margin[0])/(G+f.margin[0])),de=Math.round((w-f.margin[1])/(f.rowHeight+f.margin[1]));return L=Math.max(Math.min(L,f.cols-y),0),de=Math.max(Math.min(de,f.maxRows-B),0),{x:L,y:de}}function pe(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Q(w,S,G){return Number.isFinite(w)?Math.round(S*w+Math.max(0,w-1)*G):w}function re(w,S,G){return Math.max(Math.min(w,G),S)}function ae(w,S,G=!1){const L=pe();let de=Math.round((S+f.margin[0])/(L+f.margin[0])),H=0;return G?H=Math.ceil((w+f.margin[1])/(f.rowHeight+f.margin[1])):H=Math.round((w+f.margin[1])/(f.rowHeight+f.margin[1])),de=Math.max(Math.min(de,f.cols-D),0),H=Math.max(Math.min(H,f.maxRows-$),0),{w:de,h:H}}function se(w,S){f.containerWidth=w}function Me(){Ze()}function ot(){!g.value&&E.value&&(g.value=Zo(E.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Wo(F);function C(){if(ot(),!!g.value)if(f.draggable&&!r.static){const w={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(w),x||(x=!0,g.value.on("dragstart dragmove dragend",S=>{S.type==="dragmove"?h(S):F(S)}))}else g.value.draggable({enabled:!1})}const I=Wo(me);function W(){if(ot(),!!g.value)if(f.resizable&&!r.static){const w=J(0,0,r.maxW,r.maxH),S=J(0,0,r.minW,r.minH),G={edges:{left:z.value?`.${Oe.value[0]}`:!1,right:z.value?!1:`.${Oe.value[0]}`,bottom:`.${Oe.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:S.height*f.transformScale,width:S.width*f.transformScale},max:{height:w.height*f.transformScale,width:w.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(G.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(G),_||(_=!0,g.value.on("resizestart resizemove resizeend",L=>{L.type==="resizemove"?I(L):me(L)}))}else g.value.resizable({enabled:!1})}return(w,S)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass(Fe.value),style:e.normalizeStyle(f.style)},[e.renderSlot(w.$slots,"default"),ee.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Oe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),nn=typeof window<"u";var Qo;nn&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function er(n){return n!=null}function tr(){}const op=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(op)));const rp=nn&&("ontouchstart"in window||ip()>0),lp=rp?"pointerdown":"click";function ip(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function sp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...b}=i;if(!er(r)||r==="")return!1;let g;return er(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,b),n.dispatchEvent(g)}const cp="clickoutside",up=new Set;nn&&document.addEventListener(lp,n=>{const i=n.target,s=n.composedPath&&n.composedPath();up.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&sp(r,{type:cp})})},!0);const dp=[["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 Rn;if(nn){for(const n of dp)if(n[1]in document){Rn=n;break}}e.computed(()=>!1);const pp=new Set,fp=new WeakMap;if(nn&&Rn){const n=Rn[2],i=Rn[4];document.addEventListener(i,()=>{if(pp.forEach(s=>{s.value=!1}),document[n]){const s=fp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var tn=[],vp=function(){return tn.some(function(n){return n.activeTargets.length>0})},hp=function(){return tn.some(function(n){return n.skippedTargets.length>0})},ar="ResizeObserver loop completed with undelivered notifications.",gp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ar}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ar),window.dispatchEvent(n)},_n;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_n||(_n={}));var an=function(n){return Object.freeze(n)},mp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,an(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,an(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,b=i.bottom,g=i.left,f=i.width,x=i.height;return{x:s,y:r,top:d,right:u,bottom:b,left:g,width:f,height:x}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),ko=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(ko(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,b=d.offsetHeight;return!(u||b||n.getClientRects().length)},nr=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},yp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Cn=typeof window<"u"?window:{},On=new WeakMap,or=/auto|scroll/,bp=/^tb|vertical/,kp=/msie|trident/i.test(Cn.navigator&&Cn.navigator.userAgent),xa=function(n){return parseFloat(n||"0")},dn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new mp((s?i:n)||0,(s?n:i)||0)},rr=an({devicePixelContentBoxSize:dn(),borderBoxSize:dn(),contentBoxSize:dn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),On.has(n)&&!i)return On.get(n);if(Zr(n))return On.set(n,rr),rr;var s=getComputedStyle(n),r=ko(n)&&n.ownerSVGElement&&n.getBBox(),d=!kp&&s.boxSizing==="border-box",u=bp.test(s.writingMode||""),b=!r&&or.test(s.overflowY||""),g=!r&&or.test(s.overflowX||""),f=r?0:xa(s.paddingTop),x=r?0:xa(s.paddingRight),_=r?0:xa(s.paddingBottom),V=r?0:xa(s.paddingLeft),R=r?0:xa(s.borderTopWidth),Z=r?0:xa(s.borderRightWidth),O=r?0:xa(s.borderBottomWidth),ke=r?0:xa(s.borderLeftWidth),Y=V+x,K=f+_,ie=ke+Z,D=R+O,$=g?n.offsetHeight-D-n.clientHeight:0,y=b?n.offsetWidth-ie-n.clientWidth:0,B=d?Y+ie:0,E=d?K+D:0,ye=r?r.width:xa(s.width)-B-y,Xe=r?r.height:xa(s.height)-E-$,it=ye+Y+y+ie,Ne=Xe+K+$+D,$e=an({devicePixelContentBoxSize:dn(Math.round(ye*devicePixelRatio),Math.round(Xe*devicePixelRatio),u),borderBoxSize:dn(it,Ne,u),contentBoxSize:dn(ye,Xe,u),contentRect:new Jr(V,f,ye,Xe)});return On.set(n,$e),$e},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,b=r.devicePixelContentBoxSize;switch(i){case _n.DEVICE_PIXEL_CONTENT_BOX:return b;case _n.BORDER_BOX:return d;default:return u}},xp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=an([s.borderBoxSize]),this.contentBoxSize=an([s.contentBoxSize]),this.devicePixelContentBoxSize=an([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},wp=function(){var n=1/0,i=[];tn.forEach(function(u){if(u.activeTargets.length!==0){var b=[];u.activeTargets.forEach(function(g){var f=new xp(g.target),x=tl(g.target);b.push(f),g.lastReportedSize=el(g.target,g.observedBox),x<n&&(n=x)}),i.push(function(){u.callback.call(u.observer,b,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},lr=function(n){tn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Dp=function(){var n=0;for(lr(n);vp();)n=wp(),lr(n);return hp()&&gp(),n>0},io,al=[],Cp=function(){return al.splice(0).forEach(function(n){return n()})},_p=function(n){if(!io){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Cp()}).observe(s,r),io=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),io()},Ep=function(n){_p(function(){requestAnimationFrame(n)})},Pn=0,Sp=function(){return!!Pn},Tp=250,Ip={attributes:!0,characterData:!0,childList:!0,subtree:!0},ir=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sr=function(n){return n===void 0&&(n=0),Date.now()+n},so=!1,Bp=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Tp),!so){so=!0;var r=sr(i);Ep(function(){var d=!1;try{d=Dp()}finally{if(so=!1,i=r-sr(),!Sp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ip)};document.body?s():Cn.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ir.forEach(function(s){return Cn.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ir.forEach(function(s){return Cn.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Bp,cr=function(n){!Pn&&n>0&&fo.start(),Pn+=n,!Pn&&fo.stop()},Np=function(n){return!ko(n)&&!yp(n)&&getComputedStyle(n).display==="inline"},Ap=function(){function n(i,s){this.target=i,this.observedBox=s||_n.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Np(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Vp=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Mn=new WeakMap,ur=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Vp(i,s);Mn.set(i,r)},n.observe=function(i,s,r){var d=Mn.get(i),u=d.observationTargets.length===0;ur(d.observationTargets,s)<0&&(u&&tn.push(d),d.observationTargets.push(new Ap(s,r&&r.box)),cr(1),fo.schedule())},n.unobserve=function(i,s){var r=Mn.get(i),d=ur(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&tn.splice(tn.indexOf(r),1),r.observationTargets.splice(d,1),cr(-1))},n.disconnect=function(i){var s=this,r=Mn.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Op=function(){function n(i){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof i!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zn.connect(this,i)}return n.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nr(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.prototype.unobserve=function(i){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nr(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Mp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:b,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:x}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:x,width:b??f,height:g??x}))}}}const nl=new(nn&&window.ResizeObserver||Op)(Mp);function dr(n,i){Zn.set(n,i),nl.observe(n)}function pr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function zp(n={}){let i=tr;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(dr(d,n.onResize),i=()=>{pr(d),i=tr})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:dr,unobserveResize:pr,unobserve:r}}const Lp=e.ref(!1);e.computed(()=>Lp.value);const fr="__theme_style__",co="__theme_observer__",vr=e.reactive(new Map),hr=new Map;e.watch(vr,()=>{if(!nn)return;hr.clear();const n=document.head.querySelector(`#${fr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${co} { width: 1px }`,r=1;for(const[d,[u,b]]of vr.entries())s+=` html.${u} .${co}, .${b} .${co} { width: ${++r}px }`,hr.set(r,d);i.textContent=s,i.id=fr,document.head.appendChild(i)});const ol=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(n,{expose:i,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:x,unobserveResize:_}=zp(),V=zd();V.on("resizeEvent",R),V.on("dragEvent",Z),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{qd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Xe(),f.value&&x(f.value,Ld(D,16)),cn(g.value,r.verticalCompact),d("layout-updated",g.value),ie(),D()})})}),e.onBeforeUnmount(()=>{V.clearAll(),f.value&&_(f.value)});function R(Ne,$e,_e,A,te,ce){E(Ne,$e,_e,A,te,ce)}function Z(Ne,$e,_e,A,te,ce){B(Ne,$e,_e,A,te,ce)}e.watch(()=>u.width,(Ne,$e)=>{e.nextTick(()=>{V.emit("updateWidth",Ne),$e===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),ie()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,Ne=>{V.emit("setColNum",Ne)}),e.watch(()=>r.rowHeight,Ne=>{V.emit("setRowHeight",Ne)}),e.watch(()=>r.isDraggable,Ne=>{V.emit("setDraggable",Ne)}),e.watch(()=>r.isResizable,Ne=>{V.emit("setResizable",Ne)}),e.watch(()=>r.isBounded,Ne=>{V.emit("setBounded",Ne)}),e.watch(()=>r.transformScale,Ne=>{V.emit("setTransformScale",Ne)}),e.watch(()=>r.responsive,Ne=>{Ne||(d("update:layout",u.originalLayout),V.emit("setColNum",r.colNum)),D()}),e.watch(()=>r.maxRows,Ne=>{V.emit("setMaxRows",Ne)}),e.watch([()=>r.margin,()=>r.margin[1]],ie),e.provide(jr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:O,decreaseItem:ke})),e.provide(Kr,V),i({state:u,getItem:Y,resizeEvent:E,dragEvent:B,layoutUpdate:K});function O(Ne){b.set(Ne.i,Ne)}function ke(Ne){b.delete(Ne.i)}function Y(Ne){return b.get(Ne)}function K(){if(!pa(g.value)&&!pa(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Ne=it(g.value,u.originalLayout);if(Ne.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Ne);else{const $e=new Set(Ne.map(_e=>_e.i));u.originalLayout=u.originalLayout.filter(_e=>!$e.has(_e.i))}u.lastLayoutLength=g.value.length,Xe()}cn(g.value,r.verticalCompact),V.emit("updateWidth",u.width),ie(),d("layout-updated",g.value)}}function ie(){u.mergedStyle={height:$()}}function D(){f.value&&(u.width=f.value.offsetWidth),V.emit("resizeEvent")}function $(){if(!r.autoSize)return;const Ne=parseFloat(r.margin[1]);return Rd(g.value)*(r.rowHeight+Ne)+Ne+"px"}let y;function B(Ne,$e,_e,A,te,ce){let ge=Ho(g.value,$e);pa(ge)&&(ge={h:0,w:0,x:0,y:0,i:""}),Ne==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Ye,{i:nt,x:ee,y:z})=>({...Ye,[nt]:{x:ee,y:z}}),{})),Ne==="dragmove"||Ne==="dragstart"?(u.placeholder.i=$e,u.placeholder.x=ge.x,u.placeholder.y=ge.y,u.placeholder.w=ce,u.placeholder.h=te,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,ge,_e,A,!0,r.preventCollision),r.restoreOnDrag?(ge.static=!0,cn(g.value,r.verticalCompact,y),ge.static=!1):cn(g.value,r.verticalCompact),V.emit("compact"),ie(),Ne==="dragend"&&(y=void 0,d("layout-updated",g.value))}function E(Ne,$e,_e,A,te,ce){let ge=Ho(g.value,$e);pa(ge)&&(ge={h:0,w:0,x:0,y:0,i:""});let Ye;if(r.preventCollision){const nt=Wr(g.value,{...ge,w:ce,h:te}).filter(ee=>ee.i!==ge.i);if(Ye=nt.length>0,Ye){let ee=1/0,z=1/0;nt.forEach(be=>{be.x>ge.x&&(ee=Math.min(ee,be.x)),be.y>ge.y&&(z=Math.min(z,be.y))}),Number.isFinite(ee)&&(ge.w=ee-ge.x),Number.isFinite(z)&&(ge.h=z-ge.y)}}Ye||(ge.w=ce,ge.h=te),Ne==="resizestart"||Ne==="resizemove"?(u.placeholder.i=$e,u.placeholder.x=_e,u.placeholder.y=A,u.placeholder.w=ge.w,u.placeholder.h=ge.h,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):Ne&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&ye(),cn(g.value,r.verticalCompact),V.emit("compact"),ie(),Ne==="resizeend"&&d("layout-updated",g.value)}function ye(){const Ne=Jd(r.breakpoints,u.width);if(Ne===u.lastBreakpoint)return;const $e=Gr(Ne,r.cols);!pa(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const _e=Zd(u.originalLayout,u.layouts,r.breakpoints,Ne,u.lastBreakpoint,$e,r.verticalCompact);u.layouts[Ne]=_e,u.lastBreakpoint!==Ne&&d("breakpoint-changed",Ne,_e),g.value=_e,d("update:layout",_e),u.lastBreakpoint=Ne,V.emit("setColNum",$e)}function Xe(){u.layouts=Object.assign({},r.responsiveLayouts)}function it(Ne,$e){const _e=new Set($e.map(ge=>ge.i)),A=new Set(Ne.map(ge=>ge.i)),te=Ne.filter(ge=>!_e.has(ge.i)),ce=$e.filter(ge=>!A.has(ge.i));return te.concat(ce)}return(Ne,$e)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Ne.$slots.default?e.renderSlot(Ne.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,_e=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:_e.i,ref_for:!0},_e),{default:e.withCtx(()=>[e.renderSlot(Ne.$slots,"item",{item:_e})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.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(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Fp={key:0,class:"item-view-group"},Rp={key:0,class:"item-view-group"},Pp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=$t.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,b=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var R,Z,O,ke;return((R=u==null?void 0:u.children)==null?void 0:R.length)>0&&((Z=u==null?void 0:u.children)!=null&&Z.every(Y=>Y==null?void 0:Y.layout))?(ke=(O=u==null?void 0:u.children)==null?void 0:O[0])==null?void 0:ke.layout:"vertical"}),f=e.computed(()=>{var R,Z;return((Z=(R=u==null?void 0:u.children)==null?void 0:R[0])==null?void 0:Z.isGridLayout)||!1}),x=e.ref((u==null?void 0:u.level)+1),_=R=>{d("rowClick",R)},V=(R,Z)=>{d("routeUrl",R,Z)};return(R,Z)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:b.value,"onUpdate:layout":Z[0]||(Z[0]=O=>b.value=O),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(O,ke)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:O.i,x:O.x,y:O.y,"min-h":O.minH,"max-h":O.maxH,"min-w":O.minW,w:O.w,h:O.h,i:O.i},{default:e.withCtx(()=>{var Y,K,ie,D,$,y,B,E,ye,Xe,it,Ne,$e;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ke===((Y=u==null?void 0:u.children)==null?void 0:Y.length)-1?"0px":"24px"})},[((ie=(K=O==null?void 0:O.component)==null?void 0:K.comp)==null?void 0:ie.toUpperCase())!=="TABLE"&&((D=O==null?void 0:O.component)!=null&&D.name)?(e.openBlock(),e.createElementBlock("div",Fp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(x.value.toString())-1)*12+"px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(($=O==null?void 0:O.component)==null?void 0:$.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)((y=O==null?void 0:O.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(B=e.unref(pt)[ke])==null?void 0:B.showIndex,allowMove:(E=e.unref(pt)[ke])==null?void 0:E.allowMove,viewport:(ye=e.unref(pt)[ke])==null?void 0:ye.viewport},compName:O==null?void 0:O.component.name,compNames:e.unref(yo),itemData:(Xe=O==null?void 0:O.component)==null?void 0:Xe.compData,childItemData:(it=O==null?void 0:O.component)==null?void 0:it.itemChildData,key:e.unref(pn),cacheNewData:e.unref(qn),onChange:e.unref(Gn),index:(O==null?void 0:O.id)??ke,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(Ne=O==null?void 0:O.component)==null?void 0:Ne.tableId,allMapContents:e.unref(Wn),children:($e=O==null?void 0:O.component)==null?void 0:$e.children,level:x.value,onRowClick:_,onRouteUrl:V,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(zr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(O,ke)=>{var Y,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(O==null?void 0:O.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ke)===((Y=u==null?void 0:u.children)==null?void 0:Y.length)-1?"0px":"24px"})},[((K=O==null?void 0:O.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&O.name?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(x.value.toString())>1?"12px":"0px",fontWeight:600-(x.value-1)*100>=400?600-(x.value-1)*100:400,fontSize:17-x.value>=14?17-x.value+"px":"14px"})},e.toDisplayString(O.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Hn)(O.comp)),{compName:O.name,itemData:O==null?void 0:O.compData,childItemData:O==null?void 0:O.itemChildData,key:e.unref(pn),onChange:e.unref(Gn),index:(O==null?void 0:O.id)??ke,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:O==null?void 0:O.tableId,allMapContents:e.unref(Wn),children:O==null?void 0:O.children,level:x.value,onRowClick:_,onRouteUrl:V},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$p=zt._export_sfc(Pp,[["__scopeId","data-v-e672653d"]]),rl=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"}]),jp={TABLE:bn.ssTable,FORM:Mo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:zo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Ao.ssAvatar,SIGNATURE:Ao.ssSignature,FORMTOP:Mo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:zo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:Ku,LAYOUT:Cd,LAYOUTOPERATE:Vd,PARENTITEM:$p};function on(n){return jp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Sr;exports.activeStepInfo=un;exports.addSelectMenu=eo;exports.affixItems=rd;exports.allMapContents=Wn;exports.cacheNewData=qn;exports.clickMainKey=zr;exports.clickSavePage=od;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=pn;exports.compNames=yo;exports.compShow=Un;exports.debounce=vo;exports.existLayouts=vd;exports.generateLayouts=ys;exports.getComponent=on;exports.getComponents=Hn;exports.getSliceContLength=bd;exports.gridRowHeight=fs;exports.isStepLayout=bo;exports.isUndefined=yr;exports.onBack=ad;exports.onChange=Gn;exports.onClick=nd;exports.onContentChange=Xn;exports.onExtendTaskEnd=fd;exports.onPageBack=gd;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Jt;exports.setComponent=Ir;exports.showItems=pt;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=jn;exports.st=Jn;exports.stepItems=kd;exports.toolBar=Ba;exports.verifyButton=md;
|