ss-component-new 1.1.204 → 1.1.206
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{array-bExKAUYR.cjs → array-C951I9ZR.cjs} +2 -2
- package/dist/{array-BFhKYj7r.js → array-DT5eMpZM.js} +773 -800
- package/dist/{cloneDeep-Dq88RgWY.js → cloneDeep-BSnjcvv5.js} +1 -1
- package/dist/{cloneDeep-BCr0AurG.cjs → cloneDeep-Dm67A16r.cjs} +1 -1
- package/dist/{index-lfgJD0L5.js → index-9MBPFY_y.js} +7 -7
- package/dist/{index-B7u8L5ZJ.cjs → index-9RBep-vE.cjs} +1 -1
- package/dist/{index-BI8Ay1S1.js → index-B2NSkb9j.js} +98 -92
- package/dist/{index-DxIdjoxy.js → index-B54pC41M.js} +6 -6
- package/dist/{index-DOEcQixr.js → index-B5uYKK-r.js} +3 -3
- package/dist/{index-snM5YAh4.cjs → index-BRXLwo6T.cjs} +1 -1
- package/dist/{index-B8Miz_Cq.cjs → index-BRmrz6hs.cjs} +1 -1
- package/dist/{index-DogEyKcQ.js → index-BS5_L6So.js} +1 -1
- package/dist/{index-BYTj8UHM.cjs → index-BY0RSTld.cjs} +1 -1
- package/dist/{index-JFe7di24.js → index-BgxS38-5.js} +3 -3
- package/dist/{index--Xb7ij8h.cjs → index-BhOam20Y.cjs} +1 -1
- package/dist/index-Bo4f4i3u.cjs +1 -0
- package/dist/{index-Ci--zW_l.cjs → index-BoohLrvx.cjs} +1 -1
- package/dist/{index-BDiB9HCu.js → index-BqXb4jkx.js} +21 -21
- package/dist/{index-nc4_Bpdv.cjs → index-BtYV9wZ1.cjs} +1 -1
- package/dist/{index-kMOvkC5Z.cjs → index-Btvdv2CB.cjs} +1 -1
- package/dist/{index-D73Q_nmy.cjs → index-C79DONYl.cjs} +1 -1
- package/dist/{index-Bd5QGxn7.cjs → index-C7LTVxjJ.cjs} +1 -1
- package/dist/{index-YDZx5P00.cjs → index-C8YFIcCS.cjs} +1 -1
- package/dist/{index-B-TxGWuh.cjs → index-CAD75-U5.cjs} +1 -1
- package/dist/{index-CWrT1c43.cjs → index-CDOQqVS9.cjs} +1 -1
- package/dist/{index-DQj83_aM.js → index-CJ2vvRlp.js} +3 -3
- package/dist/{index-bPZ2MclO.js → index-COnCsnye.js} +4 -4
- package/dist/{index-dr1odtaY.cjs → index-CPli5lGn.cjs} +2 -2
- package/dist/{index-BJuKaxGz.js → index-CU_CVgGm.js} +5 -5
- package/dist/{index-DVw7tf49.js → index-CVG4BxhU.js} +6 -6
- package/dist/{index-CSs-MY84.cjs → index-CbKf1srR.cjs} +1 -1
- package/dist/{index-DJ9JnJgt.js → index-ChXx47Nd.js} +1 -1
- package/dist/{index-0eAIyYff.cjs → index-D67H_i_2.cjs} +1 -1
- package/dist/{index-r3Nx3snx.cjs → index-D9LgYDJ7.cjs} +1 -1
- package/dist/{index-DelI4OVL.js → index-D9m-yKwB.js} +7 -7
- package/dist/{index-B_ldqUKR.js → index-DGcfdKSc.js} +6 -6
- package/dist/{index-CNviXSeZ.js → index-Dcgzhk0g.js} +12 -12
- package/dist/{index-CphtNZ9f.js → index-DfizSel-.js} +5 -5
- package/dist/{index-BTe5xHk0.js → index-DfzxzUaD.js} +6 -6
- package/dist/{index-DAbdQlPV.js → index-DjgWFWcx.js} +1 -1
- package/dist/{index-gJZhOiq9.js → index-DtrdClhp.js} +8 -8
- package/dist/{index-CAGxWFn3.cjs → index-Dvh9OOmZ.cjs} +1 -1
- package/dist/{index-CrDB6nwv.cjs → index-FBqo5pat.cjs} +1 -1
- package/dist/{index-BTmQwpJo.cjs → index-P0iufRrZ.cjs} +1 -1
- package/dist/{index-DFQ7hQT3.js → index-VZljavSJ.js} +1 -1
- package/dist/{index-DT5En52_.cjs → index-me3dUHxR.cjs} +1 -1
- package/dist/{index-m4bWHH6F.cjs → index-nJWX2ZAR.cjs} +1 -1
- package/dist/{index-CC4cb6ld.js → index-tiwgrLDl.js} +1 -1
- package/dist/{index-CVzNs53h.js → index-vz7bNYGF.js} +5 -5
- package/dist/{index-DmVGnOrm.js → index-xaYo22hv.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-1n66gqmK.cjs → index.vue_vue_type_script_setup_true_lang-BLu51RWf.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-9MyavSYE.js → index.vue_vue_type_script_setup_true_lang-D5gRxTFE.js} +4 -4
- package/dist/{index.vue_vue_type_script_setup_true_lang-CPm96puV.cjs → index.vue_vue_type_script_setup_true_lang-DICDRYNs.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BjyJ6UQq.js → index.vue_vue_type_script_setup_true_lang-D_Cis3-0.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-Bz7R4y-8.cjs → index.vue_vue_type_style_index_0_scoped_997b1786_lang-C4FBcW_5.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-CtfzWM73.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-kOZc_2yO.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_fb273504_lang-CqrG0OgP.cjs → index.vue_vue_type_style_index_0_scoped_fb273504_lang-B5jMmftD.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_fb273504_lang-MwT97C_Q.js → index.vue_vue_type_style_index_0_scoped_fb273504_lang-BGkRxRkA.js} +8 -8
- package/dist/{login-MlPjBP9y.js → login-DKhzW5Yh.js} +2 -2
- package/dist/{login-RagDvJln.cjs → login-lrq6SlO-.cjs} +1 -1
- package/dist/{main-Df6GUSmS.cjs → main-CLXZpchu.cjs} +1 -1
- package/dist/{main-D3QI9caW.js → main-CRH-nlgJ.js} +5 -5
- package/dist/{menu-CgUytgzT.js → menu-BH9-dUQM.js} +1 -1
- package/dist/{menu-CK3bK1Rk.cjs → menu-CjMhVMcW.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +7 -7
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/index-BF7CacOf.cjs +0 -1
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";const ke=require("./index-m4bWHH6F.cjs"),y=require("vue"),ee=require("./index-nc4_Bpdv.cjs"),Y=require("./index-dr1odtaY.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),p=require("./cloneDeep-BCr0AurG.cjs"),nl=require("./index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs"),fe=require("./menu-CK3bK1Rk.cjs"),$e=require("./index.vue_vue_type_script_setup_true_lang-CPm96puV.cjs"),le=require("./index-kMOvkC5Z.cjs");var tl="__lodash_hash_undefined__";function al(e){return this.__data__.set(e,tl),this}function ol(e){return this.__data__.has(e)}function ie(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new le.MapCache;++t<n;)this.add(e[t])}ie.prototype.add=ie.prototype.push=al;ie.prototype.has=ol;function rl(e,t){for(var n=-1,l=e==null?0:e.length;++n<l;)if(t(e[n],n,e))return!0;return!1}function sl(e,t){return e.has(t)}var cl=1,pl=2;function Ue(e,t,n,l,a,o){var s=n&cl,u=e.length,f=t.length;if(u!=f&&!(s&&f>u))return!1;var m=o.get(e),D=o.get(t);if(m&&D)return m==t&&D==e;var A=-1,$=!0,x=n&pl?new ie:void 0;for(o.set(e,t),o.set(t,e);++A<u;){var C=e[A],S=t[A];if(l)var h=s?l(S,C,A,t,e,o):l(C,S,A,e,t,o);if(h!==void 0){if(h)continue;$=!1;break}if(x){if(!rl(t,function(d,i){if(!sl(x,i)&&(C===d||a(C,d,n,l,o)))return x.push(i)})){$=!1;break}}else if(!(C===S||a(C,S,n,l,o))){$=!1;break}}return o.delete(e),o.delete(t),$}function ul(e){var t=-1,n=Array(e.size);return e.forEach(function(l,a){n[++t]=[a,l]}),n}function il(e){var t=-1,n=Array(e.size);return e.forEach(function(l){n[++t]=l}),n}var fl=1,dl=2,yl="[object Boolean]",hl="[object Date]",ml="[object Error]",gl="[object Map]",bl="[object Number]",kl="[object RegExp]",Dl="[object Set]",Cl="[object String]",Al="[object Symbol]",$l="[object ArrayBuffer]",_l="[object DataView]",_e=le.Symbol?le.Symbol.prototype:void 0,ye=_e?_e.valueOf:void 0;function xl(e,t,n,l,a,o,s){switch(n){case _l:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $l:return!(e.byteLength!=t.byteLength||!o(new p.Uint8Array(e),new p.Uint8Array(t)));case yl:case hl:case bl:return le.eq(+e,+t);case ml:return e.name==t.name&&e.message==t.message;case kl:case Cl:return e==t+"";case gl:var u=ul;case Dl:var f=l&fl;if(u||(u=il),e.size!=t.size&&!f)return!1;var m=s.get(e);if(m)return m==t;l|=dl,s.set(e,t);var D=Ue(u(e),u(t),l,a,o,s);return s.delete(e),D;case Al:if(ye)return ye.call(e)==ye.call(t)}return!1}var Tl=1,El=Object.prototype,Ol=El.hasOwnProperty;function Nl(e,t,n,l,a,o){var s=n&Tl,u=p.getAllKeys(e),f=u.length,m=p.getAllKeys(t),D=m.length;if(f!=D&&!s)return!1;for(var A=f;A--;){var $=u[A];if(!(s?$ in t:Ol.call(t,$)))return!1}var x=o.get(e),C=o.get(t);if(x&&C)return x==t&&C==e;var S=!0;o.set(e,t),o.set(t,e);for(var h=s;++A<f;){$=u[A];var d=e[$],i=t[$];if(l)var b=s?l(i,d,$,t,e,o):l(d,i,$,e,t,o);if(!(b===void 0?d===i||a(d,i,n,l,o):b)){S=!1;break}h||(h=$=="constructor")}if(S&&!h){var c=e.constructor,r=t.constructor;c!=r&&"constructor"in e&&"constructor"in t&&!(typeof c=="function"&&c instanceof c&&typeof r=="function"&&r instanceof r)&&(S=!1)}return o.delete(e),o.delete(t),S}var vl=1,xe="[object Arguments]",Te="[object Array]",oe="[object Object]",Sl=Object.prototype,Ee=Sl.hasOwnProperty;function Bl(e,t,n,l,a,o){var s=le.isArray(e),u=le.isArray(t),f=s?Te:p.getTag(e),m=u?Te:p.getTag(t);f=f==xe?oe:f,m=m==xe?oe:m;var D=f==oe,A=m==oe,$=f==m;if($&&p.isBuffer(e)){if(!p.isBuffer(t))return!1;s=!0,D=!1}if($&&!D)return o||(o=new p.Stack),s||p.isTypedArray(e)?Ue(e,t,n,l,a,o):xl(e,t,f,n,l,a,o);if(!(n&vl)){var x=D&&Ee.call(e,"__wrapped__"),C=A&&Ee.call(t,"__wrapped__");if(x||C){var S=x?e.value():e,h=C?t.value():t;return o||(o=new p.Stack),a(S,h,n,l,o)}}return $?(o||(o=new p.Stack),Nl(e,t,n,l,a,o)):!1}function Re(e,t,n,l,a){return e===t?!0:e==null||t==null||!le.isObjectLike(e)&&!le.isObjectLike(t)?e!==e&&t!==t:Bl(e,t,n,l,Re,a)}function Fl(e,t){return Re(e,t)}const re=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],Pl={class:"form-content"},wl={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(e,{emit:t}){const n=e,l=t,a=y.ref([]),o=y.ref(!1),s=y.ref([]),u=ke.useFormToTableComp(ee.pinia),f=y.ref(),m=A=>{var h,d,i,b;const $=(d=(h=p.cloneDeep(n.itemData))==null?void 0:h.find(c=>(c==null?void 0:c.key)==="formContent"))==null?void 0:d.contents,x=p.cloneDeep(A.content);let C={};x&&((i=Object.values(x))==null?void 0:i.length)>0&&((b=Object.values(x))==null||b.forEach((c,r)=>{C[$[r].key]=c}));const S={content:C,index:n==null?void 0:n.index,buttonName:A==null?void 0:A.buttonName};l("change",S)},D=A=>{var C,S;if(!A)return;if(((C=Object.values(p.cloneDeep(A)))==null?void 0:C.length)>0){const h=(S=Object.values(p.cloneDeep(A)))==null?void 0:S.map(i=>i);let d="";h==null||h.forEach(i=>{i!==""&&i!==void 0&&(d=d===""?i:d+"/"+i)}),u.setSelectArray(h),u.setSelectString(d)}const $=p.cloneDeep(n.itemData),x=$==null?void 0:$.map(h=>{var d;return(h==null?void 0:h.key)==="formContent"&&((d=h.contents)==null||d.map((i,b)=>{var c,r,g,_,T,O,E,j,N,v,P,F,B,k,w,U,R,I,H;return i.type=i!=null&&i.type?i.type:(_=(g=(r=(c=i==null?void 0:i.key)==null?void 0:c.split("$"))==null?void 0:r[1])==null?void 0:g.split("("))!=null&&_[0]?(T=re==null?void 0:re.find(q=>{var z,Z,V,K;return(q==null?void 0:q.key)===((K=(V=(Z=(z=i==null?void 0:i.key)==null?void 0:z.split("$"))==null?void 0:Z[1])==null?void 0:V.split("("))==null?void 0:K[0])}))==null?void 0:T.value:"Input",i.options=i!=null&&i.options?i.options:((j=(E=(O=i==null?void 0:i.key)==null?void 0:O.split("$"))==null?void 0:E[1])==null?void 0:j.length)>0?(F=(P=Y.formGetOptions((v=(N=i==null?void 0:i.key)==null?void 0:N.split("$"))==null?void 0:v[1]))==null?void 0:P.split(","))==null?void 0:F.map(q=>({label:q,value:q})):[],(B=i==null?void 0:i.key)!=null&&B.includes("$")&&(i.key=(w=(k=i==null?void 0:i.key)==null?void 0:k.split("$"))==null?void 0:w[0]),i.value=Array.isArray((U=Object.values(A))==null?void 0:U[b])?(I=(R=Object.values(A))==null?void 0:R[b])==null?void 0:I[0]:(H=Object.values(A))==null?void 0:H[b],i})),h});l("contentChange",{contents:x,index:n.index})};return y.watch(()=>n.itemData,()=>{var S,h,d,i,b,c,r,g,_,T;const A=(S=p.cloneDeep(n.itemData))==null?void 0:S.find(O=>(O==null?void 0:O.key)==="formContent"),$=(h=p.cloneDeep(n.itemData))==null?void 0:h.find(O=>(O==null?void 0:O.key)==="formButton"),x=(d=p.cloneDeep(n.itemData))==null?void 0:d.find(O=>(O==null?void 0:O.key)==="formFlex"),C=(i=p.cloneDeep(n.itemData))==null?void 0:i.find(O=>(O==null?void 0:O.key)==="formWrap");if((C==null?void 0:C.contents)==="纵向"?o.value=!1:o.value=!0,f.value=typeof(x==null?void 0:x.contents)!="boolean"?!(!(x!=null&&x.contents)===""||((b=x==null?void 0:x.contents)==null?void 0:b.toUpperCase())==="VERTICAL"):x==null?void 0:x.contents,((c=A==null?void 0:A.contents)==null?void 0:c.length)>0&&Array.isArray(A==null?void 0:A.contents)){const O=[];(r=A==null?void 0:A.contents)==null||r.forEach((N,v)=>{var P,F,B,k,w,U,R,I,H,q;if((N==null?void 0:N.label)!==""){let z=(N==null?void 0:N.key)??"",Z=(N==null?void 0:N.type)??"",V=(N==null?void 0:N.options)??[];if((P=N==null?void 0:N.key)!=null&&P.includes("$")&&(z=(F=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:F[0],((k=(B=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:B[1])==null?void 0:k.length)>0)){const[K,W]=(U=(w=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:w[1])==null?void 0:U.split(/[()]/);Z=((R=re.find(M=>(M==null?void 0:M.key)===K))==null?void 0:R.value)??"",((I=W==null?void 0:W.split(","))==null?void 0:I.length)>0&&(V=(H=W==null?void 0:W.split(","))==null?void 0:H.map(M=>({label:M,value:M})))}O.push({label:z??"",name:"t"+v,type:Z===""?"Input":Z,value:N!=null&&N.value?N.value:(V==null?void 0:V.length)>0?(q=V==null?void 0:V[0])==null?void 0:q.value:(N==null?void 0:N.value)??"",id:(N==null?void 0:N.id)??v,contents:V??[],width:(N==null?void 0:N.width)??1})}});const E=(g=p.cloneDeep(O))==null?void 0:g.map(N=>N.value);let j="";E==null||E.forEach(N=>{N!==""&&N!==void 0&&(j=j===""?N:j+"/"+N)}),u.setSelectArray(E),u.setSelectString(j),a.value=O}else a.value=[];if(((_=$==null?void 0:$.contents)==null?void 0:_.length)>0){const O=[];(T=$==null?void 0:$.contents)==null||T.forEach((E,j)=>{(E==null?void 0:E.label)!==""&&O.push({label:(E==null?void 0:E.label)??"",id:(E==null?void 0:E.id)??j,type:(E==null?void 0:E.type)??"",background:E==null?void 0:E.background})}),s.value=O}else s.value=[]},{deep:!0,immediate:!0}),(A,$)=>(y.openBlock(),y.createElementBlock("div",Pl,[y.createVNode(Y.ssForm,{rowContents:a.value,buttonValue:s.value,isRowFlex:f.value,isEnableWrap:!1,onOnButtonClick:m,onChange:D,isButtonRow:o.value},null,8,["rowContents","buttonValue","isRowFlex","isButtonRow"])]))}},jl=ae._export_sfc(wl,[["__scopeId","data-v-3775f389"]]),Ul={class:"table-operate-content"},Rl={class:"table-operate-item"},Jl={class:"operate-title"},Ll={class:"operate-content"},Vl={class:"operate-title"},Gl={class:"operate-content"},Ml={class:"operate-title"},Il={class:"operate-content"},ql={class:"operate-content"},Hl={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:t}){const n=e,l=t,a=y.ref([]),o=y.ref([]),s=y.ref([]),u=y.ref([{label:"按钮名称",prop:"label",type:"edit"},{label:"按钮类型",prop:"type",type:"edit"},{label:"按钮背景颜色",prop:"background",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),f=y.ref([{label:"标签名称",prop:"label",type:"edit"},{label:"标签类型",prop:"type",type:"edit"},{label:"按钮文字颜色",prop:"textColor",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),m=y.ref([]),D=y.ref(0),A=y.ref([{name:"isPagination",label:"是否显示分页",type:"Switch",value:!0}]),$=[{label:"标签名",prop:"label",type:"edit"},{label:"属性名",prop:"prop",type:"edit"},{label:"宽度",prop:"width",type:"edit",columnType:"Number"},{label:"是否固定列",prop:"fixed",type:"edit",columnType:"Radio",contents:[{label:"left",value:"左"},{label:"right",value:"右"}]},{label:"是否支持排序",prop:"sortable",type:"edit",columnType:"Switch"},{label:"文本所在位置",prop:"align",type:"edit",columnType:"Radio",contents:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{label:"溢出悬浮文字",prop:"showOverflowTooltip",type:"edit",columnType:"Switch"},{label:"是否不可拖动",prop:"isNotDrag",type:"edit",columnType:"Switch"},{label:"是否可编辑列名",prop:"isEditCol",type:"edit",columnType:"Switch"},{label:"是否出现在附属界面",prop:"isOperate",type:"edit",columnType:"Switch"},{label:"操作",prop:"operate",type:"operate",sortable:!1}],x=c=>{let r=p.cloneDeep(a.value);const g=r==null?void 0:r.find(_=>_.key==="page");(g==null?void 0:g.contents)!==void 0?r=r==null?void 0:r.map(_=>((_==null?void 0:_.key)==="page"&&(_.contents=c==null?void 0:c.isPagination),_)):r.push({key:"page",contents:c==null?void 0:c.isPagination}),a.value=r};y.watch(()=>n.originalItemContents,()=>{var c,r,g,_,T,O,E,j,N,v,P,F,B;!n.originalItemContents||n.originalItemContents.length===0||(a.value=p.cloneDeep(n.originalItemContents),o.value=(r=(c=a.value)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:r.contents,s.value=(_=(g=a.value)==null?void 0:g.find(k=>(k==null?void 0:k.key)==="rowButton"))==null?void 0:_.contents,u.value=(O=(T=a.value)==null?void 0:T.find(k=>(k==null?void 0:k.key)==="extraButton"))==null?void 0:O.contents,A.value=(j=(E=a.value)==null?void 0:E.find(k=>(k==null?void 0:k.key)==="page"))!=null&&j.contents?[{name:"isPagination",label:"是否显示分页",type:"Switch",value:(v=(N=a.value)==null?void 0:N.find(k=>(k==null?void 0:k.key)==="page"))==null?void 0:v.contents}]:[{name:"isPagination",label:"是否显示分页",type:"Switch",value:!0}],o.value=(P=o.value)==null?void 0:P.map((k,w)=>k={label:(k==null?void 0:k.label)??"",prop:(k==null?void 0:k.label)==="操作"?"operate":k==null?void 0:k.prop,width:k!=null&&k.width?parseInt(k.width):"",fixed:(k==null?void 0:k.fixed)??void 0,sortable:(k==null?void 0:k.sortable)??!1,align:(k==null?void 0:k.align)??"center",showOverflowTooltip:(k==null?void 0:k.showOverflowTooltip)??!0,isNotDrag:(k==null?void 0:k.isNotDrag)??!1,isEditCol:(k==null?void 0:k.isEditCol)??!1,isOperate:(k==null?void 0:k.isOperate)??!1,id:(k==null?void 0:k.id)??w}),s.value=(F=s.value)==null?void 0:F.map((k,w)=>k={label:(k==null?void 0:k.label)??"",type:(k==null?void 0:k.type)??"",textColor:(k==null?void 0:k.textColor)??"#000000",id:(k==null?void 0:k.id)??w}),u.value=(B=u.value)==null?void 0:B.map((k,w)=>k={label:(k==null?void 0:k.label)??"",type:(k==null?void 0:k.type)??"",background:(k==null?void 0:k.textColor)??"#FFFFFF",id:(k==null?void 0:k.id)??w}))},{deep:!0,immediate:!0}),y.watch(()=>A.value,()=>{var g;let c=p.cloneDeep(a.value);const r=c==null?void 0:c.find(_=>_.key==="page");r!=null&&r.contents?c=c==null?void 0:c.map(_=>{var T;return(_==null?void 0:_.key)==="page"&&(_.contents=(T=A.value)==null?void 0:T[0].value),_}):c.push({key:"page",contents:(g=A.value)==null?void 0:g[0].value}),a.value=c},{immediate:!0,deep:!0});const C=()=>{const c=p.cloneDeep(o.value);let r=p.cloneDeep(a.value);c.push({label:"",prop:"",width:"",fixed:void 0,sortable:!1,align:"center",showOverflowTooltip:!0,isNotDrag:!1,isEditCol:!1,isOperate:!1,id:D.value}),o.value=c,D.value++;const g=r==null?void 0:r.find(_=>(_==null?void 0:_.key)==="header");g!=null&&g.contents?(g.contents=c,r=r==null?void 0:r.map(_=>((_==null?void 0:_.key)==="header"&&(_.contents=c),_))):r.push({key:"header",contents:c}),a.value=r},S=()=>{const c=p.cloneDeep(s.value);let r=p.cloneDeep(a.value);c.push({label:"",type:"",textColor:"#000000",id:D.value}),s.value=c,D.value++;const g=r==null?void 0:r.find(_=>(_==null?void 0:_.key)==="rowButton");g!=null&&g.contents?(g.contents=c,r=r==null?void 0:r.map(_=>((_==null?void 0:_.key)==="rowButton"&&(_.contents=c),_))):r.push({key:"rowButton",contents:c}),a.value=r},h=()=>{const c=p.cloneDeep(m.value);let r=p.cloneDeep(a.value);c.push({label:"",type:"",background:"#FFFFFF",id:D.value}),m.value=c,D.value++;const g=r==null?void 0:r.find(_=>(_==null?void 0:_.key)==="extraButton");g!=null&&g.contents?(g.contents=c,r=r==null?void 0:r.map(_=>((_==null?void 0:_.key)==="extraButton"&&(_.contents=c),_))):r.push({key:"extraButton",contents:c}),a.value=r},d=c=>{const r=p.cloneDeep(s.value);let g=p.cloneDeep(a.value);s.value=r.filter(T=>T.id!==c.id);const _=g==null?void 0:g.find(T=>T.key==="rowButton");_!=null&&_.contents&&(g=g==null?void 0:g.map(T=>((T==null?void 0:T.key)==="rowButton"&&(T.contents=r.filter(O=>O.id!==c.id)),T))),a.value=g},i=c=>{const r=p.cloneDeep(m.value);let g=p.cloneDeep(a.value);m.value=r.filter(T=>T.id!==c.id);const _=g==null?void 0:g.find(T=>T.key==="extraButton");_!=null&&_.contents&&(g=g==null?void 0:g.map(T=>((T==null?void 0:T.key)==="extraButton"&&(T.contents=r.filter(O=>O.id!==c.id)),T))),a.value=g},b=c=>{const r=p.cloneDeep(o.value);let g=p.cloneDeep(a.value);o.value=r.filter(T=>T.id!==c.id);const _=g==null?void 0:g.find(T=>T.key==="header");_!=null&&_.contents&&(g=g==null?void 0:g.map(T=>((T==null?void 0:T.key)==="header"&&(T.contents=r.filter(O=>O.id!==c.id)),T))),a.value=g};return y.watch(()=>[a.value,o.value],()=>{let c=p.cloneDeep(a.value);const r=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="header");r!=null&&r.contents?(r.contents=o.value,c=c==null?void 0:c.map(g=>((g==null?void 0:g.key)==="header"&&(g.contents=o.value),g))):c.push({key:"header",contents:o.value}),l("change",c)},{deep:!0,immediate:!0}),(c,r)=>{const g=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",Ul,[y.createElementVNode("div",Rl,[y.createElementVNode("div",Jl,[r[1]||(r[1]=y.createElementVNode("div",null,y.toDisplayString("表头"),-1)),y.createVNode(g,{class:"blue-operate-button",icon:"ele-Plus",onClick:C},{default:y.withCtx(()=>r[0]||(r[0]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[0]})]),y.createElementVNode("div",Ll,[y.createVNode(Y.ssTable,{columns:$,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:o.value,onDeleteRow:b},null,8,["tableData"])]),y.createElementVNode("div",Vl,[r[3]||(r[3]=y.createElementVNode("div",null,y.toDisplayString("行内按钮"),-1)),y.createVNode(g,{class:"blue-operate-button",icon:"ele-Plus",onClick:S},{default:y.withCtx(()=>r[2]||(r[2]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[2]})]),y.createElementVNode("div",Gl,[y.createVNode(Y.ssTable,{columns:f.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:s.value,onDeleteRow:d},null,8,["columns","tableData"])]),y.createElementVNode("div",Ml,[r[5]||(r[5]=y.createElementVNode("div",null,y.toDisplayString("表格外部按钮"),-1)),y.createVNode(g,{class:"blue-operate-button",icon:"ele-Plus",onClick:h},{default:y.withCtx(()=>r[4]||(r[4]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[4]})]),y.createElementVNode("div",Il,[y.createVNode(Y.ssTable,{columns:u.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:m.value,onDeleteRow:i},null,8,["columns","tableData"])]),r[6]||(r[6]=y.createElementVNode("div",{class:"operate-title"},[y.createElementVNode("div",null,y.toDisplayString("分页"))],-1)),y.createElementVNode("div",ql,[y.createVNode(Y.ssForm,{rowContents:A.value,onChange:x},null,8,["rowContents"])])])])}}},Wl=ae._export_sfc(Hl,[["__scopeId","data-v-877911eb"]]),Kl={class:"form-operate-content"},Zl={class:"form-operate-item"},zl={class:"operate-title"},Ql={class:"operate-content"},Xl={class:"operate-title"},Yl={class:"operate-content"},en={class:"operate-content"},ln={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:t}){const n=e,l=t,a=y.ref([{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:!0}]),o=y.ref([{label:"字段名称",prop:"label",type:"edit"},{label:"字段类型",prop:"type",type:"edit"},{label:"字段值",prop:"key",type:"edit"},{label:"字段选项值",prop:"options",type:"edit"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),s=y.ref([{label:"字段名称",prop:"label",type:"edit"},{label:"字段类型",prop:"type",type:"edit"},{label:"按钮背景颜色",prop:"background",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),u=y.ref([]),f=y.ref([]),m=y.ref([]),D=y.ref(0);y.watch(()=>n.originalItemContents,()=>{var h,d,i,b,c,r,g,_,T,O;!n.originalItemContents||n.originalItemContents.length===0||(f.value=p.cloneDeep(n.originalItemContents),m.value=(d=(h=f.value)==null?void 0:h.find(E=>(E==null?void 0:E.key)==="formContent"))==null?void 0:d.contents,u.value=(b=(i=f.value)==null?void 0:i.find(E=>(E==null?void 0:E.key)==="formButton"))==null?void 0:b.contents,m.value=(c=m.value)==null?void 0:c.map((E,j)=>E={label:(E==null?void 0:E.label)??"",type:(E==null?void 0:E.type)??"",key:(E==null?void 0:E.key)??"",options:(E==null?void 0:E.options)??"",id:(E==null?void 0:E.id)??j}),u.value=(r=u.value)==null?void 0:r.map((E,j)=>E={label:(E==null?void 0:E.label)??"",type:(E==null?void 0:E.type)??"",background:(E==null?void 0:E.background)??"#000000",id:(E==null?void 0:E.id)??j}),a.value=(_=(g=f.value)==null?void 0:g.find(E=>(E==null?void 0:E.key)==="formFlex"))!=null&&_.contents?[{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:(O=(T=f.value)==null?void 0:T.find(E=>(E==null?void 0:E.key)==="formFlex"))==null?void 0:O.contents}]:[{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:!0}])},{deep:!0,immediate:!0});const A=()=>{const h=p.cloneDeep(u.value);let d=p.cloneDeep(f.value);h.push({label:"",type:"",background:"#000000",id:D.value}),u.value=h,D.value++;const i=d==null?void 0:d.find(b=>(b==null?void 0:b.key)==="formButton");i!=null&&i.contents?(i.contents=h,d=d==null?void 0:d.map(b=>((b==null?void 0:b.key)==="formButton"&&(b.contents=h),b))):d.push({key:"formButton",contents:h}),f.value=d},$=()=>{const h=p.cloneDeep(m.value);let d=p.cloneDeep(f.value);h.push({label:"",type:"",key:"",options:"",id:D.value}),m.value=h,D.value++;const i=d==null?void 0:d.find(b=>(b==null?void 0:b.key)==="formContent");i!=null&&i.contents?(i.contents=h,d=d==null?void 0:d.map(b=>((b==null?void 0:b.key)==="formContent"&&(b.contents=h),b))):d.push({key:"formContent",contents:h}),f.value=d},x=h=>{const d=p.cloneDeep(u.value);let i=p.cloneDeep(f.value);u.value=d.filter(c=>c.id!==h.id);const b=i==null?void 0:i.find(c=>c.key==="formButton");b!=null&&b.contents&&(i=i==null?void 0:i.map(c=>((c==null?void 0:c.key)==="formButton"&&(c.contents=d.filter(r=>r.id!==h.id)),c))),f.value=i},C=h=>{const d=p.cloneDeep(m.value);let i=p.cloneDeep(f.value);m.value=d.filter(c=>c.id!==h.id);const b=i==null?void 0:i.find(c=>c.key==="formContent");b!=null&&b.contents&&(i=i==null?void 0:i.map(c=>((c==null?void 0:c.key)==="formContent"&&(c.contents=d.filter(r=>r.id!==h.id)),c))),f.value=i},S=h=>{let d=p.cloneDeep(f.value);const i=d==null?void 0:d.find(b=>b.key==="formFlex");(i==null?void 0:i.contents)!==void 0?d=d==null?void 0:d.map(b=>((b==null?void 0:b.key)==="formFlex"&&(b.contents=h==null?void 0:h.isRowFlex),b)):d.push({key:"formFlex",contents:h==null?void 0:h.isRowFlex}),f.value=d};return y.watch(()=>[f.value,m.value],()=>{let h=p.cloneDeep(f.value);const d=h==null?void 0:h.find(i=>(i==null?void 0:i.key)==="formContent");d!=null&&d.contents?(d.contents=m.value,h=h==null?void 0:h.map(i=>((i==null?void 0:i.key)==="formContent"&&(i.contents=m.value),i))):h.push({key:"formContent",contents:m.value}),l("change",h)},{deep:!0,immediate:!0}),(h,d)=>{const i=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",Kl,[y.createElementVNode("div",Zl,[y.createElementVNode("div",zl,[d[1]||(d[1]=y.createElementVNode("div",null,y.toDisplayString("表单信息"),-1)),y.createVNode(i,{class:"blue-operate-button",icon:"ele-Plus",onClick:$},{default:y.withCtx(()=>d[0]||(d[0]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[0]})]),y.createElementVNode("div",Ql,[y.createVNode(Y.ssTable,{columns:o.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:m.value,onDeleteRow:C},null,8,["columns","tableData"])]),y.createElementVNode("div",Xl,[d[3]||(d[3]=y.createElementVNode("div",null,y.toDisplayString("表单按钮"),-1)),y.createVNode(i,{class:"blue-operate-button",icon:"ele-Plus",onClick:A},{default:y.withCtx(()=>d[2]||(d[2]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[2]})]),y.createElementVNode("div",Yl,[y.createVNode(Y.ssTable,{columns:s.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:u.value,onDeleteRow:x},null,8,["columns","tableData"])]),d[4]||(d[4]=y.createElementVNode("div",{class:"operate-title"},[y.createElementVNode("div",null,y.toDisplayString("表单布局"))],-1)),y.createElementVNode("div",en,[y.createVNode(Y.ssForm,{rowContents:a.value,onChange:S},null,8,["rowContents"])])])])}}},nn=ae._export_sfc(ln,[["__scopeId","data-v-a36b8468"]]),tn={class:"extra-content"},an={key:0},on={key:1},rn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(e,{emit:t}){const n=e,l=y.ref(0),a=y.ref(),o=y.ref(),s=t,u=y.ref(!1),f=y.ref({}),m=y.ref({}),D=y.ref();y.watch(()=>[n.itemData],()=>{var c;const b=p.cloneDeep(n.itemData);a.value=(c=p.cloneDeep(b))==null?void 0:c.map(r=>{var g;if(r.key==="extra"){let _=[];(g=r.value)==null||g.forEach(T=>{var O;_.push((O=Object.values(T))==null?void 0:O[0])}),r.value=_}return r})},{deep:!0,immediate:!0});const A=(b,c,r,g)=>{var T;let _={};((T=b==null?void 0:b[0])==null?void 0:T.contents)==="详情"&&(u.value=!0,_[c]=b,o.value=b==null?void 0:b.filter(O=>(O==null?void 0:O.key)!=="tableContentName"),f.value=_,m.value=r,D.value=g.id)},$=b=>{var O,E,j,N;const c=(E=(O=Object.values(p.cloneDeep(f.value)))==null?void 0:O[0])==null?void 0:E.filter(v=>(v==null?void 0:v.key)==="tableContentName"),r=(N=(j=Object.values(p.cloneDeep(f.value)))==null?void 0:j[0])==null?void 0:N.filter(v=>(v==null?void 0:v.key)!=="tableContentName"),g=r==null?void 0:r.map((v,P)=>{var F;return P===b.index&&(v==null?void 0:v.comp)==="Table"&&(v.compData=(F=v.compData)==null?void 0:F.map(B=>{var k,w;return(B==null?void 0:B.key)==="tableContents"&&(B.contents=(w=(k=b.content)==null?void 0:k.map(U=>{let R={};for(let I in U)I!=="id"&&(R[I]=U[I]);return R}))==null?void 0:w.map(U=>Object.values(U))),B})),v});g.unshift(c==null?void 0:c[0]);let _=p.cloneDeep(f.value),T={};for(let v in _)T[v]=g;f.value=T},x=()=>{u.value=!1,f.value={},m.value={},D.value=void 0,l.value++},C=b=>{var O,E,j,N;const c=(E=(O=Object.values(p.cloneDeep(f.value)))==null?void 0:O[0])==null?void 0:E.filter(v=>(v==null?void 0:v.key)==="tableContentName"),r=(N=(j=Object.values(p.cloneDeep(f.value)))==null?void 0:j[0])==null?void 0:N.filter(v=>(v==null?void 0:v.key)!=="tableContentName"),g=r==null?void 0:r.map((v,P)=>(P===b.index&&(v.compData=b.contents),v));g.unshift(c==null?void 0:c[0]);let _=p.cloneDeep(f.value),T={};for(let v in _)T[v]=g;f.value=T},S=()=>{var c,r;let b={};for(let g in m.value)g===((c=Object.keys(f.value))==null?void 0:c[0])?b[g]=(r=Object.values(f.value))==null?void 0:r[0]:b[g]=m.value[g];s("change",{buttonName:"编辑",index:D.value,singleContent:b},"methodData"),u.value=!1,f.value={},m.value={},D.value=void 0},h=()=>{u.value=!1,f.value={},m.value={},D.value=void 0},d=b=>{s("change",b,"methodData")},i=b=>Je(b);return(b,c)=>(y.openBlock(),y.createElementBlock(y.Fragment,null,[y.createElementVNode("div",tn,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(a.value,(r,g)=>(y.openBlock(),y.createElementBlock("div",{key:l.value},[(r==null?void 0:r.key)==="extra"?(y.openBlock(),y.createElementBlock("div",an)):(y.openBlock(),y.createElementBlock("div",on,[(y.openBlock(),y.createBlock(y.resolveDynamicComponent(i(r.comp)),{itemData:r==null?void 0:r.compData,childItemData:r==null?void 0:r.itemChildData,key:g,index:(r==null?void 0:r.id)??g,onContentClick:A,onChange:d},null,40,["itemData","childItemData","index"]))]))]))),128))]),y.createVNode(Y.ssDialog,{visible:u.value,onBeforeDestroy:h},{default:y.withCtx(()=>[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(o.value,(r,g)=>(y.openBlock(),y.createElementBlock("div",{key:g,class:"extra-dialog"},[(y.openBlock(),y.createBlock(y.resolveDynamicComponent(i(r.comp)),{itemData:r==null?void 0:r.compData,onChange:$,childItemData:r==null?void 0:r.itemChildData,key:g,onContentChange:C,index:(r==null?void 0:r.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:y.withCtx(()=>[y.createElementVNode("div",{class:"dialog-footer"},[y.createElementVNode("div",{class:"cancel-button footer-button",onClick:x},y.toDisplayString("取消")),y.createElementVNode("div",{class:"confirm-button footer-button",onClick:S},y.toDisplayString("确认"))])]),_:1},8,["visible"])],64))}},sn=ae._export_sfc(rn,[["__scopeId","data-v-e3e0f29d"]]),Oe=e=>{let t=[];function n(a){a==null||a.forEach(o=>{Array.isArray(o)||(o=[o]),o==null||o.forEach(s=>{!(s!=null&&s.children)||s.children.length===0?t.push(s.label):l(s.children)})})}function l(a){a==null||a.forEach(o=>{!(o!=null&&o.children)||o.children.length===0?t.push(o.label):l(o.children)})}return n(e),t},cn=(e,t,n)=>{var a;let l=(a=p.cloneDeep(e))==null?void 0:a.map(o=>(o=o.filter(s=>!s.id),o));return l=l==null?void 0:l.map(o=>{var s;return o=(s=o.map((u,f)=>{let m={};if(n!=null&&n.find(D=>D===t[f]))return m[t[f]]=u,m}))==null?void 0:s.filter(u=>u),o}),l},pn=(e,t)=>{var s,u;const n=p.cloneDeep(e),l=(s=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:s.contents,a=(u=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="tableContents"))==null?void 0:u.contents;return cn(a,Oe(l).slice(0,Oe(l).length-1),t)},un={class:"method-content"},fn=["onClick"],dn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(e){const t=y.ref([]),n=e,l=ee.useModelComp(ee.pinia),{itemData:a}=fe.storeToRefs(l),o=(f,m)=>{var A;const D=(A=m==null?void 0:m[0])==null?void 0:A.children;return f==null?void 0:f.map($=>{var x;return $=(x=$==null?void 0:$.map((C,S)=>{var h;return{key:(h=D[S])==null?void 0:h.label,value:C}}))==null?void 0:x.filter(C=>C.key),$})};y.watch(()=>a.value,async()=>{await u(p.cloneDeep(n.itemData))},{deep:!0});const s=async f=>{var i,b,c,r,g,_;let m={};if((i=p.cloneDeep(f.content))==null||i.forEach((T,O)=>{var E,j,N,v,P,F,B,k,w,U,R,I,H,q,z,Z,V;if((T==null?void 0:T.comp)==="Table"){let K=(v=(N=(j=(E=T==null?void 0:T.compData)==null?void 0:E.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:j.contents)==null?void 0:N[0])==null?void 0:v.some(G=>G==null?void 0:G.children),W=(B=(F=(P=T==null?void 0:T.compData)==null?void 0:P.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:B.map(G=>G.slice(1)),M=(I=(R=(U=(w=(k=T==null?void 0:T.compData)==null?void 0:k.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:w.contents)==null?void 0:U[0])==null?void 0:R[0])==null?void 0:I.label,Q=(z=(q=(H=T==null?void 0:T.compData)==null?void 0:H.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:q.contents)==null?void 0:z[0];if(K)m[M]=o(W,Q);else{const G=[];Q=Q.slice(1,Q.length-1),Q==null||Q.forEach((el,ll)=>{W==null||W.forEach(Ae=>{G.push({key:el.label+Ae[0],value:Ae[ll+1]})})}),m["form"+O]=G}}else{const K=(V=(Z=T.compData)==null?void 0:Z.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:V.contents;m.form={};const W=[];K==null||K.forEach(M=>{M.key!==""&&(M={key:M==null?void 0:M.key,value:M==null?void 0:M.value},W.push(M))}),m.form=W}}),f.api){const T=await ee.axios.post(f.api,{data:m,templateFileName:(b=f==null?void 0:f.extraContent)==null?void 0:b[0]},{responseType:"blob",headers:{"Content-Type":"application/json"}});var D=new Blob([T.data],{type:"application/octet-stream;charset=UTF-8"}),A=T.headers["content-disposition"],$=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),x=$.exec(A),C=((g=(r=(c=f==null?void 0:f.extraContent)==null?void 0:c[0])==null?void 0:r.split("."))==null?void 0:g[0])+"."+((_=x[1].split("."))==null?void 0:_[1]),S=document.createElement("a"),h=window.URL.createObjectURL(D),d=/^["](.*)["]$/g;S.style.display="none",S.href=h,S.download=decodeURI(C.replace(d,"$1")),document.body.appendChild(S),S.click(),document.body.removeChild(S),window.URL.revokeObjectURL(h)}},u=async f=>{var $;const m=p.cloneDeep(f),D=m==null?void 0:m.map(async x=>{var b,c,r,g,_,T;const S=(b=(await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:x.method}})).data.result)==null?void 0:b[0],h=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:S==null?void 0:S.id}}),d=await ke.getItemData((c=x==null?void 0:x.value)==null?void 0:c[0],sessionStorage.getItem("systemKey"),""),i=(r=h.data.result)==null?void 0:r[0];return{buttonName:(g=S==null?void 0:S.key)==null?void 0:g.methodKey,api:(T=(_=i==null?void 0:i.value)==null?void 0:_.tableData)==null?void 0:T[0],content:d==null?void 0:d.filter(O=>O.comp!=="methodButton"),extraContent:p.cloneDeep(x.value).slice(1)}}),A=await Promise.all(D);t.value=A,($=t.value)==null||$.forEach(x=>{var C;x.api===""&&((C=x.content)==null||C.forEach(S=>{var h;S.comp=="Table"&&l.setExtraContents(pn(S.compData,(h=x.extraContent)==null?void 0:h[0]))}))})};return y.watch(()=>n.itemData,async()=>{await u(p.cloneDeep(n.itemData))},{immediate:!0,deep:!0}),(f,m)=>(y.openBlock(),y.createElementBlock("div",un,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(t.value,D=>(y.openBlock(),y.createElementBlock("div",null,[D.api!==""?(y.openBlock(),y.createElementBlock("div",{key:0,onClick:A=>s(D),class:"method-buttons"},y.toDisplayString(D.buttonName),9,fn)):y.createCommentVNode("",!0)]))),256))]))}},yn=ae._export_sfc(dn,[["__scopeId","data-v-3daae5c9"]]),hn=y.ref([{name:"表格",type:"table",comp:"Table",icon:"Grid"},{name:"表单",type:"form",comp:"Form",icon:"Film"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"}]),mn={TABLE:ke.ssTable,FORM:jl,TABLEOPERATE:Wl,FORMOPERATE:nn,FOLD:nl._sfc_main,CALCULATOR:sn,METHODBUTTON:yn,AVATARUPLOAD:$e.ssAvatar,SIGNATURE:$e._sfc_main};function Je(e){return mn[e==null?void 0:e.toUpperCase()]||null}const L=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],J=[{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"}],ne=y.ref(0),gn=e=>{const[t,n]=e.split(/=(.+)/),l=t.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},pe=e=>{try{return JSON.parse(e),!0}catch{return!1}},bn=e=>e.includes("$")&&e.trim().endsWith("(")?e+")":e,kn=e=>{let t=e;const n=[];let l="";for(const a of t)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(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(n.push(l),l="")):n.push(a.trim());return n==null?void 0:n.filter(a=>a.includes("{"))},Dn=e=>{var n;let t=[];return(n=kn(e.slice(1,-1)))==null||n.forEach(l=>{var o,s,u,f;let a=((s=(o=l.slice(1,-1))==null?void 0:o.split(","))==null?void 0:s.length)??1;(f=(u=l.slice(1,-1))==null?void 0:u.split(","))==null||f.forEach(m=>{var x,C,S,h,d,i,b,c,r,g,_,T,O;let D=m==null?void 0:m.split(":"),A=D!=null&&D[0]?(D==null?void 0:D[1].split("$").length)-1===1?((x=D==null?void 0:D[0])==null?void 0:x.replace(/^"(.*)"$/,"$1"))+((C=D==null?void 0:D[1])==null?void 0:C.replace(/^"(.*)"$/,"$1")):Array.isArray((h=(S=D==null?void 0:D[1])==null?void 0:S.replace(/^"(.*)"$/,"$1"))==null?void 0:h.split("("))&&((b=(i=(d=D==null?void 0:D[1])==null?void 0:d.replace(/^"(.*)"$/,"$1"))==null?void 0:i.split("("))==null?void 0:b.length)>1?((c=D==null?void 0:D[0])==null?void 0:c.replace(/^"(.*)"$/,"$1"))+((_=(g=(r=D==null?void 0:D[1])==null?void 0:r.replace(/^"(.*)"$/,"$1"))==null?void 0:g.split("("))==null?void 0:_[0])+"()":(T=D==null?void 0:D[0])==null?void 0:T.replace(/^"(.*)"$/,"$1"):"",$=(D==null?void 0:D[1].split("$").length)-1===0?(O=D==null?void 0:D[1])==null?void 0:O.replace(/^"(.*)"$/,"$1"):"";ne.value++,t.push({id:ne.value,key:A,value:$,width:a,extraContent:D==null?void 0:D[1]})})}),t},Le=e=>{var t,n;try{const l=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(l).split("{").length-1>1){let a=p.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(pe(a)&&!a.includes("$")||(a=a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),pe(a)){const o=JSON.parse(a);let s=[];return o==null||o.forEach(u=>{var f;(f=Object.entries(p.cloneDeep(u)))==null||f.forEach(m=>{ne.value++,s.push({id:ne.value,key:(m==null?void 0:m[0])??"",value:(m==null?void 0:m[1])===""?"":m==null?void 0:m[1],width:Object.keys(p.cloneDeep(u)).length})})}),s}else return l.trim().startsWith("{{")?Dn(l.trim()):he(a)}else if(pe(l)){const a=JSON.parse(l);return Object.entries(a).map(([o,s])=>(ne.value++,{id:ne.value,key:o,value:s===""?"":s,width:1}))}else return((t=he(l))==null?void 0:t.length)===0?l:(n=he(l))==null?void 0:n.map(a=>({label:a.label,method:bn(a.method)}))}catch(l){return console.error("转换失败:",l),[]}},he=e=>{e=e.trim().replace(/^\{|\}$/g,"").trim();const t=[];let n=0;for(;n<e.length;){const l=e.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);if(!l)break;const a=l[1];n+=l[0].length;let o="",s=0,u=!1,f="";for(let m=n;m<e.length;m++){const D=e[m];if((D==='"'||D==="'")&&!u?(u=!0,f=D):D===f&&u&&(u=!1,f=""),!u&&((D==="{"||D==="("||D==="[")&&s++,(D==="}"||D===")"||D==="]")&&s--,D===","&&s===0||m===e.length-1)){o=e.slice(n,m+1).trim(),n=m+1;break}}t.push({label:a,method:o})}return t},Cn=(e,t)=>{try{if(L!=null&&L.find(n=>(n==null?void 0:n.key)===t))return e.replace(/['"]/g,"").trim();if(p.cloneDeep(e).split("[").length-1>1){const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(pe(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return Le(p.cloneDeep(e))}}catch(n){return console.error("解析失败:",n),e}},An=e=>({[e==null?void 0:e.key]:Cn(e==null?void 0:e.value,e==null?void 0:e.key)}),$n=e=>{try{if(p.cloneDeep(e).split("[").length-1>1){const t=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(t){return console.error("解析失败:",t),e}},_n=e=>{const t=e.match(/\(([^)]+)\)/);return t?t[1]:""},xn=e=>{const t=e.match(/^([^(]+)\s*\(/);return t?t[1].trim():e},Ne=e=>e.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(t=>t.trim()).filter(t=>t).join("/"),Tn=e=>{var s,u;let t=[],n=[];const l=(s=p.cloneDeep(e))==null?void 0:s.map(f=>f==null?void 0:f.key),a=[...new Set((u=p.cloneDeep(l))==null?void 0:u.map(f=>_n(f)))];a==null||a.forEach(f=>{let m=e==null?void 0:e.filter($=>$.key.includes(f));m==null||m.forEach($=>{$!=null&&$.key.includes("Menus")&&(t.push({key:"GroupName",value:Ne($==null?void 0:$.value)}),n.push(Ne($==null?void 0:$.value)))});let D=e==null?void 0:e.filter($=>$.key.includes(f)&&!($!=null&&$.key.includes("Menus")));D=D==null?void 0:D.map($=>($.key=xn($.key),$));const A={key:"GroupContents",value:D};t.push(A)});const o={key:"Menus",value:n};return t.unshift(o),t},Ve=e=>{var t,n;if(Array.isArray(Object.keys(e))&&((t=Object.keys(e))==null?void 0:t.length)>0){let l=[];return(n=Object.entries(e))==null||n.forEach(([a,o])=>{var u,f;let s=[];if(s.push(a),((u=Object.keys(o))==null?void 0:u.length)>0){let m=[];(f=Ve(o))==null||f.forEach(D=>{m.push(D)}),m==null||m.forEach(D=>{s.push(D)})}l.push(s)}),l}},En=(e,t)=>{var l;let n=t;return Array.isArray(Object.keys(e))&&((l=Object.entries(e))==null||l.forEach(([a,o])=>{let s=[a];if(typeof o=="object"&&o!==null){let u=Ve(o);u==null||u.forEach(f=>{s.push(f)})}n.push(s)})),n},On=e=>{const t={};return e.forEach(l=>{const a=l.split("/");let o=t;a.forEach(s=>{o[s]||(o[s]={}),o=o[s]})}),En(t,[])},Ge=e=>On(e),Nn=e=>{var t,n,l,a,o,s,u,f;try{const m=Ce((n=(t=p.cloneDeep(e))==null?void 0:t.replace("(","("))==null?void 0:n.replace(")",")")),D=(a=(l=p.cloneDeep(m))==null?void 0:l.filter(C=>!C.includes("/*")))==null?void 0:a.map(C=>gn(C)),A=Tn(D),$=[];if(((o=A==null?void 0:A.find(C=>(C==null?void 0:C.key)==="Menus"))==null?void 0:o.value.length)===0)return!1;(s=p.cloneDeep(A))==null||s.forEach(C=>{var S,h,d,i,b;L!=null&&L.find(c=>{var r,g;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((g=C==null?void 0:C.key)==null?void 0:g.toUpperCase())})?$.push({comp:((S=L==null?void 0:L.find(c=>{var r,g;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((g=C==null?void 0:C.key)==null?void 0:g.toUpperCase())}))==null?void 0:S.value)??"",name:(h=C==null?void 0:C.value)==null?void 0:h.replace(/[’]|[‘]|[']/g,""),compData:[]}):J!=null&&J.find(c=>{var r,g;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((g=C==null?void 0:C.key)==null?void 0:g.toUpperCase())})&&(($==null?void 0:$.length)===0&&(d=C.key)!=null&&d.includes("Menus")&&$.push({comp:"Menu",name:"",compData:[]}),(i=$==null?void 0:$[($==null?void 0:$.length)-1])!=null&&i.compData&&$[($==null?void 0:$.length)-1].compData.push({key:(b=J==null?void 0:J.find(c=>{var r,g;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((g=C==null?void 0:C.key)==null?void 0:g.toUpperCase())}))==null?void 0:b.value,contents:C==null?void 0:C.value}))});let x=(u=p.cloneDeep($))==null?void 0:u.map(C=>{var S;return C!=null&&C.compData&&(C.compData=(S=C==null?void 0:C.compData)==null?void 0:S.map(h=>{var d,i,b,c,r,g,_,T,O,E,j;if((h==null?void 0:h.key)==="formFlex")h.contents=((i=(d=h.contents)==null?void 0:d.replace(/[’]|[‘]|[']/g,""))==null?void 0:i.toUpperCase())!=="Vertical".toUpperCase();else if((h==null?void 0:h.key)==="groupContents")h.contents=(b=p.cloneDeep(h.contents))==null?void 0:b.map(N=>An(p.cloneDeep(N)));else if(Array.isArray(h==null?void 0:h.contents))h.contents=Ge(h.contents);else if(((r=(c=h==null?void 0:h.contents)==null?void 0:c.trim())!=null&&r.startsWith("[")||(_=(g=h.contents)==null?void 0:g.trim())!=null&&_.startsWith("【"))&&((O=(T=h.contents)==null?void 0:T.trim())!=null&&O.endsWith("]")||(j=(E=h.contents)==null?void 0:E.trim())!=null&&j.endsWith("】")))h.contents=$n(p.cloneDeep(h.contents));else{if(!h.contents)return;h.contents=Le(p.cloneDeep(h.contents))}return h})),C});return x=(f=p.cloneDeep(x))==null?void 0:f.map(C=>{var S;return(C==null?void 0:C.comp)==="Group"&&(C.compData=(S=C.compData)==null?void 0:S.map(h=>{var i;let d=[];return(i=h.contents)==null||i.forEach(b=>{var c,r,g,_,T,O,E,j,N,v,P,F;if(L!=null&&L.find(B=>{var k,w,U;return((k=B==null?void 0:B.key)==null?void 0:k.toUpperCase())===((U=(w=Object.keys(b))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))d.push({comp:(c=L==null?void 0:L.find(B=>{var k,w,U;return((k=B==null?void 0:B.key)==null?void 0:k.toUpperCase())===((U=(w=Object.keys(b))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))==null?void 0:c.value,name:(g=(r=Object.values(b))==null?void 0:r[0])==null?void 0:g.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(J!=null&&J.find(B=>{var k,w,U;return((k=B==null?void 0:B.key)==null?void 0:k.toUpperCase())===((U=(w=Object.keys(b))==null?void 0:w[0])==null?void 0:U.toUpperCase())})){if((d==null?void 0:d.length)===0)return;(_=d==null?void 0:d[(d==null?void 0:d.length)-1])!=null&&_.compData&&d[(d==null?void 0:d.length)-1].compData.push({key:(T=J==null?void 0:J.find(B=>{var k,w,U;return((k=B==null?void 0:B.key)==null?void 0:k.toUpperCase())===((U=(w=Object.keys(b))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))==null?void 0:T.value,contents:(O=Object.values(b))==null?void 0:O[0]})}else if((j=(E=Object.keys(b))==null?void 0:E[0])!=null&&j.includes("$")){const B=(v=(N=Object.keys(p.cloneDeep(b)))==null?void 0:N[0])==null?void 0:v.split("$");d[(d==null?void 0:d.length)-1].compData.push({key:(P=J==null?void 0:J.find(k=>{var w,U;return((w=k==null?void 0:k.key)==null?void 0:w.toUpperCase())===((U=B==null?void 0:B[0])==null?void 0:U.toUpperCase())}))==null?void 0:P.value,contents:(F=Object.values(b))==null?void 0:F[0],selectLabel:B==null?void 0:B[1]})}return b}),h.contents=d,h})),C}),x}catch{return!1}},X=e=>{try{return JSON.parse(e),!0}catch{return!1}},vn=(e,t)=>Fl(e,t),ve=y.ref(0),Me=e=>{const t=[];let n=null;for(let l=0;l<e.length;l++){const a=e[l];if(Array.isArray(a))n&&(n.children=Me(a));else{const o={label:a};t.push(o),n=o}}return t},Ie=e=>{let t=0;for(const n of e)t++,n.children&&(t+=Ie(n.children));return t},qe=(e,t,n=[])=>{let l=0;for(const a of t){if(l>=e.length)break;const o=[...e[l]];if(n.push(o),l++,a.children&&a.children.length>0){const s=[];qe(e.slice(l),a.children,s),s.length>0&&(o.push(s),l+=Ie(a.children))}}return n},Sn=(e,t)=>{let n=[];return e==null||e.forEach(a=>{a.some(o=>Array.isArray(o))?n.push(...a):n.push(a)}),qe(n,t)},be=e=>{const t={label:e[0].trim()};if(e.length>1){const n=e.slice(1);n.length===1&&Array.isArray(n[0])?t.children=n[0].map(l=>Array.isArray(l)?be(l):{label:l.trim()}):t.children=n.map(l=>Array.isArray(l)?be(l):{label:l.trim()})}return t},Se=e=>{let t=e.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return t=t.replace(/:}(?=,|]|}|$)/g,':""}'),t=t.replace(/:,(?=\s*")/g,':"",'),t=t.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(n,l,a)=>`"${l}://${a}"`),t=t.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),t},Bn=e=>{var n;return e.some(l=>!Array.isArray(l))?e:(n=p.cloneDeep(e))==null?void 0:n.map(l=>{let a=[];return l.some(o=>Array.isArray(o))?l==null||l.forEach(o=>{Array.isArray(o)&&a.push(be(o))}):l.some(o=>o.includes("["))?a.push(l):a=l.map(o=>({label:o.trim()})),a})},He=(e,t,n)=>{let l=e,a=n,o=t;return o.children&&(Array.isArray(a[a.length-1])?a[a.length-1].push(l[0]):a.push(l[0]),l.shift(),o=o.children),Array.isArray(o)&&o.forEach(s=>{if(s.children){const u=He(l,s,a);a=u[0],l=u[1]}}),[a,l]},Fn=(e,t)=>{let n=e,l=[];return t.length>0?t==null||t.forEach(a=>{let o=n==null?void 0:n[0];n.shift();const s=He(p.cloneDeep(n),a,o);o=s[0],n=s[1],l.push(o)}):l=n,l},De=(e,t)=>{const n=Bn(p.cloneDeep(e));return Fn(n,t)},Pn=e=>{const t=[];let n=0;const l=e.length;for(;n<l;){const a=e[n];a.key==="tableColumns"&&n+1<l&&e[n+1].key==="tableContents"?(t.push({comp:"Table",compData:[a,e[n+1]],name:""}),n+=2):(t.push(a),n+=1)}return t},We=e=>De([e],[]),Be=e=>{const t=[];return e==null||e.forEach(n=>n==null?void 0:n.forEach(a=>{var o,s;ve.value++,t.push({id:ve.value,key:(o=Object.keys(a))==null?void 0:o[0],value:(s=Object.values(a))==null?void 0:s[0],width:n.length})})),t},Fe=e=>{let t=Pn(e);return t=t==null?void 0:t.map(n=>{var l,a,o,s;if(n.comp==="Table")(l=n.compData)!=null&&l.find(u=>(u==null?void 0:u.key)==="header")||(n.compData=(a=n.compData)==null?void 0:a.map(u=>(u.key==="tableColumns"?u={key:"header",contents:De(u.value,[])}:u={key:u.key,contents:u.value},u)),n.compData.push({key:"extraButton",contents:[{label:"新增"}]}),n.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(n.key==="form"){const u=(o=n==null?void 0:n.value)==null?void 0:o.map(f=>(Array.isArray(f)||(f=[f]),f));n={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Be(u)}],name:""}}else if(n.key==="formTop"){const u=(s=n==null?void 0:n.value)==null?void 0:s.map(f=>(Array.isArray(f)||(f=[f]),f));n={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Be(u)}],name:""}}return n}),t},wn=(e,t)=>{var u,f,m,D,A,$;const n=[],l=Me((f=(u=e==null?void 0:e.find(x=>x.key==="tableIndex"))==null?void 0:u.value)==null?void 0:f[0]);n.push({key:"tableIndexColumn",contents:t}),n.push({key:"tableIndex",contents:l});let a=[];const o=(m=e==null?void 0:e.find(x=>x.key==="tableColumns"))==null?void 0:m.value;o.length===1&&!(o!=null&&o[0].some(x=>Array.isArray(x)))?a=(D=o==null?void 0:o[0])==null?void 0:D.map(x=>({label:x})):a=De((A=e==null?void 0:e.find(x=>x.key==="tableColumns"))==null?void 0:A.value,l),n.push({key:"header",contents:a});const s=Sn(($=e==null?void 0:e.find(x=>x.key==="tableContents"))==null?void 0:$.value,l);return n.push({key:"tableContents",contents:s}),n.push({key:"extraButton",contents:[{label:"新增"}]}),n.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),n},Ke=e=>e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(t,n,l)=>{const a=Ke(l);return`"${n}",${a}`}),se=e=>{const t=e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Ke(t).replace(/^"(.*)"$/,"$1")},jn=e=>{const t=new Set;return e.filter(n=>{const l=JSON.stringify(n);return t.has(l)?!1:t.add(l)})},Pe=e=>{var n;let t=[];return(n=p.cloneDeep(e))==null||n.forEach(l=>{var a;(a=l.contents)==null||a.forEach(o=>{t.push(o)})}),t=jn(t),t.push({label:"操作"}),[t]},Un=(e,t)=>e.reduce((n,l,a)=>{const o=Math.floor(a/t);return n[o]||(n[o]=[]),n[o].push(l),n},[]),Ze=e=>e.reduce((t,n)=>n.children&&n.children.length>0?t+Ze(n.children):t+1,0),Rn=(e,t)=>{var l;let n=[];return(l=Un(e,Ze(t==null?void 0:t[0])-1))==null||l.forEach(a=>{let o=[];a.forEach(s=>{var u;Array.isArray(s.contents)?(u=s.contents)==null||u.forEach(f=>{o.push(f)}):o.push(s.contents)}),n.push(o)}),[n]},Jn=["方法体","输入","输出"],we=y.ref(1),Ce=e=>{let t;e.replaceAll(" ",`\r
|
|
1
|
+
"use strict";const ke=require("./index-nJWX2ZAR.cjs"),y=require("vue"),ee=require("./index-BtYV9wZ1.cjs"),Y=require("./index-CPli5lGn.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),p=require("./cloneDeep-Dm67A16r.cjs"),nl=require("./index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs"),fe=require("./menu-CjMhVMcW.cjs"),$e=require("./index.vue_vue_type_script_setup_true_lang-DICDRYNs.cjs"),le=require("./index-Btvdv2CB.cjs");var tl="__lodash_hash_undefined__";function al(e){return this.__data__.set(e,tl),this}function ol(e){return this.__data__.has(e)}function ie(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new le.MapCache;++t<n;)this.add(e[t])}ie.prototype.add=ie.prototype.push=al;ie.prototype.has=ol;function rl(e,t){for(var n=-1,l=e==null?0:e.length;++n<l;)if(t(e[n],n,e))return!0;return!1}function sl(e,t){return e.has(t)}var cl=1,pl=2;function Ue(e,t,n,l,a,o){var s=n&cl,i=e.length,f=t.length;if(i!=f&&!(s&&f>i))return!1;var m=o.get(e),D=o.get(t);if(m&&D)return m==t&&D==e;var A=-1,$=!0,x=n&pl?new ie:void 0;for(o.set(e,t),o.set(t,e);++A<i;){var C=e[A],S=t[A];if(l)var h=s?l(S,C,A,t,e,o):l(C,S,A,e,t,o);if(h!==void 0){if(h)continue;$=!1;break}if(x){if(!rl(t,function(d,u){if(!sl(x,u)&&(C===d||a(C,d,n,l,o)))return x.push(u)})){$=!1;break}}else if(!(C===S||a(C,S,n,l,o))){$=!1;break}}return o.delete(e),o.delete(t),$}function ul(e){var t=-1,n=Array(e.size);return e.forEach(function(l,a){n[++t]=[a,l]}),n}function il(e){var t=-1,n=Array(e.size);return e.forEach(function(l){n[++t]=l}),n}var fl=1,dl=2,yl="[object Boolean]",hl="[object Date]",ml="[object Error]",gl="[object Map]",bl="[object Number]",kl="[object RegExp]",Dl="[object Set]",Cl="[object String]",Al="[object Symbol]",$l="[object ArrayBuffer]",_l="[object DataView]",_e=le.Symbol?le.Symbol.prototype:void 0,ye=_e?_e.valueOf:void 0;function xl(e,t,n,l,a,o,s){switch(n){case _l:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $l:return!(e.byteLength!=t.byteLength||!o(new p.Uint8Array(e),new p.Uint8Array(t)));case yl:case hl:case bl:return le.eq(+e,+t);case ml:return e.name==t.name&&e.message==t.message;case kl:case Cl:return e==t+"";case gl:var i=ul;case Dl:var f=l&fl;if(i||(i=il),e.size!=t.size&&!f)return!1;var m=s.get(e);if(m)return m==t;l|=dl,s.set(e,t);var D=Ue(i(e),i(t),l,a,o,s);return s.delete(e),D;case Al:if(ye)return ye.call(e)==ye.call(t)}return!1}var Tl=1,El=Object.prototype,Ol=El.hasOwnProperty;function Nl(e,t,n,l,a,o){var s=n&Tl,i=p.getAllKeys(e),f=i.length,m=p.getAllKeys(t),D=m.length;if(f!=D&&!s)return!1;for(var A=f;A--;){var $=i[A];if(!(s?$ in t:Ol.call(t,$)))return!1}var x=o.get(e),C=o.get(t);if(x&&C)return x==t&&C==e;var S=!0;o.set(e,t),o.set(t,e);for(var h=s;++A<f;){$=i[A];var d=e[$],u=t[$];if(l)var b=s?l(u,d,$,t,e,o):l(d,u,$,e,t,o);if(!(b===void 0?d===u||a(d,u,n,l,o):b)){S=!1;break}h||(h=$=="constructor")}if(S&&!h){var c=e.constructor,r=t.constructor;c!=r&&"constructor"in e&&"constructor"in t&&!(typeof c=="function"&&c instanceof c&&typeof r=="function"&&r instanceof r)&&(S=!1)}return o.delete(e),o.delete(t),S}var vl=1,xe="[object Arguments]",Te="[object Array]",oe="[object Object]",Sl=Object.prototype,Ee=Sl.hasOwnProperty;function Bl(e,t,n,l,a,o){var s=le.isArray(e),i=le.isArray(t),f=s?Te:p.getTag(e),m=i?Te:p.getTag(t);f=f==xe?oe:f,m=m==xe?oe:m;var D=f==oe,A=m==oe,$=f==m;if($&&p.isBuffer(e)){if(!p.isBuffer(t))return!1;s=!0,D=!1}if($&&!D)return o||(o=new p.Stack),s||p.isTypedArray(e)?Ue(e,t,n,l,a,o):xl(e,t,f,n,l,a,o);if(!(n&vl)){var x=D&&Ee.call(e,"__wrapped__"),C=A&&Ee.call(t,"__wrapped__");if(x||C){var S=x?e.value():e,h=C?t.value():t;return o||(o=new p.Stack),a(S,h,n,l,o)}}return $?(o||(o=new p.Stack),Nl(e,t,n,l,a,o)):!1}function Re(e,t,n,l,a){return e===t?!0:e==null||t==null||!le.isObjectLike(e)&&!le.isObjectLike(t)?e!==e&&t!==t:Bl(e,t,n,l,Re,a)}function Pl(e,t){return Re(e,t)}const re=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],wl={class:"form-content"},Fl={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(e,{emit:t}){const n=e,l=t,a=y.ref([]),o=y.ref(!1),s=y.ref([]),i=ke.useFormToTableComp(ee.pinia),f=y.ref(),m=A=>{var h,d,u,b;const $=(d=(h=p.cloneDeep(n.itemData))==null?void 0:h.find(c=>(c==null?void 0:c.key)==="formContent"))==null?void 0:d.contents,x=p.cloneDeep(A.content);let C={};x&&((u=Object.values(x))==null?void 0:u.length)>0&&((b=Object.values(x))==null||b.forEach((c,r)=>{C[$[r].key]=c}));const S={content:C,index:n==null?void 0:n.index,buttonName:A==null?void 0:A.buttonName};l("change",S)},D=A=>{var C,S;if(!A)return;if(((C=Object.values(p.cloneDeep(A)))==null?void 0:C.length)>0){const h=(S=Object.values(p.cloneDeep(A)))==null?void 0:S.map(u=>u);let d="";h==null||h.forEach(u=>{u!==""&&u!==void 0&&(d=d===""?u:d+"/"+u)}),i.setSelectArray(h),i.setSelectString(d)}const $=p.cloneDeep(n.itemData),x=$==null?void 0:$.map(h=>{var d;return(h==null?void 0:h.key)==="formContent"&&((d=h.contents)==null||d.map((u,b)=>{var c,r,g,_,T,O,E,j,N,v,w,P,B,k,F,U,R,I,H;return u.type=u!=null&&u.type?u.type:(_=(g=(r=(c=u==null?void 0:u.key)==null?void 0:c.split("$"))==null?void 0:r[1])==null?void 0:g.split("("))!=null&&_[0]?(T=re==null?void 0:re.find(q=>{var z,Z,V,K;return(q==null?void 0:q.key)===((K=(V=(Z=(z=u==null?void 0:u.key)==null?void 0:z.split("$"))==null?void 0:Z[1])==null?void 0:V.split("("))==null?void 0:K[0])}))==null?void 0:T.value:"Input",u.options=u!=null&&u.options?u.options:((j=(E=(O=u==null?void 0:u.key)==null?void 0:O.split("$"))==null?void 0:E[1])==null?void 0:j.length)>0?(P=(w=Y.formGetOptions((v=(N=u==null?void 0:u.key)==null?void 0:N.split("$"))==null?void 0:v[1]))==null?void 0:w.split(","))==null?void 0:P.map(q=>({label:q,value:q})):[],(B=u==null?void 0:u.key)!=null&&B.includes("$")&&(u.key=(F=(k=u==null?void 0:u.key)==null?void 0:k.split("$"))==null?void 0:F[0]),u.value=Array.isArray((U=Object.values(A))==null?void 0:U[b])?(I=(R=Object.values(A))==null?void 0:R[b])==null?void 0:I[0]:(H=Object.values(A))==null?void 0:H[b],u})),h});l("contentChange",{contents:x,index:n.index})};return y.watch(()=>n.itemData,()=>{var S,h,d,u,b,c,r,g,_,T;const A=(S=p.cloneDeep(n.itemData))==null?void 0:S.find(O=>(O==null?void 0:O.key)==="formContent"),$=(h=p.cloneDeep(n.itemData))==null?void 0:h.find(O=>(O==null?void 0:O.key)==="formButton"),x=(d=p.cloneDeep(n.itemData))==null?void 0:d.find(O=>(O==null?void 0:O.key)==="formFlex"),C=(u=p.cloneDeep(n.itemData))==null?void 0:u.find(O=>(O==null?void 0:O.key)==="formWrap");if((C==null?void 0:C.contents)==="纵向"?o.value=!1:o.value=!0,f.value=typeof(x==null?void 0:x.contents)!="boolean"?!(!(x!=null&&x.contents)===""||((b=x==null?void 0:x.contents)==null?void 0:b.toUpperCase())==="VERTICAL"):x==null?void 0:x.contents,((c=A==null?void 0:A.contents)==null?void 0:c.length)>0&&Array.isArray(A==null?void 0:A.contents)){const O=[];(r=A==null?void 0:A.contents)==null||r.forEach((N,v)=>{var w,P,B,k,F,U,R,I,H,q;if((N==null?void 0:N.label)!==""){let z=(N==null?void 0:N.key)??"",Z=(N==null?void 0:N.type)??"",V=(N==null?void 0:N.options)??[];if((w=N==null?void 0:N.key)!=null&&w.includes("$")&&(z=(P=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:P[0],((k=(B=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:B[1])==null?void 0:k.length)>0)){const[K,W]=(U=(F=p.cloneDeep(N==null?void 0:N.key).split("$"))==null?void 0:F[1])==null?void 0:U.split(/[()]/);Z=((R=re.find(M=>(M==null?void 0:M.key)===K))==null?void 0:R.value)??"",((I=W==null?void 0:W.split(","))==null?void 0:I.length)>0&&(V=(H=W==null?void 0:W.split(","))==null?void 0:H.map(M=>({label:M,value:M})))}O.push({label:z??"",name:"t"+v,type:Z===""?"Input":Z,value:N!=null&&N.value?N.value:(V==null?void 0:V.length)>0?(q=V==null?void 0:V[0])==null?void 0:q.value:(N==null?void 0:N.value)??"",id:(N==null?void 0:N.id)??v,contents:V??[],width:(N==null?void 0:N.width)??1})}});const E=(g=p.cloneDeep(O))==null?void 0:g.map(N=>N.value);let j="";E==null||E.forEach(N=>{N!==""&&N!==void 0&&(j=j===""?N:j+"/"+N)}),i.setSelectArray(E),i.setSelectString(j),a.value=O}else a.value=[];if(((_=$==null?void 0:$.contents)==null?void 0:_.length)>0){const O=[];(T=$==null?void 0:$.contents)==null||T.forEach((E,j)=>{(E==null?void 0:E.label)!==""&&O.push({label:(E==null?void 0:E.label)??"",id:(E==null?void 0:E.id)??j,type:(E==null?void 0:E.type)??"",background:E==null?void 0:E.background})}),s.value=O}else s.value=[]},{deep:!0,immediate:!0}),(A,$)=>(y.openBlock(),y.createElementBlock("div",wl,[y.createVNode(Y.ssForm,{rowContents:a.value,buttonValue:s.value,isRowFlex:f.value,isEnableWrap:!1,onOnButtonClick:m,onChange:D,isButtonRow:o.value},null,8,["rowContents","buttonValue","isRowFlex","isButtonRow"])]))}},jl=ae._export_sfc(Fl,[["__scopeId","data-v-3775f389"]]),Ul={class:"table-operate-content"},Rl={class:"table-operate-item"},Jl={class:"operate-title"},Ll={class:"operate-content"},Vl={class:"operate-title"},Gl={class:"operate-content"},Ml={class:"operate-title"},Il={class:"operate-content"},ql={class:"operate-content"},Hl={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:t}){const n=e,l=t,a=y.ref([]),o=y.ref([]),s=y.ref([]),i=y.ref([{label:"按钮名称",prop:"label",type:"edit"},{label:"按钮类型",prop:"type",type:"edit"},{label:"按钮背景颜色",prop:"background",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),f=y.ref([{label:"标签名称",prop:"label",type:"edit"},{label:"标签类型",prop:"type",type:"edit"},{label:"按钮文字颜色",prop:"textColor",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),m=y.ref([]),D=y.ref(0),A=y.ref([{name:"isPagination",label:"是否显示分页",type:"Switch",value:!0}]),$=[{label:"标签名",prop:"label",type:"edit"},{label:"属性名",prop:"prop",type:"edit"},{label:"宽度",prop:"width",type:"edit",columnType:"Number"},{label:"是否固定列",prop:"fixed",type:"edit",columnType:"Radio",contents:[{label:"left",value:"左"},{label:"right",value:"右"}]},{label:"是否支持排序",prop:"sortable",type:"edit",columnType:"Switch"},{label:"文本所在位置",prop:"align",type:"edit",columnType:"Radio",contents:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{label:"溢出悬浮文字",prop:"showOverflowTooltip",type:"edit",columnType:"Switch"},{label:"是否不可拖动",prop:"isNotDrag",type:"edit",columnType:"Switch"},{label:"是否可编辑列名",prop:"isEditCol",type:"edit",columnType:"Switch"},{label:"是否出现在附属界面",prop:"isOperate",type:"edit",columnType:"Switch"},{label:"操作",prop:"operate",type:"operate",sortable:!1}],x=c=>{let r=p.cloneDeep(a.value);const g=r==null?void 0:r.find(_=>_.key==="page");(g==null?void 0:g.contents)!==void 0?r=r==null?void 0:r.map(_=>((_==null?void 0:_.key)==="page"&&(_.contents=c==null?void 0:c.isPagination),_)):r.push({key:"page",contents:c==null?void 0:c.isPagination}),a.value=r};y.watch(()=>n.originalItemContents,()=>{var c,r,g,_,T,O,E,j,N,v,w,P,B;!n.originalItemContents||n.originalItemContents.length===0||(a.value=p.cloneDeep(n.originalItemContents),o.value=(r=(c=a.value)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:r.contents,s.value=(_=(g=a.value)==null?void 0:g.find(k=>(k==null?void 0:k.key)==="rowButton"))==null?void 0:_.contents,i.value=(O=(T=a.value)==null?void 0:T.find(k=>(k==null?void 0:k.key)==="extraButton"))==null?void 0:O.contents,A.value=(j=(E=a.value)==null?void 0:E.find(k=>(k==null?void 0:k.key)==="page"))!=null&&j.contents?[{name:"isPagination",label:"是否显示分页",type:"Switch",value:(v=(N=a.value)==null?void 0:N.find(k=>(k==null?void 0:k.key)==="page"))==null?void 0:v.contents}]:[{name:"isPagination",label:"是否显示分页",type:"Switch",value:!0}],o.value=(w=o.value)==null?void 0:w.map((k,F)=>k={label:(k==null?void 0:k.label)??"",prop:(k==null?void 0:k.label)==="操作"?"operate":k==null?void 0:k.prop,width:k!=null&&k.width?parseInt(k.width):"",fixed:(k==null?void 0:k.fixed)??void 0,sortable:(k==null?void 0:k.sortable)??!1,align:(k==null?void 0:k.align)??"center",showOverflowTooltip:(k==null?void 0:k.showOverflowTooltip)??!0,isNotDrag:(k==null?void 0:k.isNotDrag)??!1,isEditCol:(k==null?void 0:k.isEditCol)??!1,isOperate:(k==null?void 0:k.isOperate)??!1,id:(k==null?void 0:k.id)??F}),s.value=(P=s.value)==null?void 0:P.map((k,F)=>k={label:(k==null?void 0:k.label)??"",type:(k==null?void 0:k.type)??"",textColor:(k==null?void 0:k.textColor)??"#000000",id:(k==null?void 0:k.id)??F}),i.value=(B=i.value)==null?void 0:B.map((k,F)=>k={label:(k==null?void 0:k.label)??"",type:(k==null?void 0:k.type)??"",background:(k==null?void 0:k.textColor)??"#FFFFFF",id:(k==null?void 0:k.id)??F}))},{deep:!0,immediate:!0}),y.watch(()=>A.value,()=>{var g;let c=p.cloneDeep(a.value);const r=c==null?void 0:c.find(_=>_.key==="page");r!=null&&r.contents?c=c==null?void 0:c.map(_=>{var T;return(_==null?void 0:_.key)==="page"&&(_.contents=(T=A.value)==null?void 0:T[0].value),_}):c.push({key:"page",contents:(g=A.value)==null?void 0:g[0].value}),a.value=c},{immediate:!0,deep:!0});const C=()=>{const c=p.cloneDeep(o.value);let r=p.cloneDeep(a.value);c.push({label:"",prop:"",width:"",fixed:void 0,sortable:!1,align:"center",showOverflowTooltip:!0,isNotDrag:!1,isEditCol:!1,isOperate:!1,id:D.value}),o.value=c,D.value++;const g=r==null?void 0:r.find(_=>(_==null?void 0:_.key)==="header");g!=null&&g.contents?(g.contents=c,r=r==null?void 0:r.map(_=>((_==null?void 0:_.key)==="header"&&(_.contents=c),_))):r.push({key:"header",contents:c}),a.value=r},S=()=>{const c=p.cloneDeep(s.value);let r=p.cloneDeep(a.value);c.push({label:"",type:"",textColor:"#000000",id:D.value}),s.value=c,D.value++;const g=r==null?void 0:r.find(_=>(_==null?void 0:_.key)==="rowButton");g!=null&&g.contents?(g.contents=c,r=r==null?void 0:r.map(_=>((_==null?void 0:_.key)==="rowButton"&&(_.contents=c),_))):r.push({key:"rowButton",contents:c}),a.value=r},h=()=>{const c=p.cloneDeep(m.value);let r=p.cloneDeep(a.value);c.push({label:"",type:"",background:"#FFFFFF",id:D.value}),m.value=c,D.value++;const g=r==null?void 0:r.find(_=>(_==null?void 0:_.key)==="extraButton");g!=null&&g.contents?(g.contents=c,r=r==null?void 0:r.map(_=>((_==null?void 0:_.key)==="extraButton"&&(_.contents=c),_))):r.push({key:"extraButton",contents:c}),a.value=r},d=c=>{const r=p.cloneDeep(s.value);let g=p.cloneDeep(a.value);s.value=r.filter(T=>T.id!==c.id);const _=g==null?void 0:g.find(T=>T.key==="rowButton");_!=null&&_.contents&&(g=g==null?void 0:g.map(T=>((T==null?void 0:T.key)==="rowButton"&&(T.contents=r.filter(O=>O.id!==c.id)),T))),a.value=g},u=c=>{const r=p.cloneDeep(m.value);let g=p.cloneDeep(a.value);m.value=r.filter(T=>T.id!==c.id);const _=g==null?void 0:g.find(T=>T.key==="extraButton");_!=null&&_.contents&&(g=g==null?void 0:g.map(T=>((T==null?void 0:T.key)==="extraButton"&&(T.contents=r.filter(O=>O.id!==c.id)),T))),a.value=g},b=c=>{const r=p.cloneDeep(o.value);let g=p.cloneDeep(a.value);o.value=r.filter(T=>T.id!==c.id);const _=g==null?void 0:g.find(T=>T.key==="header");_!=null&&_.contents&&(g=g==null?void 0:g.map(T=>((T==null?void 0:T.key)==="header"&&(T.contents=r.filter(O=>O.id!==c.id)),T))),a.value=g};return y.watch(()=>[a.value,o.value],()=>{let c=p.cloneDeep(a.value);const r=c==null?void 0:c.find(g=>(g==null?void 0:g.key)==="header");r!=null&&r.contents?(r.contents=o.value,c=c==null?void 0:c.map(g=>((g==null?void 0:g.key)==="header"&&(g.contents=o.value),g))):c.push({key:"header",contents:o.value}),l("change",c)},{deep:!0,immediate:!0}),(c,r)=>{const g=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",Ul,[y.createElementVNode("div",Rl,[y.createElementVNode("div",Jl,[r[1]||(r[1]=y.createElementVNode("div",null,y.toDisplayString("表头"),-1)),y.createVNode(g,{class:"blue-operate-button",icon:"ele-Plus",onClick:C},{default:y.withCtx(()=>r[0]||(r[0]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[0]})]),y.createElementVNode("div",Ll,[y.createVNode(Y.ssTable,{columns:$,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:o.value,onDeleteRow:b},null,8,["tableData"])]),y.createElementVNode("div",Vl,[r[3]||(r[3]=y.createElementVNode("div",null,y.toDisplayString("行内按钮"),-1)),y.createVNode(g,{class:"blue-operate-button",icon:"ele-Plus",onClick:S},{default:y.withCtx(()=>r[2]||(r[2]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[2]})]),y.createElementVNode("div",Gl,[y.createVNode(Y.ssTable,{columns:f.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:s.value,onDeleteRow:d},null,8,["columns","tableData"])]),y.createElementVNode("div",Ml,[r[5]||(r[5]=y.createElementVNode("div",null,y.toDisplayString("表格外部按钮"),-1)),y.createVNode(g,{class:"blue-operate-button",icon:"ele-Plus",onClick:h},{default:y.withCtx(()=>r[4]||(r[4]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[4]})]),y.createElementVNode("div",Il,[y.createVNode(Y.ssTable,{columns:i.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:m.value,onDeleteRow:u},null,8,["columns","tableData"])]),r[6]||(r[6]=y.createElementVNode("div",{class:"operate-title"},[y.createElementVNode("div",null,y.toDisplayString("分页"))],-1)),y.createElementVNode("div",ql,[y.createVNode(Y.ssForm,{rowContents:A.value,onChange:x},null,8,["rowContents"])])])])}}},Wl=ae._export_sfc(Hl,[["__scopeId","data-v-877911eb"]]),Kl={class:"form-operate-content"},Zl={class:"form-operate-item"},zl={class:"operate-title"},Ql={class:"operate-content"},Xl={class:"operate-title"},Yl={class:"operate-content"},en={class:"operate-content"},ln={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:t}){const n=e,l=t,a=y.ref([{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:!0}]),o=y.ref([{label:"字段名称",prop:"label",type:"edit"},{label:"字段类型",prop:"type",type:"edit"},{label:"字段值",prop:"key",type:"edit"},{label:"字段选项值",prop:"options",type:"edit"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),s=y.ref([{label:"字段名称",prop:"label",type:"edit"},{label:"字段类型",prop:"type",type:"edit"},{label:"按钮背景颜色",prop:"background",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),i=y.ref([]),f=y.ref([]),m=y.ref([]),D=y.ref(0);y.watch(()=>n.originalItemContents,()=>{var h,d,u,b,c,r,g,_,T,O;!n.originalItemContents||n.originalItemContents.length===0||(f.value=p.cloneDeep(n.originalItemContents),m.value=(d=(h=f.value)==null?void 0:h.find(E=>(E==null?void 0:E.key)==="formContent"))==null?void 0:d.contents,i.value=(b=(u=f.value)==null?void 0:u.find(E=>(E==null?void 0:E.key)==="formButton"))==null?void 0:b.contents,m.value=(c=m.value)==null?void 0:c.map((E,j)=>E={label:(E==null?void 0:E.label)??"",type:(E==null?void 0:E.type)??"",key:(E==null?void 0:E.key)??"",options:(E==null?void 0:E.options)??"",id:(E==null?void 0:E.id)??j}),i.value=(r=i.value)==null?void 0:r.map((E,j)=>E={label:(E==null?void 0:E.label)??"",type:(E==null?void 0:E.type)??"",background:(E==null?void 0:E.background)??"#000000",id:(E==null?void 0:E.id)??j}),a.value=(_=(g=f.value)==null?void 0:g.find(E=>(E==null?void 0:E.key)==="formFlex"))!=null&&_.contents?[{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:(O=(T=f.value)==null?void 0:T.find(E=>(E==null?void 0:E.key)==="formFlex"))==null?void 0:O.contents}]:[{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:!0}])},{deep:!0,immediate:!0});const A=()=>{const h=p.cloneDeep(i.value);let d=p.cloneDeep(f.value);h.push({label:"",type:"",background:"#000000",id:D.value}),i.value=h,D.value++;const u=d==null?void 0:d.find(b=>(b==null?void 0:b.key)==="formButton");u!=null&&u.contents?(u.contents=h,d=d==null?void 0:d.map(b=>((b==null?void 0:b.key)==="formButton"&&(b.contents=h),b))):d.push({key:"formButton",contents:h}),f.value=d},$=()=>{const h=p.cloneDeep(m.value);let d=p.cloneDeep(f.value);h.push({label:"",type:"",key:"",options:"",id:D.value}),m.value=h,D.value++;const u=d==null?void 0:d.find(b=>(b==null?void 0:b.key)==="formContent");u!=null&&u.contents?(u.contents=h,d=d==null?void 0:d.map(b=>((b==null?void 0:b.key)==="formContent"&&(b.contents=h),b))):d.push({key:"formContent",contents:h}),f.value=d},x=h=>{const d=p.cloneDeep(i.value);let u=p.cloneDeep(f.value);i.value=d.filter(c=>c.id!==h.id);const b=u==null?void 0:u.find(c=>c.key==="formButton");b!=null&&b.contents&&(u=u==null?void 0:u.map(c=>((c==null?void 0:c.key)==="formButton"&&(c.contents=d.filter(r=>r.id!==h.id)),c))),f.value=u},C=h=>{const d=p.cloneDeep(m.value);let u=p.cloneDeep(f.value);m.value=d.filter(c=>c.id!==h.id);const b=u==null?void 0:u.find(c=>c.key==="formContent");b!=null&&b.contents&&(u=u==null?void 0:u.map(c=>((c==null?void 0:c.key)==="formContent"&&(c.contents=d.filter(r=>r.id!==h.id)),c))),f.value=u},S=h=>{let d=p.cloneDeep(f.value);const u=d==null?void 0:d.find(b=>b.key==="formFlex");(u==null?void 0:u.contents)!==void 0?d=d==null?void 0:d.map(b=>((b==null?void 0:b.key)==="formFlex"&&(b.contents=h==null?void 0:h.isRowFlex),b)):d.push({key:"formFlex",contents:h==null?void 0:h.isRowFlex}),f.value=d};return y.watch(()=>[f.value,m.value],()=>{let h=p.cloneDeep(f.value);const d=h==null?void 0:h.find(u=>(u==null?void 0:u.key)==="formContent");d!=null&&d.contents?(d.contents=m.value,h=h==null?void 0:h.map(u=>((u==null?void 0:u.key)==="formContent"&&(u.contents=m.value),u))):h.push({key:"formContent",contents:m.value}),l("change",h)},{deep:!0,immediate:!0}),(h,d)=>{const u=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",Kl,[y.createElementVNode("div",Zl,[y.createElementVNode("div",zl,[d[1]||(d[1]=y.createElementVNode("div",null,y.toDisplayString("表单信息"),-1)),y.createVNode(u,{class:"blue-operate-button",icon:"ele-Plus",onClick:$},{default:y.withCtx(()=>d[0]||(d[0]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[0]})]),y.createElementVNode("div",Ql,[y.createVNode(Y.ssTable,{columns:o.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:m.value,onDeleteRow:C},null,8,["columns","tableData"])]),y.createElementVNode("div",Xl,[d[3]||(d[3]=y.createElementVNode("div",null,y.toDisplayString("表单按钮"),-1)),y.createVNode(u,{class:"blue-operate-button",icon:"ele-Plus",onClick:A},{default:y.withCtx(()=>d[2]||(d[2]=[y.createTextVNode(y.toDisplayString("新建"))])),_:1,__:[2]})]),y.createElementVNode("div",Yl,[y.createVNode(Y.ssTable,{columns:s.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:i.value,onDeleteRow:x},null,8,["columns","tableData"])]),d[4]||(d[4]=y.createElementVNode("div",{class:"operate-title"},[y.createElementVNode("div",null,y.toDisplayString("表单布局"))],-1)),y.createElementVNode("div",en,[y.createVNode(Y.ssForm,{rowContents:a.value,onChange:S},null,8,["rowContents"])])])])}}},nn=ae._export_sfc(ln,[["__scopeId","data-v-a36b8468"]]),tn={class:"extra-content"},an={key:0},on={key:1},rn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(e,{emit:t}){const n=e,l=y.ref(0),a=y.ref(),o=y.ref(),s=t,i=y.ref(!1),f=y.ref({}),m=y.ref({}),D=y.ref();y.watch(()=>[n.itemData],()=>{var c;const b=p.cloneDeep(n.itemData);a.value=(c=p.cloneDeep(b))==null?void 0:c.map(r=>{var g;if(r.key==="extra"){let _=[];(g=r.value)==null||g.forEach(T=>{var O;_.push((O=Object.values(T))==null?void 0:O[0])}),r.value=_}return r})},{deep:!0,immediate:!0});const A=(b,c,r,g)=>{var T;let _={};((T=b==null?void 0:b[0])==null?void 0:T.contents)==="详情"&&(i.value=!0,_[c]=b,o.value=b==null?void 0:b.filter(O=>(O==null?void 0:O.key)!=="tableContentName"),f.value=_,m.value=r,D.value=g.id)},$=b=>{var O,E,j,N;const c=(E=(O=Object.values(p.cloneDeep(f.value)))==null?void 0:O[0])==null?void 0:E.filter(v=>(v==null?void 0:v.key)==="tableContentName"),r=(N=(j=Object.values(p.cloneDeep(f.value)))==null?void 0:j[0])==null?void 0:N.filter(v=>(v==null?void 0:v.key)!=="tableContentName"),g=r==null?void 0:r.map((v,w)=>{var P;return w===b.index&&(v==null?void 0:v.comp)==="Table"&&(v.compData=(P=v.compData)==null?void 0:P.map(B=>{var k,F;return(B==null?void 0:B.key)==="tableContents"&&(B.contents=(F=(k=b.content)==null?void 0:k.map(U=>{let R={};for(let I in U)I!=="id"&&(R[I]=U[I]);return R}))==null?void 0:F.map(U=>Object.values(U))),B})),v});g.unshift(c==null?void 0:c[0]);let _=p.cloneDeep(f.value),T={};for(let v in _)T[v]=g;f.value=T},x=()=>{i.value=!1,f.value={},m.value={},D.value=void 0,l.value++},C=b=>{var O,E,j,N;const c=(E=(O=Object.values(p.cloneDeep(f.value)))==null?void 0:O[0])==null?void 0:E.filter(v=>(v==null?void 0:v.key)==="tableContentName"),r=(N=(j=Object.values(p.cloneDeep(f.value)))==null?void 0:j[0])==null?void 0:N.filter(v=>(v==null?void 0:v.key)!=="tableContentName"),g=r==null?void 0:r.map((v,w)=>(w===b.index&&(v.compData=b.contents),v));g.unshift(c==null?void 0:c[0]);let _=p.cloneDeep(f.value),T={};for(let v in _)T[v]=g;f.value=T},S=()=>{var c,r;let b={};for(let g in m.value)g===((c=Object.keys(f.value))==null?void 0:c[0])?b[g]=(r=Object.values(f.value))==null?void 0:r[0]:b[g]=m.value[g];s("change",{buttonName:"编辑",index:D.value,singleContent:b},"methodData"),i.value=!1,f.value={},m.value={},D.value=void 0},h=()=>{i.value=!1,f.value={},m.value={},D.value=void 0},d=b=>{s("change",b,"methodData")},u=b=>Je(b);return(b,c)=>(y.openBlock(),y.createElementBlock(y.Fragment,null,[y.createElementVNode("div",tn,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(a.value,(r,g)=>(y.openBlock(),y.createElementBlock("div",{key:l.value},[(r==null?void 0:r.key)==="extra"?(y.openBlock(),y.createElementBlock("div",an)):(y.openBlock(),y.createElementBlock("div",on,[(y.openBlock(),y.createBlock(y.resolveDynamicComponent(u(r.comp)),{itemData:r==null?void 0:r.compData,childItemData:r==null?void 0:r.itemChildData,key:g,index:(r==null?void 0:r.id)??g,onContentClick:A,onChange:d},null,40,["itemData","childItemData","index"]))]))]))),128))]),y.createVNode(Y.ssDialog,{visible:i.value,onBeforeDestroy:h},{default:y.withCtx(()=>[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(o.value,(r,g)=>(y.openBlock(),y.createElementBlock("div",{key:g,class:"extra-dialog"},[(y.openBlock(),y.createBlock(y.resolveDynamicComponent(u(r.comp)),{itemData:r==null?void 0:r.compData,onChange:$,childItemData:r==null?void 0:r.itemChildData,key:g,onContentChange:C,index:(r==null?void 0:r.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:y.withCtx(()=>[y.createElementVNode("div",{class:"dialog-footer"},[y.createElementVNode("div",{class:"cancel-button footer-button",onClick:x},y.toDisplayString("取消")),y.createElementVNode("div",{class:"confirm-button footer-button",onClick:S},y.toDisplayString("确认"))])]),_:1},8,["visible"])],64))}},sn=ae._export_sfc(rn,[["__scopeId","data-v-e3e0f29d"]]),Oe=e=>{let t=[];function n(a){a==null||a.forEach(o=>{Array.isArray(o)||(o=[o]),o==null||o.forEach(s=>{!(s!=null&&s.children)||s.children.length===0?t.push(s.label):l(s.children)})})}function l(a){a==null||a.forEach(o=>{!(o!=null&&o.children)||o.children.length===0?t.push(o.label):l(o.children)})}return n(e),t},cn=(e,t,n)=>{var a;let l=(a=p.cloneDeep(e))==null?void 0:a.map(o=>(o=o.filter(s=>!s.id),o));return l=l==null?void 0:l.map(o=>{var s;return o=(s=o.map((i,f)=>{let m={};if(n!=null&&n.find(D=>D===t[f]))return m[t[f]]=i,m}))==null?void 0:s.filter(i=>i),o}),l},pn=(e,t)=>{var s,i;const n=p.cloneDeep(e),l=(s=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:s.contents,a=(i=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="tableContents"))==null?void 0:i.contents;return cn(a,Oe(l).slice(0,Oe(l).length-1),t)},un={class:"method-content"},fn=["onClick"],dn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(e){const t=y.ref([]),n=e,l=ee.useModelComp(ee.pinia),{itemData:a}=fe.storeToRefs(l),o=(f,m)=>{var A;const D=(A=m==null?void 0:m[0])==null?void 0:A.children;return f==null?void 0:f.map($=>{var x;return $=(x=$==null?void 0:$.map((C,S)=>{var h;return{key:(h=D[S])==null?void 0:h.label,value:C}}))==null?void 0:x.filter(C=>C.key),$})};y.watch(()=>a.value,async()=>{await i(p.cloneDeep(n.itemData))},{deep:!0});const s=async f=>{var u,b,c,r,g,_;let m={};if((u=p.cloneDeep(f.content))==null||u.forEach((T,O)=>{var E,j,N,v,w,P,B,k,F,U,R,I,H,q,z,Z,V;if((T==null?void 0:T.comp)==="Table"){let K=(v=(N=(j=(E=T==null?void 0:T.compData)==null?void 0:E.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:j.contents)==null?void 0:N[0])==null?void 0:v.some(G=>G==null?void 0:G.children),W=(B=(P=(w=T==null?void 0:T.compData)==null?void 0:w.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:P.contents)==null?void 0:B.map(G=>G.slice(1)),M=(I=(R=(U=(F=(k=T==null?void 0:T.compData)==null?void 0:k.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:F.contents)==null?void 0:U[0])==null?void 0:R[0])==null?void 0:I.label,Q=(z=(q=(H=T==null?void 0:T.compData)==null?void 0:H.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:q.contents)==null?void 0:z[0];if(K)m[M]=o(W,Q);else{const G=[];Q=Q.slice(1,Q.length-1),Q==null||Q.forEach((el,ll)=>{W==null||W.forEach(Ae=>{G.push({key:el.label+Ae[0],value:Ae[ll+1]})})}),m["form"+O]=G}}else{const K=(V=(Z=T.compData)==null?void 0:Z.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:V.contents;m.form={};const W=[];K==null||K.forEach(M=>{M.key!==""&&(M={key:M==null?void 0:M.key,value:M==null?void 0:M.value},W.push(M))}),m.form=W}}),f.api){const T=await ee.axios.post(f.api,{data:m,templateFileName:(b=f==null?void 0:f.extraContent)==null?void 0:b[0]},{responseType:"blob",headers:{"Content-Type":"application/json"}});var D=new Blob([T.data],{type:"application/octet-stream;charset=UTF-8"}),A=T.headers["content-disposition"],$=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),x=$.exec(A),C=((g=(r=(c=f==null?void 0:f.extraContent)==null?void 0:c[0])==null?void 0:r.split("."))==null?void 0:g[0])+"."+((_=x[1].split("."))==null?void 0:_[1]),S=document.createElement("a"),h=window.URL.createObjectURL(D),d=/^["](.*)["]$/g;S.style.display="none",S.href=h,S.download=decodeURI(C.replace(d,"$1")),document.body.appendChild(S),S.click(),document.body.removeChild(S),window.URL.revokeObjectURL(h)}},i=async f=>{var $;const m=p.cloneDeep(f),D=m==null?void 0:m.map(async x=>{var b,c,r,g,_,T;const S=(b=(await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:x.method}})).data.result)==null?void 0:b[0],h=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:S==null?void 0:S.id}}),d=await ke.getItemData((c=x==null?void 0:x.value)==null?void 0:c[0],sessionStorage.getItem("systemKey"),""),u=(r=h.data.result)==null?void 0:r[0];return{buttonName:(g=S==null?void 0:S.key)==null?void 0:g.methodKey,api:(T=(_=u==null?void 0:u.value)==null?void 0:_.tableData)==null?void 0:T[0],content:d==null?void 0:d.filter(O=>O.comp!=="methodButton"),extraContent:p.cloneDeep(x.value).slice(1)}}),A=await Promise.all(D);t.value=A,($=t.value)==null||$.forEach(x=>{var C;x.api===""&&((C=x.content)==null||C.forEach(S=>{var h;S.comp=="Table"&&l.setExtraContents(pn(S.compData,(h=x.extraContent)==null?void 0:h[0]))}))})};return y.watch(()=>n.itemData,async()=>{await i(p.cloneDeep(n.itemData))},{immediate:!0,deep:!0}),(f,m)=>(y.openBlock(),y.createElementBlock("div",un,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(t.value,D=>(y.openBlock(),y.createElementBlock("div",null,[D.api!==""?(y.openBlock(),y.createElementBlock("div",{key:0,onClick:A=>s(D),class:"method-buttons"},y.toDisplayString(D.buttonName),9,fn)):y.createCommentVNode("",!0)]))),256))]))}},yn=ae._export_sfc(dn,[["__scopeId","data-v-3daae5c9"]]),hn=y.ref([{name:"表格",type:"table",comp:"Table",icon:"Grid"},{name:"表单",type:"form",comp:"Form",icon:"Film"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"}]),mn={TABLE:ke.ssTable,FORM:jl,TABLEOPERATE:Wl,FORMOPERATE:nn,FOLD:nl._sfc_main,CALCULATOR:sn,METHODBUTTON:yn,AVATARUPLOAD:$e.ssAvatar,SIGNATURE:$e._sfc_main};function Je(e){return mn[e==null?void 0:e.toUpperCase()]||null}const L=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],J=[{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"}],ne=y.ref(0),gn=e=>{const[t,n]=e.split(/=(.+)/),l=t.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},pe=e=>{try{return JSON.parse(e),!0}catch{return!1}},bn=e=>e.includes("$")&&e.trim().endsWith("(")?e+")":e,kn=e=>{let t=e;const n=[];let l="";for(const a of t)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(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(n.push(l),l="")):n.push(a.trim());return n==null?void 0:n.filter(a=>a.includes("{"))},Dn=e=>{var n;let t=[];return(n=kn(e.slice(1,-1)))==null||n.forEach(l=>{var o,s,i,f;let a=((s=(o=l.slice(1,-1))==null?void 0:o.split(","))==null?void 0:s.length)??1;(f=(i=l.slice(1,-1))==null?void 0:i.split(","))==null||f.forEach(m=>{var x,C,S,h,d,u,b,c,r,g,_,T,O;let D=m==null?void 0:m.split(":"),A=D!=null&&D[0]?(D==null?void 0:D[1].split("$").length)-1===1?((x=D==null?void 0:D[0])==null?void 0:x.replace(/^"(.*)"$/,"$1"))+((C=D==null?void 0:D[1])==null?void 0:C.replace(/^"(.*)"$/,"$1")):Array.isArray((h=(S=D==null?void 0:D[1])==null?void 0:S.replace(/^"(.*)"$/,"$1"))==null?void 0:h.split("("))&&((b=(u=(d=D==null?void 0:D[1])==null?void 0:d.replace(/^"(.*)"$/,"$1"))==null?void 0:u.split("("))==null?void 0:b.length)>1?((c=D==null?void 0:D[0])==null?void 0:c.replace(/^"(.*)"$/,"$1"))+((_=(g=(r=D==null?void 0:D[1])==null?void 0:r.replace(/^"(.*)"$/,"$1"))==null?void 0:g.split("("))==null?void 0:_[0])+"()":(T=D==null?void 0:D[0])==null?void 0:T.replace(/^"(.*)"$/,"$1"):"",$=(D==null?void 0:D[1].split("$").length)-1===0?(O=D==null?void 0:D[1])==null?void 0:O.replace(/^"(.*)"$/,"$1"):"";ne.value++,t.push({id:ne.value,key:A,value:$,width:a,extraContent:D==null?void 0:D[1]})})}),t},Le=e=>{var t,n;try{const l=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(l).split("{").length-1>1){let a=p.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(pe(a)&&!a.includes("$")||(a=a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),pe(a)){const o=JSON.parse(a);let s=[];return o==null||o.forEach(i=>{var f;(f=Object.entries(p.cloneDeep(i)))==null||f.forEach(m=>{ne.value++,s.push({id:ne.value,key:(m==null?void 0:m[0])??"",value:(m==null?void 0:m[1])===""?"":m==null?void 0:m[1],width:Object.keys(p.cloneDeep(i)).length})})}),s}else return l.trim().startsWith("{{")?Dn(l.trim()):he(a)}else if(pe(l)){const a=JSON.parse(l);return Object.entries(a).map(([o,s])=>(ne.value++,{id:ne.value,key:o,value:s===""?"":s,width:1}))}else return((t=he(l))==null?void 0:t.length)===0?l:(n=he(l))==null?void 0:n.map(a=>({label:a.label,method:bn(a.method)}))}catch(l){return console.error("转换失败:",l),[]}},he=e=>{e=e.trim().replace(/^\{|\}$/g,"").trim();const t=[];let n=0;for(;n<e.length;){const l=e.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);if(!l)break;const a=l[1];n+=l[0].length;let o="",s=0,i=!1,f="";for(let m=n;m<e.length;m++){const D=e[m];if((D==='"'||D==="'")&&!i?(i=!0,f=D):D===f&&i&&(i=!1,f=""),!i&&((D==="{"||D==="("||D==="[")&&s++,(D==="}"||D===")"||D==="]")&&s--,D===","&&s===0||m===e.length-1)){o=e.slice(n,m+1).trim(),n=m+1;break}}t.push({label:a,method:o})}return t},Cn=(e,t)=>{try{if(L!=null&&L.find(n=>(n==null?void 0:n.key)===t))return e.replace(/['"]/g,"").trim();if(p.cloneDeep(e).split("[").length-1>1){const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(pe(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return Le(p.cloneDeep(e))}}catch(n){return console.error("解析失败:",n),e}},An=e=>({[e==null?void 0:e.key]:Cn(e==null?void 0:e.value,e==null?void 0:e.key)}),$n=e=>{try{if(p.cloneDeep(e).split("[").length-1>1){const t=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(t){return console.error("解析失败:",t),e}},_n=e=>{const t=e.match(/\(([^)]+)\)/);return t?t[1]:""},xn=e=>{const t=e.match(/^([^(]+)\s*\(/);return t?t[1].trim():e},Ne=e=>e.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(t=>t.trim()).filter(t=>t).join("/"),Tn=e=>{var s,i;let t=[],n=[];const l=(s=p.cloneDeep(e))==null?void 0:s.map(f=>f==null?void 0:f.key),a=[...new Set((i=p.cloneDeep(l))==null?void 0:i.map(f=>_n(f)))];a==null||a.forEach(f=>{let m=e==null?void 0:e.filter($=>$.key.includes(f));m==null||m.forEach($=>{$!=null&&$.key.includes("Menus")&&(t.push({key:"GroupName",value:Ne($==null?void 0:$.value)}),n.push(Ne($==null?void 0:$.value)))});let D=e==null?void 0:e.filter($=>$.key.includes(f)&&!($!=null&&$.key.includes("Menus")));D=D==null?void 0:D.map($=>($.key=xn($.key),$));const A={key:"GroupContents",value:D};t.push(A)});const o={key:"Menus",value:n};return t.unshift(o),t},Ve=e=>{var t,n;if(Array.isArray(Object.keys(e))&&((t=Object.keys(e))==null?void 0:t.length)>0){let l=[];return(n=Object.entries(e))==null||n.forEach(([a,o])=>{var i,f;let s=[];if(s.push(a),((i=Object.keys(o))==null?void 0:i.length)>0){let m=[];(f=Ve(o))==null||f.forEach(D=>{m.push(D)}),m==null||m.forEach(D=>{s.push(D)})}l.push(s)}),l}},En=(e,t)=>{var l;let n=t;return Array.isArray(Object.keys(e))&&((l=Object.entries(e))==null||l.forEach(([a,o])=>{let s=[a];if(typeof o=="object"&&o!==null){let i=Ve(o);i==null||i.forEach(f=>{s.push(f)})}n.push(s)})),n},On=e=>{const t={};return e.forEach(l=>{const a=l.split("/");let o=t;a.forEach(s=>{o[s]||(o[s]={}),o=o[s]})}),En(t,[])},Ge=e=>On(e),Nn=e=>{var t,n,l,a,o,s,i,f;try{const m=Ce((n=(t=p.cloneDeep(e))==null?void 0:t.replace("(","("))==null?void 0:n.replace(")",")")),D=(a=(l=p.cloneDeep(m))==null?void 0:l.filter(C=>!C.includes("/*")))==null?void 0:a.map(C=>gn(C)),A=Tn(D),$=[];if(((o=A==null?void 0:A.find(C=>(C==null?void 0:C.key)==="Menus"))==null?void 0:o.value.length)===0)return!1;(s=p.cloneDeep(A))==null||s.forEach(C=>{var S,h,d,u,b;L!=null&&L.find(c=>{var r,g;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((g=C==null?void 0:C.key)==null?void 0:g.toUpperCase())})?$.push({comp:((S=L==null?void 0:L.find(c=>{var r,g;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((g=C==null?void 0:C.key)==null?void 0:g.toUpperCase())}))==null?void 0:S.value)??"",name:(h=C==null?void 0:C.value)==null?void 0:h.replace(/[’]|[‘]|[']/g,""),compData:[]}):J!=null&&J.find(c=>{var r,g;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((g=C==null?void 0:C.key)==null?void 0:g.toUpperCase())})&&(($==null?void 0:$.length)===0&&(d=C.key)!=null&&d.includes("Menus")&&$.push({comp:"Menu",name:"",compData:[]}),(u=$==null?void 0:$[($==null?void 0:$.length)-1])!=null&&u.compData&&$[($==null?void 0:$.length)-1].compData.push({key:(b=J==null?void 0:J.find(c=>{var r,g;return((r=c==null?void 0:c.key)==null?void 0:r.toUpperCase())===((g=C==null?void 0:C.key)==null?void 0:g.toUpperCase())}))==null?void 0:b.value,contents:C==null?void 0:C.value}))});let x=(i=p.cloneDeep($))==null?void 0:i.map(C=>{var S;return C!=null&&C.compData&&(C.compData=(S=C==null?void 0:C.compData)==null?void 0:S.map(h=>{var d,u,b,c,r,g,_,T,O,E,j;if((h==null?void 0:h.key)==="formFlex")h.contents=((u=(d=h.contents)==null?void 0:d.replace(/[’]|[‘]|[']/g,""))==null?void 0:u.toUpperCase())!=="Vertical".toUpperCase();else if((h==null?void 0:h.key)==="groupContents")h.contents=(b=p.cloneDeep(h.contents))==null?void 0:b.map(N=>An(p.cloneDeep(N)));else if(Array.isArray(h==null?void 0:h.contents))h.contents=Ge(h.contents);else if(((r=(c=h==null?void 0:h.contents)==null?void 0:c.trim())!=null&&r.startsWith("[")||(_=(g=h.contents)==null?void 0:g.trim())!=null&&_.startsWith("【"))&&((O=(T=h.contents)==null?void 0:T.trim())!=null&&O.endsWith("]")||(j=(E=h.contents)==null?void 0:E.trim())!=null&&j.endsWith("】")))h.contents=$n(p.cloneDeep(h.contents));else{if(!h.contents)return;h.contents=Le(p.cloneDeep(h.contents))}return h})),C});return x=(f=p.cloneDeep(x))==null?void 0:f.map(C=>{var S;return(C==null?void 0:C.comp)==="Group"&&(C.compData=(S=C.compData)==null?void 0:S.map(h=>{var u;let d=[];return(u=h.contents)==null||u.forEach(b=>{var c,r,g,_,T,O,E,j,N,v,w,P;if(L!=null&&L.find(B=>{var k,F,U;return((k=B==null?void 0:B.key)==null?void 0:k.toUpperCase())===((U=(F=Object.keys(b))==null?void 0:F[0])==null?void 0:U.toUpperCase())}))d.push({comp:(c=L==null?void 0:L.find(B=>{var k,F,U;return((k=B==null?void 0:B.key)==null?void 0:k.toUpperCase())===((U=(F=Object.keys(b))==null?void 0:F[0])==null?void 0:U.toUpperCase())}))==null?void 0:c.value,name:(g=(r=Object.values(b))==null?void 0:r[0])==null?void 0:g.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(J!=null&&J.find(B=>{var k,F,U;return((k=B==null?void 0:B.key)==null?void 0:k.toUpperCase())===((U=(F=Object.keys(b))==null?void 0:F[0])==null?void 0:U.toUpperCase())})){if((d==null?void 0:d.length)===0)return;(_=d==null?void 0:d[(d==null?void 0:d.length)-1])!=null&&_.compData&&d[(d==null?void 0:d.length)-1].compData.push({key:(T=J==null?void 0:J.find(B=>{var k,F,U;return((k=B==null?void 0:B.key)==null?void 0:k.toUpperCase())===((U=(F=Object.keys(b))==null?void 0:F[0])==null?void 0:U.toUpperCase())}))==null?void 0:T.value,contents:(O=Object.values(b))==null?void 0:O[0]})}else if((j=(E=Object.keys(b))==null?void 0:E[0])!=null&&j.includes("$")){const B=(v=(N=Object.keys(p.cloneDeep(b)))==null?void 0:N[0])==null?void 0:v.split("$");d[(d==null?void 0:d.length)-1].compData.push({key:(w=J==null?void 0:J.find(k=>{var F,U;return((F=k==null?void 0:k.key)==null?void 0:F.toUpperCase())===((U=B==null?void 0:B[0])==null?void 0:U.toUpperCase())}))==null?void 0:w.value,contents:(P=Object.values(b))==null?void 0:P[0],selectLabel:B==null?void 0:B[1]})}return b}),h.contents=d,h})),C}),x}catch{return!1}},X=e=>{try{return JSON.parse(e),!0}catch{return!1}},vn=(e,t)=>Pl(e,t),ve=y.ref(0),Me=e=>{const t=[];let n=null;for(let l=0;l<e.length;l++){const a=e[l];if(Array.isArray(a))n&&(n.children=Me(a));else{const o={label:a};t.push(o),n=o}}return t},Ie=e=>{let t=0;for(const n of e)t++,n.children&&(t+=Ie(n.children));return t},qe=(e,t,n=[])=>{let l=0;for(const a of t){if(l>=e.length)break;const o=[...e[l]];if(n.push(o),l++,a.children&&a.children.length>0){const s=[];qe(e.slice(l),a.children,s),s.length>0&&(o.push(s),l+=Ie(a.children))}}return n},Sn=(e,t)=>{let n=[];return e==null||e.forEach(a=>{a.some(o=>Array.isArray(o))?n.push(...a):n.push(a)}),qe(n,t)},be=e=>{const t={label:e[0].trim()};if(e.length>1){const n=e.slice(1);n.length===1&&Array.isArray(n[0])?t.children=n[0].map(l=>Array.isArray(l)?be(l):{label:l.trim()}):t.children=n.map(l=>Array.isArray(l)?be(l):{label:l.trim()})}return t},Se=e=>{let t=e.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return t=t.replace(/:}(?=,|]|}|$)/g,':""}'),t=t.replace(/:,(?=\s*")/g,':"",'),t=t.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(n,l,a)=>`"${l}://${a}"`),t=t.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),t},Bn=e=>{var n;return e.some(l=>!Array.isArray(l))?e:(n=p.cloneDeep(e))==null?void 0:n.map(l=>{let a=[];return l.some(o=>Array.isArray(o))?l==null||l.forEach(o=>{Array.isArray(o)&&a.push(be(o))}):l.some(o=>o.includes("["))?a.push(l):a=l.map(o=>({label:o.trim()})),a})},He=(e,t,n)=>{let l=e,a=n,o=t;return o.children&&(Array.isArray(a[a.length-1])?a[a.length-1].push(l[0]):a.push(l[0]),l.shift(),o=o.children),Array.isArray(o)&&o.forEach(s=>{if(s.children){const i=He(l,s,a);a=i[0],l=i[1]}}),[a,l]},Pn=(e,t)=>{let n=e,l=[];return t.length>0?t==null||t.forEach(a=>{let o=n==null?void 0:n[0];n.shift();const s=He(p.cloneDeep(n),a,o);o=s[0],n=s[1],l.push(o)}):l=n,l},De=(e,t)=>{const n=Bn(p.cloneDeep(e));return Pn(n,t)},wn=e=>{const t=[];let n=0;const l=e.length;for(;n<l;){const a=e[n];a.key==="tableColumns"&&n+1<l&&e[n+1].key==="tableContents"?(t.push({comp:"Table",compData:[a,e[n+1]],name:""}),n+=2):(t.push(a),n+=1)}return t},We=e=>De([e],[]),Be=e=>{const t=[];return e==null||e.forEach(n=>n==null?void 0:n.forEach(a=>{var o,s;ve.value++,t.push({id:ve.value,key:(o=Object.keys(a))==null?void 0:o[0],value:(s=Object.values(a))==null?void 0:s[0],width:n.length})})),t},Pe=e=>{let t=wn(e);return t=t==null?void 0:t.map(n=>{var l,a,o,s;if(n.comp==="Table")(l=n.compData)!=null&&l.find(i=>(i==null?void 0:i.key)==="header")||(n.compData=(a=n.compData)==null?void 0:a.map(i=>(i.key==="tableColumns"?i={key:"header",contents:De(i.value,[])}:i={key:i.key,contents:i.value},i)),n.compData.push({key:"extraButton",contents:[{label:"新增"}]}),n.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(n.key==="form"){const i=(o=n==null?void 0:n.value)==null?void 0:o.map(f=>(Array.isArray(f)||(f=[f]),f));n={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Be(i)}],name:""}}else if(n.key==="formTop"){const i=(s=n==null?void 0:n.value)==null?void 0:s.map(f=>(Array.isArray(f)||(f=[f]),f));n={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Be(i)}],name:""}}return n}),t},Fn=(e,t)=>{var i,f,m,D,A,$;const n=[],l=Me((f=(i=e==null?void 0:e.find(x=>x.key==="tableIndex"))==null?void 0:i.value)==null?void 0:f[0]);n.push({key:"tableIndexColumn",contents:t}),n.push({key:"tableIndex",contents:l});let a=[];const o=(m=e==null?void 0:e.find(x=>x.key==="tableColumns"))==null?void 0:m.value;o.length===1&&!(o!=null&&o[0].some(x=>Array.isArray(x)))?a=(D=o==null?void 0:o[0])==null?void 0:D.map(x=>({label:x})):a=De((A=e==null?void 0:e.find(x=>x.key==="tableColumns"))==null?void 0:A.value,l),n.push({key:"header",contents:a});const s=Sn(($=e==null?void 0:e.find(x=>x.key==="tableContents"))==null?void 0:$.value,l);return n.push({key:"tableContents",contents:s}),n.push({key:"extraButton",contents:[{label:"新增"}]}),n.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),n},Ke=e=>e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(t,n,l)=>{const a=Ke(l);return`"${n}",${a}`}),se=e=>{const t=e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Ke(t).replace(/^"(.*)"$/,"$1")},jn=e=>{const t=new Set;return e.filter(n=>{const l=JSON.stringify(n);return t.has(l)?!1:t.add(l)})},we=e=>{var n;let t=[];return(n=p.cloneDeep(e))==null||n.forEach(l=>{var a;(a=l.contents)==null||a.forEach(o=>{t.push(o)})}),t=jn(t),t.push({label:"操作"}),[t]},Un=(e,t)=>e.reduce((n,l,a)=>{const o=Math.floor(a/t);return n[o]||(n[o]=[]),n[o].push(l),n},[]),Ze=e=>e.reduce((t,n)=>n.children&&n.children.length>0?t+Ze(n.children):t+1,0),Rn=(e,t)=>{var l;let n=[];return(l=Un(e,Ze(t==null?void 0:t[0])-1))==null||l.forEach(a=>{let o=[];a.forEach(s=>{var i;Array.isArray(s.contents)?(i=s.contents)==null||i.forEach(f=>{o.push(f)}):o.push(s.contents)}),n.push(o)}),[n]},Jn=["方法体","输入","输出"],Fe=y.ref(1),Ce=e=>{let t;e.replaceAll(" ",`\r
|
|
2
2
|
`).includes(`\r
|
|
3
3
|
`)?t=e.replaceAll(" ",`\r
|
|
4
4
|
`).split(`\r
|
|
5
5
|
`).filter(a=>a.trim()!==""):t=e.replaceAll(" ",`\r
|
|
6
6
|
`).split(`
|
|
7
|
-
`).filter(a=>a.trim()!=="");const n=[];let l="";for(const a of t)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(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},Ln=e=>{const[t,n]=e.split(/=(.+)/),l=t.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},de=e=>{let t;e.includes(":")?t=e.split(":").filter(a=>a.trim()!==""):t=e.split(":").filter(a=>a.trim()!=="");const n=[];let l="";for(const a of t)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(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},Vn=e=>/^[\x00-\x7F]*$/.test(e),Gn=e=>{var a;const t=e.map(o=>{var u,f;let s=(f=(u=o.key.split("("))==null?void 0:u[1])==null?void 0:f.trim();return s.slice(0,s.length-1)}),n=t==null?void 0:t.map(o=>{var u;return(u=de(o))==null?void 0:u.map(f=>{var m;if(f.includes("{")){let D=(m=f.split(":"))==null?void 0:m[0];f=D.slice(1,D.length)}return f})}).filter(o=>o.length!==0),l=(a=n==null?void 0:n.filter(o=>o.length!==0))==null?void 0:a.map(o=>{let s="";return o.forEach(u=>{u.includes("{")||(s=s===""?s+p.cloneDeep(u):s+"/"+p.cloneDeep(u))}),s});return Ge([...new Set(l)])},ze=e=>{var n,l,a,o,s,u,f,m;const t=(l=(n=e.split("("))==null?void 0:n[1])==null?void 0:l.trim();return((a=de(t.slice(0,t.length-1)))==null?void 0:a.length)>0?t.slice(0,t.length-1):(m=(f=(u=(s=(o=e.split("("))==null?void 0:o[1])==null?void 0:s.trim())==null?void 0:u.split(")"))==null?void 0:f[0])==null?void 0:m.trim()},Mn=e=>{var a;if(!e)return;const t=ze(e),n=(a=de(t))==null?void 0:a.map(o=>{var s;if(o.includes("{")){let u=(s=o.split(":"))==null?void 0:s[0];o=u.slice(1,u.length)}return o});let l="";return n.forEach(o=>{o.includes("{")||(l=l===""?l+p.cloneDeep(o):l+"/"+p.cloneDeep(o))}),l},In=e=>{const t=e.match(/\[(.*)\]/s);if(t){const n=`[${t[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,'"'))}}},qn=e=>{var o;if(!e)return;const t=ze(e);let n=[],l=[],a=[];return(o=de(t))==null||o.forEach(s=>{var u;s.includes("[")?n.push(In(s)):s.includes("{")&&(Vn((u=s.slice(1,s.length-1).split(":"))==null?void 0:u[0])?a.push(JSON.parse(s.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):X(s.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))?l.push(JSON.parse(s.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):s.includes("$")||l.push(s.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3')))}),[n,l,a]},Hn=e=>{const t=[];let n="";for(const l of e)l.includes("[")||n.includes("[")||l.includes("/*")||n.includes("/*")?(n+=l.trim(),p.cloneDeep(n).split("{").length-1===p.cloneDeep(n).split("}").length-1&&p.cloneDeep(n).split("【").length-1===p.cloneDeep(n).split("】").length-1&&p.cloneDeep(n).split("[").length-1===p.cloneDeep(n).split("]").length-1&&p.cloneDeep(n).split("(").length-1===p.cloneDeep(n).split(")").length-1&&p.cloneDeep(n).split("(").length-1===p.cloneDeep(n).split(")").length-1&&p.cloneDeep(n).split("/*").length-1===p.cloneDeep(n).split("*/").length-1&&(t.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):t.push(l.trim().replace(/\/\*[\s\S]*?\*\//g,""));return t},je=e=>{var s,u;const t=[],n=/(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/,l=e.match(n);if(l){const f=l[1]||l[3],m=l[2]||l[4];if(f&&m){const D=`${f}/${m}`;t.push(D)}}const a=/(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i,o=e.match(a);return o?t.push(o[0].replace(/\)+$/,"")):(e==null?void 0:e.split(",").length)===2&&t.push((u=(s=e==null?void 0:e.split(","))==null?void 0:s[1])==null?void 0:u.trim()),t},me=e=>{let t=e.replace(/\[\s*,\s*,/g,'[{"": ""}, {"": ""},');return t=t.replace(/\[\s*,/g,'[{"": ""},'),t=t.replace(/,\s*,/g,', {"": ""},'),t=t.replace(/,\s*\]/g,', {"": ""}]'),t=t.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g,(n,l,a,o,s)=>a.includes("'")?`:${l}${a}${o}${s}`:`:${l}"${a}"${o}${s}`),t=t.replace(/:\s*([,\]}])/g,': ""$1'),t},Wn=e=>!/\[[^\]]*\{[^\]]*\]/.test(e),Kn=e=>{const t=p.cloneDeep(e).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/),n=t?`${t[2]}/${t[3]}`:null,l=e.match(/\[\{([^}]+)\}\]/),a=l==null?void 0:l[1].replaceAll(":","").replaceAll("'",'"').trim();let o=null;if(a)try{o=JSON.parse(a)}catch(s){console.error("解析数组失败:",s)}return[n,o]},Zn=e=>{var u,f,m,D,A,$,x,C,S,h,d;let t=[],n=[],l={},a=[],o=e.trim(),s=[];if(o.trim().includes("输入")&&o.trim().includes("输出")){let i=[],b=e.trim();b=p.cloneDeep(b).slice(1,p.cloneDeep(b).length-1);const c=/(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;(C=b.match(c))==null||C.forEach((r,g)=>{var O;const _=r;let T=[];(O=_.slice(1,_.length-1).replace(":","$:").split("$:"))==null||O.forEach(E=>{var j,N,v;if(Jn.find(P=>E.includes(P)))if(!E.includes("=="))T.push({key:"tableIndexColumn",contents:E.replaceAll("'","")});else{let P=[];const F=E.replaceAll("'","").split("==");P.push(F==null?void 0:F[0]),F!=null&&F[1].includes("[")?P.push(F==null?void 0:F[1].trim().slice(1,(F==null?void 0:F[1].length)-1).split(",")):P.push([F==null?void 0:F[1]]),T.push({key:"header",contents:[(N=(j=We([P]))==null?void 0:j[0])==null?void 0:N[0]]})}else{let P=E.trim().replaceAll(",",",").replaceAll("'",'"');if(g%3===0)P.slice(1,P.length-1).includes("[")?i.push({key:"tableIndex",contents:[{label:P}]}):i.push({key:"tableIndex",contents:[{label:P.slice(1,P.length-1)}]});else if((P==null?void 0:P[0])==="{"){let F=[];const B=P.slice(1,P.length-1).split(":");if(B.every(k=>X(k.trim()))){F.push({key:"tableContentName",contents:"详情"});let k=[];B.forEach((w,U)=>{if(U===0){const R=JSON.parse(w).map(I=>({label:I}));R.push({label:"操作"}),k.push({key:"header",contents:R})}else k.push({key:"tableContents",contents:JSON.parse(w)})}),k.push({key:"extraButton",contents:[{label:"新增"}]}),k.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),F.push({comp:"Table",compData:k,name:""}),i.push({key:"tableContents",contents:[F]})}}else{let F=P;F.slice(1,F.length-1).includes("[")||F.slice(1,F.length-1).includes("{")?X(Se(F.replace(/\s+/g,"")))&&((v=JSON.parse(Se(F.replace(/\s+/g,""))))==null||v.map(B=>{if(Array.isArray(B==null?void 0:B[0])){const k=[];k.push({key:"tableContentName",contents:"详情"});let w=[];B.forEach(U=>{U.forEach(R=>{var I,H;we.value++,w.push({id:we.value,key:(I=Object.keys(R))==null?void 0:I[0],value:(H=Object.values(R))==null?void 0:H[0],width:U.length})})}),k.push({comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:w}],name:""}),i.push({key:"tableContents",contents:[k]})}else i.push({key:"tableContents",contents:B==null?void 0:B[0]})})):i.push({key:"tableContents",contents:F.trim().slice(1,F.length-1)})}}}),i.push(T==null?void 0:T[0])}),s.push({key:"tableIndex",contents:(S=i==null?void 0:i.filter(r=>(r==null?void 0:r.key)==="tableIndex"))==null?void 0:S.map(r=>{var g;return(g=r.contents)==null?void 0:g[0]})}),s.push({key:"extraButton",contents:[{label:"新增"}]}),s.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),s.push({key:"tableIndexColumn",contents:(d=(h=i==null?void 0:i.filter(r=>(r==null?void 0:r.key)==="tableIndexColumn"))==null?void 0:h[0])==null?void 0:d.contents}),s.push({key:"header",contents:Pe(i==null?void 0:i.filter(r=>(r==null?void 0:r.key)==="header"))}),s.push({key:"tableContents",contents:Rn(i==null?void 0:i.filter(r=>(r==null?void 0:r.key)==="tableContents"),Pe(i==null?void 0:i.filter(r=>(r==null?void 0:r.key)==="header")))})}else{const i=(u=o.trim().split(",$"))==null?void 0:u[0];i[0]==="["?o=i.slice(1,i.length-1):o.includes(",$")&&(o=(f=o.trim().split(",$"))==null?void 0:f[0]);let b;if(o.includes("$")){o=p.cloneDeep(o),l.method=(D=(m=p.cloneDeep(o).trim())==null?void 0:m.slice(1,o.length).split("("))==null?void 0:D[0];let c;je(o.slice(1,o.length-2)).length>1?c=je(o.slice(1,o.length-2)):c=Kn(o),l.value=c}else X("["+me(o).replaceAll("'",'"')+"]")&&!Wn(me(o).replaceAll("'",'"'))?(o=JSON.parse("["+me(o).replaceAll("'",'"')+"]"),a=o):b=($=(A=p.cloneDeep(o).split("}"))==null?void 0:A.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});(x=p.cloneDeep(b))==null||x.forEach(c=>{var r,g,_,T,O,E,j,N,v,P,F,B,k,w,U;if(c.includes("==")){const R=(B=c==null?void 0:c.split(":"))==null?void 0:B[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'),I=(k=c==null?void 0:c.split(":"))==null?void 0:k[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"');if(X(I.trim())?n.push(JSON.parse(I.trim())):n.push(JSON.parse(I.replaceAll("'",'"').trim())),R[0]!=="["){let H=[];X("["+se(R)+"]")?H.push(JSON.parse("["+se(R)+"]")):X("["+se(R).replaceAll("==",",")+"]")&&H.push(JSON.parse("["+se(R).replaceAll("==",",")+"]"));const q=p.cloneDeep(H);q.push(["操作"]),t.push(q)}else{const H=(w=R.slice(1,R.length-1).replaceAll(",",",|"))==null?void 0:w.split("|"),q=(U=Hn(H))==null?void 0:U.map(V=>((V==null?void 0:V[V.length-1])===","&&(V=V.slice(0,V.length-1)),V));let z=[];q==null||q.forEach(V=>{var W,M,Q,G;let K=[];K.push((W=V.split("=="))==null?void 0:W[0].trim().replace(/^"|"$/g,"")),((M=V.split("=="))==null?void 0:M[1].trim()[0])==="["?K.push(JSON.parse((Q=V.split("=="))==null?void 0:Q[1].trim())):K.push([JSON.parse((G=V.split("=="))==null?void 0:G[1].trim())]),z.push(K)});const Z=p.cloneDeep(z);Z.push(["操作"]),t.push(Z)}}else{if(X((r=c==null?void 0:c.split(":"))==null?void 0:r[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'))){let R=JSON.parse((g=c==null?void 0:c.split(":"))==null?void 0:g[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'));Array.isArray(R)||(R=[R]),R.push("操作"),t.push(R)}X((O=(T=(_=c==null?void 0:c.split(":"))==null?void 0:_[1])==null?void 0:T.replace(/^"|"$/g,"'"))==null?void 0:O.replace(/'([^']+)'/g,'"$1"'))?n.push(JSON.parse((E=c==null?void 0:c.split(":"))==null?void 0:E[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"'))):X((P=(v=(N=(j=c==null?void 0:c.split(":"))==null?void 0:j[1])==null?void 0:N.replace(/^"|"$/g,"'"))==null?void 0:v.replaceAll("'",'"'))==null?void 0:P.replace(/'([^']+)'/g,'"$1"'))&&n.push(JSON.parse((F=c==null?void 0:c.split(":"))==null?void 0:F[1].replace(/^"|"$/g,"'").replaceAll("'",'"').replace(/'([^']+)'/g,'"$1"')))}})}return[t,n,s,l,a]},zn=e=>{const t=[],n=Mn(e==null?void 0:e.key),l=qn(e==null?void 0:e.key),a=Zn(e==null?void 0:e.value),o=l==null?void 0:l[0],s=a==null?void 0:a[4],u=l==null?void 0:l[1],f=l==null?void 0:l[2],m=a==null?void 0:a[0],D=a==null?void 0:a[1],A=a==null?void 0:a[2],$=a==null?void 0:a[3];return n&&t.push({key:"contentPath",value:n}),(o==null?void 0:o.length)>0&&t.push({key:"tableIndex",value:o}),$&&t.push({key:"extraButton",value:$}),(s==null?void 0:s.length)>0&&t.push({key:"form",value:s}),(u==null?void 0:u.length)>0&&t.push({key:"formTop",value:u}),(f==null?void 0:f.length)>0&&t.push({key:"extra",value:f}),(A==null?void 0:A.length)>0&&t.push({comp:"Table",compData:A,name:""}),(m==null?void 0:m.length)>0&&t.push({key:"tableColumns",value:m}),(D==null?void 0:D.length)>0&&t.push({key:"tableContents",value:D}),t},Qn=e=>{let t=[],n=[];e==null||e.forEach(a=>{Array.isArray(a)&&(a==null||a.forEach(o=>{var s;o.comp==="FormTop"&&((s=o.compData)==null||s.forEach(u=>{(u==null?void 0:u.key)==="formContent"&&(n=[...n,...u.contents])}))}))});const l=n.reduce((a,o)=>a.find(u=>(u==null?void 0:u.key)===(o==null?void 0:o.key))?a:a.concat([o]),[]);return l.length!==0&&t.push([{comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:l}]}]),e==null||e.forEach(a=>{if(Array.isArray(a)){const o=a.filter(s=>s.comp!=="FormTop");t.push(o)}else t.push(a)}),t},Xn=(e,t)=>{const n=t.split("/");let l=[];return e==null||e.forEach(a=>{var u,f,m,D,A,$,x,C,S;const o=[],s=(f=(u=a.find(h=>h.key==="tableIndex"))==null?void 0:u.value)==null?void 0:f[0];if(s&&!s.some(h=>Array.isArray(h))){const h=(D=(m=a.find(d=>d.key==="tableColumns"))==null?void 0:m.value)==null?void 0:D[0];o.push({key:"tableIndexColumn",contents:n[n.length-1]}),o.push({key:"tableIndex",contents:s==null?void 0:s.map(d=>({label:d}))}),o.push({key:"extraButton",contents:[{label:"新增"}]}),o.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),Array.isArray(h)&&h.some(d=>Array.isArray(d))?o.push({key:"header",contents:We(h)}):o.push({key:"header",contents:Array.isArray(h)?h==null?void 0:h.map(d=>({label:d})):[h].map(d=>({label:d}))}),o.push({key:"tableContents",contents:Array.isArray(h)?($=(A=a.find(d=>d.key==="tableContents"))==null?void 0:A.value)==null?void 0:$[0]:(S=(C=(x=a.find(d=>d.key==="tableContents"))==null?void 0:x.value)==null?void 0:C[0])==null?void 0:S.map(d=>[d])}),l.push({comp:"Table",name:"",compData:o})}else s?l.push({comp:"Table",name:"",compData:wn(a,n[n.length-1])}):a.some(h=>h.key==="extra")?l.push({comp:"calculator",name:"",compData:Fe(a)}):l.push(Fe(a))}),Qn(l)},Yn=(e,t)=>{var a,o;const n=e.map(s=>s.filter(u=>u.key!=="contentPath"));return{comp:"Group",compData:[{contents:Xn(n,t),key:"groupContents"}],name:(o=(a=e[0])==null?void 0:a.find(s=>s.key==="contentPath"))==null?void 0:o.value}},et=e=>{var a;const t=[],n=p.cloneDeep(e).map(o=>{var s;if(o!=null&&o.find(u=>(u==null?void 0:u.key)==="contentPath"))return(s=o==null?void 0:o.find(u=>(u==null?void 0:u.key)==="contentPath"))==null?void 0:s.value}).filter(o=>o!==""),l=[...new Set(n)];return(a=l==null?void 0:l.filter(o=>o))==null||a.forEach(o=>{var s;t.push(Yn((s=p.cloneDeep(e))==null?void 0:s.filter(u=>u.find(f=>f.key==="contentPath"&&f.value===o)),o))}),t},lt=e=>{let t=[];t.push({comp:"Menu",compData:[{contents:Gn(p.cloneDeep(e)),key:"menuContents"}],name:""});const n=e.map(l=>zn(l)).filter(l=>l.length!==0);return t=[...t,...et(n)],t},nt=e=>{var a,o,s,u,f;const t=(s=Ce((o=(a=p.cloneDeep(e))==null?void 0:a.replace("(","("))==null?void 0:o.replace(")",")")))==null?void 0:s.filter(m=>m!==""),n=(f=(u=p.cloneDeep(t))==null?void 0:u.filter(m=>!m.includes("/*")))==null?void 0:f.map(m=>Ln(m));return lt(n)},ce=y.ref(0),ge=y.ref(0),tt=e=>{const t=e.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(t))!==null;){const o=a[1];let s=a[2].trim();(s.match(/\[/g)||[]).length!==(s.match(/\]/g)||[]).length&&(s=s==null?void 0:s.replace(/]$/,"")),l[o]?(l[o+ge.value]&&ge.value++,l[o+ge.value]=o+"="+s):l[o]=o+"="+s}return l},Qe=e=>{const[t,n]=e.split("=").map(o=>o.trim()),l=t.replace(/['"]/g,""),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},at=e=>{var s;let t=[];const[n,l]=e.split(/=(.+)/),a=n.replace(/['"]/g,"").trim(),o=l.replace(/^['"]|['"]$/g,"");return(s=Object.values(tt(o)))==null||s.forEach(u=>{t.push(Qe(u))}),{key:a,value:t}},ue=e=>{try{return JSON.parse(e),!0}catch{return!1}},Xe=e=>{try{const t=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(t).split("{").length-1>1){let n=p.cloneDeep(t).replace(/^\{(.*)\}$/,"[$1]");if(ue(n)&&!n.includes("$")||(n=n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),ue(n)){const l=JSON.parse(n);let a=[];return l==null||l.forEach(o=>{var s;(s=Object.entries(p.cloneDeep(o)))==null||s.forEach(u=>{ce.value++,a.push({id:ce.value,key:(u==null?void 0:u[0])??"",value:(u==null?void 0:u[1])===""?"":u==null?void 0:u[1],width:Object.keys(p.cloneDeep(o)).length})})}),a}else return console.error("转换类型不正确:"),[]}else if(ue(t)){const n=JSON.parse(t);return Object.entries(n).map(([l,a])=>(ce.value++,{id:ce.value,key:l,value:a===""?"":a,width:1}))}else return t}catch(t){return console.error("转换失败:",t),[]}},ot=(e,t)=>{try{if(L!=null&&L.find(n=>(n==null?void 0:n.key)===t))return JSON.parse(e.replace(/[’]|[‘]|[']/g,'"'));if(p.cloneDeep(e).split("[").length-1>1){const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(ue(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return Xe(p.cloneDeep(e))}}catch(n){return console.error("解析失败:",n),e}},rt=e=>({[e==null?void 0:e.key]:ot(e==null?void 0:e.value,e==null?void 0:e.key)}),st=e=>{try{if(p.cloneDeep(e).split("[").length-1>1){const t=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(t){return console.error("解析失败:",t),e}},Ye=e=>{var t,n,l,a,o,s;try{const u=Ce((n=(t=p.cloneDeep(e))==null?void 0:t.replace("(","("))==null?void 0:n.replace(")",")")),f=(l=p.cloneDeep(u))==null?void 0:l.map(A=>{var x,C;let $=(C=(x=p.cloneDeep(A))==null?void 0:x.split("="))==null?void 0:C[0];return $!=null&&$.includes("GroupContents")?at(A):Qe(A)}),m=[];(a=p.cloneDeep(f))==null||a.forEach(A=>{var $,x,C,S,h;L!=null&&L.find(d=>{var i,b;return((i=d==null?void 0:d.key)==null?void 0:i.toUpperCase())===((b=A==null?void 0:A.key)==null?void 0:b.toUpperCase())})?m.push({comp:(($=L==null?void 0:L.find(d=>{var i,b;return((i=d==null?void 0:d.key)==null?void 0:i.toUpperCase())===((b=A==null?void 0:A.key)==null?void 0:b.toUpperCase())}))==null?void 0:$.value)??"",name:(x=A==null?void 0:A.value)==null?void 0:x.replace(/[’]|[‘]|[']/g,""),compData:[]}):J!=null&&J.find(d=>{var i,b;return((i=d==null?void 0:d.key)==null?void 0:i.toUpperCase())===((b=A==null?void 0:A.key)==null?void 0:b.toUpperCase())})&&((m==null?void 0:m.length)===0&&(C=A.key)!=null&&C.includes("Menus")&&m.push({comp:"Menu",name:"",compData:[]}),(S=m==null?void 0:m[(m==null?void 0:m.length)-1])!=null&&S.compData&&m[(m==null?void 0:m.length)-1].compData.push({key:(h=J==null?void 0:J.find(d=>{var i,b;return((i=d==null?void 0:d.key)==null?void 0:i.toUpperCase())===((b=A==null?void 0:A.key)==null?void 0:b.toUpperCase())}))==null?void 0:h.value,contents:A==null?void 0:A.value}))}),console.log("newContents",m);let D=(o=p.cloneDeep(m))==null?void 0:o.map(A=>{var $;return A!=null&&A.compData&&(A.compData=($=A==null?void 0:A.compData)==null?void 0:$.map(x=>{var C,S,h,d,i,b,c,r,g,_,T;if((x==null?void 0:x.key)==="formFlex")x.contents=((S=(C=x.contents)==null?void 0:C.replace(/[’]|[‘]|[']/g,""))==null?void 0:S.toUpperCase())!=="Vertical".toUpperCase();else if((x==null?void 0:x.key)==="groupContents")x.contents=(h=p.cloneDeep(x.contents))==null?void 0:h.map(O=>rt(p.cloneDeep(O)));else if(((i=(d=x.contents)==null?void 0:d.trim())!=null&&i.startsWith("[")||(c=(b=x.contents)==null?void 0:b.trim())!=null&&c.startsWith("【"))&&((g=(r=x.contents)==null?void 0:r.trim())!=null&&g.endsWith("]")||(T=(_=x.contents)==null?void 0:_.trim())!=null&&T.endsWith("】")))x.contents=st(p.cloneDeep(x.contents));else{if(!x.contents)return;x.contents=Xe(p.cloneDeep(x.contents))}return x})),A});return D=(s=p.cloneDeep(D))==null?void 0:s.map(A=>{var $;return(A==null?void 0:A.comp)==="Group"&&(A.compData=($=A.compData)==null?void 0:$.map(x=>{var S;let C=[];return(S=x.contents)==null||S.forEach(h=>{var d,i,b,c,r,g,_,T,O,E,j,N;if(L!=null&&L.find(v=>{var P,F,B;return((P=v==null?void 0:v.key)==null?void 0:P.toUpperCase())===((B=(F=Object.keys(h))==null?void 0:F[0])==null?void 0:B.toUpperCase())}))C.push({comp:(d=L==null?void 0:L.find(v=>{var P,F,B;return((P=v==null?void 0:v.key)==null?void 0:P.toUpperCase())===((B=(F=Object.keys(h))==null?void 0:F[0])==null?void 0:B.toUpperCase())}))==null?void 0:d.value,name:(b=(i=Object.values(h))==null?void 0:i[0])==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(J!=null&&J.find(v=>{var P,F,B;return((P=v==null?void 0:v.key)==null?void 0:P.toUpperCase())===((B=(F=Object.keys(h))==null?void 0:F[0])==null?void 0:B.toUpperCase())})){if((C==null?void 0:C.length)===0)return;(c=C==null?void 0:C[(C==null?void 0:C.length)-1])!=null&&c.compData&&C[(C==null?void 0:C.length)-1].compData.push({key:(r=J==null?void 0:J.find(v=>{var P,F,B;return((P=v==null?void 0:v.key)==null?void 0:P.toUpperCase())===((B=(F=Object.keys(h))==null?void 0:F[0])==null?void 0:B.toUpperCase())}))==null?void 0:r.value,contents:(g=Object.values(h))==null?void 0:g[0]})}else if((T=(_=Object.keys(h))==null?void 0:_[0])!=null&&T.includes("$")){const v=(E=(O=Object.keys(p.cloneDeep(h)))==null?void 0:O[0])==null?void 0:E.split("$");C[(C==null?void 0:C.length)-1].compData.push({key:(j=J==null?void 0:J.find(P=>{var F,B;return((F=P==null?void 0:P.key)==null?void 0:F.toUpperCase())===((B=v==null?void 0:v[0])==null?void 0:B.toUpperCase())}))==null?void 0:j.value,contents:(N=Object.values(h))==null?void 0:N[0],selectLabel:v==null?void 0:v[1]})}return h}),x.contents=C,x})),A}),D}catch{return!1}},ct=e=>Ye(e),pt=e=>!!Ye(e),ut=ee.useModelComp(ee.pinia),{itemData:dt}=fe.storeToRefs(ut),it=fe.useMenuState(ee.pinia),{systemKey:yt,activeMenuPath:ht}=fe.storeToRefs(it),te=y.ref(0),ft=e=>e.reduce((n,l)=>{var o,s;const a=Object.values(n);return(((o=Object.keys(n))==null?void 0:o.length)===0||a[a.length-1].length>=(l==null?void 0:l.width))&&(n[te.value]=[],te.value++),n[te.value-1].push(l),((s=Object.keys(n))==null?void 0:s.length)===(l==null?void 0:l.width)&&(n[te.value]=[],te.value++),n},{});exports.arrayToNumberArray=ft;exports.equalArrays=vn;exports.expandContentStringToJson=nt;exports.expandNewStringToJson=Nn;exports.expandStringToJson=ct;exports.getComponent=Je;exports.isExpandStringToJson=pt;exports.slotContent=hn;
|
|
7
|
+
`).filter(a=>a.trim()!=="");const n=[];let l="";for(const a of t)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(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},Ln=e=>{const[t,n]=e.split(/=(.+)/),l=t.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},de=e=>{let t;e.includes(":")?t=e.split(":").filter(a=>a.trim()!==""):t=e.split(":").filter(a=>a.trim()!=="");const n=[];let l="";for(const a of t)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(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},Vn=e=>/^[\x00-\x7F]*$/.test(e),Gn=e=>{var a;const t=e.map(o=>{var i,f;let s=(f=(i=o.key.split("("))==null?void 0:i[1])==null?void 0:f.trim();return s.slice(0,s.length-1)}),n=t==null?void 0:t.map(o=>{var i;return(i=de(o))==null?void 0:i.map(f=>{var m;if(f.includes("{")){let D=(m=f.split(":"))==null?void 0:m[0];f=D.slice(1,D.length)}return f})}).filter(o=>o.length!==0),l=(a=n==null?void 0:n.filter(o=>o.length!==0))==null?void 0:a.map(o=>{let s="";return o.forEach(i=>{i.includes("{")||(s=s===""?s+p.cloneDeep(i):s+"/"+p.cloneDeep(i))}),s});return Ge([...new Set(l)])},ze=e=>{var n,l,a,o,s,i,f,m;const t=(l=(n=e.split("("))==null?void 0:n[1])==null?void 0:l.trim();return((a=de(t.slice(0,t.length-1)))==null?void 0:a.length)>0?t.slice(0,t.length-1):(m=(f=(i=(s=(o=e.split("("))==null?void 0:o[1])==null?void 0:s.trim())==null?void 0:i.split(")"))==null?void 0:f[0])==null?void 0:m.trim()},Mn=e=>{var a;if(!e)return;const t=ze(e),n=(a=de(t))==null?void 0:a.map(o=>{var s;if(o.includes("{")){let i=(s=o.split(":"))==null?void 0:s[0];o=i.slice(1,i.length)}return o});let l="";return n.forEach(o=>{o.includes("{")||(l=l===""?l+p.cloneDeep(o):l+"/"+p.cloneDeep(o))}),l},In=e=>{const t=e.match(/\[(.*)\]/s);if(t){const n=`[${t[1]}]`;try{const l=n.replace(/([^\[\],\s]+)/g,'"$1"');return JSON.parse(l)}catch(l){console.error("解析失败:",l)}}},qn=e=>{var o;if(!e)return;const t=ze(e);let n=[],l=[],a=[];return(o=de(t))==null||o.forEach(s=>{var i;s.includes("[")?n.push(In(s)):s.includes("{")&&(Vn((i=s.slice(1,s.length-1).split(":"))==null?void 0:i[0])?a.push(JSON.parse(s.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):X(s.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))?l.push(JSON.parse(s.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):s.includes("$")||l.push(s.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3')))}),[n,l,a]},Hn=e=>{const t=[];let n="";for(const l of e)l.includes("[")||n.includes("[")||l.includes("/*")||n.includes("/*")?(n+=l.trim(),p.cloneDeep(n).split("{").length-1===p.cloneDeep(n).split("}").length-1&&p.cloneDeep(n).split("【").length-1===p.cloneDeep(n).split("】").length-1&&p.cloneDeep(n).split("[").length-1===p.cloneDeep(n).split("]").length-1&&p.cloneDeep(n).split("(").length-1===p.cloneDeep(n).split(")").length-1&&p.cloneDeep(n).split("(").length-1===p.cloneDeep(n).split(")").length-1&&p.cloneDeep(n).split("/*").length-1===p.cloneDeep(n).split("*/").length-1&&(t.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):t.push(l.trim().replace(/\/\*[\s\S]*?\*\//g,""));return t},je=e=>{var s,i;const t=[],n=/(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/,l=e.match(n);if(l){const f=l[1]||l[3],m=l[2]||l[4];if(f&&m){const D=`${f}/${m}`;t.push(D)}}const a=/(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i,o=e.match(a);return o?t.push(o[0].replace(/\)+$/,"")):(e==null?void 0:e.split(",").length)===2&&t.push((i=(s=e==null?void 0:e.split(","))==null?void 0:s[1])==null?void 0:i.trim()),t},me=e=>{let t=e.replace(/\[\s*,\s*,/g,'[{"": ""}, {"": ""},');return t=t.replace(/\[\s*,/g,'[{"": ""},'),t=t.replace(/,\s*,/g,', {"": ""},'),t=t.replace(/,\s*\]/g,', {"": ""}]'),t=t.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g,(n,l,a,o,s)=>a.includes("'")?`:${l}${a}${o}${s}`:`:${l}"${a}"${o}${s}`),t=t.replace(/:\s*([,\]}])/g,': ""$1'),t},Wn=e=>!/\[[^\]]*\{[^\]]*\]/.test(e),Kn=e=>{const t=p.cloneDeep(e).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/),n=t?`${t[2]}/${t[3]}`:null,l=e.match(/\[\{([^}]+)\}\]/),a=l==null?void 0:l[1].replaceAll(":","").replaceAll("'",'"').trim();let o=null;if(a)try{o=JSON.parse(a)}catch(s){console.error("解析数组失败:",s)}return[n,o]},Zn=e=>{var i,f,m,D,A,$,x,C,S,h,d;let t=[],n=[],l={},a=[],o=e.trim(),s=[];if(o.trim().includes("输入")&&o.trim().includes("输出")){let u=[],b=e.trim();b=p.cloneDeep(b).slice(1,p.cloneDeep(b).length-1);const c=/(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;(C=b.match(c))==null||C.forEach((r,g)=>{var O;const _=r;let T=[];(O=_.slice(1,_.length-1).replace(":","$:").split("$:"))==null||O.forEach(E=>{var j,N,v;if(Jn.find(w=>E.includes(w)))if(!E.includes("=="))T.push({key:"tableIndexColumn",contents:E.replaceAll("'","")});else{let w=[];const P=E.replaceAll("'","").split("==");w.push(P==null?void 0:P[0]),P!=null&&P[1].includes("[")?w.push(P==null?void 0:P[1].trim().slice(1,(P==null?void 0:P[1].length)-1).split(",")):w.push([P==null?void 0:P[1]]),T.push({key:"header",contents:[(N=(j=We([w]))==null?void 0:j[0])==null?void 0:N[0]]})}else{let w=E.trim().replaceAll(",",",").replaceAll("'",'"');if(g%3===0)w.slice(1,w.length-1).includes("[")?u.push({key:"tableIndex",contents:[{label:w}]}):u.push({key:"tableIndex",contents:[{label:w.slice(1,w.length-1)}]});else if((w==null?void 0:w[0])==="{"){let P=[];const B=w.slice(1,w.length-1).split(":");if(B.every(k=>X(k.trim()))){P.push({key:"tableContentName",contents:"详情"});let k=[];B.forEach((F,U)=>{if(U===0){const R=JSON.parse(F).map(I=>({label:I}));R.push({label:"操作"}),k.push({key:"header",contents:R})}else k.push({key:"tableContents",contents:JSON.parse(F)})}),k.push({key:"extraButton",contents:[{label:"新增"}]}),k.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),P.push({comp:"Table",compData:k,name:""}),u.push({key:"tableContents",contents:[P]})}}else{let P=w;P.slice(1,P.length-1).includes("[")||P.slice(1,P.length-1).includes("{")?X(Se(P.replace(/\s+/g,"")))&&((v=JSON.parse(Se(P.replace(/\s+/g,""))))==null||v.map(B=>{if(Array.isArray(B==null?void 0:B[0])){const k=[];k.push({key:"tableContentName",contents:"详情"});let F=[];B.forEach(U=>{U.forEach(R=>{var I,H;Fe.value++,F.push({id:Fe.value,key:(I=Object.keys(R))==null?void 0:I[0],value:(H=Object.values(R))==null?void 0:H[0],width:U.length})})}),k.push({comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:F}],name:""}),u.push({key:"tableContents",contents:[k]})}else u.push({key:"tableContents",contents:B==null?void 0:B[0]})})):u.push({key:"tableContents",contents:P.trim().slice(1,P.length-1)})}}}),u.push(T==null?void 0:T[0])}),s.push({key:"tableIndex",contents:(S=u==null?void 0:u.filter(r=>(r==null?void 0:r.key)==="tableIndex"))==null?void 0:S.map(r=>{var g;return(g=r.contents)==null?void 0:g[0]})}),s.push({key:"extraButton",contents:[{label:"新增"}]}),s.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),s.push({key:"tableIndexColumn",contents:(d=(h=u==null?void 0:u.filter(r=>(r==null?void 0:r.key)==="tableIndexColumn"))==null?void 0:h[0])==null?void 0:d.contents}),s.push({key:"header",contents:we(u==null?void 0:u.filter(r=>(r==null?void 0:r.key)==="header"))}),s.push({key:"tableContents",contents:Rn(u==null?void 0:u.filter(r=>(r==null?void 0:r.key)==="tableContents"),we(u==null?void 0:u.filter(r=>(r==null?void 0:r.key)==="header")))})}else{const u=(i=o.trim().split(",$"))==null?void 0:i[0];u[0]==="["?o=u.slice(1,u.length-1):o.includes(",$")&&(o=(f=o.trim().split(",$"))==null?void 0:f[0]);let b;if(o.includes("$")){o=p.cloneDeep(o),l.method=(D=(m=p.cloneDeep(o).trim())==null?void 0:m.slice(1,o.length).split("("))==null?void 0:D[0];let c;je(o.slice(1,o.length-2)).length>1?c=je(o.slice(1,o.length-2)):c=Kn(o),l.value=c}else X("["+me(o).replaceAll("'",'"')+"]")&&!Wn(me(o).replaceAll("'",'"'))?(o=JSON.parse("["+me(o).replaceAll("'",'"')+"]"),a=o):b=($=(A=p.cloneDeep(o).split("}"))==null?void 0:A.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});(x=p.cloneDeep(b))==null||x.forEach(c=>{var r,g,_,T,O,E,j,N,v,w,P,B,k,F,U;if(c.includes("==")){const R=(B=c==null?void 0:c.split(":"))==null?void 0:B[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'),I=(k=c==null?void 0:c.split(":"))==null?void 0:k[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"');if(X(I.trim())?n.push(JSON.parse(I.trim())):n.push(JSON.parse(I.replaceAll("'",'"').trim())),R[0]!=="["){let H=[];X("["+se(R)+"]")?H.push(JSON.parse("["+se(R)+"]")):X("["+se(R).replaceAll("==",",")+"]")&&H.push(JSON.parse("["+se(R).replaceAll("==",",")+"]"));const q=p.cloneDeep(H);q.push(["操作"]),t.push(q)}else{const H=(F=R.slice(1,R.length-1).replaceAll(",",",|"))==null?void 0:F.split("|"),q=(U=Hn(H))==null?void 0:U.map(V=>((V==null?void 0:V[V.length-1])===","&&(V=V.slice(0,V.length-1)),V));let z=[];q==null||q.forEach(V=>{var W,M,Q,G;let K=[];K.push((W=V.split("=="))==null?void 0:W[0].trim().replace(/^"|"$/g,"")),((M=V.split("=="))==null?void 0:M[1].trim()[0])==="["?K.push(JSON.parse((Q=V.split("=="))==null?void 0:Q[1].trim())):K.push([JSON.parse((G=V.split("=="))==null?void 0:G[1].trim())]),z.push(K)});const Z=p.cloneDeep(z);Z.push(["操作"]),t.push(Z)}}else{if(X((r=c==null?void 0:c.split(":"))==null?void 0:r[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'))){let R=JSON.parse((g=c==null?void 0:c.split(":"))==null?void 0:g[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'));Array.isArray(R)||(R=[R]),R.push("操作"),t.push(R)}X((O=(T=(_=c==null?void 0:c.split(":"))==null?void 0:_[1])==null?void 0:T.replace(/^"|"$/g,"'"))==null?void 0:O.replace(/'([^']+)'/g,'"$1"'))?n.push(JSON.parse((E=c==null?void 0:c.split(":"))==null?void 0:E[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"'))):X((w=(v=(N=(j=c==null?void 0:c.split(":"))==null?void 0:j[1])==null?void 0:N.replace(/^"|"$/g,"'"))==null?void 0:v.replaceAll("'",'"'))==null?void 0:w.replace(/'([^']+)'/g,'"$1"'))&&n.push(JSON.parse((P=c==null?void 0:c.split(":"))==null?void 0:P[1].replace(/^"|"$/g,"'").replaceAll("'",'"').replace(/'([^']+)'/g,'"$1"')))}})}return[t,n,s,l,a]},zn=e=>{const t=[],n=Mn(e==null?void 0:e.key),l=qn(e==null?void 0:e.key),a=Zn(e==null?void 0:e.value),o=l==null?void 0:l[0],s=a==null?void 0:a[4],i=l==null?void 0:l[1],f=l==null?void 0:l[2],m=a==null?void 0:a[0],D=a==null?void 0:a[1],A=a==null?void 0:a[2],$=a==null?void 0:a[3];return n&&t.push({key:"contentPath",value:n}),(o==null?void 0:o.length)>0&&t.push({key:"tableIndex",value:o}),$&&t.push({key:"extraButton",value:$}),(s==null?void 0:s.length)>0&&t.push({key:"form",value:s}),(i==null?void 0:i.length)>0&&t.push({key:"formTop",value:i}),(f==null?void 0:f.length)>0&&t.push({key:"extra",value:f}),(A==null?void 0:A.length)>0&&t.push({comp:"Table",compData:A,name:""}),(m==null?void 0:m.length)>0&&t.push({key:"tableColumns",value:m}),(D==null?void 0:D.length)>0&&t.push({key:"tableContents",value:D}),t},Qn=(e,t)=>{const n=t.split("/");let l=[];return e==null||e.forEach(a=>{var i,f,m,D,A,$,x,C,S;const o=[],s=(f=(i=a.find(h=>h.key==="tableIndex"))==null?void 0:i.value)==null?void 0:f[0];if(s&&!s.some(h=>Array.isArray(h))){const h=(D=(m=a.find(d=>d.key==="tableColumns"))==null?void 0:m.value)==null?void 0:D[0];o.push({key:"tableIndexColumn",contents:n[n.length-1]}),o.push({key:"tableIndex",contents:s==null?void 0:s.map(d=>({label:d}))}),o.push({key:"extraButton",contents:[{label:"新增"}]}),o.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),Array.isArray(h)&&h.some(d=>Array.isArray(d))?o.push({key:"header",contents:We(h)}):o.push({key:"header",contents:Array.isArray(h)?h==null?void 0:h.map(d=>({label:d})):[h].map(d=>({label:d}))}),o.push({key:"tableContents",contents:Array.isArray(h)?($=(A=a.find(d=>d.key==="tableContents"))==null?void 0:A.value)==null?void 0:$[0]:(S=(C=(x=a.find(d=>d.key==="tableContents"))==null?void 0:x.value)==null?void 0:C[0])==null?void 0:S.map(d=>[d])}),l.push({comp:"Table",name:"",compData:o})}else s?l.push({comp:"Table",name:"",compData:Fn(a,n[n.length-1])}):a.some(h=>h.key==="extra")?l.push({comp:"calculator",name:"",compData:Pe(a)}):l.push(Pe(a))}),l},Xn=(e,t)=>{var a,o;const n=e.map(s=>s.filter(i=>i.key!=="contentPath"));return{comp:"Group",compData:[{contents:Qn(n,t),key:"groupContents"}],name:(o=(a=e[0])==null?void 0:a.find(s=>s.key==="contentPath"))==null?void 0:o.value}},Yn=e=>{var a;const t=[],n=p.cloneDeep(e).map(o=>{var s;if(o!=null&&o.find(i=>(i==null?void 0:i.key)==="contentPath"))return(s=o==null?void 0:o.find(i=>(i==null?void 0:i.key)==="contentPath"))==null?void 0:s.value}).filter(o=>o!==""),l=[...new Set(n)];return(a=l==null?void 0:l.filter(o=>o))==null||a.forEach(o=>{var s;t.push(Xn((s=p.cloneDeep(e))==null?void 0:s.filter(i=>i.find(f=>f.key==="contentPath"&&f.value===o)),o))}),t},et=e=>{let t=[];t.push({comp:"Menu",compData:[{contents:Gn(p.cloneDeep(e)),key:"menuContents"}],name:""});const n=e.map(l=>zn(l)).filter(l=>l.length!==0);return t=[...t,...Yn(n)],t},lt=e=>{var a,o,s,i,f;const t=(s=Ce((o=(a=p.cloneDeep(e))==null?void 0:a.replace("(","("))==null?void 0:o.replace(")",")")))==null?void 0:s.filter(m=>m!==""),n=(f=(i=p.cloneDeep(t))==null?void 0:i.filter(m=>!m.includes("/*")))==null?void 0:f.map(m=>Ln(m));return et(n)},ce=y.ref(0),ge=y.ref(0),nt=e=>{const t=e.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(t))!==null;){const o=a[1];let s=a[2].trim();(s.match(/\[/g)||[]).length!==(s.match(/\]/g)||[]).length&&(s=s==null?void 0:s.replace(/]$/,"")),l[o]?(l[o+ge.value]&&ge.value++,l[o+ge.value]=o+"="+s):l[o]=o+"="+s}return l},Qe=e=>{const[t,n]=e.split("=").map(o=>o.trim()),l=t.replace(/['"]/g,""),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},tt=e=>{var s;let t=[];const[n,l]=e.split(/=(.+)/),a=n.replace(/['"]/g,"").trim(),o=l.replace(/^['"]|['"]$/g,"");return(s=Object.values(nt(o)))==null||s.forEach(i=>{t.push(Qe(i))}),{key:a,value:t}},ue=e=>{try{return JSON.parse(e),!0}catch{return!1}},Xe=e=>{try{const t=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(t).split("{").length-1>1){let n=p.cloneDeep(t).replace(/^\{(.*)\}$/,"[$1]");if(ue(n)&&!n.includes("$")||(n=n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),ue(n)){const l=JSON.parse(n);let a=[];return l==null||l.forEach(o=>{var s;(s=Object.entries(p.cloneDeep(o)))==null||s.forEach(i=>{ce.value++,a.push({id:ce.value,key:(i==null?void 0:i[0])??"",value:(i==null?void 0:i[1])===""?"":i==null?void 0:i[1],width:Object.keys(p.cloneDeep(o)).length})})}),a}else return console.error("转换类型不正确:"),[]}else if(ue(t)){const n=JSON.parse(t);return Object.entries(n).map(([l,a])=>(ce.value++,{id:ce.value,key:l,value:a===""?"":a,width:1}))}else return t}catch(t){return console.error("转换失败:",t),[]}},at=(e,t)=>{try{if(L!=null&&L.find(n=>(n==null?void 0:n.key)===t))return JSON.parse(e.replace(/[’]|[‘]|[']/g,'"'));if(p.cloneDeep(e).split("[").length-1>1){const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(ue(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return Xe(p.cloneDeep(e))}}catch(n){return console.error("解析失败:",n),e}},ot=e=>({[e==null?void 0:e.key]:at(e==null?void 0:e.value,e==null?void 0:e.key)}),rt=e=>{try{if(p.cloneDeep(e).split("[").length-1>1){const t=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(t){return console.error("解析失败:",t),e}},Ye=e=>{var t,n,l,a,o,s;try{const i=Ce((n=(t=p.cloneDeep(e))==null?void 0:t.replace("(","("))==null?void 0:n.replace(")",")")),f=(l=p.cloneDeep(i))==null?void 0:l.map(A=>{var x,C;let $=(C=(x=p.cloneDeep(A))==null?void 0:x.split("="))==null?void 0:C[0];return $!=null&&$.includes("GroupContents")?tt(A):Qe(A)}),m=[];(a=p.cloneDeep(f))==null||a.forEach(A=>{var $,x,C,S,h;L!=null&&L.find(d=>{var u,b;return((u=d==null?void 0:d.key)==null?void 0:u.toUpperCase())===((b=A==null?void 0:A.key)==null?void 0:b.toUpperCase())})?m.push({comp:(($=L==null?void 0:L.find(d=>{var u,b;return((u=d==null?void 0:d.key)==null?void 0:u.toUpperCase())===((b=A==null?void 0:A.key)==null?void 0:b.toUpperCase())}))==null?void 0:$.value)??"",name:(x=A==null?void 0:A.value)==null?void 0:x.replace(/[’]|[‘]|[']/g,""),compData:[]}):J!=null&&J.find(d=>{var u,b;return((u=d==null?void 0:d.key)==null?void 0:u.toUpperCase())===((b=A==null?void 0:A.key)==null?void 0:b.toUpperCase())})&&((m==null?void 0:m.length)===0&&(C=A.key)!=null&&C.includes("Menus")&&m.push({comp:"Menu",name:"",compData:[]}),(S=m==null?void 0:m[(m==null?void 0:m.length)-1])!=null&&S.compData&&m[(m==null?void 0:m.length)-1].compData.push({key:(h=J==null?void 0:J.find(d=>{var u,b;return((u=d==null?void 0:d.key)==null?void 0:u.toUpperCase())===((b=A==null?void 0:A.key)==null?void 0:b.toUpperCase())}))==null?void 0:h.value,contents:A==null?void 0:A.value}))}),console.log("newContents",m);let D=(o=p.cloneDeep(m))==null?void 0:o.map(A=>{var $;return A!=null&&A.compData&&(A.compData=($=A==null?void 0:A.compData)==null?void 0:$.map(x=>{var C,S,h,d,u,b,c,r,g,_,T;if((x==null?void 0:x.key)==="formFlex")x.contents=((S=(C=x.contents)==null?void 0:C.replace(/[’]|[‘]|[']/g,""))==null?void 0:S.toUpperCase())!=="Vertical".toUpperCase();else if((x==null?void 0:x.key)==="groupContents")x.contents=(h=p.cloneDeep(x.contents))==null?void 0:h.map(O=>ot(p.cloneDeep(O)));else if(((u=(d=x.contents)==null?void 0:d.trim())!=null&&u.startsWith("[")||(c=(b=x.contents)==null?void 0:b.trim())!=null&&c.startsWith("【"))&&((g=(r=x.contents)==null?void 0:r.trim())!=null&&g.endsWith("]")||(T=(_=x.contents)==null?void 0:_.trim())!=null&&T.endsWith("】")))x.contents=rt(p.cloneDeep(x.contents));else{if(!x.contents)return;x.contents=Xe(p.cloneDeep(x.contents))}return x})),A});return D=(s=p.cloneDeep(D))==null?void 0:s.map(A=>{var $;return(A==null?void 0:A.comp)==="Group"&&(A.compData=($=A.compData)==null?void 0:$.map(x=>{var S;let C=[];return(S=x.contents)==null||S.forEach(h=>{var d,u,b,c,r,g,_,T,O,E,j,N;if(L!=null&&L.find(v=>{var w,P,B;return((w=v==null?void 0:v.key)==null?void 0:w.toUpperCase())===((B=(P=Object.keys(h))==null?void 0:P[0])==null?void 0:B.toUpperCase())}))C.push({comp:(d=L==null?void 0:L.find(v=>{var w,P,B;return((w=v==null?void 0:v.key)==null?void 0:w.toUpperCase())===((B=(P=Object.keys(h))==null?void 0:P[0])==null?void 0:B.toUpperCase())}))==null?void 0:d.value,name:(b=(u=Object.values(h))==null?void 0:u[0])==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(J!=null&&J.find(v=>{var w,P,B;return((w=v==null?void 0:v.key)==null?void 0:w.toUpperCase())===((B=(P=Object.keys(h))==null?void 0:P[0])==null?void 0:B.toUpperCase())})){if((C==null?void 0:C.length)===0)return;(c=C==null?void 0:C[(C==null?void 0:C.length)-1])!=null&&c.compData&&C[(C==null?void 0:C.length)-1].compData.push({key:(r=J==null?void 0:J.find(v=>{var w,P,B;return((w=v==null?void 0:v.key)==null?void 0:w.toUpperCase())===((B=(P=Object.keys(h))==null?void 0:P[0])==null?void 0:B.toUpperCase())}))==null?void 0:r.value,contents:(g=Object.values(h))==null?void 0:g[0]})}else if((T=(_=Object.keys(h))==null?void 0:_[0])!=null&&T.includes("$")){const v=(E=(O=Object.keys(p.cloneDeep(h)))==null?void 0:O[0])==null?void 0:E.split("$");C[(C==null?void 0:C.length)-1].compData.push({key:(j=J==null?void 0:J.find(w=>{var P,B;return((P=w==null?void 0:w.key)==null?void 0:P.toUpperCase())===((B=v==null?void 0:v[0])==null?void 0:B.toUpperCase())}))==null?void 0:j.value,contents:(N=Object.values(h))==null?void 0:N[0],selectLabel:v==null?void 0:v[1]})}return h}),x.contents=C,x})),A}),D}catch{return!1}},st=e=>Ye(e),ct=e=>!!Ye(e),pt=ee.useModelComp(ee.pinia),{itemData:ft}=fe.storeToRefs(pt),ut=fe.useMenuState(ee.pinia),{systemKey:dt,activeMenuPath:yt}=fe.storeToRefs(ut),te=y.ref(0),it=e=>e.reduce((n,l)=>{var o,s;const a=Object.values(n);return(((o=Object.keys(n))==null?void 0:o.length)===0||a[a.length-1].length>=(l==null?void 0:l.width))&&(n[te.value]=[],te.value++),n[te.value-1].push(l),((s=Object.keys(n))==null?void 0:s.length)===(l==null?void 0:l.width)&&(n[te.value]=[],te.value++),n},{});exports.arrayToNumberArray=it;exports.equalArrays=vn;exports.expandContentStringToJson=lt;exports.expandNewStringToJson=Nn;exports.expandStringToJson=st;exports.getComponent=Je;exports.isExpandStringToJson=ct;exports.slotContent=hn;
|