ss-component-new 1.1.230 → 1.1.231

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/array-C5HGTxrq.cjs +7 -0
  2. package/dist/array-CN5NUB-T.js +3587 -0
  3. package/dist/{cloneDeep-DC8YpUZ0.cjs → cloneDeep-BxbMZD3z.cjs} +1 -1
  4. package/dist/{cloneDeep-F9O5vPGw.js → cloneDeep-D3DwnHwP.js} +1 -1
  5. package/dist/{index-CMT5JDTd.js → index-5hutjDp5.js} +4 -4
  6. package/dist/{index-BVTrhPrg.js → index-6wiLm5Bk.js} +8 -8
  7. package/dist/{index-hn9H8Q6t.js → index-ACYchtYG.js} +7 -7
  8. package/dist/{index-Ds6Jw4mw.js → index-B63Pn6Hg.js} +5 -5
  9. package/dist/{index-BzlGsXbt.cjs → index-BA8udoNI.cjs} +1 -1
  10. package/dist/{index-Dk3kLM0U.cjs → index-BIFlJb7L.cjs} +1 -1
  11. package/dist/{index-B8O5ErG3.cjs → index-BQQAONK4.cjs} +1 -1
  12. package/dist/{index-Fr7Zvv_X.js → index-BUYADLGc.js} +3 -3
  13. package/dist/{index-DHE1Ke3I.js → index-Bbs7Ne8f.js} +1 -1
  14. package/dist/{index-BmB3pdK1.cjs → index-Bkx6PRMs.cjs} +1 -1
  15. package/dist/{index-Beqpq8XG.cjs → index-Bnn1Ry6O.cjs} +1 -1
  16. package/dist/{index-DONqd7Aq.cjs → index-Bv6vr2Zd.cjs} +1 -1
  17. package/dist/{index-DsUEFfCG.cjs → index-C0oVM0ot.cjs} +1 -1
  18. package/dist/{index-_20-riGU.js → index-C2kuvDNq.js} +7 -7
  19. package/dist/{index-Bc_-X02L.js → index-C5qD66VY.js} +4 -4
  20. package/dist/{index-BvbtWO--.js → index-C8daGuuW.js} +3 -3
  21. package/dist/{index-CqT2lIEc.js → index-C9mooaGU.js} +5 -5
  22. package/dist/{index-CHZ6wubH.cjs → index-CBHdhAzJ.cjs} +1 -1
  23. package/dist/{index-W7LB_3cY.js → index-CGCYmU9-.js} +4 -4
  24. package/dist/{index-hyBELhrs.cjs → index-CGw505w9.cjs} +1 -1
  25. package/dist/index-CJvDpy4J.js +653 -0
  26. package/dist/{index-B2EUqH0l.js → index-CQqWo_KW.js} +1 -1
  27. package/dist/{index-DDS-ylg2.cjs → index-CVChu-C7.cjs} +1 -1
  28. package/dist/{index-vcclM6Nr.cjs → index-CfR5OTPe.cjs} +1 -1
  29. package/dist/{index-CBwd7Q9L.js → index-CfhO79uP.js} +6 -6
  30. package/dist/{index-DlNt5G13.cjs → index-CjXn7HNp.cjs} +1 -1
  31. package/dist/{index-CJmVBlej.js → index-Ck55iwwl.js} +7 -7
  32. package/dist/{index-C4EK74Eg.cjs → index-CnOFaZqX.cjs} +1 -1
  33. package/dist/{index-BVGtv7hS.js → index-Ct4-iIdT.js} +5 -5
  34. package/dist/{index-B7s76AP9.js → index-D4mH3gQk.js} +1 -1
  35. package/dist/{index-BMTWJxv9.js → index-D7mvse4R.js} +1 -1
  36. package/dist/index-D9GLl0Bb.cjs +1 -0
  37. package/dist/{index-BEigHtkm.js → index-DGeD_5JY.js} +1 -1
  38. package/dist/{index-kTzoP5l8.cjs → index-DKXGxMWO.cjs} +1 -1
  39. package/dist/{index-cBmyaP1D.cjs → index-DP4wALaA.cjs} +1 -1
  40. package/dist/{index-BxvYzJ-Q.cjs → index-DT8Ga96z.cjs} +1 -1
  41. package/dist/{index-CUDstL_x.js → index-DfGXlHPF.js} +5 -5
  42. package/dist/{index-C2OSPvvg.cjs → index-DrvDNl0B.cjs} +1 -1
  43. package/dist/{index-DXHWTAss.js → index-DySgK9CB.js} +9 -9
  44. package/dist/{index-B-SoLcGK.cjs → index-HqapK2sv.cjs} +1 -1
  45. package/dist/{index-23tRTD5t.cjs → index-P4pnokyn.cjs} +1 -1
  46. package/dist/{index-CCWGXB9E.cjs → index-_bbASESv.cjs} +1 -1
  47. package/dist/{index-BbnVAolK.js → index-gyd-xWZ0.js} +4 -4
  48. package/dist/{index-TyD9NurF.js → index-j17TZ-pk.js} +6 -6
  49. package/dist/{index-Wyj4b3Yx.cjs → index-pdGS_R2F.cjs} +1 -1
  50. package/dist/{index-wtgVfFUI.cjs → index-w5px5KSb.cjs} +1 -1
  51. package/dist/{index-B6kq6fHV.cjs → index-xXjNoBIK.cjs} +1 -1
  52. package/dist/{index-B4NmkBtx.js → index-zXisGnmY.js} +1 -1
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-DPGTAlms.js → index.vue_vue_type_script_setup_true_lang-DE_ZH7hU.js} +4 -4
  54. package/dist/{index.vue_vue_type_script_setup_true_lang-C1fVVjab.cjs → index.vue_vue_type_script_setup_true_lang-DX22PCtX.cjs} +1 -1
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-C2Tkzeyh.js → index.vue_vue_type_script_setup_true_lang-J6OxPOrB.js} +1 -1
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-CnWTLMvm.cjs → index.vue_vue_type_script_setup_true_lang-h50Jk1OD.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-FQ3ufMBI.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-3kijaVi0.js} +6 -6
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-4opgAMoq.cjs → index.vue_vue_type_style_index_0_scoped_997b1786_lang-CGTiivri.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-CBDePprB.cjs → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-B_wYdLVt.cjs} +1 -1
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-CnIMGYMj.js → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-CHhY6FTi.js} +8 -8
  61. package/dist/{login-BU4ZYRf7.cjs → login-Cqx7cGxv.cjs} +1 -1
  62. package/dist/{login-DlVWeoQw.js → login-DVqNuHre.js} +2 -2
  63. package/dist/{main-tYN6L4Qm.cjs → main-CgE6H5s8.cjs} +1 -1
  64. package/dist/{main-BB2lrzIa.js → main-zSU9LSQS.js} +6 -6
  65. package/dist/{menu-M7COGoA-.cjs → menu-Dk7fArRs.cjs} +1 -1
  66. package/dist/{menu-CoVhnbPn.js → menu-Dpw1TOij.js} +1 -1
  67. package/dist/{modelComp-TQlTSAdj.js → modelComp-9fow02FC.js} +1 -1
  68. package/dist/{modelComp-BmjghJQ0.cjs → modelComp-DkIXje_8.cjs} +1 -1
  69. package/dist/ss-component.cjs +1 -1
  70. package/dist/ss-component.css +1 -1
  71. package/dist/ss-component.js +7 -7
  72. package/dist/ss-component3.cjs +1 -1
  73. package/dist/ss-component3.js +1 -1
  74. package/package.json +1 -1
  75. package/dist/array-BPoHqMUl.cjs +0 -7
  76. package/dist/array-BlNCcyR3.js +0 -3576
  77. package/dist/index-DkPbWVec.js +0 -623
  78. package/dist/index-xwjGwnze.cjs +0 -1
  79. package/dist/obj/model.mtl +0 -42
  80. package/dist/obj/model.obj +0 -26110
  81. package/public/obj/model.mtl +0 -42
  82. package/public/obj/model.obj +0 -26110
@@ -0,0 +1,7 @@
1
+ "use strict";const Y=require("./index-DrvDNl0B.cjs"),e=require("vue"),ce=require("./index-BIFlJb7L.cjs"),q=require("./index-DP4wALaA.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=require("./cloneDeep-BxbMZD3z.cjs"),ie=require("./index-CnOFaZqX.cjs"),te=require("./menu-Dk7fArRs.cjs"),al=require("./index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs"),sl=require("./modelComp-DkIXje_8.cjs"),xe=require("./index.vue_vue_type_script_setup_true_lang-DX22PCtX.cjs"),tl=o=>o.match(/\((.*)\)/)[1],pe=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],ue=[{label:"输入框",value:"Input"},{label:"单选框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"}],rl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"}],cl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Select"},{key:"contents",label:"选项值",type:"Input"}],il=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Date"}],ul=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Input"}],pl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue}],le=[{key:"Input",value:rl},{key:"Select",value:cl},{key:"Date",value:il},{key:"TextArea",value:ul},{key:"Upload",value:pl}],dl=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],ae=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:dl},{key:"background",label:"颜色",type:"Color"}],fl={class:"form-content"},hl={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(o,{emit:s}){const n=o,l=s,a=e.ref([]),t=e.ref(!1),i=e.ref([]),h=Y.useFormToTableComp(ce.pinia),g=e.ref(!1),k=e.ref(),y=_=>{var v,p,u,c;const B=(p=(v=m.cloneDeep(n.itemData))==null?void 0:v.find(r=>(r==null?void 0:r.key)==="formContent"))==null?void 0:p.contents,D=m.cloneDeep(_.content);let F={};D&&((u=Object.values(D))==null?void 0:u.length)>0&&((c=Object.values(D))==null||c.forEach((r,b)=>{F[B[b].key]=r}));const C={content:F,index:n==null?void 0:n.index,buttonName:_==null?void 0:_.buttonName};l("change",C)},$=_=>{var F,C;if(!_)return;if(((F=Object.values(m.cloneDeep(_)))==null?void 0:F.length)>0){const v=(C=Object.values(m.cloneDeep(_)))==null?void 0:C.map(u=>u);let p="";v==null||v.forEach(u=>{u!==""&&u!==void 0&&(p=p===""?u:p+"/"+u)}),h.setSelectArray(v),h.setSelectString(p)}const B=m.cloneDeep(n.itemData),D=B==null?void 0:B.map(v=>{var p;return(v==null?void 0:v.key)==="formContent"&&((p=v.contents)==null||p.map((u,c)=>{var r,b,V,I,O,f,A,N,d,w,E,T,x,L,S,j,W,M,K;return u.type=u!=null&&u.type?u.type:(I=(V=(b=(r=u==null?void 0:u.key)==null?void 0:r.split("$"))==null?void 0:b[1])==null?void 0:V.split("("))!=null&&I[0]?(O=pe==null?void 0:pe.find(Q=>{var oe,z,ee,X;return(Q==null?void 0:Q.key)===((X=(ee=(z=(oe=u==null?void 0:u.key)==null?void 0:oe.split("$"))==null?void 0:z[1])==null?void 0:ee.split("("))==null?void 0:X[0])}))==null?void 0:O.value:"Input",u.options=u!=null&&u.options?u.options:((N=(A=(f=u==null?void 0:u.key)==null?void 0:f.split("$"))==null?void 0:A[1])==null?void 0:N.length)>0?(T=(E=tl((w=(d=u==null?void 0:u.key)==null?void 0:d.split("$"))==null?void 0:w[1]))==null?void 0:E.split(","))==null?void 0:T.map(Q=>({label:Q,value:Q})):[],(x=u==null?void 0:u.key)!=null&&x.includes("$")&&(u.key=(S=(L=u==null?void 0:u.key)==null?void 0:L.split("$"))==null?void 0:S[0]),u.value=Array.isArray((j=Object.values(_))==null?void 0:j[c])?(M=(W=Object.values(_))==null?void 0:W[c])==null?void 0:M[0]:(K=Object.values(_))==null?void 0:K[c],u})),v});l("contentChange",{contents:D,index:n.index})};return e.watch(()=>n.itemData,()=>{var v,p,u,c,r,b,V,I,O,f,A;const _=(v=m.cloneDeep(n.itemData))==null?void 0:v.find(N=>(N==null?void 0:N.key)==="formContent"),B=(p=m.cloneDeep(n.itemData))==null?void 0:p.find(N=>(N==null?void 0:N.key)==="formButton"),D=(u=m.cloneDeep(n.itemData))==null?void 0:u.find(N=>(N==null?void 0:N.key)==="formFlex"),F=(c=m.cloneDeep(n.itemData))==null?void 0:c.find(N=>(N==null?void 0:N.key)==="formWrap"),C=(r=m.cloneDeep(n.itemData))==null?void 0:r.find(N=>(N==null?void 0:N.key)==="enableWrap");if((F==null?void 0:F.contents)==="纵向"?t.value=!1:t.value=!0,g.value=(C==null?void 0:C.contents)===void 0?!1:C==null?void 0:C.contents,k.value=typeof(D==null?void 0:D.contents)!="boolean"?!(!(D!=null&&D.contents)===""||((b=D==null?void 0:D.contents)==null?void 0:b.toUpperCase())==="VERTICAL"):D==null?void 0:D.contents,((V=_==null?void 0:_.contents)==null?void 0:V.length)>0&&Array.isArray(_==null?void 0:_.contents)){const N=[];(I=_==null?void 0:_.contents)==null||I.forEach((E,T)=>{var x,L,S,j,W,M,K,Q,oe,z;if((E==null?void 0:E.label)!==""){let ee=(E==null?void 0:E.label)??(E==null?void 0:E.key)??"",X=(E==null?void 0:E.type)??"",H=(E==null?void 0:E.options)??[];if((x=E==null?void 0:E.key)!=null&&x.includes("$")&&(ee=(L=m.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:L[0],((j=(S=m.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:S[1])==null?void 0:j.length)>0)){const[G,Z]=(M=(W=m.cloneDeep(E==null?void 0:E.key).split("$"))==null?void 0:W[1])==null?void 0:M.split(/[()]/);X=((K=pe.find(J=>(J==null?void 0:J.key)===G))==null?void 0:K.value)??"",((Q=Z==null?void 0:Z.split(","))==null?void 0:Q.length)>0&&(H=(oe=Z==null?void 0:Z.split(","))==null?void 0:oe.map(J=>({label:J,value:J})))}N.push({label:ee??"",name:"t"+T,type:X===""?"Input":X,value:E!=null&&E.value?E.value:(H==null?void 0:H.length)>0?(z=H==null?void 0:H[0])==null?void 0:z.value:(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??T,contents:H??[],width:(E==null?void 0:E.width)??1})}});const d=(O=m.cloneDeep(N))==null?void 0:O.map(E=>E.value);let w="";d==null||d.forEach(E=>{E!==""&&E!==void 0&&(w=w===""?E:w+"/"+E)}),h.setSelectArray(d),h.setSelectString(w),a.value=N}else a.value=[];if(((f=B==null?void 0:B.contents)==null?void 0:f.length)>0){const N=[];(A=B==null?void 0:B.contents)==null||A.forEach((d,w)=>{(d==null?void 0:d.label)!==""&&N.push({label:(d==null?void 0:d.label)??"",id:(d==null?void 0:d.id)??w,type:(d==null?void 0:d.type)??"",background:d==null?void 0:d.background})}),i.value=N}else i.value=[]},{deep:!0,immediate:!0}),(_,B)=>(e.openBlock(),e.createElementBlock("div",fl,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:a.value,formRules:o.formRules,buttonValue:i.value,isRowFlex:k.value,isEnableWrap:g.value,onOnButtonClick:y,onChange:$,isButtonRow:t.value,key:n.itemData},null,8,["rowContents","formRules","buttonValue","isRowFlex","isEnableWrap","isButtonRow"]))]))}},Ne=ne._export_sfc(hl,[["__scopeId","data-v-63ad44fd"]]),ye=e.ref(0),Fe=o=>{var s;return!o||(o==null?void 0:o.length)===0?[]:(s=m.cloneDeep(o))==null?void 0:s.map(l=>(ye.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"center",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??ye.value,children:Fe(l==null?void 0:l.children)},l))},ml=o=>{var n;return(n=m.cloneDeep(o))==null?void 0:n.map(l=>(ye.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"center",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??ye.value,children:Fe(l==null?void 0:l.children)},l))},Le=(o,s)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===s)?(n=m.cloneDeep(o))==null?void 0:n.filter(a=>(a==null?void 0:a.id)!==s):(o=o==null?void 0:o.map(l=>(l.children=Le(l==null?void 0:l.children,s),l)),o)},je=(o,s)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(n=m.cloneDeep(o))==null?void 0:n.map(a=>((a==null?void 0:a.id)===(s==null?void 0:s.id)&&(a=s),a)):(o=o==null?void 0:o.map(l=>(l.children=je(l==null?void 0:l.children,s),l)),o)},Je=(o,s)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(n=m.cloneDeep(o))==null?void 0:n.map(a=>((a==null?void 0:a.id)===(s==null?void 0:s.id)&&(a!=null&&a.children||(a.children=[]),a.children.push(s.contents)),a)):(o=o==null?void 0:o.map(l=>(l.children=Je(l==null?void 0:l.children,s),l)),o)},P=[{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"}],yl={class:"table-header-child"},kl={class:"table-header-child-main"},gl={class:"table-header-child-content"},bl={class:"table-header-child-content-item"},vl={class:"fix-button"},Cl=["onClick"],Dl=["onClick"],_l=["onClick"],El={key:0},$l={class:"form-content"},xl={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(o,{emit:s}){const n=o,l=s,a=e.ref(!1),t=e.ref(""),i=e.ref(0),h=e.ref(""),g=e.ref([]),k=e.ref([]),y=p=>{var c;a.value=!0;let u=[];P==null||P.forEach(r=>{i.value++,u.push({label:r==null?void 0:r.label,name:r==null?void 0:r.label,type:r.type,value:p[r.key],id:i.value,contents:r==null?void 0:r.options})}),p!=null&&p.children&&((c=p==null?void 0:p.children)==null?void 0:c.length)>0&&u.push({children:p==null?void 0:p.children,isFormColHidden:!0}),h.value=p==null?void 0:p.id,g.value=u,k.value=u},$=p=>{l("fixChange",m.cloneDeep(p))},_=p=>{l("deleteChange",m.cloneDeep(p))},B=p=>{a.value=!0;let u=[];P==null||P.forEach(c=>{i.value++,u.push({label:c==null?void 0:c.label,name:c==null?void 0:c.label,type:c.type,value:"",id:i.value,contents:c==null?void 0:c.options})}),t.value=p==null?void 0:p.id,g.value=u,k.value=u},D=p=>{let u=m.cloneDeep(k.value);u=u==null?void 0:u.map(c=>(c.children||(c.value=p==null?void 0:p[c.name]),c)),k.value=u},F=()=>{var u;g.value=k.value;let p={};h.value!==""?p.id=h.value:(i.value++,p.id="id"+i.value),(u=g.value)==null||u.forEach(c=>{const r=P==null?void 0:P.find(b=>(b==null?void 0:b.label)===(c==null?void 0:c.label));r?p[r.key]=c.value:c!=null&&c.children&&c.children.length>0&&(p.children=c.children)}),a.value=!1,l("fixChange",{contents:m.cloneDeep(p),id:t.value})},C=()=>{a.value=!1,h.value="",t.value="",g.value=[],k.value=[]},v=p=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",p),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(p,u)=>(e.openBlock(),e.createElementBlock("div",yl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(c,r)=>(e.openBlock(),e.createElementBlock("div",kl,[e.createElementVNode("div",gl,[e.createElementVNode("div",bl,e.toDisplayString(c.label),1),e.createElementVNode("div",vl,[e.createElementVNode("div",{class:"icon-content",onClick:b=>B(c)},e.toDisplayString("新增"),8,Cl),e.createElementVNode("div",{class:"icon-content",onClick:b=>y(c)},e.toDisplayString("修改"),8,Dl),e.createElementVNode("div",{class:"icon-content",onClick:b=>v(c)},e.toDisplayString("删除"),8,_l)])]),c!=null&&c.children&&c.children.length>0?(e.openBlock(),e.createElementBlock("div",El,[e.createVNode(Ue,{tableChildContents:c==null?void 0:c.children,onDeleteChange:_,onFixChange:$},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(q.ssDialog,{visible:a.value,onBeforeDestroy:C,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$l,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:C,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:F},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},Nl=ne._export_sfc(xl,[["__scopeId","data-v-8d22d842"]]),Al={class:"table-header-child"},Bl={class:"table-header-child-main"},wl={class:"table-header-child-content"},Il={class:"table-header-child-content-item"},Tl={class:"fix-button"},Vl=["onClick"],Ol=["onClick"],Sl=["onClick"],Fl={key:0},Ll={class:"form-content"},jl={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(o,{emit:s}){const n=o,l=s,a=e.ref(!1),t=e.ref(""),i=e.ref(0),h=e.ref(""),g=e.ref([]),k=e.ref([]),y=p=>{l("fixChange",m.cloneDeep(p))},$=p=>{var c;a.value=!0;let u=[];P==null||P.forEach(r=>{i.value++,u.push({label:r==null?void 0:r.label,name:r==null?void 0:r.label,type:r.type,value:p[r.key],id:i.value,contents:r==null?void 0:r.options})}),p!=null&&p.children&&((c=p==null?void 0:p.children)==null?void 0:c.length)>0&&u.push({children:p==null?void 0:p.children,isFormColHidden:!0}),h.value=p==null?void 0:p.id,g.value=u,k.value=u},_=p=>{a.value=!0;let u=[];P==null||P.forEach(c=>{i.value++,u.push({label:c==null?void 0:c.label,name:c==null?void 0:c.label,type:c.type,value:"",id:i.value,contents:c==null?void 0:c.options})}),t.value=p==null?void 0:p.id,g.value=u,k.value=u},B=p=>{let u=m.cloneDeep(k.value);u=u==null?void 0:u.map(c=>(c.children||(c.value=p==null?void 0:p[c.name]),c)),k.value=u},D=()=>{var u;g.value=k.value;let p={};h.value!==""?p.id=h.value:(i.value++,p.id="id"+i.value),(u=g.value)==null||u.forEach(c=>{const r=P==null?void 0:P.find(b=>(b==null?void 0:b.label)===(c==null?void 0:c.label));r?p[r.key]=c.value:c!=null&&c.children&&c.children.length>0&&(p.children=c.children)}),a.value=!1,l("fixChange",{contents:m.cloneDeep(p),id:t.value})},F=()=>{a.value=!1,h.value="",t.value="",g.value=[],k.value=[]},C=p=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",p),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},v=p=>{l("deleteChange",p)};return(p,u)=>(e.openBlock(),e.createElementBlock("div",Al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(c,r)=>(e.openBlock(),e.createElementBlock("div",Bl,[e.createElementVNode("div",wl,[e.createElementVNode("div",Il,e.toDisplayString(c.label),1),e.createElementVNode("div",Tl,[e.createElementVNode("div",{class:"icon-content",onClick:b=>_(c)},e.toDisplayString("新增"),8,Vl),e.createElementVNode("div",{class:"icon-content",onClick:b=>$(c)},e.toDisplayString("修改"),8,Ol),e.createElementVNode("div",{class:"icon-content",onClick:b=>C(c)},e.toDisplayString("删除"),8,Sl)])]),c!=null&&c.children&&c.children.length>0?(e.openBlock(),e.createElementBlock("div",Fl,[e.createVNode(Nl,{tableChildContents:c==null?void 0:c.children,onDeleteChange:v,onFixChange:y},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(q.ssDialog,{visible:a.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ll,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:B},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:F,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:D},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},Ue=ne._export_sfc(jl,[["__scopeId","data-v-cf81887a"]]),Jl={class:"table-operate-content"},Ul={class:"table-operate-item"},Pl={class:"operate-title"},Rl={class:"operate-content"},Wl={class:"fix-content"},zl={class:"fix-content-label"},Ml={class:"fix-button"},Gl=["onClick"],ql=["onClick"],Hl=["onClick"],Zl={key:0},Kl={class:"form-content"},Ql={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:s}){const n=o,l=s,a=e.ref([]),t=e.ref(!1),i=e.ref([]),h=e.ref([]),g=e.ref([]),k=e.ref(""),y=e.ref(""),$=e.ref(0),_=()=>{t.value=!0;let r=[];P==null||P.forEach(b=>{$.value++,r.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:"",id:$.value,contents:b==null?void 0:b.options})}),h.value=r,g.value=r},B=r=>{t.value=!0;let b=[];P==null||P.forEach(V=>{$.value++,b.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:$.value,contents:V==null?void 0:V.options})}),h.value=b,y.value=r==null?void 0:r.id,g.value=b},D=r=>{var b;i.value=Le(m.cloneDeep(i.value),r==null?void 0:r.id),l("change",(b=m.cloneDeep(n.originalItemContents))==null?void 0:b.map(V=>{var I;return(V==null?void 0:V.key)==="header"&&(V.contents=(I=i.value)!=null&&I.some(O=>O==null?void 0:O.children)?[i.value]:i.value),V}))},F=r=>{var V,I,O;r.id===""?i.value=je(i.value,r==null?void 0:r.contents):i.value=Je(i.value,r),i.value=(V=i.value)!=null&&V.some(f=>f==null?void 0:f.children)?[i.value]:i.value,k.value="";let b=m.cloneDeep(n.originalItemContents);(I=m.cloneDeep(n.originalItemContents))!=null&&I.find(f=>(f==null?void 0:f.key)==="header")?b=(O=m.cloneDeep(n.originalItemContents))==null?void 0:O.map(f=>((f==null?void 0:f.key)==="header"&&(f.contents=i.value),f)):b.push({key:"header",contents:i.value}),l("change",b)},C=r=>{var V;t.value=!0;let b=[];P==null||P.forEach(I=>{$.value++,b.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:r[I.key],id:$.value,contents:I==null?void 0:I.options})}),r!=null&&r.children&&((V=r==null?void 0:r.children)==null?void 0:V.length)>0&&b.push({children:r==null?void 0:r.children,isFormColHidden:!0}),k.value=r==null?void 0:r.id,y.value="",h.value=b,g.value=b},v=r=>{let b=m.cloneDeep(g.value);b=b==null?void 0:b.map(V=>(V.children||(V.value=r==null?void 0:r[V.name]),V)),g.value=b},p=()=>{t.value=!1,k.value="",y.value="",g.value=[]},u=()=>{var V,I,O,f,A,N;h.value=g.value;let r={};if(k.value!==""?r.id=k.value:($.value++,r.id="id"+$.value),(V=h.value)==null||V.forEach(d=>{const w=P==null?void 0:P.find(E=>(E==null?void 0:E.label)===(d==null?void 0:d.label));w?r[w.key]=d.value:d!=null&&d.children&&d.children.length>0&&(r.children=d.children)}),(I=i.value)!=null&&I.find(d=>d.id===r.id))i.value=(O=i.value)==null?void 0:O.map(d=>(d.id===r.id&&(d=r),d));else{let d=m.cloneDeep(i.value);y.value===""?d.push(r):d=d==null?void 0:d.map(w=>(w.id===y.value&&(w.children||(w.children=[]),w.children.push(r)),w)),i.value=d}i.value=(f=i.value)!=null&&f.some(d=>d==null?void 0:d.children)?[i.value]:i.value,t.value=!1,k.value="",y.value="";let b=m.cloneDeep(n.originalItemContents);(A=m.cloneDeep(n.originalItemContents))!=null&&A.find(d=>(d==null?void 0:d.key)==="header")?b=(N=m.cloneDeep(n.originalItemContents))==null?void 0:N.map(d=>((d==null?void 0:d.key)==="header"&&(d.contents=i.value),d)):b.push({key:"header",contents:i.value}),l("change",b)},c=r=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var b,V;i.value=(b=m.cloneDeep(i.value))==null?void 0:b.filter(I=>(I==null?void 0:I.id)!==(r==null?void 0:r.id)),l("change",(V=m.cloneDeep(n.originalItemContents))==null?void 0:V.map(I=>{var O;return(I==null?void 0:I.key)==="header"&&(I.contents=(O=i.value)!=null&&O.some(f=>f==null?void 0:f.children)?[i.value]:i.value),I})),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var r,b,V,I,O;!n.originalItemContents||n.originalItemContents.length===0||(a.value=m.cloneDeep(n.originalItemContents),i.value=(b=(r=a.value)==null?void 0:r.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:b.contents,i.value=(V=i.value)==null?void 0:V.map((f,A)=>(Array.isArray(f)?f=ml(f):f={label:(f==null?void 0:f.label)??"",prop:(f==null?void 0:f.label)==="操作"?"operate":f==null?void 0:f.prop,width:f!=null&&f.width?parseInt(f.width):"",fixed:(f==null?void 0:f.fixed)??void 0,sortable:(f==null?void 0:f.sortable)??!1,align:(f==null?void 0:f.align)??"center",showOverflowTooltip:(f==null?void 0:f.showOverflowTooltip)??!0,isNotDrag:(f==null?void 0:f.isNotDrag)??!1,isEditCol:(f==null?void 0:f.isEditCol)??!1,isOperate:(f==null?void 0:f.isOperate)??!1,id:(f==null?void 0:f.id)??A},f)),i.value=(I=i.value)!=null&&I.every(f=>Array.isArray(f))?(O=i.value)==null?void 0:O[0]:i.value)},{deep:!0,immediate:!0}),(r,b)=>{const V=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Jl,[e.createElementVNode("div",Ul,[e.createElementVNode("div",Pl,[b[1]||(b[1]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:_},[e.createVNode(V,{name:"Plus",class:"icon-size"}),b[0]||(b[0]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",Rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(I,O)=>(e.openBlock(),e.createElementBlock("div",{key:O},[e.createElementVNode("div",Wl,[e.createElementVNode("div",zl,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",Ml,[e.createElementVNode("div",{class:"icon-content",onClick:f=>B(I)},e.toDisplayString("新增"),8,Gl),e.createElementVNode("div",{class:"icon-content",onClick:f=>C(I)},e.toDisplayString("修改"),8,ql),e.createElementVNode("div",{class:"icon-content",onClick:f=>c(I)},e.toDisplayString("删除"),8,Hl)])]),I!=null&&I.children&&I.children.length>0?(e.openBlock(),e.createElementBlock("div",Zl,[e.createVNode(Ue,{tableChildContents:I==null?void 0:I.children,onDeleteChange:D,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))])]),e.createVNode(q.ssDialog,{visible:t.value,onBeforeDestroy:p,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kl,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!0,onChange:v},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:p,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:u},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Xl=ne._export_sfc(Ql,[["__scopeId","data-v-663591e4"]]),Yl={class:"form-operate-content"},en={class:"form-operate-item"},ln={class:"operate-title"},nn={class:"operate-content"},on={class:"fix-content"},an={class:"fix-button"},sn=["onClick"],tn=["onClick"],rn={class:"operate-title"},cn={class:"operate-content"},un={class:"fix-content"},pn={class:"fix-button"},dn=["onClick"],fn=["onClick"],hn={style:{display:"flex","justify-content":"space-between"}},mn={class:"form-content"},yn={class:"form-content"},kn={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:s}){const n=o,l=s,a=e.ref(!1),t=e.ref([]),i=e.ref([]),h=e.ref(!1),g=e.ref([]),k=e.ref([]),y=e.ref(""),$=e.ref(!1),_=e.ref(0),B=e.ref([]),D=e.ref([]),F=f=>{var N,d;a.value=!0;let A=[];(d=(N=le==null?void 0:le.find(w=>(w==null?void 0:w.key)===((f==null?void 0:f.type)===""?"Input":f==null?void 0:f.type)))==null?void 0:N.value)==null||d.forEach(w=>{_.value++,A.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:(w==null?void 0:w.label)==="类型"&&f[w.key]===""?"Input":f[w.key],id:_.value,contents:w==null?void 0:w.options})}),y.value=f==null?void 0:f.id,t.value=A,i.value=A},C=f=>{h.value=!0;let A=[];ae==null||ae.forEach(N=>{_.value++,A.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:(N==null?void 0:N.label)==="类型"&&f[N.key]===""?"normal":f[N.key],id:_.value,contents:N==null?void 0:N.options})}),B.value=A,D.value=A,y.value=f==null?void 0:f.id};e.watch(()=>$.value,()=>{var A,N;let f=m.cloneDeep(n.originalItemContents);(A=m.cloneDeep(n.originalItemContents))!=null&&A.find(d=>(d==null?void 0:d.key)==="enableWrap")?f=(N=m.cloneDeep(n.originalItemContents))==null?void 0:N.map(d=>((d==null?void 0:d.key)==="enableWrap"&&(d.contents=!$.value),d)):f.push({key:"enableWrap",contents:!$.value}),l("change",f)},{deep:!0,immediate:!0});const v=()=>{var N,d,w,E,T;B.value=D.value;let f={};if(y.value!==""?f.id=y.value:(_.value++,f.id="id"+_.value),(N=B.value)==null||N.forEach(x=>{const L=ae==null?void 0:ae.find(S=>(S==null?void 0:S.label)===(x==null?void 0:x.label));L&&(f[L.key]=x.value)}),(d=g.value)!=null&&d.find(x=>x.id===f.id))g.value=(w=g.value)==null?void 0:w.map(x=>(x.id===f.id&&(x=f),x));else{let x=m.cloneDeep(g.value);g.value||(g.value=[]),x.push(f),g.value=x}h.value=!1,y.value="";let A=m.cloneDeep(n.originalItemContents);(E=m.cloneDeep(n.originalItemContents))!=null&&E.find(x=>(x==null?void 0:x.key)==="formButton")?A=(T=m.cloneDeep(n.originalItemContents))==null?void 0:T.map(x=>((x==null?void 0:x.key)==="formButton"&&(x.contents=g.value),x)):A.push({key:"formButton",contents:g.value}),l("change",A)},p=f=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,N;k.value=(A=m.cloneDeep(k.value))==null?void 0:A.filter(d=>(d==null?void 0:d.id)!==(f==null?void 0:f.id)),l("change",(N=m.cloneDeep(n.originalItemContents))==null?void 0:N.map(d=>((d==null?void 0:d.key)==="formContent"&&(d.contents=k.value),d))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},u=f=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,N;g.value=(A=m.cloneDeep(g.value))==null?void 0:A.filter(d=>(d==null?void 0:d.id)!==(f==null?void 0:f.id)),l("change",(N=m.cloneDeep(n.originalItemContents))==null?void 0:N.map(d=>((d==null?void 0:d.key)==="formButton"&&(d.contents=g.value),d))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},c=()=>{h.value=!0;let f=[];ae==null||ae.forEach(A=>{_.value++,f.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:(A==null?void 0:A.label)==="类型"?"normal":"",id:_.value,contents:A==null?void 0:A.options})}),B.value=f,D.value=f},r=()=>{var A,N;a.value=!0;let f=[];(N=(A=le==null?void 0:le.find(d=>(d==null?void 0:d.key)==="Input"))==null?void 0:A.value)==null||N.forEach(d=>{_.value++,f.push({label:d==null?void 0:d.label,name:d==null?void 0:d.label,type:d.type,value:(d==null?void 0:d.label)==="类型"?"Input":"",id:_.value,contents:d==null?void 0:d.options})}),t.value=f,i.value=f},b=f=>{let A=m.cloneDeep(D.value);A=A==null?void 0:A.map(N=>(N.value=f==null?void 0:f[N.name],N)),D.value=A},V=f=>{var A,N,d,w;if((f==null?void 0:f.类型)!==((N=(A=i.value)==null?void 0:A.find(E=>(E==null?void 0:E.label)==="类型"))==null?void 0:N.value)){let E=[];(w=(d=le==null?void 0:le.find(T=>(T==null?void 0:T.key)===((f==null?void 0:f.类型)===""?"Input":f==null?void 0:f.类型)))==null?void 0:d.value)==null||w.forEach(T=>{_.value++,E.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:(f==null?void 0:f[T.label])??"",id:_.value,contents:T==null?void 0:T.options})}),i.value=E,t.value=E}else{let E=m.cloneDeep(i.value);E=E==null?void 0:E.map(T=>(T.value=f==null?void 0:f[T.name],T)),i.value=E}},I=()=>{var d,w,E,T,x,L;t.value=i.value;let f={};y.value!==""?f.id=y.value:(_.value++,f.id="id"+_.value);let A=(d=le==null?void 0:le.find(S=>{var j,W;return(S==null?void 0:S.key)===(((W=(j=t.value)==null?void 0:j.find(M=>(M==null?void 0:M.label)==="类型"))==null?void 0:W.value)??"label")}))==null?void 0:d.value;if((w=t.value)==null||w.forEach(S=>{const j=A==null?void 0:A.find(W=>(W==null?void 0:W.label)===(S==null?void 0:S.label));j&&(f[j.key]=S.value)}),f.width=1,(E=k.value)!=null&&E.find(S=>S.id===f.id))k.value=(T=k.value)==null?void 0:T.map(S=>(S.id===f.id&&(S=f),S));else{let S=m.cloneDeep(k.value);S.push(f),k.value=S}a.value=!1,y.value="";let N=m.cloneDeep(n.originalItemContents);(x=m.cloneDeep(n.originalItemContents))!=null&&x.find(S=>(S==null?void 0:S.key)==="formContent")?N=(L=m.cloneDeep(n.originalItemContents))==null?void 0:L.map(S=>((S==null?void 0:S.key)==="formContent"&&(S.contents=k.value),S)):N.push({key:"formContent",contents:k.value}),l("change",N)},O=()=>{a.value=!1,h.value=!1,y.value="",i.value=[],D.value=[]};return e.watch(()=>n.originalItemContents,()=>{var A,N,d,w,E,T;if(!n.originalItemContents||n.originalItemContents.length===0)return;const f=m.cloneDeep(n.originalItemContents);k.value=((A=f==null?void 0:f.find(x=>(x==null?void 0:x.key)==="formContent"))==null?void 0:A.contents)??[],g.value=((N=f==null?void 0:f.find(x=>(x==null?void 0:x.key)==="formButton"))==null?void 0:N.contents)??[],$.value=((d=f==null?void 0:f.find(x=>(x==null?void 0:x.key)==="enableWrap"))==null?void 0:d.contents)!==void 0?!((w=f==null?void 0:f.find(x=>(x==null?void 0:x.key)==="enableWrap"))!=null&&w.contents):!0,k.value=(E=m.cloneDeep(k.value))==null?void 0:E.map((x,L)=>x={label:(x==null?void 0:x.key)??(x==null?void 0:x.label)??"",type:(x==null?void 0:x.type)??"",contents:(x==null?void 0:x.options)??"",id:(x==null?void 0:x.id)??L,value:(x==null?void 0:x.value)??""}),g.value=(T=g.value)==null?void 0:T.map((x,L)=>x={label:(x==null?void 0:x.label)??"",type:(x==null?void 0:x.type)??"",background:(x==null?void 0:x.background)??"var(--ssComponent-primary-color)",id:(x==null?void 0:x.id)??L})},{deep:!0,immediate:!0}),(f,A)=>{const N=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Yl,[e.createElementVNode("div",en,[e.createElementVNode("div",ln,[A[2]||(A[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:r},[e.createVNode(N,{name:"Plus",class:"icon-size"}),A[1]||(A[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(d,w)=>(e.openBlock(),e.createElementBlock("div",{key:w},[e.createElementVNode("div",on,[e.createElementVNode("div",null,e.toDisplayString(d.label),1),e.createElementVNode("div",an,[e.createElementVNode("div",{class:"icon-content",onClick:E=>F(d)},e.toDisplayString("修改"),8,sn),e.createElementVNode("div",{class:"icon-content",onClick:E=>p(d)},e.toDisplayString("删除"),8,tn)])])]))),128))]),e.createElementVNode("div",rn,[A[4]||(A[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:c},[e.createVNode(N,{name:"Plus",class:"icon-size"}),A[3]||(A[3]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(d,w)=>(e.openBlock(),e.createElementBlock("div",{key:w},[e.createElementVNode("div",un,[e.createElementVNode("div",null,e.toDisplayString(d.label),1),e.createElementVNode("div",pn,[e.createElementVNode("div",{class:"icon-content",onClick:E=>C(d)},e.toDisplayString("修改"),8,dn),e.createElementVNode("div",{class:"icon-content",onClick:E=>u(d)},e.toDisplayString("删除"),8,fn)])])]))),128))]),A[6]||(A[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",hn,[A[5]||(A[5]=e.createElementVNode("div",null,e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(q._sfc_main$1,{modelValue:$.value,"onUpdate:modelValue":A[0]||(A[0]=d=>$.value=d)},null,8,["modelValue"])])]),e.createVNode(q.ssDialog,{visible:a.value,onBeforeDestroy:O,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",mn,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:t.value,key:t.value,isEnableWrap:!0,onChange:V},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:O,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:I},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(q.ssDialog,{visible:h.value,onBeforeDestroy:O,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",yn,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:B.value,key:B.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:O,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:v},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ae=ne._export_sfc(kn,[["__scopeId","data-v-d6fcac3c"]]),gn={class:"step-module content"},bn={class:"module-data"},vn={class:"step-module layout"},Cn={class:"form-content"},Dn=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:s}){const n=o,l=s,a=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}]),t=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),i=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=e.reactive({visible:!1,width:"40%",title:"步骤条"}),g=e.ref("create"),k=e.ref({}),y=e.ref([]),$=C=>{var v;k.value=C,l("change",(v=D())==null?void 0:v.compData)},_=(C,v)=>{var p,u;switch(C){case"create":(p=t.value)==null||p.forEach(c=>{c.value=""}),g.value="create",h.visible=!0;break;case"update":(u=t.value)==null||u.forEach(c=>{c.value=v[c==null?void 0:c.prop]}),g.value="update",h.visible=!0;break;case"delete":y.value.splice(v,1),g.value="delete";break}},B=C=>{var v,p,u;if((C==null?void 0:C.buttonName)==="确认"){const c=m.cloneDeep(C==null?void 0:C.content);switch(Object.keys(c).forEach(r=>{c[r]===""&&delete c[r]}),g.value){case"create":y.value.push({...c,index:((v=y.value)==null?void 0:v.length)+1});break;case"update":y.value=(p=y.value)==null?void 0:p.map(r=>r.index===(c==null?void 0:c.index)?{...r,title:c==null?void 0:c.title,description:c==null?void 0:c.description}:r);break}l("change",(u=D())==null?void 0:u.compData),h.visible=!1}else h.visible=!1},D=()=>({comp:"Step",compData:[{key:"stepList",contents:y.value},{key:"stepConfig",contents:k.value}]}),F=()=>{h.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,C=>{var v,p;C&&(k.value=((v=C==null?void 0:C.find(u=>u.key==="stepConfig"))==null?void 0:v.contents)??{},y.value=((p=C==null?void 0:C.find(u=>u.key==="stepList"))==null?void 0:p.contents)??[])},{immediate:!0}),(C,v)=>{const p=e.resolveComponent("svg-icon"),u=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gn,[v[2]||(v[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:v[0]||(v[0]=c=>_("create"))},[e.createVNode(p,{name:"Plus",class:"icon-size"}),v[1]||(v[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(c,r)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:r},[e.createElementVNode("span",null,e.toDisplayString(c==null?void 0:c.title),1),e.createElementVNode("div",null,[e.createVNode(u,{type:"primary",size:"small",onClick:b=>_("update",{...c,index:r+1})},{default:e.withCtx(()=>v[3]||(v[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(u,{type:"danger",size:"small",onClick:b=>_("delete",r)},{default:e.withCtx(()=>v[4]||(v[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",vn,[v[5]||(v[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(q.ssForm,{rowContents:a.value,onChange:$},null,8,["rowContents"])])]),e.createVNode(q.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:F,width:h.width},{default:e.withCtx(()=>[e.createElementVNode("div",Cn,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:t.value,key:t.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:i.value,onOnButtonClick:B},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),_n=ne._export_sfc(Dn,[["__scopeId","data-v-9361c99f"]]),En={class:"step-module content"},$n={class:"module-data"},xn={class:"step-module layout"},Nn={class:"form-content"},An=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:s}){const n=o,l=s,a=e.ref("create"),t=e.ref({}),i=e.ref([]),h=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}]),g=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),k=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),y=e.reactive({visible:!1,width:"40%",title:"时间线"}),$=C=>{var v;t.value=C,console.log(1212,C),l("change",(v=D())==null?void 0:v.compData)},_=(C,v)=>{var p,u;switch(C){case"create":(p=g.value)==null||p.forEach(c=>{c.value=""}),a.value="create",y.visible=!0;break;case"update":(u=g.value)==null||u.forEach(c=>{c.value=v[c==null?void 0:c.prop]}),a.value="update",y.visible=!0;break;case"delete":i.value.splice(v,1),a.value="delete";break}},B=C=>{var v,p,u,c;if((C==null?void 0:C.buttonName)==="确认"){const r=m.cloneDeep(C==null?void 0:C.content);switch(Object.keys(r).forEach(b=>{r[b]===""&&delete r[b]}),a.value){case"create":console.log(1335,i.value,r),(p=i.value)==null||p.push({...r,index:((v=i.value)==null?void 0:v.length)+1});break;case"update":i.value=(u=i.value)==null?void 0:u.map(b=>b.index===(r==null?void 0:r.index)?{...b,content:r==null?void 0:r.content,timestamp:r==null?void 0:r.timestamp}:b);break}l("change",(c=D())==null?void 0:c.compData),y.visible=!1}else y.visible=!1},D=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:i.value},{key:"timeLineConfig",contents:t.value}]}),F=()=>{y.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,C=>{var v,p;C&&(t.value=((v=C==null?void 0:C.find(u=>u.key==="timeLineConfig"))==null?void 0:v.contents)??{},i.value=((p=C==null?void 0:C.find(u=>u.key==="timeLineList"))==null?void 0:p.contents)??[])},{immediate:!0}),(C,v)=>{const p=e.resolveComponent("svg-icon"),u=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",En,[v[2]||(v[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:v[0]||(v[0]=c=>_("create"))},[e.createVNode(p,{name:"Plus",class:"icon-size"}),v[1]||(v[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",$n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(c,r)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:r},[e.createElementVNode("span",null,e.toDisplayString(c==null?void 0:c.content),1),e.createElementVNode("div",null,[e.createVNode(u,{type:"primary",size:"small",onClick:b=>_("update",{...c,index:r+1})},{default:e.withCtx(()=>v[3]||(v[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(u,{type:"danger",size:"small",onClick:b=>_("delete",r)},{default:e.withCtx(()=>v[4]||(v[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",xn,[v[5]||(v[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(q.ssForm,{rowContents:h.value,onChange:$},null,8,["rowContents"])])]),e.createVNode(q.ssDialog,{visible:y.visible,title:y.title,onBeforeDestroy:F,width:y.width},{default:e.withCtx(()=>[e.createElementVNode("div",Nn,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:B},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Bn=ne._export_sfc(An,[["__scopeId","data-v-40aea043"]]),wn={class:"extra-content"},In={key:0},Tn={key:1},Vn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(o,{emit:s}){const n=o,l=e.ref(0),a=e.ref(),t=e.ref(),i=s,h=e.ref(!1),g=e.ref({}),k=e.ref({}),y=e.ref();e.watch(()=>[n.itemData],()=>{var c;const u=m.cloneDeep(n.itemData);a.value=(c=m.cloneDeep(u))==null?void 0:c.map(r=>{var b;if(r.key==="extra"){let V=[];(b=r.value)==null||b.forEach(I=>{var O;V.push((O=Object.values(I))==null?void 0:O[0])}),r.value=V}return r})},{deep:!0,immediate:!0});const $=(u,c,r,b)=>{var I;let V={};((I=u==null?void 0:u[0])==null?void 0:I.contents)==="详情"&&(h.value=!0,V[c]=u,t.value=u==null?void 0:u.filter(O=>(O==null?void 0:O.key)!=="tableContentName"),g.value=V,k.value=r,y.value=b.id)},_=u=>{var O,f,A,N;const c=(f=(O=Object.values(m.cloneDeep(g.value)))==null?void 0:O[0])==null?void 0:f.filter(d=>(d==null?void 0:d.key)==="tableContentName"),r=(N=(A=Object.values(m.cloneDeep(g.value)))==null?void 0:A[0])==null?void 0:N.filter(d=>(d==null?void 0:d.key)!=="tableContentName"),b=r==null?void 0:r.map((d,w)=>{var E;return w===u.index&&(d==null?void 0:d.comp)==="Table"&&(d.compData=(E=d.compData)==null?void 0:E.map(T=>{var x,L;return(T==null?void 0:T.key)==="tableContents"&&(T.contents=(L=(x=u.content)==null?void 0:x.map(S=>{let j={};for(let W in S)W!=="id"&&(j[W]=S[W]);return j}))==null?void 0:L.map(S=>Object.values(S))),T})),d});b.unshift(c==null?void 0:c[0]);let V=m.cloneDeep(g.value),I={};for(let d in V)I[d]=b;g.value=I},B=()=>{h.value=!1,g.value={},k.value={},y.value=void 0,l.value++},D=u=>{var O,f,A,N;const c=(f=(O=Object.values(m.cloneDeep(g.value)))==null?void 0:O[0])==null?void 0:f.filter(d=>(d==null?void 0:d.key)==="tableContentName"),r=(N=(A=Object.values(m.cloneDeep(g.value)))==null?void 0:A[0])==null?void 0:N.filter(d=>(d==null?void 0:d.key)!=="tableContentName"),b=r==null?void 0:r.map((d,w)=>(w===u.index&&(d.compData=u.contents),d));b.unshift(c==null?void 0:c[0]);let V=m.cloneDeep(g.value),I={};for(let d in V)I[d]=b;g.value=I},F=()=>{var c,r;let u={};for(let b in k.value)b===((c=Object.keys(g.value))==null?void 0:c[0])?u[b]=(r=Object.values(g.value))==null?void 0:r[0]:u[b]=k.value[b];i("change",{buttonName:"编辑",index:y.value,singleContent:u},"methodData"),h.value=!1,g.value={},k.value={},y.value=void 0},C=()=>{h.value=!1,g.value={},k.value={},y.value=void 0},v=u=>{i("change",u,"methodData")},p=u=>Pe(u);return(u,c)=>(e.openBlock(),e.createElementBlock("div",wn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(r,b)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(r==null?void 0:r.key)==="extra"?(e.openBlock(),e.createElementBlock("div",In)):(e.openBlock(),e.createElementBlock("div",Tn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(r.comp)),{itemData:r==null?void 0:r.compData,childItemData:r==null?void 0:r.itemChildData,key:b,index:(r==null?void 0:r.id)??b,onContentClick:$,onChange:v},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(q.ssDialog,{visible:h.value,onBeforeDestroy:C},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(r,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(r.comp)),{itemData:r==null?void 0:r.compData,onChange:_,childItemData:r==null?void 0:r.itemChildData,key:b,onContentChange:D,index:(r==null?void 0:r.id)??b,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{class:"cancel-button footer-button",onClick:B},e.toDisplayString("取消")),e.createElementVNode("div",{class:"confirm-button footer-button",onClick:F},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},On=ne._export_sfc(Vn,[["__scopeId","data-v-b0b2f71f"]]),Sn={class:"method-content"},Fn=["onClick"],Ln={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(o){const s=e.ref([]),n=o,l=sl.useModelComp(ce.pinia),{itemData:a,isEdit:t}=te.storeToRefs(l),i=(k,y)=>{var _;const $=(_=y==null?void 0:y[0])==null?void 0:_.children;return k==null?void 0:k.map(B=>{var D;return B=(D=B==null?void 0:B.map((F,C)=>{var v;return{key:(v=$[C])==null?void 0:v.label,value:F}}))==null?void 0:D.filter(F=>F.key),B})};e.watch(()=>a.value,async()=>{t.value=="view"&&await g(m.cloneDeep(n.itemData))},{deep:!0});const h=async k=>{var u,c,r,b,V,I;let y={};if((u=m.cloneDeep(k.content))==null||u.forEach((O,f)=>{var A,N,d,w,E,T,x,L,S,j,W,M,K,Q,oe,z,ee;if((O==null?void 0:O.comp)==="Table"){let X=(w=(d=(N=(A=O==null?void 0:O.compData)==null?void 0:A.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:N.contents)==null?void 0:d[0])==null?void 0:w.some(J=>J==null?void 0:J.children),H=(x=(T=(E=O==null?void 0:O.compData)==null?void 0:E.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:T.contents)==null?void 0:x.map(J=>J.slice(1)),G=(M=(W=(j=(S=(L=O==null?void 0:O.compData)==null?void 0:L.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:S.contents)==null?void 0:j[0])==null?void 0:W[0])==null?void 0:M.label,Z=(oe=(Q=(K=O==null?void 0:O.compData)==null?void 0:K.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Q.contents)==null?void 0:oe[0];if(X)y[G]=i(H,Z);else{const J=[];Z=Z.slice(1,Z.length-1),Z==null||Z.forEach((nl,ol)=>{H==null||H.forEach($e=>{J.push({key:nl.label+$e[0],value:$e[ol+1]})})}),y["form"+f]=J}}else{const X=(ee=(z=O.compData)==null?void 0:z.find(G=>(G==null?void 0:G.key)==="formContent"))==null?void 0:ee.contents;y.form={};const H=[];X==null||X.forEach(G=>{G.key!==""&&(G={key:G==null?void 0:G.key,value:G==null?void 0:G.value},H.push(G))}),y.form=H}}),k.api){const O=await ce.axios.post(k.api,{data:y,templateFileName:(c=k==null?void 0:k.extraContent)==null?void 0:c[0]},{responseType:"blob",headers:{"Content-Type":"application/json"}});var $=new Blob([O.data],{type:"application/octet-stream;charset=UTF-8"}),_=O.headers["content-disposition"],B=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),D=B.exec(_),F=((V=(b=(r=k==null?void 0:k.extraContent)==null?void 0:r[0])==null?void 0:b.split("."))==null?void 0:V[0])+"."+((I=D[1].split("."))==null?void 0:I[1]),C=document.createElement("a"),v=window.URL.createObjectURL($),p=/^["](.*)["]$/g;C.style.display="none",C.href=v,C.download=decodeURI(F.replace(p,"$1")),document.body.appendChild(C),C.click(),document.body.removeChild(C),window.URL.revokeObjectURL(v)}},g=async k=>{var B;const y=m.cloneDeep(k),$=y==null?void 0:y.map(async D=>{var c,r,b,V,I,O,f;const C=(c=(await ce.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:D.method}})).data.result)==null?void 0:c[0],v=await ce.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:C==null?void 0:C.id}}),p=await Y.getItemData((r=D==null?void 0:D.value)==null?void 0:r[0],sessionStorage.getItem("systemKey"),""),u=(b=v.data.result)==null?void 0:b[0];return{buttonName:(V=C==null?void 0:C.key)==null?void 0:V.methodKey,api:(O=(I=u==null?void 0:u.value)==null?void 0:I.tableData)==null?void 0:O[0],content:p==null?void 0:p.filter(A=>A.comp!=="methodButton"),extraContent:(f=m.cloneDeep(D.value))==null?void 0:f.slice(1)}}),_=await Promise.all($);s.value=_==null?void 0:_.filter(D=>D==null?void 0:D.extraContent),(B=s.value)==null||B.forEach(D=>{var F;D.api===""&&((F=D.content)==null||F.forEach(C=>{var v;C.comp=="Table"&&l.setExtraContents(Y.methodTableToContent(C.compData,(v=D.extraContent)==null?void 0:v[0]))}))})};return e.watch(()=>n.itemData,async()=>{t.value=="view"&&await g(m.cloneDeep(n.itemData))},{immediate:!0,deep:!0}),(k,y)=>(e.openBlock(),e.createElementBlock("div",Sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,$=>(e.openBlock(),e.createElementBlock("div",null,[$.api!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:_=>h($),class:"method-buttons"},e.toDisplayString($.buttonName),9,Fn)):e.createCommentVNode("",!0)]))),256))]))}},jn=ne._export_sfc(Ln,[["__scopeId","data-v-9df085f9"]]),Jn=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(o,{emit:s}){const n=o,l=s,a=e.ref(1),t=e.computed(()=>{var $,_;return($=n==null?void 0:n.stepConfig)!=null&&$.allowTrigger?a.value:(_=n==null?void 0:n.stepConfig)==null?void 0:_.active}),i=($,_)=>{a.value=_,l("clickStep",$,_)},h=$=>q.getComponent($),g=()=>{var _;const $=(_=n==null?void 0:n.stepList)==null?void 0:_.find((B,D)=>D+1===t.value);return console.log("findStep",$),$?$==null?void 0:$.children:[]},k=$=>{l("clickTrigger",$)},y=$=>{l("changeTrigger",$)};return($,_)=>{var F,C,v,p,u;const B=e.resolveComponent("el-step"),D=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(D,{direction:(F=o.stepConfig)==null?void 0:F.direction,active:t.value,"finish-status":"success",simple:(C=o.stepConfig)==null?void 0:C.simple,"align-center":(v=o.stepConfig)==null?void 0:v.alignCenter},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.stepList,(c,r)=>(e.openBlock(),e.createBlock(B,{key:r,class:"step-item",onClick:b=>i(c,r+1)},{title:e.withCtx(()=>[e.renderSlot($.$slots,"title",{title:c==null?void 0:c.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot($.$slots,"description",{description:c==null?void 0:c.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(p=o.stepConfig)!=null&&p.allowTrigger&&((u=o.stepConfig)!=null&&u.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(g(),(c,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(c==null?void 0:c.type)),{modelValue:c.value,"onUpdate:modelValue":b=>c.value=b,onClickTrigger:k,onChangeTrigger:y,content:c==null?void 0:c.content},e.createSlots({_:2},[e.renderList($.$slots,(b,V)=>({name:V,fn:e.withCtx(I=>[e.renderSlot($.$slots,V,e.mergeProps({ref_for:!0},I||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Un=ne._export_sfc(Jn,[["__scopeId","data-v-003d9390"]]),Pn=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(o,{emit:s}){const n=o,l=s,a=e.ref({}),t=e.ref([]),i=(h,g)=>{l("clickStep",h,g)};return e.watch(()=>n==null?void 0:n.itemData,h=>{var g,k;t.value=(g=h==null?void 0:h.find(y=>(y==null?void 0:y.key)==="stepList"))==null?void 0:g.contents,a.value=(k=h==null?void 0:h.find(y=>(y==null?void 0:y.key)==="stepConfig"))==null?void 0:k.contents},{immediate:!0}),(h,g)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Un,{stepConfig:a.value,stepList:t.value,onClickStep:i},{icon:e.withCtx(()=>[e.createVNode(k,{name:"import"})]),title:e.withCtx(({title:y})=>[e.createTextVNode(e.toDisplayString(y),1)]),description:e.withCtx(({description:y})=>[e.createTextVNode(e.toDisplayString(y),1)]),_:1},8,["stepConfig","stepList"])}}}),Rn=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(o){return(s,n)=>{const l=e.resolveComponent("el-timeline-item"),a=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(a,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.activities,(t,i)=>(e.openBlock(),e.createBlock(l,{key:i,timestamp:t.timestamp,placement:o.timeLineConfig.placement,center:o.timeLineConfig.isCenter,"hide-timestamp":!0,type:o.timeLineConfig.type,color:o.timeLineConfig.color,size:o.timeLineConfig.size,icon:o.timeLineConfig.icon,hollow:o.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"content",{content:t==null?void 0:t.content,timestamp:t==null?void 0:t.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Wn=ne._export_sfc(Rn,[["__scopeId","data-v-4172a886"]]),zn={class:"line-content"},Mn={class:"line-time"},Gn=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(o){const s=o,n=e.ref({}),l=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,a=>{var t,i;l.value=(t=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:t.contents,n.value=(i=a==null?void 0:a.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:i.contents,console.log(234,l.value,n.value)},{immediate:!0}),(a,t)=>(e.openBlock(),e.createBlock(Wn,{activities:l.value,timeLineConfig:n.value},{content:e.withCtx(({content:i,timestamp:h})=>[e.createElementVNode("span",zn,e.toDisplayString(i),1),e.createElementVNode("span",Mn,e.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),qn=ne._export_sfc(Gn,[["__scopeId","data-v-7bf78c75"]]),Hn=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"}]),Zn={TABLE:Y.ssTable,FORM:Ne,TABLEOPERATE:Xl,FORMOPERATE:Ae,FOLD:al._sfc_main,CALCULATOR:On,METHODBUTTON:jn,AVATARUPLOAD:xe.ssAvatar,SIGNATURE:xe._sfc_main,FORMTOP:Ne,STEP:Pn,STEPOPERATE:_n,TIMELINE:qn,TIMELINEOPERATE:Bn,FORMTOPOPERATE:Ae};function Pe(o){return Zn[o==null?void 0:o.toUpperCase()]||null}const R=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],U=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],se=e.ref(0),Kn=o=>{const[s,n]=o.split(/=(.+)/),l=s.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},he=o=>{try{return JSON.parse(o),!0}catch{return!1}},Qn=o=>o.includes("$")&&o.trim().endsWith("(")?o+")":o,Xn=o=>{let s=o;const n=[];let l="";for(const a of s)a.includes("{")||l.includes("{")||a.includes("[")||l.includes("[")||a.includes("【")||l.includes("【")||a.includes("(")||l.includes("(")||a.includes("(")||l.includes("(")||a.includes("/*")||l.includes("/*")?(l+=a.trim(),m.cloneDeep(l).split("{").length-1===m.cloneDeep(l).split("}").length-1&&m.cloneDeep(l).split("【").length-1===m.cloneDeep(l).split("】").length-1&&m.cloneDeep(l).split("[").length-1===m.cloneDeep(l).split("]").length-1&&m.cloneDeep(l).split("(").length-1===m.cloneDeep(l).split(")").length-1&&m.cloneDeep(l).split("(").length-1===m.cloneDeep(l).split(")").length-1&&m.cloneDeep(l).split("/*").length-1===m.cloneDeep(l).split("*/").length-1&&(n.push(l),l="")):n.push(a.trim());return n==null?void 0:n.filter(a=>a.includes("{"))},Yn=o=>{var n;let s=[];return(n=Xn(o.slice(1,-1)))==null||n.forEach(l=>{var t,i,h,g;let a=((i=(t=l.slice(1,-1))==null?void 0:t.split(","))==null?void 0:i.length)??1;(g=(h=l.slice(1,-1))==null?void 0:h.split(","))==null||g.forEach(k=>{var B,D,F,C,v,p,u,c,r,b,V,I,O;let y=k==null?void 0:k.split(":"),$=y!=null&&y[0]?(y==null?void 0:y[1].split("$").length)-1===1?((B=y==null?void 0:y[0])==null?void 0:B.replace(/^"(.*)"$/,"$1"))+((D=y==null?void 0:y[1])==null?void 0:D.replace(/^"(.*)"$/,"$1")):Array.isArray((C=(F=y==null?void 0:y[1])==null?void 0:F.replace(/^"(.*)"$/,"$1"))==null?void 0:C.split("("))&&((u=(p=(v=y==null?void 0:y[1])==null?void 0:v.replace(/^"(.*)"$/,"$1"))==null?void 0:p.split("("))==null?void 0:u.length)>1?((c=y==null?void 0:y[0])==null?void 0:c.replace(/^"(.*)"$/,"$1"))+((V=(b=(r=y==null?void 0:y[1])==null?void 0:r.replace(/^"(.*)"$/,"$1"))==null?void 0:b.split("("))==null?void 0:V[0])+"()":(I=y==null?void 0:y[0])==null?void 0:I.replace(/^"(.*)"$/,"$1"):"",_=(y==null?void 0:y[1].split("$").length)-1===0?(O=y==null?void 0:y[1])==null?void 0:O.replace(/^"(.*)"$/,"$1"):"";se.value++,s.push({id:se.value,key:$,value:_,width:a,extraContent:y==null?void 0:y[1]})})}),s},Re=o=>{var s,n;try{const l=o.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(m.cloneDeep(l).split("{").length-1>1){let a=m.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(he(a)&&!a.includes("$")||(a=a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),he(a)){const t=JSON.parse(a);let i=[];return t==null||t.forEach(h=>{var g;(g=Object.entries(m.cloneDeep(h)))==null||g.forEach(k=>{se.value++,i.push({id:se.value,key:(k==null?void 0:k[0])??"",value:(k==null?void 0:k[1])===""?"":k==null?void 0:k[1],width:Object.keys(m.cloneDeep(h)).length})})}),i}else return l.trim().startsWith("{{")?Yn(l.trim()):be(a)}else if(he(l)){const a=JSON.parse(l);return Object.entries(a).map(([t,i])=>(se.value++,{id:se.value,key:t,value:i===""?"":i,width:1}))}else return((s=be(l))==null?void 0:s.length)===0?l:(n=be(l))==null?void 0:n.map(a=>({label:a.label,method:Qn(a.method)}))}catch(l){return console.error("转换失败:",l),[]}},be=o=>{o=o.trim().replace(/^\{|\}$/g,"").trim();const s=[];let n=0;for(;n<o.length;){const l=o.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);if(!l)break;const a=l[1];n+=l[0].length;let t="",i=0,h=!1,g="";for(let k=n;k<o.length;k++){const y=o[k];if((y==='"'||y==="'")&&!h?(h=!0,g=y):y===g&&h&&(h=!1,g=""),!h&&((y==="{"||y==="("||y==="[")&&i++,(y==="}"||y===")"||y==="]")&&i--,y===","&&i===0||k===o.length-1)){t=o.slice(n,k+1).trim(),n=k+1;break}}s.push({label:a,method:t})}return s},eo=(o,s)=>{try{if(R!=null&&R.find(n=>(n==null?void 0:n.key)===s))return o.replace(/['"]/g,"").trim();if(m.cloneDeep(o).split("[").length-1>1){const n=m.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=m.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(he(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return Re(m.cloneDeep(o))}}catch(n){return console.error("解析失败:",n),o}},lo=o=>({[o==null?void 0:o.key]:eo(o==null?void 0:o.value,o==null?void 0:o.key)}),no=o=>{try{if(m.cloneDeep(o).split("[").length-1>1){const s=m.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(m.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(s){return console.error("解析失败:",s),o}},oo=o=>{const s=o.match(/\(([^)]+)\)/);return s?s[1]:""},ao=o=>{const s=o.match(/^([^(]+)\s*\(/);return s?s[1].trim():o},Be=o=>o.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(s=>s.trim()).filter(s=>s).join("/"),so=o=>{var i,h;let s=[],n=[];const l=(i=m.cloneDeep(o))==null?void 0:i.map(g=>g==null?void 0:g.key),a=[...new Set((h=m.cloneDeep(l))==null?void 0:h.map(g=>oo(g)))];a==null||a.forEach(g=>{let k=o==null?void 0:o.filter(_=>_.key.includes(g));k==null||k.forEach(_=>{_!=null&&_.key.includes("Menus")&&(s.push({key:"GroupName",value:Be(_==null?void 0:_.value)}),n.push(Be(_==null?void 0:_.value)))});let y=o==null?void 0:o.filter(_=>_.key.includes(g)&&!(_!=null&&_.key.includes("Menus")));y=y==null?void 0:y.map(_=>(_.key=ao(_.key),_));const $={key:"GroupContents",value:y};s.push($)});const t={key:"Menus",value:n};return s.unshift(t),s},We=o=>{var s,n;if(Array.isArray(Object.keys(o))&&((s=Object.keys(o))==null?void 0:s.length)>0){let l=[];return(n=Object.entries(o))==null||n.forEach(([a,t])=>{var h,g;let i=[];if(i.push(a),((h=Object.keys(t))==null?void 0:h.length)>0){let k=[];(g=We(t))==null||g.forEach(y=>{k.push(y)}),k==null||k.forEach(y=>{i.push(y)})}l.push(i)}),l}},to=(o,s)=>{var l;let n=s;return Array.isArray(Object.keys(o))&&((l=Object.entries(o))==null||l.forEach(([a,t])=>{let i=[a];if(typeof t=="object"&&t!==null){let h=We(t);h==null||h.forEach(g=>{i.push(g)})}n.push(i)})),n},ro=o=>{const s={};return o.forEach(l=>{const a=l.split("/");let t=s;a.forEach(i=>{t[i]||(t[i]={}),t=t[i]})}),to(s,[])},ze=o=>ro(o),co=o=>{var s,n,l,a,t,i,h,g;try{const k=Ee((n=(s=m.cloneDeep(o))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")),y=(a=(l=m.cloneDeep(k))==null?void 0:l.filter(D=>!D.includes("/*")))==null?void 0:a.map(D=>Kn(D)),$=so(y),_=[];if(((t=$==null?void 0:$.find(D=>(D==null?void 0:D.key)==="Menus"))==null?void 0:t.value.length)===0)return!1;(i=m.cloneDeep($))==null||i.forEach(D=>{var F,C,v,p,u;R!=null&&R.find(c=>{var r,b;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((b=D==null?void 0:D.key)==null?void 0:b.toUpperCase())})?_.push({comp:((F=R==null?void 0:R.find(c=>{var r,b;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((b=D==null?void 0:D.key)==null?void 0:b.toUpperCase())}))==null?void 0:F.value)??"",name:(C=D==null?void 0:D.value)==null?void 0:C.replace(/[’]|[‘]|[']/g,""),compData:[]}):U!=null&&U.find(c=>{var r,b;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((b=D==null?void 0:D.key)==null?void 0:b.toUpperCase())})&&((_==null?void 0:_.length)===0&&(v=D.key)!=null&&v.includes("Menus")&&_.push({comp:"Menu",name:"",compData:[]}),(p=_==null?void 0:_[(_==null?void 0:_.length)-1])!=null&&p.compData&&_[(_==null?void 0:_.length)-1].compData.push({key:(u=U==null?void 0:U.find(c=>{var r,b;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((b=D==null?void 0:D.key)==null?void 0:b.toUpperCase())}))==null?void 0:u.value,contents:D==null?void 0:D.value}))});let B=(h=m.cloneDeep(_))==null?void 0:h.map(D=>{var F;return D!=null&&D.compData&&(D.compData=(F=D==null?void 0:D.compData)==null?void 0:F.map(C=>{var v,p,u,c,r,b,V,I,O,f,A;if((C==null?void 0:C.key)==="formFlex")C.contents=((p=(v=C.contents)==null?void 0:v.replace(/[’]|[‘]|[']/g,""))==null?void 0:p.toUpperCase())!=="Vertical".toUpperCase();else if((C==null?void 0:C.key)==="groupContents")C.contents=(u=m.cloneDeep(C.contents))==null?void 0:u.map(N=>lo(m.cloneDeep(N)));else if(Array.isArray(C==null?void 0:C.contents))C.contents=ze(C.contents);else if(((r=(c=C==null?void 0:C.contents)==null?void 0:c.trim())!=null&&r.startsWith("[")||(V=(b=C.contents)==null?void 0:b.trim())!=null&&V.startsWith("【"))&&((O=(I=C.contents)==null?void 0:I.trim())!=null&&O.endsWith("]")||(A=(f=C.contents)==null?void 0:f.trim())!=null&&A.endsWith("】")))C.contents=no(m.cloneDeep(C.contents));else{if(!C.contents)return;C.contents=Re(m.cloneDeep(C.contents))}return C})),D});return B=(g=m.cloneDeep(B))==null?void 0:g.map(D=>{var F;return(D==null?void 0:D.comp)==="Group"&&(D.compData=(F=D.compData)==null?void 0:F.map(C=>{var p;let v=[];return(p=C.contents)==null||p.forEach(u=>{var c,r,b,V,I,O,f,A,N,d,w,E;if(R!=null&&R.find(T=>{var x,L,S;return((x=T==null?void 0:T.key)==null?void 0:x.toUpperCase())===((S=(L=Object.keys(u))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))v.push({comp:(c=R==null?void 0:R.find(T=>{var x,L,S;return((x=T==null?void 0:T.key)==null?void 0:x.toUpperCase())===((S=(L=Object.keys(u))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))==null?void 0:c.value,name:(b=(r=Object.values(u))==null?void 0:r[0])==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(U!=null&&U.find(T=>{var x,L,S;return((x=T==null?void 0:T.key)==null?void 0:x.toUpperCase())===((S=(L=Object.keys(u))==null?void 0:L[0])==null?void 0:S.toUpperCase())})){if((v==null?void 0:v.length)===0)return;(V=v==null?void 0:v[(v==null?void 0:v.length)-1])!=null&&V.compData&&v[(v==null?void 0:v.length)-1].compData.push({key:(I=U==null?void 0:U.find(T=>{var x,L,S;return((x=T==null?void 0:T.key)==null?void 0:x.toUpperCase())===((S=(L=Object.keys(u))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))==null?void 0:I.value,contents:(O=Object.values(u))==null?void 0:O[0]})}else if((A=(f=Object.keys(u))==null?void 0:f[0])!=null&&A.includes("$")){const T=(d=(N=Object.keys(m.cloneDeep(u)))==null?void 0:N[0])==null?void 0:d.split("$");v[(v==null?void 0:v.length)-1].compData.push({key:(w=U==null?void 0:U.find(x=>{var L,S;return((L=x==null?void 0:x.key)==null?void 0:L.toUpperCase())===((S=T==null?void 0:T[0])==null?void 0:S.toUpperCase())}))==null?void 0:w.value,contents:(E=Object.values(u))==null?void 0:E[0],selectLabel:T==null?void 0:T[1]})}return u}),C.contents=v,C})),D}),B}catch{return!1}},we=e.ref(0),Me=o=>{const s=[];let n=null;for(let l=0;l<o.length;l++){const a=o[l];if(Array.isArray(a))n&&(n.children=Me(a));else{const t={label:a};s.push(t),n=t}}return s},Ge=o=>{let s=0;for(const n of o)s++,n.children&&(s+=Ge(n.children));return s},qe=(o,s,n=[])=>{let l=0;for(const a of s){if(l>=o.length)break;const t=[...o[l]];if(n.push(t),l++,a.children&&a.children.length>0){const i=[];qe(o.slice(l),a.children,i),i.length>0&&(t.push(i),l+=Ge(a.children))}}return n},io=(o,s)=>{let n=[];return o==null||o.forEach(a=>{a.some(t=>Array.isArray(t))?n.push(...a):n.push(a)}),qe(n,s)},De=o=>{const s={label:o[0].trim()};if(o.length>1){const n=o.slice(1);n.length===1&&Array.isArray(n[0])?s.children=n[0].map(l=>Array.isArray(l)?De(l):{label:l.trim()}):s.children=n.map(l=>Array.isArray(l)?De(l):{label:l.trim()})}return s},Ie=o=>{let s=o.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return s=s.replace(/:}(?=,|]|}|$)/g,':""}'),s=s.replace(/:,(?=\s*")/g,':"",'),s=s.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(n,l,a)=>`"${l}://${a}"`),s=s.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),s},uo=o=>{var n;return o.some(l=>!Array.isArray(l))?o:(n=m.cloneDeep(o))==null?void 0:n.map(l=>{let a=[];return l.some(t=>Array.isArray(t))?l==null||l.forEach(t=>{Array.isArray(t)&&a.push(De(t))}):l.some(t=>t.includes("["))?a.push(l):a=l.map(t=>({label:t.trim()})),a})},He=(o,s,n)=>{let l=o,a=n,t=s;return t.children&&(Array.isArray(a[a.length-1])?a[a.length-1].push(l[0]):a.push(l[0]),l.shift(),t=t.children),Array.isArray(t)&&t.forEach(i=>{if(i.children){const h=He(l,i,a);a=h[0],l=h[1]}}),[a,l]},po=(o,s)=>{let n=o,l=[];return s.length>0?s==null||s.forEach(a=>{let t=n==null?void 0:n[0];n.shift();const i=He(m.cloneDeep(n),a,t);t=i[0],n=i[1],l.push(t)}):l=n,l},_e=(o,s)=>{const n=uo(m.cloneDeep(o));return po(n,s)},fo=o=>{const s=[];let n=0;const l=o.length;for(;n<l;){const a=o[n];a.key==="tableColumns"&&n+1<l&&o[n+1].key==="tableContents"?(s.push({comp:"Table",compData:[a,o[n+1]],name:""}),n+=2):(s.push(a),n+=1)}return s},Ze=o=>_e([o],[]),ke=o=>{const s=[];return o==null||o.forEach(n=>n==null?void 0:n.forEach(a=>{var t,i;we.value++,s.push({id:we.value,key:(t=Object.keys(a))==null?void 0:t[0],value:(i=Object.values(a))==null?void 0:i[0],width:n.length})})),s},Te=o=>{let s=fo(o);return s=s==null?void 0:s.map(n=>{var l,a,t,i;if(n.comp==="Table")(l=n.compData)!=null&&l.find(h=>(h==null?void 0:h.key)==="header")||(n.compData=(a=n.compData)==null?void 0:a.map(h=>(h.key==="tableColumns"?h={key:"header",contents:_e(h.value,[])}:h={key:h.key,contents:h.value},h)),n.compData.push({key:"extraButton",contents:[{label:"新增"}]}),n.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(n.key==="form"){const h=(t=n==null?void 0:n.value)==null?void 0:t.map(g=>(Array.isArray(g)||(g=[g]),g));n={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke(h)}],name:""}}else if(n.key==="formTop"){const h=(i=n==null?void 0:n.value)==null?void 0:i.map(g=>(Array.isArray(g)||(g=[g]),g));n={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke(h)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return n}),s},ho=(o,s)=>{var h,g,k,y,$,_;const n=[],l=Me((g=(h=o==null?void 0:o.find(B=>B.key==="tableIndex"))==null?void 0:h.value)==null?void 0:g[0]);n.push({key:"tableIndexColumn",contents:s}),n.push({key:"tableIndex",contents:l});let a=[];const t=(k=o==null?void 0:o.find(B=>B.key==="tableColumns"))==null?void 0:k.value;t.length===1&&!(t!=null&&t[0].some(B=>Array.isArray(B)))?a=(y=t==null?void 0:t[0])==null?void 0:y.map(B=>({label:B})):a=_e(($=o==null?void 0:o.find(B=>B.key==="tableColumns"))==null?void 0:$.value,l),n.push({key:"header",contents:a});const i=io((_=o==null?void 0:o.find(B=>B.key==="tableContents"))==null?void 0:_.value,l);return n.push({key:"tableContents",contents:i}),n.push({key:"extraButton",contents:[{label:"新增"}]}),n.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),n},Ke=o=>o.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(s,n,l)=>{const a=Ke(l);return`"${n}",${a}`}),de=o=>{const s=o.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Ke(s).replace(/^"(.*)"$/,"$1")},mo=o=>{const s=new Set;return o.filter(n=>{const l=JSON.stringify(n);return s.has(l)?!1:s.add(l)})},Ve=o=>{var n;let s=[];return(n=m.cloneDeep(o))==null||n.forEach(l=>{var a;(a=l.contents)==null||a.forEach(t=>{s.push(t)})}),s=mo(s),s.push({label:"操作"}),[s]},yo=(o,s)=>o.reduce((n,l,a)=>{const t=Math.floor(a/s);return n[t]||(n[t]=[]),n[t].push(l),n},[]),Qe=o=>o.reduce((s,n)=>n.children&&n.children.length>0?s+Qe(n.children):s+1,0),ko=(o,s)=>{var l;let n=[];return(l=yo(o,Qe(s==null?void 0:s[0])-1))==null||l.forEach(a=>{let t=[];a.forEach(i=>{var h;Array.isArray(i.contents)?(h=i.contents)==null||h.forEach(g=>{t.push(g)}):t.push(i.contents)}),n.push(t)}),[n]},go=["方法体","输入","输出"],Oe=e.ref(1),Ee=o=>{let s;o.replaceAll(" ",`\r
2
+ `).includes(`\r
3
+ `)?s=o.replaceAll(" ",`\r
4
+ `).split(`\r
5
+ `).filter(a=>a.trim()!==""):s=o.replaceAll(" ",`\r
6
+ `).split(`
7
+ `).filter(a=>a.trim()!=="");const n=[];let l="";for(const a of s)a.includes("{")||l.includes("{")||a.includes("[")||l.includes("[")||a.includes("【")||l.includes("【")||a.includes("(")||l.includes("(")||a.includes("(")||l.includes("(")||a.includes("/*")||l.includes("/*")?(l+=a.trim(),m.cloneDeep(l).split("{").length-1===m.cloneDeep(l).split("}").length-1&&m.cloneDeep(l).split("【").length-1===m.cloneDeep(l).split("】").length-1&&m.cloneDeep(l).split("[").length-1===m.cloneDeep(l).split("]").length-1&&m.cloneDeep(l).split("(").length-1===m.cloneDeep(l).split(")").length-1&&m.cloneDeep(l).split("(").length-1===m.cloneDeep(l).split(")").length-1&&m.cloneDeep(l).split("/*").length-1===m.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},bo=o=>{const[s,n]=o.split(/=(.+)/),l=s.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},ge=o=>{let s;o.includes(":")?s=o.split(":").filter(a=>a.trim()!==""):s=o.split(":").filter(a=>a.trim()!=="");const n=[];let l="";for(const a of s)a.includes("{")||l.includes("{")||a.includes("[")||l.includes("[")||a.includes("【")||l.includes("【")||a.includes("(")||l.includes("(")||a.includes("(")||l.includes("(")||a.includes("/*")||l.includes("/*")?(l=l!==""?l+":"+a.trim():a.trim(),m.cloneDeep(l).split("{").length-1===m.cloneDeep(l).split("}").length-1&&m.cloneDeep(l).split("【").length-1===m.cloneDeep(l).split("】").length-1&&m.cloneDeep(l).split("[").length-1===m.cloneDeep(l).split("]").length-1&&m.cloneDeep(l).split("(").length-1===m.cloneDeep(l).split(")").length-1&&m.cloneDeep(l).split("(").length-1===m.cloneDeep(l).split(")").length-1&&m.cloneDeep(l).split("/*").length-1===m.cloneDeep(l).split("*/").length-1&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},vo=o=>/^[\x00-\x7F]*$/.test(o),Co=o=>{var a;const s=o.map(t=>{var h,g;let i=(g=(h=t.key.split("("))==null?void 0:h[1])==null?void 0:g.trim();return i.slice(0,i.length-1)}),n=s==null?void 0:s.map(t=>{var h;return(h=ge(t))==null?void 0:h.map(g=>{var k;if(g.includes("{")){let y=(k=g.split(":"))==null?void 0:k[0];g=y.slice(1,y.length)}return g})}).filter(t=>t.length!==0),l=(a=n==null?void 0:n.filter(t=>t.length!==0))==null?void 0:a.map(t=>{let i="";return t.forEach(h=>{h.includes("{")||(i=i===""?i+m.cloneDeep(h):i+"/"+m.cloneDeep(h))}),i});return ze([...new Set(l)])},Xe=o=>{var n,l,a,t,i,h,g,k;const s=(l=(n=o.split("("))==null?void 0:n[1])==null?void 0:l.trim();return((a=ge(s.slice(0,s.length-1)))==null?void 0:a.length)>0?s.slice(0,s.length-1):(k=(g=(h=(i=(t=o.split("("))==null?void 0:t[1])==null?void 0:i.trim())==null?void 0:h.split(")"))==null?void 0:g[0])==null?void 0:k.trim()},Do=o=>{var a;if(!o)return;const s=Xe(o),n=(a=ge(s))==null?void 0:a.map(t=>{var i;if(t.includes("{")){let h=(i=t.split(":"))==null?void 0:i[0];t=h.slice(1,h.length)}return t});let l="";return n.forEach(t=>{t.includes("{")||(l=l===""?l+m.cloneDeep(t):l+"/"+m.cloneDeep(t))}),l},_o=o=>{const s=o.match(/\[(.*)\]/s);if(s){const n=`[${s[1]}]`;try{const l=n.replace(/([^\[\],\s]+)/g,'"$1"');return JSON.parse(l)}catch{return JSON.parse(n.replace(/\[(\s*)(,|])/g,'[""$2').replace(/([^\[\],\s]+)/g,'"$1"').replace(/""/g,'"'))}}},Eo=o=>{var t;if(!o)return;const s=Xe(o);let n=[],l=[],a=[];return(t=ge(s))==null||t.forEach(i=>{var h;i.includes("[")?n.push(_o(i)):i.includes("{")&&(vo((h=i.slice(1,i.length-1).split(":"))==null?void 0:h[0])?a.push(JSON.parse(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):Y.IsJson(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))?l.push(JSON.parse(i.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):i.includes("$"))}),[n,l,a]},$o=o=>{const s=[];let n="";for(const l of o)l.includes("[")||n.includes("[")||l.includes("/*")||n.includes("/*")?(n+=l.trim(),m.cloneDeep(n).split("{").length-1===m.cloneDeep(n).split("}").length-1&&m.cloneDeep(n).split("【").length-1===m.cloneDeep(n).split("】").length-1&&m.cloneDeep(n).split("[").length-1===m.cloneDeep(n).split("]").length-1&&m.cloneDeep(n).split("(").length-1===m.cloneDeep(n).split(")").length-1&&m.cloneDeep(n).split("(").length-1===m.cloneDeep(n).split(")").length-1&&m.cloneDeep(n).split("/*").length-1===m.cloneDeep(n).split("*/").length-1&&(s.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):s.push(l.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},Se=o=>{var i,h;const s=[],n=/(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/,l=o.match(n);if(l){const g=l[1]||l[3],k=l[2]||l[4];if(g&&k){const y=`${g}/${k}`;s.push(y)}}const a=/(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i,t=o.match(a);return t?s.push(t[0].replace(/\)+$/,"")):(o==null?void 0:o.split(",").length)===2&&s.push((h=(i=o==null?void 0:o.split(","))==null?void 0:i[1])==null?void 0:h.trim()),s},ve=o=>{let s=o.replace(/\[\s*,\s*,/g,'[{"": ""}, {"": ""},');return s=s.replace(/\[\s*,/g,'[{"": ""},'),s=s.replace(/,\s*,/g,', {"": ""},'),s=s.replace(/,\s*\]/g,', {"": ""}]'),s=s.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g,(n,l,a,t,i)=>a.includes("'")?`:${l}${a}${t}${i}`:`:${l}"${a}"${t}${i}`),s=s.replace(/:\s*([,\]}])/g,': ""$1'),s},xo=o=>!/\[[^\]]*\{[^\]]*\]/.test(o),No=o=>{const s=m.cloneDeep(o).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/),n=s?`${s[2]}/${s[3]}`:null,l=o.match(/\[\{([^}]+)\}\]/),a=l==null?void 0:l[1].replaceAll(":","").replaceAll("'",'"').trim();let t=null;if(a)try{t=JSON.parse(a)}catch(i){console.error("解析数组失败:",i)}return[n,t]},Ao=o=>{var h,g,k,y,$,_,B,D,F,C,v;let s=[],n=[],l={},a=[],t=o.trim(),i=[];if(t.trim().includes("输入")&&t.trim().includes("输出")){let p=[],u=o.trim();u=m.cloneDeep(u).slice(1,m.cloneDeep(u).length-1);const c=/(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;(D=u.match(c))==null||D.forEach((r,b)=>{var O;const V=r;let I=[];(O=V.slice(1,V.length-1).replace(":","$:").split("$:"))==null||O.forEach(f=>{var A,N,d;if(go.find(w=>f.includes(w)))if(!f.includes("=="))I.push({key:"tableIndexColumn",contents:f.replaceAll("'","")});else{let w=[];const E=f.replaceAll("'","").split("==");w.push(E==null?void 0:E[0]),E!=null&&E[1].includes("[")?w.push(E==null?void 0:E[1].trim().slice(1,(E==null?void 0:E[1].length)-1).split(",")):w.push([E==null?void 0:E[1]]),I.push({key:"header",contents:[(N=(A=Ze([w]))==null?void 0:A[0])==null?void 0:N[0]]})}else{let w=f.trim().replaceAll(",",",").replaceAll("'",'"');if(b%3===0)w.slice(1,w.length-1).includes("[")?p.push({key:"tableIndex",contents:[{label:w}]}):p.push({key:"tableIndex",contents:[{label:w.slice(1,w.length-1)}]});else if((w==null?void 0:w[0])==="{"){let E=[];const T=w.slice(1,w.length-1).split(":");if(T.every(x=>Y.IsJson(x.trim()))){E.push({key:"tableContentName",contents:"详情"});let x=[];T.forEach((L,S)=>{if(S===0){const j=JSON.parse(L).map(W=>({label:W}));j.push({label:"操作"}),x.push({key:"header",contents:j})}else x.push({key:"tableContents",contents:JSON.parse(L)})}),x.push({key:"extraButton",contents:[{label:"新增"}]}),x.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),E.push({comp:"Table",compData:x,name:""}),p.push({key:"tableContents",contents:[E]})}}else{let E=w;E.slice(1,E.length-1).includes("[")||E.slice(1,E.length-1).includes("{")?Y.IsJson(Ie(E.replace(/\s+/g,"")))&&((d=JSON.parse(Ie(E.replace(/\s+/g,""))))==null||d.map(T=>{if(Array.isArray(T==null?void 0:T[0])){const x=[];x.push({key:"tableContentName",contents:"详情"});let L=[];T.forEach(S=>{S.forEach(j=>{var W,M;Oe.value++,L.push({id:Oe.value,key:(W=Object.keys(j))==null?void 0:W[0],value:(M=Object.values(j))==null?void 0:M[0],width:S.length})})}),x.push({comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:L}],name:""}),p.push({key:"tableContents",contents:[x]})}else p.push({key:"tableContents",contents:T==null?void 0:T[0]})})):p.push({key:"tableContents",contents:E.trim().slice(1,E.length-1)})}}}),p.push(I==null?void 0:I[0])}),i.push({key:"tableIndex",contents:(F=p==null?void 0:p.filter(r=>(r==null?void 0:r.key)==="tableIndex"))==null?void 0:F.map(r=>{var b;return(b=r.contents)==null?void 0:b[0]})}),i.push({key:"extraButton",contents:[{label:"新增"}]}),i.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),i.push({key:"tableIndexColumn",contents:(v=(C=p==null?void 0:p.filter(r=>(r==null?void 0:r.key)==="tableIndexColumn"))==null?void 0:C[0])==null?void 0:v.contents}),i.push({key:"header",contents:Ve(p==null?void 0:p.filter(r=>(r==null?void 0:r.key)==="header"))}),i.push({key:"tableContents",contents:ko(p==null?void 0:p.filter(r=>(r==null?void 0:r.key)==="tableContents"),Ve(p==null?void 0:p.filter(r=>(r==null?void 0:r.key)==="header")))})}else{const p=(h=t.trim().split(",$"))==null?void 0:h[0];p[0]==="["?t=p.slice(1,p.length-1):t.includes(",$")&&(t=(g=t.trim().split(",$"))==null?void 0:g[0]);let u;if(t.includes("$")){t=m.cloneDeep(t),l.method=(y=(k=m.cloneDeep(t).trim())==null?void 0:k.slice(1,t.length).split("("))==null?void 0:y[0];let c;Se(t.slice(1,t.length-2)).length>1?c=Se(t.slice(1,t.length-2)):c=No(t),l.value=c}else Y.IsJson("["+ve(t).replaceAll("'",'"')+"]")&&!xo(ve(t).replaceAll("'",'"'))?(t=JSON.parse("["+ve(t).replaceAll("'",'"')+"]"),a=t):u=(_=($=m.cloneDeep(t).split("}"))==null?void 0:$.filter(c=>c!==""))==null?void 0:_.map(c=>{let r=c;return r[0]===","?r=r.slice(2,r.length):r=r.slice(1,r.length),r});(B=m.cloneDeep(u))==null||B.forEach(c=>{var r,b,V,I,O,f,A,N,d,w,E,T,x,L,S;if(c.includes("==")){const j=(T=c==null?void 0:c.split(":"))==null?void 0:T[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'),W=(x=c==null?void 0:c.split(":"))==null?void 0:x[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"');if(Y.IsJson(W.trim())?n.push(JSON.parse(W.trim())):n.push(JSON.parse(W.replaceAll("'",'"').trim())),j[0]!=="["){let M=[];Y.IsJson("["+de(j)+"]")?M.push(JSON.parse("["+de(j)+"]")):Y.IsJson("["+de(j).replaceAll("==",",")+"]")&&M.push(JSON.parse("["+de(j).replaceAll("==",",")+"]"));const K=m.cloneDeep(M);K.push(["操作"]),s.push(K)}else{const M=(L=j.slice(1,j.length-1).replaceAll(",",",|"))==null?void 0:L.split("|"),K=(S=$o(M))==null?void 0:S.map(z=>((z==null?void 0:z[z.length-1])===","&&(z=z.slice(0,z.length-1)),z));let Q=[];K==null||K.forEach(z=>{var X,H,G,Z;let ee=[];ee.push((X=z.split("=="))==null?void 0:X[0].trim().replace(/^"|"$/g,"")),((H=z.split("=="))==null?void 0:H[1].trim()[0])==="["?ee.push(JSON.parse((G=z.split("=="))==null?void 0:G[1].trim())):ee.push([JSON.parse((Z=z.split("=="))==null?void 0:Z[1].trim())]),Q.push(ee)});const oe=m.cloneDeep(Q);oe.push(["操作"]),s.push(oe)}}else{if(Y.IsJson((r=c==null?void 0:c.split(":"))==null?void 0:r[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'))){let j=JSON.parse((b=c==null?void 0:c.split(":"))==null?void 0:b[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'));Array.isArray(j)||(j=[j]),j.push("操作"),s.push(j)}Y.IsJson((O=(I=(V=c==null?void 0:c.split(":"))==null?void 0:V[1])==null?void 0:I.replace(/^"|"$/g,"'"))==null?void 0:O.replace(/'([^']+)'/g,'"$1"'))?n.push(JSON.parse((f=c==null?void 0:c.split(":"))==null?void 0:f[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"'))):Y.IsJson((w=(d=(N=(A=c==null?void 0:c.split(":"))==null?void 0:A[1])==null?void 0:N.replace(/^"|"$/g,"'"))==null?void 0:d.replaceAll("'",'"'))==null?void 0:w.replace(/'([^']+)'/g,'"$1"'))&&n.push(JSON.parse((E=c==null?void 0:c.split(":"))==null?void 0:E[1].replace(/^"|"$/g,"'").replaceAll("'",'"').replace(/'([^']+)'/g,'"$1"')))}})}return[s,n,i,l,a]},Bo=o=>{const s=[],n=Do(o==null?void 0:o.key),l=Eo(o==null?void 0:o.key),a=Ao(o==null?void 0:o.value),t=l==null?void 0:l[0],i=a==null?void 0:a[4],h=l==null?void 0:l[1],g=l==null?void 0:l[2],k=a==null?void 0:a[0],y=a==null?void 0:a[1],$=a==null?void 0:a[2],_=a==null?void 0:a[3];return n&&s.push({key:"contentPath",value:n}),(t==null?void 0:t.length)>0&&s.push({key:"tableIndex",value:t}),_&&s.push({key:"extraButton",value:_}),(i==null?void 0:i.length)>0&&s.push({key:"form",value:i}),(h==null?void 0:h.length)>0&&s.push({key:"formTop",value:h}),(g==null?void 0:g.length)>0&&s.push({key:"extra",value:g}),($==null?void 0:$.length)>0&&s.push({comp:"Table",compData:$,name:""}),(k==null?void 0:k.length)>0&&s.push({key:"tableColumns",value:k}),(y==null?void 0:y.length)>0&&s.push({key:"tableContents",value:y}),s},wo=o=>{let s=[],n=[];o==null||o.forEach(a=>{Array.isArray(a)&&(a==null||a.forEach(t=>{var i;t.comp==="FormTop"&&((i=t.compData)==null||i.forEach(h=>{(h==null?void 0:h.key)==="formContent"&&(n=[...n,...h.contents])}))}))});const l=n.reduce((a,t)=>a.find(h=>(h==null?void 0:h.key)===(t==null?void 0:t.key))?a:a.concat([t]),[]);return l.length!==0&&s.push([{comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:l},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}]}]),o==null||o.forEach(a=>{if(Array.isArray(a)){const t=a.filter(i=>i.comp!=="FormTop");s.push(t)}else a.comp!=="FormTop"&&s.push(a)}),s},Io=(o,s)=>{const n=s.split("/");let l=[];return o==null||o.forEach(a=>{var h,g,k,y,$,_,B,D,F,C,v;const t=[],i=(g=(h=a.find(p=>p.key==="tableIndex"))==null?void 0:h.value)==null?void 0:g[0];if(i&&!i.some(p=>Array.isArray(p))){const p=(y=(k=a.find(u=>u.key==="tableColumns"))==null?void 0:k.value)==null?void 0:y[0];t.push({key:"tableIndexColumn",contents:n[n.length-1]}),t.push({key:"tableIndex",contents:i==null?void 0:i.map(u=>({label:u}))}),t.push({key:"extraButton",contents:[{label:"新增"}]}),t.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),Array.isArray(p)&&p.some(u=>Array.isArray(u))?t.push({key:"header",contents:Ze(p)}):t.push({key:"header",contents:Array.isArray(p)?p==null?void 0:p.map(u=>({label:u})):[p].map(u=>({label:u}))}),t.push({key:"tableContents",contents:Array.isArray(p)?(_=($=a.find(u=>u.key==="tableContents"))==null?void 0:$.value)==null?void 0:_[0]:(F=(D=(B=a.find(u=>u.key==="tableContents"))==null?void 0:B.value)==null?void 0:D[0])==null?void 0:F.map(u=>[u])}),l.push({comp:"Table",name:"",compData:t}),a!=null&&a.find(u=>(u==null?void 0:u.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke([(C=a==null?void 0:a.find(u=>(u==null?void 0:u.key)==="formTop"))==null?void 0:C.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})}else i?(l.push({comp:"Table",name:"",compData:ho(a,n[n.length-1])}),a!=null&&a.find(p=>(p==null?void 0:p.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke([(v=a==null?void 0:a.find(p=>(p==null?void 0:p.key)==="formTop"))==null?void 0:v.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})):a.some(p=>p.key==="extra")?l.push({comp:"calculator",name:"",compData:Te(a)}):l.push(Te(a))}),wo(l)},To=(o,s)=>{var a,t;const n=o.map(i=>i.filter(h=>h.key!=="contentPath"));return{comp:"Group",compData:[{contents:Io(n,s),key:"groupContents"}],name:(t=(a=o[0])==null?void 0:a.find(i=>i.key==="contentPath"))==null?void 0:t.value}},Vo=o=>{var a;const s=[],n=m.cloneDeep(o).map(t=>{var i;if(t!=null&&t.find(h=>(h==null?void 0:h.key)==="contentPath"))return(i=t==null?void 0:t.find(h=>(h==null?void 0:h.key)==="contentPath"))==null?void 0:i.value}).filter(t=>t!==""),l=[...new Set(n)];return(a=l==null?void 0:l.filter(t=>t))==null||a.forEach(t=>{var i;s.push(To((i=m.cloneDeep(o))==null?void 0:i.filter(h=>h.find(g=>g.key==="contentPath"&&g.value===t)),t))}),s},Oo=o=>{let s=[];s.push({comp:"Menu",compData:[{contents:Co(m.cloneDeep(o)),key:"menuContents"}],name:""});const n=o.map(l=>Bo(l)).filter(l=>l.length!==0);return s=[...s,...Vo(n)],s},So=o=>{var s,n,l,a,t;try{const i=(l=Ee((n=(s=m.cloneDeep(o))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")))==null?void 0:l.filter(k=>k!==""),h=(t=(a=m.cloneDeep(i))==null?void 0:a.filter(k=>!k.includes("/*")))==null?void 0:t.map(k=>bo(k));return Oo(h)}catch{return!1}},fe=e.ref(0),Ce=e.ref(0),Fo=o=>{const s=o.trim().replace(/^'|'$/g,""),n=/((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g,l={};let a;for(;(a=n.exec(s))!==null;){const t=a[1];let i=a[2].trim();(i.match(/\[/g)||[]).length!==(i.match(/\]/g)||[]).length&&(i=i==null?void 0:i.replace(/]$/,"")),l[t]?(l[t+Ce.value]&&Ce.value++,l[t+Ce.value]=t+"="+i):l[t]=t+"="+i}return l},Ye=o=>{const[s,n]=o.split("=").map(t=>t.trim()),l=s.replace(/['"]/g,""),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},Lo=o=>{var i;let s=[];const[n,l]=o.split(/=(.+)/),a=n.replace(/['"]/g,"").trim(),t=l.replace(/^['"]|['"]$/g,"");return(i=Object.values(Fo(t)))==null||i.forEach(h=>{s.push(Ye(h))}),{key:a,value:s}},me=o=>{try{return JSON.parse(o),!0}catch{return!1}},el=o=>{try{const s=o.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(m.cloneDeep(s).split("{").length-1>1){let n=m.cloneDeep(s).replace(/^\{(.*)\}$/,"[$1]");if(me(n)&&!n.includes("$")||(n=n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),me(n)){const l=JSON.parse(n);let a=[];return l==null||l.forEach(t=>{var i;(i=Object.entries(m.cloneDeep(t)))==null||i.forEach(h=>{fe.value++,a.push({id:fe.value,key:(h==null?void 0:h[0])??"",value:(h==null?void 0:h[1])===""?"":h==null?void 0:h[1],width:Object.keys(m.cloneDeep(t)).length})})}),a}else return console.error("转换类型不正确:"),[]}else if(me(s)){const n=JSON.parse(s);return Object.entries(n).map(([l,a])=>(fe.value++,{id:fe.value,key:l,value:a===""?"":a,width:1}))}else return s}catch(s){return console.error("转换失败:",s),[]}},jo=(o,s)=>{try{if(R!=null&&R.find(n=>(n==null?void 0:n.key)===s))return JSON.parse(o.replace(/[’]|[‘]|[']/g,'"'));if(m.cloneDeep(o).split("[").length-1>1){const n=m.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=m.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(me(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return el(m.cloneDeep(o))}}catch(n){return console.error("解析失败:",n),o}},Jo=o=>({[o==null?void 0:o.key]:jo(o==null?void 0:o.value,o==null?void 0:o.key)}),Uo=o=>{try{if(m.cloneDeep(o).split("[").length-1>1){const s=m.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(m.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(s){return console.error("解析失败:",s),o}},ll=o=>{var s,n,l,a,t,i;try{const h=Ee((n=(s=m.cloneDeep(o))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")),g=(l=m.cloneDeep(h))==null?void 0:l.map($=>{var B,D;let _=(D=(B=m.cloneDeep($))==null?void 0:B.split("="))==null?void 0:D[0];return _!=null&&_.includes("GroupContents")?Lo($):Ye($)}),k=[];(a=m.cloneDeep(g))==null||a.forEach($=>{var _,B,D,F,C;R!=null&&R.find(v=>{var p,u;return((p=v==null?void 0:v.key)==null?void 0:p.toUpperCase())===((u=$==null?void 0:$.key)==null?void 0:u.toUpperCase())})?k.push({comp:((_=R==null?void 0:R.find(v=>{var p,u;return((p=v==null?void 0:v.key)==null?void 0:p.toUpperCase())===((u=$==null?void 0:$.key)==null?void 0:u.toUpperCase())}))==null?void 0:_.value)??"",name:(B=$==null?void 0:$.value)==null?void 0:B.replace(/[’]|[‘]|[']/g,""),compData:[]}):U!=null&&U.find(v=>{var p,u;return((p=v==null?void 0:v.key)==null?void 0:p.toUpperCase())===((u=$==null?void 0:$.key)==null?void 0:u.toUpperCase())})&&((k==null?void 0:k.length)===0&&(D=$.key)!=null&&D.includes("Menus")&&k.push({comp:"Menu",name:"",compData:[]}),(F=k==null?void 0:k[(k==null?void 0:k.length)-1])!=null&&F.compData&&k[(k==null?void 0:k.length)-1].compData.push({key:(C=U==null?void 0:U.find(v=>{var p,u;return((p=v==null?void 0:v.key)==null?void 0:p.toUpperCase())===((u=$==null?void 0:$.key)==null?void 0:u.toUpperCase())}))==null?void 0:C.value,contents:$==null?void 0:$.value}))}),console.log("newContents",k);let y=(t=m.cloneDeep(k))==null?void 0:t.map($=>{var _;return $!=null&&$.compData&&($.compData=(_=$==null?void 0:$.compData)==null?void 0:_.map(B=>{var D,F,C,v,p,u,c,r,b,V,I;if((B==null?void 0:B.key)==="formFlex")B.contents=((F=(D=B.contents)==null?void 0:D.replace(/[’]|[‘]|[']/g,""))==null?void 0:F.toUpperCase())!=="Vertical".toUpperCase();else if((B==null?void 0:B.key)==="groupContents")B.contents=(C=m.cloneDeep(B.contents))==null?void 0:C.map(O=>Jo(m.cloneDeep(O)));else if(((p=(v=B.contents)==null?void 0:v.trim())!=null&&p.startsWith("[")||(c=(u=B.contents)==null?void 0:u.trim())!=null&&c.startsWith("【"))&&((b=(r=B.contents)==null?void 0:r.trim())!=null&&b.endsWith("]")||(I=(V=B.contents)==null?void 0:V.trim())!=null&&I.endsWith("】")))B.contents=Uo(m.cloneDeep(B.contents));else{if(!B.contents)return;B.contents=el(m.cloneDeep(B.contents))}return B})),$});return y=(i=m.cloneDeep(y))==null?void 0:i.map($=>{var _;return($==null?void 0:$.comp)==="Group"&&($.compData=(_=$.compData)==null?void 0:_.map(B=>{var F;let D=[];return(F=B.contents)==null||F.forEach(C=>{var v,p,u,c,r,b,V,I,O,f,A,N;if(R!=null&&R.find(d=>{var w,E,T;return((w=d==null?void 0:d.key)==null?void 0:w.toUpperCase())===((T=(E=Object.keys(C))==null?void 0:E[0])==null?void 0:T.toUpperCase())}))D.push({comp:(v=R==null?void 0:R.find(d=>{var w,E,T;return((w=d==null?void 0:d.key)==null?void 0:w.toUpperCase())===((T=(E=Object.keys(C))==null?void 0:E[0])==null?void 0:T.toUpperCase())}))==null?void 0:v.value,name:(u=(p=Object.values(C))==null?void 0:p[0])==null?void 0:u.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(U!=null&&U.find(d=>{var w,E,T;return((w=d==null?void 0:d.key)==null?void 0:w.toUpperCase())===((T=(E=Object.keys(C))==null?void 0:E[0])==null?void 0:T.toUpperCase())})){if((D==null?void 0:D.length)===0)return;(c=D==null?void 0:D[(D==null?void 0:D.length)-1])!=null&&c.compData&&D[(D==null?void 0:D.length)-1].compData.push({key:(r=U==null?void 0:U.find(d=>{var w,E,T;return((w=d==null?void 0:d.key)==null?void 0:w.toUpperCase())===((T=(E=Object.keys(C))==null?void 0:E[0])==null?void 0:T.toUpperCase())}))==null?void 0:r.value,contents:(b=Object.values(C))==null?void 0:b[0]})}else if((I=(V=Object.keys(C))==null?void 0:V[0])!=null&&I.includes("$")){const d=(f=(O=Object.keys(m.cloneDeep(C)))==null?void 0:O[0])==null?void 0:f.split("$");D[(D==null?void 0:D.length)-1].compData.push({key:(A=U==null?void 0:U.find(w=>{var E,T;return((E=w==null?void 0:w.key)==null?void 0:E.toUpperCase())===((T=d==null?void 0:d[0])==null?void 0:T.toUpperCase())}))==null?void 0:A.value,contents:(N=Object.values(C))==null?void 0:N[0],selectLabel:d==null?void 0:d[1]})}return C}),B.contents=D,B})),$}),y}catch{return!1}},Po=o=>ll(o),Ro=o=>!!ll(o),re=e.ref(0),Wo=o=>o.reduce((n,l)=>{var t,i;const a=Object.values(n);return(((t=Object.keys(n))==null?void 0:t.length)===0||a[a.length-1].length>=(l==null?void 0:l.width))&&(n[re.value]=[],re.value++),n[re.value-1].push(l),((i=Object.keys(n))==null?void 0:i.length)===(l==null?void 0:l.width)&&(n[re.value]=[],re.value++),n},{});exports.arrayToNumberArray=Wo;exports.expandContentStringToJson=So;exports.expandNewStringToJson=co;exports.expandStringToJson=Po;exports.getComponent=Pe;exports.isExpandStringToJson=Ro;exports.slotContent=Hn;