ss-component-new 1.3.347 → 1.3.348
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-z-nVa-Ht.cjs → array-FcoisUZz.cjs} +1 -1
- package/dist/{array-Dc0UPsX7.js → array-tQgs72UX.js} +2 -2
- package/dist/{index-BxnKd-ol.cjs → index-6OSpT7hv.cjs} +1 -1
- package/dist/{index-CJHajG-Z.cjs → index-BGa33sG1.cjs} +1 -1
- package/dist/{index-wQV7WQqs.cjs → index-B_1Q8mLt.cjs} +1 -1
- package/dist/{index-D9_uWPXi.cjs → index-BjsPZnqT.cjs} +1 -1
- package/dist/{index-BYluVfWF.cjs → index-BktK2g3L.cjs} +1 -1
- package/dist/{index-CSBsbB89.cjs → index-C-8tPwdx.cjs} +1 -1
- package/dist/{index-DH9VAr_q.js → index-C3LcEFEV.js} +1 -1
- package/dist/index-C49WP5XE.cjs +25 -0
- package/dist/{index-CNGWd6r5.js → index-C6uj8qJA.js} +3 -3
- package/dist/{index-CQHICyEP.cjs → index-C9hSFe1b.cjs} +1 -1
- package/dist/{index-AOVJ8y4_.js → index-CJ5ltZK5.js} +2 -2
- package/dist/index-CQbLUdez.cjs +2 -0
- package/dist/{index-WnKTgvLM.js → index-CTOBJJlH.js} +8514 -8510
- package/dist/{index-CuuY8WNN.js → index-CduEGwgu.js} +1 -1
- package/dist/{index-DhOAQpIm.js → index-CiLTRzrU.js} +1 -1
- package/dist/{index-BkiYg6ij.js → index-CvydttkD.js} +4 -4
- package/dist/{index-B5_BX2YN.js → index-DB18f7f2.js} +1 -1
- package/dist/{index-C2vcw4xw.js → index-DIiL0kve.js} +1 -1
- package/dist/index-DNIOl0bw.js +9803 -0
- package/dist/{index-_r2s4_ht.js → index-DZszyNYH.js} +2 -2
- package/dist/{index-CqcLpbt1.cjs → index-D_mCyKO9.cjs} +1 -1
- package/dist/{index-CrkCksf1.js → index-Dc4sh1T8.js} +1 -1
- package/dist/{index-BWEoDx4D.cjs → index-DnCqPfB1.cjs} +1 -1
- package/dist/{index-euqScKcq.js → index-DrHR_0Cv.js} +1 -1
- package/dist/{index-DA-QksrI.cjs → index-LGRyG0hQ.cjs} +1 -1
- package/dist/{index-CPiqzIun.cjs → index-jj0QFPlC.cjs} +1 -1
- package/dist/{main-DUbTQ00H.cjs → main-DRJ7GeCk.cjs} +1 -1
- package/dist/{main-dAcAJd1J.js → main-DX0w-EEu.js} +2 -2
- package/dist/{menuIndex-DwOFonFy.js → menuIndex-BCqWHrXf.js} +64 -60
- package/dist/menuIndex-DxS8zqA8.cjs +1 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-Bj1dOhmi.cjs → threeModel-BR8TZd8q.cjs} +1 -1
- package/dist/{threeModel-4koqokFa.js → threeModel-pY6LY8LT.js} +1 -1
- package/dist/{threeSceneView-DDdtSYsj.js → threeSceneView-BPPt0FAH.js} +3 -3
- package/dist/{threeSceneView-DSVqbu2-.cjs → threeSceneView-Z0ab5QG0.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Bqg9Utvt.cjs → threeSceneViewForCPMPIP-BMpPRugB.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CiS_rB7d.js → threeSceneViewForCPMPIP-BWZDs-9j.js} +1 -1
- package/dist/{threeViewerHost-BLsxQ4Dv.js → threeViewerHost-BImMBIXv.js} +1 -1
- package/dist/{threeViewerHost-DzWy-nz6.cjs → threeViewerHost-CGZGM3XJ.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BT2Sp_f7.cjs +0 -25
- package/dist/index-DYq4TXda.cjs +0 -2
- package/dist/index-i7SKpIqc.js +0 -9787
- package/dist/menuIndex-DtLiYvfJ.cjs +0 -1
package/dist/index-BT2Sp_f7.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";var Au=Object.defineProperty;var zu=(l,r,n)=>r in l?Au(l,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[r]=n;var Wr=(l,r,n)=>zu(l,typeof r!="symbol"?r+"":r,n);const a=require("vue"),Ga=require("./request-BC2w2vGr.cjs"),Pn=require("./dayjs.min-Bo5ALhPO.cjs"),$=require("./menu-CYazzvub.cjs"),il=require("./index-CqcLpbt1.cjs"),Jl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),la=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DZwYWdny.cjs"),wr=require("./index-CUw6nGTo.cjs"),Ci=require("./threeViewerHost-DzWy-nz6.cjs"),ia=require("./index-6iwwUgL6.cjs"),Mu=require("./index-DsNHJYr-.cjs"),Dr=require("./index-CW4qJdP8.cjs"),rs=require("./index-CQHICyEP.cjs"),Xs=require("./index-BuUvbJz_.cjs"),jo=require("./index-W8p89C7t.cjs"),dn=require("./index-B6Qf218o.cjs");;/* empty css */const Di=require("./isString-DNBlKLZH.cjs"),ns=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Zs=require("./index-BVaHwt5f.cjs"),Iu=require("./index-BrgX9dZp.cjs"),Rn=require("./MTLLoader-Bi7_rRjI.cjs"),Ou=require("./URDFLoader-DhVDneJn.cjs");var Lu="[object Boolean]";function Qs(l){return l===!0||l===!1||Ga.isObjectLike(l)&&Ga.baseGetTag(l)==Lu}function $u(l){return l===void 0}const Ru=l=>l.match(/\((.*)\)/)[1],Vu={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(l){const r=l,n=a.ref(null),o=a.ref(!1),s=a.ref(null);return a.watch(()=>r==null?void 0:r.isVisible,()=>{o.value=r==null?void 0:r.isVisible},{deep:!0,immediate:!0}),a.watch(()=>s.value,()=>{a.nextTick(()=>{var c,m;(m=(c=n.value)==null?void 0:c.updatePopper)==null||m.call(c)})},{deep:!0,immediate:!0}),(c,m)=>{const f=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(f,{visible:o.value,"onUpdate:visible":m[0]||(m[0]=h=>o.value=h),trigger:r.trigger,title:r==null?void 0:r.title,placement:r==null?void 0:r.placement,width:r==null?void 0:r.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"reference",{ref_key:"referenceRef",ref:s})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Fu={__name:"index",props:{value:{type:[String,Number],default:""}},setup(l){const r=l,n=a.computed(()=>{const o=String(r.value??"");return o==="已完成"?"task-status-completed":o==="进行中"?"task-status-running":o==="终止"||o==="暂停"?"task-status-stopped":""});return(o,s)=>l.value!==void 0&&l.value!==null?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["task-status-tag",n.value])},a.toDisplayString(l.value===0?"0":l.value),3)):a.createCommentVNode("",!0)}},Pu=Jl._export_sfc(Fu,[["__scopeId","data-v-d81f59b4"]]);function ju(l,r,n,o={}){if(!l||!r||!n||n.length!==4)return;const s=l.getContext("2d");if(!s)return;const{color:c="rgba(255, 235, 59, 0.3)",strokeWidth:m=2,fillOpacity:f=.2}=o,h=l.getBoundingClientRect(),y=r.getBoundingClientRect(),u=r.naturalWidth,w=r.naturalHeight,N=y.width/u,j=y.height/w,C=Math.min(N,j),W=u*C,O=w*C,U=(h.width-W)/2,H=(h.height-O)/2,D=n.map(([E,k])=>{const g=U+E*W,M=H+k*O;return{x:g,y:M}});s.clearRect(0,0,l.width,l.height),s.beginPath(),s.moveTo(D[0].x,D[0].y);for(let E=1;E<D.length;E++)s.lineTo(D[E].x,D[E].y);s.closePath();const S=c.replace(/[\d.]+\)$/,`${f})`);s.fillStyle=S,s.fill(),s.strokeStyle=c.replace(/[\d.]+\)$/,"1)"),s.lineWidth=m,s.stroke()}function _o(l){if(!l)return;const r=l.getContext("2d");r&&r.clearRect(0,0,l.width,l.height)}function os(l,r){if(!l||!r)return null;const n=l[r];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const Hu={key:0,class:"ocr-img-preview-root"},Uu={class:"ocr-img-preview-window"},qu={key:0,class:"img-preview-body"},Wu={class:"img-preview-header"},Ku={class:"img-header-left"},Gu={class:"img-name"},Yu={key:0,class:"img-header-right"},Ju={class:"img-index"},Xu={key:0,class:"img-thumb-list"},Zu=["onClick"],Qu={key:1,class:"thumb-placeholder"},ed={class:"thumb-name"},ad={class:"img-preview-container"},ld={key:0,class:"img-placeholder"},rd={key:2,class:"img-placeholder"},nd={key:0},od={key:1},id={key:1,class:"img-placeholder"},td=a.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(l,{emit:r}){const n=l,o=r,s=a.computed({get:()=>n.visible,set:z=>o("update:visible",z)});let c=!1,m="",f=0,h=0,y=0,u=0,w=0,N=0,j=null;const C=z=>{var le,De;const q=(De=(le=z==null?void 0:z.target)==null?void 0:le.closest)==null?void 0:De.call(le,".ocr-img-preview-window");return q||document.querySelector(".ocr-img-preview-window")},W=z=>{if(!z||z==="none")return{tx:0,ty:0};let q=z.match(/matrix\(([^)]+)\)/);if(q){const le=q[1].split(",").map(De=>Number(De.trim()));return{tx:(le==null?void 0:le[4])||0,ty:(le==null?void 0:le[5])||0}}if(q=z.match(/matrix3d\(([^)]+)\)/),q){const le=q[1].split(",").map(De=>Number(De.trim()));return{tx:(le==null?void 0:le[12])||0,ty:(le==null?void 0:le[13])||0}}return q=z.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),q?{tx:Number(q[1])||0,ty:Number(q[2])||0}:{tx:0,ty:0}},O=(z,q,le)=>{z.style.transform=`translate(${q}px, ${le}px)`},U=z=>{const q=C(z);if(!q)return;c=!0,j=q,m="move",f=z.clientX,h=z.clientY;const le=window.getComputedStyle(q),{tx:De,ty:be}=W(le.transform);w=De,N=be,document.addEventListener("mousemove",D),document.addEventListener("mouseup",S)},H=(z,q)=>{const le=C(z);if(!le)return;c=!0,j=le,m=q,f=z.clientX,h=z.clientY;const De=le.getBoundingClientRect();y=De.width,u=De.height;const be=window.getComputedStyle(le),{tx:Ye,ty:da}=W(be.transform);w=Ye,N=da,document.addEventListener("mousemove",D),document.addEventListener("mouseup",S)},D=z=>{if(!c||!j)return;const q=z.clientX-f,le=z.clientY-h,De=360,be=420;let Ye=y,da=u,Ma=w,re=N;if(m==="move"){Ma=w+q,re=N+le,O(j,Ma,re);return}if(m.includes("right")&&(Ye=Math.max(De,y+q)),m.includes("bottom")&&(da=Math.max(be,u+le)),m.includes("left")){const Ne=y-q;Ne<De?(Ye=De,Ma=w+(y-De)):(Ye=Ne,Ma=w+q)}if(m.includes("top")){const Ne=u-le;Ne<be?(da=be,re=N+(u-be)):(da=Ne,re=N+le)}j.style.width=`${Ye}px`,j.style.height=`${da}px`,O(j,Ma,re)},S=()=>{c=!1,m="",j=null,document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",S)},E=a.ref([]),k=a.ref(!1);a.watch(()=>n.images,async z=>{if(!Array.isArray(z)||z.length===0){E.value=[];return}k.value=!0;const q=[];for(const le of z)if(le.url&&!le.url.startsWith("blob:")&&!le.url.startsWith("http"))try{const De=await la.downloadFile(le.url),be=URL.createObjectURL(De);q.push({...le,blobUrl:be})}catch(De){console.error(`Failed to load image for preview: ${le.url}`,De),q.push({...le,blobUrl:""})}else q.push({...le,blobUrl:le.url});E.value=q,k.value=!1},{deep:!0,immediate:!0});const g=a.ref(0),M=a.ref(null),R=a.ref(null),G=a.computed(()=>E.value[g.value]||null),ue=()=>{if(!E.value.length){g.value=0;return}if(n.defaultImageName){const z=E.value.findIndex(q=>(q==null?void 0:q.name)===n.defaultImageName);g.value=z>=0?z:0}else g.value=0},Be=z=>{if(!E.value.length)return;const q=Math.max(0,Math.min(z,E.value.length-1));g.value=q},de=()=>Be(g.value-1),Z=()=>Be(g.value+1),pe=z=>{if(!z)return;const q=E.value.findIndex(le=>(le==null?void 0:le.name)===z);q>=0&&(g.value=q)},ae=()=>{if(!R.value)return;const z=R.value.parentElement;if(!z)return;const q=z.getBoundingClientRect();R.value.width=q.width,R.value.height=q.height},ce=()=>{var De,be;if(!R.value||!M.value||!n.focusedFieldName){R.value&&_o(R.value);return}const z=(De=M.value.$el)==null?void 0:De.querySelector("img");if(!z)return;if(!z.complete||z.naturalWidth===0){z.onload=()=>{a.nextTick(()=>{ce()})};return}const q=((be=G.value)==null?void 0:be.name)||"",le=os(n.fieldMeta,n.focusedFieldName);if(!le){_o(R.value);return}if(le.imageName!==q){_o(R.value);return}ae(),ju(R.value,z,le.bboxNorm)},Ee=()=>{a.nextTick(()=>{ae(),ce()})};a.watch(()=>n.focusedFieldName,()=>{if(!s.value)return;const z=os(n.fieldMeta,n.focusedFieldName);z!=null&&z.imageName&&pe(z.imageName),a.nextTick(()=>{ce()})}),a.watch(()=>{var z;return(z=G.value)==null?void 0:z.name},()=>{s.value&&a.nextTick(()=>{R.value&&_o(R.value),ce()})}),a.watch(()=>n.visible,z=>{z?(ue(),a.nextTick(()=>{ae(),ce()})):R.value&&_o(R.value)}),a.watch(()=>n.defaultImageName,()=>{s.value&&ue()});let Ve=null;a.onMounted(()=>{var z;typeof ResizeObserver<"u"&&(Ve=new ResizeObserver(()=>{ae(),a.nextTick(()=>{ce()})}),(z=R.value)!=null&&z.parentElement&&Ve.observe(R.value.parentElement))}),a.onUnmounted(()=>{Ve&&(Ve.disconnect(),Ve=null),document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",S)});const ye=()=>{R.value&&_o(R.value),o("update:visible",!1),o("close")};return(z,q)=>{var da,Ma;const le=a.resolveComponent("el-button"),De=a.resolveComponent("el-image"),be=a.resolveComponent("Loading"),Ye=a.resolveComponent("el-icon");return s.value?(a.openBlock(),a.createElementBlock("div",Hu,[q[12]||(q[12]=a.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),a.createElementVNode("div",Uu,[a.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:a.withModifiers(U,["stop"])},[q[8]||(q[8]=a.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),a.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ye},"×")],32),a.createElementVNode("div",{class:"resizable-handle top",onMousedown:q[0]||(q[0]=a.withModifiers(re=>H(re,"top"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle right",onMousedown:q[1]||(q[1]=a.withModifiers(re=>H(re,"right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:q[2]||(q[2]=a.withModifiers(re=>H(re,"bottom"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle left",onMousedown:q[3]||(q[3]=a.withModifiers(re=>H(re,"left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:q[4]||(q[4]=a.withModifiers(re=>H(re,"top-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:q[5]||(q[5]=a.withModifiers(re=>H(re,"top-right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:q[6]||(q[6]=a.withModifiers(re=>H(re,"bottom-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:q[7]||(q[7]=a.withModifiers(re=>H(re,"bottom-right"),["stop"]))},null,32),G.value?(a.openBlock(),a.createElementBlock("div",qu,[a.createElementVNode("div",Wu,[a.createElementVNode("div",Ku,[a.createElementVNode("span",Gu,a.toDisplayString(G.value.name?G.value.name+(G.value.url&&G.value.url.lastIndexOf(".")!==-1?G.value.url.substring(G.value.url.lastIndexOf(".")):""):""),1)]),E.value.length>1?(a.openBlock(),a.createElementBlock("div",Yu,[a.createVNode(le,{size:"small",disabled:g.value===0,onClick:de},{default:a.withCtx(()=>q[9]||(q[9]=[a.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),a.createElementVNode("span",Ju,a.toDisplayString(g.value+1)+" / "+a.toDisplayString(E.value.length),1),a.createVNode(le,{size:"small",disabled:g.value===E.value.length-1,onClick:Z},{default:a.withCtx(()=>q[10]||(q[10]=[a.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):a.createCommentVNode("",!0)]),E.value.length>1?(a.openBlock(),a.createElementBlock("div",Xu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.value,(re,Ne)=>(a.openBlock(),a.createElementBlock("div",{key:(re.name||"")+"-"+Ne,class:a.normalizeClass(["img-thumb-item",{active:Ne===g.value}]),onClick:Te=>Be(Ne)},[re!=null&&re.blobUrl?(a.openBlock(),a.createBlock(De,{key:0,src:re.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[re.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(a.openBlock(),a.createElementBlock("div",Qu,"加载失败")),a.createElementVNode("div",ed,a.toDisplayString(re.name||"-"),1)],10,Zu))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",ad,[k.value?(a.openBlock(),a.createElementBlock("div",ld,[a.createVNode(Ye,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(be)]),_:1}),q[11]||(q[11]=a.createElementVNode("span",null,"图片加载中...",-1))])):(da=G.value)!=null&&da.blobUrl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(De,{ref_key:"imageRef",ref:M,src:G.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[G.value.blobUrl],onLoad:Ee},null,8,["src","preview-src-list"]),a.createElementVNode("canvas",{ref_key:"canvasRef",ref:R,class:"highlight-canvas"},null,512)],64)):(a.openBlock(),a.createElementBlock("div",rd,[(Ma=G.value)!=null&&Ma.url?(a.openBlock(),a.createElementBlock("span",nd,"图片加载失败")):(a.openBlock(),a.createElementBlock("span",od,"暂无图片"))]))])])):(a.openBlock(),a.createElementBlock("div",id,"暂无图片"))])])):a.createCommentVNode("",!0)}}}),sd=Jl._export_sfc(td,[["__scopeId","data-v-48a4ecb1"]]),cd={class:"cert-preview-body"},ud={key:0,class:"pdf-preview-container"},dd={class:"thumbs"},pd=["onClick"],fd={class:"thumb-img"},hd=["src"],vd={key:1,class:"thumb-loading"},md={class:"thumb-title"},yd={class:"viewer"},gd={key:0,class:"viewer-img-wrap"},bd=["src"],kd={key:1,class:"viewer-loading"},xd=a.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(l,{emit:r}){const n=l,o=r,s=a.ref(""),c=a.ref(""),m=a.computed(()=>(n.versions||[]).find(C=>String(C.versionId)===String(s.value))),f=a.ref({}),h=a.ref(""),y=a.ref("证书附件.pdf"),u=()=>{try{Object.values(f.value||{}).forEach(C=>{C&&URL.revokeObjectURL(C)}),h.value&&URL.revokeObjectURL(h.value)}catch{}f.value={},h.value=""},w=async C=>{if(!C||C.fileType==="pdf")return;const W=Array.isArray(C.images)?C.images:[];for(const O of W){const U=O==null?void 0:O.url;if(!(!U||f.value[U]))try{const H=await $.platformDownloadFile({url:U}),D=URL.createObjectURL(H.data);f.value={...f.value,[U]:D}}catch{}}},N=async C=>{var O;if(!C||C.fileType!=="pdf"){h.value="";return}const W=C.sourceUrl||"";if(!W){h.value="";return}if(h.value){try{URL.revokeObjectURL(h.value)}catch{}h.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:W,versionId:C==null?void 0:C.versionId,certNo:C==null?void 0:C.certNo});const U=await $.platformDownloadFile({url:W});console.log("[CertificatePreview] PDF响应:",{url:W,status:U==null?void 0:U.status,size:(O=U==null?void 0:U.data)==null?void 0:O.size});const H=URL.createObjectURL(U.data);h.value=H;const D=C.certNo?String(C.certNo):"";y.value=D?`${D}.pdf`:"证书附件.pdf"}catch(U){console.error("[CertificatePreview] PDF加载失败:",{url:W,error:U}),h.value=""}};a.watch(()=>n.visible,async C=>{var O;if(!C){u();return}const W=(O=n.versions)==null?void 0:O[0];s.value=(W==null?void 0:W.versionId)||"",await w(W),await N(W)},{immediate:!0}),a.watch(()=>s.value,async()=>{var W,O;const C=m.value;if(!C){c.value="",h.value="";return}if(C.fileType==="pdf"){c.value="",await N(C);return}h.value="",c.value=((O=(W=C.images)==null?void 0:W[0])==null?void 0:O.url)||"",await w(C)},{immediate:!0});const j=()=>{o("update:visible",!1),u()};return a.onBeforeUnmount(()=>{u()}),(C,W)=>{const O=a.resolveComponent("el-empty"),U=a.resolveComponent("el-tab-pane"),H=a.resolveComponent("el-tabs"),D=a.resolveComponent("el-button"),S=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock(S,{"model-value":C.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:j},{footer:a.withCtx(()=>[a.createVNode(D,{id:"themeBorderButton",onClick:j},{default:a.withCtx(()=>W[1]||(W[1]=[a.createTextVNode("关闭")])),_:1,__:[1]})]),default:a.withCtx(()=>[C.versions&&C.versions.length>0?(a.openBlock(),a.createBlock(H,{key:0,modelValue:s.value,"onUpdate:modelValue":W[0]||(W[0]=E=>s.value=E),type:"card",class:"cert-version-tabs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.versions,E=>(a.openBlock(),a.createBlock(U,{key:E.versionId,name:E.versionId,label:E.label},{default:a.withCtx(()=>[a.createElementVNode("div",cd,[E.fileType==="pdf"?(a.openBlock(),a.createElementBlock("div",ud,[h.value?(a.openBlock(),a.createBlock(il.SsFilePreview,{key:1,fileName:y.value,blobUrl:h.value},null,8,["fileName","blobUrl"])):(a.openBlock(),a.createBlock(O,{key:0,description:"加载中"}))])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",dd,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.images||[],k=>(a.openBlock(),a.createElementBlock("div",{key:k.url,class:a.normalizeClass(["thumb",{active:k.url===c.value}]),onClick:g=>c.value=k.url},[a.createElementVNode("div",fd,[f.value[k.url]?(a.openBlock(),a.createElementBlock("img",{key:0,src:f.value[k.url]},null,8,hd)):(a.openBlock(),a.createElementBlock("div",vd,"加载中"))]),a.createElementVNode("div",md,a.toDisplayString(k.name),1)],10,pd))),128))]),a.createElementVNode("div",yd,[c.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[f.value[c.value]?(a.openBlock(),a.createElementBlock("div",gd,[a.createElementVNode("img",{class:"viewer-img",src:f.value[c.value]},null,8,bd)])):(a.openBlock(),a.createElementBlock("div",kd,"加载中"))],64)):(a.openBlock(),a.createBlock(O,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(a.openBlock(),a.createBlock(O,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),wd=Jl._export_sfc(xd,[["__scopeId","data-v-220703c0"]]),_d={class:"ocr-candidate-wrap"},Sd={class:"ocr-candidate-left"},Ed={key:1},Cd={key:0},Dd={key:1},Nd={key:2},Bd={key:3},Td={key:0,class:"ocr-candidate-right"},Ad={class:"ocr-candidate-actions"},zd={key:1},Md={class:"dialog-footer"},Id={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(l,{emit:r}){const n=(g=[])=>{const M=[],R=G=>{(G||[]).forEach(ue=>{if(!ue)return;const Be=ue.children||ue.childrens||ue.columns;Array.isArray(Be)&&Be.length>0?R(Be):M.push(ue)})};return R(g),M},o=l,s=r,c=a.computed(()=>{var g;return((g=N.value)==null?void 0:g.allowAdd)!==!1}),m=a.computed(()=>{var g;return((g=N.value)==null?void 0:g.allowReplace)!==!1}),f=g=>{if(!g)return[];if(Array.isArray(g))return g;if(typeof g=="string")try{const M=JSON.parse(g);return Array.isArray(M)?M:[]}catch{return[]}return[]},h=g=>{s("preview-file",g)},y=a.ref([]),u=a.ref(0),w=a.ref("");a.watch(()=>o.candidates,g=>{var M,R;y.value=(g||[]).map(G=>({...G,...(G==null?void 0:G.ocrRow)||{},selectedTargetId:(G==null?void 0:G.selectedTargetId)||"",__decision:G==null?void 0:G.__decision})),u.value=0,w.value=((R=(M=y.value)==null?void 0:M[0])==null?void 0:R.selectedTargetId)||""},{immediate:!0,deep:!0}),a.watch(()=>o.visible,g=>{var M,R;g&&(u.value=0,w.value=((R=(M=y.value)==null?void 0:M[0])==null?void 0:R.selectedTargetId)||"")});const N=a.computed(()=>{var M;const g=Number(u.value||0);return((M=y.value||[])==null?void 0:M[g])||null}),j=a.computed(()=>(n(o.columns||[])||[]).filter(R=>R&&R.prop).filter(R=>R.type!=="operate"&&R.label!=="操作"&&R.prop!=="operate")),C=a.computed(()=>j.value.filter(g=>g.label!=="证书附件"&&g.prop!=="证书附件")),W=g=>{if(!g)return;const M=(y.value||[]).findIndex(R=>(R==null?void 0:R.idx)===(g==null?void 0:g.idx));M>-1&&(u.value=M,w.value=(g==null?void 0:g.selectedTargetId)||"")},O=g=>{if(!g){w.value="";return}w.value=String((g==null?void 0:g.id)??"")},U=(g,M="")=>{const R=Number(u.value||0),G=y.value||[],ue=G[R];ue&&(ue.__decision=g,ue.selectedTargetId=M,w.value=M,y.value=[...G])},H=()=>U("skip",""),D=()=>U("add",""),S=()=>{if(!w.value){Ga.ElMessage.warning("请先选择要替换的目标记录");return}U("replace",w.value)},E=()=>{s("update:visible",!1)},k=()=>{const g=y.value||[];if(g.find(R=>(R==null?void 0:R.__decision)==="replace"&&!(R!=null&&R.selectedTargetId))){Ga.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}s("submit",g),s("update:visible",!1)};return(g,M)=>{const R=a.resolveComponent("el-table-column"),G=a.resolveComponent("svg-icon"),ue=a.resolveComponent("el-table"),Be=a.resolveComponent("el-button"),de=a.resolveComponent("el-alert");return a.openBlock(),a.createBlock(wr.ssDialog,{title:"OCR候选匹配",visible:l.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:E},{default:a.withCtx(()=>{var Z,pe;return[a.createElementVNode("div",_d,[a.createElementVNode("div",Sd,[M[0]||(M[0]=a.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),a.createVNode(ue,{data:y.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:W},{default:a.withCtx(()=>[a.createVNode(R,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.value,ae=>(a.openBlock(),a.createBlock(R,{key:ae.prop,label:ae.label,prop:ae.prop,"min-width":ae.minWidth||160},{default:a.withCtx(({row:ce})=>[ae.label==="证书附件"||ae.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[f(ce==null?void 0:ce[ae.prop]).length>0?(a.openBlock(),a.createBlock(G,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ee=>h({row:ce,prop:ae.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",Ed,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((ce==null?void 0:ce[ae.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),a.createVNode(R,{label:"候选数",width:"90",fixed:"right"},{default:a.withCtx(({row:ae})=>[a.createTextVNode(a.toDisplayString(((ae==null?void 0:ae.candidates)||[]).length),1)]),_:1}),a.createVNode(R,{label:"处理状态",width:"120",fixed:"right"},{default:a.withCtx(({row:ae})=>[(ae==null?void 0:ae.__decision)==="replace"?(a.openBlock(),a.createElementBlock("span",Cd,"替换")):(ae==null?void 0:ae.__decision)==="add"?(a.openBlock(),a.createElementBlock("span",Dd,"新增")):(ae==null?void 0:ae.__decision)==="skip"?(a.openBlock(),a.createElementBlock("span",Nd,"跳过")):(a.openBlock(),a.createElementBlock("span",Bd,"未处理"))]),_:1})]),_:1},8,["data"])]),y.value&&y.value.length>0?(a.openBlock(),a.createElementBlock("div",Td,[M[4]||(M[4]=a.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),a.createElementVNode("div",Ad,[a.createVNode(Be,{id:"themeBorderButton",onClick:H},{default:a.withCtx(()=>M[1]||(M[1]=[a.createTextVNode("跳过本行")])),_:1,__:[1]}),a.createVNode(Be,{id:"themeBorderButton",onClick:D,disabled:!c.value},{default:a.withCtx(()=>M[2]||(M[2]=[a.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),a.createVNode(Be,{class:"ok-button",id:"themeButton",onClick:S,disabled:!m.value||!w.value},{default:a.withCtx(()=>M[3]||(M[3]=[a.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((Z=N.value)==null?void 0:Z.candidates)||[]).length===0?(a.openBlock(),a.createBlock(de,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):a.createCommentVNode("",!0),a.createVNode(ue,{data:((pe=N.value)==null?void 0:pe.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:O,"highlight-current-row":""},{default:a.withCtx(()=>[a.createVNode(R,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(j.value,ae=>(a.openBlock(),a.createBlock(R,{key:ae.prop,label:ae.label,prop:ae.prop,"min-width":ae.minWidth||160},{default:a.withCtx(({row:ce})=>[ae.label==="证书附件"||ae.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[f(ce==null?void 0:ce[ae.prop]).length>0?(a.openBlock(),a.createBlock(G,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ee=>h({row:ce,prop:ae.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",zd,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((ce==null?void 0:ce[ae.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):a.createCommentVNode("",!0)])]}),footer:a.withCtx(()=>[a.createElementVNode("div",Md,[a.createVNode(Be,{id:"themeBorderButton",onClick:E},{default:a.withCtx(()=>M[5]||(M[5]=[a.createTextVNode("取消")])),_:1,__:[5]}),a.createVNode(Be,{class:"ok-button",id:"themeButton",onClick:k},{default:a.withCtx(()=>M[6]||(M[6]=[a.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Od=Jl._export_sfc(Id,[["__scopeId","data-v-89e0489c"]]),Ld={class:"ocr-preview-content"},$d={class:"ocr-preview-tip"},Rd={class:"ocr-preview-table"},Vd={style:{display:"flex","align-items":"center",gap:"8px"}},Fd={class:"dialog-footer"},Pd={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(l,{emit:r}){const n=l,o=r,s=a.ref([]),c=a.ref([]),m=a.ref([]);a.watch(()=>n.visible,j=>{j&&(s.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),c.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),m.value=[...n.ocrSelectedFields])});const f=(j,C)=>{const W=[...m.value];if(C)W.includes(j)||W.push(j);else{const O=W.indexOf(j);O>-1&&W.splice(O,1)}m.value=W,o("update:ocrSelectedFields",W)},h=(j,C,W)=>{o("fieldChange",{rowIndex:j,prop:C,value:W})},y=()=>{o("update:ocrPreviewData",s.value),o("confirm",s.value),o("update:visible",!1)},u=()=>{o("update:visible",!1)},w=j=>typeof j!="number"?"-":`${(j*100).toFixed(1)}%`,N=j=>typeof j!="number"?"#606266":j>=.9?"#67c23a":j>=.7?"#e6a23c":"#f56c6c";return(j,C)=>{const W=a.resolveComponent("el-alert"),O=a.resolveComponent("el-table-column"),U=a.resolveComponent("el-checkbox"),H=a.resolveComponent("el-input"),D=a.resolveComponent("el-table"),S=a.resolveComponent("el-button");return a.openBlock(),a.createBlock(wr.ssDialog,{title:"OCR识别结果预览",visible:l.visible,onBeforeDestroy:u,width:"90%",style:{maxWidth:"1200px"}},{default:a.withCtx(()=>[a.createElementVNode("div",Ld,[a.createElementVNode("div",$d,[a.createVNode(W,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",Rd,[a.createVNode(D,{data:s.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(O,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,E=>(a.openBlock(),a.createBlock(O,{key:E.prop,prop:E.prop,"min-width":E.minWidth||230,"class-name":E.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",Vd,[E.isAccuracy?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(U,{key:0,"model-value":m.value.includes(E.prop),onChange:k=>f(E.prop,k),onClick:C[0]||(C[0]=a.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),a.createElementVNode("span",null,a.toDisplayString(E.label),1)])]),default:a.withCtx(({row:k,$index:g})=>[E.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:N(k[E.prop]),fontWeight:500})},a.toDisplayString(w(k[E.prop])),5)):(a.openBlock(),a.createBlock(H,{key:1,modelValue:k[E.prop],"onUpdate:modelValue":M=>k[E.prop]=M,size:"small",placeholder:"请输入"+E.label,onChange:M=>h(g,E.prop,M)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",Fd,[a.createVNode(S,{onClick:u,id:"themeBorderButton"},{default:a.withCtx(()=>C[1]||(C[1]=[a.createTextVNode("取消")])),_:1,__:[1]}),a.createVNode(S,{class:"ok-button",onClick:y,id:"themeButton"},{default:a.withCtx(()=>C[2]||(C[2]=[a.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},jd=Jl._export_sfc(Pd,[["__scopeId","data-v-df66eb1f"]]),Ni=l=>{var o;let r=l;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let n=(o=la.analyzeSplitToContent(r,","))==null?void 0:o.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),yn(s)));return n=n==null?void 0:n.join(","),n};function ec(l){return Ga.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",l)}function Hd(l){return Ga.axios.get(l,{responseType:"blob"})}let Kl="$R",Ud="http://222.92.178.198:55002/AIRobot",ut=["Form","BarChart","FormText","FormBlock"];const ac=l=>{var n,o;let r=(o=la.analyzeSplitToContent(l,"@"))==null?void 0:o[((n=la.analyzeSplitToContent(l,"@"))==null?void 0:n.length)-1];return!!(ut!=null&&ut.some(s=>r==null?void 0:r.includes(s)))},qd=async(l,r,n,o)=>{var c,m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k,g,M,R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re;let s=l;if(ac(s==null?void 0:s[0])){let Ne=Zd(s),Te=(c=Ne==null?void 0:Ne.filter)==null?void 0:c.join(","),qe=[];(m=Ne==null?void 0:Ne.hideContents)==null||m.forEach(te=>{if(te){const Le=te;Le&&qe.push(`@Interface(Hide=Yes, prop=${Le})`)}});let Re=(o==null?void 0:o.menuFilter)??[];return Array.isArray(Re)||(Re=Re?[Re]:[]),Re=[...Re,...qe],{key:"Form",name:Ne==null?void 0:Ne.groupName,value:Ne==null?void 0:Ne.formContents,contents:Array.isArray((f=Ne==null?void 0:Ne.contents)==null?void 0:f[0])&&((y=(h=Ne==null?void 0:Ne.contents)==null?void 0:h[0])!=null&&y.every(te=>Array.isArray(te)))?[(w=(u=Ne==null?void 0:Ne.contents)==null?void 0:u[0])==null?void 0:w[n]]:[Ne==null?void 0:Ne.contents],filter:"("+Te+")",menuFilter:Re,groupFilter:Ne==null?void 0:Ne.groupFilters}}else if(((N=s==null?void 0:s[0])==null?void 0:N[0])!=="&"){let Ne=nc(s,o),Te="";(j=Ne==null?void 0:Ne.tableFilter)!=null&&j.includes(Kl)?Ne.tableFilter=(C=Ne==null?void 0:Ne.tableFilter)==null?void 0:C.replace(Kl,""):Te=(U=(O=(W=Ne==null?void 0:Ne.tableFilter)==null?void 0:W.replace("(",Kl))==null?void 0:O.split(Kl))==null?void 0:U[0];let qe=[];Ne!=null&&Ne.tableFilter&&((H=la.analyzeSplitToContent(Ne==null?void 0:Ne.tableFilter,","))==null||H.forEach(te=>{te!=null&&te.includes("@InterfaceHide=Yes")&&qe.push("@InterfaceHide=Yes")}));let Re=(o==null?void 0:o.menuFilter)??[];return Array.isArray(Re)||(Re=Re?[Re]:[]),Re=[...Re,...qe],{key:"Table",name:Ne==null?void 0:Ne.groupName,tableColumns:Ne==null?void 0:Ne.tableColumns,assistColumn:Ne==null?void 0:Ne.columns,tableContents:r===1?Ne==null?void 0:Ne.tableContents:(S=(D=Ne==null?void 0:Ne.tableContents)==null?void 0:D[n])!=null&&S.every(te=>Array.isArray(te))?(E=Ne==null?void 0:Ne.tableContents)==null?void 0:E[n]:[(k=Ne==null?void 0:Ne.tableContents)==null?void 0:k[n]],filter:Ne==null?void 0:Ne.tableFilter,menuFilter:Re,quotePage:Te!==""?((R=(M=(g=Te==null?void 0:Te.replace("*",Kl))==null?void 0:g.split(Kl))==null?void 0:M[0])==null?void 0:R.replaceAll(":","/"))??"":void 0,quoteGroup:Te!==""?((ae=(pe=(Z=(de=(Be=(ue=(G=Te==null?void 0:Te.replace("*",Kl))==null?void 0:G.split(Kl))==null?void 0:ue[1])==null?void 0:Be.replace("{",Kl))==null?void 0:de.split(Kl))==null?void 0:Z[0])==null?void 0:pe.split(":"))==null?void 0:ae.filter(te=>te!==""))??[]:[],relatedQuotes:Ne==null?void 0:Ne.relatedQuotes,fatherSyncContents:Ne==null?void 0:Ne.fatherSyncContents,sonSyncContents:Ne==null?void 0:Ne.sonSyncContents}}else{let Ne=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Te=s==null?void 0:s[0];Te=Te==null?void 0:Te.slice(1,Te==null?void 0:Te.length),Te=la.analyzeSplitToContent(Te,":"),Te=Te==null?void 0:Te[(Te==null?void 0:Te.length)-1];let qe=[];qe.push("1");let Re=Te==null?void 0:Te.replace("(",Kl);Re=(ce=Re==null?void 0:Re.split(Kl))==null?void 0:ce[0],qe.push(Re);let te=Te==null?void 0:Te.replace("(",Kl);if(te=(Ee=te==null?void 0:te.split(Kl))==null?void 0:Ee[1],te=(ye=(Ve=te==null?void 0:te.replace(")",Kl))==null?void 0:Ve.split(Kl))==null?void 0:ye[0],(q=(z=te==null?void 0:te.replace(",",Kl))==null?void 0:z.split(Kl))==null||q.forEach(Le=>{qe.push(Le)}),qe.push(""),qe.push(""),(le=qe==null?void 0:qe[2])!=null&&le.includes(".xlsx")||(De=qe==null?void 0:qe[2])!=null&&De.includes(".xls"))try{let Le=Ud+"/"+(qe==null?void 0:qe[2]),He=await Hd(Le),Ba=`生成js函数名称为${qe==null?void 0:qe[1]}的函数,规则为:`+(qe==null?void 0:qe[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((He==null?void 0:He.status)===200){let Ia=He==null?void 0:He.data;const V=new FormData;V.append("file",Ia,qe==null?void 0:qe[2]),V.append("query",Ba);let P=await ec(V);P=(da=(Ye=(be=P==null?void 0:P.data)==null?void 0:be.data)==null?void 0:Ye.response)==null?void 0:da.replace("generateResult",qe==null?void 0:qe[1]),qe[qe.length-2]=P,qe[qe.length-1]=[{name:(re=(Ma=qe==null?void 0:qe[2])==null?void 0:Ma.split("."))==null?void 0:re[0],url:Le}]}}catch{}return qe=[qe],{key:"Method",name:[],tableContents:qe,tableColumns:Ne}}},Wd=(l,r)=>{var o,s,c,m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k,g,M,R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re;let n=(s=(o=la.analyzeSplitToContent(l,"="))==null?void 0:o.filter(te=>te!=="="))==null?void 0:s.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])==="="&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te));if(ac(n==null?void 0:n[1])){let te=Xd(n),Le=(f=(m=(c=te==null?void 0:te.filter)==null?void 0:c.replace("@",Kl))==null?void 0:m.split(Kl))==null?void 0:f[0],He=(u=(y=(h=te==null?void 0:te.filter)==null?void 0:h.replace("(",Kl))==null?void 0:y.split(Kl))==null?void 0:u[1],Ba=(j=(N=(w=te==null?void 0:te.filter)==null?void 0:w.replace("(",Kl))==null?void 0:N.split(Kl))==null?void 0:j[0];Ba="@"+((C=Ba==null?void 0:Ba.split("@"))==null?void 0:C[1]),He=He==null?void 0:He.slice(0,(He==null?void 0:He.length)-1),He=(O=(W=la.analyzeSplitToContent(He,","))==null?void 0:W.map(V=>(V=Ba+V,V)))==null?void 0:O.join("");let Ia=Le+"("+He+")";return{key:"Form",name:te==null?void 0:te.group,filter:Ia,formPage:((D=(H=(U=Le==null?void 0:Le.replace("*",Kl))==null?void 0:U.split(Kl))==null?void 0:H[0])==null?void 0:D.replaceAll(":","/"))??"",formGroup:((G=(R=(M=(g=(k=(E=(S=Le==null?void 0:Le.replace("*",Kl))==null?void 0:S.split(Kl))==null?void 0:E[1])==null?void 0:k.replace("{",Kl))==null?void 0:g.split(Kl))==null?void 0:M[0])==null?void 0:R.split(":"))==null?void 0:G.filter(V=>V!==""))??[],value:[],menuFilter:r==null?void 0:r.menuFilter}}else{let te=nc(n,r,n==null?void 0:n[1]),Le="";(ue=te==null?void 0:te.tableFilter)!=null&&ue.includes(Kl)?te.tableFilter=(Be=te==null?void 0:te.tableFilter)==null?void 0:Be.replace(Kl,""):Le=(pe=(Z=(de=te==null?void 0:te.tableFilter)==null?void 0:de.replace("(",Kl))==null?void 0:Z.split(Kl))==null?void 0:pe[0];let He=(Ee=(ce=(ae=te==null?void 0:te.tableFilter)==null?void 0:ae.replace("(",Kl))==null?void 0:ce.split(Kl))==null?void 0:Ee[0];He=[{menus:(ye=(Ve=He==null?void 0:He.split("*"))==null?void 0:Ve[0])==null?void 0:ye.replaceAll(":","/"),groups:((q=(z=He==null?void 0:He.split("*"))==null?void 0:z[1])==null?void 0:q.split(":"))??[]}];let Ba=(be=(De=(le=te==null?void 0:te.tableFilter)==null?void 0:le.replace("(",Kl))==null?void 0:De.split(Kl))==null?void 0:be[1];(Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1])===")"&&(Ba=Ba==null?void 0:Ba.slice(0,(Ba==null?void 0:Ba.length)-1));let Ia=[];te!=null&&te.tableFilter&&((Ye=la.analyzeSplitToContent(te==null?void 0:te.tableFilter,","))==null||Ye.forEach(P=>{P!=null&&P.includes("@InterfaceHide=Yes")&&Ia.push("@InterfaceHide=Yes")}));let V=(r==null?void 0:r.menuFilter)??[];return Array.isArray(V)||(V=V?[V]:[]),V=[...V,...Ia],{key:"Table",name:te==null?void 0:te.groupName,filter:te==null?void 0:te.tableFilter,tableColumns:te==null?void 0:te.tableColumns,quotePage:Le!==""?((re=(Ma=(da=Le==null?void 0:Le.replace("*",Kl))==null?void 0:da.split(Kl))==null?void 0:Ma[0])==null?void 0:re.replaceAll(":","/"))??"":void 0,quoteGroup:Le!==""?((Re=(qe=(Te=(Ne=Le==null?void 0:Le.replace("*",Kl))==null?void 0:Ne.split(Kl))==null?void 0:Te[1])==null?void 0:qe.split(":"))==null?void 0:Re.filter(P=>P!==""))??[]:[],menuFilter:V,relatedQuotes:He,fatherSyncContents:(te==null?void 0:te.fatherSyncContents)??[],sonSyncContents:(te==null?void 0:te.sonSyncContents)??[]}}},Kd=async(l,r)=>{let n=[],o=r==null?void 0:r.length;return r=r==null?void 0:r.map(async(s,c)=>{let m=[];s=s==null?void 0:s.map(async f=>{var h,y;if(m.push(f),((h=la.analyzeSplitToContent(l,"="))==null?void 0:h.length)<=2){if(((y=la.analyzeSplitToContent(l,"="))==null?void 0:y.length)!==0){const u=await qd(la.analyzeSplitToContent(l,"="),o,c,f);m.push(u)}}else m.push(Wd(l,f))}),await Promise.all(s),n.push(m)}),await Promise.all(r),n};let Fo="/",Gd="$",hn="$R";const lc=l=>{var n,o,s;let r="";if((l==null?void 0:l.length)>1){let c=l==null?void 0:l.filter((m,f)=>f!==0);c=c==null?void 0:c.join(""),c=la.analyzerSplitToWord(c,")"),(c==null?void 0:c.length)!==1?(c==null?void 0:c[(c==null?void 0:c.length)-1])===")"?c=c==null?void 0:c.join(""):c=(n=c==null?void 0:c.filter((m,f)=>f!==(c==null?void 0:c.length)-1))==null?void 0:n.join(""):c=c==null?void 0:c[0],r="("+c,((s=l==null?void 0:l[0])==null?void 0:s[((o=l==null?void 0:l[0])==null?void 0:o.length)-2])==="@"&&(r="@"+r)}return{filter:r}},rc=(l,r=[])=>{let n=(l==null?void 0:l.map(c=>{var m,f;return(f=c==null?void 0:c.key)==null?void 0:f.slice(1,(m=c==null?void 0:c.key)==null?void 0:m.length)}))??[],o=[];n==null||n.forEach(c=>{var m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k,g,M,R,G,ue,Be;if(c===""&&(c="算法库:通用算法"),c!=null&&c.includes(Gd)){let de="",Z=!0,pe=la.analyzerSplitToWord(c,"(");(pe==null?void 0:pe.length)>1&&(de="("+((m=la.analyzerSplitToWord(pe==null?void 0:pe[1],")"))==null?void 0:m[0]),((h=pe==null?void 0:pe[0])==null?void 0:h[((f=pe==null?void 0:pe[0])==null?void 0:f.length)-2])==="@"&&(de="@"+de));let ae=c;ae=ae==null?void 0:ae.replace(de,""),de=yn(de),de=(y=la.analyzeSplitToContent(de,","))==null?void 0:y.map(q=>((q==null?void 0:q[(q==null?void 0:q.length)-1])===","&&(q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1)),q)),de!=null&&de.includes("@ShowHide=Hide")&&(Z=!1);let ce=(u=ae==null?void 0:ae.replace("$",hn))==null?void 0:u.split(hn),Ee=ce==null?void 0:ce[1],Ve=ce==null?void 0:ce[0];Ve!=null&&Ve.includes("[")&&(Ve=(N=(w=Ve==null?void 0:Ve.replace("[",hn))==null?void 0:w.split(hn))==null?void 0:N[0],Ee=Ee+":["+((W=(C=(j=ce==null?void 0:ce[0])==null?void 0:j.replace("[",hn))==null?void 0:C.split(hn))==null?void 0:W[1])),Ve=(U=(O=Ve==null?void 0:Ve.replaceAll(":","/"))==null?void 0:O.replaceAll("{",""))==null?void 0:U.replaceAll("}",""),(Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])!=="/"&&(Ve=Ve+"/"),Ee=((H=Ve==null?void 0:Ve.split("/"))==null?void 0:H[0])+":"+Ee;let z="";if(!(Ee!=null&&Ee.includes("[")))z=Ee==null?void 0:Ee.replaceAll(":","/"),o==null||o.push({path:z,isShow:Z,filter:de,fatherPath:Ve});else{let q=(S=(D=Ee==null?void 0:Ee.replace("[",hn))==null?void 0:D.split(hn))==null?void 0:S[1];q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1),q=(E=la.analyzeSplitToContent(q,","))==null?void 0:E.map(le=>((le==null?void 0:le[(le==null?void 0:le.length)-1])===","&&(le=le==null?void 0:le.slice(0,(le==null?void 0:le.length)-1)),le)),q==null||q.forEach(le=>{var De,be;z=((be=(De=Ee==null?void 0:Ee.replace("[",hn))==null?void 0:De.split(hn))==null?void 0:be[0])+le,z=z==null?void 0:z.replaceAll(":","/"),o==null||o.push({path:z,isShow:Z,filter:de,fatherPath:Ve})})}}else{let de="",Z=!0,pe=la.analyzerSplitToWord(c,"(");(pe==null?void 0:pe.length)>1&&(de=(k=lc(pe))==null?void 0:k.filter);let ae=c;if(ae=ae==null?void 0:ae.replace(de,""),(de==null?void 0:de[0])==="("){de=de==null?void 0:de.slice(1,(de==null?void 0:de.length)-1);let Ee=[];(g=la.analyzeSplitToContent(de,","))==null||g.forEach(Ve=>{(Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])===","&&(Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1)),(Ve==null?void 0:Ve[0])==="("&&(Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1)),(Ve==null?void 0:Ve[0])!=="@"&&(Ve="@"+Ve),Ee.push(yn(Ve))}),de=Ee==null?void 0:Ee.join(",")}else de=yn(de);de=(M=la.analyzeSplitToContent(de,","))==null?void 0:M.map(Ee=>((Ee==null?void 0:Ee[(Ee==null?void 0:Ee.length)-1])===","&&(Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1)),Ee)),de!=null&&de.includes("@ShowHide=Hide")&&(Z=!1),(ae==null?void 0:ae[(ae==null?void 0:ae.length)-1])==="}"&&(ae=ae+":"),ae=(R=ae==null?void 0:ae.replaceAll("{",""))==null?void 0:R.replaceAll("}","");let ce="";if(ae!=null&&ae.includes("[")){let Ee=(G=ae==null?void 0:ae.replace("[",hn))==null?void 0:G.split(hn),Ve=Ee==null?void 0:Ee[1];Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1),(Be=(ue=la.analyzeSplitToContent(Ve,","))==null?void 0:ue.map(ye=>((ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])===","&&(ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1)),ye)))==null||Be.forEach(ye=>{ce=(Ee==null?void 0:Ee[0])+ye,ce=ce==null?void 0:ce.replaceAll(":","/"),o==null||o.push({path:ce,isShow:Z,filter:de})})}else ce=ae==null?void 0:ae.replaceAll(":","/"),o==null||o.push({path:ce,isShow:Z,filter:de})}});let s=$.cloneDeep(o);return(r==null?void 0:r.length)>0&&(s=r),s=s==null?void 0:s.filter(c=>{var m,f,h,y;return!(c!=null&&c.fatherPath)&&((f=(m=c==null?void 0:c.path)==null?void 0:m.split(Fo))==null?void 0:f.length)>1&&((y=(h=c==null?void 0:c.path)==null?void 0:h.split(Fo))==null?void 0:y[1])===""}),s=s==null?void 0:s.map(c=>{var m;return c.path=(m=c.path)==null?void 0:m.replace(Fo,""),c.path}),(s==null?void 0:s.length)>0&&(o=o==null?void 0:o.map(c=>{var f,h,y,u,w,N,j;let m=s==null?void 0:s.find(C=>{var W;return(W=c==null?void 0:c.path)==null?void 0:W.includes(C)});return!(c!=null&&c.fatherPath)&&m&&!((f=c==null?void 0:c.path)!=null&&f.includes(Fo))&&!(s!=null&&s.find(C=>(c==null?void 0:c.path)===C))&&(c.path=m+Fo+((j=(y=(h=c==null?void 0:c.path)==null?void 0:h.split(m))==null?void 0:y[1])==null?void 0:j.slice(1,(N=(w=(u=c==null?void 0:c.path)==null?void 0:u.split(m))==null?void 0:w[1])==null?void 0:N.length))),c})),o},Yd=(l,r)=>rc([{key:l}],r),Jd=async(l,r)=>{const n=[],o=Yd(l==null?void 0:l.key,r);return o&&(o==null?void 0:o.length)>0&&(o==null||o.forEach(c=>{n.push([{key:"path",value:c==null?void 0:c.path,parentPath:(c==null?void 0:c.parentPath)??"",isShow:c==null?void 0:c.isShow,menuFilter:c==null?void 0:c.filter}])})),await Kd(l==null?void 0:l.value,n)};let bl="$R",Ho="[Any]";const Xd=l=>{var m,f;let r={},o=l==null?void 0:l[0];(o==null?void 0:o[0])==="*"&&(o=o==null?void 0:o.slice(1,o==null?void 0:o.length)),o=o==null?void 0:o.split(":"),r.group=o;let s=l==null?void 0:l[1],c;return s!=null&&s.includes("{")?c=(f=(m=s==null?void 0:s.replaceAll("{",""))==null?void 0:m.replaceAll("}",""))==null?void 0:f.replaceAll(Ho,""):c=s==null?void 0:s.replaceAll(Ho,""),(c==null?void 0:c[0])==="$"&&(c=c==null?void 0:c.slice(1,c==null?void 0:c.length)),r.filter=c,r},Zd=l=>{var N,j,C,W,O,U;let r=[],n=[],o=[],s=[],c=[],m=[],f="",h=l==null?void 0:l[0];(h==null?void 0:h[0])==="*"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length));let y=la.analyzeSplitToContent(h,":");(N=y==null?void 0:y.filter(H=>(H==null?void 0:H[0])!=="{"&&(H==null?void 0:H[0])!=="["))==null||N.forEach(H=>{var S,E,k;(H==null?void 0:H[(H==null?void 0:H.length)-1])===":"&&(H=H==null?void 0:H.slice(0,(H==null?void 0:H.length)-1));let D=la.analyzerSplitToWord(H,"(");if((D==null?void 0:D.length)>1){f=(S=lc(D))==null?void 0:S.filter;let g=H==null?void 0:H.replace(f,"");if(o.push(g),(f==null?void 0:f[0])==="("){f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1);let M=[];(E=la.analyzeSplitToContent(f,","))==null||E.forEach(R=>{(R==null?void 0:R[(R==null?void 0:R.length)-1])===","&&(R=R==null?void 0:R.slice(0,(R==null?void 0:R.length)-1)),(R==null?void 0:R[0])==="("&&(R=R==null?void 0:R.slice(1,(R==null?void 0:R.length)-1)),(R==null?void 0:R[0])!=="@"&&(R="@"+R),M.push(yn(R))}),f=M==null?void 0:M.join(",")}else f=yn(f);f=(k=la.analyzeSplitToContent(f,","))==null?void 0:k.map(M=>((M==null?void 0:M[(M==null?void 0:M.length)-1])===","&&(M=M==null?void 0:M.slice(0,(M==null?void 0:M.length)-1)),M)),f!=null&&f.includes("@ShowHide=Hide")&&m.push(g),s=[...s,...f]}else o.push(D==null?void 0:D[0])});let u=(j=y==null?void 0:y.filter(H=>(H==null?void 0:H[0])==="{"))==null?void 0:j[0],w=(C=y==null?void 0:y.filter(H=>(H==null?void 0:H[0])==="["))==null?void 0:C[0];return r=Bo(w??""),r!=null&&r.every(H=>Array.isArray(H))&&(r=[r]),(u==null?void 0:u[(u==null?void 0:u.length)-1])===":"&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1)),c=(W=la.analyzeSplitToContent(u,"@"))==null?void 0:W[1],c="@"+c,u=u==null?void 0:u.replace(c,""),c=yn(c),c=(O=la.analyzeSplitToContent(c,","))==null?void 0:O.map(H=>((H==null?void 0:H[(H==null?void 0:H.length)-1])===","&&(H=H==null?void 0:H.slice(0,(H==null?void 0:H.length)-1)),H)),(u==null?void 0:u[0])==="{"&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1)),u=(U=la.analyzeSplitToContent(u,","))==null?void 0:U.map(H=>((H==null?void 0:H[(H==null?void 0:H.length)-1])===","&&(H=H==null?void 0:H.slice(0,(H==null?void 0:H.length)-1)),H)),u==null||u.forEach((H,D)=>{var Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia,V,P,ee,fe,ve,ha;let S=[],E=[],k=!1,g,M=[],R=[],G=[],ue="Input",Be=[],de=[];if(H!=null&&H.includes("==")){g=(Z=H==null?void 0:H.split("=="))==null?void 0:Z[0];let Ze=(pe=H==null?void 0:H.split("=="))==null?void 0:pe[1],se="";((ae=la.analyzeSplitToContent(Ze,"$"))==null?void 0:ae.length)>1&&((ce=la.analyzeSplitToContent(Ze,"$"))==null?void 0:ce[0])!=="$"?(se=(Ee=la.analyzeSplitToContent(Ze,"$"))==null?void 0:Ee[0],se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1)):((Ve=la.analyzeSplitToContent(Ze,"}"))==null?void 0:Ve.length)>1&&(se=(ye=la.analyzeSplitToContent(Ze,"}"))==null?void 0:ye[1]);let we=Ze==null?void 0:Ze.replace(se,"");(se==null?void 0:se[0])==="("&&(se=se==null?void 0:se.slice(1,(se==null?void 0:se.length)-1)),(z=la.analyzeSplitToContent(se,","))==null||z.forEach(ze=>{var We;(ze==null?void 0:ze[0])!=="@"&&(ze="@"+ze),(ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])===","&&(ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1));let _a=yn(ze);(We=la.analyzeSplitToContent(_a,","))==null||We.forEach(x=>{(x==null?void 0:x[(x==null?void 0:x.length)-1])===","&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1)),S.push(x)})}),(we==null?void 0:we[0])==="$"&&(we=we==null?void 0:we.slice(1,we==null?void 0:we.length));let ya=(q=we==null?void 0:we.replace("*",bl))==null?void 0:q.split(bl);M=(le=ya==null?void 0:ya[0])==null?void 0:le.split(":"),R=(be=(De=la.analyzeSplitToContent(ya==null?void 0:ya[1],":"))==null?void 0:De.filter((ze,_a)=>{var We,x;return _a!==((x=(We=ya==null?void 0:ya[1])==null?void 0:We.split(":"))==null?void 0:x.length)-1}))==null?void 0:be.map(ze=>((ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])===":"&&(ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1)),ze)),G=(da=(Ye=la.analyzeSplitToContent(ya==null?void 0:ya[1],":"))==null?void 0:Ye.filter((ze,_a)=>{var We,x;return _a===((x=(We=ya==null?void 0:ya[1])==null?void 0:We.split(":"))==null?void 0:x.length)-1}))==null?void 0:da[0],G=(re=(Ma=G==null?void 0:G.replaceAll("{",""))==null?void 0:Ma.replaceAll("}",""))==null?void 0:re.split(":"),ue="Select"}else if(((Ne=la.analyzeSplitToContent(H,"="))==null?void 0:Ne.length)>1)if(ue="Select",g=(qe=(Te=H==null?void 0:H.replace("=",bl))==null?void 0:Te.split(bl))==null?void 0:qe[0],!(H!=null&&H.includes("If")))Be=(te=(Re=H==null?void 0:H.replace("=",bl))==null?void 0:Re.split(bl))==null?void 0:te[1],Be=Be==null?void 0:Be.split("||");else{let Ze=(He=(Le=H==null?void 0:H.replace("=",bl))==null?void 0:Le.split(bl))==null?void 0:He[1];de=(Ba=la.analyzeSplitToContent(Ze,")"))==null?void 0:Ba.filter(se=>!(se!=null&&se.includes("If"))),de=de==null?void 0:de.map(se=>((se==null?void 0:se[0])==="("&&(se=se==null?void 0:se.slice(1,(se==null?void 0:se.length)-1)),se=se==null?void 0:se.split("||"),se)),E=(Ia=la.analyzeSplitToContent(Ze,")"))==null?void 0:Ia.filter(se=>se==null?void 0:se.includes("If")),E=E==null?void 0:E.map(se=>((se==null?void 0:se[0])==="|"&&(se=se==null?void 0:se.slice(2,se==null?void 0:se.length)),(se==null?void 0:se[0])==="("&&(se=se==null?void 0:se.slice(1,(se==null?void 0:se.length)-1)),(se==null?void 0:se[0])!=="@"&&(se="@"+se),se))}else if(((V=la.analyzeSplitToContent(H,"@"))==null?void 0:V.length)>1){g=(P=la.analyzeSplitToContent(H,"@"))==null?void 0:P[0],(g==null?void 0:g[(g==null?void 0:g.length)-1])==="@"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1));let Ze="@"+((ee=la.analyzeSplitToContent(H,"@"))==null?void 0:ee[1]);Ze=yn(Ze),S=(fe=la.analyzeSplitToContent(Ze,","))==null?void 0:fe.map(se=>((se==null?void 0:se[(se==null?void 0:se.length)-1])===","&&(se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1)),se)),S!=null&&S.find(se=>se==null?void 0:se.includes("@Type"))&&(ue=(ha=(ve=S==null?void 0:S.find(se=>se==null?void 0:se.includes("@Type")))==null?void 0:ve.split("="))==null?void 0:ha[1])}else g=H;S!=null&&S.includes("@ShowHide=Hide")&&(k=!0),n.push({prop:g,label:g,value:"",menuPath:M,groups:R,columns:G,type:ue,options:Be,allContents:de,filters:S,width:u==null?void 0:u.length,isFormColHidden:k,filterContents:E})}),{groupName:o,groupFilters:s,formContents:n,contents:r,filter:c,hideContents:m}},Bo=l=>{var o,s;if(!l||typeof l!="string")return[];let r=[],n=l.slice(1,(l==null?void 0:l.length)-1);if((n==null?void 0:n[0])!=="[")(o=la.analyzeSplitToContent(n,","))==null||o.forEach(c=>{(c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c.slice(0,(c==null?void 0:c.length)-1)),r.push(c??"")});else{let c=[];(s=la.analyzeSplitToContent(n,","))==null||s.forEach(m=>{(m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),c.push(Bo(m))}),r=c}return r},mt=(l,r)=>{var U,H,D,S,E,k,g,M,R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia,V,P,ee,fe,ve,ha,Ze,se,we,ya;let n,o=[],s=[],c=[],m=[],f=[],h=[],y=[],u="Input",w,N="",j="",C="",W=[],O="";if(l!=null&&l.includes("==")||l!=null&&l.includes("=")||l!=null&&l.includes("@")||l!=null&&l.includes("||"))if(n=(U=l==null?void 0:l.split("=="))==null?void 0:U[0],w=(H=l==null?void 0:l.split("=="))==null?void 0:H[0],u="Select",l!=null&&l.includes("=")&&!(l!=null&&l.includes("=="))&&!((E=(S=(D=l==null?void 0:l.replace("=",bl))==null?void 0:D.split(bl))==null?void 0:S[1])!=null&&E.includes("If")))if(n=la.analyzeSplitToContent(l,"@"),n=n==null?void 0:n[0],(n==null?void 0:n[(n==null?void 0:n.length)-1])==="@"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),n=(g=(k=n==null?void 0:n.replace("=",bl))==null?void 0:k.split(bl))==null?void 0:g[0],n!=null&&n.includes("&")&&(n=(R=(M=n==null?void 0:n.replace("&",bl))==null?void 0:M.split(bl))==null?void 0:R[0]),w=n,((G=la.analyzeSplitToContent(l,"@"))==null?void 0:G.length)>1){if(!(l!=null&&l.includes("&"))){let ze=(ue=la.analyzeSplitToContent(l,"@"))==null?void 0:ue[1];(ze==null?void 0:ze[0])!=="@"&&(ze="@"+ze),ze=yn(ze),c==null||c.push(ze)}}else l!=null&&l.includes("||")?o=(Z=(de=(Be=l==null?void 0:l.split("="))==null?void 0:Be[1])==null?void 0:de.split("||"))==null?void 0:Z.map(ze=>({label:ze==null?void 0:ze.replaceAll("'",""),value:ze==null?void 0:ze.replaceAll("'","")})):(u="Input",N=(ce=(ae=(pe=l==null?void 0:l.replace("=",bl))==null?void 0:pe.split(bl))==null?void 0:ae[1])==null?void 0:ce.replaceAll("'",""));else if((ye=(Ve=(Ee=l==null?void 0:l.replace("=",bl))==null?void 0:Ee.split(bl))==null?void 0:Ve[1])!=null&&ye.includes("||")){n=(z=l==null?void 0:l.split("="))==null?void 0:z[0],w=(q=l==null?void 0:l.split("="))==null?void 0:q[0];let ze=(De=(le=l==null?void 0:l.replace("=",bl))==null?void 0:le.split(bl))==null?void 0:De[1];ze=la.analyzeSplitToContent(ze,")");let _a=ze==null?void 0:ze.filter(x=>!(x!=null&&x.includes("If")));_a==null||_a.forEach(x=>{(x==null?void 0:x[0])==="("&&(x=x==null?void 0:x.slice(1,(x==null?void 0:x.length)-1)),s==null||s.push(x==null?void 0:x.split("||"))});let We=ze==null?void 0:ze.filter(x=>x==null?void 0:x.includes("If"));We=We==null?void 0:We.map(x=>((x==null?void 0:x[0])==="|"&&(x==null?void 0:x[1])==="|"&&(x=x==null?void 0:x.slice(2,x==null?void 0:x.length)),(x==null?void 0:x[0])==="("&&(x=x==null?void 0:x.slice(1,(x==null?void 0:x.length)-1)),(x==null?void 0:x[0])!=="@"&&(x="@"+x),x)),c=We}else{let ze=l==null?void 0:l.split("=="),_a=(be=ze==null?void 0:ze.filter(We=>(We==null?void 0:We.includes("$"))&&(We==null?void 0:We[0])!=="{"))==null?void 0:be[0];if(_a&&!(_a!=null&&_a.includes("&"))){let We=(Ye=_a==null?void 0:_a.replace("*",bl))==null?void 0:Ye.split(bl),x=(We==null?void 0:We[0])===""?r==null?void 0:r.value:We==null?void 0:We[0];(x==null?void 0:x[0])==="("&&(x=(da=la.analyzeSplitToContent(x,")"))==null?void 0:da[1]),x=(re=(Ma=x==null?void 0:x.replaceAll("{",""))==null?void 0:Ma.replaceAll("}",""))==null?void 0:re.replaceAll(Ho,""),(x==null?void 0:x[0])==="$"&&(x=(Ne=x==null?void 0:x.slice(1,x==null?void 0:x.length))==null?void 0:Ne.replaceAll(":","/")),m=x==null?void 0:x.split("/");let Ae=(qe=(Te=We==null?void 0:We[1])==null?void 0:Te.replace("{",bl))==null?void 0:qe.split(bl),ne=Ae==null?void 0:Ae[0];(ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])===":"&&(ne=ne==null?void 0:ne.slice(0,(ne==null?void 0:ne.length)-1)),f=ne==null?void 0:ne.split(":"),h=(He=(Le=(te=(Re=Ae==null?void 0:Ae[1])==null?void 0:Re.replace("}",bl))==null?void 0:te.split(bl))==null?void 0:Le[0])==null?void 0:He.split(":");let Ue="";((Ba=la.analyzeSplitToContent(_a,")"))==null?void 0:Ba.length)>1&&(Ue=(Ia=la.analyzeSplitToContent(_a,")"))==null?void 0:Ia[0]),Ue&&Ue!==""&&((Ue==null?void 0:Ue[0])!=="@"&&(Ue="@"+Ue),j=Ni(Ue))}if(ze!=null&&ze.some(We=>(We==null?void 0:We[0])==="&")){let We=(V=ze==null?void 0:ze.filter(ne=>(ne==null?void 0:ne[0])==="&"))==null?void 0:V[0];(We==null?void 0:We[0])==="&"&&(We=We==null?void 0:We.slice(1,We==null?void 0:We.length)),C=(ee=(P=We==null?void 0:We.replace("(",bl))==null?void 0:P.split(bl))==null?void 0:ee[0];let x=(fe=la.analyzeSplitToContent(We,")"))==null?void 0:fe[0];x=(ha=(ve=x==null?void 0:x.replace("(",bl))==null?void 0:ve.split(bl))==null?void 0:ha[1],x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1),(x==null?void 0:x[0])==="{"&&(x=x==null?void 0:x.slice(1,x==null?void 0:x.length)),(x==null?void 0:x[(x==null?void 0:x.length)-1])==="}"&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1)),W=x==null?void 0:x.split(",");let Ae=(Ze=la.analyzeSplitToContent(We,")"))==null?void 0:Ze[1];Ae&&Ae!==""&&(O=Ni(Ae))}else if(!_a&&((se=ze==null?void 0:ze.filter(We=>(We==null?void 0:We[0])==="{"))==null?void 0:se.length)>0){let We=ze==null?void 0:ze[(ze==null?void 0:ze.length)-1];We=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1),We=la.analyzeSplitToContent(We,","),We=We==null?void 0:We.map(x=>((x==null?void 0:x[(x==null?void 0:x.length)-1])===","&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1)),x)),We=We==null?void 0:We.map(x=>{var Ae,ne,Ue,Je;if(x=x==null?void 0:x.replaceAll("$",""),x!=null&&x.includes("{")){let ra="";x=x==null?void 0:x.replaceAll("{","");let Oe=x==null?void 0:x.split("}");ra=((ne=(Ae=Oe==null?void 0:Oe[0])==null?void 0:Ae.split(":"))==null?void 0:ne[0])+":"+(Oe==null?void 0:Oe[1]),x=ra,x=x+":"}if(x!=null&&x.includes(Ho)){let ra="",Oe=x==null?void 0:x.split(Ho);ra=((Je=(Ue=Oe==null?void 0:Oe[0])==null?void 0:Ue.split(":"))==null?void 0:Je[0])+":"+(Oe==null?void 0:Oe[1]),x=ra,x=x+":"}return x=x==null?void 0:x.replaceAll(":","/"),x}),y=We}else ze!=null&&ze.includes("$")||h.push(ze==null?void 0:ze[1])}else n=(we=l==null?void 0:l.split("&"))==null?void 0:we[0],w=(ya=l==null?void 0:l.split("&"))==null?void 0:ya[0];return{label:n,prop:w,options:o,allContents:s,filterContents:c,menus:m,groups:f,words:h,align:"center",formType:u,filter:j,functionName:C,functionRelatedWords:W,calculatorFilter:O,relatedPages:y,value:N}},Bi=(l,r)=>{var o,s,c,m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k,g,M,R,G,ue,Be,de,Z,pe,ae;let n=[];if((l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&!((m=(c=(s=(o=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:o.replace(":",bl))==null?void 0:s.split(bl))==null?void 0:c[0])!=null&&m.includes(","))){let ce=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),Ee=(f=ce==null?void 0:ce.replace(":",bl))==null?void 0:f.split(bl);if(((h=la.analyzeSplitToContent(Ee==null?void 0:Ee[1],"="))==null?void 0:h.length)===1){let Ve=Ee==null?void 0:Ee[0],ye=[];(w=la.analyzeSplitToContent((u=Ee==null?void 0:Ee[1])==null?void 0:u.slice(1,((y=Ee==null?void 0:Ee[1])==null?void 0:y.length)-1),","))==null||w.forEach(z=>{var q,le;((q=la.analyzeSplitToContent(z,"="))==null?void 0:q.length)>1?((z==null?void 0:z[(z==null?void 0:z.length)-1])===","&&(z=z==null?void 0:z.slice(0,(z==null?void 0:z.length)-1)),ye=[...ye,...Bi(z,r)]):((z==null?void 0:z[(z==null?void 0:z.length)-1])===","&&(z=z==null?void 0:z.slice(0,(z==null?void 0:z.length)-1)),ye.push((le=Bi(z,r))==null?void 0:le[0]))}),n==null||n.push({label:Ve,prop:Ve,children:ye,align:"center"})}else{let Ve=[];if(((N=la.analyzeSplitToContent(ce,"="))==null?void 0:N.length)>=2){let z=(j=la.analyzeSplitToContent(ce,"="))==null?void 0:j[1],q=(C=la.analyzeSplitToContent(z,"/"))==null?void 0:C.map(le=>((le==null?void 0:le[(le==null?void 0:le.length)-1])==="/"&&(le=le==null?void 0:le.slice(0,(le==null?void 0:le.length)-1)),le));Ve=q==null?void 0:q.map(le=>(le=Bo(le),le))}let ye=(S=(D=(H=(U=(O=(W=ce==null?void 0:ce.replace("{",bl))==null?void 0:W.split(bl))==null?void 0:O[1])==null?void 0:U.replace("}",bl))==null?void 0:H.split(bl))==null?void 0:D[0])==null?void 0:S.split(",");ye==null||ye.forEach((z,q)=>{(Ve==null?void 0:Ve.length)>0&&q===0?n==null||n.push({label:z,prop:z,align:"center",formType:"Select",relatedContents:Ve==null?void 0:Ve.map(le=>{let De={};return ye==null||ye.forEach((be,Ye)=>{De[be]=le==null?void 0:le[Ye]}),De}),options:Ve==null?void 0:Ve.map(le=>({label:le==null?void 0:le[0],value:le==null?void 0:le[0]})),mainKey:!0}):n==null||n.push({label:z,prop:z,align:"center"})})}}else if((l==null?void 0:l[0])==="{")if(((E=la.analyzeSplitToContent(l,"="))==null?void 0:E.length)===2&&((g=(k=la.analyzeSplitToContent(l,"="))==null?void 0:k[1])==null?void 0:g[0])==="["){let ce=[];if(((M=la.analyzeSplitToContent(l,"="))==null?void 0:M.length)>=2){let Ve=(R=la.analyzeSplitToContent(l,"="))==null?void 0:R[1],ye=(ue=(G=la.analyzeSplitToContent(Ve,"|"))==null?void 0:G.filter(z=>z!=="|"))==null?void 0:ue.map(z=>((z==null?void 0:z[(z==null?void 0:z.length)-1])==="|"&&(z=z==null?void 0:z.slice(0,(z==null?void 0:z.length)-1)),z));ce=ye==null?void 0:ye.map(z=>(z=Bo(z),z))}let Ee=(de=(Be=l==null?void 0:l.replace("}",bl))==null?void 0:Be.split(bl))==null?void 0:de[0];Ee=(Z=Ee==null?void 0:Ee.slice(1,Ee==null?void 0:Ee.length))==null?void 0:Z.split(","),Ee==null||Ee.forEach((Ve,ye)=>{(ce==null?void 0:ce.length)>0&&ye===0?n==null||n.push({label:Ve,prop:Ve,align:"center",formType:"Select",relatedContents:ce==null?void 0:ce.map(z=>{let q={};return Ee==null||Ee.forEach((le,De)=>{q[le]=z==null?void 0:z[De]}),q}),options:ce==null?void 0:ce.map(z=>({label:z==null?void 0:z[0],value:z==null?void 0:z[0]})),mainKey:!0}):n==null||n.push({label:Ve,prop:Ve,align:"center"})})}else(pe=la.analyzeSplitToContent(l,","))==null||pe.forEach(ce=>{var Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia,V,P,ee,fe,ve,ha,Ze,se,we,ya,ze,_a,We,x,Ae;if((ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])===","&&(ce=ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1)),(ce==null?void 0:ce[0])==="{"){let ne=la.analyzeSplitToContent(ce,"="),Ue=ne==null?void 0:ne[(ne==null?void 0:ne.length)-1],Je=[],ra=[],Oe=[],za="",fa="",Oa=[],Pa=[],ka=(Ee=Ue==null?void 0:Ue.replace("*",bl))==null?void 0:Ee.split(bl),ua=(ka==null?void 0:ka[0])===""?r==null?void 0:r.value:ka==null?void 0:ka[0];ua=la.analyzeSplitToContent(ua,")");let ma="";if((ua==null?void 0:ua.length)>1&&((Ve=ua==null?void 0:ua[0])==null?void 0:Ve[0])!=="&"&&(ma=ua==null?void 0:ua[0],(ma==null?void 0:ma[0])!=="@"&&(ma="@"+ma),fa=ma??""),ua=(ye=ua==null?void 0:ua.filter(gl=>(gl==null?void 0:gl[0])==="$"))==null?void 0:ye[0],((z=la.analyzeSplitToContent(ua,"}"))==null?void 0:z.length)>1&&((le=(q=la.analyzeSplitToContent(ua,"}"))==null?void 0:q[1])==null?void 0:le[0])==="("&&(ma=(De=la.analyzeSplitToContent(ua,"}"))==null?void 0:De[1],(ma==null?void 0:ma[0])!=="@"&&(ma="@"+ma),fa!==""&&(fa=fa+","),fa=fa+ma),ua=(be=la.analyzeSplitToContent(ua,"}"))==null?void 0:be[0],(ua==null?void 0:ua[0])==="$"&&(ua=(Ye=ua==null?void 0:ua.replace("{",""))==null?void 0:Ye.replace("}",":"),ua=(da=ua==null?void 0:ua.slice(1,ua==null?void 0:ua.length))==null?void 0:da.replaceAll(":","/")),ua!=null&&ua.includes("$")){let gl=(Ma=ua==null?void 0:ua.split("$"))==null?void 0:Ma[0];gl=(re=gl==null?void 0:gl.split("/"))==null?void 0:re[0],ua=gl+"/"+((Ne=ua==null?void 0:ua.split("$"))==null?void 0:Ne[1])+"/"}Je=(ua==null?void 0:ua.split("/"))??[];let Ha=(qe=(Te=ka==null?void 0:ka[1])==null?void 0:Te.replace("{",bl))==null?void 0:qe.split(bl);if((Le=(te=(Re=ka==null?void 0:ka[1])==null?void 0:Re.split("(@"))==null?void 0:te[0])!=null&&Le.includes("&&")||(Ia=(Ba=(He=ka==null?void 0:ka[1])==null?void 0:He.split("@"))==null?void 0:Ba[0])!=null&&Ia.includes("&&")){let gl=(V=ka==null?void 0:ka[1])!=null&&V.includes("(@")?(fe=(ee=(P=ka==null?void 0:ka[1])==null?void 0:P.split("(@"))==null?void 0:ee[0])==null?void 0:fe.split("&&"):(Ze=(ha=(ve=ka==null?void 0:ka[1])==null?void 0:ve.split("@"))==null?void 0:ha[0])==null?void 0:Ze.split("&&");Oa=gl==null?void 0:gl.map($a=>{var jl,Zl;return($a==null?void 0:$a[0])==="*"&&($a=$a==null?void 0:$a.slice(1,$a==null?void 0:$a.length)),$a=(Zl=(jl=$a==null?void 0:$a.replace("{",bl))==null?void 0:jl.split(bl))==null?void 0:Zl[0],($a==null?void 0:$a[($a==null?void 0:$a.length)-1])===":"&&($a=$a==null?void 0:$a.slice(0,($a==null?void 0:$a.length)-1)),$a=$a==null?void 0:$a.split(":"),$a});let Ol=[];gl==null||gl.forEach(($a,jl)=>{var Zl,ja;($a==null?void 0:$a[0])==="*"&&($a=$a==null?void 0:$a.slice(1,$a==null?void 0:$a.length)),$a=(ja=(Zl=$a==null?void 0:$a.replace("{",bl))==null?void 0:Zl.split(bl))==null?void 0:ja[1],($a==null?void 0:$a[($a==null?void 0:$a.length)-1])==="}"&&($a=$a==null?void 0:$a.slice(0,($a==null?void 0:$a.length)-1)),$a=$a==null?void 0:$a.split(","),Ol.push(jl===0?($a==null?void 0:$a.length)-1:$a==null?void 0:$a.length),Pa=[...Pa,...$a]}),Ol=(se=la.prefixSum(Ol))==null?void 0:se.map($a=>$a==null?void 0:$a.total),Oa=Oa==null?void 0:Oa.map(($a,jl)=>({number:Ol==null?void 0:Ol[jl],contents:$a}))}let pl=Ha==null?void 0:Ha[0];(pl==null?void 0:pl[(pl==null?void 0:pl.length)-1])===":"&&(pl=pl==null?void 0:pl.slice(0,(pl==null?void 0:pl.length)-1)),ra=(pl==null?void 0:pl.split(":"))??[],Oe=((_a=(ze=(ya=(we=Ha==null?void 0:Ha[1])==null?void 0:we.replace("}",bl))==null?void 0:ya.split(bl))==null?void 0:ze[0])==null?void 0:_a.split(","))??[];let $l=(x=ne==null?void 0:ne[0])==null?void 0:x.slice(1,((We=ne==null?void 0:ne[0])==null?void 0:We.length)-2);fa&&fa!==""&&(za=Ni(fa)),(Ae=$l==null?void 0:$l.split(","))==null||Ae.forEach((gl,Ol)=>{var $a,jl,Zl,ja,ba;(($a=la.analyzeSplitToContent(gl,"@"))==null?void 0:$a.length)>1&&(gl=(jl=la.analyzeSplitToContent(gl,"@"))==null?void 0:jl[0],(gl==null?void 0:gl[(gl==null?void 0:gl.length)-1])==="@"&&(gl=gl==null?void 0:gl.slice(0,(gl==null?void 0:gl.length)-1))),n.push({label:gl,prop:gl,align:"center",menus:Je,groups:(Oa==null?void 0:Oa.length)===0?ra:(Zl=Oa==null?void 0:Oa.find(Da=>(Da==null?void 0:Da.number)>=Ol))==null?void 0:Zl.contents,words:(Pa==null?void 0:Pa.length)===0?(ja=Oe==null?void 0:Oe[Ol])==null?void 0:ja.split(":"):(ba=Pa==null?void 0:Pa[Ol])==null?void 0:ba.split(":"),formType:(Je==null?void 0:Je.length)>0?"Select":"Input",mainKey:Ol===0,filter:za,isMainPath:(Oa==null?void 0:Oa.findIndex(Da=>(Da==null?void 0:Da.number)>=Ol))===0})})}else n.push({label:ce,prop:ce,align:"center"})});else{let ce=(ae=la.analyzeSplitToContent(l,","))==null?void 0:ae.map(Ee=>((Ee==null?void 0:Ee[(Ee==null?void 0:Ee.length)-1])===","&&(Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1)),Ee));ce==null||ce.forEach(Ee=>{n.push(mt(Ee,r))})}return n},Qd=(l,r)=>{var m,f,h,y,u;let n=l;if(!l)return;let o="";((m=la.analyzeSplitToContent(l,"}"))==null?void 0:m.length)>1&&(n=(f=la.analyzeSplitToContent(l,"}"))==null?void 0:f[0],o=(h=la.analyzeSplitToContent(l,"}"))==null?void 0:h[1]),(l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let s=[],c=[];return s.push({label:"排序",prop:"sort"}),s.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(y=la.analyzeSplitToContent(n,","))==null||y.forEach(w=>{var N;(w==null?void 0:w[(w==null?void 0:w.length)-1])===","&&(w=w==null?void 0:w.slice(0,(w==null?void 0:w.length)-1)),(w==null?void 0:w[0])==="{"?(N=Bi(w,r))==null||N.forEach(j=>{s.push(j)}):s.push(mt(w,r))}),s!=null&&s.some(w=>{var N;return(N=w==null?void 0:w.prop)==null?void 0:N.includes("@")})&&(s=s==null?void 0:s.filter(w=>{var N;return!((N=w==null?void 0:w.prop)!=null&&N.includes("@"))})),o!==""&&((o==null?void 0:o[0])=="{"&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),(u=la.analyzeSplitToContent(o,","))==null||u.forEach(w=>{var N;(w==null?void 0:w[(w==null?void 0:w.length)-1])===","&&(w=w==null?void 0:w.slice(0,(w==null?void 0:w.length)-1)),(w==null?void 0:w[0])==="{"?(N=Bi(w,r))==null||N.forEach(j=>{c.push(j)}):c.push(mt(w,r))})),{columns:s,secondColumns:c}},yn=l=>{var r,n,o,s,c;if(l!=null&&l.includes("@Filter")||l!=null&&l.includes("@Condition")||l!=null&&l.includes("@If"))return l;{let m=(n=(r=l==null?void 0:l.replace("(",bl))==null?void 0:r.split(bl))==null?void 0:n[1],f=(s=(o=l==null?void 0:l.replace("(",bl))==null?void 0:o.split(bl))==null?void 0:s[0];return m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1),m=(c=la.analyzeSplitToContent(m,","))==null?void 0:c.map(h=>((h==null?void 0:h[(h==null?void 0:h.length)-1])===","&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),(h==null?void 0:h[0])==="("&&(h=h==null?void 0:h.slice(1,(h==null?void 0:h.length)-1)),f+h)),m=m==null?void 0:m.join(","),l!=null&&l.includes("@Quote")&&(m!=null&&m.includes("@QuoteType")||(m=m===""?m+"@QuoteType=Manual":m+",@QuoteType=Manual"),m!=null&&m.includes("@QuoteSonSync")||(m=m===""?m+"@QuoteSonSync=No":m+",@QuoteSonSync=No"),m!=null&&m.includes("@QuoteFatherSync")||(m=m===""?m+"@QuoteFatherSync=Yes":m+",@QuoteFatherSync=Yes")),m}},is=l=>{let r=l==null?void 0:l.map(n=>{var o,s;return{menus:n==null?void 0:n.menus,content:((o=n==null?void 0:n.menus)==null?void 0:o.join("/"))+bl+((s=n==null?void 0:n.groups)==null?void 0:s.join("/"))}});return r=r==null?void 0:r.filter(n=>{var o;return(n==null?void 0:n.menus)&&((o=n==null?void 0:n.menus)==null?void 0:o.length)>0}),r=r==null?void 0:r.map(n=>n==null?void 0:n.content),r=[...new Set(r)],r=r==null?void 0:r.map(n=>{var o,s;return{menus:(o=n==null?void 0:n.split(bl))==null?void 0:o[0],groups:((s=n==null?void 0:n.split(bl))==null?void 0:s[1])??[]}}),r},ts=l=>{var n;let r=l;return(r==null?void 0:r[0])==="("&&(r==null?void 0:r[1])==="("&&(r=r.slice(1,(r==null?void 0:r.length)-1)),r=(n=la.analyzeSplitToContent(r,","))==null?void 0:n.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),(o==null?void 0:o[0])!=="@"&&(o="@"+o),o=yn(o),o)),r==null?void 0:r.join(",")},nc=(l,r,n="")=>{var H,D,S,E,k,g,M,R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia,V,P,ee,fe,ve,ha,Ze,se,we,ya,ze,_a,We;let o=[],s=[],c=[],m="",f="",h="",y=[],u=[],w=[],N="";if(((H=l==null?void 0:l[0])==null?void 0:H[0])!=="*"&&((D=l==null?void 0:l[0])==null?void 0:D[0])!=="$"&&!((S=l==null?void 0:l[0])!=null&&S.includes("$")))return;((E=l==null?void 0:l[0])==null?void 0:E[0])!=="*"&&((k=l==null?void 0:l[0])==null?void 0:k[0])!=="$"&&(m=(g=la.analyzeSplitToContent(l==null?void 0:l[0],")"))==null?void 0:g[0],(m==null?void 0:m[0])!=="@"&&(m="@"+m),m=Ni(m),h=(M=la.analyzeSplitToContent(l==null?void 0:l[0],")"))==null?void 0:M[1],(h==null?void 0:h[0])==="$"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length)),h=h==null?void 0:h.replaceAll(":","/"));let C=la.analyzeSplitToContent(l==null?void 0:l[0],":");if(o=(R=C==null?void 0:C.filter(x=>(x==null?void 0:x[0])!=="{"&&(x==null?void 0:x[0])!=="["))==null?void 0:R.join(""),f=(G=l==null?void 0:l[0])==null?void 0:G.replace(o,""),(o==null?void 0:o[0])==="("&&(o=""),N=(ue=C==null?void 0:C.filter(x=>(x==null?void 0:x[0])!=="["))==null?void 0:ue.join(""),N=(Be=l==null?void 0:l[0])==null?void 0:Be.replace(N,""),f=f==null?void 0:f.replace(N,""),(o==null?void 0:o[0])==="*"&&(o=o==null?void 0:o.slice(1,o==null?void 0:o.length)),(o==null?void 0:o[(o==null?void 0:o.length)-1])===":"&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),((de=la.analyzeSplitToContent(o,"@"))==null?void 0:de.length)>1&&(m=(Z=la.analyzeSplitToContent(o,"@"))==null?void 0:Z[1],m="@"+m,o=(pe=la.analyzeSplitToContent(o,"@"))==null?void 0:pe[0]),(o==null?void 0:o[(o==null?void 0:o.length)-1])==="@"&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),o=o===""?[]:o==null?void 0:o.split(":"),m=yn(m),(f==null?void 0:f[(f==null?void 0:f.length)-1])===":"&&(f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1)),n!==""){let x=(ae=la.analyzeSplitToContent(n,")"))==null?void 0:ae[0],Ae=(ce=la.analyzeSplitToContent(n,"@"))==null?void 0:ce[1];h=(Ve=(Ee=la.analyzeSplitToContent(n,"@"))==null?void 0:Ee[0])==null?void 0:Ve.replace(x,""),(h==null?void 0:h[(h==null?void 0:h.length)-1])==="@"&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),x=ts(x),Ae=ts(Ae);let ne=x??"";if(ne!==""&&(ne=ne+","),ne=ne+Ae,(ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])===","&&(ne=ne==null?void 0:ne.slice(0,(ne==null?void 0:ne.length)-1)),ne!==""&&m!==""&&(m=m+","),m=m+ne,(h==null?void 0:h[0])==="$"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length)),h=(ye=la.analyzeSplitToContent(h,":"))==null?void 0:ye.filter((Ue,Je)=>{var ra;return!((Ue==null?void 0:Ue[0])==="{"&&Je===((ra=la.analyzeSplitToContent(h,":"))==null?void 0:ra.length)-1)}),h=h==null?void 0:h.join(""),(h==null?void 0:h[(h==null?void 0:h.length)-1])===":"&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),m!=null&&m.includes("@Sync")||(m=m===""?m+"@Sync=(Yes,Yes)":m+",@Sync=(Yes,Yes)"),h!=null&&h.includes("$")){let Ue=(q=(z=h==null?void 0:h.replace("*",bl))==null?void 0:z.split(bl))==null?void 0:q[1],Je=(De=(le=h==null?void 0:h.replace("*",bl))==null?void 0:le.split(bl))==null?void 0:De[0];Je=Je==null?void 0:Je.split("$"),Je=((Ye=(be=Je==null?void 0:Je[0])==null?void 0:be.split(":"))==null?void 0:Ye[0])+":"+(Je==null?void 0:Je[1])+":",h=Je+"*"+Ue}else h=(da=h==null?void 0:h.replaceAll("{",""))==null?void 0:da.replaceAll("}","")}m!==""&&m&&(m="("+m+")"),m=h+m,((Ma=la.analyzeSplitToContent(f,"}"))==null?void 0:Ma.length)>1&&(f=(re=la.analyzeSplitToContent(f,"}"))==null?void 0:re.filter(x=>(x==null?void 0:x[0])!=="@"),f=f==null?void 0:f.join(""));let W=Qd(f,r);c=f===""?[]:(W==null?void 0:W.columns)??[],w=ia.getColumnChild(c);let O=ia.getColumnChild(c);c!=null&&c.some(x=>{var Ae;return Array.isArray(x==null?void 0:x.children)&&((Ae=x==null?void 0:x.children)==null?void 0:Ae.length)>0})&&(c=[c]),s=N?Bo(N):[],!(s!=null&&s.every(x=>Array.isArray(x)))&&(s==null?void 0:s.length)>0&&(s=[s]),(s==null?void 0:s.length)>0&&(Array.isArray(s==null?void 0:s[0])&&((Ne=s==null?void 0:s[0])!=null&&Ne.every(x=>Array.isArray(x)))?s=s==null?void 0:s.map((x,Ae)=>(x=x.map((ne,Ue)=>(ne.unshift("{}"),ne.unshift((Ue+1).toString()),ne)),x)):s=s==null?void 0:s.map((x,Ae)=>(x.unshift("{}"),x.unshift((Ae+1).toString()),x))),W!=null&&W.secondColumns&&((Te=W==null?void 0:W.secondColumns)==null?void 0:Te.length)>0&&((s==null?void 0:s.length)>0?s=s==null?void 0:s.map((x,Ae)=>{var ne,Ue;return Array.isArray(x==null?void 0:x[0])?x=x==null?void 0:x.map((Je,ra)=>{var Oe,za;return Je.unshift((za=(Oe=W==null?void 0:W.secondColumns)==null?void 0:Oe[ra])==null?void 0:za.prop),Je}):x.unshift((Ue=(ne=W==null?void 0:W.secondColumns)==null?void 0:ne[Ae])==null?void 0:Ue.prop),x}):s=(qe=W==null?void 0:W.secondColumns)==null?void 0:qe.map((x,Ae)=>(x=[x==null?void 0:x.label],x.push(Ae),x)),c.unshift({label:"",prop:"disabled",sortable:!1})),w=w==null?void 0:w.map(x=>{var Ae,ne;return{menus:x==null?void 0:x.menus,content:((Ae=x==null?void 0:x.menus)==null?void 0:Ae.join("/"))+bl+((ne=x==null?void 0:x.groups)==null?void 0:ne.join("/"))}});let U=[];if(((te=(Re=m==null?void 0:m.replace("(",bl))==null?void 0:Re.split(bl))==null?void 0:te[0])!==""&&(U=(He=(Le=m==null?void 0:m.replace("(",bl))==null?void 0:Le.split(bl))==null?void 0:He[0],U=[U],U=U==null?void 0:U.map(x=>{var ne,Ue,Je;let Ae=x==null?void 0:x.split("*");return{menus:(ne=Ae==null?void 0:Ae[0])==null?void 0:ne.split(":"),content:((Ue=Ae==null?void 0:Ae[0])==null?void 0:Ue.replaceAll(":","/"))+bl+((Je=Ae==null?void 0:Ae[1])==null?void 0:Je.replaceAll(":","/"))}}),w=[...w,...U]),w=w==null?void 0:w.filter(x=>{var Ae;return(x==null?void 0:x.menus)&&((Ae=x==null?void 0:x.menus)==null?void 0:Ae.length)>0}),w=w==null?void 0:w.map(x=>x==null?void 0:x.content),w=[...new Set(w)],w=w==null?void 0:w.map(x=>{var Ae,ne;return{menus:(Ae=x==null?void 0:x.split(bl))==null?void 0:Ae[0],groups:((ne=x==null?void 0:x.split(bl))==null?void 0:ne[1])??[]}}),y=O==null?void 0:O.filter(x=>{var Ae;return(x==null?void 0:x.filter)&&((Ae=x==null?void 0:x.filter)==null?void 0:Ae.includes("@Sync"))}),(y==null?void 0:y.length)>0&&(y=y==null?void 0:y.filter(x=>{var Ae,ne,Ue,Je;return(Je=(Ue=(ne=(Ae=la.analyzeSplitToContent(x,","))==null?void 0:Ae.find(ra=>ra==null?void 0:ra.includes("@Sync")))==null?void 0:ne.split(","))==null?void 0:Ue[0])==null?void 0:Je.includes("Yes")}),y=is(y)),u=O==null?void 0:O.filter(x=>{var Ae;return(x==null?void 0:x.filter)&&((Ae=x==null?void 0:x.filter)==null?void 0:Ae.includes("@Sync"))}),(u==null?void 0:u.length)>0&&(u=u==null?void 0:u.filter(x=>{var Ae,ne,Ue,Je;return(Je=(Ue=(ne=(Ae=la.analyzeSplitToContent(x,","))==null?void 0:Ae.find(ra=>ra==null?void 0:ra.includes("@Sync")))==null?void 0:ne.split(","))==null?void 0:Ue[1])==null?void 0:Je.includes("Yes")}),u=is(u)),m!==""&&(m!=null&&m.includes("@Sync"))&&(m==null?void 0:m[0])!=="("){let x=(Ba=m==null?void 0:m.replace("(",bl))==null?void 0:Ba.split(bl),Ae=x==null?void 0:x[1];if(Ae=Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1),Ae=la.analyzeSplitToContent(Ae,","),(P=(V=(Ia=Ae==null?void 0:Ae.find(ne=>ne==null?void 0:ne.includes("@Sync")))==null?void 0:Ia.split(","))==null?void 0:V[0])!=null&&P.includes("Yes")){let ne=x==null?void 0:x[0];ne=[{menus:(fe=(ee=ne==null?void 0:ne.split("*"))==null?void 0:ee[0])==null?void 0:fe.replaceAll(":","/"),groups:((ha=(ve=ne==null?void 0:ne.split("*"))==null?void 0:ve[1])==null?void 0:ha.split(":"))??[]}],y=[...y,...ne]}if((we=(se=(Ze=Ae==null?void 0:Ae.find(ne=>ne==null?void 0:ne.includes("@Sync")))==null?void 0:Ze.split(","))==null?void 0:se[1])!=null&&we.includes("Yes")){let ne=x==null?void 0:x[0];ne=[{menus:(ze=(ya=ne==null?void 0:ne.split("*"))==null?void 0:ya[0])==null?void 0:ze.replaceAll(":","/"),groups:((We=(_a=ne==null?void 0:ne.split("*"))==null?void 0:_a[1])==null?void 0:We.split(":"))??[]}],y=[...y,...ne]}}return{groupName:o,tableColumns:c,tableFilter:m,tableContents:s,columns:(W==null?void 0:W.secondColumns)??[],relatedQuotes:w,fatherSyncContents:y,sonSyncContents:u}},oc=(l,r)=>(l=l==null?void 0:l.map((n,o)=>{var s,c,m,f;if(Array.isArray(n))n=n==null?void 0:n.map(h=>{var y,u,w,N;return h!=null&&h.isMainPath||(((y=h==null?void 0:h.children)==null?void 0:y.length)>0?h.children=oc(h.children,r):((u=h==null?void 0:h.menus)==null?void 0:u.length)>0&&!((w=n==null?void 0:n[0])!=null&&w.isMainPath)&&(h.menus=(N=h.menus)==null?void 0:N.map((j,C)=>{var W,O;return((W=h.menus)==null?void 0:W.length)-1===C&&j===""&&(r==null?void 0:r.parentContent)+"/"!==((O=h.menus)==null?void 0:O.join("/"))&&(j=r==null?void 0:r.value),h}),h.bindMenus=h.menus)),h});else{if(o===0&&((s=n.menus)==null?void 0:s.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((c=n.menus)==null?void 0:c.length)>0&&!((m=l==null?void 0:l[0])!=null&&m.isMainPath)&&(n.menus=(f=n.menus)==null?void 0:f.map((h,y)=>{var u,w;return((u=n.menus)==null?void 0:u.length)-1===y&&h===""&&(r==null?void 0:r.parentContent)+"/"!==((w=n.menus)==null?void 0:w.join("/"))&&(h=r==null?void 0:r.value),h}),n.bindMenus=n.menus)}return n}),l),ep=(l,r)=>(l=l==null?void 0:l.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=oc(n.contents,r)),n)),l),yt=(l,r)=>{let n=l;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(o=>(o=yt(o,r),o)):n=n==null?void 0:n.map(o=>{var s,c;return o!=null&&o.children&&((s=o==null?void 0:o.children)==null?void 0:s.length)>0?o.children=yt(o==null?void 0:o.children,r):o!=null&&o.words&&((c=o==null?void 0:o.words)==null?void 0:c.length)>0&&(r!=null&&r.find(m=>{var f,h,y,u;return((u=(f=o==null?void 0:o.prop)==null?void 0:f.split("."))==null?void 0:u[((y=(h=o==null?void 0:o.prop)==null?void 0:h.split("."))==null?void 0:y.length)-1])===m}))&&(o.mainKey=!0),o}),n};let dr="$R";const ap=$.useUnit($.pinia),{selectTitle:vn}=$.storeToRefs(ap),mn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@SubType",value:"onInterfaceTypeContents",order:2},{key:"@If",value:"onConditionContents",order:4},{key:"@QuoteFatherSync",value:"onFatherPaceContents",order:1},{key:"@QuoteSonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1},{key:"@TextSize",value:"onTextSize",order:1},{key:"@TextRGBA",value:"onTextRGBA",order:1},{key:"@Position",value:"onPosition",order:4},{key:"@Size",value:"onSize",order:4},{key:"@ShowType",value:"onShowType",order:1},{key:"@StepName",value:"onStepName",order:1},{key:"@Step",value:"onStep",order:1},{key:"@BackGround",value:"onBackGround",order:1}];var to=(l=>(l[l.ORDINARY=1]="ORDINARY",l[l.BLOCK=2]="BLOCK",l[l.TEXT=3]="TEXT",l))(to||{});const lp=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;return r.push({key:"backGround",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},rp=l=>{const r=tc(l==null?void 0:l.filter);return r?sc(l==null?void 0:l.contents,{position:r}):l==null?void 0:l.contents},np=l=>{const r=tc(l==null?void 0:l.filter);return r?sc(l==null?void 0:l.contents,{size:r}):l==null?void 0:l.contents},op=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;const n=Number(l==null?void 0:l.filter);return r.push({key:"textSize",contents:Number.isNaN(n)?l==null?void 0:l.filter:n}),r}return l==null?void 0:l.contents},ip=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;return r.push({key:"textRGBA",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},tp=l=>{var n;return(l==null?void 0:l.filter.toUpperCase())==="ALL"||(l==null?void 0:l.filter.toUpperCase())==="NONE"?l==null?void 0:l.contents:(n=l==null?void 0:l.contents)==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.key)==="tableContents"&&(o.contents=(s=o.contents)==null?void 0:s.slice(0,parseInt(l==null?void 0:l.filter))),o})},sp=async l=>{var r,n,o,s,c,m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k,g,M,R,G,ue,Be,de,Z;if((l==null?void 0:l.filter)==="Random")return(r=l==null?void 0:l.contents)==null?void 0:r.map(ae=>((ae==null?void 0:ae.key)==="tableContents"&&(ae.contents=la.shuffle(ae.contents)),ae));if((l==null?void 0:l.filter)==="Auto"){let pe=(o=(n=l==null?void 0:l.contents)==null?void 0:n.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:o.contents;Array.isArray(pe==null?void 0:pe[0])&&(pe=pe==null?void 0:pe[0]),pe=ia.getColumnChild(pe);let ae=pe==null?void 0:pe.filter(De=>(De==null?void 0:De.filter)&&(De==null?void 0:De.filter)!==""),ce=new Map,Ee=[];ae==null||ae.forEach(De=>{var be,Ye;ce.get((be=De==null?void 0:De.menus)==null?void 0:be.join("/"))||(ce.set((Ye=De==null?void 0:De.menus)==null?void 0:Ye.join("/"),De),Ee.push(De))});let Ve=(c=(s=vn==null?void 0:vn.value)==null?void 0:s.find(De=>(De==null?void 0:De.condition)==="child"))==null?void 0:c.value,ye=Ee==null?void 0:Ee.map(De=>{var be,Ye,da;return De=(be=De==null?void 0:De.menus)==null?void 0:be.join("/"),(De==null?void 0:De[(De==null?void 0:De.length)-1])==="/"&&((da=(Ye=vn==null?void 0:vn.value)==null?void 0:Ye.find(Ma=>(Ma==null?void 0:Ma.condition)==="child"))==null?void 0:da.parentContent)+"/"!==De?De=De+Ve:(De==null?void 0:De[(De==null?void 0:De.length)-1])==="/"&&(De=De==null?void 0:De.slice(0,(De==null?void 0:De.length)-1)),De}),z=Ee==null?void 0:Ee.map(De=>De==null?void 0:De.groups),q=ye==null?void 0:ye.map(async De=>{let be=await Kr(De,!1);return{path:De,contents:be}});q=await Promise.all(q);let le=q==null?void 0:q.map((De,be)=>{var da,Ma,re,Ne,Te,qe,Re;let Ye=(da=De==null?void 0:De.contents)==null?void 0:da.filter(te=>{var Le,He;return(te==null?void 0:te.name)===((He=z==null?void 0:z[be])==null?void 0:He[((Le=z==null?void 0:z[be])==null?void 0:Le.length)-1])});return Ye=(Ne=(re=(Ma=Ye==null?void 0:Ye[0])==null?void 0:Ma.compData)==null?void 0:re.find(te=>(te==null?void 0:te.key)==="tableContents"))==null?void 0:Ne.contents,(De==null?void 0:De.path)===((qe=(Te=vn==null?void 0:vn.value)==null?void 0:Te.find(te=>(te==null?void 0:te.condition)==="child"))==null?void 0:qe.parentContent)&&(Ye=((Re=Ye==null?void 0:Ye.map(te=>{for(let Le in te)if(te[Le]===Ve)return te}))==null?void 0:Re.filter(te=>te))??[]),Ye??[]});if(le=le==null?void 0:le.map(De=>(De=De==null?void 0:De.map(be=>{var da;let Ye={};for(let Ma in be)if(ae!=null&&ae.find(re=>{var Ne,Te;return((Te=(Ne=re==null?void 0:re.words)==null?void 0:Ne[0])==null?void 0:Te.replaceAll("'",""))===Ma})){let re=(da=ae==null?void 0:ae.find(Ne=>{var Te,qe;return((qe=(Te=Ne==null?void 0:Ne.words)==null?void 0:Te[0])==null?void 0:qe.replaceAll("'",""))===Ma}))==null?void 0:da.prop;Ye[re]=be==null?void 0:be[Ma]}return Ye}),De)),le=la.cartesianProduct(le),Array.isArray(le==null?void 0:le[0])&&(le=le==null?void 0:le[0]),(le==null?void 0:le.length)>0&&((w=(f=(m=ae==null?void 0:ae[0])==null?void 0:m.menus)==null?void 0:f.join("/"))==null?void 0:w[((u=(y=(h=ae==null?void 0:ae[0])==null?void 0:h.menus)==null?void 0:y.join("/"))==null?void 0:u.length)-1])==="/")return(N=l==null?void 0:l.contents)==null?void 0:N.map(be=>{var Ye;return(be==null?void 0:be.key)==="tableContents"&&(le==null?void 0:le.length)>0&&(be.contents=((Ye=be.contents)==null?void 0:Ye.length)>0?be.contents:le),be})}if((l==null?void 0:l.filter)==="Manual"){let pe=[],ae=[],ce=(C=(j=l==null?void 0:l.contents)==null?void 0:j.find(z=>(z==null?void 0:z.key)==="filter"))==null?void 0:C.contents;(ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])===")"?ce=(O=(W=ce==null?void 0:ce.replace("(",dr))==null?void 0:W.split(dr))==null?void 0:O[0]:ce="",ce!==""&&(pe=((H=(U=ce==null?void 0:ce.split("*"))==null?void 0:U[0])==null?void 0:H.split(":"))??[],ae=((g=(k=(E=(S=(D=ce==null?void 0:ce.split("*"))==null?void 0:D[1])==null?void 0:S.replace("{",dr))==null?void 0:E.split(dr))==null?void 0:k[0])==null?void 0:g.split(":"))??[]);let Ee=(R=(M=l==null?void 0:l.contents)==null?void 0:M.find(z=>(z==null?void 0:z.key)==="filter"))==null?void 0:R.contents;Ee=(ue=(G=Ee==null?void 0:Ee.replace("(",dr))==null?void 0:G.split(dr))==null?void 0:ue[1],Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1);let Ve=(Be=l==null?void 0:l.contents)==null?void 0:Be.map(z=>{var q,le,De,be,Ye,da,Ma,re,Ne;return(z==null?void 0:z.key)==="header"&&((q=z==null?void 0:z.contents)!=null&&q.every(Te=>(Te==null?void 0:Te.mainKey)!==!0)&&Array.isArray(z==null?void 0:z.contents)&&!Array.isArray((le=z==null?void 0:z.contents)==null?void 0:le[0])?z.contents=(De=z==null?void 0:z.contents)==null?void 0:De.map((Te,qe)=>{var Re,te,Le;return Te!=null&&Te.isMainPath||(qe===0?(Te.mainKey=!0,Te.formType="Select",Te.bindMenus=pe,Te.groups=((Re=Te.groups)==null?void 0:Re.length)===0?ae:Te.groups,Te.words=((te=Te.words)==null?void 0:te.length)===0?[Te==null?void 0:Te.prop]:Te.words,Te.filter=Ee,(!(Te!=null&&Te.menus)||((Le=Te==null?void 0:Te.menus)==null?void 0:Le.length)===0)&&(Te.menus=pe)):(Te.mainKey=!1,Te.bindMenus=pe)),Te}):Array.isArray((be=z==null?void 0:z.contents)==null?void 0:be[0])&&((Ma=(da=(Ye=z==null?void 0:z.contents)==null?void 0:Ye[0])==null?void 0:da.filter(()=>(pe==null?void 0:pe.length)>0))==null?void 0:Ma.length)>0&&(z.contents[0]=(Ne=(re=z==null?void 0:z.contents)==null?void 0:re[0])==null?void 0:Ne.map((Te,qe)=>{var Re,te,Le;return Te!=null&&Te.isMainPath||(qe===0?(Te.mainKey=!0,Te.formType="Select",Te.bindMenus=pe,Te.groups=((Re=Te.groups)==null?void 0:Re.length)===0?ae:Te.groups,Te.words=((te=Te.words)==null?void 0:te.length)===0?[Te==null?void 0:Te.prop]:Te.words,Te.filter=Ee,(!(Te!=null&&Te.menus)||Array.isArray(Te==null?void 0:Te.menus)&&((Le=Te==null?void 0:Te.menus)==null?void 0:Le.length)===0)&&(pe==null?void 0:pe.length)>0&&(Te.menus=pe)):(Te.mainKey=!1,Te.bindMenus=pe)),Te}))),z}),ye=(de=Ve==null?void 0:Ve.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:de.contents;if(Array.isArray(ye==null?void 0:ye[0])&&(ye=ye==null?void 0:ye[0]),ye=ia.getColumnChild(ye),ye!=null&&ye.some(z=>{var q,le;return((le=z==null?void 0:z.menus)==null?void 0:le[((q=z==null?void 0:z.menus)==null?void 0:q.length)-1])===""})){let z=(Z=vn==null?void 0:vn.value)==null?void 0:Z.find(q=>(q==null?void 0:q.condition)==="child");Ve=ep(Ve,z)}return Ve}return l==null?void 0:l.contents},cp=async l=>{if((l==null?void 0:l.filter)==="Ordin"){let r=l==null?void 0:l.contents;return r.push({key:"enableWrap",contents:1}),r}if((l==null?void 0:l.filter)==="Block"){let r=l==null?void 0:l.contents;return r.push({key:"enableWrap",contents:2}),r}if((l==null?void 0:l.filter)==="Text"){let r=l==null?void 0:l.contents;return r.push({key:"enableWrap",contents:3}),r}return l==null?void 0:l.contents},up=l=>{var o,s,c,m;let r=l==null?void 0:l.filter;if(r!=null&&r.includes("*")&&(r="({"+((s=(o=r==null?void 0:r.replace("{",dr))==null?void 0:o.split(dr))==null?void 0:s[1])),r=(c=r==null?void 0:r.replaceAll("{",""))==null?void 0:c.replaceAll("}",""),(r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return l==null?void 0:l.contents;let n=ia.calculatorAndToOr(r);if((n==null?void 0:n.length)>0){let f=[];return n==null||n.forEach(y=>{let u={};for(let w in y){let N=w;N!=null&&N.includes("[")||(u[N]=y[w])}f.push(u)}),(m=l==null?void 0:l.contents)==null?void 0:m.map(y=>{var w,N,j;let u=(N=(w=l==null?void 0:l.contents)==null?void 0:w.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:N.contents;if(u=(j=ia.getEqualChild(u))==null?void 0:j.filter(C=>(C==null?void 0:C.label)!=="操作"),(y==null?void 0:y.key)==="tableContents"){let W=ia.tableToForm(y==null?void 0:y.contents,u);f==null||f.forEach(O=>{var U,H;for(let D in O)!((U=W==null?void 0:W[0])!=null&&U.find(S=>{var E;return(S==null?void 0:S.key)===D||((E=S==null?void 0:S.key)==null?void 0:E.includes(D))}))&&!(W!=null&&W.find(S=>{var E;return(S==null?void 0:S.key)===D||((E=S==null?void 0:S.key)==null?void 0:E.includes(D))}))||(((H=O[D])==null?void 0:H[0])!=="!"?W=W==null?void 0:W.filter(S=>{var E,k;return((E=S==null?void 0:S.find(g=>{var M;return(g==null?void 0:g.key)===D||((M=g==null?void 0:g.key)==null?void 0:M.includes(D))}))==null?void 0:E.value)===O[D]||Array.isArray(O==null?void 0:O[D])&&((k=O==null?void 0:O[D])==null?void 0:k.find(g=>{var M;return((M=S==null?void 0:S.find(R=>{var G;return(R==null?void 0:R.key)===D||((G=R==null?void 0:R.key)==null?void 0:G.includes(D))}))==null?void 0:M.value)===g}))}):W=W==null?void 0:W.filter(S=>{var E;return((E=S==null?void 0:S.find(k=>{var g;return(k==null?void 0:k.key)===D||((g=k==null?void 0:k.key)==null?void 0:g.includes(D))}))==null?void 0:E.value)!==O[D]}))}),(W==null?void 0:W.length)===0?y.contents=[]:y.contents=W==null?void 0:W.map(O=>{let U={};return O==null||O.forEach(H=>{U[H==null?void 0:H.key]=H==null?void 0:H.value}),U})}return y})}return l==null?void 0:l.contents},dp=l=>l==null?void 0:l.contents,pp=l=>l==null?void 0:l.contents,fp=l=>{var r,n,o,s;if((l==null?void 0:l.filter)!==""&&(l!=null&&l.filter)){let c=(o=(n=l==null?void 0:l.filter)==null?void 0:n.slice(1,((r=l==null?void 0:l.filter)==null?void 0:r.length)-1))==null?void 0:o.split(",");return(s=l==null?void 0:l.contents)==null?void 0:s.map(f=>((f==null?void 0:f.key)==="header"&&(f.contents=yt(f.contents,c)),f))}return l==null?void 0:l.contents},hp=l=>{var n;let r=(l==null?void 0:l.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.key)==="extraButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(m=>({label:m,prop:m}))),s}):l==null?void 0:l.contents},vp=l=>l==null?void 0:l.contents,mp=l=>{var n;let r=(l==null?void 0:l.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.key)==="rowButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(m=>({label:m,prop:m}))),s}):l==null?void 0:l.contents},yp=l=>{var n;let r=(l==null?void 0:l.filter)??"";if((r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""){let o=l==null?void 0:l.contents,s=(n=r==null?void 0:r.split(","))==null?void 0:n.map(c=>({label:c,prop:c}));return o.push({key:"bottomButton",contents:s}),o}return l==null?void 0:l.contents},gp=l=>{var r,n,o,s;if(((r=l==null?void 0:l.filter)==null?void 0:r[0])!=="["){const c=parseInt(l==null?void 0:l.filter);return!c||Number.isNaN(c)?l==null?void 0:l.contents:(n=l==null?void 0:l.contents)==null?void 0:n.map(f=>{var h;return(f==null?void 0:f.key)==="formContent"&&(f.contents=(h=f.contents)==null?void 0:h.map(y=>(y.width=c,y))),f})}if(((o=l==null?void 0:l.filter)==null?void 0:o[0])==="["){let c=Bo(l==null?void 0:l.filter),m=Array.isArray(c)?c.map(h=>parseInt(h)).filter(h=>!!h&&!Number.isNaN(h)):[];return m.length?(s=l==null?void 0:l.contents)==null?void 0:s.map(h=>{if((h==null?void 0:h.key)==="formContent"){const y=h.contents??[];h.contents=y.map((u,w)=>{const N=w+1;let j=0,C=0;for(let O=0;O<m.length;O++){if(C+=m[O],N<=C){j=O;break}O===m.length-1&&(j=m.length-1)}const W=m[j]||m[m.length-1]||1;return u.width=W,u})}return h}):l==null?void 0:l.contents}return l==null?void 0:l.contents},bp=l=>{var r;if((l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.filter;return(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(","),(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var c,m,f;return(s==null?void 0:s.key)==="header"&&(Array.isArray((c=s==null?void 0:s.contents)==null?void 0:c[0])?s.contents[0]=(f=s.contents[0])==null?void 0:f.map(h=>(n!=null&&n.find(y=>y===(h==null?void 0:h.prop))&&(h.fixed="left"),h)):s.contents=(m=s.contents)==null?void 0:m.map(h=>(n!=null&&n.find(y=>y===(h==null?void 0:h.prop))&&(h.fixed="left"),h))),s})}return l==null?void 0:l.contents},kp=l=>{var r;if((l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.filter;(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(",");const o=c=>(n!=null&&n.find(m=>m===(c==null?void 0:c.prop))&&(c.required=!0),c!=null&&c.children&&Array.isArray(c.children)&&(c.children=c.children.map(m=>o(m))),c);return(r=l==null?void 0:l.contents)==null?void 0:r.map(c=>{var m,f,h;return(c==null?void 0:c.key)==="header"&&(Array.isArray((m=c==null?void 0:c.contents)==null?void 0:m[0])?c.contents[0]=(h=c.contents[0])==null?void 0:h.map(y=>o(y)):c.contents=(f=c.contents)==null?void 0:f.map(y=>o(y))),c})}return l==null?void 0:l.contents},xp=async l=>{var o,s,c,m,f,h,y,u,w,N,j,C,W,O,U,H,D;const r=$.useUnit($.pinia),{chooseTitle:n}=$.storeToRefs(r);if((l==null?void 0:l.filter)==="true"){let S=await Kr(((s=(o=n==null?void 0:n.value)==null?void 0:o[0])==null?void 0:s.parentContent)??((m=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:m.relatedContent),!1),E=(h=(f=n==null?void 0:n.value)==null?void 0:f[0])==null?void 0:h.value;(u=(y=S==null?void 0:S[0])==null?void 0:y.compData)!=null&&u.find(R=>(R==null?void 0:R.key)==="header")?S=(w=S==null?void 0:S[0])==null?void 0:w.compData:S=(j=(N=S==null?void 0:S.filter(R=>{var G;return(G=R==null?void 0:R.compData)==null?void 0:G.find(ue=>(ue==null?void 0:ue.key)==="header")}))==null?void 0:N[0])==null?void 0:j.compData;let k=(C=S==null?void 0:S.find(R=>(R==null?void 0:R.key)==="header"))==null?void 0:C.contents;Array.isArray(k==null?void 0:k[0])&&(k=k==null?void 0:k[0]),k=((W=k==null?void 0:k.find(R=>R==null?void 0:R.isMainKey))==null?void 0:W.prop)??((O=k==null?void 0:k[0])==null?void 0:O.prop);let g=(H=(U=S==null?void 0:S.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:U.contents)==null?void 0:H.find(R=>(R==null?void 0:R[k])===E);return(D=l==null?void 0:l.contents)==null?void 0:D.map(R=>{var G;return(R==null?void 0:R.key)==="formContent"&&(R.contents=(G=R.contents)==null?void 0:G.map(ue=>(ue.value=g==null?void 0:g[ue==null?void 0:ue.prop],ue))),R})}return l==null?void 0:l.contents},wp=l=>{var r,n,o,s,c;if((r=l==null?void 0:l.extra)!=null&&r.row){let m=l==null?void 0:l.filter;if(m!=null&&m.includes("*")&&(m="({"+((o=(n=m==null?void 0:m.replace("{",dr))==null?void 0:n.split(dr))==null?void 0:o[1])),m=(s=m==null?void 0:m.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(m==null?void 0:m[0])!=="("&&(m="("+m+")"),m.slice(1,(m==null?void 0:m.length)-1)==="undefined")return l==null?void 0:l.contents;let f=ia.calculatorAndToOr(m),h=f==null?void 0:f[0],y=(c=l==null?void 0:l.extra)==null?void 0:c.row,u=[];for(let w in h)(h==null?void 0:h[w])===(y==null?void 0:y[w])?u.push(!0):u.push(!1);return u!=null&&u.every(w=>w===!0)?l==null?void 0:l.contents:[]}else return l==null?void 0:l.contents},_p=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"tab",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Sp=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"choice",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Ep=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"fixType",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Cp=l=>{var r;if(l!=null&&l.filter){let n=l==null?void 0:l.contents,o=l==null?void 0:l.filter;return(o==null?void 0:o[0])==="{"&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),o=(r=la.analyzeSplitToContent(o,","))==null?void 0:r.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),s)),n.push({key:"stepName",contents:o}),n}return l==null?void 0:l.contents},Dp=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"step",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},ic={onNumSlice:tp,onRandomContents:sp,onConditionContents:up,onFatherPaceContents:dp,onPaceContents:pp,onMainTagContents:fp,onButtonContents:hp,onPamButtonContents:vp,onRowButtonContents:mp,onRelated:xp,onRowNum:gp,onFixRow:bp,onReqItem:kp,onBottomButtonContents:yp,onConditionContent:wp,onTabs:_p,onSinChoice:Sp,onTextSize:op,onTextRGBA:ip,onPosition:rp,onSize:np,onShowType:Ep,onStepName:Cp,onStep:Dp,onInterfaceTypeContents:cp,onBackGround:lp},Np=async(l,r)=>{var c,m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k,g;let n="";if(((c=l==null?void 0:l.find(M=>(M==null?void 0:M.key)==="filter"))==null?void 0:c.contents)!==""&&(n=(m=l==null?void 0:l.find(M=>(M==null?void 0:M.key)==="filter"))==null?void 0:m.contents),n===""||!n)return l;(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n=(h=(f=n==null?void 0:n.replace("(",dr))==null?void 0:f.split(dr))==null?void 0:h[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let o=(y=la.analyzeSplitToContent(n,","))==null?void 0:y.map(M=>((M==null?void 0:M[(M==null?void 0:M.length)-1])===","&&(M=M==null?void 0:M.slice(0,(M==null?void 0:M.length)-1)),M!=null&&M.includes("(")||(M=M==null?void 0:M.replaceAll(":","=")),M)),s=l;for(let M in o){let R,G="";(u=o==null?void 0:o[M])!=null&&u.includes("(")?(R=(j=(N=(w=o==null?void 0:o[M])==null?void 0:w.replace("(",dr))==null?void 0:N.split(dr))==null?void 0:j[0],G="("+((O=(W=(C=o==null?void 0:o[M])==null?void 0:C.replace("(",dr))==null?void 0:W.split(dr))==null?void 0:O[1])):(R=(D=(H=(U=o==null?void 0:o[M])==null?void 0:U.replace("=",dr))==null?void 0:H.split(dr))==null?void 0:D[0],G=(k=(E=(S=o==null?void 0:o[M])==null?void 0:S.replace("=",dr))==null?void 0:E.split(dr))==null?void 0:k[1]);let ue=(g=mn==null?void 0:mn.find(Be=>(Be==null?void 0:Be.key)===R))==null?void 0:g.value;if(ue){const Be=ic[ue];s=await Be({contents:s,filter:G})}}return s},Nt=async(l,r)=>{var m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k,g,M,R;let n="";if(((m=l==null?void 0:l.find(G=>(G==null?void 0:G.key)==="filter"))==null?void 0:m.contents)!==""&&(n=(f=l==null?void 0:l.find(G=>(G==null?void 0:G.key)==="filter"))==null?void 0:f.contents),n===""||!n)return l;(n==null?void 0:n[0])===","&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n==null?void 0:n[0])==="@"||(n=(y=(h=n==null?void 0:n.replace("(",dr))==null?void 0:h.split(dr))==null?void 0:y[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let o=(u=la.analyzeSplitToContent(n,","))==null?void 0:u.map(G=>((G==null?void 0:G[(G==null?void 0:G.length)-1])===","&&(G=G==null?void 0:G.slice(0,(G==null?void 0:G.length)-1)),G!=null&&G.includes("(")||(G=G==null?void 0:G.replaceAll(":","=")),G)),s=l,c=new Map;o==null||o.forEach(G=>{var Be,de,Z;let ue=(Be=G==null?void 0:G.split("="))==null?void 0:Be[0];if(ue==="@MainPam"&&c.get(ue)){let pe=c.get(ue);pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1);let ae=(Z=(de=G==null?void 0:G.replace("{",dr))==null?void 0:de.split(dr))==null?void 0:Z[1];ae=pe+","+ae,c.set(ue,ae)}else c.set(ue,G)}),o=Array.from(c.values()),o=o==null?void 0:o.sort((G,ue)=>{var Be,de;return((Be=mn==null?void 0:mn.find(Z=>ue==null?void 0:ue.includes(Z==null?void 0:Z.key)))==null?void 0:Be.order)-((de=mn==null?void 0:mn.find(Z=>G==null?void 0:G.includes(Z==null?void 0:Z.key)))==null?void 0:de.order)});for(let G in o){let ue,Be="";(w=o==null?void 0:o[G])!=null&&w.includes("(")&&((N=o==null?void 0:o[G])!=null&&N.includes("@If"))?(ue=(W=(C=(j=o==null?void 0:o[G])==null?void 0:j.replace("(",dr))==null?void 0:C.split(dr))==null?void 0:W[0],Be="("+((H=(U=(O=o==null?void 0:o[G])==null?void 0:O.replace("(",dr))==null?void 0:U.split(dr))==null?void 0:H[1])):(ue=(E=(S=(D=o==null?void 0:o[G])==null?void 0:D.replace("=",dr))==null?void 0:S.split(dr))==null?void 0:E[0],Be=(M=(g=(k=o==null?void 0:o[G])==null?void 0:k.replace("=",dr))==null?void 0:g.split(dr))==null?void 0:M[1]);let de=(R=mn==null?void 0:mn.find(Z=>(Z==null?void 0:Z.key)===ue))==null?void 0:R.value;if(de){const Z=ic[de];s=await Z({contents:s,filter:Be,extra:r})}}return s},tc=l=>{if(l==null)return null;const r=String(l).trim();if(!r.startsWith("[")||!r.endsWith("]"))return null;const n=r.slice(1,-1).split(",").map(o=>Number(o.trim()));return n.length<2||n.some(o=>Number.isNaN(o))?null:[n[0],n[1]]},sc=(l,r)=>{var W,O,U,H,D;const n=Array.isArray(l)?l:[],o=n.find(S=>(S==null?void 0:S.key)==="formContent"),s=Array.isArray(o==null?void 0:o.contents)?o.contents:[],c=((W=n.find(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"))==null?void 0:W.contents)??{},m=(s==null?void 0:s[0])??{};let f=((O=r==null?void 0:r.position)==null?void 0:O[0])??(c==null?void 0:c._positionStartRow)??(m==null?void 0:m._positionStartRow),h=((U=r==null?void 0:r.position)==null?void 0:U[1])??(c==null?void 0:c._positionRowSpan)??(m==null?void 0:m._positionRowSpan);(!f||Number.isNaN(f)||f<1)&&(f=1),(!h||Number.isNaN(h)||h<1)&&(h=1);let y=((H=r==null?void 0:r.size)==null?void 0:H[0])??(c==null?void 0:c._sizeStart)??(m==null?void 0:m._sizeStart),u=((D=r==null?void 0:r.size)==null?void 0:D[1])??(c==null?void 0:c._sizeEnd)??(m==null?void 0:m._sizeEnd);(y===void 0||Number.isNaN(y))&&(y=0),(u===void 0||Number.isNaN(u))&&(u=1),y=Math.max(0,Math.min(1,y)),u=Math.max(0,Math.min(1,u)),u<=y&&(y=0,u=1);const w=u-y,N=Math.max(1,Math.round(1/w));let j=n.map(S=>{if((S==null?void 0:S.key)!=="formContent")return S;const E=Array.isArray(S==null?void 0:S.contents)?S.contents:[];return{...S,contents:E.map(k=>({...k,width:N,_positionStartRow:f,_positionRowSpan:h,_sizeStart:y,_sizeEnd:u}))}});const C={_positionStartRow:f,_positionRowSpan:h,_sizeStart:y,_sizeEnd:u};return j.some(S=>(S==null?void 0:S.key)==="_gridLayoutMeta")?j=j.map(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"?{...S,contents:C}:S):j.push({key:"_gridLayoutMeta",contents:C}),j};let hi="$R";const Bp=$.useUnit($.pinia),{selectTitle:Tp}=$.storeToRefs(Bp);let Ap=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],zp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Mp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Ip=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ss=async(l,r,n=!0)=>{let o=[],s=l==null?void 0:l.map(async c=>{var w,N,j,C,W,O,U,H,D,S,E,k,g,M,R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia,V,P,ee,fe,ve,ha,Ze,se,we,ya,ze,_a,We,x,Ae,ne,Ue,Je,ra,Oe,za,fa,Oa,Pa,ka,ua,ma,Ha,pl,$l,gl,Ol,$a,jl,Zl;let m=(C=(j=(N=(w=c==null?void 0:c.contents)==null?void 0:w.find(ja=>{var ba;return(ba=ja==null?void 0:ja.key)==null?void 0:ba.includes("struct")}))==null?void 0:N.value)==null?void 0:j[0])==null?void 0:C.类型,f=Object.values(c==null?void 0:c.name);f=f==null?void 0:f.reverse();let h=(W=c==null?void 0:c.contents)==null?void 0:W.map(ja=>ja==null?void 0:ja.key),y={comp:m,isShow:c==null?void 0:c.is_show,name:f==null?void 0:f[0],id:c==null?void 0:c.object_id,relatedTables:h,menuFilter:(O=c==null?void 0:c.filter)==null?void 0:O.menuFilter,status:c==null?void 0:c.status,fatherSyncContents:(U=c==null?void 0:c.filter)==null?void 0:U.fatherSyncs,relatedQuotes:(H=c==null?void 0:c.filter)==null?void 0:H.quotes,sonSyncContents:(D=c==null?void 0:c.filter)==null?void 0:D.sonSyncs,nameContents:(S=$.cloneDeep(f))==null?void 0:S.reverse()};for(let ja in f)parseInt(ja)>=1&&(y[`name${parseInt(ja)-1}`]=f[ja]);let u=Array.isArray((E=c==null?void 0:c.filter)==null?void 0:E.menuFilter)?(k=c==null?void 0:c.filter)==null?void 0:k.menuFilter:[];if(((g=u==null?void 0:u.filter(ja=>ja==null?void 0:ja.includes("@Filter")))==null?void 0:g.length)>0){let ja=u==null?void 0:u.filter(Me=>Me==null?void 0:Me.includes("@Filter"));ja=ja==null?void 0:ja[0],ja=(R=(M=ja==null?void 0:ja.replace("(",hi))==null?void 0:M.split(hi))==null?void 0:R[1],ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1),ja!=null&&ja.includes("*")&&(ja=(ue=(G=ja==null?void 0:ja.replace("{",hi))==null?void 0:G.split(hi))==null?void 0:ue[1],ja=ja==null?void 0:ja.replace("}","")),ja=ia.calculatorAndToOr(ja);let ba=(r==null?void 0:r.originPath)??"";(ba==null?void 0:ba[(ba==null?void 0:ba.length)-1])==="/"&&(ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1));let Da=await Kr(ba,!1),Ua=(Be=Da==null?void 0:Da.filter(Me=>(Me==null?void 0:Me.comp)==="Table"))==null?void 0:Be[0];Ua=(Z=(de=Ua==null?void 0:Ua.compData)==null?void 0:de.find(Me=>(Me==null?void 0:Me.key)==="tableContents"))==null?void 0:Z.contents;let al=(ae=(pe=Tp.value)==null?void 0:pe.find(Me=>(Me==null?void 0:Me.condition)==="child"))==null?void 0:ae.value;Ua=(ce=Ua==null?void 0:Ua.map(Me=>{for(let na in Me)if((Me==null?void 0:Me[na])===al)return Me}))==null?void 0:ce.filter(Me=>Me),Ua=Ua==null?void 0:Ua[0],ja=ja==null?void 0:ja[0];let Za=[];for(let Me in ja){let na="";Ga.isObject(Ua)&&(na=(Ve=(Ee=Object.keys(Ua))==null?void 0:Ee.filter(ke=>ke==null?void 0:ke.includes("."+Me)))==null?void 0:Ve[0]),na!==""&&(Ua!=null&&Ua[na])&&(ja==null?void 0:ja[Me])===(Ua==null?void 0:Ua[na])||Ua!=null&&Ua[Me]&&(ja==null?void 0:ja[Me])===(Ua==null?void 0:Ua[Me])?Za.push(!0):Za.push(!1)}if(Za!=null&&Za.some(Me=>Me===!1)&&((z=r==null?void 0:r.originPath)==null?void 0:z[((ye=r==null?void 0:r.originPath)==null?void 0:ye.length)-1])!=="/")return}if(m==="Table"||m==="Method"){let ja=((q=c==null?void 0:c.contents)==null?void 0:q.find(Ge=>{var X;return(X=Ge==null?void 0:Ge.key)==null?void 0:X.includes("content")}))||[],ba=[];y.comp="Table",ja.value=(le=ja==null?void 0:ja.value)==null?void 0:le.sort((Ge,X)=>parseInt(Ge==null?void 0:Ge.id)-parseInt(X==null?void 0:X.id)),ja.value=(De=ja==null?void 0:ja.value)==null?void 0:De.map(Ge=>{let X={};for(let aa in Ge)JSON.stringify(Ge==null?void 0:Ge[aa])==="{}"?X[aa]="":X[aa]=Ge==null?void 0:Ge[aa];return X}),ba.push({key:"tableContents",contents:ja==null?void 0:ja.value});let Da=(re=(Ma=(da=(Ye=(be=c==null?void 0:c.contents)==null?void 0:be.find(Ge=>{var X;return(X=Ge==null?void 0:Ge.key)==null?void 0:X.includes("struct")}))==null?void 0:Ye.value)==null?void 0:da[0])==null?void 0:Ma.结构)==null?void 0:re.contents;Array.isArray(Da==null?void 0:Da[0])?Da[0]=(Ne=Da==null?void 0:Da[0])==null?void 0:Ne.filter(Ge=>(Ge==null?void 0:Ge.prop)!=="sort"&&(Ge==null?void 0:Ge.prop)!=="relatedId"):Da=Da==null?void 0:Da.filter(Ge=>(Ge==null?void 0:Ge.prop)!=="sort"&&(Ge==null?void 0:Ge.prop)!=="relatedId"),ba.push({key:"header",contents:Da}),ba.push({key:"filter",contents:(Le=(te=(Re=(qe=(Te=c==null?void 0:c.contents)==null?void 0:Te.find(Ge=>{var X;return(X=Ge==null?void 0:Ge.key)==null?void 0:X.includes("struct")}))==null?void 0:qe.value)==null?void 0:Re[0])==null?void 0:te.引用)==null?void 0:Le.contents});let Ua=Ap,al=$.cloneDeep(zp);m==="Method"&&al.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Da==null?void 0:Da[0])&&((He=Da==null?void 0:Da[0])==null?void 0:He.prop)==="disabled"&&(Ua=Mp,al=Ip);const Za=["推力","真空","压力","温度","流量"],Me=y.name;Me&&Za.includes(Me)&&(Ua=[...Ua],Ua.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let na=[];if(!Array.isArray(Da==null?void 0:Da[0])&&(Da!=null&&Da.some(Ge=>{var X;return(Ge==null?void 0:Ge.calculatorFilter)&&((X=Ge==null?void 0:Ge.calculatorFilter)==null?void 0:X.includes("Manual"))}))){let Ge=(Ba=Da==null?void 0:Da.map(X=>X==null?void 0:X.calculatorFilter))==null?void 0:Ba.filter(X=>X&&(X==null?void 0:X.includes("Manual")));Ge==null||Ge.forEach(X=>{var Qe;let aa=la.analyzeSplitToContent(X,",");if(aa=aa==null?void 0:aa.map(Ie=>((Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1])===","&&(Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1)),Ie)),aa!=null&&aa.find(Ie=>(Ie==null?void 0:Ie.includes("Extent"))&&(Ie==null?void 0:Ie.includes("Row")))&&(aa!=null&&aa.find(Ie=>(Ie==null?void 0:Ie.includes("Button"))&&(Ie==null?void 0:Ie.includes(","))))){let Ie=aa==null?void 0:aa.find(xl=>xl==null?void 0:xl.includes("@FunctionButton"));Ie=(Qe=Ie==null?void 0:Ie.split("="))==null?void 0:Qe[1],Ie=Ie==null?void 0:Ie.slice(1,(Ie==null?void 0:Ie.length)-1),Ie=Ie==null?void 0:Ie.split(","),Ie=Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1],na.push(Ie)}}),na=[...new Set(na)],na=na==null?void 0:na.map(X=>({label:X,prop:X,type:"methodButton"}))}else if(Array.isArray(Da==null?void 0:Da[0])&&((Ia=ia.getColumnChild(Da==null?void 0:Da[0]))!=null&&Ia.some(Ge=>{var X;return(Ge==null?void 0:Ge.calculatorFilter)&&((X=Ge==null?void 0:Ge.calculatorFilter)==null?void 0:X.includes("Manual"))}))){let Ge=(P=(V=ia.getColumnChild(Da==null?void 0:Da[0]))==null?void 0:V.map(X=>X==null?void 0:X.calculatorFilter))==null?void 0:P.filter(X=>X&&(X==null?void 0:X.includes("Manual")));Ge==null||Ge.forEach(X=>{var Qe;let aa=la.analyzeSplitToContent(X,",");if(aa=aa==null?void 0:aa.map(Ie=>((Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1])===","&&(Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1)),Ie)),aa!=null&&aa.find(Ie=>(Ie==null?void 0:Ie.includes("Extent"))&&(Ie==null?void 0:Ie.includes("Row")))&&(aa!=null&&aa.find(Ie=>(Ie==null?void 0:Ie.includes("Button"))&&(Ie==null?void 0:Ie.includes(","))))){let Ie=aa==null?void 0:aa.find(xl=>xl==null?void 0:xl.includes("@FunctionButton"));Ie=(Qe=Ie==null?void 0:Ie.split("="))==null?void 0:Qe[1],Ie=Ie==null?void 0:Ie.slice(1,(Ie==null?void 0:Ie.length)-1),Ie=Ie==null?void 0:Ie.split(","),Ie=Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1],na.push(Ie)}}),na=[...new Set(na)],na=na==null?void 0:na.map(X=>({label:X,prop:X,type:"methodButton"}))}ba.push({key:"extraButton",contents:Ua}),ba.push({key:"rowButton",contents:[...al,...na]}),y.compData=await Nt(ba,r),(ee=y.compData)!=null&&ee.find(Ge=>(Ge==null?void 0:Ge.key)==="tab")&&(y.tab=(ve=(fe=y.compData)==null?void 0:fe.find(Ge=>(Ge==null?void 0:Ge.key)==="tab"))==null?void 0:ve.contents),(ha=y.compData)!=null&&ha.find(Ge=>(Ge==null?void 0:Ge.key)==="step")&&(y.step=(se=(Ze=y.compData)==null?void 0:Ze.find(Ge=>(Ge==null?void 0:Ge.key)==="step"))==null?void 0:se.contents),(we=y.compData)!=null&&we.find(Ge=>(Ge==null?void 0:Ge.key)==="choice")&&(y.choice=(ze=(ya=y.compData)==null?void 0:ya.find(Ge=>(Ge==null?void 0:Ge.key)==="choice"))==null?void 0:ze.contents);let ke="",Ta=(_a=y==null?void 0:y.compData)==null?void 0:_a.filter(Ge=>(Ge==null?void 0:Ge.key)==="fixType");(Ta==null?void 0:Ta.length)>0&&n&&(ke=(We=Ta==null?void 0:Ta[0])==null?void 0:We.contents,y.comp=ke)}else if(m==="Form"){let ja=[],ba=(ne=(Ae=(x=c==null?void 0:c.contents)==null?void 0:x.find(Me=>{var na;return(na=Me==null?void 0:Me.key)==null?void 0:na.includes("content")}))==null?void 0:Ae.value)==null?void 0:ne[0],Da=[],Ua=Array.isArray((Ue=c==null?void 0:c.filter)==null?void 0:Ue.menuFilter)?(Je=c==null?void 0:c.filter)==null?void 0:Je.menuFilter:[];Ua==null||Ua.forEach(Me=>{if(Me!=null&&Me.includes("@Param(Hide=Yes, prop=")||Me!=null&&Me.includes("@Interface(Hide=Yes, prop=")){const na=Me==null?void 0:Me.match(/prop=([^,)]+)/);na!=null&&na[1]&&Da.push(na==null?void 0:na[1])}});let al=(Oa=(fa=(za=(Oe=(ra=c==null?void 0:c.contents)==null?void 0:ra.find(Me=>{var na;return(na=Me==null?void 0:Me.key)==null?void 0:na.includes("struct")}))==null?void 0:Oe.value)==null?void 0:za[0])==null?void 0:fa.结构)==null?void 0:Oa.contents,Za=(Pa=al==null?void 0:al.map(Me=>(Me.value=ba==null?void 0:ba[Me==null?void 0:Me.prop],Me)))==null?void 0:Pa.filter(Me=>(Me==null?void 0:Me.prop)!=="sort"&&(Me==null?void 0:Me.prop)!=="relatedId");Za=Za==null?void 0:Za.map(Me=>(Da!=null&&Da.includes(Me==null?void 0:Me.prop)&&(Me.isHideInForm=!0),Me)),ja.push({key:"filter",contents:(pl=(Ha=(ma=(ua=(ka=c==null?void 0:c.contents)==null?void 0:ka.find(Me=>{var na;return(na=Me==null?void 0:Me.key)==null?void 0:na.includes("struct")}))==null?void 0:ua.value)==null?void 0:ma[0])==null?void 0:Ha.引用)==null?void 0:pl.contents}),ja.push({key:"formContent",contents:Za}),ja.push({key:"paramHideProps",contents:Da}),y.compData=await Np(ja),($l=y.compData)!=null&&$l.find(Me=>(Me==null?void 0:Me.key)==="tab")&&(y.tab=(Ol=(gl=y.compData)==null?void 0:gl.find(Me=>(Me==null?void 0:Me.key)==="tab"))==null?void 0:Ol.contents),($a=y.compData)!=null&&$a.find(Me=>(Me==null?void 0:Me.key)==="step")&&(y.step=(Zl=(jl=y.compData)==null?void 0:jl.find(Me=>(Me==null?void 0:Me.key)==="step"))==null?void 0:Zl.contents)}return y});return o=await Promise.all(s),o},Op=$.useLoginState($.pinia),{loginUserInfo:So}=$.storeToRefs(Op),gt=async(l,r,n="Manual",o=[])=>{var h;let s=l,c;Array.isArray(r==null?void 0:r[0])?c=ia.getColumnChild(r==null?void 0:r[0]):c=r;let m=(h=c==null?void 0:c.filter(y=>{var u;return(y==null?void 0:y.calculatorFilter)&&((u=y==null?void 0:y.calculatorFilter)==null?void 0:u.includes(n))||(y==null?void 0:y.calculatorFilter)===""&&(y==null?void 0:y.functionName)}))==null?void 0:h.map(y=>({prop:y==null?void 0:y.prop,label:y==null?void 0:y.label,methods:y==null?void 0:y.calculatorFilter,functionName:y==null?void 0:y.functionName,functionRelatedWords:y==null?void 0:y.functionRelatedWords})),f=s==null?void 0:s.map(async y=>(y=await Pp(y,m,c,n,s,o),y));return f=await Promise.all(f),f},Lp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c;return Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=ia.getValueToObjectValue(r,ia.getColumnContents(s))),n==null||n.forEach(m=>{var f;if(r!=null&&r[m]){let h=r==null?void 0:r[m];c=c?h?la.isEqual(h.toString(),c.toString()):void 0:h}else{let h=(f=s==null?void 0:s.find(u=>(u==null?void 0:u.label)===m))==null?void 0:f.prop,y=(r==null?void 0:r[h])??0;c=c?y?la.isEqual(y.toString(),c.toString()):void 0:y}}),r[o]=c===void 0?void 0:c?1:0,r},kr=l=>{const[r,n,o]=$.cloneDeep(l).split(":").map(Number);let s=+l;return!l||!(l!=null&&l.includes(":"))?s:(r??0)*3600+(n??0)*60+(o??0)},Xn=l=>{const r=c=>c.toString().padStart(2,"0"),n=Math.floor(l/3600),o=Math.floor(l%3600/60),s=l%60;return`${r(n)}:${r(o)}:${parseInt(r(s))}`},$p=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,f=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=ia.getValueToObjectValue(r,ia.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,w,N,j,C,W,O,U;if(r!=null&&r[h]){if(c==="Row")if(!((u=((y=r==null?void 0:r[h])==null?void 0:y.toString())??"")!=null&&u.includes(":"))&&!((w=f==null?void 0:f.toString())!=null&&w.includes(":"))){let H=+(r==null?void 0:r[h]);f=f+H}else f=kr(f.toString())+kr((N=r==null?void 0:r[h])==null?void 0:N.toString()),f=Xn(f)}else if(c==="Row"){let H=(j=s==null?void 0:s.find(D=>(D==null?void 0:D.label)===h))==null?void 0:j.prop;if(!((W=Number.isNaN(r==null?void 0:r[H])?"":(C=r==null?void 0:r[H])==null?void 0:C.toString())!=null&&W.includes(":"))&&!((O=f==null?void 0:f.toString())!=null&&O.includes(":"))){let D=+((r==null?void 0:r[H])??0);f=f+D}else f=kr(f==null?void 0:f.toString())+kr((U=(r==null?void 0:r[H])??0)==null?void 0:U.toString()),f=Xn(f)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(w=>{var N;return(w==null?void 0:w[y])??(w==null?void 0:w[(N=s==null?void 0:s.find(j=>(j==null?void 0:j.label)===y))==null?void 0:N.prop])});h=[...h,...u]}),f=h.reduce((y,u)=>{let w=0;Number.isNaN(y)||(w=+y);let N=0;return Number.isNaN(u)||(N=+u),w+N},0)}return r[o]=f,r},Rp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,f=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=ia.getValueToObjectValue(r,ia.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,w,N,j,C,W;if(r!=null&&r[h]){if(c==="Row")if(!((u=(y=r==null?void 0:r[h])==null?void 0:y.toString())!=null&&u.includes(":"))&&!((w=f==null?void 0:f.toString())!=null&&w.includes(":"))){let O=+(r==null?void 0:r[h]);f=f===0?f+O:f-O}else f=f===0?kr(f.toString())+kr(r==null?void 0:r[h].toString()):kr(f.toString())-kr(r==null?void 0:r[h].toString()),f=Xn(f)}else if(c==="Row"){let O=(N=s==null?void 0:s.find(U=>(U==null?void 0:U.label)===h))==null?void 0:N.prop;if(!((C=Number.isNaN(r==null?void 0:r[O])?"":(j=r==null?void 0:r[O])==null?void 0:j.toString())!=null&&C.includes(":"))&&!((W=f==null?void 0:f.toString())!=null&&W.includes(":"))){let U=+((r==null?void 0:r[O])??0);f=f===0?f+U:f-U}else f=f===0?kr(f.toString())+kr(((r==null?void 0:r[O])??0).toString()):kr(f.toString())-kr(((r==null?void 0:r[O])??0).toString()),f=Xn(f)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(w=>{var N;return(w==null?void 0:w[y])??(w==null?void 0:w[(N=s==null?void 0:s.find(j=>(j==null?void 0:j.label)===y))==null?void 0:N.prop])});h=[...h,...u]}),f=h.reduce((y,u)=>{let w=0;Number.isNaN(y)||(w=+y);let N=0;return Number.isNaN(u)||(N=+u),w-N},0)}return r[o]=f,r},Vp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,f=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=ia.getValueToObjectValue(r,ia.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,w,N,j,C,W;if(r!=null&&r[h]){if(c==="Row")if(!((u=(y=r==null?void 0:r[h])==null?void 0:y.toString())!=null&&u.includes(":"))&&!((w=f==null?void 0:f.toString())!=null&&w.includes(":"))){let O=+(r==null?void 0:r[h]);f=f===0?f+O:f*O}else f=f===0?kr(f.toString())+kr(r==null?void 0:r[h].toString()):kr(f.toString())*kr(r==null?void 0:r[h].toString()),f=Xn(f)}else if(c==="Row"){let O=(N=s==null?void 0:s.find(U=>(U==null?void 0:U.label)===h))==null?void 0:N.prop;if(!(r!=null&&r[O]))f=void 0;else if(!((C=Number.isNaN(r==null?void 0:r[O])?"":(j=r==null?void 0:r[O])==null?void 0:j.toString())!=null&&C.includes(":"))&&!((W=f==null?void 0:f.toString())!=null&&W.includes(":"))){let U=+((r==null?void 0:r[O])??0);f=f===0?f+U:f*U}else f=f===0?kr(f.toString())+kr(((r==null?void 0:r[O])??0).toString()):kr(f.toString())*kr(((r==null?void 0:r[O])??0).toString()),f=Xn(f)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(w=>{var N;return(w==null?void 0:w[y])??(w==null?void 0:w[(N=s==null?void 0:s.find(j=>(j==null?void 0:j.label)===y))==null?void 0:N.prop])});h=[...h,...u]}),f=h.reduce((y,u)=>{let w=0;Number.isNaN(y)||(w=+y);let N=0;return Number.isNaN(u)||(N=+u),w*N},0)}return r[o]=f,r},Fp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,o=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,f=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=ia.getValueToObjectValue(r,ia.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,w,N,j,C,W;if(r!=null&&r[h]){if(c==="Row")if(!((u=(y=r==null?void 0:r[h])==null?void 0:y.toString())!=null&&u.includes(":"))&&!((w=f==null?void 0:f.toString())!=null&&w.includes(":"))){let O=+(r==null?void 0:r[h]);f=f===0?f+O:f/O}else f=f===0?kr(f.toString())+kr(r==null?void 0:r[h].toString()):kr(f.toString())/kr(r==null?void 0:r[h].toString()),f=Xn(f)}else if(c==="Row"){let O=(N=s==null?void 0:s.find(U=>(U==null?void 0:U.label)===h))==null?void 0:N.prop;if(!((C=Number.isNaN(r==null?void 0:r[O])?"":(j=r==null?void 0:r[O])==null?void 0:j.toString())!=null&&C.includes(":"))&&!((W=f==null?void 0:f.toString())!=null&&W.includes(":"))){let U=+((r==null?void 0:r[O])??0);f=f===0?f+U:f/U}else f=f===0?kr(f.toString())+kr(((r==null?void 0:r[O])??0).toString()):kr(f.toString())/kr(((r==null?void 0:r[O])??0).toString()),f=Xn(f)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(w=>{var N;return(w==null?void 0:w[y])??(w==null?void 0:w[(N=s==null?void 0:s.find(j=>(j==null?void 0:j.label)===y))==null?void 0:N.prop])});h=[...h,...u]}),f=h.reduce((y,u)=>{let w=0;Number.isNaN(y)||(w=+y);let N=0;return Number.isNaN(u)||(N=+u),w/N},0)}return r[o]=f.toFixed(2),r},vi={Sum:$p,Substract:Rp,Multiple:Vp,Divide:Fp,Compare:Lp},Pp=async(l,r,n,o="Auto",s,c=[])=>{var u,w,N,j,C,W,O,U,H,D,S,E,k,g,M,R,G,ue,Be,de,Z;let m=l,f=[],h=await $.getPageDataApi({platId:parseInt((u=So==null?void 0:So.value)==null?void 0:u.plat_id),pageName:"menu"});h=(j=(N=(w=h==null?void 0:h.data)==null?void 0:w.result)==null?void 0:N.filter(pe=>(pe==null?void 0:pe.property_name)===""))==null?void 0:j[0];let y=[];if(h!=null&&h.object_name){h=h==null?void 0:h.object_name;let pe=await $.getPageDataApi({platId:parseInt((C=So==null?void 0:So.value)==null?void 0:C.plat_id),pageName:h});pe=(D=(H=(U=(O=(W=pe==null?void 0:pe.data)==null?void 0:W.result)==null?void 0:O[0])==null?void 0:U.contents)==null?void 0:H.find(ae=>{var ce;return(ce=ae==null?void 0:ae.key)==null?void 0:ce.includes("content")}))==null?void 0:D.value,f=(S=pe==null?void 0:pe.map(ae=>({functionName:ae==null?void 0:ae.函数名称,functionContent:ae==null?void 0:ae.输出值})))==null?void 0:S.filter(ae=>(ae==null?void 0:ae.functionContent)!==""),f==null||f.forEach(ae=>{y.push(ae.functionName),vi[ae.functionName]=new Function("return "+ae.functionContent)()})}if((r==null?void 0:r.length)===0)return m;for(let pe in r){let ae=(E=r==null?void 0:r[pe])==null?void 0:E.functionName;const ce=vi==null?void 0:vi[ae];let Ee=(k=r==null?void 0:r[pe])==null?void 0:k.methods;if(Ee=la.analyzeSplitToContent(Ee,","),console.log(Ee),(g=Ee==null?void 0:Ee.find(Ve=>Ve==null?void 0:Ve.includes("@FunctionType")))!=null&&g.includes(o)||(Ee==null?void 0:Ee.length)===0){let Ve=((G=(R=(M=Ee==null?void 0:Ee.find(ye=>ye==null?void 0:ye.includes("@FunctionExtent")))==null?void 0:M.replace(":","="))==null?void 0:R.split("="))==null?void 0:G[1])??[];if(await new Function("return ")(),(y==null?void 0:y.length)>0&&y.find(ye=>ye===ae)){let ye="";try{let q=(ue=r==null?void 0:r[pe])==null?void 0:ue.functionRelatedWords,le=(c==null?void 0:c.length)>0?c==null?void 0:c.map(be=>{var Ye;return be==null?void 0:be[(Ye=r==null?void 0:r[pe])==null?void 0:Ye.prop]}):["0"];le=le==null?void 0:le.map(be=>be==null?void 0:be.slice((be==null?void 0:be.length)-5,be==null?void 0:be.length)),le=le==null?void 0:le.map(be=>la.isNumber(parseInt(be))&&parseInt(be)?parseInt(be):0);let De=Math.max(...le);q=q==null?void 0:q.map(be=>{if(be!=null&&be.includes("'"))return be==null?void 0:be.replaceAll("'","");if(be!=null&&be.includes("@"))return De+1;{let Ye=Object.keys(m);return be=(m==null?void 0:m[be])??(m==null?void 0:m[Ye==null?void 0:Ye.find(da=>da==null?void 0:da.includes("."+be))]),be}}),ye=ce(...q)}catch(q){Ga.ElMessage.warning("关联数据出现错误,"+q.message)}let z=(Be=r==null?void 0:r[pe])==null?void 0:Be.prop;m[z]=ye}else m=ce({contents:m,valueString:(de=r==null?void 0:r[pe])==null?void 0:de.functionRelatedWords,prop:(Z=r==null?void 0:r[pe])==null?void 0:Z.prop,headers:n,typeString:Ve,allContents:s})}}return m},jp=$.useLoginState($.pinia),{loginUserInfo:Zr}=$.storeToRefs(jp),Hp=$.useMenuState($.pinia),{activeMenuPath:cs,currentMenuPath:mi}=$.storeToRefs(Hp),cc=$.useUnit($.pinia);let us="$R";const{selectTitle:Do}=$.storeToRefs(cc),uc=async(l,r)=>{var m,f,h,y,u,w,N,j,C,W,O,U,H;let n=cs.value,o="",s=((m=Do==null?void 0:Do.value)==null?void 0:m.find(D=>(D==null?void 0:D.condition)==="child"&&!(D!=null&&D.relatedContent)))??void 0;(l==null?void 0:l.length)===0||(n=r?n:(f=l==null?void 0:l[0])==null?void 0:f.object_name,o=(h=l==null?void 0:l[0])==null?void 0:h.father_name);let c=[];if(o!==""){let D=o;(D==null?void 0:D[(D==null?void 0:D.length)-1])==="/"&&(D=D==null?void 0:D.slice(0,(D==null?void 0:D.length)-1));let S=await Kr(D,!1);S=(y=S==null?void 0:S[0])==null?void 0:y.compData;let E=(u=S==null?void 0:S.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:u.contents;E=((w=E==null?void 0:E.find(g=>g==null?void 0:g.isMainKey))==null?void 0:w.prop)??((N=E==null?void 0:E[0])==null?void 0:N.prop);let k=(C=(j=S==null?void 0:S.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:j.contents)==null?void 0:C.map(g=>({label:g==null?void 0:g[E],value:g==null?void 0:g[E]}));c=(W=o==null?void 0:o.split("/"))==null?void 0:W.map(g=>(g===""?s?(s.isShow=!0,g=s):g={value:g,condition:"child",options:k,parentContent:(o==null?void 0:o[(o==null?void 0:o.length)-1])==="/"?o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1):o,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(n!==""){let D=(O=n==null?void 0:n.split("/"))==null?void 0:O.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((U=D==null?void 0:D[0])==null?void 0:U.value)===((H=c==null?void 0:c[0])==null?void 0:H.value)&&(D=D==null?void 0:D.filter((S,E)=>E!==0)),c=[...c??[],...D??[]]}o===""&&s&&((s==null?void 0:s.parentContent)!==cs.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&c.push(s)),cc.setSelectTitle(c)},Up=async l=>{var c,m,f,h,y,u,w,N,j;let r=await $.getPageDataApi({platId:parseInt((c=Zr==null?void 0:Zr.value)==null?void 0:c.plat_id),pageName:"menu"}),n=(m=r==null?void 0:r.data)==null?void 0:m.result,o=(u=(y=(h=(f=l==null?void 0:l.filter(C=>(C==null?void 0:C.comp)==="Table"))==null?void 0:f[0])==null?void 0:h.compData)==null?void 0:y.find(C=>(C==null?void 0:C.key)==="filter"))==null?void 0:u.contents;o=(j=(N=(w=o==null?void 0:o.replace("(",us))==null?void 0:w.split(us))==null?void 0:N[0])==null?void 0:j.replaceAll(":","/");let s=n==null?void 0:n.filter(C=>{var W;return(C==null?void 0:C.object_name)===mi.value+"/"||((W=mi.value)==null?void 0:W.includes(o))&&o+"/"===(C==null?void 0:C.object_name)});return(s==null?void 0:s.length)>0&&(l=l==null?void 0:l.map(C=>{var W;return(C==null?void 0:C.comp)==="Table"&&(C.compData=(W=C==null?void 0:C.compData)==null?void 0:W.map(O=>{var U,H,D;return(O==null?void 0:O.key)==="header"&&(Array.isArray((U=O.contents)==null?void 0:U[0])?O.contents[0]=(D=O.contents[0])==null?void 0:D.map((S,E)=>{var k;return E===0&&(S.isExistChild=!0,(k=mi.value)!=null&&k.includes(o)&&(S.fatherPath=o)),S}):O.contents=(H=O.contents)==null?void 0:H.map((S,E)=>{var k;return E===0&&(S.isExistChild=!0,(k=mi.value)!=null&&k.includes(o)&&(S.fatherPath=o)),S})),O})),C})),l},Kr=async(l,r,n={})=>{var m,f,h,y,u,w,N,j,C,W,O,U;let o=await $.getPageDataApi({platId:parseInt((m=Zr==null?void 0:Zr.value)==null?void 0:m.plat_id),pageName:l}),s=(f=o==null?void 0:o.data)==null?void 0:f.result;if((s==null?void 0:s.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==l){let H=await $.getPageDataApi({platId:parseInt((h=Zr==null?void 0:Zr.value)==null?void 0:h.plat_id),pageName:n==null?void 0:n.originPath});if(((u=(y=H==null?void 0:H.data)==null?void 0:y.result)==null?void 0:u.length)>0){let D=await ss((w=H==null?void 0:H.data)==null?void 0:w.result,n,!1);D=D==null?void 0:D.map(async k=>{var R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia;let g=[],M=(R=Object.keys(k))==null?void 0:R.filter(V=>(V==null?void 0:V.includes("name"))&&V!=="nameContents");for(let V in k)M!=null&&M.find(P=>P===V)&&g.push(k==null?void 0:k[V]);if(g=g.reverse(),(k==null?void 0:k.comp)==="Table"){let V=(Be=(ue=(G=k==null?void 0:k.compData)==null?void 0:G.find(ee=>(ee==null?void 0:ee.key)==="tableContents"))==null?void 0:ue.contents)==null?void 0:Be.map(ee=>{let fe={};for(let ve in ee)ve!=="id"&&ve!=="create_time"&&ve!=="update_time"&&ve!=="sort"&&ve!=="create_user_id"&&ve!=="update_user_id"&&ve!=="department_id"&&ve!=="relatedId"&&(fe[ve]=ee==null?void 0:ee[ve]);return ee=Object.values(fe),ee}),P=(Z=(de=k==null?void 0:k.compData)==null?void 0:de.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Z.contents;if(Array.isArray(P==null?void 0:P[0])?(P[0].push({label:"排序",prop:"sort"}),P[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(pe=P[0])!=null&&pe.find(ee=>(ee==null?void 0:ee.prop)==="disabled")&&(P[0]=(ae=P[0])==null?void 0:ae.filter(ee=>(ee==null?void 0:ee.prop)!=="disabled"),P[0].unshift({label:"",prop:"disabled",sortable:!1}))):(P||(P=[]),P.push({label:"排序",prop:"sort"}),P.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),P!=null&&P.find(ee=>(ee==null?void 0:ee.prop)==="disabled")&&(P=P==null?void 0:P.filter(ee=>(ee==null?void 0:ee.prop)!=="disabled"),P.unshift({label:"",prop:"disabled",sortable:!1}))),P!=null&&P.some(ee=>{var fe;return(ee==null?void 0:ee.calculatorFilter)&&((fe=ee==null?void 0:ee.calculatorFilter)==null?void 0:fe.includes("Auto"))})&&(V=await gt(V,P,"Auto"),V=V==null?void 0:V.map(ee=>Object.values(ee))),k!=null&&k.fatherSyncContents){Array.isArray((ce=k==null?void 0:k.fatherSyncContents)==null?void 0:ce[0])&&(k.fatherSyncContents=(Ee=k==null?void 0:k.fatherSyncContents)==null?void 0:Ee[0]);let ee=(Ve=Do.value)==null?void 0:Ve.find(fe=>(fe==null?void 0:fe.condition)==="child");k.fatherSyncContents=(ye=k==null?void 0:k.fatherSyncContents)==null?void 0:ye.map(fe=>{var ve,ha,Ze,se,we,ya;return((ha=fe==null?void 0:fe.menus)==null?void 0:ha[((ve=fe==null?void 0:fe.menus)==null?void 0:ve.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(ee==null?void 0:ee.value):((se=fe==null?void 0:fe.menus)==null?void 0:se[((Ze=fe==null?void 0:fe.menus)==null?void 0:Ze.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(ya=fe.menus)==null?void 0:ya.slice(0,((we=fe.menus)==null?void 0:we.length)-1)),fe})}if(k!=null&&k.sonSyncContents){Array.isArray((z=k==null?void 0:k.sonSyncContents)==null?void 0:z[0])&&(k.sonSyncContents=(q=k==null?void 0:k.sonSyncContents)==null?void 0:q[0]);let ee=(le=Do.value)==null?void 0:le.find(fe=>(fe==null?void 0:fe.condition)==="child");k.sonSyncContents=(De=k==null?void 0:k.sonSyncContents)==null?void 0:De.map(fe=>{var ve,ha,Ze,se,we,ya;return((ha=fe==null?void 0:fe.menus)==null?void 0:ha[((ve=fe==null?void 0:fe.menus)==null?void 0:ve.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(ee==null?void 0:ee.value):((se=fe==null?void 0:fe.menus)==null?void 0:se[((Ze=fe==null?void 0:fe.menus)==null?void 0:Ze.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(ya=fe.menus)==null?void 0:ya.slice(0,((we=fe.menus)==null?void 0:we.length)-1)),fe})}if(k!=null&&k.relatedQuotes){Array.isArray((be=k==null?void 0:k.relatedQuotes)==null?void 0:be[0])&&(k.relatedQuotes=(Ye=k==null?void 0:k.relatedQuotes)==null?void 0:Ye[0]);let ee=(da=Do.value)==null?void 0:da.find(fe=>(fe==null?void 0:fe.condition)==="child");k.relatedQuotes=(Ma=k==null?void 0:k.relatedQuotes)==null?void 0:Ma.map(fe=>{var ve,ha,Ze,se,we,ya;return((ha=fe==null?void 0:fe.menus)==null?void 0:ha[((ve=fe==null?void 0:fe.menus)==null?void 0:ve.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(ee==null?void 0:ee.value):((se=fe==null?void 0:fe.menus)==null?void 0:se[((Ze=fe==null?void 0:fe.menus)==null?void 0:Ze.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(ya=fe.menus)==null?void 0:ya.slice(0,((we=fe.menus)==null?void 0:we.length)-1)),fe})}k={filter:(Ne=(re=k==null?void 0:k.compData)==null?void 0:re.find(ee=>(ee==null?void 0:ee.key)==="filter"))==null?void 0:Ne.contents,key:k==null?void 0:k.comp,name:g,tableColumns:P,tableContents:V,menuFilter:k==null?void 0:k.menuFilter,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents}}else{let V=(Re=(qe=(Te=k==null?void 0:k.compData)==null?void 0:Te.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:qe.contents)==null?void 0:Re.map(ee=>(ee==null?void 0:ee.value)??"");V=[V];let P=(He=(Le=(te=k==null?void 0:k.compData)==null?void 0:te.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:Le.contents)==null?void 0:He.map(ee=>(ee.value="",ee));k={contents:V,filter:(Ia=(Ba=k==null?void 0:k.compData)==null?void 0:Ba.find(ee=>(ee==null?void 0:ee.key)==="filter"))==null?void 0:Ia.contents,key:k==null?void 0:k.comp,name:g,value:P,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents}}return k.isShow=!1,k}),D=await Promise.all(D);let S=[{key:"menuPath",contents:[{path:l,fatherPath:(C=(j=(N=H==null?void 0:H.data)==null?void 0:N.result)==null?void 0:j[0])==null?void 0:C.father_name,isShow:!1}]},{key:l,contents:D}];await $.createPlatFormDataApi({platId:parseInt((W=Zr==null?void 0:Zr.value)==null?void 0:W.plat_id),changeData:S});let E=await $.getPageDataApi({platId:parseInt((O=Zr==null?void 0:Zr.value)==null?void 0:O.plat_id),pageName:l});s=(U=E==null?void 0:E.data)==null?void 0:U.result}}r&&await uc(s,!!(n!=null&&n.originPath));let c=await ss(s,n);return r&&(c=await Up(c)),c==null?void 0:c.filter(H=>H)},ds=async l=>{var o,s,c,m,f,h,y,u,w,N,j;let r=(o=l==null?void 0:l.menus)==null?void 0:o.join("/");l!=null&&l.endChildMenu&&(l==null?void 0:l.endChildMenu)!==""&&(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+(l==null?void 0:l.endChildMenu)),(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+((c=(s=l.value)==null?void 0:s.split(" "))==null?void 0:c[0]));let n=await Kr(r,!1);if(n=(m=n==null?void 0:n.filter(C=>{var W,O;return(C==null?void 0:C.name)===((O=l==null?void 0:l.groups)==null?void 0:O[((W=l==null?void 0:l.groups)==null?void 0:W.length)-1])}))==null?void 0:m[0],(h=(f=n==null?void 0:n.compData)==null?void 0:f.find(C=>(C==null?void 0:C.key)==="tableContents"))!=null&&h.contents){n=(u=(y=n==null?void 0:n.compData)==null?void 0:y.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:u.contents;let C=((w=l==null?void 0:l.words)==null?void 0:w[0])??(l==null?void 0:l.prop);return n=n==null?void 0:n.filter(W=>{var O,U,H,D;return(W==null?void 0:W[l!=null&&l.endChildMenu?C:(O=l==null?void 0:l.words)==null?void 0:O[0]])===(l!=null&&l.relatedWords&&((U=l==null?void 0:l.relatedWords)==null?void 0:U.length)>0?(D=(H=l.value)==null?void 0:H.split(" "))==null?void 0:D[0]:l.value)}),n==null?void 0:n[0]}else{let C=(j=(N=n==null?void 0:n.compData)==null?void 0:N.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:j.contents,W={};return C==null||C.forEach(O=>{W[O.prop]=O.value}),W}},qp={key:0,class:"extra-button-content"},Wp={class:"table-operator-wrap"},Kp={key:0,class:"extra-button-filter"},Gp={key:1,class:"extra-header"},Yp=["onClick"],Jp={class:"table-op-text"},Xp={class:"table-op-text"},Zp={class:"drop-menu",style:{width:"120px"}},Qp=["onClick"],ef={key:0},af={key:1},lf=["onClick"],rf={class:"table-op-text"},nf={key:1,class:"extra-button-content tabs-button-wrapper"},of={class:"table-operator-wrap"},tf={class:"extra-button-filter"},sf={key:0,class:"extra-header"},cf={class:"table-op-action"},uf={class:"table-op-text"},df={class:"drop-menu",style:{width:"120px"}},pf={key:0},ff={key:1},hf=["onClick"],vf={class:"table-op-text"},mf={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(l,{emit:r}){const n=r,o=l,s=()=>{const g=(o==null?void 0:o.menuFilter)||[];return Array.isArray(g)&&(g==null?void 0:g.some(M=>{const R=typeof M=="string"?M:JSON.stringify(M);return R==null?void 0:R.includes("@InterfaceHide=Yes")}))},c=a.ref(""),m=a.ref(!1),f=a.ref([]),h=a.ref([{label:"清空",background:"#999999"},{label:"确认"}]),y=[{label:"新增",icon:"new"},{label:"导入",icon:"import_101"},{label:"导出",icon:"export_101"},{label:"导出paraform",icon:"export_101"},{label:"OCR识别",icon:"OCR识别"},{label:"切换视图",icon:"cardViewport_101"}];function u(g,M){return g.map(R=>{const G={...R};return M.forEach(ue=>{delete G[ue]}),G})}function w(g){if(!g||g.t!=="n")return(g==null?void 0:g.v)??"";const M=g.v;if(g.z){const R=String(g.z).toLowerCase(),G=["yyyy/mm/dd","yyyy-mm-dd","yyyy.mm.dd","yy/mm/dd","yy-mm-dd","yy.mm.dd","mm/dd/yy","mm-dd-yy","mm.dd.yy","dd/mm/yy","dd-mm-yy","dd.mm.yy","m/d/yy","m/d/yyyy","d/m/yy","d/m/yyyy","yyyy年","yy年","m月","d日","yyyy年m月d日","yy年m月d日","[$-f800]","[$-f400]"];for(const de of G)if(R.includes(de))return N(M);const ue=/[ymdhms]/.test(R),Be=/^[0#\.\,\s]+$/.test(R.replace(/[\\\/\-:]/g,""));if(ue&&!Be)return N(M)}if(M>=1&&M<=73050){if(M<5e3)return M;if(M>=5e3&&M<4e4){const R=Math.floor((M-25569)/365.25)+1970;return R>=1970&&R<=2e3&&g.z&&/[ymd]/.test(String(g.z).toLowerCase())?N(M):M}if(M>=4e4)return N(M)}return M}function N(g){if(typeof g!="number")return g;try{const M=new Date((g-25569)*86400*1e3);if(isNaN(M.getTime()))return g;const R=M.getFullYear(),G=String(M.getMonth()+1).padStart(2,"0"),ue=String(M.getDate()).padStart(2,"0");return`${R}-${G}-${ue}`}catch{return g}}const j=g=>{const M=g.raw;if(!M)return;const R=new FileReader;R.onload=G=>{try{const ue=new Uint8Array(G.target.result),Be=ia.readSync(ue,{type:"array"}),de=Be.SheetNames[0],Z=Be.Sheets[de],ae=ia.utils.decode_range(Z["!ref"]).e.c+1,ce=new Array(ae).fill(""),Ee=[];for(const le in Z){if(le[0]==="!")continue;const{r:De,c:be}=ia.utils.decode_cell(le),Ye=Z[le];let da=w(Ye);if((da==null||da==="")&&(da=""),De===0)ce[be]=da;else{if(!Ee[De-1]){Ee[De-1]={};for(let Ma=0;Ma<ae;Ma++)Ee[De-1][`col_${Ma}`]=""}Ee[De-1][`col_${be}`]=da}}for(let le=0;le<ae;le++)ce[le]===void 0&&(ce[le]="");const Ve=[];for(let le=0;le<ce.length;le++)(!ce[le]||ce[le].toString().trim()==="")&&Ve.push(le);let ye,z;(Ve==null?void 0:Ve.length)>0?(Ga.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),ye=ce.filter((le,De)=>!Ve.includes(De)),z=u(Ee,Ve==null?void 0:Ve.map(le=>`col_${le}`))):(ye=ce,z=Ee);const q=Ee==null?void 0:Ee[0];if(!(q!=null&&q.hasOwnProperty("col_0")))return Ga.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",ye,z)}catch(ue){throw Ga.ElMessage.error(ue.message),new Error(ue.message)}},R.readAsArrayBuffer(M)},C=g=>{var R;const M=(R=f.value)==null?void 0:R.reduce((G,ue,Be)=>(Be===0?G[ue.label]=g:G[ue.label]=ue==null?void 0:ue.value,G),{});n("filter",M,g,!0)},W=(g,M={})=>{n("buttonClick",g,"",M)},O=g=>{var M,R;f.value=(R=(M=ia.getColumnChild($.cloneDeep(g)))==null?void 0:M.filter(G=>(G==null?void 0:G.label)!==""&&(G==null?void 0:G.label)!=="操作"))==null?void 0:R.map(G=>({label:(G==null?void 0:G.label)??"",value:"",name:(G==null?void 0:G.prop)??"",isFormColHidden:G==null?void 0:G.isTableColHidden,width:2,prop:(G==null?void 0:G.prop)??""}))},U=a.ref(!1),H=g=>{var M;if((g==null?void 0:g.buttonName)==="确认"&&(n("filter",g==null?void 0:g.content),U.value=(g==null?void 0:g.content)&&Object.values(g==null?void 0:g.content).length>0),(g==null?void 0:g.buttonName)==="清空"){const R=$.cloneDeep(g==null?void 0:g.content);for(const G in R)R[G]="";f.value=(M=f.value)==null?void 0:M.map(G=>({...G,value:""})),n("filter",R),U.value=!1}m.value=!1},D=()=>{m.value=!m.value},S=()=>{var M,R;f.value=(M=f.value)==null?void 0:M.map(G=>({...G,value:""}));const g=(R=f.value)==null?void 0:R.reduce((G,ue)=>(G[ue.label]=ue.value,G),{});n("filter",g)},E=a.ref(null);let k;return k=g=>{var ue;if(!m.value)return;const M=(ue=E==null?void 0:E.value)==null?void 0:ue.$el,R=M==null?void 0:M.contains(g.target);let G=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(Be=>{Be.contains(g.target)&&(G=!0)}),!R&&!G&&(m.value=!1)},a.onMounted(()=>{document.addEventListener("click",k),O(o.columns)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",k)}),a.watch(()=>o.columns,()=>{O(o.columns)},{deep:!0,immediate:!0}),(g,M)=>{var Z,pe,ae,ce,Ee,Ve,ye,z;const R=a.resolveComponent("el-icon"),G=a.resolveComponent("svg-icon"),ue=a.resolveComponent("el-input"),Be=a.resolveComponent("el-upload"),de=a.resolveComponent("el-button");return l.pageLayout==="vertical"?(a.openBlock(),a.createElementBlock("div",qp,[s()?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(l.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(o==null?void 0:o.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((o==null?void 0:o.level)-1)*12+"px",fontWeight:600-((o==null?void 0:o.level)-1)*100>=400?600-((o==null?void 0:o.level)-1)*100:400,fontSize:17-(o==null?void 0:o.level)>=14?17-(o==null?void 0:o.level)+"px":"14px"})},a.toDisplayString(l.compName),7)),a.createElementVNode("div",Wp,[o!=null&&o.filterShow?(a.openBlock(),a.createElementBlock("div",Kp,[a.createVNode(Vu,{trigger:"contextmenu",ref_key:"popOverRef",ref:E,title:"",width:800,placement:"bottom-start",isVisible:m.value,"onUpdate:isVisible":M[4]||(M[4]=q=>m.value=q)},{reference:a.withCtx(()=>{var q,le,De,be;return[a.createVNode(ue,{modelValue:c.value,"onUpdate:modelValue":M[0]||(M[0]=Ye=>c.value=Ye),style:{"min-width":"80px"},placeholder:U.value?(De=(le=(q=l.filterValues)==null?void 0:q.filter(Ye=>Ye))==null?void 0:le.slice(0,3))==null?void 0:De.join("/"):"搜索","prefix-icon":a.unref(Ga.search_default),clearable:"",onInput:C,disabled:((be=f.value)==null?void 0:be.length)===0},{suffix:a.withCtx(()=>{var Ye,da;return[!c.value&&((da=(Ye=l.filterValues)==null?void 0:Ye.filter(Ma=>Ma))!=null&&da.join("/"))?(a.openBlock(),a.createBlock(R,{key:0,style:{cursor:"pointer"},onClick:S},{default:a.withCtx(()=>[a.createVNode(a.unref(Ga.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(D,["stop"])},[a.createVNode(G,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",{class:"form-content-value",onKeydown:M[1]||(M[1]=a.withModifiers(()=>{},["stop"])),onKeyup:M[2]||(M[2]=a.withModifiers(()=>{},["stop"])),onKeypress:M[3]||(M[3]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:f.value,buttonValue:h.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:h.value,isStartJustify:!1,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))],32)]),_:1},8,["isVisible"])])):a.createCommentVNode("",!0),l.buttons&&((Z=l.buttons)==null?void 0:Z.length)>0?(a.openBlock(),a.createElementBlock("div",Gp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((pe=l.buttons)==null?void 0:pe.filter(q=>l.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,le)=>{var De;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:le},[(q==null?void 0:q.type)==="upload"?(a.openBlock(),a.createBlock(Be,{key:0,class:"upload-button-wrap","on-change":j,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!l.lockingPage},{default:a.withCtx(()=>{var be;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:Ye=>W(q==null?void 0:q.label)},[a.createVNode(G,{class:"table-op-icon",name:(be=y==null?void 0:y.find(Ye=>(Ye==null?void 0:Ye.label)===(q==null?void 0:q.label)))==null?void 0:be.icon},null,8,["name"]),a.createElementVNode("span",Jp,a.toDisplayString(q==null?void 0:q.label),1)],10,Yp)]}),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(il._sfc_main,{key:1},{dropTitle:a.withCtx(()=>{var be;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}])},[a.createVNode(G,{class:"table-op-icon",name:(be=y==null?void 0:y.find(Ye=>(Ye==null?void 0:Ye.label)===(q==null?void 0:q.label)))==null?void 0:be.icon},null,8,["name"]),a.createElementVNode("span",Xp,a.toDisplayString(q==null?void 0:q.label),1)],2)]}),dropMenu:a.withCtx(()=>[a.createElementVNode("div",Zp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q==null?void 0:q.contents,be=>{var Ye,da;return a.openBlock(),a.createElementBlock("div",{key:be==null?void 0:be.label,class:a.normalizeClass(["table-op-drop-item",{"is-disabled":!!l.lockingPage}]),onClick:Ma=>!l.lockingPage&&W(be==null?void 0:be.label)},[a.createTextVNode(a.toDisplayString(be==null?void 0:be.label),1),(Ye=be==null?void 0:be.label)!=null&&Ye.includes("选中")?(a.openBlock(),a.createElementBlock("span",ef,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(da=be==null?void 0:be.label)!=null&&da.includes("全部")?(a.openBlock(),a.createElementBlock("span",af,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)],10,Qp)}),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(q!=null&&q.type)||(q==null?void 0:q.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,id:"themeButton",class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:be=>!l.lockingPage&&W(q==null?void 0:q.label,q)},[a.createVNode(G,{class:"table-op-icon",name:(De=y==null?void 0:y.find(be=>(be==null?void 0:be.label)===(q==null?void 0:q.label)))==null?void 0:De.icon},null,8,["name"]),a.createElementVNode("span",rf,a.toDisplayString(q==null?void 0:q.label),1)],10,lf)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",nf,[a.createElementVNode("div",of,[a.createElementVNode("div",tf,[a.createVNode(ue,{modelValue:c.value,"onUpdate:modelValue":M[5]||(M[5]=q=>c.value=q),style:{"min-width":"80px"},placeholder:U.value?(Ee=(ce=(ae=l.filterValues)==null?void 0:ae.filter(q=>q))==null?void 0:ce.slice(0,3))==null?void 0:Ee.join("/"):"搜索","prefix-icon":a.unref(Ga.search_default),clearable:"",onInput:C,disabled:((Ve=f.value)==null?void 0:Ve.length)===0},{suffix:a.withCtx(()=>{var q,le;return[!c.value&&((le=(q=l.filterValues)==null?void 0:q.filter(De=>De))!=null&&le.join("/"))?(a.openBlock(),a.createBlock(R,{key:0,style:{cursor:"pointer"},onClick:S},{default:a.withCtx(()=>[a.createVNode(a.unref(Ga.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(D,["stop"])},[a.createVNode(G,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),l.buttons&&((ye=l.buttons)==null?void 0:ye.length)>0?(a.openBlock(),a.createElementBlock("div",sf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((z=l.buttons)==null?void 0:z.filter(q=>l.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,le)=>{var De;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:le},[(q==null?void 0:q.type)==="upload"?(a.openBlock(),a.createBlock(Be,{key:0,class:"upload-button-wrap","on-change":j,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>{var be;return[a.createElementVNode("div",cf,[a.createVNode(G,{class:"table-op-icon",name:(be=y==null?void 0:y.find(Ye=>(Ye==null?void 0:Ye.label)===(q==null?void 0:q.label)))==null?void 0:be.icon},null,8,["name"]),a.createElementVNode("span",uf,a.toDisplayString(q==null?void 0:q.label),1)])]}),_:2},1024)):a.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(il._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(de,{key:0,style:{background:"transparent",color:"#000000"}},{icon:a.withCtx(()=>{var be;return[a.createVNode(G,{class:"table-op-icon",name:(be=y==null?void 0:y.find(Ye=>(Ye==null?void 0:Ye.label)===(q==null?void 0:q.label)))==null?void 0:be.icon},null,8,["name"])]}),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(q==null?void 0:q.label),1)]),_:2},1024)):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",df,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q==null?void 0:q.contents,be=>(a.openBlock(),a.createBlock(de,{key:be==null?void 0:be.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ye=>W(be==null?void 0:be.label)},{default:a.withCtx(()=>{var Ye,da;return[a.createTextVNode(a.toDisplayString(be==null?void 0:be.label),1),(Ye=be==null?void 0:be.label)!=null&&Ye.includes("选中")?(a.openBlock(),a.createElementBlock("span",pf,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(da=be==null?void 0:be.label)!=null&&da.includes("全部")?(a.openBlock(),a.createElementBlock("span",ff,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(q!=null&&q.type)||(q==null?void 0:q.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),id:"themeButton",onClick:be=>!l.lockingPage&&W(q==null?void 0:q.label,q)},[a.createVNode(G,{class:"table-op-icon",name:(De=y==null?void 0:y.find(be=>(be==null?void 0:be.label)===(q==null?void 0:q.label)))==null?void 0:De.icon},null,8,["name"]),a.createElementVNode("span",vf,a.toDisplayString(q==null?void 0:q.label),1)],10,hf)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])]))}}},yf=Jl._export_sfc(mf,[["__scopeId","data-v-a6997ec1"]]),gf={__name:"index",props:{columns:Array,tableData:Array},setup(l){return(r,n)=>{const o=a.resolveComponent("el-table-column"),s=a.resolveComponent("el-table");return a.openBlock(),a.createBlock(s,{data:l.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.columns,c=>{var m;return a.openBlock(),a.createBlock(o,{key:c==null?void 0:c.prop,label:c==null?void 0:c.label,prop:c==null?void 0:c.prop,fixed:(c==null?void 0:c.prop)==="operate"?"right":c==null?void 0:c.fixed,align:(c==null?void 0:c.align)??"left","show-overflow-tooltip":(c==null?void 0:c.showOverflowTooltip)??!0,width:c==null?void 0:c.width,"min-width":(c==null?void 0:c.minWidth)||((c==null?void 0:c.prop)==="operate"?80:(((m=c==null?void 0:c.label)==null?void 0:m.length)*2||4)*27)},{default:a.withCtx(f=>[a.renderSlot(r.$slots,"content",{row:f.row,column:f.column,$index:f.$index,scope:f}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.children,(h,y)=>(a.openBlock(),a.createBlock(il._sfc_main$2,{key:y,column:h,tableData:l.tableData},a.createSlots({_:2},[a.renderList(r.$slots,(u,w)=>({name:w,fn:a.withCtx(({row:N,slotData:j,item:C,column:W})=>[a.renderSlot(r.$slots,w,a.mergeProps({ref_for:!0},j??N,{item:C??h,slotData:j??N,row:N,column:W,columnProp:h}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class bf extends la.Loader{constructor(r){super(r),this.littleEndian=!0}load(r,n,o,s){const c=this,m=new la.FileLoader(c.manager);m.setPath(c.path),m.setResponseType("arraybuffer"),m.setRequestHeader(c.requestHeader),m.setWithCredentials(c.withCredentials),m.load(r,function(f){try{n(c.parse(f))}catch(h){s?s(h):console.error(h),c.manager.itemError(r)}},o,s)}_getDataView(r,n,o,s){switch(o){case"F":return s===8?r.getFloat64(n,this.littleEndian):r.getFloat32(n,this.littleEndian);case"I":return s===1?r.getInt8(n):s===2?r.getInt16(n,this.littleEndian):r.getInt32(n,this.littleEndian);case"U":return s===1?r.getUint8(n):s===2?r.getUint16(n,this.littleEndian):r.getUint32(n,this.littleEndian)}}parse(r){function n(j,C){const W=j.length,O=new Uint8Array(C);let U=0,H=0,D,S,E;do if(D=j[U++],D<32){if(D++,H+D>C)throw new Error("Output buffer is not large enough");if(U+D>W)throw new Error("Invalid compressed data");do O[H++]=j[U++];while(--D)}else{if(S=D>>5,E=H-((D&31)<<8)-1,U>=W)throw new Error("Invalid compressed data");if(S===7&&(S+=j[U++],U>=W))throw new Error("Invalid compressed data");if(E-=j[U++],H+S+2>C)throw new Error("Output buffer is not large enough");if(E<0)throw new Error("Invalid compressed data");if(E>=H)throw new Error("Invalid compressed data");do O[H++]=O[E++];while(--S+2)}while(U<W);return O}function o(j){const C={},W=new Uint8Array(j);let O="",U="",H=0,D=!1;const S=W.length;for(;H<S&&D===!1;){const M=String.fromCharCode(W[H++]);M===`
|
|
2
|
-
`||M==="\r"?(U.trim().toLowerCase().startsWith("data")&&(D=!0),U=""):U+=M,O+=M}const E=O.search(/[\r\n]DATA\s(\S*)\s/i),k=/[\r\n]DATA\s(\S*)\s/i.exec(O.slice(E-1));if(C.data=k[1],C.headerLen=k[0].length+E,C.str=O.slice(0,C.headerLen),C.str=C.str.replace(/#.*/gi,""),C.version=/^VERSION (.*)/im.exec(C.str),C.fields=/^FIELDS (.*)/im.exec(C.str),C.size=/^SIZE (.*)/im.exec(C.str),C.type=/^TYPE (.*)/im.exec(C.str),C.count=/^COUNT (.*)/im.exec(C.str),C.width=/^WIDTH (.*)/im.exec(C.str),C.height=/^HEIGHT (.*)/im.exec(C.str),C.viewpoint=/^VIEWPOINT (.*)/im.exec(C.str),C.points=/^POINTS (.*)/im.exec(C.str),C.version!==null&&(C.version=parseFloat(C.version[1])),C.fields=C.fields!==null?C.fields[1].split(" "):[],C.type!==null&&(C.type=C.type[1].split(" ")),C.width!==null&&(C.width=parseInt(C.width[1])),C.height!==null&&(C.height=parseInt(C.height[1])),C.viewpoint!==null&&(C.viewpoint=C.viewpoint[1]),C.points!==null&&(C.points=parseInt(C.points[1],10)),C.points===null&&(C.points=C.width*C.height),C.size!==null&&(C.size=C.size[1].split(" ").map(function(M){return parseInt(M,10)})),C.count!==null)C.count=C.count[1].split(" ").map(function(M){return parseInt(M,10)});else{C.count=[];for(let M=0,R=C.fields.length;M<R;M++)C.count.push(1)}C.offset={};let g=0;for(let M=0,R=C.fields.length;M<R;M++)C.data==="ascii"?C.offset[C.fields[M]]=M:(C.offset[C.fields[M]]=g,g+=C.size[M]*C.count[M]);return C.rowSize=g,C}const s=o(r),c=[],m=[],f=[],h=[],y=[],u=new la.Color;if(s.data==="ascii"){const j=s.offset,O=new TextDecoder().decode(r).slice(s.headerLen).split(`
|
|
3
|
-
`);for(let U=0,H=O.length;U<H;U++){if(O[U]==="")continue;const D=O[U].split(" ");if(j.x!==void 0&&(c.push(parseFloat(D[j.x])),c.push(parseFloat(D[j.y])),c.push(parseFloat(D[j.z]))),j.rgb!==void 0){const S=s.fields.findIndex(ue=>ue==="rgb"),E=s.type[S],k=parseFloat(D[j.rgb]);let g=k;if(E==="F"){const ue=new Float32Array(1);ue[0]=k,g=new Int32Array(ue.buffer)[0]}const M=(g>>16&255)/255,R=(g>>8&255)/255,G=(g>>0&255)/255;u.setRGB(M,R,G,la.SRGBColorSpace),f.push(u.r,u.g,u.b)}j.normal_x!==void 0&&(m.push(parseFloat(D[j.normal_x])),m.push(parseFloat(D[j.normal_y])),m.push(parseFloat(D[j.normal_z]))),j.intensity!==void 0&&h.push(parseFloat(D[j.intensity])),j.label!==void 0&&y.push(parseInt(D[j.label]))}}if(s.data==="binary_compressed"){const j=new Uint32Array(r.slice(s.headerLen,s.headerLen+8)),C=j[0],W=j[1],O=n(new Uint8Array(r,s.headerLen+8,C),W),U=new DataView(O.buffer),H=s.offset;for(let D=0;D<s.points;D++){if(H.x!==void 0){const S=s.fields.indexOf("x"),E=s.fields.indexOf("y"),k=s.fields.indexOf("z");c.push(this._getDataView(U,s.points*H.x+s.size[S]*D,s.type[S],s.size[S])),c.push(this._getDataView(U,s.points*H.y+s.size[E]*D,s.type[E],s.size[E])),c.push(this._getDataView(U,s.points*H.z+s.size[k]*D,s.type[k],s.size[k]))}if(H.rgb!==void 0){const S=s.fields.indexOf("rgb"),E=U.getUint8(s.points*H.rgb+s.size[S]*D+2)/255,k=U.getUint8(s.points*H.rgb+s.size[S]*D+1)/255,g=U.getUint8(s.points*H.rgb+s.size[S]*D+0)/255;u.setRGB(E,k,g,la.SRGBColorSpace),f.push(u.r,u.g,u.b)}if(H.normal_x!==void 0){const S=s.fields.indexOf("normal_x"),E=s.fields.indexOf("normal_y"),k=s.fields.indexOf("normal_z");m.push(this._getDataView(U,s.points*H.normal_x+s.size[S]*D,s.type[S],s.size[S])),m.push(this._getDataView(U,s.points*H.normal_y+s.size[E]*D,s.type[E],s.size[E])),m.push(this._getDataView(U,s.points*H.normal_z+s.size[k]*D,s.type[k],s.size[k]))}if(H.intensity!==void 0){const S=s.fields.indexOf("intensity");h.push(this._getDataView(U,s.points*H.intensity+s.size[S]*D,s.type[S],s.size[S]))}if(H.label!==void 0){const S=s.fields.indexOf("label");y.push(U.getInt32(s.points*H.label+s.size[S]*D,this.littleEndian))}}}if(s.data==="binary"){const j=new DataView(r,s.headerLen),C=s.offset;for(let W=0,O=0;W<s.points;W++,O+=s.rowSize){if(C.x!==void 0){const U=s.fields.indexOf("x"),H=s.fields.indexOf("y"),D=s.fields.indexOf("z");c.push(this._getDataView(j,O+C.x,s.type[U],s.size[U])),c.push(this._getDataView(j,O+C.y,s.type[H],s.size[H])),c.push(this._getDataView(j,O+C.z,s.type[D],s.size[D]))}if(C.rgb!==void 0){const U=j.getUint8(O+C.rgb+2)/255,H=j.getUint8(O+C.rgb+1)/255,D=j.getUint8(O+C.rgb+0)/255;u.setRGB(U,H,D,la.SRGBColorSpace),f.push(u.r,u.g,u.b)}if(C.normal_x!==void 0){const U=s.fields.indexOf("normal_x"),H=s.fields.indexOf("normal_y"),D=s.fields.indexOf("normal_z");m.push(this._getDataView(j,O+C.normal_x,s.type[U],s.size[U])),m.push(this._getDataView(j,O+C.normal_y,s.type[H],s.size[H])),m.push(this._getDataView(j,O+C.normal_z,s.type[D],s.size[D]))}if(C.intensity!==void 0){const U=s.fields.indexOf("intensity");h.push(this._getDataView(j,O+C.intensity,s.type[U],s.size[U]))}C.label!==void 0&&y.push(j.getInt32(O+C.label,this.littleEndian))}}const w=new la.BufferGeometry;c.length>0&&w.setAttribute("position",new la.Float32BufferAttribute(c,3)),m.length>0&&w.setAttribute("normal",new la.Float32BufferAttribute(m,3)),f.length>0&&w.setAttribute("color",new la.Float32BufferAttribute(f,3)),h.length>0&&w.setAttribute("intensity",new la.Float32BufferAttribute(h,1)),y.length>0&&w.setAttribute("label",new la.Int32BufferAttribute(y,1)),w.computeBoundingSphere();const N=new la.PointsMaterial({size:.005});return f.length>0&&(N.vertexColors=!0),new la.Points(w,N)}}const kf=$.useModelComp($.pinia),{systemPath:ps}=$.storeToRefs(kf),yi=a.ref(),fs=new WeakMap;function xf(l,r,n,o,s){const c=async N=>{try{const j=await $.platformDownloadFile({url:N});if(j.status!==200)throw new Error(`下载失败: ${j.status}`);return j.data}catch(j){throw console.error("addModelFromUrl失败:",j),j}},m=N=>new Promise((j,C)=>{const W=new FileReader;W.onload=O=>{try{const U=O.target.result,D=new Rn.MTLLoader().parse(U);D.preload(),j(D)}catch(U){C(U)}},W.onerror=()=>{C(new Error("MTL文件读取失败"))},W.readAsText(N)}),f=async N=>{const j={materials:{},create:function(C){return this.materials[C]?this.materials[C]:(console.warn(`Material '${C}' not found, using default material`),new la.MeshPhongMaterial({color:8947848,side:la.DoubleSide}))},getAsArray:function(){const C=[];for(const W in this.materials)C.push(this.materials[W]);return C},preload:function(){for(const C in this.materials)this.materials[C].map&&(this.materials[C].map.needsUpdate=!0)}};for(const C of N){const W=await m(C);Object.assign(j.materials,W.materials)}return j.preload(),j},h=async(N,j=[])=>new Promise((C,W)=>{const O=new FileReader;O.onload=async U=>{try{const H=U.target.result;let D=null;j&&j.length>0&&(j.length===1?D=await m(j[0]):D=await f(j));const S=new Rn.OBJLoader;D&&S.setMaterials(D);const E=S.parse(H);D||E.traverse(k=>{k.isMesh&&(k.material=new la.MeshPhongMaterial({color:8947848,side:la.DoubleSide}))}),C(E)}catch(H){W(H)}},O.onerror=()=>{W(new Error("OBJ文件读取失败"))},O.readAsText(N)}),y=async N=>{var j;try{n.value=!0;const{scene:C}=l();if(!C)throw new Error("Scene not initialized");s();const W=[];for(let O=0;O<N.length;O++){const U=N[O];o.value=`正在加载模型 ${O+1}/${N.length}...`;const H=await c(U.objUrl),D=((j=U.objUrl)==null?void 0:j.split("/").pop())||`model_${O}.obj`,S=new File([H],D,{type:H.type});let E=[];if(U.mtlUrls){const g=Array.isArray(U.mtlUrls)?U.mtlUrls:[U.mtlUrls];for(let M=0;M<g.length;M++){const R=g[M],G=await c(R),ue=(R==null?void 0:R.split("/").pop())||`material_${O}_${M}.mtl`,Be=new File([G],ue,{type:G.type});E.push(Be)}}const k=await h(S,E);C.add(k),r.value.push(k),W.push(k)}return n.value=!1,W}catch(C){throw console.error("加载模型失败:",C),n.value=!1,C}},u=async(N,j,C=[],W=[])=>{let O;const U=N.toLowerCase();switch(U){case".txt":case".cpt":case".obj":const H=await j.text();if(U===".txt"||U===".cpt"){const re=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Te=[...H.matchAll(re)].map(te=>({x:parseFloat(te[1]),y:parseFloat(te[2]),z:parseFloat(te[3])})),qe=new la.BufferGeometry,Re=Te.flatMap(te=>[te.x,te.y,te.z]);if(qe.setAttribute("position",new la.Float32BufferAttribute(Re,3)),U===".txt"){const te=new la.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});O=new la.Points(qe,te)}else if(U===".cpt"){const te=new la.LineBasicMaterial({color:"#5B5C99",linewidth:100});O=new la.Line(qe,te)}}else if(U===".obj"){const re=new Rn.OBJLoader;if(C&&C.length>0){const Ne=new Rn.MTLLoader;for(const Te of C){const qe=await Te.text(),Re=Ne.parse(qe);Re.preload(),re.setMaterials(Re);break}}O=re.parse(H),(!C||C.length===0)&&O.traverse(Ne=>{Ne.isMesh&&(Ne.material=new la.MeshPhongMaterial({color:"#B3B3D4"})),Ne instanceof la.Mesh&&(Ne.material.side=la.DoubleSide)})}break;case".stl":const D=await j.arrayBuffer(),E=new Rn.STLLoader().parse(D),k=new la.MeshPhongMaterial({color:"#B3B3D4",side:la.DoubleSide});O=new la.Mesh(E,k);break;case".nc":const g=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],M={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},R=new la.Group,G=g.map(re=>new Promise((Ne,Te)=>{new Rn.STLLoader().load(ps.value===""?`/model/${re}`:`${ps.value}\\${re}`,Re=>{const te=new la.MeshPhongMaterial({color:M[re]||"#B3B3D4",side:la.DoubleSide}),Le=new la.Mesh(Re,te);Ne(Le)},void 0,Te)}));try{(await Promise.all(G)).forEach(Ne=>R.add(Ne)),O=R}catch(re){throw console.error("加载NC文件对应的STL文件失败:",re),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const ue=new bf,Be=new la.Group;try{const re=await Ga.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ne=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"}),Te=await Ga.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),qe=new Blob([Te.data],{type:"application/octet-stream;charset=UTF-8"}),Re=await new Promise((Le,He)=>{const Ba=URL.createObjectURL(Ne);ue.load(Ba,Ia=>{const V=new Float32Array(Ia.geometry.attributes.position.count*3);for(let P=0;P<Ia.geometry.attributes.position.count;P++)V[P*3]=1,V[P*3+1]=0,V[P*3+2]=0;Ia.geometry.setAttribute("color",new la.BufferAttribute(V,3)),Ia.material.vertexColors=!0,Ia.scale.set(.3,.3,.3),URL.revokeObjectURL(Ba),Le(Ia)},void 0,He)}),te=await new Promise((Le,He)=>{const Ba=URL.createObjectURL(qe);ue.load(Ba,Ia=>{const V=new Float32Array(Ia.geometry.attributes.position.count*3);for(let P=0;P<Ia.geometry.attributes.position.count;P++)V[P*3]=0,V[P*3+1]=1,V[P*3+2]=0;Ia.geometry.setAttribute("color",new la.BufferAttribute(V,3)),Ia.material.vertexColors=!0,Ia.scale.set(.3,.3,.3),URL.revokeObjectURL(Ba),Le(Ia)},void 0,He)});Be.add(Re),Be.add(te),O=Be}catch(re){throw console.error("PCD文件加载失败:",re),new Error("无法加载PCD文件")}break;case".urdf":const de=URL.createObjectURL(j),Z=new Ou.URDFLoader,pe="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",ae={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},ce=new WeakMap,Ee=new WeakMap,Ve=new WeakMap,ye=async re=>{if(ce.has(re))return console.log(`从缓存加载: ${re}`),ce.get(re);try{const Ne=await Ga.axios.get(`${pe}/${re}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Te=new Blob([Ne.data],{type:"application/octet-stream;charset=UTF-8"});return ae.enableCache&&ce.set(re,Te),Te}catch(Ne){throw console.error(`加载文件失败: ${re}`,Ne),new Error(`无法加载文件: ${re}`)}},z=(re="default")=>{if(Ee.has(re))return Ee.get(re);const Ne=new la.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:la.FrontSide});return Ee.set(re,Ne),Ne},q=re=>{try{re.isBufferGeometry&&re.mergeVertices&&re.mergeVertices(),re.computeVertexNormals&&re.computeVertexNormals(),re.computeBoundingSphere&&re.computeBoundingSphere(),re.deleteAttribute&&re.deleteAttribute("uv2")}catch(Ne){console.warn("几何体优化失败,使用原始几何体:",Ne)}return re},le=async(re,Ne,Te)=>{const qe=`stl_${Ne}`;if(Ve.has(qe)){const He=Ve.get(qe);return new la.Mesh(He,z())}const Re=await re.arrayBuffer();let Le=new Rn.STLLoader(Te).parse(Re);return Le=q(Le),Ve.set(qe,Le),new la.Mesh(Le,z())},De=async(re,Ne,Te)=>{const qe=`obj_${Ne}`;if(ce.has(qe))return ce.get(qe).clone();const Re=await re.text(),te=new Rn.OBJLoader(Te),Le=Ne.replace(".obj",".mtl");try{const Ia=await(await ye(Le)).text(),P=new Rn.MTLLoader(Te).parse(Ia);P.preload(),te.setMaterials(P)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Le}`)}const He=te.parse(Re);return He.traverse(Ba=>{Ba.isMesh&&(Ba.geometry=q(Ba.geometry),Ba.castShadow=!0,Ba.receiveShadow=!0,Ba.renderOrder=1)}),ce.set(qe,He),He},be=(re,Ne)=>{const Te=new la.LOD;if(Te.addLevel(re,0),re.geometry){const qe=re.geometry.clone(),Re=new la.Mesh(qe,re.material);Te.addLevel(Re,50)}return Te};let Ye=0,da=0;const Ma=[];Z.loadMeshCb=async(re,Ne,Te,qe,Re)=>{const te=re.split("/").pop(),Le=Te||(()=>{});Ye++;const He=new Promise(async(Ba,Ia)=>{try{const V=await ye(te);if(!V||V.size===0)throw new Error(`文件为空: ${te}`);const P=te.split(".").pop().toLowerCase();let ee;switch(P){case"stl":ee=await le(V,te,Ne);break;case"obj":ee=await De(V,te,Ne);break;default:throw new Error(`不支持的文件格式: ${P}`)}ae.enableLOD&&ee.isMesh&&(ee=be(ee,te)),Le(ee),da++,qe&&qe({loaded:da,total:Ye,progress:da/Ye}),Ba(ee)}catch(V){console.error(`mesh文件加载失败: ${te}`,V);const P=new la.Group;Le(P),Ba(P);const ee=new la.BoxGeometry(.1,.1,.1),fe=new la.MeshStandardMaterial({color:16711680,wireframe:!0});return new la.Mesh(ee,fe)}});Ma.push(He)};try{if(!de){yi.value=void 0;break}if(O=await Z.loadAsync(de),console.log(`URDF文件加载完成,等待${Ye}个mesh文件加载...`),Ma.length>0)try{await Promise.allSettled(Ma),console.log(`所有mesh文件处理完成,成功加载: ${da}/${Ye}`)}catch(Te){console.warn("部分mesh文件加载失败,但继续显示模型",Te)}O.traverse(Te=>{Te.isMesh&&(Te.castShadow=!0,Te.receiveShadow=!0,Te.renderOrder=1,Te.material&&(Te.material.needsUpdate=!0))}),console.time("计算包围盒");const re=new la.Box3;re.expandByObject(O);const Ne=`urdf_${Date.now()}`;O.userData.boundingBox=re.clone(),O.userData.modelId=Ne,fs.set(Ne,{box:re.clone(),center:re.getCenter(new la.Vector3),size:re.getSize(new la.Vector3),maxSize:Math.max(...re.getSize(new la.Vector3).toArray())}),yi.value=O,console.log("URDF模型加载完成并优化")}catch(re){console.error("URDF加载失败:",re),yi.value=void 0}finally{de&&URL.revokeObjectURL(de)}break;default:throw new Error(`不支持的文件格式: ${N}`)}return O};return{addModelsFromUrls:y,loadModelByDefaultPath:async N=>{console.log(N);try{n.value=!0,o.value="正在加载模型...";const{scene:j}=l();if(!j)throw new Error("Scene not initialized");s(),await new Promise(W=>setTimeout(W,100));const C=[];for(let W=0;W<N.length;W++){const O=N[W],U=await u(O.suffix,O.blob,O.mtlBlobs||[],O.meshFiles||[]);U&&(j.add(U),r.value.push(U),C.push(U))}return n.value=!1,o.value="",C}catch(j){throw console.error("加载模型失败:",j),n.value=!1,o.value="",j}},urdfModel:yi,modelBoundingBoxes:fs}}window._iconfont_svg_string_4827314='<svg><symbol id="icon-chart-new" viewBox="0 0 1024 1024"><path d="M960 768V448h-64v320h-64v64H192v-64h-64V256h64v-64h256v-64H192V64H0v192h64v512H0v192h192v-64h640v64h192V768h-64zM64 128h64v64H64v-64z m0 768v-64h64v64H64z m896 0h-64v-64h64v64zM256 768V256h128v512H256z m192-320h128v320H448V448z m192 192h128v128H640V640zM512 288c0-17.664 14.336-32 32-32h160V96c0-17.664 14.336-32 32-32s32 14.336 32 32v160h160c17.664 0 32 14.336 32 32s-14.336 32-32 32H768v160c0 17.664-14.336 32-32 32s-32-14.336-32-32V320H544c-17.664 0-32-14.336-32-32z" ></path></symbol><symbol id="icon-ai13" viewBox="0 0 1024 1024"><path d="M863.719038 159.366637l-705.295378 0c-48.443315 0-88.129176 39.690978-88.129176 88.161922l0 528.943904c0 48.474015 39.685861 88.161922 88.129176 88.161922l705.295378 0c48.443315 0 88.134293-39.687908 88.134293-88.161922l0-528.943904C951.853331 199.056592 912.162354 159.366637 863.719038 159.366637M643.272277 776.472464l-484.84964 0 0-176.324868 484.84964 0L643.272277 776.472464zM643.272277 556.053332l-484.84964 0 0-176.296215 484.84964 0L643.272277 556.053332zM863.719038 776.472464 687.394171 776.472464l0-396.659065 176.324868 0L863.719038 776.472464z" ></path></symbol><symbol id="icon-qiehuanwenjianjia" viewBox="0 0 1024 1024"><path d="M409.6 102.4L512 204.8h307.2a102.4 102.4 0 0 1 102.144 94.72l0.256 7.68v512a102.4 102.4 0 0 1-94.72 102.144l-7.68 0.256H512v-76.8h281.6a51.2 51.2 0 0 0 50.842-45.21l0.358-5.99V332.8a51.2 51.2 0 0 0-45.21-50.842l-5.99-0.358H486.4L384 179.2H230.4a51.2 51.2 0 0 0-50.842 45.21l-0.358 5.99v179.2h-76.8V204.8a102.4 102.4 0 0 1 94.72-102.144l7.68-0.256h204.8z m217.6 588.8a38.4 38.4 0 1 1 0 76.8H358.4v99.584a25.6 25.6 0 0 1-41.83 19.814L132.3 736.614a25.6 25.6 0 0 1 16.231-45.414zM447.59 389.99l3.84 2.612L635.7 543.386a25.6 25.6 0 0 1-11.623 45.004l-4.608 0.41H140.8a38.4 38.4 0 0 1-5.222-76.442L140.8 512h268.8v-99.584a25.6 25.6 0 0 1 37.99-22.426z" ></path></symbol><symbol id="icon-baogao" viewBox="0 0 1104 1024"><path d="M265.401 1024a174.066 174.066 0 0 1-173.56-173.56V315.3a4.194 4.194 0 0 0-4.338-4.34H41.22A39.63 39.63 0 0 1 0 273.356V123.66C0 55.684 59.3 0 132.339 0h648.678a132.411 132.411 0 0 1 132.339 132.339v553.22a4.194 4.194 0 0 0 4.339 4.34h146.079a40.714 40.714 0 0 1 41.22 41.22v159.819a132.411 132.411 0 0 1-132.339 132.339l-707.254 0.723z m653.017-260.339A4.194 4.194 0 0 0 914.08 768v123.661a59.3 59.3 0 0 0 118.599 0V768a4.194 4.194 0 0 0-4.339-4.339z m-749.198-452.7a4.194 4.194 0 0 0-4.339 4.338v534.419a100.737 100.737 0 0 0 100.52 100.52h582.147a3.977 3.977 0 0 0 3.616-2.17 4.628 4.628 0 0 0 0-4.34 132.7 132.7 0 0 1-10.848-52.79V133.062a59.3 59.3 0 0 0-118.598 0v140.294a39.195 39.195 0 0 1-41.22 37.604zM132.34 73.762c-32.542 0-59.3 22.418-59.3 49.898v109.92a4.194 4.194 0 0 0 4.34 4.34h566.237a4.194 4.194 0 0 0 4.339-4.34V133.063a132.7 132.7 0 0 1 10.847-52.79c0.723-1.447 0-2.893 0-4.34a3.977 3.977 0 0 0-3.616-2.17z m169.22 692.068a36.881 36.881 0 0 1 0-73.763h402.08a36.881 36.881 0 0 1 0 73.763z m0-196.701a36.881 36.881 0 1 1 0-73.763h402.08a36.881 36.881 0 1 1 0 73.763z" ></path></symbol><symbol id="icon-xinghao" viewBox="0 0 1024 1024"><path d="M580.583 425.004c52.988-24.574 104.44-49.276 152.82-73.594 48.381-24.703 87.034-42.877 115.704-54.268 28.67-11.136 51.58-17.023 69.115-17.023a104.952 104.952 0 0 1 74.235 28.798 93.177 93.177 0 0 1 31.485 71.802c0 16.383-5.12 33.534-15.358 51.069-10.24 17.534-21.247 28.926-32.638 33.79-105.976 41.468-222.832 72.058-350.054 90.872 23.038 20.99 51.452 49.405 85.113 84.474 33.79 35.582 51.453 54.268 52.86 56.7 12.416 17.023 29.566 38.397 51.837 63.74 22.142 25.597 37.501 45.18 46.076 59.643a99.833 99.833 0 0 1 13.055 52.092 93.817 93.817 0 0 1-29.693 68.731 103.16 103.16 0 0 1-76.41 29.694c-31.23 0-66.172-24.318-105.337-72.443-39.037-48.124-89.465-135.158-151.029-260.46A12540.003 12540.003 0 0 1 386.677 862.22a387.3 387.3 0 0 1-61.563 81.53 96.889 96.889 0 0 1-67.835 27.774 101.625 101.625 0 0 1-76.026-31.358c-19.711-20.862-30.078-43.517-30.078-66.939 0-22.142 4.095-38.909 12.287-50.172 75.514-102.393 154.356-191.602 236.782-266.605a2401.103 2401.103 0 0 1-184.818-35.709 1163.818 1163.818 0 0 1-172.531-57.724c-9.984-5.12-19.583-16.382-29.054-33.917A104.696 104.696 0 0 1 0.018 380.72a93.433 93.433 0 0 1 31.358-71.675 102.648 102.648 0 0 1 72.186-28.926c19.839 0 44.285 5.887 73.979 17.79 29.438 11.904 67.067 29.054 112.632 51.453 45.564 22.526 97.656 47.74 155.892 75.514a1833.849 1833.849 0 0 1-26.494-177.267 1574.54 1574.54 0 0 1-10.367-137.078c0-30.205 9.599-56.06 28.798-78.074A95.481 95.481 0 0 1 512.62 0.076c29.822 0 54.012 10.75 73.339 32.51 19.454 21.886 29.054 50.683 29.054 86.649 0 9.855-1.664 29.182-4.48 58.491-2.56 29.182-7.04 64.252-12.16 105.465-5.375 41.34-11.39 88.697-17.79 141.813z" fill="#FF4444" ></path></symbol><symbol id="icon-mima" viewBox="0 0 1024 1024"><path d="M776.86 376.04c-22.05 0-40.16-16.24-43.91-37.98-18.08-104.98-109.79-185.1-219.84-185.1s-201.76 80.13-219.84 185.1c-3.74 21.73-21.85 37.98-43.91 37.98-27.05 0-48.82-24.04-44.44-50.73 24.3-148.16 153.25-261.58 308.19-261.58S796.99 177.15 821.3 325.31c4.38 26.69-17.39 50.73-44.44 50.73zM850.18 418.32H180.33c-37.98 0-68.76 30.79-68.76 68.76v403.71c0 37.98 30.79 68.76 68.76 68.76h665.36c37.97 0 68.75-30.77 68.77-68.74l0.19-408c0.02-35.61-28.85-64.49-64.47-64.49zM557.73 762.56c0 24.64-19.97 44.62-44.62 44.62-24.64 0-44.62-19.97-44.62-44.62v-89.23c0-24.64 19.97-44.62 44.62-44.62 24.64 0 44.62 19.98 44.62 44.62v89.23z" ></path></symbol><symbol id="icon-zhanghao" viewBox="0 0 1024 1024"><path d="M407.61 578.87c-174.46 0-304.73 113.04-304.73 277.2v17.69c0 85.81 139.6 85.81 316.37 85.81h187.73c169.75 0 316.37 0 316.37-85.81v-17.69c0-164.16-130.28-277.2-304.73-277.2H407.61zM503.71 535.67c138.19 0 250.63-105.81 250.63-235.94 0-130.06-112.44-235.86-250.63-235.86-138.11 0-250.56 105.81-250.56 235.86 0 130.13 112.45 235.94 250.56 235.94z" ></path></symbol><symbol id="icon-xiangqingye-37" viewBox="0 0 1024 1024"><path d="M368.64 34.133333H112.64C68.266667 34.133333 34.133333 68.266667 34.133333 112.64v256c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V116.053333h252.586667c23.893333 0 40.96-17.066667 40.96-40.96S389.12 34.133333 368.64 34.133333zM911.36 34.133333h-256c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h252.586667v252.586667c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V112.64C989.866667 68.266667 955.733333 34.133333 911.36 34.133333zM368.64 907.946667H116.053333v-252.586667c0-23.893333-17.066667-40.96-40.96-40.96S34.133333 634.88 34.133333 655.36v256C34.133333 955.733333 68.266667 989.866667 112.64 989.866667h256c23.893333 0 40.96-17.066667 40.96-40.96s-20.48-40.96-40.96-40.96zM948.906667 617.813333c-23.893333 0-40.96 17.066667-40.96 40.96v252.586667h-252.586667c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h256c40.96 0 78.506667-34.133333 78.506667-78.506667v-256c0-23.893333-17.066667-40.96-40.96-40.96z" fill="#3366CC" ></path><path d="M416.426667 488.106667L307.2 344.746667c-13.653333-17.066667-34.133333-20.48-51.2-6.826667-17.066667 13.653333-20.48 34.133333-6.826667 51.2L337.92 512l-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653333l112.64-146.773334c10.24-17.066667 10.24-34.133333 3.413334-47.786666z" fill="#F4A914" ></path><path d="M597.333333 488.106667L488.106667 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826667 51.2l92.16 122.88-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c10.24-13.653333 10.24-30.72 0-44.373333z" fill="#F4A914" ></path><path d="M778.24 488.106667L669.013333 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826666 51.2l92.16 122.88-95.573334 126.293333c-6.826667 6.826667-6.826667 17.066667-6.826666 27.306667 0 10.24 6.826667 17.066667 13.653333 23.893333 6.826667 3.413333 13.653333 6.826667 23.893333 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c6.826667-13.653333 6.826667-30.72-3.413333-44.373333z" fill="#F4A914" ></path></symbol><symbol id="icon-gongzhuangmoju" viewBox="0 0 1024 1024"><path d="M192 170.666667A106.965333 106.965333 0 0 0 85.333333 277.333333V426.666667h256l42.666667 85.333333h256l42.666667-85.333333h256V277.333333A106.965333 106.965333 0 0 0 832 170.666667z" fill="#3B709C" ></path><path d="M384 512l-42.666667-85.333333h341.333334l-42.666667 85.333333z m-298.666667-85.333333V256a85.333333 85.333333 0 0 1 85.333334-85.333333h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333333v170.666667zM853.333333 853.333333H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333333v-256h213.333334l42.666666 85.333333h341.333334l42.666666-85.333333h213.333334v256a85.333333 85.333333 0 0 1-85.333334 85.333333z" fill="#2C6798" ></path></symbol><symbol id="icon-jiagongguochengxinxi" viewBox="0 0 1024 1024"><path d="M345.216 664.192a315.84 315.84 0 0 1 93.12-224.64 315.84 315.84 0 0 1 100.992-68.16 315.392 315.392 0 0 1 123.648-24.96 315.392 315.392 0 0 1 158.72 42.368v-264a24.768 24.768 0 0 0-24.768-24.768H559.296a32.64 32.64 0 0 1 0.704 6.976v133.184c0 19.2-15.616 34.816-34.816 34.816H395.072a34.816 34.816 0 0 1-34.752-34.816v-133.12a32.64 32.64 0 0 1 0.64-6.976H123.456a24.768 24.768 0 0 0-24.768 24.832v676.544c0 13.76 11.072 24.832 24.768 24.832h266.24a316.224 316.224 0 0 1-44.416-162.112zM662.976 406.4a257.792 257.792 0 1 0 0 515.52 257.792 257.792 0 0 0 0-515.52z m112.256 293.376a104.704 104.704 0 0 1-107.328 25.216l-68.48 68.48a46.528 46.528 0 0 1-65.728-65.664l68.48-68.48a104.512 104.512 0 0 1 140.8-129.28l-67.072 67.072 10.88 42.88 43.328 11.328 67.072-67.136c16.64 38.336 9.216 84.416-21.952 115.584z m-220.16 51.456a20.928 20.928 0 1 0 41.856 0 20.928 20.928 0 0 0-41.856 0z" ></path></symbol><symbol id="icon-pingtaiguanli" viewBox="0 0 1024 1024"><path d="M1024 806.4V25.6c0-12.8-12.8-25.6-25.6-25.6H25.6C12.8 0 0 12.8 0 25.6v780.8h435.2v166.4H236.8v51.2h556.8v-51.2H588.8v-166.4H1024zM320 281.6c-12.8-12.8-19.2-25.6-32-32l44.8-76.8c44.8 25.6 96 12.8 121.6-32 12.8-12.8 12.8-32 12.8-44.8h89.6c0 51.2 38.4 83.2 89.6 83.2 12.8 0 32-6.4 44.8-12.8l44.8 76.8c-44.8 25.6-57.6 76.8-32 115.2 12.8 12.8 19.2 25.6 32 32l-44.8 76.8c-44.8-19.2-96-6.4-121.6 38.4-12.8 12.8-12.8 25.6-12.8 44.8H467.2c0-44.8-38.4-83.2-89.6-83.2-12.8 0-32 6.4-44.8 12.8l-44.8-83.2c38.4-25.6 51.2-76.8 32-115.2zM102.4 704v-51.2h825.6v51.2H102.4zM512 416c51.2 0 96-38.4 96-89.6S569.6 236.8 512 236.8c-51.2 0-96 38.4-96 89.6 0 51.2 44.8 89.6 96 89.6z" ></path></symbol><symbol id="icon-zhucaidanguanli" viewBox="0 0 1169 1024"><path d="M787.333831 588.946093a75.189984 75.189984 0 0 0-75.093984 75.092984 75.189984 75.189984 0 0 0 75.093984 75.093984 75.165984 75.165984 0 0 0 75.067984-75.093984 75.165984 75.165984 0 0 0-75.067984-75.092984m0 222.841953a147.919968 147.919968 0 0 1-147.748968-147.748969c0-81.455982 66.291986-147.747968 147.748968-147.747968 81.431983 0 147.747968 66.291986 147.747968 147.747968 0 81.480982-66.315986 147.748968-147.747968 147.748969m89.452981 102.106978c0.342 0.244 1.317 0.585 2.315999 0.585h0.122l71.484985-39.496992c-1.706-4.022999-9.605998-23.478995-9.605998-43.739991a113.858976 113.858976 0 0 1 107.739977-113.613975c0.853-4.729999 5.557999-31.524993 5.557998-51.639989s-4.704999-46.88399-5.558998-51.637989a113.858976 113.858976 0 0 1-107.738977-113.565976c0-20.357996 7.923998-39.813991 9.605998-43.81299l-70.313985-39.057992-0.293-0.025a5.339999 5.339999 0 0 0-2.706 0.732 196.753958 196.753958 0 0 1-26.014994 21.819995c-21.698995 15.238997-42.153991 22.967995-60.951987 22.967995-18.919996 0-39.594991-7.874998-61.390987-23.405995a194.705958 194.705958 0 0 1-26.160994-22.283995 5.777999 5.777999 0 0 0-2.729999-0.707h-0.245l-72.824985 40.032992c1.706 4.046999 9.580998 23.479995 9.580998 43.73999A113.858976 113.858976 0 0 1 528.895886 614.350088c-0.854 4.729999-5.509999 31.524993-5.509998 51.638989s4.655999 46.90899 5.533998 51.662989a113.858976 113.858976 0 0 1 107.763977 113.589975c0 20.334996-7.972998 39.863991-9.679998 43.788991l68.973985 38.545992h0.146c1.024 0 1.95-0.365 2.317-0.585a200.849957 200.849957 0 0 1 26.428994-23.161995c22.088995-16.188997 43.079991-24.429995 62.414987-24.429995 19.552996 0 40.715991 8.387998 62.950986 24.917995 14.920997 11.068998 25.258995 22.185995 26.550995 23.575995m22.673995 108.397976c-13.774997-0.025-27.135994-5.704999-35.765993-15.213996-11.775997-12.896997-49.005989-46.44599-79.530982-46.44599-30.280993 0-68.119985 33.767993-78.993984 45.54399-8.606998 9.386998-21.869995 14.969997-35.498992 14.969997-6.484999 0-12.604997-1.243-18.187996-3.706l-0.975-0.414-92.69698-51.833988-0.926-0.683a44.46999 44.46999 0 0 1-14.920996-53.735989c0.049-0.146 8.532998-19.699996 8.532998-37.594992a98.376979 98.376979 0 0 0-98.254979-98.254978h-3.900999c-15.505997 0-28.159994-13.799997-32.182993-35.108993-0.341-1.706-7.923998-42.178991-7.923999-74.044984 0-31.913993 7.557998-72.361984 7.899999-74.117984 4.119999-21.576995 16.992996-35.449992 32.816993-35.083993h3.266999a98.400979 98.400979 0 0 0 98.279979-98.303978c0-17.846996-8.484998-37.399992-8.558998-37.619992a44.34899 44.34899 0 0 1 15.067996-53.661989l0.95-0.658 97.840979-53.759988 1.024-0.415c5.485999-2.364999 11.507998-3.534999 17.895996-3.534999 13.604997 0 26.891994 5.436999 35.595992 14.628997 11.580998 12.116997 48.17699 43.641991 77.774984 43.64199 29.354994 0 65.755986-30.914993 77.287983-42.812991 8.654998-8.996998 21.844995-14.335997 35.302992-14.335997 6.509999 0 12.653997 1.219 18.285997 3.657l0.974999 0.414 94.47698 52.516988 0.95 0.658c16.895996 11.751997 23.332995 34.889993 14.945997 53.735989-0.049 0.146-8.532998 19.699996-8.532999 37.545992a98.400979 98.400979 0 0 0 98.254979 98.279978h3.291c15.774997-0.341 28.719994 13.506997 32.816993 35.107993 0.317 1.707 7.899998 42.203991 7.899998 74.069984 0 31.889993-7.582998 72.410984-7.948998 74.117984-4.046999 21.551995-16.992996 35.424992-32.767993 35.059993h-3.291a98.400979 98.400979 0 0 0-98.254979 98.278978c0 17.846996 8.483998 37.449992 8.556999 37.619992a44.42199 44.42199 0 0 1-15.017997 53.710989l-0.927 0.683-96.133979 53.100988-0.975 0.415a44.88499 44.88499 0 0 1-17.846996 3.583999z m222.061952-705.339848a48.76199 48.76199 0 1 1-97.523979 0V121.977194c0-13.457997-10.873998-24.453995-24.307995-24.453995h-877.859811c-13.262997 0-24.306995 10.970998-24.306995 24.453995v584.995874c0 13.457997 10.873998 24.453995 24.307995 24.453995h219.500953a48.76199 48.76199 0 1 1 0 97.523979H48.907989A48.76199 48.76199 0 0 1 0 780.190052V48.76221C0 21.822215 21.893995 0.00022 48.907989 0.00022h1023.706781a48.76199 48.76199 0 0 1 48.907989 48.76199v268.189942zM219.427953 975.23701c0-26.940994 21.991995-48.76199 48.981989-48.761989h194.607959a48.76199 48.76199 0 1 1 0 97.523979H268.433942a48.76199 48.76199 0 0 1-49.005989-48.76199z" ></path></symbol><symbol id="icon-caidanguanli" viewBox="0 0 1024 1024"><path d="M414.2 78H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V153.3c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V153.3c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM414.2 544.8H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V620.1c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V620.1c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM908.8 119.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 343.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 568.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 792.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35z" ></path></symbol><symbol id="icon-jueseguanli" viewBox="0 0 1024 1024"><path d="M874.9 577.3c-26.1-27.2-56.8-48.9-90.3-64.1 5.4-4.6 10.6-9.6 15.5-14.8 32.3-34.7 50.1-79.8 50.1-127.2 0-102.9-83.7-186.7-186.7-186.7-11 0-21.8 0.9-32.5 2.8-7.1-9.6-14.9-18.7-23.4-27.2-44.6-44.6-103.9-69.2-167-69.2s-122.4 24.6-167 69.2-69.2 103.9-69.2 167 24.6 122.4 69.2 167c10.8 10.8 22.4 20.4 34.8 28.7-4.9 1.8-9.7 3.8-14.5 5.8-44.9 19-85.2 46.2-119.9 80.8-34.6 34.6-61.8 75-80.8 119.9-19.7 46.5-29.6 95.9-29.6 146.8 0 17.7 1.2 35.5 3.7 52.9l69.3-9.7c-2-14.2-3-28.7-3-43.1 0-169.4 137.8-307.1 307.1-307.1s307.1 137.8 307.1 307.1c0 14.4-1 28.9-3 43.1l69.3 9.7c2.4-17.4 3.7-35.2 3.7-52.9 0-50.9-10-100.3-29.6-146.8-19-44.9-46.2-85.2-80.8-119.9-34.6-34.6-74.9-61.8-119.9-80.8-4.8-2-9.7-4-14.6-5.8 12.3-8.4 24-18 34.8-28.7 44.6-44.6 69.2-103.9 69.2-167 0-25-3.9-49.4-11.3-72.6 63.4 1.1 114.7 53 114.7 116.6 0 45.5-26.6 85.6-65.3 104.7-16.3 8.1-26.8 24.4-26.8 42.6v1c0 21.2 14.1 40 34.6 45.5 94.9 25.8 163.8 112.4 163.8 215 0 10.5-0.7 21-2.2 31.3l69.3 9.7c1.9-13.5 2.9-27.3 2.9-41-0.1-75.8-29.1-147.8-81.7-202.6z m-434.3-84c-91.6 0-166.2-74.6-166.2-166.2S349 160.9 440.6 160.9s166.2 74.6 166.2 166.2-74.5 166.2-166.2 166.2z" ></path></symbol><symbol id="icon-zhiweiguanli" viewBox="0 0 1024 1024"><path d="M878.4 243.5h-91.2v-41.2c0-58.6-47.7-106.2-106.2-106.2H354.2c-58.6 0-106.2 47.7-106.2 106.2v41.2h-91.2c-43.2 0-78.4 35.1-78.4 78.4V856c0 43.2 35.1 78.4 78.4 78.4h721.5c43.2 0 78.4-35.1 78.4-78.4V321.8c0-43.2-35.1-78.3-78.3-78.3zM318 202.3c0-20 16.2-36.2 36.2-36.2H681c20 0 36.2 16.3 36.2 36.2v41.2H318v-41.2zM156.8 313.5h721.5c4.6 0 8.4 3.7 8.4 8.4V554H692.4c-14.8-45.3-57.4-78.2-107.6-78.2H450.4c-50.2 0-92.9 32.9-107.6 78.2H148.5V321.8c0-4.6 3.7-8.3 8.3-8.3zM628 588.9c0 23.8-19.4 43.2-43.2 43.2H450.4c-23.8 0-43.2-19.4-43.2-43.2 0-23.8 19.4-43.2 43.2-43.2h134.3c23.9 0 43.3 19.4 43.3 43.2z m250.4 275.5H156.8c-4.6 0-8.4-3.7-8.4-8.4V623.9h194.3c14.8 45.3 57.4 78.2 107.6 78.2h134.3c50.2 0 92.9-32.9 107.6-78.2h194.3V856c0.2 4.6-3.5 8.4-8.1 8.4z" ></path></symbol><symbol id="icon-bumenguanli" viewBox="0 0 1024 1024"><path d="M322.5 62h384.6v70H322.5z" ></path><path d="M870.2 62h-59.3v70h59.3c7.2 0 13 5.8 13 13v733.9c0 7.2-5.8 13-13 13h-720c-7.2 0-13-5.8-13-13V145c0-7.2 5.8-13 13-13h68.6V62h-68.6c-45.8 0-83 37.2-83 83v733.9c0 45.8 37.2 83 83 83h720c45.8 0 83-37.2 83-83V145c0-45.8-37.3-83-83-83z" ></path><path d="M295 806.2c-0.5-5.7-0.7-11.6-0.7-17.3 0-119 96.8-215.8 215.8-215.8S726 669.8 726 788.8c0 5.8-0.2 11.6-0.7 17.3l69.8 5.6c0.6-7.6 0.9-15.3 0.9-22.9 0-76.4-29.7-148.1-83.7-202.1-29.7-29.8-64.9-52.1-103.3-66.2 45.6-31.5 75.5-84.1 75.5-143.5 0-96.1-78.2-174.4-174.4-174.4-96.1 0-174.4 78.2-174.4 174.4 0 59.5 29.9 112 75.5 143.5C373 534.6 337.8 557 308 586.7c-54 54-83.7 125.8-83.7 202.1 0 7.6 0.3 15.3 0.9 22.9l69.8-5.5z m215.2-533.6c57.5 0 104.4 46.8 104.4 104.4 0 57.5-46.8 104.4-104.4 104.4-57.5 0-104.4-46.8-104.4-104.4 0-57.6 46.8-104.4 104.4-104.4z" ></path></symbol><symbol id="icon-gerenzhongxin" viewBox="0 0 1024 1024"><path d="M930.4 337.3c-22.7-53.7-55.2-101.9-96.6-143.3-41.4-41.4-89.6-73.9-143.3-96.6C634.9 73.9 575.9 62 515.1 62c-60.8 0-119.9 11.9-175.5 35.4-53.7 22.7-101.9 55.2-143.3 96.6-41.4 41.4-73.9 89.6-96.6 143.3-23.5 55.6-35.4 114.6-35.4 175.5 0 50.5 8.3 100.1 24.7 147.4l66.1-22.9c-13.8-39.9-20.8-81.8-20.8-124.5 0-209.9 170.8-380.7 380.7-380.7 209.9 0 380.8 170.8 380.8 380.7 0 41.6-6.7 82.5-19.8 121.5l66.3 22.3c15.6-46.2 23.5-94.7 23.5-143.9 0-60.8-11.9-119.8-35.4-175.4z" ></path><path d="M656.9 422.2c0-76.9-62.6-139.5-139.5-139.5s-139.5 62.6-139.5 139.5 62.6 139.5 139.5 139.5 139.5-62.6 139.5-139.5z m-209 0c0-38.3 31.2-69.5 69.5-69.5s69.5 31.2 69.5 69.5-31.2 69.5-69.5 69.5-69.5-31.2-69.5-69.5zM713.8 627.8c-62-27.2-128.1-40.9-196.4-40.9-69 0-135.7 14-198.2 41.7-60.4 26.7-114.1 64.9-159.5 113.3l-20.3 21.7 18.1 23.6c41.2 53.6 94.8 98 155 128.3 63.2 31.8 131.3 48 202.6 48 71.9 0 140.6-16.4 204.2-48.8 60.7-30.9 114.5-76 155.6-130.4l17.9-23.7-20.5-21.6c-45.3-47.6-98.6-85-158.5-111.2zM515.1 893.5c-109 0-210.3-45.3-282.5-125.4 77.7-71.9 177.7-111.2 284.8-111.2 105.8 0 204.9 38.4 282.2 108.8-72.2 81.6-174.3 127.8-284.5 127.8z" ></path></symbol><symbol id="icon-yonghuguanli" viewBox="0 0 1024 1024"><path d="M751.4 553.2c-42.5-38.5-92.1-67.1-145.5-84.6 53.2-38.9 87.8-101.8 87.8-172.7C693.7 178 597.7 82 479.8 82c-57.1 0-110.8 22.2-151.2 62.6C288.2 185 266 238.7 266 295.8s22.2 110.8 62.6 151.2c7.8 7.8 16.2 15 25 21.4-10.5 3.5-20.9 7.3-31.2 11.7-48.2 20.4-91.4 49.5-128.5 86.7s-66.3 80.4-86.7 128.5c-21.1 49.9-31.8 102.9-31.8 157.4 0 24.8 2.3 49.7 6.8 73.9l68.8-12.7c-3.7-20-5.6-40.6-5.6-61.2 0-184.4 150-334.4 334.4-334.4 83.2 0 163 30.8 224.5 86.6l47.1-51.7zM479.8 152c79.3 0 143.9 64.5 143.9 143.9s-64.5 143.9-143.9 143.9S336 375.2 336 295.9 400.5 152 479.8 152zM726.3 665.3h213.8v70H726.3zM503 831.6h437.1v70H503z" ></path></symbol><symbol id="icon-app" viewBox="0 0 1024 1024"><path d="M363.485867 865.117867h305.5616c21.6576 0 39.2192-17.194667 39.2192-38.4s-17.5616-38.4-39.2192-38.4H363.485867c-21.6576 0-39.2192 17.194667-39.2192 38.4s17.5616 38.4 39.2192 38.4z" fill="#A6ADB4" ></path><path d="M945.288533 699.835733a40.448 40.448 0 0 0-43.195733 43.1872v147.037867a46.865067 46.865067 0 0 1-45.960533 48.708267H166.766933a46.882133 46.882133 0 0 1-45.038933-48.708267v-147.029333a40.439467 40.439467 0 1 0-80.887467 0v147.029333a125.883733 125.883733 0 0 0 125.9264 128.657067h693.0432c70.203733-1.006933 126.4384-58.461867 125.9264-128.657067v-147.029333a40.430933 40.430933 0 0 0-40.448-43.195734zM40.840533 127.735467v147.959466a39.517867 39.517867 0 0 0 79.044267 0V127.735467a45.943467 45.943467 0 0 1 46.882133-47.786667h693.0432a46.882133 46.882133 0 0 1 45.960534 47.786667v147.959466a39.509333 39.509333 0 0 0 39.517866 39.509334 40.448 40.448 0 0 0 40.448-39.509334V127.735467C986.248533 58.052267 930.423467 1.024 860.7232 0H166.775467A125.934933 125.934933 0 0 0 40.840533 127.744z m168.4992 427.972266H326.229333L357.316267 640H418.133333L295.150933 315.733333h-52.701866L119.466667 640h60.817066l29.056-84.292267zM269.124267 392.533333L307.2 503.466667h-76.8l38.724267-110.933334z m231.552 131.959467h32.631466a123.246933 123.246933 0 0 0 88.192-28.535467c23.389867-19.959467 36.394667-49.134933 35.413334-79.488 1.6384-28.245333-9.838933-55.722667-31.249067-74.743466a127.573333 127.573333 0 0 0-84.0192-25.813334H443.733333V640h56.942934V524.4928zM503.466667 366.933333h32.136533c42.180267 0 61.602133 17.493333 61.602133 53.162667 1.092267 16.0256-4.8128 31.701333-16.068266 42.666667a71.364267 71.364267 0 0 1-51.5584 14.677333H503.466667V366.933333z m286.293333-51.0976H691.2V640h57.3184V524.4672h32.853333c31.837867 1.928533 63.189333-8.311467 87.381334-28.544 23.543467-19.959467 36.625067-49.152 35.643733-79.505067 1.536-28.100267-9.710933-55.441067-30.754133-74.752a131.84 131.84 0 0 0-83.882667-25.8304z m39.4752 147.131734a73.813333 73.813333 0 0 1-49.527467 14.72H750.933333V366.933333h32.119467c42.1632 0 61.576533 17.527467 61.576533 53.2736 1.262933 15.957333-4.394667 31.650133-15.394133 42.752z" fill="#A6ADB4" ></path></symbol><symbol id="icon-yepian" viewBox="0 0 1024 1024"><path d="M807.936 99.328c-17.408 0-32.256 9.216-40.448 23.552h-348.16L284.672 355.84l35.84 35.84 126.976-219.648h321.536c8.192 12.8 22.528 20.992 38.912 20.992 25.6 0 46.592-20.992 46.592-46.592s-20.992-47.104-46.592-47.104z" ></path><path d="M301.056 50.688c-8.704 14.848-7.68 32.768 0 46.592L127.488 399.36l134.656 232.448 48.64-13.312L183.808 399.36l160.256-279.04c15.36-1.024 29.696-9.216 37.888-23.04 12.8-22.528 5.12-50.688-17.408-63.488s-50.688-5.632-63.488 16.896z" ></path><path d="M15.872 467.456c8.704 14.848 24.064 23.552 40.448 23.552L228.352 793.6l268.8 1.536 13.312-48.64-253.44-1.536-159.232-279.552c6.656-13.312 7.168-30.208-1.024-44.032-12.8-22.528-40.96-30.208-63.488-17.408-22.528 12.8-30.208 40.96-17.408 63.488z" ></path><path d="M216.064 924.672c17.408 0 32.256-9.216 40.448-23.552h348.16l134.144-232.448-35.84-35.84-126.976 219.648H254.976c-8.192-12.8-22.528-20.992-38.912-20.992-25.6 0-46.592 20.992-46.592 46.592s20.992 46.592 46.592 46.592z" ></path><path d="M722.944 973.312c8.704-14.848 7.68-32.768 0-46.592l173.568-302.08-134.656-232.448-48.64 13.312 127.488 219.136-160.256 279.04c-15.36 1.024-29.696 9.216-37.888 23.04-12.8 22.528-5.12 50.688 17.408 63.488 22.016 13.312 50.176 5.632 62.976-16.896z" ></path><path d="M1008.128 556.544c-8.704-14.848-24.064-23.552-40.448-23.552L795.648 230.4l-268.8-1.536-13.312 48.64 253.44 1.536 159.232 279.552c-6.656 13.312-7.168 30.208 1.024 44.032 12.8 22.528 40.96 30.208 63.488 17.408 22.528-12.8 30.208-40.96 17.408-63.488zM512 391.168C445.44 391.168 391.168 445.44 391.168 512S445.44 632.832 512 632.832s120.832-54.272 120.832-120.832S578.56 391.168 512 391.168z m0 196.096c-41.472 0-75.264-33.792-75.264-75.264s33.792-75.264 75.264-75.264 75.264 33.792 75.264 75.264-33.792 75.264-75.264 75.264z" ></path></symbol><symbol id="icon-left-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178c-4.4-3.2-4.4-9.7 0-12.9l246-178c5.3-3.8 12.7-0.1 12.7 6.5v46.8z" ></path></symbol><symbol id="icon-right-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" ></path></symbol><symbol id="icon-xitongguanli" viewBox="0 0 1026 1024"><path d="M400.896 67.072H140.8c-24.064 0-46.592 11.264-59.392 29.696-9.216 12.8-14.848 27.648-14.848 44.544v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24V141.312c0.512-40.96-33.28-74.24-73.728-74.24z m0 361.984v9.216-9.216z m335.872 83.456c18.432 0 35.328-7.168 48.128-20.48L939.008 337.92c12.8-12.8 20.48-29.696 20.48-48.128s-7.168-35.328-20.48-48.128l-154.112-155.648c-26.112-26.112-70.656-26.112-96.256 0l-154.112 154.112c-12.8 12.8-20.48 29.696-20.48 48.128 0 18.432 7.168 35.328 20.48 48.128l154.112 154.112c12.8 14.336 29.184 22.016 48.128 22.016z m0-369.152l146.432 146.432-146.432 146.432-144.896-146.432L736.768 143.36z m-335.872 406.016H140.8c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0.512-40.448-33.28-74.24-73.728-74.24z m0 352.768v18.432-18.432z m484.352-352.768h-259.584c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0-40.448-33.792-74.24-74.24-74.24z" ></path></symbol><symbol id="icon-gongjianku" viewBox="0 0 1024 1024"><path d="M798.72 320v446.976H223.232V320H63.488v532.48c0 41.472 33.792 75.264 75.264 75.264h745.472c41.472 0 75.264-33.792 75.264-75.264v-532.48H798.72z" ></path><path d="M608.256 494.592z m-10.24-4.608z" ></path><path d="M819.2 96.256H203.776c-41.472 0-75.264 33.792-75.264 75.264V286.72h128v448h510.464V286.72h128V171.008c-0.512-41.472-34.304-74.752-75.776-74.752z m-154.112 493.056l-12.8 12.8c-12.8 12.8-33.28 12.8-46.08 0L477.184 473.088c-33.792 11.776-72.704 4.608-99.328-22.528-27.136-27.136-34.304-66.048-22.528-99.84l38.4 38.4c12.8 12.8 33.28 12.8 46.08 0l12.8-12.8c12.8-12.8 12.8-33.28 0-46.08L414.208 291.84c33.792-11.776 72.704-4.096 99.84 22.528 27.136 27.136 34.304 66.048 22.528 99.84l128.512 128.512c12.288 13.312 12.288 33.792 0 46.592z" ></path></symbol><symbol id="icon-fangfaku" viewBox="0 0 1024 1024"><path d="M256 170.496v170.496h512V170.496h85.504c23.552 0 42.496 18.944 42.496 42.496V896c0 23.552-18.944 42.496-42.496 42.496H170.496c-23.552 0-42.496-18.944-42.496-42.496V212.992c0-23.552 18.944-42.496 42.496-42.496H256z m256 513.024H256v83.456h256v-83.456zM768 491.52H256v83.456h512V491.52zM341.504 85.504h341.504V256H341.504V85.504z" ></path></symbol><symbol id="icon-shebeiku" viewBox="0 0 1024 1024"><path d="M960 491.52v380.416c0 26.112-23.04 47.616-52.224 47.616H116.224c-29.184 0-52.224-21.504-52.224-47.616V491.52c0-26.112 23.04-47.616 52.224-47.616h791.552c28.672 0 52.224 21.504 52.224 47.616z m-149.504 156.16H213.504V783.36h596.992v-135.68z m149.504-500.736v186.88c0 23.04-20.992 42.496-46.592 42.496H110.592c-25.6 0-46.592-18.944-46.592-42.496V146.944c0-23.04 20.992-42.496 46.592-42.496h802.304c26.112 0 47.104 18.944 47.104 42.496z m-671.744 25.6c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096S363.008 278.528 363.008 240.64s-33.792-68.096-74.752-68.096z m224.256 0c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096 74.752-30.208 74.752-68.096-33.792-68.096-74.752-68.096z" ></path></symbol><symbol id="icon-wenjian" viewBox="0 0 1024 1024"><path d="M273.54647 325.996013h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-10.234057-0.511703-19.956411-4.605326-26.608548-11.257463-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.956411 17.397897-35.307497 37.866011-34.284091v1.023406z m0 209.286467h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-9.722354 0-19.444708-3.58192-26.608548-10.234057-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.444708 17.397897-35.307497 37.354308-34.284091z m0 185.748136h324.931312c19.444708 0 35.307497 15.862788 35.307497 34.795794 0 19.444708-15.862788 34.795794-35.307497 34.795794H273.54647c-9.722354-0.511703-19.444708-4.093623-26.608548-10.74576-6.652137-6.140434-10.74576-14.839383-10.74576-24.050034 0.511703-19.444708 17.397897-35.307497 37.354308-34.795794zM135.898402 0.041294h96.71184c17.397897-0.511703 33.772388 8.187246 43.494742 22.514926l53.217097 82.38416c4.605326 7.16384 12.792571 11.769166 20.979817 11.257462h322.884501c8.698949 0 16.886194-4.093623 21.49152-11.257462l53.217097-82.38416c9.722354-14.32768 26.096846-23.026628 43.494742-22.514926h97.223543c53.7288-1.535109 98.246948 39.912823 100.293759 93.12992v837.657572c-2.046811 52.705394-46.56496 94.153325-100.293759 93.12992h-752.203196c-53.7288 1.535109-98.758651-39.912823-100.293759-92.618217V93.171214C37.139751 39.954117 82.169603-1.493814 135.898402 0.041294z m82.895863 70.103291H135.898402c-6.652137 0-13.304274 2.558514-18.421303 6.652138-4.605326 4.093623-7.16384 10.234057-7.16384 16.374491v837.657572c0.511703 13.304274 11.769166 23.538331 25.07344 23.026629h752.203196c6.652137 0 13.304274-2.558514 18.421303-6.652138 4.605326-4.093623 7.16384-10.234057 7.16384-16.374491V93.171214c0.511703-6.140434-2.046811-12.280868-7.16384-16.374491-5.117029-4.605326-11.257463-6.652137-18.421303-6.652138h-82.895862l-46.053257 70.614994c-18.933006 28.65536-51.681988 45.541554-86.477783 45.029851H350.813601c-34.795794 0.511703-67.544777-16.374491-86.477782-45.029851l-45.541554-70.614994zM399.425372 0.041294h225.149256c19.956411-0.511703 36.842605 15.351086 37.866011 34.795795-0.511703 19.956411-17.397897 35.307497-37.866011 34.795794H399.425372c-10.234057-0.511703-19.956411-4.093623-27.120251-10.74576-6.652137-6.140434-10.74576-15.351086-10.234057-24.050034C362.582767 15.39238 378.957258-0.470408 399.425372 0.041294z" ></path></symbol><symbol id="icon-bianjimoban" viewBox="0 0 1025 1024"><path d="M127.110228 701.648461q0 26.438928 18.812314 45.251241t46.268123 18.812314l253.203575 0 0 128.12711-318.284012 0q-26.438928 0-49.82721-9.660377t-40.675273-26.947368-26.947368-40.675273-9.660377-50.844091l0-637.584906q0-26.438928 9.660377-49.82721t26.947368-40.675273 40.675273-27.455809 49.82721-10.168818l766.728898 0q26.438928 0 49.82721 10.168818t40.675273 27.455809 27.455809 40.675273 10.168818 49.82721l0 187.106256-128.12711 1.016882q-2.033764-25.422046-19.829196-43.217478t-44.234359-17.795432l-637.584906 0q-27.455809 0-46.268123 18.812314t-18.812314 45.251241l0 382.347567zM1016.881827 501.322741q6.101291 9.151936 7.626614 23.388282t-10.677259 28.472691q-11.1857 14.236346-18.303873 21.354518l-8.135055 8.135055-105.75571-95.586892q5.084409-6.101291 14.236346-14.744786t14.236346-13.727905q14.236346-14.236346 30.506455-12.711023t27.455809 6.609732q12.202582 5.084409 26.438928 18.812314t22.3714 29.998014zM613.179742 789.100298q3.050645-3.050645 14.236346-16.270109t27.96425-32.540218 37.116187-42.200596 40.675273-46.268123q48.810328-54.911619 108.806356-122.025819l107.789474 95.586892q-59.996028 68.131082-108.806356 123.042701-20.337637 23.388282-40.675273 46.268123t-37.116187 41.183714-27.455809 29.998014-12.711023 13.727905q-9.151936 12.202582-25.422046 20.337637-7.118173 5.084409-21.354518 11.1857t-29.998014 12.202582-29.489573 10.677259-20.846077 5.59285q-26.438928 5.084409-23.388282-22.3714 1.016882-7.118173 4.067527-21.862959t6.609732-30.506455 7.118173-28.981132 5.59285-18.303873q5.084409-13.219464 17.286991-28.472691z" ></path></symbol><symbol id="icon-shanchu1" viewBox="0 0 1024 1024"><path d="M78.768011 168.230165c0-30.999918 24.230644-56.076722 54.15419-56.076722L403.692131 112.153443 403.692131 56.076722c0-30.999918 24.230644-56.076722 54.15419-56.076722l108.306335 0c29.923546 0 54.155214 25.076803 54.155214 56.076722l0 56.077745 270.768906 0c29.923546 0 54.15419 25.076803 54.15419 56.076722l0 56.076722L78.768011 224.307909 78.768011 168.230165zM891.076776 336.461352l0 112.153443 0 519.30746c0 30.923181-24.231667 56.077745-54.153167 56.077745L187.076392 1024c-29.923546 0-54.15419-25.154564-54.15419-56.077745L132.922201 448.614796 132.922201 336.461352l0-56.077745 758.154574 0L891.076776 336.461352zM349.53794 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L349.53794 448.614796zM566.153679 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L566.153679 448.614796zM782.770441 448.614796c0-30.923181-24.231667-56.076722-54.155214-56.076722s-54.15419 25.153541-54.15419 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.15419 56.077745s54.155214-25.154564 54.155214-56.077745L782.770441 448.614796z" ></path></symbol><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M923.9 335.8c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.8-35.2-174.3-35.2S392.2 74.1 337 97.5c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3C75.3 391 63.5 449.7 63.5 510.1c0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c35.9-15.2 69.3-34.8 99.8-58.5l-0.1-0.1c9.1-7.4 14.8-18.6 14.8-31.2 0-22.3-18-40.3-40.3-40.3-9.2 0-17.7 3.1-24.5 8.3l-0.2-0.3c-62 47.9-139.7 76.4-223.9 76.4-202.3 0-366.9-164.6-366.9-366.9s164.7-366.9 367-366.9 366.9 164.6 366.9 366.9c0 66.2-17.6 128.3-48.4 182l0.4 0.2c-4.4 6.5-7 14.2-7 22.6 0 22.3 18 40.3 40.3 40.3 16 0 29.8-9.3 36.3-22.8l0.2 0.1c8.9-15.5 16.8-31.5 23.8-48.1 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.7-119.1-35.1-174.3z" ></path><path d="M693.7 626.5H507.6l-57.1 66.1h243.2zM663.2 411.4c7.5-7.6 7.5-23.5 0-31.3l-45.4-46.8c-7.7-7.6-22.9-7.6-30.4 0l-45.7 46.8 76.1 78.1 45.4-46.8zM328.8 614.5v78.1h76.1l197.5-218.7-76-77.9z" ></path></symbol><symbol id="icon-new" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M695.7 469.2h-139v-139c0-23.6-19.3-43-43-43-23.6 0-43 19.3-43 43v139h-139c-23.6 0-43 19.3-43 43s19.3 43 43 43h139v139c0 23.7 19.3 43 43 43 23.6 0 43-19.3 43-43v-139h139c23.6 0 43-19.3 43-43s-19.4-43-43-43z" ></path></symbol><symbol id="icon-biaoqianye1" viewBox="0 0 1024 1024"><path d="M345.557333 128l110.677334 168.405333H938.666667V896H85.333333V128h260.224zM299.52 213.333333H170.666667v597.333334h682.666666V381.738667H410.197333L299.52 213.333333z" fill="#222222" ></path><path d="M597.333333 136.533333c0-4.693333 3.541333-8.533333 7.893334-8.533333h325.546666c4.352 0 7.893333 3.84 7.893334 8.533333v68.266667c0 4.693333-3.541333 8.533333-7.893334 8.533333h-325.546666C600.874667 213.333333 597.333333 209.493333 597.333333 204.8V136.533333z" fill="#222222" ></path></symbol><symbol id="icon-biaoqianye" viewBox="0 0 1024 1024"><path d="M376.6 494.8c5.1 4.8 7.9 11.7 7.6 18.7 0.4 7.1-2.5 14-7.6 18.7-5.3 4.7-12.3 7.2-19.3 6.9h-69.6v235.1c0.2 7.4-2.9 14.4-8.4 19.1-5.5 5.4-12.9 8.3-20.5 8.1-7.6 0.3-15.1-2.7-20.5-8.1-5.3-4.9-8.2-11.9-8.1-19.1v-235H161c-7.2 0.3-14.2-2.3-19.3-7.3-5.2-4.8-8-11.7-7.6-18.7-0.3-7 2.5-13.7 7.6-18.3 5.3-4.8 12.2-7.3 19.3-7h198.4c6.3 0 12.4 2.5 17.2 6.9z m215.7 70.1c5.2 5.1 8 12.2 7.7 19.6v189.9c0.3 7.2-2.5 14.2-7.7 19.1-4.8 5.3-11.7 8.3-18.9 8.1-7.1 0.1-13.9-2.7-18.9-7.7-4.8-5.2-7.6-12-7.6-19.1-18 19.5-42.9 30.8-69.2 31.4-19.7 0.3-38.9-5.3-55.5-15.9-17.2-10.7-31.2-26.1-40.3-44.4-19.3-40.4-19.3-87.6 0-128 8.9-18.4 22.9-33.8 40.3-44.4 16-10.5 34.8-16.1 53.9-15.9 26.3-0.1 51.8 9.8 71.2 27.7-0.2-7.3 2.6-14.4 7.7-19.6 10.6-10.2 27.2-10.2 37.8 0l-0.5-0.8z m-61.2 168.7c24.1-31.6 24.1-75.6 0-107.2-11.5-14.3-28.9-22.3-47.1-21.6-17.9-0.5-35.1 7.4-46.3 21.6-12.1 15-18.5 34-18.1 53.4-0.6 19.5 5.7 38.6 17.7 53.8 11.6 13.9 28.8 21.7 46.7 21.2 18.1 0.4 35.3-7.4 47.1-21.2zM835.4 573c17.1 10.7 31 25.9 40.3 44 9.9 19.8 14.9 41.8 14.5 64 0.4 22.3-4.6 44.4-14.5 64.4-9 18.3-23 33.7-40.3 44.4-16 10.6-34.8 16.1-53.9 15.9-13.9 0.2-27.7-2.9-40.3-9-11.6-5-22.1-12.2-31-21.2v2.8c0.2 7.2-2.5 14.2-7.5 19.4-5 5.1-11.9 8-19.1 7.9-7.1 0.3-14-2.5-18.9-7.7-5.2-5.1-8-12.2-7.6-19.6V497.2c-0.2-7.3 2.5-14.4 7.6-19.6 10.6-10.3 27.2-10.3 37.8 0 5.1 5.2 7.9 12.2 7.6 19.6v93.3c8-9.8 18-17.7 29.4-23.2 12.4-6.8 26.2-10.3 40.3-10.2 19.7-0.2 39 5.3 55.6 15.9z m-15.7 163c12.2-15.1 18.6-34.3 18.1-53.8 0.6-19.4-5.7-38.3-17.7-53.4-12-13.4-29-21.1-46.9-21.1s-34.9 7.7-46.9 21.1c-24.1 31.6-24.1 75.6 0 107.2 11.6 14.1 29 22.1 47.1 21.6 18.3-0.2 35.4-9.1 46.3-24v2.4zM708.1 253.5c-15.5 0-28-12.5-28-28V113.4c-0.1-8 0-15.9 0-23.8V77.9c0-15.5 12.5-28 28-28H886c17 0 32.9 6.6 45 18.6 11.3 11.3 17.8 26 18.6 41.8 0.1 0.7 0.1 1.4 0.1 2.1v113.2c0 15.5-12.5 28-28 28H708.1z m28-56h157.4v-84.1c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.4-2.2-5.4-2.2H736.1v91.7zM371.9 254.6c-15.5 0-28-12.5-28-28V78.9c0-15.4 12.5-27.9 27.9-28l213.4-1.1h0.1c17 0 32.9 6.6 45 18.6 12 12.1 18.6 28 18.6 45v113.2c0 15.5-12.5 28-28 28h-249z m28-56.1h193v-85.2c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.3-2.2-5.3-2.2l-185.5 0.9v91.9z" fill="#595959" ></path><path d="M72.4 974.2c-17.3 0-33.5-6.7-45.7-18.7-12.2-12.1-18.9-28.1-18.9-45.1V113.6c0-35.2 29-63.8 64.6-63.8h169c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28.1 18.9 45.1V283c0 2 0.8 3.9 2.3 5.4 1.5 1.4 3.4 2.2 5.4 2.2h637.9c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28 18.9 45.1v556c0 17.1-6.7 33.1-18.9 45.1s-28.4 18.7-45.7 18.7H72.4z m7.7-860.6c-4.3 0-7.7 3.4-7.7 7.6v788.7c0 2 0.8 4 2.3 5.4 1.4 1.4 3.4 2.2 5.4 2.2h871.5c2.1 0 4-0.8 5.4-2.2 1.5-1.4 2.3-3.3 2.3-5.4V350.6c0-2-0.8-3.9-2.2-5.3-1.5-1.5-3.4-2.3-5.4-2.3h-638c-17.3 0-33.5-6.7-45.7-18.7-12.2-12-18.9-28.1-18.9-45.1V121.1c0-2-0.8-3.9-2.3-5.4-1.4-1.4-3.4-2.2-5.4-2.2H80.1z" fill="#595959" ></path></symbol><symbol id="icon-buzhou" viewBox="0 0 1024 1024"><path d="M488.106667 792.462222h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444444 28.444444 28.444444 0 0 0-28.444445-28.444445H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444445 28.444444 28.444444 0 0 0 28.444445 28.444444zM242.346667 764.017778A80.782222 80.782222 0 1 0 341.333333 686.08v-96.142222a80.213333 80.213333 0 0 0 0-155.875556V337.92a80.782222 80.782222 0 1 0-39.822222 0v96.142222a80.213333 80.213333 0 0 0 0 155.875556v96.142222a80.782222 80.782222 0 0 0-59.164444 77.937778zM284.444444 259.982222a40.96 40.96 0 0 1 81.92 0 40.391111 40.391111 0 0 1-40.391111 40.96 40.391111 40.391111 0 0 1-41.528889-40.96zM284.444444 512a40.96 40.96 0 1 1 40.96 40.96A40.96 40.96 0 0 1 284.444444 512z m40.391112 211.057778a40.391111 40.391111 0 0 1 40.391111 40.96 40.96 40.96 0 0 1-81.92 0 40.391111 40.391111 0 0 1 39.253333-40.96zM488.106667 540.444444h257.137777a28.444444 28.444444 0 1 0 0-56.888888H488.106667a28.444444 28.444444 0 1 0 0 56.888888zM488.106667 288.426667h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444445 28.444444 28.444444 0 0 0-28.444445-28.444444H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444444 28.444444 28.444444 0 0 0 28.444445 28.444445z" fill="#151515" ></path><path d="M859.022222 79.644444H164.977778a22.755556 22.755556 0 0 0-22.755556 22.755556v819.2a22.755556 22.755556 0 0 0 22.755556 22.755556h694.044444a22.755556 22.755556 0 0 0 22.755556-22.755556V102.4a22.755556 22.755556 0 0 0-22.755556-22.755556z m-22.755555 819.2H187.733333V125.155556h648.533334z" fill="#151515" ></path></symbol><symbol id="icon-ok" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M715.6 371.6c-15.7-15.7-41.4-15.7-57 0l-196 196-95.9-95.9c-15.7-15.7-41.4-15.7-57 0-15.7 15.7-15.7 41.4 0 57l124.5 124.5c15.7 15.7 41.4 15.7 57 0l224.5-224.5c15.6-15.7 15.6-41.4-0.1-57.1z" ></path></symbol><symbol id="icon-cancel" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M697.9 329.1c-15.6-15.6-41-15.6-56.6 0L513 457.4 384.7 329.1c-15.6-15.6-41-15.6-56.6 0-15.6 15.6-15.6 41 0 56.6L456.4 514 328.1 642.3c-15.6 15.6-15.6 41 0 56.6 15.6 15.6 41 15.6 56.6 0L513 570.6l128.3 128.3c15.6 15.6 41 15.6 56.6 0 15.6-15.6 15.6-41 0-56.6L569.6 514l128.3-128.3c15.6-15.6 15.6-41.1 0-56.6z" ></path></symbol><symbol id="icon-savebaocun" viewBox="0 0 1024 1024"><path d="M778.7 97.2H247.3C165 97.2 98 164.3 98 246.7v532.2c0 82.4 67 149.4 149.3 149.4h531.5c82.3 0 149.3-67 149.3-149.4V246.7C928 164.3 861 97.2 778.7 97.2z m-452.2 79.9h373.1v83.7H331.9c-2.9 0-5.5-2.6-5.5-5.5v-78.2z m373 671.3h-373v-225h373.1v225z m148.7-69.6c0 38.1-30.8 69.2-68.8 69.5V612.9c0-38.3-31.1-69.4-69.3-69.4H316c-38.2 0-69.3 31.1-69.3 69.4v235.4c-38-0.3-68.8-31.4-68.8-69.5V246.7c0-38.1 30.8-69.2 68.8-69.5v78.2c0 47.1 38.3 85.4 85.3 85.4h378c38.2 0 69.3-31.1 69.3-69.4v-94.2c38 0.3 68.8 31.4 68.8 69.5v532.1z" ></path></symbol><symbol id="icon-shijianxian2" viewBox="0 0 1024 1024"><path d="M171.52 924.16v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-322.56v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-394.24v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z" ></path><path d="M350.72 350.72c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m143.36 430.08c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m716.8-286.72h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z m284.672 250.88h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z" ></path></symbol><symbol id="icon-buzhoutiao" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#FFFFFF" fill-opacity="0" ></path><path d="M204 372c66.31 0 121.852 46.1 136.326 108h137.53c12.901-33.907 45.71-58 84.144-58 38.435 0 71.243 24.093 84.145 58h139.71c12.902-33.907 45.71-58 84.145-58 49.706 0 90 40.294 90 90s-40.294 90-90 90c-38.434 0-71.242-24.092-84.144-57.998H646.144C633.242 577.908 600.434 602 562 602c-38.434 0-71.242-24.092-84.144-57.998h-137.53C325.852 605.9 270.309 652 204 652c-77.32 0-140-62.68-140-140s62.68-140 140-140z m0 64c-41.974 0-76 34.026-76 76s34.026 76 76 76 76-34.026 76-76-34.026-76-76-76z m358 50c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z m308 0c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z" fill="#666666" ></path></symbol><symbol id="icon-m-qianming" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M573.44 646.656l-3.072 6.144c-8.192 12.288-14.336 25.088-19.456 38.912-6.656 18.944-3.072 36.352 16.896 43.008 34.816 11.264 72.704 9.216 106.496-4.608 9.216-3.072 11.264-4.096 34.304-12.8 16.384-6.656 33.792-12.8 51.2-17.408 1.024 0 2.048-0.512 3.072-1.024 10.24-2.048 6.656-5.632 16.896 1.024 3.584 3.072 8.704 4.096 13.312 3.072 4.608-1.024 5.632-3.072 8.192-7.68 5.632-8.192 3.584-19.456-4.608-25.088-18.944-12.8-22.528-10.24-41.472-6.144-1.536 0.512-3.072 0.512-4.096 1.024-18.944 5.12-37.376 11.264-55.808 18.432-22.016 8.704-24.064 9.728-32.768 12.288-24.576 10.24-52.224 12.8-78.336 6.144 4.608-11.264 10.24-22.016 16.896-32.256 1.536-2.048 2.56-4.096 3.584-6.144 8.704-13.824 15.36-29.184 18.432-45.056 4.096-19.456-7.68-38.4-27.136-42.496-0.512 0-1.536-0.512-2.048-0.512-27.648-6.656-59.392 3.072-148.992 37.888-81.92 32.256-117.76 41.984-129.024 35.84-4.096-2.56-8.704-3.072-13.312-1.536-9.728 2.56-15.36 12.8-12.8 22.016 1.024 4.608 4.096 8.192 8.192 10.752 23.04 8.704 48.64 7.68 71.168-2.048 29.696-9.216 59.392-19.456 88.064-32.256 77.824-30.72 111.104-40.448 126.976-36.352 3.072 1.024 3.072 0 2.56 3.072-2.56 12.288-7.168 23.552-13.312 33.792zM665.088 235.52c-19.456-17.92-49.664-17.408-68.608 1.024L312.32 519.68c-2.048 2.048-3.584 4.608-4.608 7.68l-22.528 80.896c-2.56 9.728 3.072 19.456 12.8 21.504 3.584 1.024 7.68 0.512 11.264-0.512l71.168-29.696c5.632-2.56 10.752-5.632 15.36-10.24l283.648-269.824 2.56-2.56c18.432-19.456 17.92-50.176-2.048-68.608l-1.024-1.024-13.824-11.776z" ></path></symbol><symbol id="icon-touxiang_avatar" viewBox="0 0 1024 1024"><path d="M925.866667 797.866667c-12.8-25.6-34.133333-46.933333-64-64-29.866667-21.333333-68.266667-34.133333-119.466667-42.666667-4.266667 0-29.866667-4.266667-59.733333-12.8-21.333333-4.266667-34.133333-8.533333-38.4-12.8v-17.066667c4.266667-51.2 29.866667-76.8 55.466666-106.666666 8.533333-8.533333 17.066667-21.333333 25.6-29.866667 29.866667-42.666667 34.133333-89.6 34.133334-98.133333 0-8.533333 0-17.066667-4.266667-21.333334-4.266667-8.533333-8.533333-12.8-12.8-21.333333 0-12.8 4.266667-21.333333 4.266667-29.866667 0-21.333333 4.266667-55.466667-4.266667-89.6 0-8.533333-4.266667-12.8-4.266667-21.333333-8.533333-25.6-17.066667-46.933333-34.133333-68.266667-4.266667-12.8-64-72.533333-234.666667-85.333333H401.066667c-4.266667 0-17.066667 0-25.6 4.266667-21.333333 4.266667-38.4 21.333333-42.666667 42.666666v21.333334c-8.533333 8.533333-55.466667 51.2-55.466667 102.4-4.266667 34.133333-4.266667 85.333333 0 123.733333-8.533333 8.533333-17.066667 21.333333-12.8 42.666667 0 12.8 4.266667 55.466667 34.133334 98.133333 8.533333 8.533333 17.066667 17.066667 25.6 29.866667 25.6 29.866667 51.2 55.466667 55.466666 106.666666v17.066667c-4.266667 4.266667-17.066667 8.533333-38.4 12.8-29.866667 8.533333-59.733333 12.8-64 12.8-46.933333 8.533333-85.333333 21.333333-115.2 42.666667-25.6 17.066667-46.933333 38.4-64 64-25.6 38.4-25.6 76.8-25.6 85.333333v21.333333c0 25.6 21.333333 46.933333 46.933334 46.933334H896c25.6 0 46.933333-21.333333 46.933333-46.933334v-17.066666c8.533333-12.8 8.533333-51.2-17.066666-89.6z m-546.133334-128c0 4.266667 0 4.266667 0 0v4.266666c-4.266667 0-4.266667 0 0-4.266666z m503.466667 213.333333l-742.4 4.266667v-4.266667s0-25.6 12.8-51.2c8.533333-17.066667 25.6-29.866667 42.666667-42.666667 25.6-17.066667 55.466667-25.6 89.6-34.133333 4.266667 0 34.133333-4.266667 68.266666-12.8 51.2-12.8 76.8-29.866667 85.333334-46.933333 0-4.266667 0-4.266667 4.266666-8.533334v-42.666666c-8.533333-72.533333-42.666667-115.2-72.533333-145.066667-8.533333-8.533333-12.8-17.066667-21.333333-21.333333-21.333333-29.866667-21.333333-59.733333-21.333334-64l4.266667-4.266667 8.533333-8.533333c4.266667-17.066667 0-25.6 0-29.866667-4.266667-34.133333-4.266667-81.066667 0-119.466667 0-29.866667 29.866667-55.466667 29.866667-55.466666 8.533333-4.266667 17.066667-12.8 21.333333-21.333334 0-4.266667 4.266667-4.266667 4.266667-8.533333v-25.6H465.066667c140.8 8.533333 192 59.733333 192 59.733333 8.533333 12.8 17.066667 25.6 21.333333 42.666667 4.266667 4.266667 4.266667 8.533333 4.266667 12.8 4.266667 29.866667 4.266667 55.466667 4.266666 76.8 0 12.8 0 21.333333-4.266666 38.4 0 12.8 0 25.6 8.533333 29.866667l4.266667 4.266666 4.266666 4.266667s0 34.133333-21.333333 64c-4.266667 8.533333-12.8 12.8-21.333333 21.333333-29.866667 29.866667-64 72.533333-72.533334 145.066667v42.666667c0 4.266667 0 4.266667 4.266667 8.533333 8.533333 21.333333 34.133333 34.133333 85.333333 46.933333 34.133333 8.533333 64 12.8 68.266667 12.8 38.4 8.533333 68.266667 17.066667 93.866667 34.133334 17.066667 12.8 34.133333 25.6 42.666666 42.666666 8.533333 25.6 8.533333 51.2 4.266667 55.466667z" ></path></symbol><symbol id="icon-m-mianban" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M884.15744 348.01152v49.152h-745.984v-49.152z" ></path><path d="M356.43392 846.99136h-49.152v-450.048h49.152z" ></path></symbol><symbol id="icon-m-xialakuang" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M510.464 639.488l207.872-254.976H302.08z" ></path></symbol><symbol id="icon-m-biaodan" viewBox="0 0 1024 1024"><path d="M122.88 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384H122.88c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H137.216c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M244.224 279.04h142.848v49.152H244.224zM244.224 425.472h142.848v49.152H244.224zM436.736 279.04h342.528v49.152H436.736zM436.736 425.472h342.528v49.152H436.736zM244.224 572.416h142.848v49.152H244.224zM436.736 572.416h342.528v172.544H436.736z" ></path></symbol><symbol id="icon-m-biaoge" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M249.344 347.648h49.152v499.2h-49.152zM584.704 347.648h49.152v499.2h-49.152zM137.728 165.888h746.496v181.76H137.728z" ></path><path d="M137.728 481.792h746.496v49.152H137.728zM137.728 664.576h746.496v49.152H137.728z" ></path></symbol><symbol id="icon-dashboard-o" viewBox="0 0 1024 1024"><path d="M880 622c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V654c0-17.673 14.327-32 32-32h298zM442 476c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V508c0-17.673 14.327-32 32-32h298z m406 210H614v162h234V686zM410 540H176v308h234V540z m470-428c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H614v308h234V176z m-406-64c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H176v162h234V176z" fill="#000000" fill-opacity=".65" ></path></symbol><symbol id="icon-line-layoutmasonryfensanbuju" viewBox="0 0 1024 1024"><path d="M896 128H128c-25.6 0-42.666667 17.066667-42.666667 42.666667v682.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h768c25.6 0 42.666667-17.066667 42.666667-42.666667V170.666667c0-25.6-17.066667-42.666667-42.666667-42.666667zM170.666667 213.333333h298.666666v341.333334H170.666667V213.333333z m0 597.333334v-170.666667h298.666666v170.666667H170.666667z m682.666666 0h-298.666666v-341.333334h298.666666v341.333334z m0-426.666667h-298.666666V213.333333h298.666666v170.666667z" fill="#09121F" ></path></symbol><symbol id="icon-zidingyibuju" viewBox="0 0 1024 1024"><path d="M0 0v256h1024V0z m960 192H64V64h896zM0 1024h512V320H0z m64-640h384v576H64zM576 576h448v-256H576z m64-192h320v128H640zM576 1024h448V640H576z m64-320h320v256H640z" fill="#575869" ></path></symbol><symbol id="icon-daochu" viewBox="0 0 1024 1024"><path d="M394.6 689.8c-13.2 3.2-27.4-9.5-31.7-23.2-8.4-28.5-12.7-58.6-12.7-88.1 0-159.4 151.5-325.1 314.1-352.1v-5.3c0-1.6 0-3.7 0.5-5.3l0.5-2.1c1.6-11.6 5.8-38.5 32.2-55.4 10.6-6.9 22.2-10 34.3-10 14.8 0 26.9 5.3 34.3 9.5 1.6 0.5 2.6 1.6 4.2 2.6L929.2 286c17.4 13.2 28 34.8 28 57 0 22.7-10.6 44.3-28.5 57.5L770.5 525.7c-11.6 9-25.3 13.7-39.1 13.7-12.1 0-23.8-3.7-34.8-10.6-21.1-13.7-31.7-34.8-31.7-64.4v-1.1C559.3 475 442.2 569 416.3 657.6c-4.8 14.3-13.7 32.2-21.7 32.2z m335.7-466.6V256c0 17.4-13.7 31.7-31.1 32.7-125.6 6.9-257.6 131.4-279.7 254.4C486 458.7 595.2 390 699.7 397.4c17.4 1.1 30.6 15.3 30.6 32.7V465c0 4.7 0.5 6.9 0.5 7.9l157.3-124.6c2.1-1.6 2.6-3.2 2.6-5.3 0-2.1-1.1-4.2-2.6-5.3L731.9 214.3c-1.1 1.6-1.6 5.8-2.1 8.4l0.5 0.5z m0 0" ></path><path d="M715.6 916.3H188.3c-67 0-121.9-54.9-121.9-121.9v-568c0-67 54.9-121.9 121.9-121.9h436.5v69.7H188.3c-28.5 0-52.3 23.2-52.3 52.3V795c0 28.5 23.2 52.3 52.3 52.3h527.3c28.5 0 52.3-23.2 52.3-52.3V593.2H837v201.6c0 66.6-54.4 121.5-121.4 121.5z m0 0" ></path><path d="M183 566.9h112.4V626H183v-59.1z m0 154.1h296.1v59.1H183V721z m0-425.4h237v59.1H183v-59.1z m0 140.9h112.4v59.1H183v-59.1z m0 0" ></path></symbol><symbol id="icon-daoru" viewBox="0 0 1024 1024"><path d="M111.6 148.8c7.9 0 16.9 17.9 21.6 32.2 25.9 88.7 143 182.6 248.6 194.2v-1.1c0-29.6 10.6-50.7 31.7-64.4 11.1-6.9 22.7-10.6 34.8-10.6 13.7 0 27.4 4.8 39.1 13.7L645.8 438c17.9 13.2 28.5 34.8 28.5 57.5 0 22.2-10.6 43.8-28 57L487.4 678.2c-1.6 1.1-2.6 2.1-4.2 2.6-7.4 4.2-19.5 9.5-34.3 9.5-12.1 0-23.7-3.2-34.3-10-26.4-16.9-30.6-43.8-32.2-55.4l-0.5-2.1c-0.5-1.6-0.5-3.7-0.5-5.3v-5.3c-162.6-26.9-314.1-192.6-314.1-352 0-29.6 4.2-59.6 12.7-88.1 4.2-13.8 18.4-26.5 31.6-23.3z m335.2 467.1c0.5 2.6 1.1 6.9 2.1 8.4l156.2-123.5c1.6-1.1 2.6-3.2 2.6-5.3 0-2.1-0.5-3.7-2.6-5.3L447.8 365.7c0 1.1-0.5 3.2-0.5 7.9v34.8c0 17.4-13.2 31.7-30.6 32.7-104.5 7.4-213.8-61.2-280.3-145.7 22.2 123 154.1 247.5 279.7 254.4 17.4 1.1 31.1 15.3 31.1 32.7v32.7l-0.4 0.7z m0.5-0.5" ></path><path d="M309 916.3c-67 0-121.4-54.9-121.4-121.4V593.2h69.1v201.6c0 29 23.8 52.3 52.3 52.3h527.3c29 0 52.3-23.8 52.3-52.3V226.4c0-29-23.8-52.3-52.3-52.3H399.8v-69.7h436.5c67 0 121.9 54.9 121.9 121.9v567.9c0 67-54.9 121.9-121.9 121.9H309v0.2z m0 0" ></path><path d="M841.6 626H729.1v-59.1h112.4V626z m0 154.1H545.5V721h296.1v59.1z m0-425.4h-237v-59.1h237v59.1z m0 140.9H729.1v-59.1h112.4v59.1z m0-59.1" ></path></symbol><symbol id="icon-a-juxing1851" viewBox="0 0 1024 1024"><path d="M0 0h438.857143v1024H0V0z m512 0h512v438.857143H512V0z m0 512h219.428571v219.428571H512V512z m292.571429 0h219.428571v219.428571h-219.428571V512z m-292.571429 292.571429h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m-146.285714 146.285714h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m146.285715 0h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z m-146.285714-146.285714h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z" ></path></symbol><symbol id="icon-sxsz" viewBox="0 0 1024 1024"><path d="M304.5 152.6h415L927 512 719.5 871.4h-415L97 512z" fill="#386BF3" ></path><path d="M512 512m-145.25 0a145.25 145.25 0 1 0 290.5 0 145.25 145.25 0 1 0-290.5 0Z" fill="#3D4265" ></path></symbol><symbol id="icon-mx" viewBox="0 0 1024 1024"><path d="M511.9 325.12v248.55L727.15 449.4l-0.01-248.55z" fill="#C3D2FB" ></path><path d="M296.65 200.85L511.9 325.12v248.56L296.65 449.4z" fill="#3D4265" ></path><path d="M511.9 325.12l215.25-124.27L511.9 76.57 296.65 200.85z" fill="#386BF3" ></path><path d="M296.62 698.02v248.55L511.87 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M81.37 573.74l215.25 124.28v248.55L81.37 822.3z" fill="#3D4265" ></path><path d="M296.62 698.02l215.25-124.28-215.25-124.27L81.37 573.74z" fill="#386BF3" ></path><path d="M727.03 698.02v248.55L942.28 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M511.78 573.74l215.25 124.28v248.55L511.78 822.3z" fill="#3D4265" ></path><path d="M727.03 698.02l215.25-124.28-215.25-124.27-215.25 124.27z" fill="#386BF3" ></path></symbol><symbol id="icon-al" viewBox="0 0 1024 1024"><path d="M192 132h440v640H192z" fill="#386BF3" ></path><path d="M632 260h200v512H632z" fill="#C3D2FB" ></path><path d="M398.86 612L512 725.14 625.14 612H912v280H112V612z" fill="#3D4265" ></path></symbol><symbol id="icon-sf" viewBox="0 0 1024 1024"><path d="M511.82 512.5v435L888.54 730l-0.02-435z" fill="#C3D2FB" ></path><path d="M135.1 295l376.72 217.5v435L135.1 730z" fill="#3D4265" ></path><path d="M511.82 512.5L888.54 295 511.82 77.5 135.1 295z" fill="#386BF3" ></path></symbol><symbol id="icon-moxing" viewBox="0 0 1061 1024"><path d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" fill="#5E5C5C" ></path></symbol><symbol id="icon-yanzhengyanzhengma" viewBox="0 0 1024 1024"><path d="M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z" ></path><path d="M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z" ></path></symbol><symbol id="icon-verify" viewBox="0 0 1024 1024"><path d="M713.856 93.44c44.672 9.344 79.36 15.488 105.024 18.944a332.8 332.8 0 0 0 28.864 3.008A110.08 110.08 0 0 1 944 223.36v348.672c0 71.232-36.288 168.32-80.704 219.328a737.216 737.216 0 0 1-100.672 106.496C683.264 966.208 599.232 1008 512 1008s-171.328-41.792-250.624-110.144c-26.88-23.168-51.2-47.808-72.832-72.512a409.152 409.152 0 0 1-24.768-30.208c-47.68-52.928-83.776-150.4-83.776-223.104V223.36c0-54.72 42.752-102.528 99.264-108.096 5.76-0.32 17.536-1.408 34.432-3.648a953.6 953.6 0 0 0 95.168-17.92c19.392-4.608 34.944-12.16 65.92-30.4l9.984-5.888C434.048 28.416 466.432 16 512 16c39.296 0 68.288 11.84 127.488 43.968l2.304 1.28c38.784 21.056 55.296 28.672 72.064 32.192z m-19.712 93.952c-29.376-6.144-50.688-16-98.176-41.856l-2.304-1.216C549.312 120.32 529.088 112 512 112c-24.192 0-42.88 7.168-78.656 28.16-4.736 2.88-4.736 2.88-9.728 5.76-38.784 22.912-61.12 33.664-92.48 41.216-37.76 8.96-72.96 15.36-104.768 19.648a556.8 556.8 0 0 1-39.68 4.16c-5.12 0.512-10.688 6.784-10.688 12.416v348.672c0 49.344 27.52 123.84 62.08 162.56a642.176 642.176 0 0 0 85.952 90.56c63.552 54.72 128.192 86.848 187.968 86.848 59.776 0 124.416-32.128 187.968-86.848a642.176 642.176 0 0 0 88.32-93.632c31.808-36.608 59.712-111.36 59.712-159.488V223.36c0-5.44-5.888-12.032-6.656-12.288-20.288-0.448-66.112-6.72-147.2-23.68zM400.128 488.704L487.68 576.256l185.088-185.088a48 48 0 0 1 67.84 67.84L521.6 678.144a48 48 0 0 1-67.84 0l-121.6-121.536a48 48 0 1 1 67.968-67.84z" fill="#768893" ></path></symbol><symbol id="icon-preview" viewBox="0 0 1024 1024"><path d="M854.36155804 32.02835121a114.60838884 114.60838884 0 0 1 114.21544637 105.17775738l0.39294247 9.43063278v170.60277392a49.1178817 49.1178817 0 0 1-97.77732893 6.68003145l-0.45843311-6.68003145V146.63674137a16.37262679 16.37262679 0 0 0-12.63966726-15.9796843l-3.73295954-0.39294246H130.1675186a16.37262679 16.37262679 0 0 0-15.91419368 12.57417659l-0.45843312 3.79845017v732.18388095a16.37262679 16.37262679 0 0 0 12.63966859 15.91419369l3.73295821 0.4584331h275.4530781a49.1178817 49.1178817 0 0 1 6.68003143 97.77732894l-6.68003143 0.4584331H130.1675186a114.60838884 114.60838884 0 0 1-114.21544639-105.24324667l-0.39294246-9.36514216V146.63674137a114.60838884 114.60838884 0 0 1 105.24324669-114.28093698l9.36514216-0.32745318h724.19403944z m-286.32450218 495.1082417a235.76582919 235.76582919 0 0 1 358.88798459 303.35203402l80.61881587 80.55332523a39.29430509 39.29430509 0 0 1-55.53595059 55.66693187l-80.61881589-80.61881587a235.83131983 235.83131983 0 0 1-303.35203398-358.88798459z m277.87622625 55.60144257a157.17721902 157.17721902 0 1 0-222.27478502 222.2747837 157.17721902 157.17721902 0 0 0 222.27478502-222.2747837z m-450.70567639-33.26917864a42.56883017 42.56883017 0 1 1 0 85.13766035H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766035h184.81421508z m0-158.68350096a42.56883017 42.56883017 0 1 1 0 85.13766036H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766036h184.81421508z m233.67013285-158.68350095a42.56883017 42.56883017 0 1 1 0 85.13766036h-418.48434793a42.56883017 42.56883017 0 1 1 0-85.13766036h418.48434793z" fill="#7f7f7f" ></path></symbol><symbol id="icon-yunshangchuan-xian" viewBox="0 0 1039 1024"><path d="M711.40656 345.248C667.88656 248.448 594.91056 208 481.83856 208c-118.848 0-219.328 96.512-256.736 267.76l-4.96 22.752-23.2 2.256c-83.744 8.192-120.176 54.176-131.36 144.4C54.30256 736.528 103.18256 816 193.85456 816h190.672a32 32 0 1 1 0 64H193.83856C58.68656 880-13.44144 762.72 2.07856 637.296 15.61456 528 65.80656 458.416 167.75856 440.224 215.27856 254.704 335.99856 144 481.83856 144c143.072 0 241.184 58.72 294.24 189.808 3.328-0.176 6.576-0.272 9.76-0.272 125.184 0 223.68 93.696 239.84 252.768 0.896 8.96 1.36 17.952 1.36 26.96C1027.03856 760.576 907.61456 880 760.30256 880h-120.064a32 32 0 1 1 0-64h120.064c111.968 0 202.72-90.768 202.72-202.736 0-6.848-0.32-13.68-1.024-20.48-12.912-127.088-84.544-195.248-176.16-195.248-23.136 0-55.68 7.232-96.928 22.032a32 32 0 1 1-21.616-60.224c15.584-5.6 30.288-10.304 44.112-14.08zM544.23856 598.512V848a32 32 0 0 1-64 0V598.512l-39.712 46.32a32 32 0 1 1-48.592-41.664l95.632-111.552a32.032 32.032 0 0 1 49.344 0l95.616 111.552a32 32 0 0 1-48.592 41.664l-39.696-46.32z" ></path></symbol><symbol id="icon-yulan" viewBox="0 0 1024 1024"><path d="M897.28 85.333333h-750.933333c-28.16 0-51.2 23.04-51.2 51.2v750.933334c0 28.16 23.04 51.2 51.2 51.2h276.906666c18.773333 0 34.133333-15.36 34.133334-34.133334s-15.36-34.133333-34.133334-34.133333H163.413333V153.6h716.8v275.626667c0 18.773333 15.36 34.133333 34.133334 34.133333s34.133333-15.36 34.133333-34.133333V136.533333c0-28.16-22.613333-51.2-51.2-51.2z" fill="#4C4C4C" ></path><path d="M649.813333 315.733333h-324.266666c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133333h324.266666c18.773333 0 34.133333 15.36 34.133334 34.133333s-14.933333 34.133333-34.133334 34.133333zM564.48 452.266667h-238.933333c-18.773333 0-34.133333-15.36-34.133334-34.133334s15.36-34.133333 34.133334-34.133333h238.933333c18.773333 0 34.133333 15.36 34.133333 34.133333s-14.933333 34.133333-34.133333 34.133334zM479.146667 588.8h-153.6c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133334h153.6c18.773333 0 34.133333 15.36 34.133333 34.133334s-14.933333 34.133333-34.133333 34.133333zM724.48 544c-94.293333 0-170.666667 76.373333-170.666667 170.666667s76.373333 170.666667 170.666667 170.666666 170.666667-76.373333 170.666667-170.666666-76.373333-170.666667-170.666667-170.666667z m0 273.066667c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4-45.653333 102.4-102.4 102.4z" fill="#4C4C4C" ></path><path d="M938.666667 928.853333c-13.226667 13.226667-34.986667 13.226667-48.213334 0l-72.533333-72.533333c-13.226667-13.226667-13.226667-34.986667 0-48.213333 13.226667-13.226667 34.986667-13.226667 48.213333 0l72.533334 72.533333c13.226667 13.226667 13.226667 34.56 0 48.213333z" fill="#4C4C4C" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M1004.8 915.2l-243.2-243.2c0 0-6.4-6.4-6.4-6.4C800 595.2 832 505.6 832 416 832 185.6 646.4 0 416 0S0 185.6 0 416 185.6 832 416 832c89.6 0 179.2-32 243.2-83.2 0 6.4 6.4 6.4 6.4 6.4l243.2 243.2c25.6 25.6 70.4 25.6 96 6.4C1030.4 979.2 1030.4 940.8 1004.8 915.2zM64 416C64 224 224 64 416 64S768 224 768 416 608 768 416 768 64 608 64 416z" fill="#231815" ></path></symbol><symbol id="icon-ziliucheng" viewBox="0 0 1024 1024"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" ></path><path d="M813.056 768l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-53.248 0-96.256-43.008-96.256-96.256L659.456 614.4l-96.256 0 0 192.512c0 20.48-16.384 38.912-38.912 38.912L120.832 845.824c-20.48 0-38.912-16.384-38.912-38.912L81.92 401.408c0-20.48 16.384-38.912 38.912-38.912l192.512 0L313.344 190.464 120.832 190.464C98.304 190.464 81.92 174.08 81.92 151.552L81.92 112.64c0-20.48 16.384-38.912 38.912-38.912l788.48 0c20.48 0 38.912 16.384 38.912 38.912l0 38.912c0 20.48-16.384 38.912-38.912 38.912L331.776 190.464l0 174.08 192.512 0c20.48 0 38.912 16.384 38.912 38.912L563.2 593.92l96.256 0 0-153.6c0-53.248 43.008-96.256 96.256-96.256l18.432 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-43.008 0-77.824 34.816-77.824 77.824L677.888 593.92l96.256 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912L774.144 614.4l-96.256 0 0 153.6c0 43.008 34.816 77.824 77.824 77.824l18.432 0 0-38.912C774.144 784.384 792.576 768 813.056 768z" ></path></symbol><symbol id="icon-danyuange" viewBox="0 0 1024 1024"><path d="M467.970999 661.248453h-184.831769a70.655912 70.655912 0 0 0-54.527932 25.599968A82.431897 82.431897 0 0 0 204.803328 744.19235v196.607754A82.687897 82.687897 0 0 0 228.611298 998.400032a71.423911 71.423911 0 0 0 54.527932 25.599968h184.831769a73.727908 73.727908 0 0 0 55.039931-25.599968 81.919898 81.919898 0 0 0 23.551971-58.623927v-195.583755a81.919898 81.919898 0 0 0-23.551971-58.367927 72.959909 72.959909 0 0 0-55.039931-25.599968z m5.887993-84.991893A118.015852 118.015852 0 0 0 512.002944 549.376593 127.99984 127.99984 0 0 0 545.538902 460.800704V126.465122A133.119834 133.119834 0 0 0 537.602912 76.801184a123.391846 123.391846 0 0 0-25.599968-40.447949 118.015852 118.015852 0 0 0-37.119954-25.599968A104.703869 104.703869 0 0 0 428.547048 0.00128H116.995438A105.471868 105.471868 0 0 0 71.683494 9.985268a121.087849 121.087849 0 0 0-37.119953 25.599968A127.99984 127.99984 0 0 0 9.219572 76.801184 133.119834 133.119834 0 0 0 0.003584 126.465122V460.800704a127.99984 127.99984 0 0 0 34.559957 88.31989 121.087849 121.087849 0 0 0 37.119953 27.135966 105.471868 105.471868 0 0 0 45.311944 9.983987h311.55161a106.239867 106.239867 0 0 0 45.311944-9.983987z m527.35934-329.215589a71.67991 71.67991 0 0 0-54.783931-25.599968h-184.575769a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v195.583756a83.199896 83.199896 0 0 0 23.551971 59.647925 73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 84.991894 84.991894 0 0 0 22.015972-59.647925v-195.583756a82.943896 82.943896 0 0 0-22.783972-58.367927zM947.2024 661.248453h-185.343768a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v196.607755A81.919898 81.919898 0 0 0 706.562701 998.400032a73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 83.455896 83.455896 0 0 0 22.015972-57.599928v-196.607754a83.199896 83.199896 0 0 0-22.783972-58.367927 71.67991 71.67991 0 0 0-54.783931-25.599968z m0 0" ></path></symbol><symbol id="icon-rengongzhineng_filledbeifen" viewBox="0 0 1024 1024"><path d="M913.678222 374.556444c0-175.431111-160.782222-317.653333-359.139555-317.653333a382.577778 382.577778 0 0 0-254.663111 93.767111 270.108444 270.108444 0 0 0-91.335112 118.840889 318.350222 318.350222 0 0 0-20.849777 98.773333c-0.597333 38.840889 18.389333 76.871111 1.664 114.688-11.633778 26.453333-41.870222 48.824889-61.312 69.916445 0 0-54.442667 36.224 49.436444 41.173333 2.929778 0.142222 16.071111 62.222222 19.342222 76.430222a16.753778 16.753778 0 0 0-3.271111 10.752c0 11.904 15.004444 21.617778 33.450667 21.617778h11.278222c-24.362667 3.313778-41.955556 12.8-41.955555 26.026667 0 9.102222 11.562667 21.105778 28.842666 28.302222 0 0-21.333333 66.744889 10.296889 81.962667a36.977778 36.977778 0 0 0 21.333333 1.564444c44.856889 2.446222 125.155556-0.739556 169.784889-0.739555 0-0.810667 23.466667 127.146667 23.466667 127.146666h403.299556c0 0.64-38.769778-289.265778-38.769778-289.265777 70.968889-101.632 95.544889-192.611556 96.881778-268.643556 1.422222-11.491556 2.161778-23.068444 2.176-34.659556h0.042666zM701.155556 320.711111a72.632889 72.632889 0 0 1-65.706667-42.055111l-54.471111 31.544889a108.344889 108.344889 0 0 1-7.509334 107.975111l102.172445 59.192889a36.508444 36.508444 0 1 1-10.894222 25.984 35.555556 35.555556 0 0 1 2.019555-10.026667L561.777778 432.512a109.511111 109.511111 0 1 1 10.168889-138.154667l57.728-33.422222a72.718222 72.718222 0 1 1 71.466666 59.733333v0.042667z" fill="#323233" ></path></symbol><symbol id="icon-fuhao-huizhi" viewBox="0 0 1024 1024"><path d="M254.4 82.624L82.624 254.4a60.704 60.704 0 0 0 0 85.92L254.4 512l128.8-128.8-42.88-42.88-85.92 85.888-42.88-42.88 85.888-85.92-42.88-42.88-85.92 85.888-42.88-42.88 171.776-171.84 171.584 171.616L512 254.4l-171.776-171.84a60.576 60.576 0 0 0-85.76 0z m644.096 644.064l-171.808 171.808-42.88-42.912 85.888-85.888-42.88-42.88-85.92 85.856-42.88-42.88 85.888-85.888-42.912-42.912L512 769.6l171.776 171.776a60.704 60.704 0 0 0 85.92 0l171.776-171.776a60.704 60.704 0 0 0 0-85.92L769.6 512l-42.912 42.88 171.808 171.808zM680.8 211.328l131.968 131.872-43.968 44L636.8 255.2l44-43.872zM240.96 650.976l131.968 131.872-44 44-131.968-131.872 44-44zM680.704 123.424a124.544 124.544 0 0 1 176.288 0.096l43.584 43.52a124.704 124.704 0 0 1 0.096 176.16L355.264 888.416l-268.352 48.384 48.384-268.288L680.704 123.424zM334.4 821.344L857.472 298.656c23.84-23.872 23.552-63.264-0.8-87.52L813.12 167.616c-24.544-24.544-63.552-24.832-87.584-0.8L202.432 689.6l-27.52 159.424 159.52-27.616z" fill="#0A8CF0" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M799.2 874.4c0 34.4-28.001 62.4-62.4 62.4H287.2c-34.4 0-62.4-28-62.4-62.4V212h574.4v662.4zM349.6 100c0-7.2 5.6-12.8 12.8-12.8h300c7.2 0 12.8 5.6 12.8 12.8v37.6H349.6V100z m636.8 37.6H749.6V100c0-48.001-39.2-87.2-87.2-87.2h-300c-48 0-87.2 39.199-87.2 87.2v37.6H37.6C16.8 137.6 0 154.4 0 175.2s16.8 37.6 37.6 37.6h112v661.6c0 76 61.6 137.6 137.6 137.6h449.6c76 0 137.6-61.6 137.6-137.6V212h112c20.8 0 37.6-16.8 37.6-37.6s-16.8-36.8-37.6-36.8zM512 824c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6m-175.2 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0.8 20.8 17.6 37.6 37.6 37.6m350.4 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6" fill="#8A8A8A" ></path></symbol><symbol id="icon-jurassic_import-form" viewBox="0 0 1024 1024"><path d="M764.9 64H225.4l1.4 224.2 64-0.4-1-159.8h383.6v224H896v544H289.8l1-159.8-64-0.4-1.4 224.2H960V277.7L764.9 64z m-27.6 64.7L882.8 288H737.3V128.7z" fill="#707070" ></path><path d="M356.5 224h255.9v64H356.5z" fill="#707070" ></path><path d="M576.4 416h255.9v64H576.4zM512.5 576h319.8v64H512.5zM384.5 736h447.8v64H384.5z" fill="#707070" ></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#707070" ></path></symbol><symbol id="icon-kaoheweidufenxi" viewBox="0 0 1024 1024"><path d="M815.542857 212.943238l118.296381 68.266667v168.033524l-201.532952 116.345904-0.487619-163.352381-125.366857-72.46019 209.091047-116.833524z m-89.673143-51.736381L519.314286 279.454476 305.785905 156.233143 511.561143 37.449143l214.308571 123.757714zM294.619429 887.466667L89.234286 768.877714V546.133333l205.677714 118.00381-0.292571 223.329524z m85.333333 49.249523l-0.097524-223.914666 133.607619 76.653714 132.632381-76.604952-1.024 222.744381-133.558857 77.043809-131.510857-75.922286zM434.468571 328.021333L295.253333 407.747048l-0.195047 156.672L89.234286 444.318476V281.258667l132.047238-76.263619 213.089524 123.026285z m86.113524 49.737143l126.780953 73.191619-0.780191 164.08381-133.12 76.897524-133.656381-78.019048-0.097524-157.403429 140.921905-78.750476z m413.257143 169.008762v222.110476l-200.655238 115.809524-0.633905-221.769143 201.289143-116.150857z" fill="#82529d" ></path></symbol><symbol id="icon-wenjianjia" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol><symbol id="icon-biaoqian" viewBox="0 0 1024 1024"><path d="M934.912 516.096q23.552 26.624 19.456 49.664t-26.624 46.592l-324.608 327.68q-8.192 7.168-19.456 11.264t-23.04 4.608-23.04-2.56-18.432-10.24q-121.856-122.88-218.112-220.16l-80.896-80.896q-39.936-39.936-71.168-71.68t-51.2-51.2-20.992-21.504q-3.072-4.096-10.752-14.848t-6.656-25.088l0-19.456 0-40.96q0-23.552 0.512-52.736t0.512-58.88q1.024-70.656 2.048-156.672 2.048-13.312 6.144-24.064t15.36-22.016q10.24-11.264 22.016-16.384t22.016-5.12l329.728 0q2.048 0 9.216 0.512t10.24 1.536q6.144 2.048 11.264 5.12t10.24 8.192zM217.088 317.44q40.96 0 69.12-28.672t28.16-69.632-28.16-69.632-69.12-28.672q-20.48 0-37.888 7.68t-30.72 20.992-20.992 31.232-7.68 38.4 7.68 38.4 20.992 31.232 30.72 20.992 37.888 7.68z" fill="#ea9518" ></path></symbol><symbol id="icon-wenben" viewBox="0 0 1024 1024"><path d="M823.296 60.416q65.536 0 99.328 38.4t33.792 93.696l0 543.744q0 25.6-21.504 46.08l-171.008 163.84q-13.312 11.264-22.528 14.336t-23.552 3.072l-459.776 0q-23.552 0-47.104-9.728t-41.984-27.648-30.208-43.008-11.776-55.808l0-634.88q0-60.416 33.28-96.256t94.72-35.84l568.32 0zM608.256 702.464q13.312 0 22.528-9.216t9.216-22.528q0-14.336-9.216-23.04t-22.528-8.704l-320.512 0q-13.312 0-22.528 8.704t-9.216 23.04q0 13.312 9.216 22.528t22.528 9.216l320.512 0zM736.256 509.952q13.312 0 22.528-9.216t9.216-22.528-9.216-22.528-22.528-9.216l-448.512 0q-13.312 0-22.528 9.216t-9.216 22.528 9.216 22.528 22.528 9.216l448.512 0zM799.744 318.464q13.312 0 22.528-9.216t9.216-23.552q0-13.312-9.216-22.528t-22.528-9.216l-512 0q-13.312 0-22.528 9.216t-9.216 22.528q0 14.336 9.216 23.552t22.528 9.216l512 0z" fill="#db639b" ></path></symbol><symbol id="icon-yingyong" viewBox="0 0 1026 1024"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" fill="#0061b2" ></path></symbol><symbol id="icon-wenjianjia-copy" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol></svg>',(l=>{var r=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var o,s,c,m,f,h=function(w,N){N.parentNode.insertBefore(w,N)};if(r&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(w){console&&console.log(w)}}o=function(){var w,N=document.createElement("div");N.innerHTML=l._iconfont_svg_string_4827314,(N=N.getElementsByTagName("svg")[0])&&(N.setAttribute("aria-hidden","true"),N.style.position="absolute",N.style.width=0,N.style.height=0,N.style.overflow="hidden",N=N,(w=document.body).firstChild?h(N,w.firstChild):w.appendChild(N))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(o,0):(s=function(){document.removeEventListener("DOMContentLoaded",s,!1),o()},document.addEventListener("DOMContentLoaded",s,!1)):document.attachEvent&&(c=o,m=l.document,f=!1,u(),m.onreadystatechange=function(){m.readyState=="complete"&&(m.onreadystatechange=null,y())})}function y(){f||(f=!0,c())}function u(){try{m.documentElement.doScroll("left")}catch{return void setTimeout(u,50)}y()}})(window);const wf=["onClick"],_f=a.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0}},emits:["update:backGroundImage"],setup(l,{emit:r}){const n=l,o=r,s=a.ref(null),c=a.ref(null),m=E=>{if(Array.isArray(E)&&E.length>=3){const[k,g,M,R]=E;return R!==void 0?`rgba(${k}, ${g}, ${M}, ${R})`:`rgb(${k}, ${g}, ${M})`}if(typeof E=="string"){const k=E.trim();if(k.startsWith("[")&&k.endsWith("]")){const g=k.slice(1,-1).split(",").map(M=>Number(M.trim()));if(g.length>=3&&g.every(M=>!Number.isNaN(M))){const[M,R,G,ue]=g;return ue!==void 0?`rgba(${M}, ${R}, ${G}, ${ue})`:`rgb(${M}, ${R}, ${G})`}}return k}},f=a.computed(()=>{const E=Number(n==null?void 0:n.textSize),k=m(n==null?void 0:n.textColor),g={},M={};return!Number.isNaN(E)&&E&&(g.fontSize=`${E}px`,M.fontSize=`${E}px`),k&&(g.color=k,M.color=k),{label:g,value:M}}),h=a.ref(""),y=a.ref(""),u=a.ref(!1),w=async E=>{if(E){y.value&&(URL.revokeObjectURL(y.value),y.value="");try{const k=await $.platformDownloadFile({url:E}),g=new Blob([k==null?void 0:k.data],{type:(k==null?void 0:k.headers["content-type"])||"image/*"});y.value=URL.createObjectURL(g)}catch{y.value=""}}};a.watch(()=>n==null?void 0:n.backGroundImage,E=>{E&&(h.value=E)},{immediate:!0}),a.watch(h,E=>{w(E)},{immediate:!0});const N=()=>{var E;(E=c.value)==null||E.click()},j=async E=>{var M,R,G;const k=E.target,g=(M=k==null?void 0:k.files)==null?void 0:M[0];if(!g){k.value="";return}u.value=!0;try{const ue=new FormData;ue.append("file",g);const Be=await $.platformUploadFile(ue),de=(G=(R=Be==null?void 0:Be.data)==null?void 0:R.result)==null?void 0:G.url;de?(h.value=de,o("update:backGroundImage",de),w(de),Ga.ElMessage.success("背景图片上传成功")):Ga.ElMessage.error("背景图片上传失败")}catch{Ga.ElMessage.error("背景图片上传失败")}finally{u.value=!1,k.value=""}},C=a.computed(()=>y.value?{backgroundImage:`url(${y.value})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),W=E=>il.getComponent(E),O=E=>{if(!E)return;const k=E.querySelector("input, textarea, .el-input__inner");k&&typeof k.focus=="function"&&k.focus()},U=(E,k,g)=>{n.disabled||E.field&&(s.value=k,a.nextTick(()=>{O(g.currentTarget)}))},H=()=>{s.value=null},D=E=>{var g;const k=((g=E==null?void 0:E.field)==null?void 0:g.value)??(E==null?void 0:E.value);return k==null||k===""?"-":k},S=E=>{const k=E!=null&&E.width&&E.width>0?E.width:1,M=`calc((100% - ${(k-1)*16}px) / ${k})`;return{flex:`0 0 ${M}`,maxWidth:M,minWidth:"140px",boxSizing:"border-box"}};return(E,k)=>(a.openBlock(),a.createElementBlock("div",{class:"statistics-cards-container",style:a.normalizeStyle(C.value),onClick:k[2]||(k[2]=g=>(n==null?void 0:n.backGround)==="Yes"&&N())},[(n==null?void 0:n.backGround)==="Yes"?(a.openBlock(),a.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:k[0]||(k[0]=a.withModifiers(g=>N(),["stop"]))},[a.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:j},null,544),k[3]||(k[3]=a.createElementVNode("img",{src:il._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.items,(g,M)=>{var R,G,ue,Be,de,Z,pe,ae;return a.openBlock(),a.createElementBlock("div",{class:"statistics-card",key:M,style:a.normalizeStyle(S(g)),onClick:k[1]||(k[1]=a.withModifiers(()=>{},["stop"]))},[a.createElementVNode("div",{class:"statistics-label",style:a.normalizeStyle(f.value.label)},a.toDisplayString(g==null?void 0:g.label),5),a.createElementVNode("div",{class:"statistics-value",style:a.normalizeStyle(f.value.value),onClick:ce=>U(g,M,ce)},[s.value===M&&g.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(W(((R=g.field)==null?void 0:R.type)??"Input")),{key:0,modelValue:g.field.value,"onUpdate:modelValue":ce=>g.field.value=ce,isEdit:!0,disabled:(G=g.field)==null?void 0:G.disabled,content:((ue=g.field)==null?void 0:ue.contents)??[],optionUrl:g.field,originalValue:(Be=g.field)==null?void 0:Be.value,config:(de=g.field)==null?void 0:de.config,configModel:((Z=g.field)==null?void 0:Z.prop)??((pe=g.field)==null?void 0:pe.name),selectedTagList:((ae=g.field)==null?void 0:ae.selectValue)??[],onBlur:H,onBlurChange:H},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(D(g)),1)],64))],12,wf)],4)}),128))],4))}}),Sf=Jl._export_sfc(_f,[["__scopeId","data-v-babf8f2a"]]),dc=$.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(l){this.selectArray=l},setSelectString(l){this.selectString=l}}}),Ef={class:"calculator-content"},Cf={class:"calculator-child"},Df={class:"calculator-child"},Nf=a.defineComponent({__name:"calculator",setup(l){const r=a.ref(),n=a.ref();return a.onMounted(()=>{r.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(o,s)=>(a.openBlock(),a.createElementBlock("div",Ef,[a.createElementVNode("div",Cf,[a.createVNode(il.ssForm,{rowContents:r.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",Df,[a.createVNode(il.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Bf=Jl._export_sfc(Nf,[["__scopeId","data-v-73db0fe7"]]),bt=(l,r)=>{let n=l,o=r;return Array.isArray(n)&&(n=n==null?void 0:n.map((s,c)=>{if(Array.isArray(s)){let m={};return s=s==null?void 0:s.forEach((f,h)=>{var y;(y=o==null?void 0:o[h])!=null&&y.prop?m[o[h].prop]=f:Array.isArray(f)&&(m.children=bt(f,o))}),Object.assign(m,{id:c})}else return s})),n},pc=(l,r,n)=>{let o=l,s=r;return o=o==null?void 0:o.map((c,m)=>{var f,h;return!Array.isArray(c)||!((f=s==null?void 0:s[m])!=null&&f.label)&&!n||(c.unshift(((h=s==null?void 0:s[m])==null?void 0:h.label)??""),c.some(y=>Array.isArray(y))&&(c=c==null?void 0:c.map(y=>{var u;return Array.isArray(y)&&(y=pc(y,(u=s==null?void 0:s[m])==null?void 0:u.children,n)),y}))),c}),o},Tf=(l,r,n)=>{if(r==="")return l==null?void 0:l.filter(o=>(o==null?void 0:o.id)!==n);{const o=r.split("-");return Af(l,o,n)}},Af=(l,r,n)=>{let o=l,s=r;return(s==null?void 0:s.length)===0?o=o==null?void 0:o.filter(c=>c.id!==n):o=o==null?void 0:o.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=fc(c,s,n)),c)),o},fc=(l,r,n)=>{var c,m;let o=l,s=r;return(s==null?void 0:s.length)===0?o.children=(c=o.children)==null?void 0:c.filter(f=>f.id!==n):o.children=(m=o.children)==null?void 0:m.map(f=>(f.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),f=fc(f,s,n)),f)),o},zf=(l,r,n)=>{if(r==="")return n;{const o=r.split("-");return Mf(l,o,n)}},Mf=(l,r,n)=>{let o=l,s=r;return(s==null?void 0:s.length)===0?o=n:o=o==null?void 0:o.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=hc(c,s,n)),c)),o},hc=(l,r,n)=>{var c;let o=l,s=r;return(s==null?void 0:s.length)===0?o.children=n:o.children=(c=o.children)==null?void 0:c.map(m=>(m.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),m=hc(m,s,n)),m)),o};class If{constructor(r={}){Wr(this,"url");Wr(this,"heartbeatInterval");Wr(this,"socket",null);Wr(this,"isConnected",!1);Wr(this,"heartTimer",null);Wr(this,"canvas",null);Wr(this,"ctx",null);Wr(this,"mainCamCutMode",0);Wr(this,"pMainShowStartX",0);Wr(this,"pMainShowStartY",0);Wr(this,"onLog");Wr(this,"onDevCount");Wr(this,"onResolution");Wr(this,"onCameraStatus");Wr(this,"onPhoto");this.url=r.url??"ws://127.0.0.1:22225",this.heartbeatInterval=r.heartbeatInterval??3e3}init(r,n,o){var m;(m=this.canvas)!=null&&m.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const s=document.createElement("canvas");s.style.border="solid 1px #A0A0A0",s.id="MainCamCanvas",s.width=n,s.height=o;const c=s.getContext("2d");if(!c)throw new Error("无法获取 CanvasRenderingContext2D");r.appendChild(s),this.canvas=s,this.ctx=c}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((r,n)=>{const o=new WebSocket(this.url);o.binaryType="arraybuffer",o.onopen=()=>{this.socket=o,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),r()},o.onerror=s=>{this.isConnected=!1,this.log("socket.onerror"),n(s)},o.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},o.onmessage=s=>{this.handleMessage(s)}})}destroy(){var r;this.stopHeartbeat();try{this.closeCamera()}catch{}if(this.socket){try{this.socket.onmessage=null}catch{}try{this.socket.onopen=null}catch{}try{this.socket.onerror=null}catch{}try{this.socket.onclose=null}catch{}try{this.socket.close()}catch{}this.socket=null}this.isConnected=!1,(r=this.canvas)!=null&&r.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(r=0){this.sendBytes(new Uint8Array([119,136,81,r]))}chooseResolution(r){if(!Array.isArray(r)||r.length===0)return null;const n=r.find(s=>s.width===2592&&s.height===1944);return n||[...r].sort((s,c)=>c.width*c.height-s.width*s.height)[0]||null}openCamera(r=0,n=1280,o=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const s=new Uint8Array(12);s[0]=119,s[1]=136,s[2]=1,s[3]=r,s[4]=this.canvas.width>>8&255,s[5]=this.canvas.width&255,s[6]=this.canvas.height>>8&255,s[7]=this.canvas.height&255,s[8]=n>>8&255,s[9]=n&255,s[10]=o>>8&255,s[11]=o&255,this.sendBytes(s)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const s=new Uint8Array(12);s[0]=119,s[1]=136,s[2]=16,s[3]=0,s[4]=0,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=0,this.sendBytes(s)}bestSize(){this.sendBytes(new Uint8Array([119,136,5,0]))}rotateLeft(){this.sendBytes(new Uint8Array([119,136,7,0]))}rotateRight(){this.sendBytes(new Uint8Array([119,136,8,0]))}focus(){this.sendBytes(new Uint8Array([119,136,48,0]))}log(r){var n;(n=this.onLog)==null||n.call(this,r)}sendBytes(r){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(r.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(r){var s,c,m,f,h,y;const n=new Uint8Array(r.data);if(n.length<=0)return;if(n[0]===17&&n[1]===17&&n[2]===17){this.log("heart socket!!!!");return}if(n[0]!==85||n[1]!==102)return;const o=n[2];if(o===80){const u=n[3],w=n.length-4,N=new Uint8Array(w);for(let W=0;W<w;W++)N[W]=n[4+W];const C=decodeURIComponent(this.byteToString(N)).split("|");(s=this.onDevCount)==null||s.call(this,u,C);return}if(o===81){const u=n[3]||0,w=[];for(let N=0;N<u;N++){const j=(n[4+N*4+0]||0)*256+(n[4+N*4+1]||0),C=(n[4+N*4+2]||0)*256+(n[4+N*4+3]||0);w.push({width:j,height:C,text:`${j}*${C}`})}(c=this.onResolution)==null||c.call(this,u,w);return}if(o===1){n[3]===1&&((m=this.onCameraStatus)==null||m.call(this,"opened")),n[3]===3&&((f=this.onCameraStatus)==null||f.call(this,"closed"));return}if(o===16){if(n[3]===1){const w=n[4]*256+n[5],N=n[6]*65536+n[7]*256+n[8];let j="";if(w>0){const O=new Uint8Array(w);for(let U=0;U<w;U++)O[U]=n[9+U];j=decodeURIComponent(this.byteToString(O))}const C=new Uint8Array(N);for(let O=0;O<N;O++)C[O]=n[9+w+O];const W=this.uint8ArrayToString(C);(h=this.onPhoto)==null||h.call(this,{flag:0,imgPath:j,base64:W})}n[3]===2&&((y=this.onPhoto)==null||y.call(this,{flag:2,imgPath:"",base64:""}));return}if(o===204){if(!this.canvas||!this.ctx)return;const u=n[3]*256+n[4],w=n[5]*256+n[6];this.pMainShowStartX=n[7]*256+n[8],this.pMainShowStartY=n[9]*256+n[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const N=this.ctx.createImageData(u,w);let j=11;for(let C=0;C<N.data.length;C+=4)N.data[C+0]=n[j],N.data[C+1]=n[j+1],N.data[C+2]=n[j+2],N.data[C+3]=255,j+=3;this.ctx.putImageData(N,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(r){let n="";for(let o=0;o<r.length;o++)n+=String.fromCharCode(r[o]);return n}byteToString(r){let n="";for(let o=0;o<r.length;o++)n+=String.fromCharCode(r[o]);return n}}const Of={style:{display:"flex",gap:"16px",height:"100%"}},Lf={key:0,style:{color:"var(--el-text-color-secondary)"}},$f={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},Rf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Vf={ref:"pictureBox",style:{height:"220px",border:"1px dashed var(--el-border-color)","border-radius":"4px",background:"var(--el-fill-color-lighter)",position:"relative",overflow:"auto",padding:"8px"}},Ff={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},Pf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},jf=["src","onClick"],Hf=["onClick"],Uf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},qf={class:"dialog-footer"},Wf=a.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(l,{emit:r}){const n=l,o=r,s=a.ref(null),c=a.ref(!1),m=a.ref([]),f=a.ref(""),h=a.ref(!1),y=a.ref([]),u=new If({url:"ws://127.0.0.1:22225"});function w(R,G){var ae;const ue=R.split(","),Be=((ae=ue[0].match(/:(.*?);/))==null?void 0:ae[1])??"image/jpeg",de=atob(ue[1]);let Z=de.length;const pe=new Uint8Array(Z);for(;Z--;)pe[Z]=de.charCodeAt(Z);return new File([pe],G,{type:Be})}function N(){u.onLog=R=>{console.log("[GPY]",R)},u.onDevCount=(R,G)=>{if(f.value+=`设备数量=${R},设备=${G.join(",")}
|
|
4
|
-
`,R>0){f.value+=`检测到设备,正在获取分辨率...
|
|
5
|
-
`;try{u.getResolution(0)}catch(ue){f.value+=`获取分辨率失败:${(ue==null?void 0:ue.message)??ue}
|
|
6
|
-
`}}else f.value+=`未检测到高拍仪设备!
|
|
7
|
-
`},u.onResolution=(R,G)=>{if(R<=0||!Array.isArray(G)||G.length===0){f.value+=`未获取到可用分辨率,回退使用 1280*720 打开...
|
|
8
|
-
`;try{u.openCamera(0,1280,720)}catch(Be){f.value+=`打开摄像头失败:${(Be==null?void 0:Be.message)??Be}
|
|
9
|
-
`}return}const ue=u.chooseResolution(G);if(!ue){f.value+=`分辨率选择失败,回退使用 1280*720 打开...
|
|
10
|
-
`;try{u.openCamera(0,1280,720)}catch(Be){f.value+=`打开摄像头失败:${(Be==null?void 0:Be.message)??Be}
|
|
11
|
-
`}return}f.value+=`获取分辨率 ${ue.text}成功,打开摄像头...
|
|
12
|
-
`;try{u.closeCamera(),setTimeout(()=>{try{u.openCamera(0,ue.width,ue.height)}catch(Be){f.value+=`打开摄像头失败:${(Be==null?void 0:Be.message)??Be}
|
|
13
|
-
`}},100)}catch{try{u.openCamera(0,ue.width,ue.height)}catch(Be){f.value+=`打开摄像头失败:${(Be==null?void 0:Be.message)??Be}
|
|
14
|
-
`}}},u.onCameraStatus=R=>{R==="opened"?(c.value=!0,f.value+=`摄像头已打开
|
|
15
|
-
`):(c.value=!1,f.value+=`摄像头已关闭
|
|
16
|
-
`)},u.onPhoto=R=>{if(R.flag===0&&R.base64){const G=`data:image/jpeg;base64,${R.base64}`,ue=w(G,`gpy-capture-${Date.now()}.jpg`);m.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:G,file:ue}),f.value+=`拍照完成,已接收图片(当前 ${m.value.length} 张)
|
|
17
|
-
`}else f.value+=`拍照失败 flag=${R.flag}
|
|
18
|
-
`}}const j=async()=>{if(await a.nextTick(),!s.value)return;C(),N();const R=s.value.getBoundingClientRect();u.init(s.value,Math.floor(R.width),Math.floor(R.height)),f.value+=`正在连接设备服务...
|
|
19
|
-
`,await u.connect(),f.value+=`正在获取设备数量...
|
|
20
|
-
`,u.getDevCount()},C=()=>{try{u.destroy()}catch(R){console.error(R)}c.value=!1,m.value=[],f.value="",h.value=!1,y.value=[]};a.watch(()=>n.visible,R=>{R?j():C()});const W=()=>{try{u.bestSize()}catch(R){console.error(R)}},O=()=>{try{u.rotateLeft()}catch(R){console.error(R)}},U=()=>{try{u.rotateRight()}catch(R){console.error(R)}},H=()=>{try{u.focus()}catch(R){console.error(R)}},D=()=>{f.value+=`正在拍照...
|
|
21
|
-
`;try{u.photo()}catch(R){f.value+=`拍照调用失败:${(R==null?void 0:R.message)??R}
|
|
22
|
-
`}},S=()=>{m.value.length>0?o("confirm",m.value.map(R=>R.file)):o("confirm",[])},E=R=>{R<0||R>=m.value.length||(m.value.splice(R,1),f.value+=`已删除一张图片(剩余 ${m.value.length} 张)
|
|
23
|
-
`)},k=R=>{if(!R)return;const G=`gpy-preview-${Date.now()}.jpg`;y.value=[{name:G,blobUrl:R}],h.value=!0},g=()=>{h.value=!1},M=()=>{C(),o("cancel")};return(R,G)=>{const ue=a.resolveComponent("el-input"),Be=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(wr.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:M,width:"1200px",style:{height:"80%"}},{default:a.withCtx(()=>[a.createElementVNode("div",Of,[a.createElementVNode("div",{ref_key:"cameraBox",ref:s,style:{flex:"1","min-width":"0",border:"1px solid var(--el-border-color)","border-radius":"4px",position:"relative",overflow:"hidden",display:"flex","align-items":"center","justify-content":"center",background:"var(--el-fill-color-lighter)"}},[c.value?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Lf,"初始化摄像头..."))],512),a.createElementVNode("div",$f,[a.createElementVNode("div",Rf,[G[0]||(G[0]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),a.createElementVNode("div",Vf,[m.value.length===0?(a.openBlock(),a.createElementBlock("div",Ff,"暂无图片")):(a.openBlock(),a.createElementBlock("div",Pf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(de,Z)=>(a.openBlock(),a.createElementBlock("div",{key:de.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[a.createElementVNode("img",{src:de.url,onClick:pe=>k(de.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,jf),a.createElementVNode("div",{onClick:pe=>E(Z),style:{position:"absolute",top:"4px",right:"4px",width:"18px",height:"18px","border-radius":"50%",background:"rgba(0,0,0,0.55)",color:"#fff",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","font-size":"12px"},title:"删除"},"×",8,Hf)]))),128))]))],512)]),a.createElementVNode("div",Uf,[G[1]||(G[1]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),a.createVNode(ue,{type:"textarea",value:f.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",qf,[a.createVNode(Be,{onClick:W,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>G[2]||(G[2]=[a.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),a.createVNode(Be,{onClick:O,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>G[3]||(G[3]=[a.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),a.createVNode(Be,{onClick:U,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>G[4]||(G[4]=[a.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),a.createVNode(Be,{onClick:H,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>G[5]||(G[5]=[a.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),a.createVNode(Be,{onClick:D,disabled:!c.value,id:"themeButton"},{default:a.withCtx(()=>G[6]||(G[6]=[a.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),G[9]||(G[9]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),a.createVNode(Be,{onClick:S,disabled:m.value.length===0,id:"themeButton"},{default:a.withCtx(()=>G[7]||(G[7]=[a.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),a.createVNode(Be,{onClick:M,id:"themeBorderButton"},{default:a.withCtx(()=>G[8]||(G[8]=[a.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),h.value?(a.openBlock(),a.createBlock(il.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:g},null,8,["fileDataList"])):a.createCommentVNode("",!0)],64)}}}),Kf=Jl._export_sfc(Wf,[["__scopeId","data-v-24a2050a"]]),hs=$.useMenuState($.pinia),Gf=async l=>{var c,m,f,h,y,u;let r=l==null?void 0:l.导入文件,n=l==null?void 0:l.函数参数,o=(c=r==null?void 0:r[0])==null?void 0:c.url,s="";if(!(o!=null&&o.includes("http"))||!(o!=null&&o.includes("https"))){hs.setContentLoading(!0);const w=await $.platformDownloadFile({url:o});let N=w==null?void 0:w.data;const j=new FormData;j.append("file",N,((m=r==null?void 0:r[0])==null?void 0:m.name)+"."+((f=o==null?void 0:o.split("."))==null?void 0:f[1])),j.append("query",n);let C=await ec(j);C=(u=(y=(h=C==null?void 0:C.data)==null?void 0:h.data)==null?void 0:y.response)==null?void 0:u.replace("generateResult",l==null?void 0:l.函数名称),s=C,hs.setContentLoading(!1)}return s},Bt=$.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(l){this.objUrl=l},setBlobUrls(l){this.blobUrls=l}}}),Yf=$.useLoginState($.pinia),{extraUrl:so}=$.storeToRefs(Yf);let vc=so.value===""||!so.value?"http://139.196.154.85:20015":so.value;a.watch(()=>so.value,()=>{vc=so.value===""||!so.value?"http://139.196.154.85:20015":so.value},{deep:!0,immediate:!0});const Ti={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},vs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:vc+"/api/public/paddleOCR"};class Jf{constructor(r){Wr(this,"config");this.config={...vs,...r}}updateConfig(r){this.config={...this.config,...r}}getConfig(){return{...this.config}}validateFileSize(r){const n=this.config.maxSize*1024*1024;return r.size<=n}validateFileType(r){return r.type.startsWith("image/")||r.type==="application/pdf"}getAuthorizationToken(){const r=Ga.Local.get(Ga.accessTokenKey);return r?`Bearer ${r}`:""}buildOCRRequest(r,n){return{title:n,form:{OCR图片文件:r}}}async recognize(r,n){const o=this.getAuthorizationToken(),s=this.buildOCRRequest(r,n),c=this.config.apiUrl||vs.apiUrl||"";return(await Ga.axios.post(c,s,{headers:{"Content-Type":"application/json",Authorization:o}})).data}getFieldAliases(r){return Ti[r]?Ti[r]:[r]}extractTableHeaders(r){const n=[],o=new Set,s=m=>{const f=m==null?void 0:m.label;return!(!f||f==="操作"||f===this.config.columnName||(m==null?void 0:m.type)==="operate"||(m==null?void 0:m.prop)==="operate")},c=m=>{(m||[]).forEach(f=>{if(!f)return;const h=(f==null?void 0:f.children)||(f==null?void 0:f.child)||(f==null?void 0:f.columns);if(Array.isArray(h)&&h.length>0){c(h);return}if(s(f)){const y=f.label;if(!o.has(y)){o.add(y);const u=this.getFieldAliases(y);n.push(u)}}})};return c(r||[]),n}}function mc(l){return new Jf(l)}mc();const kt=async(l,r)=>{var m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k;let n=(f=(m=$.cloneDeep(l))==null?void 0:m.optionUrl)==null?void 0:f.menuSelect,o=[];n==null||n.forEach(g=>{});let s="",c=await ia.menuToParent(n);if(c==null||c.forEach(g=>{var M,R,G,ue;(g==null?void 0:g.name)===(((ue=(G=(R=(M=$.cloneDeep(l))==null?void 0:M.optionUrl)==null?void 0:R.groupSelect)==null?void 0:G[0])==null?void 0:ue.replaceAll("'",""))??"")&&(s=g==null?void 0:g.id)}),r){s=r;const g=await Dr.getInsofDataApi({id:s}),M=(w=(u=(y=(h=g==null?void 0:g.data)==null?void 0:h.result)==null?void 0:y[0])==null?void 0:u.key)==null?void 0:w.pageKey;c=await ia.getItemData(M,sessionStorage.getItem("systemKey"),"")}if(s!==""){let g;r?g=(N=c==null?void 0:c.find(G=>(G==null?void 0:G.id)===r))==null?void 0:N.compData:g=(j=c==null?void 0:c.find(G=>{var ue,Be,de,Z;return(G==null?void 0:G.name)===(((Be=(ue=l==null?void 0:l.groupSelect)==null?void 0:ue.split(":"))==null?void 0:Be[0])||((Z=(de=l==null?void 0:l.optionUrl)==null?void 0:de.groupSelect)==null?void 0:Z[0]))}))==null?void 0:j.compData;let M=(W=(C=g==null?void 0:g.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:C.contents)==null?void 0:W.map(G=>G==null?void 0:G.label);(U=(O=g==null?void 0:g.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:O.contents)!=null&&U.every(G=>Array.isArray(G))&&(M=(S=ia.getColumnChild((D=(H=g==null?void 0:g.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:H.contents)==null?void 0:D[0]))==null?void 0:S.map(G=>G==null?void 0:G.prop));let R=(k=(E=g==null?void 0:g.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:E.contents)==null?void 0:k.map(G=>{if(Array.isArray(G))G=G==null?void 0:G.filter(ue=>!(ue!=null&&ue.id));else{let ue={};for(let Be in G)Be!=="id"&&(ue[Be]=G==null?void 0:G[Be]);G=ue}return G});R==null||R.forEach(G=>{Array.isArray(G)?o.push(ia.getValueToObjectValue(G,M)):o.push(G)})}return o},Xf=$.useMenuState($.pinia),{activeMenuPath:rv}=$.storeToRefs(Xf),Zf=$.useUnit($.pinia),{chooseTitle:nv}=$.storeToRefs(Zf),Qf="col-operate",yc=l=>`${Qf}-${l}`,e0=(l,r)=>{const n=new Map;l.forEach(s=>{const{prop:c}=s;n.set(c,s)});const o=s=>{Array.isArray(s)&&s.forEach(c=>{const{prop:m}=c||{},f=n.get(m);a0(f,c),Array.isArray(c==null?void 0:c.children)&&c.children.length>0&&o(c.children)})};return o(r),r},a0=(l,r)=>(l&&(r.sortable=l==null?void 0:l.sortable,r.filterable=l==null?void 0:l.filterable,r.showSummary=l==null?void 0:l.showSummary,r.operable=l==null?void 0:l.operable,r.fixed=l==null?void 0:l.fixed),r),l0=(l,r)=>{const{sortable:n=!1,filterable:o=!1,showSummary:s=!1,operable:c=!1,fixed:m=!1}=r||{};return{prop:l,sortable:n,filterable:o,showSummary:s,operable:c,fixed:m}},r0=async l=>{var c,m;if(!l)return;const r=yc(l),n=await Dr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r}}),o=(c=n==null?void 0:n.data)==null?void 0:c.code,s=(m=n==null?void 0:n.data)==null?void 0:m.result;if(o==200)return s==null?void 0:s[0]},n0=async l=>{if(l)return[]},o0=async(l,r)=>{if(!l||!r)return;const n=yc(l);return await Dr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:r}})},i0=async(l,r)=>!l||!r?void 0:await Dr.updateInsofDataApi({id:l,value:{columns:r}}),ms=async(l,r)=>{const n=sessionStorage.getItem("systemKey");if(!l||!r||!n)return;const o=await r0(l);return o?await i0(o==null?void 0:o.id,r):await o0(l,r)};var _i={exports:{}},t0=_i.exports,ys;function s0(){return ys||(ys=1,function(l,r){(function(n,o){o()})(t0,function(){function n(y,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(y.type)?new Blob(["\uFEFF",y],{type:y.type}):y}function o(y,u,w){var N=new XMLHttpRequest;N.open("GET",y),N.responseType="blob",N.onload=function(){h(N.response,u,w)},N.onerror=function(){console.error("could not download file")},N.send()}function s(y){var u=new XMLHttpRequest;u.open("HEAD",y,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function c(y){try{y.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),y.dispatchEvent(u)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Pn.commonjsGlobal=="object"&&Pn.commonjsGlobal.global===Pn.commonjsGlobal?Pn.commonjsGlobal:void 0,f=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!f?function(y,u,w){var N=m.URL||m.webkitURL,j=document.createElement("a");u=u||y.name||"download",j.download=u,j.rel="noopener",typeof y=="string"?(j.href=y,j.origin===location.origin?c(j):s(j.href)?o(y,u,w):c(j,j.target="_blank")):(j.href=N.createObjectURL(y),setTimeout(function(){N.revokeObjectURL(j.href)},4e4),setTimeout(function(){c(j)},0))}:"msSaveOrOpenBlob"in navigator?function(y,u,w){if(u=u||y.name||"download",typeof y!="string")navigator.msSaveOrOpenBlob(n(y,w),u);else if(s(y))o(y,u,w);else{var N=document.createElement("a");N.href=y,N.target="_blank",setTimeout(function(){c(N)})}}:function(y,u,w,N){if(N=N||open("","_blank"),N&&(N.document.title=N.document.body.innerText="downloading..."),typeof y=="string")return o(y,u,w);var j=y.type==="application/octet-stream",C=/constructor/i.test(m.HTMLElement)||m.safari,W=/CriOS\/[\d]+/.test(navigator.userAgent);if((W||j&&C||f)&&typeof FileReader<"u"){var O=new FileReader;O.onloadend=function(){var D=O.result;D=W?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),N?N.location.href=D:location=D,N=null},O.readAsDataURL(y)}else{var U=m.URL||m.webkitURL,H=U.createObjectURL(y);N?N.location=H:location.href=H,N=null,setTimeout(function(){U.revokeObjectURL(H)},4e4)}});m.saveAs=h.saveAs=h,l.exports=h})}(_i)),_i.exports}s0();const Qn=$.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],itemGridData:[],itemExtendData:void 0,payloadTypes:"",lockingPage:"",systemPath:void 0,pageMapState:void 0,cacheUpdatingData:void 0,freshContent:!1,tableLoading:!1,routeToChildPath:"",tableViewContents:[],activeItemIndex:0,fixMenuStatus:!1,refreshTable:!1,selectTab:""}),actions:{setItemData(l){this.itemData=l},setCurStructureCompIds(l){this.curStructureCompIds=l},setRefreshCurStructure(l){this.isRefreshCurStructure=l},setOriginalData(l){this.originalData=l},setExtraContents(l){this.extraContents=l},setNodeDev(l){this.nodeDev=l},setIsEdit(l){this.isEdit=l},setSelectTab(l){this.selectTab=l}}}),c0=$.useLoginState($.pinia),{loginUserInfo:dt}=$.storeToRefs(c0),u0=async l=>{var o,s,c;let r=await $.getAllTables({platId:parseInt((o=dt==null?void 0:dt.value)==null?void 0:o.plat_id),tableNames:[l]});return r=(c=(s=r==null?void 0:r.data)==null?void 0:s.result)==null?void 0:c[0],await uc(r,!1),[{comp:"Table",isShow:!0,name:"日志管理",compData:[{key:"extraButton",contents:[]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"请求类型",prop:"request_method",formType:"Input",align:"center"},{label:"请求路径",prop:"request_url",formType:"Input",align:"center"},{label:"请求参数",prop:"request_param",formType:"Upload",align:"center"},{label:"返回结果",prop:"request_result",formType:"Upload",align:"center"},{label:"返回信息",prop:"request_message",formType:"Input",align:"center"},{label:"请求表格",prop:"request_table",formType:"Input",align:"center"},{label:"请求种类",prop:"request_type",formType:"Input",align:"center"},{label:"请求创建时间",prop:"create_time",formType:"Date",align:"center"},{label:"请求创建人",prop:"create_user_id",formType:"Input",align:"center"}]},{key:"tableContents",contents:r}]}]},d0=$.useLoginState(),{loginUserInfo:fl}=$.storeToRefs(d0);let gi="$R";const Er=$.useModelComp($.pinia),gc=a.ref(!1),{itemData:p0,itemGridData:io,curStructureCompIds:gs,isSubmitCurStructure:f0,routeToChildPath:h0,pageMapState:xt,itemExtendData:bi,refreshTable:bs}=$.storeToRefs(Er),Ri=Qn($.pinia),Ar=$.useMenuState($.pinia),nr=a.shallowRef([]),{asideMenus:v0,activeTopMenuPath:m0,activeMenuPath:ml,platform:ov,buttonTriggerType:y0,currentMenuPath:Qr}=$.storeToRefs(Ar),pn=$.useUnit($.pinia),{selectTitle:Jn,chooseTitle:Ai}=$.storeToRefs(pn);a.ref();const To=a.ref(!0),Zn=a.ref(0),wt=a.ref([]);a.ref(!1);const Tt=a.ref(!1),Ko=a.ref(),bc=a.ref(),kc=a.ref(),g0=()=>{Er.setItemGridData([]),Er.setIsEdit("edit"),Er.setSubmitCurStructure(ml.value!=="/平台管理/菜单管理")},b0=()=>{Er.setIsEdit("view"),Er.setRefreshCurStructure(!0)},k0=async l=>{var s;let r=Jn.value,n=r==null?void 0:r.findIndex(c=>(c==null?void 0:c.value)===(l==null?void 0:l.value)),o=r==null?void 0:r.filter((c,m)=>m<=n);pn.setSelectTitle(il.safeClone(o)),o=(s=o==null?void 0:o.map(c=>c==null?void 0:c.value))==null?void 0:s.join("/"),Ar.setActiveMenuPath(null),Ar.setActiveMenuPath(o)},pt=async(l,r,n,o="contentConfig")=>{var s;try{if(!Array.isArray(l))return;let c,m;r==="create"?(c={dataList:l==null?void 0:l.map(h=>{var y;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:o,parentTable:"",version:1},value:{pageData:{...h,compData:(y=h==null?void 0:h.compData)==null?void 0:y.filter(u=>(u==null?void 0:u.key)!=="tableContents")}}}})},m=Dr.batchAddInsofDataApi):r==="update"?(c={dataList:l==null?void 0:l.map(h=>{var y;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(y=h==null?void 0:h.compData)==null?void 0:y.filter(u=>(u==null?void 0:u.key)!=="tableContents")}}}})},m=Dr.batchUpdateInsofDataApi):r==="delete"&&(c={ids:l},m=Dr.batchDeleteInsofDataApi);const f=await m(c);if(((s=f==null?void 0:f.data)==null?void 0:s.code)===200)return f.data.result;throw Ga.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Ga.ElMessage.error("保存响应失败")}},ks=async(l,r,n,o)=>{var s,c,m,f,h,y,u,w,N,j,C;try{const W=(c=(s=l==null?void 0:l.results)==null?void 0:s.filter(E=>!(E!=null&&E.id)||typeof(E==null?void 0:E.id)=="string"))==null?void 0:c.map(E=>({key:{pageKey:l==null?void 0:l.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:n},value:{tableData:E}})),O=(f=(m=l==null?void 0:l.results)==null?void 0:m.filter(E=>(E==null?void 0:E.id)&&typeof(E==null?void 0:E.id)=="number"))==null?void 0:f.map(E=>({id:E==null?void 0:E.id,value:{tableData:E}})),U=JSON.parse(JSON.stringify(l)),H=(h=U==null?void 0:U.results)==null?void 0:h.map(E=>E.id);let D;n?D=(w=(u=(y=xt.value)==null?void 0:y[ml.value])==null?void 0:u.filter(E=>{var k,g,M;return((k=E==null?void 0:E.key)==null?void 0:k.type)===r&&((M=(g=E==null?void 0:E.key)==null?void 0:g.relatedInfo)==null?void 0:M.target)===o}))==null?void 0:w.map(E=>E==null?void 0:E.id):D=(C=(j=(N=xt.value)==null?void 0:N[ml.value])==null?void 0:j.filter(E=>{var k;return((k=E==null?void 0:E.key)==null?void 0:k.type)===r}))==null?void 0:C.map(E=>E==null?void 0:E.id);const S=D==null?void 0:D.filter(E=>!(H!=null&&H.includes(E))&&typeof E=="number");(W==null?void 0:W.length)>0&&await Dr.batchAddInsofDataApi({dataList:W}),(O==null?void 0:O.length)>0&&await Dr.batchUpdateInsofDataApi({dataList:O}),(S==null?void 0:S.length)>0&&await Dr.batchDeleteInsofDataApi({ids:S})}catch(W){throw new Error(W)}},x0=async l=>{var y,u,w,N,j,C,W,O,U,H;Ar.setContentLoading(!0);const r=JSON.parse(JSON.stringify(p0.value));if(!f0.value)return Ar.setCacheStructures({key:y0.value,data:r}),Ga.ElMessage.success("已暂存");const n=r==null?void 0:r.map(D=>D.id),o=n.filter(D=>{var S;return!((S=gs.value)!=null&&S.includes(D))}),s=(y=gs.value)==null?void 0:y.filter(D=>!n.includes(D)),c=[...o,...s].filter(D=>typeof D!==null&&typeof D<"u"),m=r==null?void 0:r.filter(D=>!D.id),f=r==null?void 0:r.filter(D=>D.id);let h=[];if(c&&(c==null?void 0:c.length)>0&&h.push(pt(c,"delete",l)),m&&(m==null?void 0:m.length)>0&&h.push(pt(m,"create",l)),f&&(f==null?void 0:f.length)>0&&h.push(pt(f,"update",l)),io.value&&((u=io.value)!=null&&u.isDelete&&((N=(w=io.value)==null?void 0:w.results)==null?void 0:N.length)>0&&((C=(j=io.value)==null?void 0:j.results)!=null&&C.every(D=>typeof D=="number"))?await Dr.batchDeleteInsofDataApi({ids:(W=io.value)==null?void 0:W.results}):(console.log("itemGridData.value",io.value),h.push(await ks(io.value,"gridLayout")))),bi.value)for(const D in bi.value)h.push(await ks((O=bi.value)==null?void 0:O[D],"extend",{target:D,compId:(H=(U=bi.value)==null?void 0:U[D])==null?void 0:H.compId},D));await Promise.all(h).then(()=>{Ga.ElMessage.success("保存成功"),Er.setRefreshCurStructure(!0)}).catch(D=>{Ga.ElMessage.success(D)}),Ar.setContentLoading(!1)},Go=l=>Ao(l),w0=a.computed(()=>{var l;return(l=nr.value)==null?void 0:l.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),xc=a.computed(()=>{var l;return(l=nr.value)==null?void 0:l.filter(r=>!(r!=null&&r.affix&&(r==null?void 0:r.affix)!=="default"))}),wc=a.ref(0),_c=a.ref(null),_0="ocr_committed_temp_ids_v1",S0=(l,r)=>`${_0}:${String(l??"")}:${String(r??"")}`,E0=(l,r,n)=>{try{const o=S0(l,r),s=sessionStorage.getItem(o),c=s?JSON.parse(s):[],m=Array.isArray(c)?c:[],f=Array.from(new Set([...m,...n||[]].map(h=>String(h)))).slice(-200);sessionStorage.setItem(o,JSON.stringify(f))}catch{}},zi=async(l,r="data",n)=>{var s,c,m,f,h,y,u,w,N,j,C,W,O,U,H,D,S,E,k,g,M,R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia,V,P,ee,fe,ve,ha,Ze,se,we,ya,ze,_a,We,x,Ae,ne,Ue,Je,ra,Oe,za,fa,Oa,Pa,ka,ua,ma,Ha,pl,$l,gl,Ol,$a,jl,Zl,ja;let o=((m=(c=(s=Jn.value)==null?void 0:s.filter(ba=>(ba==null?void 0:ba.condition)==="child"))==null?void 0:c[0])==null?void 0:m.value)??"";if((l==null?void 0:l.buttonName)==="新增"){let ba=(f=l==null?void 0:l.fixContent)==null?void 0:f.map(ke=>{let Ta={};for(let Ge in ke)Array.isArray(ke==null?void 0:ke[Ge])?Ta[Ge]=JSON.stringify(ke==null?void 0:ke[Ge]):Ta[Ge]=ke==null?void 0:ke[Ge];return Ta}),Da=await $.quoteApi({platId:parseInt((h=fl==null?void 0:fl.value)==null?void 0:h.plat_id),type:"fatherSyncs",related:[{menus:o!==""?ml.value+"/"+o:ml.value,groups:l==null?void 0:l.name}]});Da=(y=Da==null?void 0:Da.data)==null?void 0:y.result,Da=Da==null?void 0:Da.filter(ke=>{var Ta,Ge;return!((ke==null?void 0:ke.fatherPath)!==""&&((Ge=(Ta=ke==null?void 0:ke.quote)==null?void 0:Ta[0])==null?void 0:Ge.menus)===(ml==null?void 0:ml.value))});let Ua=Da==null?void 0:Da.map(ke=>{var aa,Qe;let Ta={},Ge=ba==null?void 0:ba[0],X;return Array.isArray((aa=ke==null?void 0:ke.struct)==null?void 0:aa[0])?X=ia.getColumnChild((Qe=ke==null?void 0:ke.struct)==null?void 0:Qe[0]):X=ke==null?void 0:ke.struct,X=X==null?void 0:X.filter(Ie=>(Ie==null?void 0:Ie.prop)!=="relatedId"),X==null||X.forEach(Ie=>{var xl,ll;Ta[Ie.prop]=((xl=Ie==null?void 0:Ie.words)!=null&&xl[0]?(Ge==null?void 0:Ge[(ll=Ie==null?void 0:Ie.words)==null?void 0:ll[0]])??(Ge==null?void 0:Ge[Ie==null?void 0:Ie.prop]):Ge==null?void 0:Ge[Ie==null?void 0:Ie.prop])??""}),Ta.id="1",Ta.relatedId=`[${Ta.id}]`,delete Ta.sort,{tableName:"content_"+(ke==null?void 0:ke.id),tableContents:[Ta]}}),al=[{tableName:(u=l==null?void 0:l.relatedContents)==null?void 0:u.find(ke=>ke==null?void 0:ke.includes("content")),tableContents:ba}];al=[...al,...Ua];let Za=await $.quoteApi({platId:parseInt((w=fl==null?void 0:fl.value)==null?void 0:w.plat_id),type:"sonSyncs",related:[{menus:o!==""?ml.value+"/"+o:ml.value,groups:l==null?void 0:l.name}]});Za=(j=(N=Za==null?void 0:Za.data)==null?void 0:N.result)==null?void 0:j.filter(ke=>!(al!=null&&al.find(Ta=>(Ta==null?void 0:Ta.tableName)==="content_"+(ke==null?void 0:ke.id)))),Za=Za==null?void 0:Za.filter(ke=>{var Ta,Ge;return!((ke==null?void 0:ke.fatherPath)!==""&&((Ge=(Ta=ke==null?void 0:ke.quote)==null?void 0:Ta[0])==null?void 0:Ge.menus)===(ml==null?void 0:ml.value))});let Me=Za==null?void 0:Za.map(ke=>{var aa,Qe,Ie,xl,ll,hl,Ra;let Ta={},Ge=ba==null?void 0:ba[0],X;return Array.isArray((aa=ke==null?void 0:ke.struct)==null?void 0:aa[0])?X=ia.getColumnChild((Qe=ke==null?void 0:ke.struct)==null?void 0:Qe[0]):X=ke==null?void 0:ke.struct,X=X==null?void 0:X.filter(Wa=>(Wa==null?void 0:Wa.prop)!=="relatedId"),((xl=(Ie=X==null?void 0:X[0])==null?void 0:Ie.words)!=null&&xl[0]?Ge!=null&&Ge[(hl=(ll=X==null?void 0:X[0])==null?void 0:ll.words)==null?void 0:hl[0]]:Ge!=null&&Ge[(Ra=X==null?void 0:X[0])==null?void 0:Ra.prop])?(X==null||X.forEach(Wa=>{var Sa,me;Ta[Wa.prop]=((Sa=Wa==null?void 0:Wa.words)!=null&&Sa[0]?(Ge==null?void 0:Ge[(me=Wa==null?void 0:Wa.words)==null?void 0:me[0]])??(Ge==null?void 0:Ge[Wa==null?void 0:Wa.prop]):Ge==null?void 0:Ge[Wa==null?void 0:Wa.prop])??""}),Ta.id="1",Ta.relatedId=`[${Ta.id}]`,delete Ta.sort):Ta=void 0,{tableName:"content_"+(ke==null?void 0:ke.id),tableContents:[Ta]}});Me=Me==null?void 0:Me.filter(ke=>{var Ta;return!((Ta=ke==null?void 0:ke.tableContents)!=null&&Ta.every(Ge=>Ge===void 0))}),al=[...al,...Me],await $.pageBatchAddApi({platId:parseInt((C=fl==null?void 0:fl.value)==null?void 0:C.plat_id),changeContents:al});let na=[];al==null||al.forEach(ke=>{var Ta;(Ta=ke==null?void 0:ke.tableContents)==null||Ta.forEach(Ge=>{na.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ge),request_result:"{}",is_delete:!1,request_table:ke==null?void 0:ke.tableName,request_type:"add"})})}),await $.pageBatchAddApi({platId:parseInt((W=fl==null?void 0:fl.value)==null?void 0:W.plat_id),changeContents:[{tableName:"log",tableContents:na}]})}if((l==null?void 0:l.buttonName)==="OCR批量新增"){const ba=((l==null?void 0:l.ocrRows)||[]).map(Za=>Za==null?void 0:Za.id).filter(Za=>Za!=null),Da=((l==null?void 0:l.ocrRows)||[]).map(Za=>{const Me={...Za};return delete Me._isOCRRow,delete Me._ocrTableId,Object.keys(Me).forEach(na=>{/(^|\.)证书附件$/.test(na)&&Array.isArray(Me[na])&&(Me[na]=JSON.stringify(Me[na].map(ke=>({url:(ke==null?void 0:ke.url)||"",name:(ke==null?void 0:ke.name)||(ke==null?void 0:ke.fileName)||"",fileName:(ke==null?void 0:ke.fileName)||(ke==null?void 0:ke.name)||""})).filter(ke=>ke.url||ke.name)))}),Me});let Ua=[{tableName:(O=l==null?void 0:l.relatedContents)==null?void 0:O.find(Za=>Za==null?void 0:Za.includes("content")),tableContents:Da}];await $.pageBatchAddApi({platId:parseInt((U=fl==null?void 0:fl.value)==null?void 0:U.plat_id),changeContents:Ua});let al=[];Ua==null||Ua.forEach(Za=>{var Me;(Me=Za==null?void 0:Za.tableContents)==null||Me.forEach(na=>{al.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(na),request_result:"{}",is_delete:!1,request_table:Za==null?void 0:Za.tableName,request_type:"ocrBatchAdd"})})}),await $.pageBatchAddApi({platId:parseInt((H=fl==null?void 0:fl.value)==null?void 0:H.plat_id),changeContents:[{tableName:"log",tableContents:al}]}),E0(l==null?void 0:l.parentTableId,l==null?void 0:l.index,ba)}if((l==null?void 0:l.buttonName)==="编辑"){const Da=((l==null?void 0:l.fixContent)||(l==null?void 0:l.singleContent)||[]||[]).map(X=>{const aa={...X};return delete aa._isOCRRow,delete aa._ocrTableId,delete aa._isTemp,delete aa.tableEditType,delete aa.index,aa});let Ua=Da==null?void 0:Da.map(X=>{let aa={};for(let Qe in X)Array.isArray(X==null?void 0:X[Qe])?aa[Qe]=JSON.stringify(X==null?void 0:X[Qe]):aa[Qe]=X==null?void 0:X[Qe];return aa}),al=await $.quoteApi({platId:parseInt((D=fl==null?void 0:fl.value)==null?void 0:D.plat_id),type:"fatherSyncs",related:[{menus:o!==""?ml.value+"/"+o:ml.value,groups:l==null?void 0:l.name}]});al=(S=al==null?void 0:al.data)==null?void 0:S.result,al=al==null?void 0:al.filter(X=>{var aa,Qe;return!((X==null?void 0:X.fatherPath)!==""&&((Qe=(aa=X==null?void 0:X.quote)==null?void 0:aa[0])==null?void 0:Qe.menus)===(ml==null?void 0:ml.value))});let Za=(E=Ua==null?void 0:Ua[0])==null?void 0:E.id,Me=[{tableName:(k=l==null?void 0:l.relatedContents)==null?void 0:k.find(X=>X==null?void 0:X.includes("content")),tableContents:Ua}],na=(g=al==null?void 0:al.map(X=>{var Qe,Ie,xl,ll,hl;let aa=(Qe=X==null?void 0:X.contents)==null?void 0:Qe.filter(Ra=>{var Wa,Sa;return JSON.stringify(Ra==null?void 0:Ra.relatedId)!=="{}"&&(Ra==null?void 0:Ra.relatedId)!==""&&(Ra!=null&&Ra.relatedId)?(Wa=Ra==null?void 0:Ra.relatedId)==null?void 0:Wa.includes(parseInt(Za)):(Ra==null?void 0:Ra.sort)===((Sa=Ua==null?void 0:Ua[0])==null?void 0:Sa.sort)});if((aa==null?void 0:aa.length)>0){let Ra=Ua==null?void 0:Ua[0];Ra={...Ra,id:(Ie=aa==null?void 0:aa[0])==null?void 0:Ie.id};let Wa={},Sa=Ra,me;return Array.isArray((xl=X==null?void 0:X.struct)==null?void 0:xl[0])?me=ia.getColumnChild((ll=X==null?void 0:X.struct)==null?void 0:ll[0]):me=X==null?void 0:X.struct,me=me==null?void 0:me.filter(xa=>(xa==null?void 0:xa.prop)!=="relatedId"),me==null||me.forEach(xa=>{var wl,Rl;Wa[xa.prop]=((wl=xa==null?void 0:xa.words)!=null&&wl[0]?(Sa==null?void 0:Sa[(Rl=xa==null?void 0:xa.words)==null?void 0:Rl[0]])??(Sa==null?void 0:Sa[xa==null?void 0:xa.prop]):Sa==null?void 0:Sa[xa==null?void 0:xa.prop])??""}),Wa.id=(hl=aa==null?void 0:aa[0])==null?void 0:hl.id,delete Wa.sort,delete Wa.relatedId,{tableName:"content_"+(X==null?void 0:X.id),tableContents:[Wa]}}else return}))==null?void 0:g.filter(X=>X);Me=[...Me,...na];let ke=await $.quoteApi({platId:parseInt((M=fl==null?void 0:fl.value)==null?void 0:M.plat_id),type:"sonSyncs",related:[{menus:o!==""?ml.value+"/"+o:ml.value,groups:l==null?void 0:l.name}]});ke=(G=(R=ke==null?void 0:ke.data)==null?void 0:R.result)==null?void 0:G.filter(X=>!(Me!=null&&Me.find(aa=>(aa==null?void 0:aa.tableName)==="content_"+(X==null?void 0:X.id)))),ke=ke==null?void 0:ke.filter(X=>{var aa,Qe;return!((X==null?void 0:X.fatherPath)!==""&&((Qe=(aa=X==null?void 0:X.quote)==null?void 0:aa[0])==null?void 0:Qe.menus)===(ml==null?void 0:ml.value))});let Ta=(ue=ke==null?void 0:ke.map(X=>{var Qe,Ie,xl,ll,hl;let aa=(Qe=X==null?void 0:X.contents)==null?void 0:Qe.filter(Ra=>{var Wa,Sa,me;return JSON.stringify(Ra==null?void 0:Ra.relatedId)!=="{}"&&(Ra==null?void 0:Ra.relatedId)!==""&&(Ra!=null&&Ra.relatedId)?(Wa=Ra==null?void 0:Ra.relatedId)==null?void 0:Wa.includes(parseInt(Za)):(Ra==null?void 0:Ra.sort)===((Sa=Ua==null?void 0:Ua[0])==null?void 0:Sa.sort)||(Ra==null?void 0:Ra.sort)===(parseInt(((me=Ua==null?void 0:Ua[0])==null?void 0:me.sort)??"0")+1).toString()});if((aa==null?void 0:aa.length)>0){let Ra=Ua==null?void 0:Ua[0];Ra={...Ra,id:(Ie=aa==null?void 0:aa[0])==null?void 0:Ie.id};let Wa={},Sa=Ra,me;return Array.isArray((xl=X==null?void 0:X.struct)==null?void 0:xl[0])?me=ia.getColumnChild((ll=X==null?void 0:X.struct)==null?void 0:ll[0]):me=X==null?void 0:X.struct,me=me==null?void 0:me.filter(xa=>(xa==null?void 0:xa.prop)!=="relatedId"),me==null||me.forEach(xa=>{var wl,Rl,Fl,or;((wl=xa==null?void 0:xa.words)!=null&&wl[0]?(Sa==null?void 0:Sa[(Rl=xa==null?void 0:xa.words)==null?void 0:Rl[0]])??(Sa==null?void 0:Sa[xa==null?void 0:xa.prop]):Sa!=null&&Sa[xa==null?void 0:xa.prop])&&(Wa[xa.prop]=((Fl=xa==null?void 0:xa.words)!=null&&Fl[0]?(Sa==null?void 0:Sa[(or=xa==null?void 0:xa.words)==null?void 0:or[0]])??(Sa==null?void 0:Sa[xa==null?void 0:xa.prop]):Sa==null?void 0:Sa[xa==null?void 0:xa.prop])??"")}),Wa.id=(hl=aa==null?void 0:aa[0])==null?void 0:hl.id,delete Wa.sort,delete Wa.relatedId,{tableName:"content_"+(X==null?void 0:X.id),tableContents:[Wa]}}else return}))==null?void 0:ue.filter(X=>X);Me=[...Me,...Ta],await $.pageBatchUpdateApi({platId:parseInt((Be=fl==null?void 0:fl.value)==null?void 0:Be.plat_id),changeContents:Me});let Ge=[];Me==null||Me.forEach(X=>{var aa;(aa=X==null?void 0:X.tableContents)==null||aa.forEach(Qe=>{Ge.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Qe),request_result:"{}",is_delete:!1,request_table:X==null?void 0:X.tableName,request_type:"update"})})}),await $.pageBatchAddApi({platId:parseInt((de=fl==null?void 0:fl.value)==null?void 0:de.plat_id),changeContents:[{tableName:"log",tableContents:Ge}]})}if((l==null?void 0:l.buttonName)==="删除"){let ba=[{tableName:(Z=l==null?void 0:l.relatedContents)==null?void 0:Z.find(ke=>ke==null?void 0:ke.includes("content")),tableContents:l==null?void 0:l.fixContent}],Da=await $.quoteApi({platId:parseInt((pe=fl==null?void 0:fl.value)==null?void 0:pe.plat_id),type:"fatherSyncs",related:[{menus:o!==""?ml.value+"/"+o:ml.value,groups:l==null?void 0:l.name}]});Da=(ae=Da==null?void 0:Da.data)==null?void 0:ae.result,Da=Da==null?void 0:Da.filter(ke=>{var Ta,Ge;return!((ke==null?void 0:ke.fatherPath)!==""&&((Ge=(Ta=ke==null?void 0:ke.quote)==null?void 0:Ta[0])==null?void 0:Ge.menus)===(ml==null?void 0:ml.value))});let Ua=(Ee=(ce=l==null?void 0:l.fixContent)==null?void 0:ce[0])==null?void 0:Ee.id,al=(Ve=Da==null?void 0:Da.map(ke=>{var Ge,X,aa,Qe,Ie,xl;let Ta=(Ge=ke==null?void 0:ke.contents)==null?void 0:Ge.filter(ll=>{var hl,Ra,Wa;return JSON.stringify(ll==null?void 0:ll.relatedId)!=="{}"&&(ll==null?void 0:ll.relatedId)!==""&&(ll!=null&&ll.relatedId)?(hl=ll==null?void 0:ll.relatedId)==null?void 0:hl.includes(parseInt(Ua)):(ll==null?void 0:ll.sort)===((Wa=(Ra=l==null?void 0:l.fixContent)==null?void 0:Ra[0])==null?void 0:Wa.sort)});if((Ta==null?void 0:Ta.length)>0){let ll=(X=l==null?void 0:l.fixContent)==null?void 0:X[0];ll={...ll,id:(aa=Ta==null?void 0:Ta[0])==null?void 0:aa.id};let hl={},Ra=ll,Wa;return Array.isArray((Qe=ke==null?void 0:ke.struct)==null?void 0:Qe[0])?Wa=ia.getColumnChild((Ie=ke==null?void 0:ke.struct)==null?void 0:Ie[0]):Wa=ke==null?void 0:ke.struct,Wa=Wa==null?void 0:Wa.filter(Sa=>(Sa==null?void 0:Sa.prop)!=="relatedId"),Wa==null||Wa.forEach(Sa=>{var me,xa;hl[Sa.prop]=((me=Sa==null?void 0:Sa.words)!=null&&me[0]?(Ra==null?void 0:Ra[(xa=Sa==null?void 0:Sa.words)==null?void 0:xa[0]])??(Ra==null?void 0:Ra[Sa==null?void 0:Sa.prop]):Ra==null?void 0:Ra[Sa==null?void 0:Sa.prop])??""}),hl.id=(xl=Ta==null?void 0:Ta[0])==null?void 0:xl.id,delete hl.sort,delete hl.relatedId,{tableName:"content_"+(ke==null?void 0:ke.id),tableContents:[hl]}}else return}))==null?void 0:Ve.filter(ke=>ke);ba=[...ba,...al];let Za=await $.quoteApi({platId:parseInt((ye=fl==null?void 0:fl.value)==null?void 0:ye.plat_id),type:"sonSyncs",related:[{menus:o!==""?ml.value+"/"+o:ml.value,groups:l==null?void 0:l.name}]});Za=(q=(z=Za==null?void 0:Za.data)==null?void 0:z.result)==null?void 0:q.filter(ke=>!(ba!=null&&ba.find(Ta=>(Ta==null?void 0:Ta.tableName)==="content_"+(ke==null?void 0:ke.id)))),Za=Za==null?void 0:Za.filter(ke=>{var Ta,Ge;return!((ke==null?void 0:ke.fatherPath)!==""&&((Ge=(Ta=ke==null?void 0:ke.quote)==null?void 0:Ta[0])==null?void 0:Ge.menus)===(ml==null?void 0:ml.value))});let Me=(le=Za==null?void 0:Za.map(ke=>{var Ge,X,aa,Qe,Ie,xl;let Ta=(Ge=ke==null?void 0:ke.contents)==null?void 0:Ge.filter(ll=>{var hl,Ra,Wa;return JSON.stringify(ll==null?void 0:ll.relatedId)!=="{}"&&(ll==null?void 0:ll.relatedId)!==""&&(ll!=null&&ll.relatedId)?(hl=ll==null?void 0:ll.relatedId)==null?void 0:hl.includes(parseInt(Ua)):(ll==null?void 0:ll.sort)===((Wa=(Ra=l==null?void 0:l.fixContent)==null?void 0:Ra[0])==null?void 0:Wa.sort)});if((Ta==null?void 0:Ta.length)>0){let ll=(X=l==null?void 0:l.fixContent)==null?void 0:X[0];ll={...ll,id:(aa=Ta==null?void 0:Ta[0])==null?void 0:aa.id};let hl={},Ra=ll,Wa;return Array.isArray((Qe=ke==null?void 0:ke.struct)==null?void 0:Qe[0])?Wa=ia.getColumnChild((Ie=ke==null?void 0:ke.struct)==null?void 0:Ie[0]):Wa=ke==null?void 0:ke.struct,Wa=Wa==null?void 0:Wa.filter(Sa=>(Sa==null?void 0:Sa.prop)!=="relatedId"),Wa==null||Wa.forEach(Sa=>{var me,xa;hl[Sa.prop]=((me=Sa==null?void 0:Sa.words)!=null&&me[0]?(Ra==null?void 0:Ra[(xa=Sa==null?void 0:Sa.words)==null?void 0:xa[0]])??(Ra==null?void 0:Ra[Sa==null?void 0:Sa.prop]):Ra==null?void 0:Ra[Sa==null?void 0:Sa.prop])??""}),hl.id=(xl=Ta==null?void 0:Ta[0])==null?void 0:xl.id,delete hl.sort,delete hl.relatedId,{tableName:"content_"+(ke==null?void 0:ke.id),tableContents:[hl]}}else return}))==null?void 0:le.filter(ke=>ke);ba=[...ba,...Me],await $.pageBatchDeleteApi({platId:parseInt((De=fl==null?void 0:fl.value)==null?void 0:De.plat_id),changeContents:ba});let na=[];ba==null||ba.forEach(ke=>{var Ta;(Ta=ke==null?void 0:ke.tableContents)==null||Ta.forEach(Ge=>{na.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Ge),request_result:"{}",is_delete:!1,request_table:ke==null?void 0:ke.tableName,request_type:"delete"})})}),await $.pageBatchAddApi({platId:parseInt((be=fl==null?void 0:fl.value)==null?void 0:be.plat_id),changeContents:[{tableName:"log",tableContents:na}]})}if((l==null?void 0:l.buttonName)==="复制新增"){let ba=await $.getPageDataApi({platId:parseInt((Ye=fl==null?void 0:fl.value)==null?void 0:Ye.plat_id),pageName:"menu"});if(ba=(da=ba==null?void 0:ba.data)==null?void 0:da.result,ba!=null&&ba.find(Da=>(Da==null?void 0:Da.father_name)===ml.value+"/")){kc.value=l,bc.value=ba==null?void 0:ba.filter(al=>(al==null?void 0:al.father_name)===ml.value+"/");let Da=(re=(Ma=l==null?void 0:l.columns)==null?void 0:Ma.find(al=>al==null?void 0:al.mainKey))==null?void 0:re.prop,Ua=(Te=(Ne=l==null?void 0:l.fixContent)==null?void 0:Ne[0])==null?void 0:Te[Da];Tt.value=!0,Ko.value=[{prop:Da,label:Da,name:Da,value:Ua}]}else{let Da=(qe=l==null?void 0:l.fixContent)==null?void 0:qe.map(Za=>{let Me={};for(let na in Za)Array.isArray(Za==null?void 0:Za[na])?Me[na]=JSON.stringify(Za==null?void 0:Za[na]):Me[na]=Za==null?void 0:Za[na];return Me.relatedId="",Me}),Ua=[{tableName:(Re=l==null?void 0:l.relatedContents)==null?void 0:Re.find(Za=>Za==null?void 0:Za.includes("content")),tableContents:Da}];await $.pageBatchAddApi({platId:parseInt((te=fl==null?void 0:fl.value)==null?void 0:te.plat_id),changeContents:Ua});let al=[];Ua==null||Ua.forEach(Za=>{var Me;(Me=Za==null?void 0:Za.tableContents)==null||Me.forEach(na=>{al.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(na),request_result:"{}",is_delete:!1,request_table:Za==null?void 0:Za.tableName,request_type:"copyAdd"})})}),await $.pageBatchAddApi({platId:parseInt((Le=fl==null?void 0:fl.value)==null?void 0:Le.plat_id),changeContents:[{tableName:"log",tableContents:al}]})}}if((l==null?void 0:l.buttonName)==="methodButton"){let ba=((Ia=(Ba=(He=l==null?void 0:l.columns)==null?void 0:He.map(X=>X==null?void 0:X.filter))==null?void 0:Ba.filter(X=>X!==""))==null?void 0:Ia[0])??"";ba=la.analyzeSplitToContent(ba,","),ba=(ba==null?void 0:ba.find(X=>X==null?void 0:X.includes("@Filter")))??"";let Da=(V=l==null?void 0:l.fixContent)==null?void 0:V.map(X=>{let aa={};for(let Qe in X)Array.isArray(X==null?void 0:X[Qe])?aa[Qe]=JSON.stringify(X==null?void 0:X[Qe]):aa[Qe]=X==null?void 0:X[Qe];return aa}),Ua=await $.quoteApi({platId:parseInt((P=fl==null?void 0:fl.value)==null?void 0:P.plat_id),type:"fatherSyncs",related:[{menus:o!==""?ml.value+"/"+o:ml.value,groups:l==null?void 0:l.name}]});Ua=(ee=Ua==null?void 0:Ua.data)==null?void 0:ee.result,Ua=Ua==null?void 0:Ua.filter(X=>{var aa,Qe;return!((X==null?void 0:X.fatherPath)!==""&&((Qe=(aa=X==null?void 0:X.quote)==null?void 0:aa[0])==null?void 0:Qe.menus)===(ml==null?void 0:ml.value))});let al=(ve=(fe=l==null?void 0:l.columns)==null?void 0:fe[0])==null?void 0:ve.prop,Za=(ha=Da==null?void 0:Da[0])==null?void 0:ha[al],Me=[{tableName:(Ze=l==null?void 0:l.relatedContents)==null?void 0:Ze.find(X=>X==null?void 0:X.includes("content")),tableContents:Da}],na=(se=Ua==null?void 0:Ua.map(X=>{var Qe,Ie,xl,ll,hl;let aa=(Qe=X==null?void 0:X.contents)==null?void 0:Qe.filter(Ra=>{var Wa;return(Wa=Object.values(Ra))==null?void 0:Wa.find(Sa=>Sa===Za)});if((aa==null?void 0:aa.length)>0){let Ra=Da==null?void 0:Da[0];Ra={...Ra,id:(Ie=aa==null?void 0:aa[0])==null?void 0:Ie.id};let Wa={},Sa=Ra,me;return Array.isArray((xl=X==null?void 0:X.struct)==null?void 0:xl[0])?me=ia.getColumnChild((ll=X==null?void 0:X.struct)==null?void 0:ll[0]):me=X==null?void 0:X.struct,me=me==null?void 0:me.filter(xa=>(xa==null?void 0:xa.prop)!=="relatedId"),me==null||me.forEach(xa=>{var wl,Rl;Wa[xa.prop]=((wl=xa==null?void 0:xa.words)!=null&&wl[0]?(Sa==null?void 0:Sa[(Rl=xa==null?void 0:xa.words)==null?void 0:Rl[0]])??(Sa==null?void 0:Sa[xa==null?void 0:xa.prop]):Sa==null?void 0:Sa[xa==null?void 0:xa.prop])??""}),Wa.id=(hl=aa==null?void 0:aa[0])==null?void 0:hl.id,delete Wa.sort,{tableName:"content_"+(X==null?void 0:X.id),tableContents:[Wa]}}else return}))==null?void 0:se.filter(X=>X);Me=[...Me,...na];let ke=await $.quoteApi({platId:parseInt((we=fl==null?void 0:fl.value)==null?void 0:we.plat_id),type:"sonSyncs",related:[{menus:o!==""?ml.value+"/"+o:ml.value,groups:l==null?void 0:l.name}]});if(ke=(ze=(ya=ke==null?void 0:ke.data)==null?void 0:ya.result)==null?void 0:ze.filter(X=>!(Me!=null&&Me.find(aa=>(aa==null?void 0:aa.tableName)==="content_"+(X==null?void 0:X.id)))),ke=ke==null?void 0:ke.filter(X=>{var aa,Qe;return!((X==null?void 0:X.fatherPath)!==""&&((Qe=(aa=X==null?void 0:X.quote)==null?void 0:aa[0])==null?void 0:Qe.menus)===(ml==null?void 0:ml.value))}),ba&&ba!==""){(ba==null?void 0:ba[(ba==null?void 0:ba.length)-1])===","&&(ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1)),ba=(We=(_a=ba==null?void 0:ba.replace("(",gi))==null?void 0:_a.split(gi))==null?void 0:We[1],ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1),(ba==null?void 0:ba[0])==="*"&&(ba="{"+((Ae=(x=ba==null?void 0:ba.replace("{",gi))==null?void 0:x.split(gi))==null?void 0:Ae[1])),ba=(ne=ba==null?void 0:ba.replaceAll("{",""))==null?void 0:ne.replaceAll("}","");let X=ia.calculatorAndToOr(ba);X=X==null?void 0:X[0];let aa;if((Ue=Object.values(X))!=null&&Ue.some(Qe=>(Qe==null?void 0:Qe[0])==="*")){let Qe=(ra=(Je=Jn.value)==null?void 0:Je.find(Ie=>(Ie==null?void 0:Ie.condition)==="child"))!=null&&ra.value?(Qr==null?void 0:Qr.value)+"/"+((za=(Oe=Jn.value)==null?void 0:Oe.find(Ie=>(Ie==null?void 0:Ie.condition)==="child"))==null?void 0:za.value):Qr==null?void 0:Qr.value;aa=await Kr(Qe,!1)}for(let Qe in X)if(((fa=X==null?void 0:X[Qe])==null?void 0:fa[0])==="*"){let Ie=(ua=(ka=(Pa=X[Qe])==null?void 0:Pa.slice(1,(Oa=X[Qe])==null?void 0:Oa.length))==null?void 0:ka.split(":"))==null?void 0:ua[0],xl=(Ha=(ma=X[Qe])==null?void 0:ma.split(":"))==null?void 0:Ha[1],ll=(pl=aa==null?void 0:aa.filter(hl=>(hl==null?void 0:hl.name)===Ie))==null?void 0:pl[0];ll=(gl=($l=ll==null?void 0:ll.compData)==null?void 0:$l.find(hl=>(hl==null?void 0:hl.key)==="tableContents"))==null?void 0:gl.contents,ll=(Ol=ll==null?void 0:ll[0])==null?void 0:Ol[xl],X[Qe]=ll}ba=(($a=Object.values(X))==null?void 0:$a[0])??""}let Ta=(jl=ke==null?void 0:ke.map(X=>{var Qe,Ie,xl,ll,hl;let aa=(Qe=X==null?void 0:X.contents)==null?void 0:Qe.filter(Ra=>{var Wa;return(Wa=Object.values(Ra))==null?void 0:Wa.find(Sa=>Sa===(ba===""?Za:ba))});if((aa==null?void 0:aa.length)>0){let Ra=Da==null?void 0:Da[0];Ra={...Ra,id:(Ie=aa==null?void 0:aa[0])==null?void 0:Ie.id};let Wa={},Sa=Ra,me;return Array.isArray((xl=X==null?void 0:X.struct)==null?void 0:xl[0])?me=ia.getColumnChild((ll=X==null?void 0:X.struct)==null?void 0:ll[0]):me=X==null?void 0:X.struct,me=me==null?void 0:me.filter(xa=>(xa==null?void 0:xa.prop)!=="relatedId"),me==null||me.forEach(xa=>{var Rl,Fl,or,gr;let wl=(Rl=l==null?void 0:l.columns)==null?void 0:Rl.find(Cl=>{var sr,Tr,Ml;return((Tr=(sr=Cl==null?void 0:Cl.words)==null?void 0:sr[0])==null?void 0:Tr.replaceAll("'",""))===(xa==null?void 0:xa.prop)&&((Ml=Cl==null?void 0:Cl.functionRelatedWords)==null?void 0:Ml.length)>0});wl=(Fl=wl==null?void 0:wl.prop)==null?void 0:Fl.replaceAll("'",""),Wa[xa.prop]=((or=xa==null?void 0:xa.words)!=null&&or[0]?(Sa==null?void 0:Sa[(gr=xa==null?void 0:xa.words)==null?void 0:gr[0]])??(Sa==null?void 0:Sa[xa==null?void 0:xa.prop])??(Sa==null?void 0:Sa[wl]):(Sa==null?void 0:Sa[xa==null?void 0:xa.prop])??(Sa==null?void 0:Sa[wl]))??void 0}),Wa.id=(hl=aa==null?void 0:aa[0])==null?void 0:hl.id,delete Wa.sort,{tableName:"content_"+(X==null?void 0:X.id),tableContents:[Wa]}}else return}))==null?void 0:jl.filter(X=>X);Me=[...Me,...Ta],await $.pageBatchUpdateApi({platId:parseInt((Zl=fl==null?void 0:fl.value)==null?void 0:Zl.plat_id),changeContents:Me});let Ge=[];Me==null||Me.forEach(X=>{var aa;(aa=X==null?void 0:X.tableContents)==null||aa.forEach(Qe=>{Ge.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Qe),request_result:"{}",is_delete:!1,request_table:X==null?void 0:X.tableName,request_type:"method"})})}),await $.pageBatchAddApi({platId:parseInt((ja=fl==null?void 0:fl.value)==null?void 0:ja.plat_id),changeContents:[{tableName:"log",tableContents:Ge}]})}Er.setRefreshCurStructure(!0),await St(l)},_t=async(l,r,n)=>{var s;let o=l==null?void 0:l.find(c=>(c==null?void 0:c.id)===r);if(o){let c=(s=o.compData)==null?void 0:s.map(m=>{var f;if((m==null?void 0:m.key)==="tableContents"){let h={...m,contents:n};return h.contents=(f=(h==null?void 0:h.contents)??[])==null?void 0:f.map(y=>{let u={};for(let w in y)JSON.stringify(y==null?void 0:y[w])==="{}"?u[w]="":u[w]=y==null?void 0:y[w];return u}),h}return m});return o.compData=await Nt(c,{}),l=l==null?void 0:l.map(m=>((m==null?void 0:m.id)===(o==null?void 0:o.id)&&(m=o),m)),l}else{let c=l==null?void 0:l.filter(f=>{var h;return(f==null?void 0:f.children)&&((h=f==null?void 0:f.children)==null?void 0:h.length)>0||(f==null?void 0:f.comp)==="Tabs"}),m=c==null?void 0:c.map(async f=>{var h;return f!=null&&f.children&&((h=f==null?void 0:f.children)==null?void 0:h.length)>0?f.children=await _t(f==null?void 0:f.children,r,n):f.compData=await _t(f==null?void 0:f.compData,r,n),f});return c=await Promise.all(m),c}},St=async l=>{var c,m,f,h,y,u,w;let r=(c=l==null?void 0:l.relatedContents)==null?void 0:c.filter(N=>N==null?void 0:N.includes("content_")),n=await $.getAllTables({platId:parseInt((m=fl==null?void 0:fl.value)==null?void 0:m.plat_id),tableNames:r??[]});if(n=(h=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:h[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(N=>{N==null||delete N.source_table;const j={};for(let C in N){const W=N==null?void 0:N[C],O=W&&Object.prototype.toString.call(W)==="[object Object]"&&Object.keys(W).length===0,U=Array.isArray(W)&&W.length===0;W==null||W==="{}"||O||U?j[C]="":j[C]=W}return j});let o=(u=(y=r==null?void 0:r[0])==null?void 0:y.split("_"))==null?void 0:u[1],s=await _t(nr.value,o,n);nr.value=(w=nr.value)==null?void 0:w.map(N=>{var j,C;return(j=s==null?void 0:s[0])!=null&&j.tabInform&&((C=s==null?void 0:s[0])==null?void 0:C.tabInform)===(N==null?void 0:N.tabInform)?N=s==null?void 0:s[0]:(N!=null&&N.name?(N==null?void 0:N.name)===(s==null?void 0:s.name):(N==null?void 0:N.id)===(s==null?void 0:s.id))&&(N=s),N})},C0=l=>{let r=Ko.value;Ko.value=r==null?void 0:r.map(n=>(n.value=l==null?void 0:l[n==null?void 0:n.prop],n))},D0=async()=>{var N,j,C,W,O,U,H,D,S,E;let l=kc.value,r=bc.value,n=(j=(N=l==null?void 0:l.columns)==null?void 0:N.find(k=>k==null?void 0:k.mainKey))==null?void 0:j.prop,o=(W=(C=Ko.value)==null?void 0:C[0])==null?void 0:W.value,s=(O=l==null?void 0:l.fixContent)==null?void 0:O.map(k=>{var M;let g={};for(let R in k)Array.isArray(k==null?void 0:k[R])?g[R]=JSON.stringify(k==null?void 0:k[R]):g[R]=k==null?void 0:k[R];return(M=l==null?void 0:l.columns)==null||M.forEach(R=>{(R==null?void 0:R.formType)==="Upload"&&(g==null?void 0:g[R==null?void 0:R.prop])===""&&(g[R==null?void 0:R.prop]="{}")}),g[n]=o,g}),c=[{tableName:(U=l==null?void 0:l.relatedContents)==null?void 0:U.find(k=>k==null?void 0:k.includes("content")),tableContents:s}];await $.pageBatchAddApi({platId:parseInt((H=fl==null?void 0:fl.value)==null?void 0:H.plat_id),changeContents:c}),r=r==null?void 0:r.filter(k=>{var g,M,R;return(R=k==null?void 0:k.object_name)==null?void 0:R.includes((M=(g=l==null?void 0:l.fixContent)==null?void 0:g[0])==null?void 0:M[n])});let m=[],f=new Map;r==null||r.forEach(k=>{m.push(`content_${k==null?void 0:k.object_id}`),m.push(`struct_${k==null?void 0:k.object_id}`),f.set(k==null?void 0:k.object_id,k)});let h=await $.getAllTables({platId:parseInt((D=fl==null?void 0:fl.value)==null?void 0:D.plat_id),tableNames:m??[]});h=(S=h==null?void 0:h.data)==null?void 0:S.result;let y=[],u=[];h=la.chunk(h,2),h==null||h.forEach(k=>{var R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma,re;let g=f.get((Be=(ue=(G=(R=k==null?void 0:k[1])==null?void 0:R[0])==null?void 0:G.source_table)==null?void 0:ue.split("_"))==null?void 0:Be[1]),M=(pe=(Z=(de=g==null?void 0:g.object_name)==null?void 0:de.split("/"))==null?void 0:Z.filter((Ne,Te)=>{var qe,Re;return((Re=(qe=g==null?void 0:g.object_name)==null?void 0:qe.split("/"))==null?void 0:Re.length)-1!==Te}))==null?void 0:pe.join("/");if(M=M+"/"+o,u!=null&&u.find(Ne=>(Ne==null?void 0:Ne.path)===M)||u.push({fatherPath:g==null?void 0:g.father_name,isShow:g==null?void 0:g.is_show,path:M}),((ce=(ae=k==null?void 0:k[1])==null?void 0:ae[0])==null?void 0:ce.类型)==="Table"){let Ne=((ye=(Ve=(Ee=k==null?void 0:k[1])==null?void 0:Ee[0])==null?void 0:Ve.结构)==null?void 0:ye.contents)??[],Te=il.safeClone(Ne);Array.isArray(Te==null?void 0:Te[0])&&(Te=ia.getColumnChild(Te==null?void 0:Te[0]));let qe=[];if(((z=k==null?void 0:k[0])==null?void 0:z.length)>0&&(qe=(q=k==null?void 0:k[0])==null?void 0:q.map(Re=>Te==null?void 0:Te.map(Le=>(Le=(Re==null?void 0:Re[Le==null?void 0:Le.prop])??"",Le)))),y!=null&&y.find(Re=>(Re==null?void 0:Re.key)===M)){let Re=(le=y==null?void 0:y.find(Le=>(Le==null?void 0:Le.key)===M))==null?void 0:le.contents;Re.push({isShow:g==null?void 0:g.is_show,filter:((Ye=(be=(De=k==null?void 0:k[1])==null?void 0:De[0])==null?void 0:be.引用)==null?void 0:Ye.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:Ne,tableContents:qe});let te=y==null?void 0:y.findIndex(Le=>(Le==null?void 0:Le.key)===M);y[te].contents=Re}else y.push({key:M,contents:[{isShow:g==null?void 0:g.is_show,filter:((re=(Ma=(da=k==null?void 0:k[1])==null?void 0:da[0])==null?void 0:Ma.引用)==null?void 0:re.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:Ne,tableContents:qe}]})}});let w=[];w.push({key:"menuPath",contents:u}),w=[...w,...y],await $.createPlatFormDataApi({platId:parseInt((E=fl==null?void 0:fl.value)==null?void 0:E.plat_id),changeData:w}),Tt.value=!1,Er.setRefreshTable(!0)},Mi=async(l,r)=>{},Ii=async l=>{nr.value=await ia.getDeepDiffItems(l),Er.setItemData(nr.value),Er.setOriginalData(nr.value)};a.ref();const N0=a.ref(null),B0=()=>{var l,r;console.log("倒计时结束时"),dn.ElMessageBox.alert(`超时未提交,【${(r=(l=ml.value)==null?void 0:l.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Sc=a.ref([]),T0=a.computed(()=>{var l,r;return(r=(l=xt.value)==null?void 0:l[ml.value])==null?void 0:r.filter(n=>{var o;return((o=n==null?void 0:n.key)==null?void 0:o.type)==="gridLayout"})});a.watch(()=>[m0.value],()=>{pn.setSelectTitle([]),pn.setChooseTitle([])},{deep:!0});a.watch(()=>Ai.value,async(l,r)=>{var o,s,c,m,f,h;if(JSON.stringify(l)===JSON.stringify(r))return;let n=(o=Ai.value)==null?void 0:o.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==Qr.value);if((n==null?void 0:n.length)>0){Ar.setContentLoading(!0);let y=((s=n==null?void 0:n[0])==null?void 0:s.relatedContent)??(ml==null?void 0:ml.value),u=y+"/"+((c=n==null?void 0:n[0])==null?void 0:c.value),w=!!((m=n==null?void 0:n[0])!=null&&m.parentContent),N=await Kr(u,w,{originPath:y});N=(f=N==null?void 0:N.filter(W=>W))==null?void 0:f.map(W=>(W.isShow=!0,W)),console.log(N,"loadingContents");let j=await ia.getDeepDiffItems(N),C=j==null?void 0:j.filter(W=>W==null?void 0:W.choice);Ri.setSelectTab((h=C==null?void 0:C[0])==null?void 0:h.choiceName),j=j==null?void 0:j.filter(W=>{var O;return!(W!=null&&W.choiceName)||(W==null?void 0:W.choiceName)===((O=C==null?void 0:C[0])==null?void 0:O.choiceName)}),nr.value=j,Ar.setContentLoading(!1)}});const A0=(l,r)=>{setTimeout(async()=>{var f,h,y;let n=(f=Ai.value)==null?void 0:f.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==Qr.value),o=ml==null?void 0:ml.value,s=ml==null?void 0:ml.value;(n==null?void 0:n.length)>0&&(s=((h=n==null?void 0:n[0])==null?void 0:h.relatedContent)??(ml==null?void 0:ml.value),o=s+"/"+((y=n==null?void 0:n[0])==null?void 0:y.value));let c=await Kr(o,!1,{originPath:s});c=c==null?void 0:c.map(u=>(u.isShow=!0,u));let m=await ia.getDeepDiffItems(c);nr.value=m==null?void 0:m.filter(u=>!(u!=null&&u.step)||(u==null?void 0:u.step)===(l==null?void 0:l.title))},10)},z0=l=>{setTimeout(async()=>{var m,f,h;let r=(m=Ai.value)==null?void 0:m.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==Qr.value),n=ml==null?void 0:ml.value,o=ml==null?void 0:ml.value;(r==null?void 0:r.length)>0&&(o=((f=r==null?void 0:r[0])==null?void 0:f.relatedContent)??(ml==null?void 0:ml.value),n=o+"/"+((h=r==null?void 0:r[0])==null?void 0:h.value));let s=await Kr(n,!1,{originPath:o});s=s==null?void 0:s.map(y=>(y.isShow=!0,y)),Ri.setSelectTab(l);let c=await ia.getDeepDiffItems(s);nr.value=c==null?void 0:c.filter(y=>!(y!=null&&y.choiceName)||(y==null?void 0:y.choiceName)===l)},10)};a.watch(()=>v0.value,l=>{l!=null&&l.length||(nr.value=[])},{immediate:!0});a.watch(()=>[ml.value],async l=>{var c,m,f,h;if(!ml.value)return;if(ml.value==="/"){nr.value=[];return}Ar.setCurrentMenuPath(ml.value),Er.setLockingPage(""),nr.value=[];let r=a.getCurrentInstance();(c=r==null?void 0:r.scope)==null||c.stop(),r=null,To.value=!1,Ar.setContentLoading(!0),gc.value=!0;let n=l==null?void 0:l[0],o=n,s=(m=Jn.value)==null?void 0:m.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==ml.value&&!(y!=null&&y.relatedContent));if((s==null?void 0:s.length)>0&&(n=n+"/"+((f=s==null?void 0:s[0])==null?void 0:f.value)),n==="系统管理/日志管理")nr.value=await u0("log");else{let y=await Kr(n,!0,{originPath:o});y=y==null?void 0:y.map(N=>(N.isShow=!0,N));let u=await ia.getDeepDiffItems(y),w=u==null?void 0:u.filter(N=>N==null?void 0:N.choice);Ri.setSelectTab((h=w==null?void 0:w[0])==null?void 0:h.choiceName),nr.value=u==null?void 0:u.filter(N=>{var j;return!(N!=null&&N.choiceName)||(N==null?void 0:N.choiceName)===((j=w==null?void 0:w[0])==null?void 0:j.choiceName)})}Ar.setContentLoading(!1),Er.setExtraContents([]),pn.setSelectIndex(""),pn.setSelectMenu(""),Er.setItemData(nr.value),Er.setOriginalData(nr.value),Er.setRefreshTable(!1),a.nextTick(()=>{Zn.value=Zn.value++,To.value=!0})},{immediate:!0});a.watch(()=>[bs.value],async()=>{var l,r,n,o;if(bs.value){nr.value=[];let s=a.getCurrentInstance();(l=s==null?void 0:s.scope)==null||l.stop(),s=null,To.value=!1,Ar.setContentLoading(!0),gc.value=!0;let c=Qr==null?void 0:Qr.value,m=c,f=(r=Jn.value)==null?void 0:r.filter(w=>(w==null?void 0:w.condition)==="child"&&(w==null?void 0:w.value)!==""&&(w==null?void 0:w.parentContent)!==(Qr==null?void 0:Qr.value));(f==null?void 0:f.length)>0&&(c=c+"/"+((n=f==null?void 0:f[0])==null?void 0:n.value));let h=await Kr(c,!0,{originPath:m});h=h==null?void 0:h.map(w=>(w.isShow=!0,w));let y=await ia.getDeepDiffItems(h),u=y==null?void 0:y.filter(w=>w==null?void 0:w.choice);if(Ri.setSelectTab((o=u==null?void 0:u[0])==null?void 0:o.choiceName),nr.value=y==null?void 0:y.filter(w=>{var N;return!(w!=null&&w.choiceName)||(w==null?void 0:w.choiceName)===((N=u==null?void 0:u[0])==null?void 0:N.choiceName)}),Ar.setContentLoading(!1),Er.setExtraContents([]),pn.setSelectIndex(""),pn.setSelectMenu(""),Er.setItemData(nr.value),Er.setOriginalData(nr.value),Er.setRefreshTable(!1),(f==null?void 0:f.length)>0){let w=[...Jn.value,...f];pn.setSelectTitle(w)}a.nextTick(()=>{Zn.value=Zn.value++,To.value=!0})}},{immediate:!0,deep:!0});const M0=async()=>{Ar.setLinkMenuInfo(null),Ar.setActiveMenuPath(h0.value),nr.value=null,Er.setRouteToChildPath(""),Ar.setChildMenu("")},I0=l=>new RegExp("button","i").test(l),O0=l=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(l),Ec=l=>{if(O0(l)){const r=l==null?void 0:l.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&Ar.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},Cc=async(l,r,n)=>{var N,j,C,W,O,U,H,D,S,E,k,g;let o="",s="";for(let M in r)(r==null?void 0:r[M])===l&&(s=M);n==null||n.forEach(M=>{(M==null?void 0:M.prop)===s&&(o=M==null?void 0:M.fatherPath)});let c=o===""?ml.value:o;o!==""&&Ar.setCurrentMenuPath(c),Ar.setCurrentMenuPath(c+"/"+l),Ar.setContentLoading(!0),await Kr(c+"/"+l,!0,{originPath:c+"/",row:r});let m=await Kr(c,!1),f=(N=m==null?void 0:m.filter(M=>(M==null?void 0:M.comp)==="Table"))==null?void 0:N[0],h=((O=(W=(C=(j=f==null?void 0:f.compData)==null?void 0:j.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:C.contents)==null?void 0:W[0])==null?void 0:O.prop)??((E=(S=(D=(H=(U=f==null?void 0:f.compData)==null?void 0:U.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:H.contents)==null?void 0:D[0])==null?void 0:S[0])==null?void 0:E.prop),y=(g=(k=f==null?void 0:f.compData)==null?void 0:k.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:g.contents;y=y==null?void 0:y.map(M=>({label:M==null?void 0:M[h],value:M==null?void 0:M[h]}));let u=Jn.value,w={value:l,condition:"child",options:y,relatedContent:c,isShow:!0};u.push(w),pn.setSelectTitle(u),pn.setChooseTitle([w]),Ar.setContentLoading(!1),Er.setExtraContents([]),pn.setSelectIndex(""),pn.setSelectMenu(""),Er.setItemData(nr.value),Er.setOriginalData(nr.value)},L0=l=>{wc.value=l},Co=a.reactive({index:0,comp:null}),$0=a.computed(()=>{var l;return(l=nr.value)==null?void 0:l.map((r,n)=>({id:r.id,name:r.name,status:R0(r,n)}))}),Dc=(l,r)=>{var h,y,u,w,N;const n=r?l:l-2,o=(h=nr.value)==null?void 0:h[n],s=(u=(y=o==null?void 0:o.compData)==null?void 0:y.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:u.contents,c=s==null?void 0:s.findIndex(j=>(j==null?void 0:j.isMainKey)&&(j==null?void 0:j.label)!=="操作"),m=c===-1?0:c,f=(N=(w=o==null?void 0:o.compData)==null?void 0:w.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:N.contents;return{valid:f==null?void 0:f.every(j=>j==null?void 0:j[m+1]),length:(f==null?void 0:f.length)||0}},R0=(l,r)=>{var o;let n="process";if(((o=l==null?void 0:l.comp)==null?void 0:o.toUpperCase())==="TABLE"){const{valid:s,length:c}=Dc(r,!0);Co.index===r?n="process":c===0?n="wait":n=s?"success":"error"}return n},Nc=l=>{var n,o,s,c,m;const r=l+1;if(r>1&&((s=(o=(n=nr.value)==null?void 0:n[l])==null?void 0:o.comp)==null?void 0:s.toUpperCase())==="TABLE"){const{valid:f}=Dc(r);f?(Co.index=r,Co.comp=(c=nr.value)==null?void 0:c[l]):Ga.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Co.index=r,Co.comp=(m=nr.value)==null?void 0:m[l]},Bc=a.computed(()=>{var l,r;return(r=(l=xc.value)==null?void 0:l[0])==null?void 0:r.isStepLayout});a.watch(()=>Bc.value,l=>{l&&Nc(0)},{immediate:!0});const V0={class:"table-content"},F0={class:"menu-config-wrap"},P0=["onClick"],j0={key:0,class:"viewport-wrap"},H0=["onClick"],U0={title:"选择显示列信息"},q0={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},W0=["title"],K0={class:"col-operate-wrap"},G0={key:0,class:"col-operate-radio-wrapper"},Y0={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},J0={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},X0={class:"pop-view"},Z0={class:"pop-wrapper"},Q0={class:"file-list-pop"},e3=["title","onClick"],a3=["onClick"],l3=["onClick"],r3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},n3={class:"form-content"},o3={key:0,class:"dialog-footer"},i3={class:"dialog-footer"},t3={class:"ocr-dialog-content"},s3={class:"ocr-steps"},c3={key:0,class:"ocr-action-buttons"},u3={key:1,class:"ocr-preview-area"},d3={class:"ocr-file-grid"},p3={class:"file-thumbnail"},f3=["src"],h3={key:1,class:"thumbnail-placeholder"},v3={class:"progress-svg",viewBox:"0 0 36 36"},m3=["stroke","stroke-width","stroke-dasharray"],y3={key:0,class:"progress-icon"},g3={key:1,class:"progress-icon"},b3=["onClick"],k3={class:"file-name"},x3={key:0,class:"ocr-recognize-button"},w3={key:2,class:"ocr-progress-section"},_3={key:3,class:"ocr-confirm-area"},S3={class:"ocr-preview-tip"},E3={class:"ocr-preview-table"},C3={style:{display:"flex","align-items":"center",gap:"8px"}},D3={key:0},N3={key:4,class:"ocr-success-area"},B3={key:0,class:"ocr-dialog-footer"},T3={class:"form-content"},A3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},z3={style:{display:"flex"}},xs="ss-ocr-upload-history",M3="ss-ocr-cert-history-v1",I3={__name:"index",props:{pageLayout:{type:String,default:"vertical"},related:{type:Array,default:[]},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},groupNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(l,{emit:r}){var jt;const n=a.ref([]),o=Bt($.pinia),s=a.ref(null),c=a.ref(new Set),m=a.ref(new Map),f=a.ref(new Map),h=new Map,y=a.ref(new Map),u=l,w=a.ref((u==null?void 0:u.allowSelect)??!0),N=a.ref(((jt=u==null?void 0:u.config)==null?void 0:jt.showIndex)??!0),j=a.ref(),C=a.ref(!0),W=a.ref(!1),O=a.ref([]),U={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},H=a.ref([{label:"排序",value:"sortable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{type:"radio",label:"固定",value:"fixed",checked:"",options:[{label:"无",value:!1},{label:"左",value:"left"},{label:"右",value:"right"}]}]),D=ia.useOriginalState($.pinia);let S="$R";const{originalPath:E}=$.storeToRefs(D),k=E.value,g=a.computed(()=>{var v;const d=(v=ia.getAllLeafNodes(de.value)||[])==null?void 0:v.filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate");return d.length>0?d.every(T=>!!(T!=null&&T.sortable)):!1});a.computed(()=>{var v;return(v=de.value)==null?void 0:v.every(T=>T==null?void 0:T.filterable)}),a.computed(()=>{var v;return(v=de.value)==null?void 0:v.every(T=>T==null?void 0:T.operable)});const M=a.ref(!0),R=a.ref([]),G=a.reactive({column:{},status:!1,text:"合计"}),ue=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),Be=r,de=a.ref([]),Z=a.ref([]),pe=a.ref([]),ae=a.reactive({prop:"",order:null}),ce=a.ref([]),Ee=a.ref(!1),Ve=a.ref(!1),ye=a.ref(null),{isUseBackdrop:z,initTrackFileType:q,getFileExtension:le,setData:De,getFileInfo:be,getFilesInfo:Ye}=Ci.useThreeSystem(),da=a.ref([]),Ma=a.ref(!1),re=a.ref(),Ne=$.useMenuState(),{importLoading:Te,activeMenuPath:qe,contentLoading:Re,linkMenuInfo:te}=$.storeToRefs(Ne),Le=ia.useTableComp($.pinia),He=$.useModelComp($.pinia),Ba=Qn($.pinia),{extraContents:Ia,cacheUpdatingData:V,tableViewContents:P,tableLoading:ee,pageMapState:fe,lockingPage:ve}=$.storeToRefs(He),{selectTab:ha}=$.storeToRefs(Ba),{compType:Ze,hasEditable:se}=Xs.useRole(),we=a.ref([]),ya=a.ref([]),ze=a.ref(new Map);a.ref(!1);const _a=a.ref("");a.ref();const We=a.ref(!0),x=a.ref(0),Ae=a.ref(!0),ne=a.ref(""),Ue=a.ref(!1),Je=a.ref(null);a.ref([]);const ra=a.ref({label:"查看三维模型"}),Oe=a.ref(!1),za=a.ref(),fa=a.ref([]),Oa=a.ref([]),Pa=a.ref(!1),ka=a.ref([]),ua=a.ref([]),ma=a.ref([]),Ha=a.ref([]),pl=a.ref([]),$l=()=>{try{const d=localStorage.getItem(xs),v=d?JSON.parse(d):[];pl.value=Array.isArray(v)?v:[]}catch{pl.value=[]}},gl=()=>{try{localStorage.setItem(xs,JSON.stringify(pl.value||[]))}catch{}},Ol=d=>{var oe,ie,K;if(!d)return;const v=d.url||((oe=d==null?void 0:d.uploadResult)==null?void 0:oe.url)||"",T=d.name||((ie=d==null?void 0:d.uploadResult)==null?void 0:ie.name)||((K=d==null?void 0:d.uploadResult)==null?void 0:K.fileName)||"";if(!v&&!T)return;const I={name:T,url:v,ts:Date.now()},F=String(I.name||"").trim().toLowerCase(),B=(pl.value||[]).findIndex(_e=>String((_e==null?void 0:_e.name)||"").trim().toLowerCase()===F);B>-1&&pl.value.splice(B,1),pl.value.unshift(I),pl.value.length>20&&(pl.value=pl.value.slice(0,20)),gl()};$l();const $a=(d,v)=>`${M3}:${String(d??"")}:${String(v??"")}`,jl=(d,v)=>{try{const T=sessionStorage.getItem($a(d,v)),I=T?JSON.parse(T):[];return Array.isArray(I)?I:[]}catch{return[]}},Zl=(d,v,T)=>{try{sessionStorage.setItem($a(d,v),JSON.stringify(Array.isArray(T)?T:[]))}catch{}},ja=(d,v,T)=>{if(!v)return;const I=jl(d,v),F=[T,...I||[]].filter(Boolean).slice(0,1);return Zl(d,v,F),F},ba=(d,v,T)=>{if(!v||!T)return;const I=$a(d,v),F=$a(d,T);try{const B=sessionStorage.getItem(I);if(!B)return;const oe=(()=>{try{const _e=JSON.parse(B);return Array.isArray(_e)?_e:[]}catch{return[]}})(),ie=jl(d,T),K=[...oe,...ie||[]].filter(Boolean).sort((_e,Ce)=>Number((Ce==null?void 0:Ce.ts)||0)-Number((_e==null?void 0:_e.ts)||0)).slice(0,1);sessionStorage.setItem(F,JSON.stringify(K)),sessionStorage.removeItem(I)}catch{}},Da=a.ref(!1),Ua=a.ref(!1),al=a.ref([]),Za=a.ref(null);a.ref(!1),a.ref([]),a.ref(""),a.ref("");const Me=a.ref(!1),na=a.ref([]),ke=a.ref(1),Ta=a.ref(new Map),Ge=a.ref(new Map),X=a.ref(0),aa=a.ref(!1),Qe=a.ref([]),Ie=a.ref([]),xl=d=>{var v;try{const T=(v=ia.getAllLeafNodes(de.value)||[])==null?void 0:v.filter(I=>(I==null?void 0:I.type)!=="operate"&&(I==null?void 0:I.label)!=="操作"&&(I==null?void 0:I.prop)!=="operate");return(T==null?void 0:T.find(I=>(I==null?void 0:I.prop)===d||(I==null?void 0:I.label)===d))||null}catch{return null}},ll=d=>{const v=xl(d),T=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return il.getComponent(T)||il.getComponent("Input")},hl=a.ref([]),Ra=a.ref(null),Wa=a.ref([]),Sa=a.ref(null),me=a.ref(""),xa=a.ref(!1),wl=a.ref([]),Rl=a.ref(""),Fl=a.ref(!1),or=a.ref([]),gr=a.ref([]),Cl=a.ref([]),sr=a.ref(null),Tr=a.ref([]),Ml=a.ref("");a.computed(()=>{var d;try{const v=(d=ia.getAllLeafNodes(de.value)||[])==null?void 0:d.filter(I=>(I==null?void 0:I.type)!=="operate"&&(I==null?void 0:I.label)!=="操作"&&(I==null?void 0:I.prop)!=="operate"),T=new Map;return v==null||v.forEach(I=>{I!=null&&I.label&&(I!=null&&I.prop)&&T.set(I.label,I.prop)}),T.get("编号")||""}catch{return""}});const rr=a.computed(()=>{var d;try{const v=(d=ia.getAllLeafNodes(de.value)||[])==null?void 0:d.filter(I=>(I==null?void 0:I.type)!=="operate"&&(I==null?void 0:I.label)!=="操作"&&(I==null?void 0:I.prop)!=="operate"),T=new Map;return v==null||v.forEach(I=>{I!=null&&I.label&&(I!=null&&I.prop)&&T.set(I.label,I.prop)}),T.get("名称")||""}catch{return""}}),en=a.computed(()=>{var d;try{const v=(d=ia.getAllLeafNodes(de.value)||[])==null?void 0:d.filter(I=>(I==null?void 0:I.type)!=="operate"&&(I==null?void 0:I.label)!=="操作"&&(I==null?void 0:I.prop)!=="operate"),T=new Map;return v==null||v.forEach(I=>{I!=null&&I.label&&(I!=null&&I.prop)&&T.set(I.label,I.prop)}),T.get("制造厂")||""}catch{return""}}),Or=()=>{Fl.value=!1,or.value=[],gr.value=[],Cl.value=[],sr.value=null,Tr.value=[],Ml.value=""},zr=d=>d==null?!1:typeof d=="string"?d.trim()!=="":Array.isArray(d)?d.length>0:!0,Cr=(d,v)=>{const T=(d==null?void 0:d.ocrRow)||{};for(const F of Object.keys(T))F==="id"||F==="_isOCRRow"||F==="_ocrTableId"||zr(T[F])&&(v[F]=T[F]);const I=ya.value.find(F=>F.id===v.id);if(I)for(const F of Object.keys(T))F==="id"||F==="_isOCRRow"||F==="_ocrTableId"||zr(T[F])&&(I[F]=T[F]);ze.value&&ze.value.set(v.id,v),ja(u==null?void 0:u.index,v.id,d==null?void 0:d.versionItem),gr.value=[...gr.value||[],JSON.parse(JSON.stringify(v))]},Mr=async(d,v=null)=>{var T,I,F,B,oe,ie,K;try{const _e=(T=ia.getAllLeafNodes(de.value)||[])==null?void 0:T.filter(va=>(va==null?void 0:va.type)!=="operate"&&(va==null?void 0:va.label)!=="操作"&&(va==null?void 0:va.prop)!=="operate"),Ce=new Map;_e==null||_e.forEach(va=>{va!=null&&va.label&&(va!=null&&va.prop)&&Ce.set(va.label,va.prop)});const je=Ce.get("系统编号")||Ce.get("编号");if(!je){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Pe=v||sr.value;if((Array.isArray(Pe==null?void 0:Pe.result)?Pe.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let va=0;va<d.length;va++){const La=d[va],qa=La[je];if(!qa){console.warn(`第 ${va+1} 条匹配行缺少系统编号,跳过`);continue}const sa=`设备管理/试验设备/${qa}`,Qa=await $.getPageDataApi({platId:parseInt((I=Ll.value)==null?void 0:I.plat_id),pageName:sa});if(!((F=Qa==null?void 0:Qa.data)!=null&&F.result)||!Array.isArray(Qa.data.result)){console.warn(`未找到详情页数据: ${sa}`);continue}const ga=Qa.data.result.find(oa=>(oa==null?void 0:oa.property_name)==="校检记录");if(!ga){console.warn(`详情页 ${sa} 中未找到校检记录表`);continue}const Fa=(B=ga.contents)==null?void 0:B.find(oa=>(oa==null?void 0:oa.key)&&oa.key.startsWith("content_"));if(!Fa||!Fa.key){console.warn("校检记录表中未找到 content item");continue}const he=Fa.key,Ea=Array.isArray(Fa.value)?Fa.value:[];if(Ea.length>=5){const xe=[...Ea].sort((ta,Na)=>{const tl=Number((ta==null?void 0:ta.create_time)||0),Ya=Number((Na==null?void 0:Na.create_time)||0);return tl-Ya})[0];xe!=null&&xe.id&&await $.pageBatchDeleteApi({platId:parseInt((oe=Ll.value)==null?void 0:oe.plat_id),changeContents:[{tableName:he,tableContents:[{id:xe.id}]}]})}const ca=(ie=_e==null?void 0:_e.find(oa=>(oa==null?void 0:oa.label)==="证书附件"))==null?void 0:ie.prop,wa=String(Date.now()),Ca={id:wa},A=Ea[0]||{},J=new Date().toISOString().split("T")[0];if(Object.keys(A||{}).forEach(oa=>{if(oa!=="id"){if(oa==="证书附件"){Ca[oa]="";return}if(oa==="校检日期"||oa==="检校日期"){Ca[oa]=La[oa]||La.校检日期||La.检校日期||J;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(oa)){Ca[oa]=La[oa]??"";return}Ca[oa]=La[oa]??""}}),ca&&La[ca]){const oa=La[ca];if(Array.isArray(oa)&&oa.length>0)Ca.证书附件=JSON.stringify(oa.map(xe=>({url:(xe==null?void 0:xe.url)||"",name:(xe==null?void 0:xe.name)||(xe==null?void 0:xe.fileName)||"",fileName:(xe==null?void 0:xe.fileName)||(xe==null?void 0:xe.name)||""})).filter(xe=>xe.url||xe.name));else if(typeof oa=="string")try{const xe=JSON.parse(oa);Ca.证书附件=oa}catch{Ca.证书附件=JSON.stringify([{url:oa,name:oa,fileName:oa}])}}console.log(he,"tableName","inspectionRecordRow",Ca),await $.pageBatchAddApi({platId:parseInt((K=Ll.value)==null?void 0:K.plat_id),changeContents:[{tableName:he,tableContents:[Ca]}]});const $e=ga==null?void 0:ga.object_id;if($e&&wa){const oa=ca&&La[ca]?La[ca]:null;let xe=[],ta="",Na=!1;if(Array.isArray(oa)&&oa.length>0){xe=oa.map(dl=>({name:(dl==null?void 0:dl.name)||(dl==null?void 0:dl.fileName)||"",url:(dl==null?void 0:dl.url)||""})).filter(dl=>dl.url||dl.name);const Ya=oa[0];ta=(Ya==null?void 0:Ya.url)||"";const ul=(Ya==null?void 0:Ya.name)||(Ya==null?void 0:Ya.fileName)||"";Na=String(ul).toLowerCase().endsWith(".pdf")||String(ta).toLowerCase().endsWith(".pdf")}else if(typeof oa=="string")try{const Ya=JSON.parse(oa);Array.isArray(Ya)?(xe=Ya.map(ul=>({name:(ul==null?void 0:ul.name)||(ul==null?void 0:ul.fileName)||"",url:(ul==null?void 0:ul.url)||""})).filter(ul=>ul.url||ul.name),xe.length>0&&(ta=xe[0].url||"",Na=String(xe[0].name).toLowerCase().endsWith(".pdf")||String(ta).toLowerCase().endsWith(".pdf"))):(ta=oa,Na=String(oa).toLowerCase().endsWith(".pdf"))}catch{ta=oa,Na=String(oa).toLowerCase().endsWith(".pdf")}const tl={ts:Date.now(),versionId:String(Date.now())+"_"+String(va),label:new Date().toLocaleString(),certType:La.证书类型||"",certNo:La.证书编号||"",fileType:Na?"pdf":"image",sourceUrl:Na?ta:"",images:xe};ja($e,wa,tl)}}}catch(_e){console.error("向校检记录表插入OCR识别结果失败:",_e),Ga.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},Ir=d=>{const v=Array.isArray(d)?d:or.value||[];if(v.length===0){Or();return}if(v.find(B=>(B==null?void 0:B.__decision)==="replace"&&!(B!=null&&B.selectedTargetId))){Ga.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(B=>{var ie;const oe=B==null?void 0:B.__decision;if(!(!oe||oe==="skip")){if(oe==="add"){ja(u==null?void 0:u.index,(ie=B==null?void 0:B.ocrRow)==null?void 0:ie.id,B==null?void 0:B.versionItem),Cl.value=[...Cl.value||[],B.ocrRow];return}if(oe==="replace"){const K=B==null?void 0:B.selectedTargetId,_e=(we.value||[]).find(Ce=>String(Ce==null?void 0:Ce.id)===String(K));if(!_e)return;Cr(B,_e)}}}),(gr.value||[]).length>0&&(we.value=[...we.value||[]]),(Cl.value||[]).length>0&&(we.value=[...we.value||[],...Cl.value||[]],ya.value=[...ya.value||[],...Cl.value||[]],(Cl.value||[]).forEach(B=>{var oe,ie;return(ie=(oe=ze.value)==null?void 0:oe.set)==null?void 0:ie.call(oe,B.id,B)})),Yr.value=we.value;const I=gr.value||[],F=Cl.value||[];if(I.length>0&&(Be("change",{buttonName:"编辑",singleContent:I,content:we.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:de.value,name:u==null?void 0:u.compName}),Mr(I)),F.length>0){const B=sr.value;Be("change",{buttonName:"OCR批量新增",content:we.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:de.value,ocrRows:F,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(B==null?void 0:B.result)?B.result:[]).map(oe=>(Array.isArray(oe==null?void 0:oe.图片信息)?oe.图片信息:[]).map(ie=>({url:(ie==null?void 0:ie.url)||"",name:(ie==null?void 0:ie.name)||"",fileName:(ie==null?void 0:ie.name)||""})).filter(ie=>ie.url)),ocrResult:B,matchedCount:(I||[]).length,newCount:(F||[]).length})}Ga.ElMessage.success("已提交候选处理结果"),Or()},Nr=mc(),Fr=a.computed(()=>Nr.getConfig()),Lr=a.ref(),cr=a.ref(),xn=dc($.pinia),Yr=a.ref(),nn=a.ref(0),zn=$.useUnit($.pinia),{selectIndex:wn,selectMenu:gn,selectTitle:mr}=$.storeToRefs(zn),{selectString:Hl}=$.storeToRefs(xn),pr=$.useLoginState($.pinia),{loginUserInfo:Ll}=$.storeToRefs(pr),Wl=a.ref(720),Al=a.ref(!1),yr=a.ref(!1),ir=a.ref([]),Pl=a.ref(),Vr=a.ref(!0),Pr=a.ref(!0);a.ref([]);const _n=a.inject("contentRef");a.provide("contentRef",_n),a.provide("getSuggestListForCell",Su),a.provide("getSuggestLoadingForCell",(d,v)=>{const T=`${d==null?void 0:d.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return y.value.get(T)||!1}),a.watch(()=>{var d;return(d=we.value)==null?void 0:d.length},d=>{ue.total=d}),a.watch(()=>P.value,async()=>{var v,T,I,F,B,oe,ie,K,_e,Ce,je,Pe,Xe,va,La,qa,sa;if(((v=P.value)==null?void 0:v.length)===0||!((T=u==null?void 0:u.itemData)!=null&&T.find(Qa=>(Qa==null?void 0:Qa.key)==="columnPath"))||!((I=u==null?void 0:u.itemData)!=null&&I.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn")))return;let d=(_e=(K=(ie=(oe=(B=(F=u==null?void 0:u.itemData)==null?void 0:F.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn"))==null?void 0:B.contents)==null?void 0:oe.split("["))==null?void 0:ie[1])==null?void 0:K.split("]"))==null?void 0:_e[0];((Xe=(Pe=(je=(Ce=u==null?void 0:u.itemData)==null?void 0:Ce.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn"))==null?void 0:je.contents)==null?void 0:Pe.split("["))==null?void 0:Xe[0])+((La=(va=P.value)==null?void 0:va.find(Qa=>(Qa==null?void 0:Qa.key)===d))==null?void 0:La.value),(sa=(qa=u==null?void 0:u.itemData)==null?void 0:qa.find(Qa=>(Qa==null?void 0:Qa.key)==="pageGroup"))==null||sa.contents,Pt(compData,u.allMapContents)},{deep:!0});const on=d=>{var T,I,F,B,oe;const v=(I=(T=de.value)==null?void 0:T.filter(ie=>ie==null?void 0:ie.mainKey))==null?void 0:I.map(ie=>ie==null?void 0:ie.prop);if(v.length===0){const ie=(F=de.value)==null?void 0:F.map(K=>K==null?void 0:K.prop);return(B=ie==null?void 0:ie.map(K=>d==null?void 0:d[K]))==null?void 0:B.join("|")}return(oe=v==null?void 0:v.map(ie=>d==null?void 0:d[ie]))==null?void 0:oe.join("|")},eo=d=>{var ie,K,_e,Ce,je;const v=(K=(ie=de.value)==null?void 0:ie.filter(Pe=>Pe==null?void 0:Pe.required))==null?void 0:K.map(Pe=>Pe==null?void 0:Pe.prop),T=[];if(d==null||d.forEach(Pe=>{v==null||v.forEach(Xe=>{const va=Pe[Xe];(va==null||va==="")&&(T.includes(Xe)||T.push(Xe))})}),T.length>0)return Ga.ElMessage.warning(`请填写必填项:${T.join("、")}`);const I=new Map,F=new Map;(_e=we.value)==null||_e.forEach(Pe=>{const Xe=on(Pe);I.set(Xe,Pe)}),d==null||d.forEach(Pe=>{const Xe=on(Pe);F.set(Xe,Pe)});const B=d==null?void 0:d.filter(Pe=>I.has(on(Pe))),oe=(Ce=we.value)==null?void 0:Ce.filter(Pe=>F.has(on(Pe)));return(B==null?void 0:B.length)>0&&(i.columns=(je=de.value)==null?void 0:je.filter(Pe=>(Pe==null?void 0:Pe.label)!=="操作"),i.existRows=oe,i.tableData=B,i.show=!0),d==null?void 0:d.filter(Pe=>{const Xe=on(Pe);return!I.has(Xe)})},Mn=a.ref(""),ao=a.ref(null),Sn=async()=>{var d,v,T,I,F,B;try{const oe=await $.quoteApi({related:[{menus:qe.value,groups:u==null?void 0:u.compName}],platId:parseInt((d=Ll.value)==null?void 0:d.plat_id)});if(((v=oe==null?void 0:oe.data)==null?void 0:v.code)===200){ao.value=(T=oe==null?void 0:oe.data)==null?void 0:T.result;const ie=(I=de.value)==null?void 0:I.map(Ce=>(Ce==null?void 0:Ce.prop)||(Ce==null?void 0:Ce.label)),K=In(ie,(F=oe==null?void 0:oe.data)==null?void 0:F.result),_e=K==null?void 0:K.flatMap(Ce=>Ce==null?void 0:Ce.quote);(_e==null?void 0:_e.length)>0&&(Mn.value=(B=_e==null?void 0:_e.map(Ce=>Ce==null?void 0:Ce.menus))==null?void 0:B.join("、"))}}catch(oe){throw new Error(oe)}};function In(d,v){var T;return(T=v.filter(I=>I.struct&&Array.isArray(I.struct)?I.struct.some(F=>F.words&&Array.isArray(F.words)?F.words.some(B=>d.includes(B)):!1):!1))==null?void 0:T.map(I=>{const F={...I};return F.struct&&Array.isArray(F.struct)&&(F.struct=F.struct.filter(B=>B.words&&Array.isArray(B.words)?B.words.some(oe=>d.includes(oe)):!1)),F})}const Hn=async(d,v)=>{var T,I,F,B,oe,ie,K,_e,Ce,je;try{ao.value||await Sn();const Pe=v==null?void 0:v.map(Fa=>{const he=Object.keys(Fa),Ea={};return he.forEach((ca,wa)=>{Ea[d[wa]]=Fa[ca]}),Ea}),Xe=eo(Pe);if(!Xe||(Xe==null?void 0:Xe.length)===0)return;const va=[];let La=(we.value||[]).slice();(Xe||[]).forEach(Fa=>{const he={...Fa};try{he.sort=Ln(0,La)}catch{}va.push(he),La.unshift(he)});let qa=await $.quoteApi({platId:parseInt((T=Ll==null?void 0:Ll.value)==null?void 0:T.plat_id),type:"fatherSyncs",related:[{menus:qe.value,groups:""},{menus:qe.value,groups:u==null?void 0:u.compName}]});qa=(I=qa==null?void 0:qa.data)==null?void 0:I.result;let sa=qa==null?void 0:qa.map(Fa=>({tableName:"content_"+(Fa==null?void 0:Fa.id),tableContents:va==null?void 0:va.map((he,Ea)=>({id:Ea,...he}))})),Qa=[{tableName:(F=u==null?void 0:u.related)==null?void 0:F.find(Fa=>Fa==null?void 0:Fa.includes("content")),tableContents:va==null?void 0:va.map((Fa,he)=>({id:he,...Fa}))}];Qa=[...Qa,...sa];const ga=await $.pageBatchAddApi({platId:parseInt((B=Ll.value)==null?void 0:B.plat_id),changeContents:Qa});if(((oe=ga==null?void 0:ga.data)==null?void 0:oe.code)===200){const Fa={buttonName:"新增",columns:de.value,fixContent:va==null?void 0:va.map((Ea,ca)=>({id:ca,...Ea})),relatedContents:u==null?void 0:u.related};await St(Fa),((ie=i==null?void 0:i.existRows)==null?void 0:ie.length)>0?Ga.ElMessage.success("部分数据导入成功"):Ga.ElMessage.success("数据导入成功");let he=[];Qa==null||Qa.forEach(Ea=>{var ca;(ca=Ea==null?void 0:Ea.tableContents)==null||ca.forEach(wa=>{he.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(wa),request_result:"{}",is_delete:!1,request_table:Ea==null?void 0:Ea.tableName,request_type:"export"})})}),await $.pageBatchAddApi({platId:parseInt((K=Ll==null?void 0:Ll.value)==null?void 0:K.plat_id),changeContents:[{tableName:"log",tableContents:he}]})}else{let Fa=[];Qa==null||Qa.forEach(he=>{var Ea;(Ea=he==null?void 0:he.tableContents)==null||Ea.forEach(ca=>{Fa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ca),request_result:"{}",is_delete:!1,request_table:he==null?void 0:he.tableName,request_type:"error"})})}),await $.pageBatchAddApi({platId:parseInt((_e=Ll==null?void 0:Ll.value)==null?void 0:_e.plat_id),changeContents:[{tableName:"log",tableContents:Fa}]}),Ga.ElMessage.error("数据导入响应失败")}}catch(Pe){throw Ga.ElMessage.error("数据导入处理失败"),await $.pageBatchAddApi({platId:parseInt((Ce=Ll==null?void 0:Ll.value)==null?void 0:Ce.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(Pe),is_delete:!1,request_table:(je=u==null?void 0:u.related)==null?void 0:je.find(Xe=>Xe==null?void 0:Xe.includes("content")),request_type:"error"}]}]}),new Error(Pe)}},an=async d=>{var B,oe,ie,K,_e,Ce,je;let v=pe.value;v!=null&&v.find(Pe=>(d==null?void 0:d.key)===(Pe==null?void 0:Pe.key))&&(v=v==null?void 0:v.filter(Pe=>(d==null?void 0:d.key)!==(Pe==null?void 0:Pe.key))),v.push({key:d==null?void 0:d.key,value:[(oe=d==null?void 0:d.value)==null?void 0:oe[((B=d==null?void 0:d.value)==null?void 0:B.length)-1]]});let T=Ha.value;T=T==null?void 0:T.map(Pe=>{var Xe,va;return(Pe==null?void 0:Pe.type)==="Select"&&(d==null?void 0:d.key)===(Pe==null?void 0:Pe.prop)&&Array.isArray(Pe.value)&&(Xe=Pe.value)!=null&&Xe.every(La=>typeof La=="string")&&(Pe.selectValue=(va=v==null?void 0:v.find(La=>(La==null?void 0:La.key)===(Pe==null?void 0:Pe.prop)))==null?void 0:va.value),Pe});let I=(K=(ie=T==null?void 0:T.find(Pe=>(Pe==null?void 0:Pe.prop)===(d==null?void 0:d.key)))==null?void 0:ie.optionUrl)==null?void 0:K.menuId,F=T==null?void 0:T.find(Pe=>(Pe==null?void 0:Pe.prop)===(d==null?void 0:d.key));if(I){let Pe=await kt(F==null?void 0:F.optionUrl,I),Xe,va=R.value,La=(je=(Ce=(_e=Ha.value)==null?void 0:_e.find(qa=>{var sa;return(sa=F==null?void 0:F.optionUrl)==null?void 0:sa.menuId}))==null?void 0:Ce.selectValue)==null?void 0:je[0];if(Pe==null||Pe.forEach(qa=>{var sa,Qa,ga,Fa,he,Ea,ca,wa,Ca,A;if(I){let J=(Qa=(sa=Ha.value)==null?void 0:sa.find(oa=>{var xe,ta;return((xe=F==null?void 0:F.optionUrl)==null?void 0:xe.menuId)===((ta=oa==null?void 0:oa.optionUrl)==null?void 0:ta.menuId)}))==null?void 0:Qa.prop,$e=(Fa=(ga=T==null?void 0:T.find(oa=>(oa==null?void 0:oa.prop)===J))==null?void 0:ga.selectValue)==null?void 0:Fa[0];J!=null&&J.includes("·")&&(J=(he=J==null?void 0:J.split("·"))==null?void 0:he[0],$e=(Ca=(wa=(ca=d==null?void 0:d.value)==null?void 0:ca[((Ea=d==null?void 0:d.value)==null?void 0:Ea.length)-1])==null?void 0:wa.split(" "))==null?void 0:Ca[0]),va!=null&&va.find(oa=>(oa==null?void 0:oa.value)===La)?Xe=(A=va==null?void 0:va.find(oa=>(oa==null?void 0:oa.value)===La))==null?void 0:A.objectValue:qa[J]===$e&&(Xe=qa)}}),Xe){let qa=T;qa=qa==null?void 0:qa.map(sa=>{var Qa,ga,Fa,he,Ea,ca;return I&&(Xe!=null&&Xe[sa==null?void 0:sa.prop])&&ne.value==="新增"&&(sa==null?void 0:sa.prop)!==(F==null?void 0:F.prop)?sa.value=(Xe==null?void 0:Xe[sa==null?void 0:sa.prop])||(Xe==null?void 0:Xe[(he=(Fa=(ga=(Qa=sa==null?void 0:sa.optionUrl)==null?void 0:Qa.groupSelect)==null?void 0:ga[1])==null?void 0:Fa.replaceAll("[",""))==null?void 0:he.replaceAll("]","")]):sa.value=(ca=(Ea=Ha.value)==null?void 0:Ea.find(wa=>(wa==null?void 0:wa.prop)===(sa==null?void 0:sa.prop)))==null?void 0:ca.value,sa}),Ha.value=qa}}pe.value=v},On=async(d,v)=>{var T,I,F,B,oe;if((T=d==null?void 0:d.toString())!=null&&T.includes(".txt")||(I=d==null?void 0:d.toString())!=null&&I.includes(".cpt")||(F=d==null?void 0:d.toString())!=null&&F.includes(".cyd")){const ie=await Ga.axios.get(d,{responseType:"blob",headers:{"Content-Type":"application/json"}}),K=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});let _e=URL.createObjectURL(K);re.value=[{name:(oe=d==null?void 0:d.split("/"))==null?void 0:oe[((B=d==null?void 0:d.split("/"))==null?void 0:B.length)-1],blobUrl:_e}],Ma.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&Be("routeUrl",{isEdit:!1,routerUrl:v})};a.onBeforeUnmount(()=>{Pr.value=!1;let d=nn.value;nn.value=d+1});const En=a.reactive({prop:"",order:null}),Gr=a.computed(()=>{const d=(we.value??[]).slice(),v=En.prop||ae.prop,T=En.order||ae.order;if(!v||!T)return d;const I=T==="ascending",F=oe=>{if(v)return oe&&Object.prototype.hasOwnProperty.call(oe,v)?oe[v]:v.includes(".")?v.split(".").reduce((ie,K)=>ie==null?ie:ie[K],oe):oe==null?void 0:oe[v]},B=oe=>{if(oe==null)return{ok:!1,value:NaN};if(typeof oe=="number")return{ok:Number.isFinite(oe),value:oe};const ie=String(oe).trim();if(ie==="")return{ok:!1,value:NaN};const K=ie.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(K))return{ok:!1,value:NaN};const _e=Number(K);return{ok:Number.isFinite(_e),value:_e}};return d.sort((oe,ie)=>{const K=F(oe),_e=F(ie);if(K==null&&_e==null)return 0;if(K==null)return I?-1:1;if(_e==null)return I?1:-1;const Ce=B(K),je=B(_e);if(Ce.ok&&je.ok)return I?Ce.value-je.value:je.value-Ce.value;const Pe=he=>{if(he==null)return{ok:!1,value:NaN};const Ea=String(he).trim();if(Ea==="")return{ok:!1,value:NaN};const ca=Ea.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ca)return{ok:!1,value:NaN};const wa=ca[1]?-1:1,Ca=Number(ca[2]),A=Number(ca[3]),J=Number(ca[4]);return[Ca,A,J].some($e=>Number.isNaN($e))?{ok:!1,value:NaN}:A>=60||J>=60?{ok:!1,value:NaN}:{ok:!0,value:wa*(Ca*3600+A*60+J)}},Xe=Pe(K),va=Pe(_e);if(Xe.ok&&va.ok)return I?Xe.value-va.value:va.value-Xe.value;const La=new Date(K).getTime(),qa=new Date(_e).getTime(),sa=!Number.isNaN(La),Qa=!Number.isNaN(qa);if(sa&&Qa)return I?La-qa:qa-La;const ga=String(K),Fa=String(_e);return I?ga.localeCompare(Fa):Fa.localeCompare(ga)})}),Un=a.computed(()=>{var T;const d=(ue.currentPage-1)*ue.pageSize,v=d+ue.pageSize;return Be("getSliceContLength",ue),(T=Gr.value)==null?void 0:T.slice(d,v)}),bn=d=>{ue.currentPage=d,Be("getSliceContLength",ue)},zo=d=>{var I;ue.pageSize=d;const v=((I=we.value)==null?void 0:I.length)??0,T=d>0?Math.ceil(v/d):1;ue.currentPage>T&&(ue.currentPage=T||1,Ga.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),Be("getSliceContLength",ue)},Vi=({prop:d,order:v})=>{En.prop=d,En.order=v,ue.currentPage=1};function Fi(d){const v=[];function T(I,F=""){I.forEach(B=>{B.children&&B.children.length>0?T(B.children,B.prop):v.push(B.prop)})}return T(d),v}const Cn=(d,v)=>{var ie,K,_e,Ce;let T=(K=(ie=de.value)==null?void 0:ie.map(je=>je==null?void 0:je.prop))==null?void 0:K.filter(je=>je!=="operate");((_e=de.value)==null?void 0:_e.some(je=>{var Pe;return((Pe=je==null?void 0:je.children)==null?void 0:Pe.length)>0}))&&(T=Fi((Ce=de.value)==null?void 0:Ce.filter(je=>(je==null?void 0:je.prop)!=="operate")));let F;if(F=(d==null?void 0:d.length)===(T==null?void 0:T.length)?d:d.slice(0,T==null?void 0:T.length),!(F==null?void 0:F.every(je=>T==null?void 0:T.find(Pe=>je===Pe))))return Ga.ElMessage.error("导入的数据表头不匹配");Hn(F,v)},Pi=(d,v)=>{var F;const T=d==null?void 0:d.filter(B=>B!=="序号"),I=v==null?void 0:v.map(B=>{const oe=Object.entries(B);return oe.shift(),Object.fromEntries(oe)});He.setRefreshCurStructure(!1),((F=de.value)==null?void 0:F.length)===0||Cn(T,I)},ji=(d,v,T,I)=>{const F=[],B=[],oe=_e=>Object.keys(_e).length;for(const _e in d)if(d[_e]!==void 0){const Ce=d[_e],je=[];for(const[Pe,Xe]of Object.entries(Ce))je.push(Xe),B.length<oe(Ce)&&B.push(Pe);F.push(je)}F.unshift(B);const ie=ia.utils.aoa_to_sheet(F),K=ia.utils.book_new();ia.utils.book_append_sheet(K,ie,I),ia.writeFileSync(K,`${v}.xlsx`),ir.value=[]},Jo=async(d,v,T,I=!1,F)=>{try{He.setRefreshCurStructure(!1)}catch(B){Ga.ElMessage.error(B)}},Xo=async(d,v)=>{await Jo()},Zo=async(d,v)=>{await Jo("columnType",v,d,!1)},jr=async({newRow:d,targetIndex:v})=>{var F;if(!se(u.config,{type:Ze.TABLE}))return;const I=(ue.currentPage-1)*ue.pageSize+(v??0);d._isTemp=!0;try{(d.sort===void 0||d.sort===null||String(d.sort).trim()==="")&&(d.sort=Ln(I,we.value||[]))}catch{}we.value.splice(I,0,d),await a.nextTick(),m.value.has(d.id)||m.value.set(d.id,$.cloneDeep(d)),we.value=(F=we.value)==null?void 0:F.map(B=>({...B,tableEditType:(B==null?void 0:B.id)===d.id?"edit":(B==null?void 0:B.tableEditType)??"text"})),c.value.add(d.id),Al.value=!0},Hi=(d,v,T,I=[])=>(!Array.isArray(v)||v.length===0||v.forEach(F=>{const B=F==null?void 0:F.prop;if(!B)return;let oe=d==null?void 0:d[B];if(oe==null||String(oe).trim()==="")return;oe=String(oe);const ie=new Set([...(Array.isArray(T)?T:[]).filter(Ce=>(Ce==null?void 0:Ce.id)!==(d==null?void 0:d.id)).map(Ce=>Ce==null?void 0:Ce[B]).filter(Ce=>Ce!=null).map(Ce=>String(Ce)),...(Array.isArray(I)?I:[]).map(Ce=>Ce==null?void 0:Ce[B]).filter(Ce=>Ce!=null).map(Ce=>String(Ce))]);if(!ie.has(oe))return;let K=1,_e="";for(;_e=`${oe}(${K})`,!!ie.has(_e);)K++;d[B]=_e}),d),Mo=async()=>{var F,B,oe,ie,K,_e,Ce,je;const d=Array.from(c.value||[]);if(d.length===0)return;const v=(B=ia.getColumnChild((F=$.cloneDeep(de.value))==null?void 0:F.filter(Pe=>(Pe==null?void 0:Pe.label)!=="操作")))==null?void 0:B.filter(Pe=>(Pe==null?void 0:Pe.required)===!0);if((v==null?void 0:v.length)>0)for(let Pe=0;Pe<d.length;Pe++){const Xe=d[Pe],va=(oe=we.value)==null?void 0:oe.find(La=>(La==null?void 0:La.id)===Xe);if(va)for(let La=0;La<v.length;La++){const qa=v[La],sa=qa==null?void 0:qa.prop,Qa=(qa==null?void 0:qa.label)??sa,ga=va==null?void 0:va[sa];if(ga===""||ga===null||ga===void 0||Array.isArray(ga)&&ga.length===0){Ga.ElMessage.error(`${Qa}不能为空`);return}}}const T=[],I=[];if(d.forEach(Pe=>{var Qa;const Xe=(Qa=we.value)==null?void 0:Qa.find(ga=>(ga==null?void 0:ga.id)===Pe);if(!Xe)return;if(Xe!=null&&Xe._isTemp){const Fa=(ia.getAllLeafNodes(de.value)||[]).filter(A=>(A==null?void 0:A.mainKey)===!0||(A==null?void 0:A.isMainKey)===!0),he=we.value.findIndex(A=>(A==null?void 0:A.id)===Pe),Ea=he>=0?he+1:we.value.length+1;Hi(Xe,Fa,we.value,T);const ca={id:Ea.toString()};(Xe==null?void 0:Xe.sort)!==void 0&&(Xe==null?void 0:Xe.sort)!==null&&String(Xe.sort).trim()!==""?ca.sort=String(Xe.sort):ca.sort=Ln(he>=0?he:we.value.length-1,we.value||[]),(ia.getAllLeafNodes(de.value)||[]).filter(A=>(A==null?void 0:A.type)!=="operate"&&(A==null?void 0:A.label)!=="操作"&&(A==null?void 0:A.prop)!=="operate").forEach(A=>{const J=A==null?void 0:A.prop;if(J){const $e=Xe[J];$e!==void 0?ca[J]=$e??"":ca[J]=""}}),T.push(ca);return}const La=(ia.getAllLeafNodes(de.value)||[]).filter(ga=>(ga==null?void 0:ga.type)!=="operate"&&(ga==null?void 0:ga.label)!=="操作"&&(ga==null?void 0:ga.prop)!=="operate"),qa=new Set(La.map(ga=>ga==null?void 0:ga.prop).filter(Boolean)),sa={};for(const ga of qa)Object.prototype.hasOwnProperty.call(Xe,ga)&&(sa[ga]=Xe[ga]);I.push({id:Xe.id,value:{tableData:sa}})}),He.setTableLoading(u==null?void 0:u.index),I.length>0){const Pe=I.map(va=>{const La={id:va.id,...va.value.tableData};return delete La._isOCRRow,delete La._ocrTableId,delete La._isTemp,delete La.tableEditType,delete La.index,La}),Xe=[{tableName:(ie=u==null?void 0:u.related)==null?void 0:ie.find(va=>va==null?void 0:va.includes("content")),tableContents:Pe}];try{await $.pageBatchUpdateApi({platId:parseInt((K=Ll.value)==null?void 0:K.plat_id),changeContents:Xe})}catch(va){Ga.ElMessage.error(((Ce=(_e=va==null?void 0:va.response)==null?void 0:_e.data)==null?void 0:Ce.message)||(va==null?void 0:va.message)||"保存失败"),He.setTableLoading(!1);return}}if(T.length>0){const Pe={fixContent:T,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:de.value};Be("change",Pe)}Ga.ElMessage.success("保存成功"),c.value.clear(),m.value.clear(),we.value=(je=we.value)==null?void 0:je.map(Pe=>({...Pe,tableEditType:"text"})),Al.value=!1,He.setRefreshCurStructure(!0)},Ui=()=>{var v;const d=Array.from(c.value||[]);if(d.length===0){Al.value=!1;return}d.forEach(T=>{var B,oe;const I=m.value.get(T),F=(B=we.value)==null?void 0:B.find(ie=>(ie==null?void 0:ie.id)===T);if(F!=null&&F._isTemp){we.value=we.value.filter(ie=>(ie==null?void 0:ie.id)!==F.id);return}if(I){const ie=(oe=we.value)==null?void 0:oe.findIndex(K=>(K==null?void 0:K.id)===T);ie!==-1&&(we.value[ie]={...we.value[ie],...I})}}),c.value.clear(),m.value.clear(),we.value=(v=we.value)==null?void 0:v.map(T=>({...T,tableEditType:"text"})),Al.value=!1},Io=a.ref(!1),Qo=async d=>{var F,B,oe,ie;if(!Al.value||d!=null&&d.isComposing||(d==null?void 0:d.key)!=="Enter")return;const v=d==null?void 0:d.target;if(((B=(F=v==null?void 0:v.tagName)==null?void 0:F.toLowerCase)==null?void 0:B.call(F))==="textarea")return;const I=document.getElementById("excel-table");I&&!I.contains(v)||((oe=v==null?void 0:v.blur)==null||oe.call(v),(ie=d.preventDefault)==null||ie.call(d),await a.nextTick(),await ei())},ei=async()=>{if(V.value){Al.value=!1;return}if(!Io.value){Io.value=!0;try{Array.from(c.value||[]).length>0?await Mo():Al.value=!1}finally{Promise.resolve().then(()=>{Io.value=!1})}}},qi=d=>{ir.value=d},Wi=(d,v)=>{Pl.value===v?Vr.value=!1:Vr.value=!0,Pl.value=v==null?void 0:v.changeProp},ai=d=>{if(!d)return;const{item:v,value:T}=d,I=Ha.value.find(F=>F.prop==v.prop);I&&I.contents.push({label:T,value:T})},Dn=a.computed(()=>{var T,I,F;const d=(T=de.value)==null?void 0:T.some(B=>B==null?void 0:B.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",d?"inline-block":"none"),(F=(I=de.value)==null?void 0:I.filter(B=>(B==null?void 0:B.label)!=="操作"))==null?void 0:F.map(B=>({...B,filterable:!!(B!=null&&B.filterable),showSummary:!!(B!=null&&B.showSummary),operable:!!(B!=null&&B.operable),fixed:B==null?void 0:B.fixed}))}),Nn=async(d,v,T)=>{const I=$.cloneDeep(de.value);await a.nextTick();const F=I==null?void 0:I.map(oe=>(T==null?void 0:T.label)===(oe==null?void 0:oe.label)?{...oe,[v]:d}:oe),B=qn(F);await ms(u.index,B),de.value=F,Z.value=B},qn=d=>{var F;const v=d||[];return((F=ia.getAllLeafNodes(v)||[])==null?void 0:F.filter(B=>(B==null?void 0:B.prop)&&(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate")).map(B=>{const{prop:oe}=B;return l0(oe,B)})},Ki=async d=>{let v=await n0(u.index);v||(v=qn(d)),Z.value=v},li=async(d,v)=>{const T=$.cloneDeep(de.value),I=oe=>Array.isArray(oe)?oe.map(ie=>{const K=Array.isArray(ie==null?void 0:ie.children)&&ie.children.length>0,_e={...ie};return(_e==null?void 0:_e.prop)==="operate"||(_e==null?void 0:_e.label)==="操作"||(_e==null?void 0:_e.type)==="operate"?(_e.sortable=!1,_e.filterable=!1,_e.operable=!1):_e.sortable=K?!1:!!d,K&&(_e.children=I(_e.children)),_e}):oe,F=I(T),B=qn(F);await ms(u.index,B),de.value=F,Z.value=B,await a.nextTick(),nn.value=nn.value+1},ri=()=>{Ue.value=!1},ni=d=>{Be("clickTrigger",d)},Wn=async d=>{var B,oe,ie,K,_e,Ce,je,Pe,Xe,va,La,qa,sa,Qa,ga;const v=d==null?void 0:d.row,T=d==null?void 0:d.rowData,I=d==null?void 0:d.suffix;if((B=v==null?void 0:v.toString())!=null&&B.includes(".urdf")||d!=null&&d.isUrdf||I!=null&&I.includes(".urdf")){if(v.includes(",")){Ga.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(z(v)){const he={files:[be(v)],data:{}};De(he);return}ka.value=[{url:v,extension:le(v)}],Ve.value=!0,ye.value={data:$.cloneDeep(T)},Ee.value=!0;return}let F=[];if((oe=v==null?void 0:v.toString())!=null&&oe.includes(".stl")||(ie=v==null?void 0:v.toString())!=null&&ie.includes(".STL")||(K=v==null?void 0:v.toString())!=null&&K.includes(".obj")||(_e=v==null?void 0:v.toString())!=null&&_e.includes(".mtl")){const Fa=(Ce=v==null?void 0:v.toString())==null?void 0:Ce.split(","),he=Ye(Fa),Ea=he==null?void 0:he[0];if(z(Ea==null?void 0:Ea.extension)){De({files:he,data:{}});return}ka.value=he,Ve.value=!1,Ee.value=!0;return}if((je=v==null?void 0:v.toString())!=null&&je.includes(".stl")||(Pe=v==null?void 0:v.toString())!=null&&Pe.includes(".STL")||(Xe=v==null?void 0:v.toString())!=null&&Xe.includes(".obj")||(va=v==null?void 0:v.toString())!=null&&va.includes(".mtl")||I!=null&&I.includes(".stl")||I!=null&&I.includes(".STL")||I!=null&&I.includes(".obj")||I!=null&&I.includes(".mtl")){let Fa,he=[],Ea={};if(Array.isArray(v)?Fa=v:Fa=v==null?void 0:v.split(","),Fa==null||Fa.forEach(ca=>{ca.includes(".mtl")?he.push(ca):Ea.blob=Ea.blob?Ea.blob+","+ca:ca}),(he==null?void 0:he.length)>0&&(Ea.mtlBlobs=he),I&&(Ea.suffix=I),(qa=(La=Object.values(Ea))==null?void 0:La[0])!=null&&qa.includes("http:"))F.push(Ea);else{const ca=new Blob([Ea.blob],{type:"application/octet-stream;charset=UTF-8"});let wa=URL.createObjectURL(ca),Ca="";(sa=v==null?void 0:v.split("/"))==null||sa.forEach((A,J)=>{var $e;J===(($e=v==null?void 0:v.split("/"))==null?void 0:$e.length)-1&&(Ca=A)}),(Qa=Ea.blob)!=null&&Qa.includes(".stl")&&(Ca=(Ca==null?void 0:Ca.replaceAll(">",""))+".urdf"),re.value=[{name:Ca,blobUrl:wa}],Ma.value=!0}}else{const Fa=await Ga.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),he=new Blob([Fa.data],{type:"application/octet-stream;charset=UTF-8"});let Ea=URL.createObjectURL(he),ca="";if((ga=v==null?void 0:v.split("/"))==null||ga.forEach((wa,Ca)=>{var A;Ca===((A=v==null?void 0:v.split("/"))==null?void 0:A.length)-1&&(ca=wa)}),z(ca)){const wa=q(ca),Ca=be(v);De({files:[Ca],data:{trackFileType:wa}});return}re.value=[{name:ca,blobUrl:Ea}],Ma.value=!0}(F==null?void 0:F.length)>0&&o.setBlobUrls(F)},lo=d=>{var I,F,B,oe;if(d!=null&&d.downloadUrl)return d==null?void 0:d.name;const v=(oe=(I=d==null?void 0:d.url)==null?void 0:I.split("."))==null?void 0:oe[((B=(F=d==null?void 0:d.url)==null?void 0:F.split("."))==null?void 0:B.length)-1];return(d==null?void 0:d.name)+"."+v},oi=d=>{if(!d)return"未知文件";try{const I=lo(d);if(typeof I=="string"&&I.includes("."))return I}catch{}const v=(d==null?void 0:d.fileName)||(d==null?void 0:d.name)||"未知文件",T=(d==null?void 0:d.suffix)||"";return v.includes(".")?v:`${v}${T}`},ii=d=>{if(d==null||typeof d=="number"||typeof d!="string")return d;const v=d.match(/^(\d+)\_(\d+)$/);if(!v)return d;const T=Number(v[1]),I=Number(v[2]);return!Number.isFinite(T)||!Number.isFinite(I)?d:String(T*1e3+I)},ro=d=>{if(d==null)return null;const v=String(d).trim();if(!v)return null;const T=Number(v);return Number.isFinite(T)?T:null},Gi=d=>{if(d==null)return null;const v=String(d).trim();if(!v)return null;if(/^\d+$/.test(v)){const F=Number(v);return Number.isFinite(F)?v.length<=10?F*1e3:F:null}const T=v.includes("T")?v:v.replace(" ","T"),I=Date.parse(T);return Number.isFinite(I)?I:null},ti=(d,v=[])=>{const T=Array.isArray(d)?d.slice():[];if(T.length<=1)return T;const I=new Map((v||[]).map((oe,ie)=>[String(oe),ie])),F=T.some(oe=>ro(oe==null?void 0:oe.sort)!==null),B=T.map((oe,ie)=>({r:oe,idx:ie,id:String((oe==null?void 0:oe.id)??""),sortVal:ro(oe==null?void 0:oe.sort),createTimeMs:Gi(oe==null?void 0:oe.create_time),prevIdx:I.has(String(oe==null?void 0:oe.id))?I.get(String(oe==null?void 0:oe.id)):Number.POSITIVE_INFINITY}));return B.sort((oe,ie)=>{if(F){const Ce=oe.sortVal,je=ie.sortVal;if(Ce===null&&je!==null)return 1;if(Ce!==null&&je===null)return-1;if(Ce!==null&&je!==null&&Ce!==je)return Ce-je}const K=oe.createTimeMs,_e=ie.createTimeMs;return K!==null&&_e!==null&&K!==_e?_e-K:K!==null&&_e===null?-1:K===null&&_e!==null?1:oe.prevIdx!==ie.prevIdx?oe.prevIdx-ie.prevIdx:oe.idx-ie.idx}),B.map(oe=>oe.r)},Ln=(d,v=[])=>{const T=v==null?void 0:v[d-1],I=v==null?void 0:v[d],F=ro(T==null?void 0:T.sort),B=ro(I==null?void 0:I.sort);let oe=null;F!==null&&B!==null&&B>F?oe=(F+B)/2:F!==null?oe=F+1:B!==null?oe=Math.max(B-1,0):oe=(d??0)+1;const ie=Number(oe.toFixed(6));return String(Number.isFinite(ie)?ie:oe)},Yi=async d=>{let v=null,T=null;if(d!=null&&d.id){const F=jo.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const B=await $.platformDownloadFile(d);v=URL.createObjectURL(B.data),T=oi(d)}finally{F.close()}}else if(d!=null&&d.downloadUrl){const F=await ho(),B=jo.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),oe=await Ga.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:F,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{B.close()}),ie=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(ie),T=d==null?void 0:d.name}else{const F=await $.platformDownloadFile({url:d==null?void 0:d.url});!d.url.toUpperCase().includes(".OBJ")&&!d.url.toUpperCase().includes(".STL")&&!d.url.toUpperCase().includes(".MTL")&&!d.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(F.data),T=lo(d)):v=d==null?void 0:d.url}if(z(v)){const F={row:`${v}`,suffix:le(T)};Wn(F);return}const I={name:T,blobUrl:v};re.value=[I],Ma.value=!0},fo=async d=>{let v=null,T=null;if(d!=null&&d.id){const B=await $.platformDownloadFile(d);v=URL.createObjectURL(B.data),T=oi(d)}else if(d!=null&&d.downloadUrl){const B=await ho(),oe=await Ga.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:B,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),ie=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(ie),T=d==null?void 0:d.name}else{const B=await $.platformDownloadFile({url:d==null?void 0:d.url});v=URL.createObjectURL(B.data),T=lo(d)}const I={name:T,blobUrl:v},F=document.createElement("a");F.href=I.blobUrl,F.download=I.name,F.style.display="none",document.body.appendChild(F),F.click(),setTimeout(()=>{document.body.removeChild(F)},100)},Ji=(d,v)=>{var I;if(Object.values(v).length===0)return;let T=d;return Object.values(v).find(F=>{var B,oe,ie;return((B=F==null?void 0:F.toString())==null?void 0:B.includes(".txt"))||((oe=F==null?void 0:F.toString())==null?void 0:oe.includes(".cpt"))||((ie=F==null?void 0:F.toString())==null?void 0:ie.includes(".obj"))})?T=[...d,ra.value]:(I=u==null?void 0:u.config)!=null&&I.allowMove&&(T=[...d,{label:"迁移"}]),T},Oo=()=>{W.value=!0},Xi=a.ref([]),Zi=async(d,v,T=!1)=>{var oe,ie,K,_e;if(!d)return;if(T){we.value=[...ze.value.values()].filter(Ce=>Object.values(Ce).some(je=>typeof je=="string"?je==null?void 0:je.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let I={};for(let Ce in d)(d==null?void 0:d[Ce])!==""&&(I[Ce]=d==null?void 0:d[Ce]);if(JSON.stringify(I)==="{}"){we.value=Array.from(((oe=ze.value)==null?void 0:oe.values())??[]);return}let F=(ie=u==null?void 0:u.related)==null?void 0:ie.find(Ce=>Ce==null?void 0:Ce.includes("content_")),B=await $.getFillFind({platId:parseInt((K=Ll==null?void 0:Ll.value)==null?void 0:K.plat_id),tableName:F,params:I});B=(_e=B==null?void 0:B.data)==null?void 0:_e.result,we.value=B,He.setTableLoading(!1)},si=async d=>{var T,I;if(!se(u.config,{type:Ze.TABLE})||!d)return;((T=Array.from(c.value))==null?void 0:T.length)>0&&await Mo();const v=d==null?void 0:d.id;v!=null&&(c.value.clear(),m.value.clear(),m.value.has(v)||m.value.set(v,$.cloneDeep(d)),we.value=(I=we.value)==null?void 0:I.map(F=>({...F,tableEditType:(F==null?void 0:F.id)===v?"edit":"text"})),c.value.add(v),Al.value=!0)},Kn=async(d,v,T,I)=>{I!=null&&I.isExistChild&&Be("clickMainKey",d,T,de.value)},Bn=()=>{Ma.value=!1},ci=d=>{Be("rowClick",d)};a.watch(()=>u.changedContent,()=>{var T,I;if(!u.changedContent)return;let d=(T=we.value)==null?void 0:T.map(F=>{var B;return F.id===((B=u.changedContent)==null?void 0:B.id)&&(F={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete F.newId),F});const v=(I=u.itemData)==null?void 0:I.map(F=>((F==null?void 0:F.key)==="tableContents"&&(F.contents=d),F));we.value=d,Be("contentChange",{contents:v,index:u.index}),Be("change",{content:d,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const Lo=()=>{},Qi=async()=>{const d=qe.value,v=sessionStorage.getItem("systemKey"),T=await ia.getItemData(d,v,""),I=(T==null?void 0:T.find(ie=>(ie==null?void 0:ie.name)==="方法明细"))||(T==null?void 0:T[0]),F=(I==null?void 0:I.compData)||[],B=F==null?void 0:F.find(ie=>{const K=ie==null?void 0:ie.key;return K==="formContent"||K==="tableContents"});return B==null?void 0:B.contents},ho=async()=>{const v=Ga.Local.get("access-token");return v?`Bearer ${v}`:""},et=async(d,{token:v,inputData:T}={})=>await Ga.axios.post(d,T,{headers:{Authorization:v}}).catch(F=>(Ne.setImportLoading(!1),Promise.reject(F))),at=d=>{var I;let v={};const T=[];return v.form={},(I=$.cloneDeep(d))==null||I.forEach((F,B)=>{var oe,ie,K,_e,Ce,je,Pe,Xe,va,La,qa,sa,Qa,ga;if((F==null?void 0:F.comp)==="Table"){(ie=(oe=F==null?void 0:F.compData)==null?void 0:oe.find(ca=>(ca==null?void 0:ca.key)==="header"))==null||ie.contents;let Fa=(Ce=(_e=(K=F==null?void 0:F.compData)==null?void 0:K.find(ca=>(ca==null?void 0:ca.key)==="tableContents"))==null?void 0:_e.contents)==null?void 0:Ce.map(ca=>ca.slice(1));(La=(va=(Xe=(Pe=(je=F==null?void 0:F.compData)==null?void 0:je.find(ca=>(ca==null?void 0:ca.key)==="header"))==null?void 0:Pe.contents)==null?void 0:Xe[0])==null?void 0:va[0])==null||La.label;let he=(sa=(qa=F==null?void 0:F.compData)==null?void 0:qa.find(ca=>(ca==null?void 0:ca.key)==="header"))==null?void 0:sa.contents,Ea=[];Fa==null||Fa.forEach(ca=>{let wa=[];ca==null||ca.forEach((Ca,A)=>{var $e;let J={};(($e=he[A])==null?void 0:$e.label)!=="操作"&&(J[he[A].label]=Ca,wa.push(J))}),Ea.push(wa)}),v[F.name]=Ea}else{const Fa=(ga=(Qa=F.compData)==null?void 0:Qa.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:ga.contents;Fa==null||Fa.forEach(he=>{var Ea,ca;if(he.prop!==""){let wa=he==null?void 0:he.value;Array.isArray(wa)?wa=((Ea=wa==null?void 0:wa[0])==null?void 0:Ea.oldUrl)||"http://222.92.178.198:62001/"+((ca=wa==null?void 0:wa[0])==null?void 0:ca.url):wa=wa.toString(),he={key:(he==null?void 0:he.prop)??(he==null?void 0:he.label),value:wa},T.push(he)}})}}),v.form=ia.getFormContents(T),v},lt=d=>{const v=[],T=I=>{I&&typeof I=="object"&&!Array.isArray(I)?Object.values(I).forEach(T):v.push(I)};return T(d),v},rt=async(d,v,T)=>{var he,Ea,ca,wa,Ca,A,J,$e,oa,xe,ta,Na,tl,Ya,ul,dl,Vl;Ne.setImportLoading(!0),He.setFreshContent(!1);let I=await Qi().catch(Ka=>(Ne.setImportLoading(!1),Promise.reject(Ka)));I=I==null?void 0:I.filter(Ka=>{var vl;return((vl=Ka==null?void 0:Ka.find(Va=>Va==null?void 0:Va.id))==null?void 0:vl.id)===(v==null?void 0:v.id)});let F=ia.getEqualChild([(he=de.value)==null?void 0:he.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")]);const B=(ca=(Ea=ia.tableToForm(I,F))==null?void 0:Ea[0])==null?void 0:ca.find(Ka=>{const vl=Ka==null?void 0:Ka.key;return vl==="Interface"||vl==="方法体"}),oe=B==null?void 0:B.value;if(!oe){console.log("未搜索到isMain, 缺少算法执行接口"),Ne.setImportLoading(!1);return}const ie=de.value?ia.getEqualChild([de.value]):[],K=ie.find(Ka=>{const vl=Ka==null?void 0:Ka.prop;return vl==="Input1"||vl==="输入数据.输入1"||vl==="样本输入数据"}),_e=K==null?void 0:K.prop;let Ce=v==null?void 0:v[_e];const je=await ho().catch(Ka=>(Ne.setImportLoading(!1),Promise.reject(Ka)));let Pe=!0,Xe="";(wa=de.value)==null||wa.forEach(Ka=>{(Ka==null?void 0:Ka.prop)===_e&&(Pe=!!(Ka!=null&&Ka.childPath),Xe=Ka==null?void 0:Ka.childPath)});let va="";if(Pe){let Ka=(A=(Ca=de.value)==null?void 0:Ca.find(cl=>(cl==null?void 0:cl.isMainKey)===!0))==null?void 0:A.prop;va=v==null?void 0:v[Ka];let vl=Xe==null?void 0:Xe.split(k),Va=[];vl==null||vl.forEach((cl,_l)=>{(vl==null?void 0:vl.length)-1===_l&&Va.push(va),Va.push(cl)}),Va=Va==null?void 0:Va[0];let sl=await ia.getItemData(Va,sessionStorage.getItem("systemKey"),""),Xa=sl==null?void 0:sl.filter(cl=>(cl==null?void 0:cl.name)===_e);Xa=Xa==null?void 0:Xa.map(cl=>{var _l;return cl.compData=(_l=cl==null?void 0:cl.compData)==null?void 0:_l.map(Nl=>{var xr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(xr=Nl==null?void 0:Nl.contents)==null?void 0:xr.filter(Il=>(Il==null?void 0:Il[1])===(v==null?void 0:v[_e]))),Nl}),cl}),(!Xa||(Xa==null?void 0:Xa.length)===0)&&(Xa=sl,Xa=Xa==null?void 0:Xa.map(cl=>{var _l;return cl.compData=(_l=cl==null?void 0:cl.compData)==null?void 0:_l.map(Nl=>{var xr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(xr=Nl==null?void 0:Nl.contents)==null?void 0:xr.filter(Il=>{var yl,Tl;return(Il==null?void 0:Il[1])===(v==null?void 0:v[(Tl=(yl=de==null?void 0:de.value)==null?void 0:yl[0])==null?void 0:Tl.prop])})),Nl}),cl})),Ce=at(Xa)}const La=await et(oe,{token:je,inputData:Ce}).catch(Ka=>(Ne.setImportLoading(!1),Promise.reject(Ka))),qa=(J=La==null?void 0:La.data)==null?void 0:J.data,sa=ie.find(Ka=>(Ka==null?void 0:Ka.prop)==="Output1"),Qa=sa==null?void 0:sa.prop;let ga=[],Fa=[];if(qa&&(($e=Object.values(qa))==null?void 0:$e.length)>0){let Ka=[];const vl=new FormData,Va=(oa=lt(qa))==null?void 0:oa.map(async Xa=>{var cl,_l;if(!Array.isArray(Xa)&&(Xa!=null&&Xa.includes("http"))){let Nl=await Ga.axios.get(Xa,{responseType:"blob"}),xr=(_l=Xa==null?void 0:Xa.split("/"))==null?void 0:_l[((cl=Xa==null?void 0:Xa.split("/"))==null?void 0:cl.length)-1];vl.append("files",Nl.data,xr)}else Ka.push(Xa)});if(await Promise.all(Va),!ia.isFormDataEmpty(vl)){let Xa=await Mu.uploadAmountApi(vl),cl=(ta=(xe=Xa==null?void 0:Xa.data)==null?void 0:xe.result)==null?void 0:ta.map(_l=>{var Nl,xr,Il,yl,Tl,Yl;return{name:(Yl=(Tl=(yl=(Nl=_l==null?void 0:_l.url)==null?void 0:Nl.split("/"))==null?void 0:yl[((Il=(xr=_l==null?void 0:_l.url)==null?void 0:xr.split("/"))==null?void 0:Il.length)-1])==null?void 0:Tl.split("."))==null?void 0:Yl[0],url:_l==null?void 0:_l.url}});Ka=[...Ka,...cl]}let sl={};for(let Xa in v)Xa!=="id"&&(sl[Xa]=v[Xa]);sl[Qa]=Ka,Fa.push({id:v==null?void 0:v.id,value:{tableData:sl}})}if((Fa==null?void 0:Fa.length)>0){const Ka=Fa.map(Va=>{const sl={id:Va.id,...Va.value.tableData};return delete sl._isOCRRow,delete sl._ocrTableId,delete sl._isTemp,delete sl.tableEditType,delete sl.index,sl}),vl=[{tableName:(Na=u==null?void 0:u.related)==null?void 0:Na.find(Va=>Va==null?void 0:Va.includes("content")),tableContents:Ka}];await $.pageBatchUpdateApi({platId:parseInt((tl=Ll.value)==null?void 0:tl.plat_id),changeContents:vl})}if((ga==null?void 0:ga.length)>0)try{await $.pageBatchAddApi({platId:parseInt((Ya=Ll.value)==null?void 0:Ya.plat_id),changeContents:[{tableName:(ul=u==null?void 0:u.related)==null?void 0:ul.find(Ka=>Ka==null?void 0:Ka.includes("content")),tableContents:ga.map(Ka=>{var Va,sl,Xa;const vl={id:((Va=Ka==null?void 0:Ka.key)==null?void 0:Va.id)??((sl=Ka==null?void 0:Ka.key)==null?void 0:sl.rowId)??(Ka==null?void 0:Ka.id),...((Xa=Ka==null?void 0:Ka.value)==null?void 0:Xa.tableData)||{}};return delete vl._isOCRRow,delete vl._ocrTableId,delete vl._isTemp,delete vl.tableEditType,delete vl.index,Object.keys(vl).forEach(cl=>{cl==="证书附件"&&Array.isArray(vl[cl])&&(vl[cl]=JSON.stringify(vl[cl]))}),vl})}]})}catch(Ka){Ga.ElMessage.error(((Vl=(dl=Ka==null?void 0:Ka.response)==null?void 0:dl.data)==null?void 0:Vl.message)||(Ka==null?void 0:Ka.message)||"保存失败"),He.setTableLoading(!1);return}Vo(!0),Ne.setImportLoading(!1),He.setFreshContent(!0)},ui=(d,v)=>(d=d==null?void 0:d.map(T=>{var I,F;return T!=null&&T.children&&((I=T.children)!=null&&I.find(B=>B.id===(v==null?void 0:v.id))?T.children=(F=T.children)==null?void 0:F.filter(B=>(B==null?void 0:B.id)!==(v==null?void 0:v.id)):T.children=ui(T.children,v)),T}),d),vo=a.ref(!1),nt=()=>{vo.value=!0},ot=async d=>{var T,I,F,B;vo.value=!1;const v=Array.isArray(d)?d:d?[d]:[];if(v.length!==0)for(const oe of v){const ie={name:oe.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(oe),raw:oe,uid:Date.now()+Math.random()};al.value.push(ie),El(ie,"uploading"),zl(ie,0);try{const K=new FormData;K.append("file",oe,ie.name);const _e=await $.platformUploadFile(K);ie.uploadResult=((T=_e==null?void 0:_e.data)==null?void 0:T.result)||{name:ie.name,url:"",fileName:ie.name},Ol({name:((I=ie.uploadResult)==null?void 0:I.name)||ie.name,url:((F=ie.uploadResult)==null?void 0:F.url)||"",id:(B=ie.uploadResult)==null?void 0:B.id}),El(ie,"uploaded"),zl(ie,100)}catch(K){console.error("文件上传失败:",K),Ga.ElMessage.error(`文件 ${ie.name} 上传失败,请重试`),El(ie,"pending"),zl(ie,0);const _e=al.value.findIndex(Ce=>Ce.uid===ie.uid);_e>-1&&al.value.splice(_e,1)}}},t=a.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:u==null?void 0:u.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(d,v,T)=>{v===(u==null?void 0:u.index)?T(new Error("选择源不能和目标源一致")):T()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),i=a.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],buttonValue:[{label:"取消",value:"cancel",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"覆盖",render:"popover",value:"replace",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}],result:""}),p=()=>{i.show=!1},b=async d=>{var v,T,I,F,B,oe,ie,K;try{if(d==="cancel"&&(i.show=!1),d==="replace"&&((v=i==null?void 0:i.existRows)==null?void 0:v.length)>0){await $.pageBatchDeleteApi({platId:parseInt((T=Ll.value)==null?void 0:T.plat_id),changeContents:[{tableName:((I=u==null?void 0:u.related)==null?void 0:I.find(Ce=>Ce==null?void 0:Ce.includes("content_")))||((F=u==null?void 0:u.related)==null?void 0:F.find(Ce=>Ce==null?void 0:Ce.includes("content"))),tableContents:i==null?void 0:i.existRows}]});const _e=await $.pageBatchAddApi({platId:parseInt((B=Ll.value)==null?void 0:B.plat_id),changeContents:[{tableName:(oe=u==null?void 0:u.related)==null?void 0:oe.find(Ce=>Ce==null?void 0:Ce.includes("content")),tableContents:(()=>{const Ce=(we.value||[]).filter(va=>!((i==null?void 0:i.existRows)||[]).some(La=>String(La==null?void 0:La.id)===String(va==null?void 0:va.id))),je=(i==null?void 0:i.tableData)||[],Pe=[];let Xe=Ce.slice();return je.forEach(va=>{const La={...va};try{La.sort=Ln(0,Xe)}catch{}Pe.push(La),Xe.unshift(La)}),Pe.map((va,La)=>({id:La,...va}))})()}]});((ie=_e==null?void 0:_e.data)==null?void 0:ie.code)===200&&(await St({buttonName:"新增",columns:de.value,fixContent:(K=i==null?void 0:i.tableData)==null?void 0:K.map((Ce,je)=>({id:je,...Ce})),relatedContents:u==null?void 0:u.related}),Ga.ElMessage.success("数据导入替换成功"))}}catch{throw new Error(e)}finally{i.show=!1,i.columns=[],i.tableData=[],i.existRows=[]}},_=()=>{t.show=!1},L=d=>{var v,T;if((d==null?void 0:d.buttonName)==="取消")return t.show=!1;t.to=d==null?void 0:d.content,!(!(u!=null&&u.index)||!((v=t.to)!=null&&v.groupName))&&(u==null?void 0:u.index)!==((T=t.to)==null?void 0:T.groupName)&&(Be("change",{buttonName:"迁移",value:{from:t.from,to:t.to,data:t.selectRow}}),t.show=!1)},Y=async d=>{var v,T,I,F;if(d){if(!Nr.validateFileSize(d.raw)){Ga.ElMessage.warning(`文件大小不能超过 ${Fr.value.maxSize}MB`);const B=al.value.findIndex(oe=>oe.uid===d.uid);B>-1&&al.value.splice(B,1),Q();return}if(!Nr.validateFileType(d.raw)){Ga.ElMessage.warning("请上传图片文件");const B=al.value.findIndex(oe=>oe.uid===d.uid);B>-1&&al.value.splice(B,1),Q();return}El(d,"uploading"),zl(d,0);try{const B=new FormData;B.append("file",d.raw,d.name);const oe=await $.platformUploadFile(B);d.uploadResult=((v=oe==null?void 0:oe.data)==null?void 0:v.result)||{name:d.name,url:"",fileName:d.name},Ol({name:((T=d.uploadResult)==null?void 0:T.name)||d.name,url:((I=d.uploadResult)==null?void 0:I.url)||"",id:(F=d.uploadResult)==null?void 0:F.id}),El(d,"uploaded"),zl(d,100)}catch(B){console.error("文件上传失败:",B),Ga.ElMessage.error(`文件 ${d.name} 上传失败,请重试`),El(d,"pending"),zl(d,0);const oe=al.value.findIndex(ie=>ie.uid===d.uid);oe>-1&&al.value.splice(oe,1)}finally{Q()}}},Q=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');d&&(d.value="")})},ge=async()=>{var T,I;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),al.value.length===0){Ga.ElMessage.warning("请先选择要上传的图片");return}if(al.value.filter(F=>{const B=ol(F);return B!=="uploaded"&&B!=="completed"&&B!=="failed"}).length>0){Ga.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}Ua.value=!0,X.value=0;let v=null;try{al.value.forEach(sa=>{El(sa,"processing")});const F=Math.floor(Math.random()*10)+90;v=setInterval(()=>{X.value<F?X.value+=1:clearInterval(v)},50);const B=al.value.map(sa=>{var Qa,ga,Fa;return{name:((Qa=sa.uploadResult)==null?void 0:Qa.name)||sa.name,url:((ga=sa.uploadResult)==null?void 0:ga.url)||"",fileName:((Fa=sa.uploadResult)==null?void 0:Fa.fileName)||sa.name}}),oe=Nr.extractTableHeaders(de.value),ie=B.map(sa=>({name:(sa==null?void 0:sa.fileName)||(sa==null?void 0:sa.name),url:(sa==null?void 0:sa.url)||""})),K=await Nr.recognize(ie,oe);if(console.log(K,"ocrResult"),clearInterval(v),v=null,(K==null?void 0:K.code)===500||(K==null?void 0:K.type)==="error"||!(K!=null&&K.result)){X.value=0,al.value.forEach(sa=>{El(sa,"failed"),zl(sa,0)}),Ga.ElMessage.error((K==null?void 0:K.message)||"OCR识别失败,请重试"),Ua.value=!1;return}X.value=F;const _e=Array.isArray(K==null?void 0:K.result)?K.result:[];if(_e.length===0){X.value=0,al.value.forEach(sa=>{El(sa,"failed"),zl(sa,0)}),Ga.ElMessage.warning("OCR识别未返回有效数据"),Ua.value=!1;return}const Ce=new Set,je=[];_e.forEach((sa,Qa)=>{const ga=sa!=null&&sa.数据&&typeof(sa==null?void 0:sa.数据)=="object"?sa.数据:{},Fa=Array.isArray(sa==null?void 0:sa.图片信息)?sa.图片信息:[],he=new Map;Fa.forEach(ca=>{ca!=null&&ca.name&&he.set(ca.name,ca.url||"")});const Ea={_index:Qa,_certType:(sa==null?void 0:sa.证书类型)||"",_certNo:(sa==null?void 0:sa.证书编号)||"",_ocrImages:Fa,__ocrFieldMeta:{}};Object.entries(ga).forEach(([ca,wa])=>{let Ca="",A=0,J=[],$e="";wa&&typeof wa=="object"&&!Array.isArray(wa)?(Ca=(wa==null?void 0:wa.value)??"",A=(wa==null?void 0:wa.score)??0,J=Array.isArray(wa==null?void 0:wa.bboxNorm)?wa==null?void 0:wa.bboxNorm:[],$e=(wa==null?void 0:wa.imageName)||""):Array.isArray(wa)&&wa.length>=2?(Ca=wa[0]??"",A=wa[1]??0):(Ca=wa??"",A=0),Ea[ca]=Ca,Ea[`${ca}_accuracy`]=A,Ce.add(ca),Ea.__ocrFieldMeta[ca]={value:Ca,score:A,bboxNorm:J,imageName:$e,imageUrl:$e&&he.get($e)||"",images:Fa}}),je.push(Ea)});const Pe=[],Xe=new Set;je.forEach(sa=>{sa&&Ce.forEach(Qa=>{const ga=sa[`${Qa}_accuracy`];(typeof ga=="number"?ga>0:ga!=null&&String(ga).trim()!==""&&String(ga)!=="0")&&Xe.add(Qa)})}),Ce.forEach(sa=>{Pe.push({prop:sa,label:sa,editable:!0,minWidth:230}),Xe.has(sa)&&Pe.push({prop:`${sa}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),al.value.forEach(sa=>{El(sa,"completed")}),X.value=100,Ie.value=Pe,Qe.value=je,hl.value=B,Ra.value=K;const va=["出厂编号","设备名称","制造厂"],La=Pe.filter(sa=>sa&&!sa.isAccuracy&&typeof sa.prop=="string").map(sa=>sa.prop),qa=["出厂编号","设备名称","制造厂"];Wa.value=La.filter(sa=>qa.includes(sa)),console.log("[OCR] 默认勾选字段 props:",Wa.value),ke.value=2,Ua.value=!1,aa.value=!1}catch(F){console.error("OCR处理失败:",F),v&&(clearInterval(v),v=null),Ga.ElMessage.error(((I=(T=F==null?void 0:F.response)==null?void 0:T.data)==null?void 0:I.message)||"OCR识别失败,请重试"),Ua.value=!1,X.value=0,al.value.forEach(B=>{El(B,"pending"),zl(B,0)})}},Fe=d=>{if(d==null)return"";let v=String(d);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,T=>String.fromCharCode(T.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},Se=()=>{var sa,Qa;const d=hl.value,v=Ra.value,T=Qe.value;if(!T||T.length===0){Ga.ElMessage.warning("暂无数据可添加");return}const I=(sa=ia.getAllLeafNodes(de.value)||[])==null?void 0:sa.filter(ga=>(ga==null?void 0:ga.type)!=="operate"&&(ga==null?void 0:ga.label)!=="操作"&&(ga==null?void 0:ga.prop)!=="operate"),F=new Map,B=new Map,oe=(Qa=I==null?void 0:I.find(ga=>(ga==null?void 0:ga.label)==="证书附件"))==null?void 0:Qa.prop;I==null||I.forEach(ga=>{ga!=null&&ga.label&&(ga!=null&&ga.prop)&&(F.set(ga.label,ga.prop),B.set(ga.prop,ga.label))});const ie=Date.now(),K=ga=>String(ie*1e3+ga),_e=[],Ce=[],je=ga=>{const Fa=Ti&&Ti[ga]||[ga];for(const he of Fa){const Ea=F.get(he);if(Ea)return Ea}return""},Pe=je("出厂编号"),Xe=je("设备名称"),va=je("制造厂"),La=[],qa=ga=>{var Ca,A;if(!oe)return[];const Fa=(Array.isArray(d)?d[ga]:null)||null,he=(Fa==null?void 0:Fa.url)||"",Ea=(Fa==null?void 0:Fa.fileName)||(Fa==null?void 0:Fa.name)||"";return(String(Ea).toLowerCase().endsWith(".pdf")||String(he).toLowerCase().endsWith(".pdf"))&&he?[{url:he,name:Ea,fileName:Ea}]:(Array.isArray((A=(Ca=v==null?void 0:v.result)==null?void 0:Ca[ga])==null?void 0:A.图片信息)?v.result[ga].图片信息:[]).map(J=>({url:(J==null?void 0:J.url)||"",name:(J==null?void 0:J.name)||"",fileName:(J==null?void 0:J.name)||""})).filter(J=>J.url)};if(T.forEach((ga,Fa)=>{var tl;const he={id:K(Fa),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[Ya,ul]of F.entries())Object.prototype.hasOwnProperty.call(ga,Ya)&&(he[ul]=ga[Ya]);oe&&(he[oe]=qa(Fa));const Ea=(Array.isArray(v==null?void 0:v.result)?v.result[Fa]:null)||null,ca=(Array.isArray(d)?d[Fa]:null)||null,wa=(ca==null?void 0:ca.url)||"",Ca=(ca==null?void 0:ca.fileName)||(ca==null?void 0:ca.name)||"",A=String(Ca).toLowerCase().endsWith(".pdf")||String(wa).toLowerCase().endsWith(".pdf"),J={ts:Date.now(),versionId:String(Date.now())+"_"+String(Fa),label:new Date().toLocaleString(),certType:(Ea==null?void 0:Ea.证书类型)||"",certNo:(Ea==null?void 0:Ea.证书编号)||"",fileType:A?"pdf":"image",sourceUrl:A?wa:"",images:Array.isArray(Ea==null?void 0:Ea.图片信息)?Ea.图片信息.map(Ya=>({name:(Ya==null?void 0:Ya.name)||"",url:(Ya==null?void 0:Ya.url)||""})).filter(Ya=>Ya.url):[]},$e=Ya=>Fe(Ya?he==null?void 0:he[Ya]:""),oa=$e(Pe),xe=$e(Xe),ta=$e(va);if(!!(Pe&&Xe&&va&&oa&&xe&&ta)){const Ya=(we.value||[]).find(ul=>{const dl=Fe(Pe?ul==null?void 0:ul[Pe]:""),Vl=Fe(Xe?ul==null?void 0:ul[Xe]:""),Ka=Fe(va?ul==null?void 0:ul[va]:"");return dl&&Vl&&Ka&&dl===oa&&Vl===xe&&Ka===ta});if(Ya){La.push({idx:Fa,ocrRow:he,versionItem:J,ocrNo:oa,candidates:[Ya],selectedTargetId:String((Ya==null?void 0:Ya.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(oa&&Pe){const Ya=(we.value||[]).filter(ul=>{const dl=Fe(Pe?ul==null?void 0:ul[Pe]:"");return dl&&dl===oa});if(Ya.length>0){La.push({idx:Fa,ocrRow:he,versionItem:J,ocrNo:oa,candidates:Ya,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(he.sort===void 0||he.sort===null||String(he.sort).trim()===""){const Ya=(we.value||[]).map(dl=>ro(dl==null?void 0:dl.sort)).filter(dl=>dl!==null),ul=Ya.length>0?Math.max(...Ya):((tl=we.value)==null?void 0:tl.length)??0;he.sort=String(Number((ul+1).toFixed(6)))}}catch{}ja(u==null?void 0:u.index,he.id,J),La.push({idx:Fa,ocrRow:he,versionItem:J,ocrNo:oa,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(La||[]).length>0){or.value=(La||[]).map(ga=>({...ga,selectedTargetId:(ga==null?void 0:ga.selectedTargetId)||""})),Fl.value=!0,gr.value=Ce,Cl.value=_e,sr.value=v,Tr.value=d,Ml.value=oe||"";return}},ea=(d,v,T)=>{Qe.value[d]&&(Qe.value[d][v]=T)},Aa=d=>d==null||d===0?"-":`${(Number(d)*100).toFixed(1)}%`,rl=d=>{if(d==null||d===0)return"#909399";const v=Number(d);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},Ja=d=>{var T,I,F,B;if(Sa.value===d){Sa.value=null,xa.value=!1,me.value="";return}Sa.value=d,me.value="";const v=(T=Qe.value)==null?void 0:T[d];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){wl.value=v._ocrImages.map(K=>({name:(K==null?void 0:K.name)||"",url:(K==null?void 0:K.url)||""})).filter(K=>K.name||K.url);const oe=v.__ocrFieldMeta||{},ie=(I=Object.values(oe))==null?void 0:I.find(K=>K==null?void 0:K.imageName);Rl.value=(ie==null?void 0:ie.imageName)||((B=(F=wl.value)==null?void 0:F[0])==null?void 0:B.name)||"",xa.value=wl.value.length>0}else wl.value=[],xa.value=!1,Rl.value=""},nl=()=>{Da.value=!1,al.value=[],Za.value=null,ke.value=1,Ta.value.clear(),Ge.value.clear(),X.value=0,xa.value=!1},kl=d=>d.raw?URL.createObjectURL(d.raw):d.url?d.url:"",ol=d=>{const v=d.uid||d.name;return Ta.value.get(v)||"pending"},Dl=d=>{const v=d.uid||d.name;return Ge.value.get(v)||0},zl=(d,v)=>{const T=d.uid||d.name;Ge.value.set(T,Math.min(100,Math.max(0,v)))},Xl=d=>{const v=ol(d),T=100.53;if(v==="completed"||v==="uploaded")return`${T} ${T}`;if(v==="failed")return`${T} ${T}`;if(v==="uploading"){const I=Dl(d);return`${T*(I/100)} ${T}`}else if(v==="processing")return`${T*.5} ${T}`;return`0 ${T}`},El=(d,v)=>{const T=d.uid||d.name;Ta.value.set(T,v),(v==="completed"||v==="uploaded")&&zl(d,100)},Ul=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');if(d)d.value="",d.click();else{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept="image/*,application/pdf",v.style.display="none",v.onchange=async T=>{const I=Array.from(T.target.files||[]);for(const F of I){const B={name:F.name,raw:F,uid:Date.now()+Math.random()};al.value.push(B),await Y(B)}T.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},Hr=()=>{ke.value>1&&ke.value--},_r=()=>{ke.value===1?al.value.length>0&&!Ua.value&&ge():ke.value===2&&(Se(),ke.value=3)},Jr=async d=>{await fn(d==null?void 0:d.row)},tn=async({row:d,prop:v})=>{!d||!v||await fn(d,v)},fn=async(d,v)=>{var F,B;const T=d==null?void 0:d.id;if(!T){Ga.ElMessage.warning("暂无可预览数据");return}let I=jl(u==null?void 0:u.index,T);if(!I||I.length===0){const oe=sessionStorage.getItem("ocr_root_table_id"),ie=oe!==null?Number(oe):null;if(ie!=null&&ie!==""&&!Number.isNaN(ie)){const K=jl(ie,T);Array.isArray(K)&&K.length>0&&(Zl(u==null?void 0:u.index,T,K),I=K)}}if(!I||I.length===0){const oe=(F=ia.getAllLeafNodes(de.value)||[])==null?void 0:F.filter(K=>(K==null?void 0:K.type)!=="operate"&&(K==null?void 0:K.label)!=="操作"&&(K==null?void 0:K.prop)!=="operate"),ie=v||((B=oe==null?void 0:oe.find(K=>(K==null?void 0:K.label)==="证书附件"))==null?void 0:B.prop);if(ie&&d[ie]){const K=d[ie];let _e=[],Ce="",je=!1;if(typeof K=="string")try{const Pe=JSON.parse(K);Array.isArray(Pe)&&(_e=Pe.map(Xe=>({name:(Xe==null?void 0:Xe.name)||(Xe==null?void 0:Xe.fileName)||"",url:(Xe==null?void 0:Xe.url)||""})).filter(Xe=>Xe.url||Xe.name),_e.length>0&&(Ce=_e[0].url||"",je=String(_e[0].name).toLowerCase().endsWith(".pdf")||String(Ce).toLowerCase().endsWith(".pdf")))}catch{Ce=K,je=String(K).toLowerCase().endsWith(".pdf"),_e=[{name:K,url:K}]}else Array.isArray(K)&&(_e=K.map(Pe=>({name:(Pe==null?void 0:Pe.name)||(Pe==null?void 0:Pe.fileName)||"",url:(Pe==null?void 0:Pe.url)||""})).filter(Pe=>Pe.url||Pe.name),_e.length>0&&(Ce=_e[0].url||"",je=String(_e[0].name).toLowerCase().endsWith(".pdf")||String(Ce).toLowerCase().endsWith(".pdf")));if(_e.length>0||Ce){const Pe={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:d.证书类型||"",certNo:d.证书编号||"",fileType:je?"pdf":"image",sourceUrl:je?Ce:"",images:_e};I=[Pe],ja(u==null?void 0:u.index,T,Pe)}}}if(!I||I.length===0){Ga.ElMessage.warning("暂无可预览数据");return}na.value=I,Me.value=!0},mo=d=>{al.value=al.value.filter((v,T)=>T!==d)},$n=async(d,v,T)=>{var I,F,B,oe,ie,K,_e,Ce,je,Pe,Xe,va,La,qa,sa,Qa,ga,Fa,he,Ea,ca;if(se(u.config,{type:Ze.TABLE,tableOperate:d})){if(_a.value="",Pa.value=!0,We.value=!0,Be("onButtonClick",d,v),R.value=[],d==="删除")dn.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var wa,Ca,A,J;(wa=we.value)!=null&&wa.find($e=>($e==null?void 0:$e.id)===(v==null?void 0:v.id))?we.value=(Ca=$.cloneDeep(we.value))==null?void 0:Ca.filter($e=>($e==null?void 0:$e.id)!==(v==null?void 0:v.id)):we.value=ui($.cloneDeep(we.value),v);try{v!=null&&v.id&&((J=(A=ze.value)==null?void 0:A.has)!=null&&J.call(A,v==null?void 0:v.id))&&ze.value.delete(v.id)}catch{}Tf(Yr.value,gn.value,v==null?void 0:v.id),He.setTableLoading(u==null?void 0:u.index),Be("change",{content:we.value,fixContent:[v],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:d,columns:de.value,relatedContents:u==null?void 0:u.related}),console.log(v,"item")});else if(d==="批量删除"){if(((I=ir.value)==null?void 0:I.length)===0)return Ga.ElMessage.warning("请先勾选操作的数据");dn.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var A,J,$e,oa,xe;const wa=(A=ir.value)==null?void 0:A.map(ta=>ta.id);we.value=(J=$.cloneDeep(we.value))==null?void 0:J.filter(ta=>!(wa!=null&&wa.includes(ta.id))),He.setTableLoading(u==null?void 0:u.index),Be("change",{content:we.value,fixContent:ir.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:d,relatedContents:u==null?void 0:u.related,columns:de.value});const Ca=(wa||[]).filter(Boolean);if(Ca.length>0&&Ca.every(ta=>ta!=null&&ta!=="")){const ta=(ir.value||[]).map(Na=>{const tl={...Na};return delete tl._isOCRRow,delete tl._ocrTableId,delete tl._isTemp,delete tl.tableEditType,delete tl.index,tl});await $.pageBatchDeleteApi({platId:parseInt(($e=Ll.value)==null?void 0:$e.plat_id),changeContents:[{tableName:((oa=u==null?void 0:u.related)==null?void 0:oa.find(Na=>Na==null?void 0:Na.includes("content_")))||((xe=u==null?void 0:u.related)==null?void 0:xe.find(Na=>Na==null?void 0:Na.includes("content"))),tableContents:ta}]})}})}else if(d==="复制新增"){ne.value="复制新增",$.cloneDeep(v);const wa=(F=de.value)==null?void 0:F.find(Ca=>Ca==null?void 0:Ca.isMainKey);wa||((B=de.value)==null||B[0]),cr.value=v,Vo(!0)}else if(d==="新增")ne.value="新增",$o(""),Ue.value=!0;else if(d==="编辑")ne.value="编辑",$o(v),Ue.value=!0;else if(d==="查看")ne.value="查看",$o(v),Pa.value=!1,We.value=!1,Ue.value=!0;else if(d==="查看三维模型"){const wa={};for(let A in v)A!=="id"&&(wa[A]=v[A]);let Ca=(oe=Object.values(wa))==null?void 0:oe[1];Le.setTableShowThree(Ca)}else if(d==="切换视图")gu();else if(((ie=T==null?void 0:T.extra)==null?void 0:ie.type)==="modelExample")ne.value=d,Oe.value=!0;else if(d==="新建"){let wa=fe.value,Ca=[];for(let xe in wa)xe!=null&&xe.includes(`loading${((K=Ll.value)==null?void 0:K.account)||((_e=Ll.value)==null?void 0:_e.账号)}`)&&(Ca=[...Ca,...xe]);let A=[];for(let xe in wa)xe!=null&&xe.includes(`updateLoading${((Ce=Ll.value)==null?void 0:Ce.account)||((je=Ll.value)==null?void 0:je.账号)}`)&&(A=[...A,...xe]);let J=Ca==null?void 0:Ca.map(xe=>xe==null?void 0:xe.id);const $e=A==null?void 0:A.map(xe=>xe==null?void 0:xe.id);J=[...$.cloneDeep(J),...$e],(J==null?void 0:J.length)>0&&(J!=null&&J.every(xe=>xe!==null&&xe))&&await Dr.batchDeleteInsofDataApi({ids:J});const oa=(Pe=ma.value)==null?void 0:Pe.find(xe=>(xe==null?void 0:xe.label)==="新建");await cu(!1,oa)}else if(d==="修改模板"){let wa=$.cloneDeep(qe).value;He.setRouteToChildPath(wa),Ne.setActiveMenuPath(wa+k)}else if(d==="执行")rt(d,v);else if(d==="导出paraform"){const wa=jo.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Ca=["推力","真空","压力","温度","流量"],A=yl=>{var Tl,Yl,Bl;return yl?typeof(yl==null?void 0:yl.value)=="string"?yl.value:((Bl=(Yl=(Tl=yl==null?void 0:yl._custom)==null?void 0:Tl.value)==null?void 0:Yl.value)==null?void 0:Bl.value)||"":""},J=Array.isArray(mr.value)?mr.value:[],$e=A(J.find(yl=>(yl==null?void 0:yl.condition)==="child")),oa=String($e||"").slice(0,8),xe=yl=>{if(yl==null)return"";const Tl=String(yl).trim();if(!Tl)return"";if(/^\d{8}$/.test(Tl))return Tl;const Yl=Tl.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Yl){const Gl=Yl[1],er=Yl[2].padStart(2,"0"),ql=Yl[3].padStart(2,"0");return`${Gl}${er}${ql}`}const Bl=Tl.replace(/\D/g,"");return Bl.length>=8?Bl.slice(0,8):""},ta=async yl=>{var Tl,Yl;if(!yl)return"";try{const Bl=await Kr("试验任务/任务管理",!1),Gl=(hr,tr=[])=>{if(!Array.isArray(hr))return tr;for(const ur of hr)(ur==null?void 0:ur.comp)==="Table"&&(ur!=null&&ur.name)&&tr.push(ur),Array.isArray(ur==null?void 0:ur.children)&&Gl(ur.children,tr),Array.isArray(ur==null?void 0:ur.tab)&&Gl(ur.tab,tr),Array.isArray(ur==null?void 0:ur.choice)&&Gl(ur.choice,tr);return tr},ql=Gl(Bl||[]).find(hr=>(hr==null?void 0:hr.name)==="任务列表"),fr=((Yl=(Tl=ql==null?void 0:ql.compData)==null?void 0:Tl.find(hr=>(hr==null?void 0:hr.key)==="tableContents"))==null?void 0:Yl.contents)||[];if(!Array.isArray(fr)||fr.length===0)return"";const qr=fr.find(hr=>String((hr==null?void 0:hr["试验代号(名称)"])||"").slice(0,8)===yl);return xe(qr==null?void 0:qr.计划试验时间)}catch(Bl){return console.warn("获取任务列表计划试验时间失败:",Bl),""}},Na=(qe.value||"").replace(/\/+$/,""),tl=$e?`${Na}/${$e}`:Na,Ya=await Kr(tl||qe.value,!1),ul=String(ha.value||"").trim(),dl=yl=>String(yl||"").trim(),Vl=(yl,Tl=[],Yl="")=>{if(!Array.isArray(yl))return Tl;for(const Bl of yl){const Gl=dl((Bl==null?void 0:Bl.choiceName)||(Bl==null?void 0:Bl.name0)||Yl);(Bl==null?void 0:Bl.comp)==="Table"&&(Bl==null?void 0:Bl.name)&&Ca.includes(Bl.name)&&(!ul||Gl===ul)&&Tl.push(Bl),Array.isArray(Bl==null?void 0:Bl.children)&&Vl(Bl.children,Tl,Gl),Array.isArray(Bl==null?void 0:Bl.tab)&&Vl(Bl.tab,Tl,Gl),Array.isArray(Bl==null?void 0:Bl.choice)&&Vl(Bl.choice,Tl,Gl)}return Tl},Ka=Vl(Ya||[]),vl=new Map;for(const yl of Ka)yl!=null&&yl.name&&!vl.has(yl.name)&&vl.set(yl.name,yl);const Va=Ca.map(yl=>vl.get(yl)).filter(Boolean);if(!Va||Va.length===0)return Ga.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const sl=yl=>{const Tl=new Map,Yl=(Bl,Gl=[])=>{if(Array.isArray(Bl))for(const er of Bl){const ql=((er==null?void 0:er.label)??"").toString().trim(),fr=ql?[...Gl,ql]:[...Gl];if(Array.isArray(er==null?void 0:er.children)&&er.children.length>0)Yl(er.children,fr);else{const hr=((er==null?void 0:er.prop)??"").toString();if(!hr)continue;const tr=ql||hr,ur=(fr.length>0?[...Gl,tr]:[tr]).join(".");Tl.set(hr,ur)}}};return Yl(yl,[]),Tl},Xa=(yl,Tl)=>{const Yl=sl(yl||[]),Gl=(ia.getAllLeafNodes(yl||[])||[]).filter(ql=>(ql==null?void 0:ql.prop)&&(ql==null?void 0:ql.type)!=="operate"&&(ql==null?void 0:ql.label)!=="操作"&&(ql==null?void 0:ql.prop)!=="operate"),er=Array.isArray(Tl)?Tl:[];return er.length===0?[]:er.map(ql=>{const fr={};return Gl.forEach(qr=>{const hr=String(qr.prop),tr=Yl.get(hr)||String(qr.label||qr.prop);fr[tr]=(ql==null?void 0:ql[hr])??""}),fr})},cl=Va.map(yl=>{var er,ql;const Tl=(yl==null?void 0:yl.compData)||[];let Yl=(er=Tl==null?void 0:Tl.find(fr=>(fr==null?void 0:fr.key)==="header"))==null?void 0:er.contents;Array.isArray(Yl==null?void 0:Yl[0])&&(Yl=Yl[0]);const Bl=((ql=Tl==null?void 0:Tl.find(fr=>(fr==null?void 0:fr.key)==="tableContents"))==null?void 0:ql.contents)||[];if(!Array.isArray(Yl)||Yl.length===0||!Array.isArray(Bl)||Bl.length===0)return null;const Gl=Xa(Yl||[],Bl||[]);return!Array.isArray(Gl)||Gl.length===0?null:{类型:yl==null?void 0:yl.name,数据:Gl}}).filter(Boolean);if(!cl||cl.length===0)return Ga.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const _l=await ta(oa),Nl={试验代号:oa,试验日期:_l,ParaForm:cl},xr=await ho().catch(()=>""),Il=await $.exportParaformApi(Nl,xr);if(((Xe=Il==null?void 0:Il.data)==null?void 0:Xe.code)===200&&((La=(va=Il==null?void 0:Il.data)==null?void 0:va.result)!=null&&La.Excel文件)){const yl=Il.data.result.Excel文件,Tl=await $.platformDownloadFile({url:yl}),Yl=new Blob([Tl.data],{type:"application/vnd.ms-excel"}),Bl=URL.createObjectURL(Yl),Gl=Pn.dayjs().format("YYYYMMDD"),ql=`${(oa||"UNKNOWN").trim()||"UNKNOWN"}_${Gl}_paraform.xls`,fr=document.createElement("a");fr.href=Bl,fr.download=ql,fr.style.display="none",document.body.appendChild(fr),fr.click(),setTimeout(()=>{document.body.removeChild(fr),URL.revokeObjectURL(Bl)},100);const qr=Array.isArray((sa=(qa=Il==null?void 0:Il.data)==null?void 0:qa.result)==null?void 0:sa.warnings)?Il.data.result.warnings:[];if(qr.length>0){const hr=qr.map((tr,ur)=>`${ur+1}. ${(tr==null?void 0:tr.field)||"未知字段"}:${(tr==null?void 0:tr.message)||""}`).join(`
|
|
24
|
-
`);Ga.ElMessage.warning({message:`导出成功,但存在以下提示:
|
|
25
|
-
${hr}`,duration:5e3,showClose:!0})}else Ga.ElMessage.success("导出成功")}else Ga.ElMessage.error(((Qa=Il==null?void 0:Il.data)==null?void 0:Qa.message)||"导出失败")}catch(Ca){console.error("导出paraform失败:",Ca),Ga.ElMessage.error("导出失败:"+((Ca==null?void 0:Ca.message)||"未知错误"))}finally{wa.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ga=ir.value)==null?void 0:ga.length)===0)return Ga.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((Fa=we.value)==null?void 0:Fa.length)===0)return Ga.ElMessage.warning("暂无数据导出");let wa=["序号",...(Ea=(he=de.value)==null?void 0:he.map($e=>$e==null?void 0:$e.prop))==null?void 0:Ea.filter($e=>$e!=="操作")],Ca=d==="导出全部"?we.value:ir.value;const A=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Ca=Ca==null?void 0:Ca.map($e=>Object.fromEntries(Object.entries($e).filter(([oa])=>!A.includes(oa)))),wa=["序号",...wa],Ca=Ca==null?void 0:Ca.map(($e,oa)=>({序号:oa+1,...$e}));let J=(u==null?void 0:u.compName)||"表格信息";ji(Ca,J,wa,J)}else if(d==="OCR识别")Da.value=!0,al.value=[],ke.value=1,Ta.value.clear(),Ge.value.clear(),X.value=0;else if(d==="迁移")t.selectRow=v,t.show=!0;else if(d==="生成方法"){let wa=await Gf(v),Ca;v!==""?Ca=[v]:Ca=$.cloneDeep(we.value),Ca=Ca==null?void 0:Ca.map(J=>(J.输出值=wa,J));const A={fixContent:Ca,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:de.value,name:u==null?void 0:u.groupNames};Be("change",A)}else if(((ca=T==null?void 0:T.extra)==null?void 0:ca.type)==="methodButton"){let wa;v!==""?wa=[v]:wa=$.cloneDeep(we.value);const A={fixContent:await gt(wa,de==null?void 0:de.value,"Manual",we.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:de.value,name:u==null?void 0:u.groupNames};Be("change",A)}}},tu=async(d,v)=>{var T,I,F,B,oe,ie,K,_e,Ce,je,Pe,Xe,va,La,qa,sa,Qa,ga,Fa,he;try{let Ea,ca;const wa=(T=fe.value[qe.value+k])==null?void 0:T.filter(Na=>{var tl;return((tl=Na==null?void 0:Na.key)==null?void 0:tl.type)==="structureMethod"}),Ca=(I=fe.value[qe.value+k])==null?void 0:I.filter(Na=>{var tl;return((tl=Na==null?void 0:Na.key)==null?void 0:tl.type)==="structure"}),A=wa==null?void 0:wa.find(Na=>{var tl,Ya;return((Ya=(tl=Na==null?void 0:Na.value)==null?void 0:tl.pageData)==null?void 0:Ya.method)==="保存"});if(!A)return;const J=(ie=(oe=fe.value[(B=(F=A==null?void 0:A.value)==null?void 0:F.pageData)==null?void 0:B.path])==null?void 0:oe.filter(Na=>{var tl;return((tl=Na==null?void 0:Na.key)==null?void 0:tl.type)==="data"}))==null?void 0:ie.find(Na=>{var tl,Ya,ul,dl;return((Ya=(tl=Na==null?void 0:Na.value)==null?void 0:tl.tableData)==null?void 0:Ya.算法名称)===((dl=(ul=A==null?void 0:A.value)==null?void 0:ul.pageData)==null?void 0:dl.method)});if(!J)return;const $e={buttonName:(_e=(K=A==null?void 0:A.value)==null?void 0:K.pageData)==null?void 0:_e.method,api:(je=(Ce=J==null?void 0:J.value)==null?void 0:Ce.tableData)==null?void 0:je.算法体,content:Ca==null?void 0:Ca.map(Na=>{var tl;return(tl=Na==null?void 0:Na.value)==null?void 0:tl.pageData}),extraContent:[],extraValues:(Xe=(Pe=A==null?void 0:A.value)==null?void 0:Pe.pageData)==null?void 0:Xe.data,methodName:(La=(va=A==null?void 0:A.value)==null?void 0:va.pageData)==null?void 0:La.path};if(!d)return;const oa={...d,compData:(qa=d==null?void 0:d.compData)==null?void 0:qa.map(Na=>{var tl;return(Na==null?void 0:Na.key)==="formContent"?{...Na,contents:(tl=Na==null?void 0:Na.contents)==null?void 0:tl.map(Ya=>(Ya==null?void 0:Ya.prop)===v?{...Ya,value:""}:Ya)}:Na})},xe={key:{pageKey:qe.value+k,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:oa}},ta=await Ga.axios.post($e.api,xe,{headers:{"Content-Type":"application/json"}});return((sa=ta==null?void 0:ta.data)==null?void 0:sa.code)===200&&(Ea=(ga=(Qa=ta==null?void 0:ta.data)==null?void 0:Qa.result)==null?void 0:ga.latestReportCode,ca=(he=(Fa=ta==null?void 0:ta.data)==null?void 0:Fa.result)==null?void 0:he.status),{newMainKeyValue:Ea,newStatus:ca}}catch(Ea){throw Ga.ElMessage.error(Ea),new Error(Ea)}},Mt=a.reactive({prop:"状态",value:""});a.ref(["系统自动生成信息","审批意见"]);const su=async(d,v,T)=>{var K,_e;let I=d==null?void 0:d[v==null?void 0:v.prop],F=1,B,oe;const ie=$.cloneDeep(qe).value+k+I;if(ie){Mt.value="",B=(K=fe.value[ie])==null?void 0:K.filter(Pe=>{var Xe;return((Xe=Pe==null?void 0:Pe.key)==null?void 0:Xe.type)==="structure"});const Ce=B==null?void 0:B.find(Pe=>{var Xe,va,La;return((La=(va=(Xe=Pe==null?void 0:Pe.value)==null?void 0:Xe.pageData)==null?void 0:va.comp)==null?void 0:La.toUpperCase())==="FORM"});oe={...(_e=Ce==null?void 0:Ce.value)==null?void 0:_e.pageData,id:Ce==null?void 0:Ce.id};const je=await tu(oe,v==null?void 0:v.prop);if(Mt.value=je==null?void 0:je.newStatus,je!=null&&je.newMainKeyValue)return je==null?void 0:je.newMainKeyValue}if(we.value.some(Ce=>(Ce==null?void 0:Ce[v==null?void 0:v.prop])===I)){const Ce=I;for(;we.value.some(je=>(je==null?void 0:je[v==null?void 0:v.prop])===`${Ce}(${F})`);)F++;I=`${Ce}(${F})`}return I},cu=async(d,v,T)=>{var B,oe,ie,K;let I,F;if(await su(T==null?void 0:T.data,T==null?void 0:T.firstCol),I=$.cloneDeep(qe).value+k,F=$.cloneDeep(I)+`loading${((B=Ll.value)==null?void 0:B.account)||((oe=Ll.value)==null?void 0:oe.账号)}`,v){const _e=(K=(ie=fe.value[F])==null?void 0:ie.filter(Ce=>{var je;return((je=Ce==null?void 0:Ce.key)==null?void 0:je.parentTable)===""}))==null?void 0:K.map(Ce=>{var je;return{id:Ce==null?void 0:Ce.id,...(je=Ce==null?void 0:Ce.value)==null?void 0:je.pageData}});(_e==null?void 0:_e.length)>0||await ia.loadingConstruct(I,F,null,null,null),He.setRouteToChildPath($.cloneDeep(qe).value),Ne.setActiveMenuPath(F)}else He.setRouteToChildPath($.cloneDeep(qe).value),Ne.setActiveMenuPath(F)},uu=()=>{Ee.value=!1,ka.value=[],Ve.value=!1},$o=d=>{var B,oe,ie,K,_e,Ce,je,Pe,Xe,va,La,qa,sa,Qa,ga,Fa,he,Ea,ca,wa,Ca;const v=[];ce.value=$.cloneDeep(de.value),(oe=ia.getColumnChild((B=$.cloneDeep(de.value))==null?void 0:B.filter(A=>(A==null?void 0:A.label)!=="操作")))==null||oe.forEach((A,J)=>{var $e,oa,xe;A!=null&&A.formType&&(($e=A==null?void 0:A.formType)==null?void 0:$e.toUpperCase())==="SELECT"||A!=null&&A.menuId?v.push({label:(oa=A==null?void 0:A.prop)!=null&&oa.includes(".")?A==null?void 0:A.prop:(A==null?void 0:A.label)??(A==null?void 0:A.prop)??"",name:(A==null?void 0:A.prop)??"t"+J,prop:A==null?void 0:A.prop,type:"Select",value:(d==null?void 0:d[A==null?void 0:A.prop])??(A==null?void 0:A.value)??"",id:(A==null?void 0:A.id)??J,contents:(A==null?void 0:A.options)??[],multiple:(A==null?void 0:A.multiple)??!1,width:1,isFormColHidden:A==null?void 0:A.isFormColHidden,relatedValueId:A==null?void 0:A.relatedValueId,disabled:A==null?void 0:A.disabled,menus:A==null?void 0:A.menus,groups:A==null?void 0:A.groups,words:A==null?void 0:A.words,allSelectionContents:(A==null?void 0:A.allSelectionContents)??[],filterContent:A==null?void 0:A.filterContent,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled,filter:A==null?void 0:A.filter,bindMenus:A==null?void 0:A.bindMenus,isMainPath:A==null?void 0:A.isMainPath,required:(A==null?void 0:A.required)??!1,relatedContents:A==null?void 0:A.relatedContents,mainKey:A==null?void 0:A.mainKey,relatedContents:A==null?void 0:A.relatedContents,functionName:A==null?void 0:A.functionName,functionRelatedWords:A==null?void 0:A.functionRelatedWords,calculatorFilter:A==null?void 0:A.calculatorFilter}):v.push({label:(xe=A==null?void 0:A.prop)!=null&&xe.includes(".")?A==null?void 0:A.prop:(A==null?void 0:A.label)??(A==null?void 0:A.prop)??"",prop:A==null?void 0:A.prop,name:(A==null?void 0:A.prop)??"t"+J,type:!(A!=null&&A.formType)||(A==null?void 0:A.formType)===""?"Input":A==null?void 0:A.formType,value:(A==null?void 0:A.formType)==="Upload"?(d==null?void 0:d[A==null?void 0:A.prop])??"{}":(d==null?void 0:d[A==null?void 0:A.prop])??(A==null?void 0:A.value)??"",id:(A==null?void 0:A.id)??J,contents:(A==null?void 0:A.options)??[],multiple:(A==null?void 0:A.multiple)??!1,width:1,isFormColHidden:A==null?void 0:A.isFormColHidden,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled,relatedValueId:A==null?void 0:A.relatedValueId,menus:A==null?void 0:A.menus,groups:A==null?void 0:A.groups,words:A==null?void 0:A.words,filter:A==null?void 0:A.filter,bindMenus:A==null?void 0:A.bindMenus,isMainPath:A==null?void 0:A.isMainPath,required:(A==null?void 0:A.required)??!1,relatedContents:A==null?void 0:A.relatedContents,mainKey:A==null?void 0:A.mainKey,relatedContents:A==null?void 0:A.relatedContents,functionName:A==null?void 0:A.functionName,functionRelatedWords:A==null?void 0:A.functionRelatedWords,calculatorFilter:A==null?void 0:A.calculatorFilter})}),d===""||!d||(_a.value=(d==null?void 0:d.id)??"");let T=ia.getColumnChild((ie=$.cloneDeep(de.value))==null?void 0:ie.filter(A=>(A==null?void 0:A.label)!=="操作"));fa.value&&((K=fa.value)==null?void 0:K.length)>0&&(fa.value=(_e=$.cloneDeep(fa).value)==null?void 0:_e.map(A=>{var $e;let J=(A==null?void 0:A.prop)||(($e=T==null?void 0:T.find(oa=>(oa==null?void 0:oa.label)===(A==null?void 0:A.label)))==null?void 0:$e.prop);return J&&(A.value=d[J]),A})),Ha.value=fa.value&&((Ce=fa.value)==null?void 0:Ce.length)>0?ia.getTableFormToForm(fa.value):v,Ha.value=((je=Ha.value)==null?void 0:je.map(A=>({...A,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled})))??Ha.value;let I=[],F=((va=(Xe=(Pe=u.itemData)==null?void 0:Pe.filter(A=>(A==null?void 0:A.key)==="filter"))==null?void 0:Xe[0])==null?void 0:va.contents)??"";if(F=la.analyzeSplitToContent(F,","),(F==null?void 0:F.length)>0&&(I=F.flat()),(I==null?void 0:I.length)>0){let A=I==null?void 0:I.filter(ta=>ta==null?void 0:ta.includes("@Type"));if(A=A==null?void 0:A[(A==null?void 0:A.length)-1],(A==null?void 0:A[(A==null?void 0:A.length)-1])===","&&(A=A==null?void 0:A.slice(0,(A==null?void 0:A.length)-1)),A){let ta=(qa=(La=A==null?void 0:A.replace("=",S))==null?void 0:La.split(S))==null?void 0:qa[1];((sa=ta==null?void 0:ta.trim())==null?void 0:sa.toUpperCase())==="MANUAL"&&(u==null||u.index,Ha.value=(Qa=Ha.value)==null?void 0:Qa.map((Na,tl)=>Na))}let J=(ga=Ha.value)==null?void 0:ga.filter(ta=>ta==null?void 0:ta.mainKey),$e;J==null||J.forEach(ta=>{var tl;if($e!==void 0)return;let Na=ta==null?void 0:ta.menus;((tl=J==null?void 0:J.filter(Ya=>Ya==null?void 0:Ya.mainKey))==null?void 0:tl.length)>1&&($e=Na,ta==null||ta.groups)});let oa=[],xe=new Map;if(J==null||J.forEach(ta=>{var Na,tl,Ya,ul,dl,Vl,Ka,vl,Va,sl,Xa,cl,_l;if((Na=ta==null?void 0:ta.prop)!=null&&Na.includes(".")){let Nl=[];xe.get(((Ya=(tl=ta==null?void 0:ta.prop)==null?void 0:tl.split("."))==null?void 0:Ya[0])+(ta!=null&&ta.isMainPath?0:1)+((ul=ta==null?void 0:ta.groups)==null?void 0:ul[0]))&&(Nl=xe.get(((Vl=(dl=ta==null?void 0:ta.prop)==null?void 0:dl.split("."))==null?void 0:Vl[0])+(ta!=null&&ta.isMainPath?0:1)+((Ka=ta==null?void 0:ta.groups)==null?void 0:Ka[0]))),Nl.push(ta),xe.set(((Va=(vl=ta==null?void 0:ta.prop)==null?void 0:vl.split("."))==null?void 0:Va[0])+(ta!=null&&ta.isMainPath?0:1)+((sl=ta==null?void 0:ta.groups)==null?void 0:sl[0]),Nl)}else{let Nl=[];xe.get("normal"+(ta!=null&&ta.isMainPath?0:1)+((Xa=ta==null?void 0:ta.groups)==null?void 0:Xa[0]))&&(Nl=xe.get("normal"+(ta!=null&&ta.isMainPath?0:1)+((cl=ta==null?void 0:ta.groups)==null?void 0:cl[0]))),Nl.push(ta),xe.set("normal"+(ta!=null&&ta.isMainPath?0:1)+((_l=ta==null?void 0:ta.groups)==null?void 0:_l[0]),Nl)}}),oa=Array.from(xe.values()),(oa==null?void 0:oa.length)>0)for(let ta in oa){let Na=oa==null?void 0:oa[ta];if((Na==null?void 0:Na.length)!==1){if((Na==null?void 0:Na.length)>1){let tl=Na==null?void 0:Na.map(sl=>sl==null?void 0:sl.prop),Ya=Na==null?void 0:Na.map(sl=>sl==null?void 0:sl.label),ul=Na==null?void 0:Na.map(sl=>sl==null?void 0:sl.value),dl=(Fa=$.cloneDeep(Na))==null?void 0:Fa[0],Vl=(he=Ha.value)==null?void 0:he.findIndex(sl=>(sl==null?void 0:sl.prop)===(dl==null?void 0:dl.prop)),Ka=(Ea=Ha.value)==null?void 0:Ea.slice(0,Vl),vl=(wa=Ha.value)==null?void 0:wa.slice(Vl,(ca=Ha.value)==null?void 0:ca.length);dl.label=Ya==null?void 0:Ya.join("·"),dl.value=ul==null?void 0:ul.join(" "),dl.value.trim()===""&&(dl.value=""),dl.prop=tl==null?void 0:tl.join("·");let Va=Na==null?void 0:Na.map(sl=>{var Xa;return(Xa=sl==null?void 0:sl.words)==null?void 0:Xa.join(".")});dl.relatedWords=Va,dl.usingType="parent",vl.unshift(dl),Ha.value=[...Ka,...vl],Ha.value=(Ca=Ha.value)==null?void 0:Ca.map(sl=>(tl!=null&&tl.find(Xa=>Xa===(sl==null?void 0:sl.prop))&&(sl.isFormColHidden=!0,sl.relatedWords=Va),sl))}}}}},du=()=>{var v;const d=(v=s.value)==null?void 0:v.$el;d&&la.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:T=>{var oe;const{oldIndex:I,newIndex:F}=T;if(I===F)return;const B=Dn.value.splice(I,1)[0];Dn.value.splice(F,0,B),de.value=(oe=de.value)==null?void 0:oe.slice().sort((ie,K)=>{if(ie.label==="操作")return 1;if(K.label==="操作")return-1;const _e=Dn.value.findIndex(je=>je.label===ie.label),Ce=Dn.value.findIndex(je=>je.label===K.label);return _e-Ce})}})};a.onMounted(()=>{za.value=window.innerWidth-240*2,window.addEventListener("keydown",Qo)});const pu=()=>{a.nextTick(()=>{du()})},it=(d,v)=>{var I;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let T;return d.children=(I=d.children)==null?void 0:I.map(F=>{var B,oe;if((F==null?void 0:F.id)===_a.value){let ie={};for(let K in F){let _e=(B=v==null?void 0:v.find(Ce=>(Ce==null?void 0:Ce.prop)===K))==null?void 0:B.label;_e?ie[K]=(oe=cr.value)==null?void 0:oe[_e]:ie[K]=F[K]??""}F=Object.assign(ie,cr.value),T=F}else{let ie=it(F,v);F=ie==null?void 0:ie.contents,T=ie==null?void 0:ie.currentSelectContents}return F}),{contents:d,currentSelectContents:T}},It=(d,v)=>{let T,I;return d!=null&&d.find(F=>(F==null?void 0:F.id)===_a.value)?T=d==null?void 0:d.map(F=>{var B,oe,ie;if((F==null?void 0:F.id)===_a.value){let K={};for(let Ce in F){let je=(B=v==null?void 0:v.find(Pe=>(Pe==null?void 0:Pe.prop)===Ce))==null?void 0:B.label;je?K[Ce]=((oe=cr.value)==null?void 0:oe[je])??"":K[Ce]=F[Ce]??""}let _e=cr.value;for(let Ce in K)(ie=cr.value)!=null&&ie[Ce]||(_e[Ce]=(K==null?void 0:K[Ce])??"");F=_e,I=F}return F}):T=d==null?void 0:d.map(F=>{var B,oe,ie,K;if((F==null?void 0:F.id)===_a.value){let _e={};for(let Ce in F){let je=(B=v==null?void 0:v.find(Pe=>(Pe==null?void 0:Pe.prop)===Ce))==null?void 0:B.label;je?_e[Ce]=(oe=cr.value)==null?void 0:oe[je]:_e[Ce]=F[Ce]??""}F=Object.assign(_e,cr.value),I=F}else F=(ie=it(F,v))==null?void 0:ie.contents,I=(K=it(F,v))==null?void 0:K.currentSelectContents;return F}),{newContents:T,currentSelectContents:I}},Ot=(d,v,T)=>{var I,F;return d[v==null?void 0:v.prop]=T,typeof d.id=="number"&&(d.id=(I=d.id)==null?void 0:I.toString()),d.children&&((F=d.children)==null?void 0:F.length)>0&&(d.children=d.children.map(Ot)),d},Lt=d=>{var T;const v=[];return v.push({...d}),d!=null&&d.children&&Array.isArray(d.children)&&((T=d.children)==null||T.forEach(I=>{v.push(...Lt(I))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(I=>{const F={...I};return delete F.children,F}):[]},di=["Pacific6000数据采集装置.通道号","通道号"],Ro=d=>{if(!d)return"";const v=di.map(T=>d==null?void 0:d[T]).find(T=>T!=null&&String(T).trim()!=="");return v==null?"":String(v).trim()},tt=async(d,v=void 0)=>{if(!d)return!1;try{const T=Xe=>{var va,La,qa;return Xe?typeof(Xe==null?void 0:Xe.value)=="string"?Xe.value:((qa=(La=(va=Xe==null?void 0:Xe._custom)==null?void 0:va.value)==null?void 0:La.value)==null?void 0:qa.value)||"":""},I=Array.isArray(mr.value)?mr.value:[],F=T(I.find(Xe=>(Xe==null?void 0:Xe.condition)==="child")),B=(qe.value||"").replace(/\/+$/,""),oe=F?`${B}/${F}`:B,ie=await Kr(oe||qe.value,!1),K=String(ha.value||"").trim(),_e=Xe=>String(Xe||"").trim(),Ce=(Xe,va=[],La="")=>{if(!Array.isArray(Xe))return va;for(const qa of Xe){const sa=_e((qa==null?void 0:qa.choiceName)||(qa==null?void 0:qa.name0)||La);(qa==null?void 0:qa.comp)==="Table"&&(!K||sa===K)&&va.push(qa),Array.isArray(qa==null?void 0:qa.children)&&Ce(qa.children,va,sa),Array.isArray(qa==null?void 0:qa.tab)&&Ce(qa.tab,va,sa),Array.isArray(qa==null?void 0:qa.choice)&&Ce(qa.choice,va,sa)}return va},je=Ce(ie||[]),Pe=String((u==null?void 0:u.compName)||"");return je.some(Xe=>{var La,qa;const va=((qa=(La=Xe==null?void 0:Xe.compData)==null?void 0:La.find(sa=>(sa==null?void 0:sa.key)==="tableContents"))==null?void 0:qa.contents)||[];return!Array.isArray(va)||va.length===0?!1:va.some(sa=>{if(String((Xe==null?void 0:Xe.name)||"")===Pe&&(sa==null?void 0:sa.id)===v)return!1;const ga=Ro(sa);return!!ga&&ga===d})})}catch{return(we.value||[]).some(I=>{if((I==null?void 0:I.id)===v)return!1;const F=Ro(I);return!!F&&F===d})}},Vo=async(d=!0,v,T)=>{var _e,Ce,je,Pe,Xe,va,La,qa,sa,Qa,ga,Fa,he,Ea,ca,wa,Ca,A,J,$e,oa,xe,ta,Na,tl,Ya,ul,dl,Vl,Ka,vl;if(cr.value){const Va=(Ce=ia.getColumnChild((_e=$.cloneDeep(de.value))==null?void 0:_e.filter(Xa=>(Xa==null?void 0:Xa.label)!=="操作")))==null?void 0:Ce.filter(Xa=>(Xa==null?void 0:Xa.required)===!0);for(let Xa=0;Xa<((Va==null?void 0:Va.length)??0);Xa++){const cl=Va[Xa],_l=cl==null?void 0:cl.prop,Nl=(cl==null?void 0:cl.label)??_l,xr=(je=cr.value)==null?void 0:je[_l];if(xr===""||xr===null||xr===void 0||Array.isArray(xr)&&xr.length===0){Ga.ElMessage.error(`${Nl}不能为空`);return}}const sl=Ro(cr.value);if(sl&&await tt(sl,_a.value||void 0)){Ga.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let I=ia.getColumnChild((Pe=$.cloneDeep(de.value))==null?void 0:Pe.filter(Va=>(Va==null?void 0:Va.label)!=="操作")),F,B=$.cloneDeep(we.value);if(!cr.value){Ue.value=!1;return}if(_a.value===""){x.value++;let Va;Va={id:x.value.toString()};try{Va.sort=Ln(0,we.value||[])}catch{}Va!=null&&Va.children&&(Va={...Va,children:(Xe=Va.children)==null?void 0:Xe.map(Xa=>Ot(Xa,v,T))});const sl=Object.assign(cr.value,Va);B.unshift(sl),F=sl}else B=(va=It(B,I))==null?void 0:va.newContents,F=(La=It(B,I))==null?void 0:La.currentSelectContents;const oe=(qa=u.itemData)==null?void 0:qa.filter(Va=>(Va==null?void 0:Va.key)==="childTree")[0];if(((sa=oe==null?void 0:oe.contents)==null?void 0:sa.length)>0){ne.value="编辑";const Va=[];B==null||B.forEach((cl,_l)=>{var xr;let Nl={};if(Array.isArray(cl)){let Il=[];cl==null||cl.filter(yl=>!(yl!=null&&yl.id)).forEach((yl,Tl)=>{var Yl,Bl,Gl,er,ql,fr,qr;if((Bl=(Yl=Lr.value)==null?void 0:Yl[Tl])!=null&&Bl.prop&&!Array.isArray(yl)){let hr={};hr[Lr.value[Tl].column]=yl,Ia!=null&&Ia.value&&((Gl=Ia==null?void 0:Ia.value)==null?void 0:Gl.length)>0&&((er=Ia==null?void 0:Ia.value)!=null&&er.find(tr=>JSON.stringify(tr==null?void 0:tr[0])===JSON.stringify(hr)))&&(Il=(ql=Ia==null?void 0:Ia.value)==null?void 0:ql.find(tr=>JSON.stringify(tr==null?void 0:tr[0])===JSON.stringify(hr))),Il&&Il.length>0?Nl[Lr.value[Tl].prop]=Il!=null&&Il.find(tr=>{var ur;return((ur=Object.keys(tr))==null?void 0:ur[0])===Lr.value[Tl].column})?(fr=Il==null?void 0:Il.find(tr=>{var ur;return((ur=Object.keys(tr))==null?void 0:ur[0])===Lr.value[Tl].column}))==null?void 0:fr[Lr.value[Tl].column]:yl:Nl[Lr.value[Tl].prop]=yl}else Array.isArray(yl)&&((qr=Lr.value[Tl])!=null&&qr.prop?Nl[Lr.value[Tl].prop]=yl:Nl.children=bt(yl,Lr.value))})}else Nl=cl;if(Array.isArray(cl)&&cl.some(Il=>Il==null?void 0:Il.id)){const Il=(xr=cl==null?void 0:cl.find(yl=>yl.id))==null?void 0:xr.id;Va.push(Object.assign(Nl,{id:ii(Il)}))}else Nl.id?Va.push(Nl):Va.push(Object.assign(Nl,{id:_l.toString()}))});const sl=(we.value||[]).map(cl=>String(cl==null?void 0:cl.id)),Xa=ti(Va,sl);we.value=Ft(Xa,oe,de.value)}Rt(we.value),Yr.value=we.value;const ie=zf(Yr.value,gn.value,B);let K=[];if(V.value?(K=(Qa=$.cloneDeep(V).value.singleContent)==null?void 0:Qa.filter(Va=>(Va==null?void 0:Va.id)!==(F==null?void 0:F.id)),K.push(F)):K=[F],Al.value){const Va={content:ie,singleContent:((ga=oe==null?void 0:oe.contents)==null?void 0:ga.length)>0?K==null?void 0:K.flatMap(Lt):K,index:u==null?void 0:u.index,buttonName:"编辑",column:de.value,parentTableId:u==null?void 0:u.parentTableId};He.setCacheUpdatingData(Va)}if((Fa=de.value)==null||Fa.forEach(Va=>{(Va==null?void 0:Va.formType)==="Upload"&&(F[Va.prop]=F[Va.prop]===""?"{}":typeof F[Va.prop]!="string"?JSON.stringify(F[Va.prop]):F[Va.prop])}),d){(wa=(ca=(Ea=(he=u.itemData)==null?void 0:he.find(Xa=>(Xa==null?void 0:Xa.key)==="filterAllType"))==null?void 0:Ea.value)==null?void 0:ca.find(Xa=>(Xa==null?void 0:Xa.value)==="onConditionContents"))==null||wa.content;let Va=(Ca=u.itemData)==null?void 0:Ca.filter(Xa=>(Xa==null?void 0:Xa.key)==="filterAllType");Va=Array.from(new Map(Va.filter(Boolean).map((Xa,cl)=>[Xa.value,{...Xa,_idx:cl}])).values()).sort((Xa,cl)=>Xa._idx-cl._idx).map(({_idx:Xa,...cl})=>cl),Va=(A=Va==null?void 0:Va[(Va==null?void 0:Va.length)-1])==null?void 0:A.value;const sl={fixContent:[F],buttonName:ne.value,relatedContents:u==null?void 0:u.related,columns:de.value,name:u==null?void 0:u.groupNames};He.setTableLoading(u==null?void 0:u.index),Ue.value=!1,cr.value=void 0,Be("change",sl)}if((oa=($e=(J=Ha.value)==null?void 0:J[0])==null?void 0:$e.optionUrl)!=null&&oa.menuId){Ue.value=!1;let Va=(xe=u.itemData)==null?void 0:xe.filter(sl=>(sl==null?void 0:sl.key)==="filterAllType");if((Va==null?void 0:Va.length)>0){let sl=Va==null?void 0:Va.map(_l=>_l==null?void 0:_l.value),Xa=(tl=(Na=(ta=sl.flat().find(_l=>{var Nl;return(Nl=_l==null?void 0:_l.content)==null?void 0:Nl.includes("@Num")}))==null?void 0:ta.content)==null?void 0:Na.split(":"))==null?void 0:tl[1];((dl=(ul=(Ya=sl.flat().find(_l=>{var Nl;return(Nl=_l==null?void 0:_l.content)==null?void 0:Nl.includes("@Type:")}))==null?void 0:Ya.content)==null?void 0:ul.split(":"))==null?void 0:dl[1])!=="Manual"&&(Xa=parseInt(Xa),we.value=(vl=we.value)==null?void 0:vl.slice(((Vl=we.value)==null?void 0:Vl.length)-Xa,(Ka=we.value)==null?void 0:Ka.length))}}};a.onUnmounted(()=>{window.removeEventListener("keydown",Qo),de.value=[],we.value=[],ce.value=[],da.value=[],fa.value=[],Oa.value=[],ka.value=[],ua.value=[],Ha.value=[],ir.value=[],s.value=null,Mn.value=""});const pi=async(d,v,T)=>{var Xe,va,La,qa,sa,Qa,ga,Fa,he,Ea,ca,wa,Ca;Pl.value=(T==null?void 0:T.prop)??(T==null?void 0:T.property);const I=$.cloneDeep(u.itemData),F=((Xe=I==null?void 0:I.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:Xe.contents)??[];let B=F==null?void 0:F.find((A,J)=>{var $e,oa,xe;return(A==null?void 0:A.prop)===Pl.value||(A==null?void 0:A.label)===Pl.value||(J==null?void 0:J.toString())===((xe=(oa=($e=Pl.value)==null?void 0:$e.split("a"))==null?void 0:oa[1])==null?void 0:xe.toString())});const oe=ia.getColumnChild((va=$.cloneDeep(de.value))==null?void 0:va.filter(A=>(A==null?void 0:A.label)!=="操作"));if(B||(B=oe==null?void 0:oe.find(A=>(A==null?void 0:A.prop)===Pl.value||(A==null?void 0:A.label)===Pl.value)),B&&!((La=B==null?void 0:B.menus)!=null&&La.length)&&!((qa=B==null?void 0:B.groups)!=null&&qa.length)&&!((sa=B==null?void 0:B.words)!=null&&sa.length)){const A=(Qa=Ha.value)==null?void 0:Qa.find(J=>(J==null?void 0:J.prop)===Pl.value);A&&(B={...B,menus:(A==null?void 0:A.menus)??(B==null?void 0:B.menus),groups:(A==null?void 0:A.groups)??(B==null?void 0:B.groups),words:(A==null?void 0:A.words)??(B==null?void 0:B.words),bindMenus:(A==null?void 0:A.bindMenus)??(B==null?void 0:B.bindMenus),isMainPath:(A==null?void 0:A.isMainPath)??(B==null?void 0:B.isMainPath),relatedContents:(A==null?void 0:A.relatedContents)??(B==null?void 0:B.relatedContents),endChildMenu:(A==null?void 0:A.endChildMenu)??(B==null?void 0:B.endChildMenu)})}if(B&&((ga=Ha==null?void 0:Ha.value)==null||ga.forEach(A=>{var J,$e,oa,xe,ta;(A==null?void 0:A.prop)===(B==null?void 0:B.prop)&&(A!=null&&A.endChildMenu)&&((J=B==null?void 0:B.prop)!=null&&J.includes(".")&&((oa=($e=B==null?void 0:B.prop)==null?void 0:$e.split("."))==null?void 0:oa[0])!==((ta=(xe=A==null?void 0:A.prop)==null?void 0:xe.split("."))==null?void 0:ta[0])?B.endChildMenu=A==null?void 0:A.value:B.endChildMenu=A==null?void 0:A.endChildMenu)})),!B)return;const ie=Pl.value,K=(Fa=we.value)==null?void 0:Fa.findIndex(A=>(A==null?void 0:A.id)===(v==null?void 0:v.id));K!==-1&&ie&&(we.value[K]={...we.value[K],[ie]:d});const _e=A=>{Array.isArray(A)&&A.forEach(J=>{Array.isArray(J==null?void 0:J.allSelectionContents)&&J.allSelectionContents.length>0&&(J.contactValue=we.value[K]??v),Array.isArray(J==null?void 0:J.children)&&J.children.length>0&&_e(J.children)})};_e(de.value),B.value=d,B.endChildMenu=B.endChildMenu||"";let Ce=B!=null&&B.isMainPath&&(B!=null&&B.mainKey)?B==null?void 0:B.value:"";const je=A=>{Array.isArray(A)&&A.forEach(J=>{var oa,xe;if(((J==null?void 0:J.type)==="Select"||(J==null?void 0:J.formType)&&J.formType.toUpperCase()==="SELECT"||(J==null?void 0:J.columnType)&&J.columnType.toUpperCase()==="SELECT")&&Array.isArray(J==null?void 0:J.menus)&&J.menus.length>0&&J.menus[J.menus.length-1]===""&&(B!=null&&B.isMainPath)&&(B!=null&&B.mainKey)){const ta=(oa=J==null?void 0:J.prop)!=null&&oa.includes(".")?J.prop.split(".")[0]:null,Na=(xe=B==null?void 0:B.prop)!=null&&xe.includes(".")?B.prop.split(".")[0]:null;(!ta||!Na||ta===Na)&&(J.endChildMenu=Ce)}Array.isArray(J==null?void 0:J.children)&&J.children.length>0&&je(J.children)})};if(je(de.value),!!(B!=null&&B.mainKey)&&Array.isArray(B==null?void 0:B.menus)&&(B==null?void 0:B.menus.length)>0&&(B!=null&&B.value)&&(B==null?void 0:B.value)!==""){let A=B!=null&&B.relatedContents&&((he=B==null?void 0:B.relatedContents)==null?void 0:he.length)>0?(Ea=B==null?void 0:B.relatedContents)==null?void 0:Ea.find(J=>{var $e,oa,xe,ta;return(J==null?void 0:J[(ta=($e=B==null?void 0:B.prop)==null?void 0:$e.split("."))==null?void 0:ta[((xe=(oa=B==null?void 0:B.prop)==null?void 0:oa.split("."))==null?void 0:xe.length)-1]])===(B==null?void 0:B.value)}):await ds(B);if(A){const J={...v};oe==null||oe.forEach($e=>{var oa,xe,ta,Na,tl,Ya,ul,dl,Vl,Ka,vl,Va,sl,Xa,cl,_l;($e==null?void 0:$e.prop)!==(B==null?void 0:B.prop)&&(B!=null&&B.relatedContents&&((oa=B==null?void 0:B.relatedContents)==null?void 0:oa.length)>0?(xe=$e==null?void 0:$e.prop)!=null&&xe.includes(".")&&((Na=(ta=$e==null?void 0:$e.prop)==null?void 0:ta.split("."))==null?void 0:Na[0])===((Ya=(tl=B==null?void 0:B.prop)==null?void 0:tl.split("."))==null?void 0:Ya[0])?J[$e.prop]=A[(Ka=(ul=$e==null?void 0:$e.prop)==null?void 0:ul.split("."))==null?void 0:Ka[((Vl=(dl=$e==null?void 0:$e.prop)==null?void 0:dl.split("."))==null?void 0:Vl.length)-1]]??J[$e.prop]:J[$e.prop]=(A==null?void 0:A[$e.prop])??J[$e.prop]:la.same((B==null?void 0:B.menus)??[],($e==null?void 0:$e.menus)??[])&&la.same((B==null?void 0:B.groups)??[],($e==null?void 0:$e.groups)??[])&&!la.same((B==null?void 0:B.words)??[],($e==null?void 0:$e.words)??[])?(vl=$e==null?void 0:$e.prop)!=null&&vl.includes(".")&&((sl=(Va=$e==null?void 0:$e.prop)==null?void 0:Va.split("."))==null?void 0:sl[0])!==((cl=(Xa=B==null?void 0:B.prop)==null?void 0:Xa.split("."))==null?void 0:cl[0])||(J[$e.prop]=(A==null?void 0:A[(_l=$e==null?void 0:$e.words)==null?void 0:_l.join(".")])??(A==null?void 0:A[$e.prop])??J[$e.prop]):(!($e!=null&&$e.isMainPath)&&la.same((B==null?void 0:B.bindMenus)??[],($e==null?void 0:$e.bindMenus)??[]),J[$e.prop]=(A==null?void 0:A[$e.prop])??J[$e.prop]))}),we.value=(ca=$.cloneDeep(we.value))==null?void 0:ca.map($e=>($e==null?void 0:$e.id)===(v==null?void 0:v.id)?{...J,id:$e==null?void 0:$e.id}:$e)}}if((wa=B==null?void 0:B.optionUrl)!=null&&wa.menuSelect){let A="";oe==null||oe.forEach(oa=>{var xe,ta,Na,tl,Ya;A===""&&((Na=(ta=(xe=oa==null?void 0:oa.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:ta[1])!=null&&Na.includes("["))&&(A=(Ya=(tl=oa==null?void 0:oa.optionUrl)==null?void 0:tl.groupSelect)==null?void 0:Ya[1])});let J=await kt(B),$e;if(J==null||J.forEach(oa=>{var xe,ta,Na,tl,Ya,ul,dl,Vl,Ka,vl;A===((ta=(xe=B==null?void 0:B.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:ta[1])&&((Ya=(tl=(Na=B==null?void 0:B.optionUrl)==null?void 0:Na.groupSelect)==null?void 0:tl[1])!=null&&Ya.includes("["))&&((vl=$.cloneDeep(oa))==null?void 0:vl[(Ka=(Vl=(dl=(ul=B==null?void 0:B.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:dl[1])==null?void 0:Vl.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])===(B==null?void 0:B.value)&&($e=oa)}),$e){const oa={...v};oe==null||oe.forEach(xe=>{var ta,Na,tl,Ya,ul,dl,Vl,Ka,vl,Va,sl;($e!=null&&$e[xe==null?void 0:xe.label]||$e!=null&&$e[(Ya=(tl=(Na=(ta=xe==null?void 0:xe.optionUrl)==null?void 0:ta.groupSelect)==null?void 0:Na[1])==null?void 0:tl.replaceAll("[",""))==null?void 0:Ya.replaceAll("]","")])&&((Vl=(dl=(ul=xe==null?void 0:xe.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:dl[1])!=null&&Vl.includes("["))&&(oa[xe.prop]=($e==null?void 0:$e[xe==null?void 0:xe.label])||($e==null?void 0:$e[(sl=(Va=(vl=(Ka=xe==null?void 0:xe.optionUrl)==null?void 0:Ka.groupSelect)==null?void 0:vl[1])==null?void 0:Va.replaceAll("[",""))==null?void 0:sl.replaceAll("]","")]))}),we.value=(Ca=$.cloneDeep(we.value))==null?void 0:Ca.map(xe=>(xe==null?void 0:xe.id)===(v==null?void 0:v.id)?{...oa,id:xe==null?void 0:xe.id}:xe)}}},fu=async d=>{var Xe,va,La,qa,sa,Qa,ga,Fa,he,Ea,ca,wa,Ca,A;if(!d)return;const v=$.cloneDeep(cr.value||{});cr.value=d;const T=Ro(v),I=Ro(cr.value);if(I&&I!==T&&await tt(I,_a.value||void 0)){Ga.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),di.forEach($e=>{if(Object.prototype.hasOwnProperty.call(cr.value||{},$e)||Object.prototype.hasOwnProperty.call(v||{},$e)){const oa=(v==null?void 0:v[$e])??"";cr.value[$e]=oa,d[$e]=oa}}),Ha.value=(Ha.value||[]).map($e=>{if(!($e!=null&&$e.prop)||!di.includes($e.prop))return $e;const oa=(v==null?void 0:v[$e.prop])??"";return{...$e,value:oa,selectValue:oa===""?[]:[oa]}});return}let F=$.cloneDeep(u.itemData);F==null||F.map(J=>{var $e,oa,xe,ta;return(J==null?void 0:J.key)==="header"&&(Array.isArray(($e=J.contents)==null?void 0:$e[0])?J.contents=(xe=ia.getColumnChild((oa=J.contents)==null?void 0:oa[0]))==null?void 0:xe.map((Na,tl)=>{var Ya,ul,dl,Vl,Ka,vl;return((dl=(ul=(Ya=Ha.value)==null?void 0:Ya.find(Va=>(Va==null?void 0:Va.prop)===(Na==null?void 0:Na.prop)))==null?void 0:ul.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((Vl=Object.values(d))==null?void 0:Vl[tl])?Na.value=[(Ka=Object.values(d))==null?void 0:Ka[tl]]:Na.value=(vl=Object.values(d))==null?void 0:vl[tl],Na}):J.contents=(ta=J.contents)==null?void 0:ta.map((Na,tl)=>{var Ya,ul,dl,Vl,Ka,vl;return((dl=(ul=(Ya=Ha.value)==null?void 0:Ya.find(Va=>(Va==null?void 0:Va.prop)===(Na==null?void 0:Na.prop)))==null?void 0:ul.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((Vl=Object.values(d))==null?void 0:Vl[tl])?Na.value=[(Ka=Object.values(d))==null?void 0:Ka[tl]]:Na.value=(vl=Object.values(d))==null?void 0:vl[tl],Na})),J});let B=Ha.value,oe=(Xe=F==null?void 0:F.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Xe.contents;if(Pl.value||(B=B==null?void 0:B.map(J=>{var $e;return J.value=J.value??(($e=oe==null?void 0:oe.find((oa,xe)=>(oa==null?void 0:oa.prop)===(J==null?void 0:J.name)))==null?void 0:$e.value),J})),!Vr.value)return;let ie=$.cloneDeep(Pl.value);(va=Pl.value)!=null&&va.includes("·")&&(Pl.value=(qa=(La=Pl.value)==null?void 0:La.split("·"))==null?void 0:qa[0]);let K=(Qa=(sa=F==null?void 0:F.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:sa.contents)==null?void 0:Qa.find((J,$e)=>(J==null?void 0:J.prop)===Pl.value);(ga=Ha==null?void 0:Ha.value)==null||ga.forEach(J=>{var $e,oa,xe,ta,Na,tl,Ya,ul,dl;(J==null?void 0:J.prop)===(K==null?void 0:K.prop)&&(J!=null&&J.endChildMenu)&&(($e=K==null?void 0:K.prop)!=null&&$e.includes(".")&&((xe=(oa=K==null?void 0:K.prop)==null?void 0:oa.split("."))==null?void 0:xe[0])!==((Na=(ta=J==null?void 0:J.prop)==null?void 0:ta.split("."))==null?void 0:Na[0])?K.endChildMenu=(Ya=(tl=J==null?void 0:J.value)==null?void 0:tl.split(" "))==null?void 0:Ya[0]:K.endChildMenu=(dl=(ul=J==null?void 0:J.endChildMenu)==null?void 0:ul.split(" "))==null?void 0:dl[0])});let _e=K!=null&&K.isMainPath&&(K!=null&&K.mainKey)?K==null?void 0:K.value:"",Ce=B,je=pe.value;if(je!=null&&je.find(J=>(K==null?void 0:K.prop)===(J==null?void 0:J.key))&&(je=je==null?void 0:je.filter(J=>(K==null?void 0:K.prop)!==(J==null?void 0:J.key))),je!=null&&je.find(J=>ie===(J==null?void 0:J.key))&&(je=je==null?void 0:je.filter(J=>ie!==(J==null?void 0:J.key))),(K==null?void 0:K.formType)==="Select"&&(Ce=Ce==null?void 0:Ce.map(J=>{var $e,oa,xe,ta,Na,tl,Ya,ul,dl,Vl,Ka,vl,Va,sl,Xa,cl;return(J==null?void 0:J.type)==="Select"&&((($e=J==null?void 0:J.allSelectionContents)==null?void 0:$e.length)>0&&(J.contactValue=d),((K==null?void 0:K.prop)===(J==null?void 0:J.prop)||ie===(J==null?void 0:J.prop))&&K&&(Array.isArray(K.value)&&((oa=K.value)==null?void 0:oa.length)>0&&((xe=K.value)!=null&&xe.every(_l=>typeof _l=="string"))?(je.push({key:J==null?void 0:J.prop,value:[(Na=K.value)==null?void 0:Na[((ta=K.value)==null?void 0:ta.length)-1]]}),J.selectValue=(tl=je==null?void 0:je.find(_l=>(_l==null?void 0:_l.key)===(J==null?void 0:J.prop)))==null?void 0:tl.value):Array.isArray(K.value)&&((Ya=K.value)==null?void 0:Ya.length)===0?(je=[],J.selectValue=[],d[J==null?void 0:J.prop]=""):Array.isArray(J.value)&&je.push({key:J==null?void 0:J.prop,value:[(ul=J.value)==null?void 0:ul[(J==null?void 0:J.length)-1]]})),((Vl=J==null?void 0:J.menus)==null?void 0:Vl[((dl=J==null?void 0:J.menus)==null?void 0:dl.length)-1])===""&&(K!=null&&K.isMainPath)&&(K!=null&&K.mainKey)&&((Ka=J==null?void 0:J.prop)!=null&&Ka.includes(".")&&((Va=(vl=J==null?void 0:J.prop)==null?void 0:vl.split("."))==null?void 0:Va[0])!==((Xa=(sl=K==null?void 0:K.prop)==null?void 0:sl.split("."))==null?void 0:Xa[0])||(J.endChildMenu=(cl=_e==null?void 0:_e.split(" "))==null?void 0:cl[0]))),J.value=(d==null?void 0:d[J==null?void 0:J.prop])??(J==null?void 0:J.value),J})),pe.value=je,Ce!=null&&Ce.some(J=>(J==null?void 0:J.functionName)&&(J==null?void 0:J.functionName)!=="")){let J=await gt([d],de==null?void 0:de.value,"Auto",we.value),$e=[];(Fa=Ce==null?void 0:Ce.filter(xe=>(xe==null?void 0:xe.functionName)&&(xe==null?void 0:xe.functionName)!==""))==null||Fa.forEach(xe=>{var ta;((ta=xe==null?void 0:xe.functionRelatedWords)==null?void 0:ta.length)>0&&($e=[...$e,...xe==null?void 0:xe.functionRelatedWords])}),$e=$e==null?void 0:$e.filter(xe=>(xe==null?void 0:xe[0])!=="@");let oa=[];for(let xe in J==null?void 0:J[0])$e!=null&&$e.find(ta=>xe===ta||(xe==null?void 0:xe.includes("."+ta)))&&oa.push(((he=J==null?void 0:J[0])==null?void 0:he[xe])!=="");(J==null?void 0:J.length)>0&&oa.every(xe=>xe)&&(Ce=Ce==null?void 0:Ce.map(xe=>{var ta;return xe.value=((ta=J==null?void 0:J[0])==null?void 0:ta[xe==null?void 0:xe.prop])??xe.value,xe})),cr.value=J==null?void 0:J[0]}if(Ha.value=Ce,K=Object.assign({},K??{},{relatedWords:(ca=(Ea=Ha==null?void 0:Ha.value)==null?void 0:Ea.find(J=>(J==null?void 0:J.prop)===(K==null?void 0:K.prop)))==null?void 0:ca.relatedWords}),(K==null?void 0:K.mainKey)&&(K!=null&&K.value)&&(K==null?void 0:K.value)!==""){let J=K!=null&&K.relatedContents&&((wa=K==null?void 0:K.relatedContents)==null?void 0:wa.length)>0?(Ca=K==null?void 0:K.relatedContents)==null?void 0:Ca.find($e=>{var oa,xe,ta,Na;return($e==null?void 0:$e[(Na=(oa=K==null?void 0:K.prop)==null?void 0:oa.split("."))==null?void 0:Na[((ta=(xe=K==null?void 0:K.prop)==null?void 0:xe.split("."))==null?void 0:ta.length)-1]])===(K==null?void 0:K.value)}):await ds(K);if(J&&JSON.stringify(J)!=="{}"){let $e=Ce;$e=$e==null?void 0:$e.map(xe=>{var ta,Na,tl,Ya,ul,dl,Vl,Ka,vl,Va,sl,Xa,cl,_l,Nl,xr,Il,yl,Tl,Yl,Bl;if((K==null?void 0:K.prop)===(xe==null?void 0:xe.prop))xe.value=(J==null?void 0:J[(ta=xe==null?void 0:xe.words)==null?void 0:ta.join(".")])??(J==null?void 0:J[xe==null?void 0:xe.prop])??J[(ul=(Na=xe==null?void 0:xe.prop)==null?void 0:Na.split("."))==null?void 0:ul[((Ya=(tl=xe==null?void 0:xe.prop)==null?void 0:tl.split("."))==null?void 0:Ya.length)-1]];else if(K!=null&&K.relatedContents&&((dl=K==null?void 0:K.relatedContents)==null?void 0:dl.length)>0)xe.value=(Vl=xe==null?void 0:xe.prop)!=null&&Vl.includes(".")&&((vl=(Ka=xe==null?void 0:xe.prop)==null?void 0:Ka.split("."))==null?void 0:vl[0])===((sl=(Va=K==null?void 0:K.prop)==null?void 0:Va.split("."))==null?void 0:sl[0])?J[(Nl=(Xa=xe==null?void 0:xe.prop)==null?void 0:Xa.split("."))==null?void 0:Nl[((_l=(cl=xe==null?void 0:xe.prop)==null?void 0:cl.split("."))==null?void 0:_l.length)-1]]:(J==null?void 0:J[xe==null?void 0:xe.prop])??(xe==null?void 0:xe.value);else if(la.same((K==null?void 0:K.menus)??[],(xe==null?void 0:xe.menus)??[])&&la.same((K==null?void 0:K.groups)??[],(xe==null?void 0:xe.groups)??[])&&!la.same((K==null?void 0:K.words)??[],(xe==null?void 0:xe.words)??[]))if((xr=xe==null?void 0:xe.prop)!=null&&xr.includes(".")&&((yl=(Il=xe==null?void 0:xe.prop)==null?void 0:Il.split("."))==null?void 0:yl[0])!==((Yl=(Tl=K==null?void 0:K.prop)==null?void 0:Tl.split("."))==null?void 0:Yl[0])){let Gl=Object.keys(J);Gl=Gl==null?void 0:Gl.find(er=>{var ql;return er==null?void 0:er.includes("."+((ql=xe==null?void 0:xe.words)==null?void 0:ql.join(".")))}),xe.value=(J==null?void 0:J[Gl])??(J==null?void 0:J[xe==null?void 0:xe.prop])??xe.value}else{let Gl=Object.keys(J);Gl=Gl==null?void 0:Gl.find(er=>{var ql;return er==null?void 0:er.includes("."+((ql=xe==null?void 0:xe.words)==null?void 0:ql.join(".")))}),xe.value=(J==null?void 0:J[(Bl=xe==null?void 0:xe.words)==null?void 0:Bl.join(".")])??(J==null?void 0:J[Gl])??(J==null?void 0:J[xe==null?void 0:xe.prop])??xe.value}else!(xe!=null&&xe.isMainPath)&&la.same((K==null?void 0:K.bindMenus)??[],(xe==null?void 0:xe.bindMenus)??[]),xe.value=(J==null?void 0:J[xe==null?void 0:xe.prop])??xe.value;return xe}),Ha.value=$e;let oa={};(A=Ha.value)==null||A.forEach(xe=>{oa[xe.prop]=xe==null?void 0:xe.value}),cr.value=oa}}Vr.value=!0,W.value=!1},hu=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",vu=d=>{var B,oe;const v=(oe=(B=fa.value)==null?void 0:B.find(ie=>(ie==null?void 0:ie.label)===(d==null?void 0:d.label)))==null?void 0:oe.multiple,T=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;we.value.forEach(ie=>{const K=ie==null?void 0:ie[T];v&&Di.isString(K)&&(ie[T]=[K]),!v&&!Di.isString(K)&&(ie[T]="")})},$t=(d,v)=>{var T;return v==null||v.forEach(I=>{d[I==null?void 0:I.prop]=I==null?void 0:I.value}),d.children&&((T=d.children)==null?void 0:T.length)>0&&(d.children=d.children.map(I=>$t(I,v))),d},st=d=>{var T,I,F,B,oe,ie;$o("");const v=(T=Ha.value)==null?void 0:T.reduce((K,_e)=>(K[_e.name]=_e.value,K),{});if(((I=Object.keys(v))==null?void 0:I.length)>0){cr.value=v,_a.value="",x.value=(F=we.value)==null?void 0:F.length,ua.value=(B=ma.value)==null?void 0:B.filter(_e=>(_e==null?void 0:_e.label)!=="新增");const K=(ie=(oe=ce.value)==null?void 0:oe.filter(_e=>(_e==null?void 0:_e.label)!=="操作"))==null?void 0:ie.map(_e=>{var je,Pe,Xe;const Ce=(Pe=(je=fa.value)==null?void 0:je.find(va=>(va==null?void 0:va.label)===(_e==null?void 0:_e.label)))==null?void 0:Pe.multiple;return vu(_e),{..._e,contents:(_e==null?void 0:_e.options)??[],optionUrl:_e!=null&&_e.formMenuSelect&&((Xe=_e==null?void 0:_e.formMenuSelect)==null?void 0:Xe.length)>0?{groupSelect:_e==null?void 0:_e.groupSelect,menuSelect:_e==null?void 0:_e.formMenuSelect,selectRelateType:"",type:_e==null?void 0:_e.formType,multiple:Ce}:null}});de.value=K==null?void 0:K.map(_e=>$t(_e,[{prop:"type",value:"edit"},{prop:"columnType",value:hu(_e==null?void 0:_e.formType)||(_e==null?void 0:_e.columnType)}])),d==="createClick"&&(ne.value="新增",Vo(!0))}},yo={START:"开始时间",END:"结束时间",HOURS:"工时"},mu=(d,v)=>Number(Pn.dayjs(v).diff(Pn.dayjs(d),"day",!0).toFixed(1)),Rt=d=>{var B;const v=u.itemData,T=(B=v==null?void 0:v.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:B.contents,I=new Map;return T==null||T.forEach((oe,ie)=>{const{label:K}=oe;I.set(K,ie)}),!I.has(yo.START)||!I.has(yo.END)||!I.has(yo.HOURS)?d:d==null?void 0:d.map(oe=>{const ie=oe==null?void 0:oe[yo.START],K=oe==null?void 0:oe[yo.END],_e=mu(ie,K);return ie&&K&&(oe[yo.HOURS]=`${_e}天`),oe})},Vt=(d,v,T=0)=>{if(T>((v==null?void 0:v.length)??""))return d;const I=v==null?void 0:v[T],F=new Map;for(const oe of d){const ie=oe[I];F.has(ie)||F.set(ie,[]),F.get(ie)&&F.get(ie).push(oe)}const B=[];for(const[oe,ie]of F){const[K,..._e]=ie,Ce={...K};T+1===((v==null?void 0:v.length)??"")?Ce.children=ie==null?void 0:ie.map(je=>(je.level=$.cloneDeep(T)+1,je)).filter((je,Pe)=>Pe!==0):_e.length>0&&(Ce.children=Vt(_e,v,T+1)),Ce.level=T,B.push(Ce)}return B},Ft=(d,v,T)=>{var F;if(!(v!=null&&v.contents)||((F=v==null?void 0:v.contents)==null?void 0:F.length)===0)return d;let I=[];return I=Vt(d,v==null?void 0:v.contents,0),I},Pt=async(d,v)=>{var qa,sa,Qa,ga,Fa,he,Ea,ca,wa,Ca,A,J,$e,oa,xe,ta,Na,tl,Ya,ul,dl,Vl,Ka,vl,Va,sl,Xa,cl,_l,Nl,xr,Il,yl,Tl,Yl,Bl,Gl,er,ql,fr,qr,hr,tr,ur,Ht,Ut,qt;const T=d==null?void 0:d.filter(pa=>(pa==null?void 0:pa.key)==="header");d==null||d.filter(pa=>(pa==null?void 0:pa.key)==="tableIndexColumn")[0];const I=d==null?void 0:d.filter(pa=>(pa==null?void 0:pa.key)==="childTree")[0];let F=!0;if((Qa=(sa=(qa=d==null?void 0:d.find(pa=>(pa==null?void 0:pa.key)==="filterAllType"))==null?void 0:qa.value)==null?void 0:sa.find(pa=>(pa==null?void 0:pa.value)==="onPamButtonContents"))!=null&&Qa.content){let pa=(he=(Fa=(ga=d==null?void 0:d.find(Sl=>(Sl==null?void 0:Sl.key)==="filterAllType"))==null?void 0:ga.value)==null?void 0:Fa.find(Sl=>(Sl==null?void 0:Sl.value)==="onPamButtonContents"))==null?void 0:he.content;pa=(Ea=pa==null?void 0:pa.split(":"))==null?void 0:Ea[1],pa=(ca=pa.slice(1,(pa==null?void 0:pa.length)-1))==null?void 0:ca.split(","),F=!!(pa!=null&&pa.find(Sl=>Sl==="操作"))}const B=d==null?void 0:d.find(pa=>(pa==null?void 0:pa.key)==="page"),oe=d==null?void 0:d.find(pa=>(pa==null?void 0:pa.key)==="rowButton"),ie=d==null?void 0:d.find(pa=>(pa==null?void 0:pa.key)==="extraButton"),K=d==null?void 0:d.filter(pa=>(pa==null?void 0:pa.key)==="tableContents"),_e=d==null?void 0:d.filter(pa=>(pa==null?void 0:pa.key)==="bottomButton"),Ce=d==null?void 0:d.filter(pa=>(pa==null?void 0:pa.key)==="tableIndex");fa.value=(Ca=(wa=d==null?void 0:d.filter(pa=>(pa==null?void 0:pa.key)==="tableToForm"))==null?void 0:wa[0])==null?void 0:Ca.contents,Ae.value=(B==null?void 0:B.contents)??!0;let je=[];Hl.value===""?je=T==null?void 0:T[0]:je=(T==null?void 0:T.find(pa=>(pa==null?void 0:pa.selectLabel)==="("+Hl.value+")"))??(T==null?void 0:T.find(pa=>!(pa!=null&&pa.selectLabel)));let Pe=[];Hl.value===""?Pe=Ce==null?void 0:Ce[0]:Pe=(Ce==null?void 0:Ce.find(pa=>(pa==null?void 0:pa.selectLabel)==="("+Hl.value+")"))??(Ce==null?void 0:Ce.find(pa=>!(pa!=null&&pa.selectLabel)));let Xe=[],va=[];if(((A=je==null?void 0:je.contents)==null?void 0:A.length)>0){let pa=[],Sl=je==null?void 0:je.contents;if(Array.isArray(Sl==null?void 0:Sl[0])&&((J=Sl==null?void 0:Sl[0])!=null&&J.every(el=>!(el!=null&&el.children)))&&(Sl=Sl==null?void 0:Sl[0]),Sl.some(el=>Array.isArray(el)&&(el==null?void 0:el.find(Ke=>Ke.children))))pa=($e=ia.getGradeColumns(Sl,F))==null?void 0:$e[0],pa!=null&&pa.find(el=>(el==null?void 0:el.label)==="操作")||pa.push({label:"操作",prop:"operate",type:"operate"});else{let el=Sl.some(Ke=>Array.isArray(Ke))?Sl==null?void 0:Sl[0]:Sl;el!=null&&el.find(Ke=>(Ke==null?void 0:Ke.label)==="操作")||el.push({label:"操作",prop:"operate",type:"operate"}),el==null||el.forEach((Ke,Ql)=>{var $r,Br,Rr,Sr,oo,ko,xo,br,kn,Gn,wo,rn,Yn,Yt,Jt,Xt,Zt,Qt,es,as;if((Br=($r=qe.value)==null?void 0:$r.split("/"))==null||Br.forEach(ar=>{var vr,Tn,ls;ar!==""&&((ls=(Tn=(vr=ar==null?void 0:ar.split(k+"updateLoading"))==null?void 0:vr[0])==null?void 0:Tn.split(k+"loading"))==null||ls[0])}),Ke!=null&&Ke.methodContent){let ar=(oo=(Sr=(Rr=Ke==null?void 0:Ke.methodContent)==null?void 0:Rr.replace("@","%%#"))==null?void 0:Sr.split("%%#"))==null?void 0:oo[1];if(ar=ar==null?void 0:ar.slice(0,(ar==null?void 0:ar.length)-1),ar=ia.contentTransArrayToAllNoExtra(ar??"",","),(ko=ar==null?void 0:ar.find(vr=>vr==null?void 0:vr.includes("@Button")))!=null&&ko.includes("Prop")&&((xo=ar==null?void 0:ar.find(vr=>vr==null?void 0:vr.includes("Type")))!=null&&xo.includes("Manual"))){let vr=(kn=(br=ar==null?void 0:ar.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:br.split(":"))==null?void 0:kn[1];vr=((rn=(wo=(Gn=vr==null?void 0:vr.replaceAll("[",""))==null?void 0:Gn.replaceAll("]",""))==null?void 0:wo.split(","))==null?void 0:rn[1])??"算法执行",Xe.push(vr)}else if((Yn=ar==null?void 0:ar.find(vr=>vr==null?void 0:vr.includes("@Button")))!=null&&Yn.includes("Row")&&((Yt=ar==null?void 0:ar.find(vr=>vr==null?void 0:vr.includes("Type")))!=null&&Yt.includes("Manual"))){let vr=(Xt=(Jt=ar==null?void 0:ar.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:Jt.split(":"))==null?void 0:Xt[1];vr=((es=(Qt=(Zt=vr==null?void 0:vr.replaceAll("[",""))==null?void 0:Zt.replaceAll("]",""))==null?void 0:Qt.split(","))==null?void 0:es[1])??"算法执行",va.push(vr)}}(as=fa.value)==null||as.find(ar=>(ar==null?void 0:ar.prop)===(Ke==null?void 0:Ke.prop)),pa.push({label:(Ke==null?void 0:Ke.label)==="操作"?F?"操作":"":(Ke==null?void 0:Ke.label)??"",prop:(Ke==null?void 0:Ke.label)==="操作"?"operate":(Ke==null?void 0:Ke.prop)??"a"+Ql,width:Ke!=null&&Ke.width?parseInt(Ke.width):"",fixed:(Ke==null?void 0:Ke.fixed)??void 0,sortable:(Ke==null?void 0:Ke.sortable)??!1,filterable:(Ke==null?void 0:Ke.filterable)??!1,operable:(Ke==null?void 0:Ke.operable)??!1,showSummary:(Ke==null?void 0:Ke.showSummary)??!1,align:(Ke==null?void 0:Ke.align)??"left",showOverflowTooltip:(Ke==null?void 0:Ke.showOverflowTooltip)??!0,isNotDrag:(Ke==null?void 0:Ke.isNotDrag)??!1,isEditCol:(Ke==null?void 0:Ke.isEditCol)??!1,isOperate:(Ke==null?void 0:Ke.isOperate)??!1,id:(Ke==null?void 0:Ke.id)??Ql,type:(Ke==null?void 0:Ke.label)==="操作"?"operate":void 0,formType:(Ke==null?void 0:Ke.formType)??(Ke!=null&&Ke.groupSelect?"Select":""),disabled:Ke==null?void 0:Ke.disabled,options:(Ke==null?void 0:Ke.options)??[],value:(Ke==null?void 0:Ke.value)??"",isExistChild:(Ke==null?void 0:Ke.isExistChild)??!1,mainKey:(Ke==null?void 0:Ke.mainKey)??Ql===0,allSelectionContents:(Ke==null?void 0:Ke.allContents)??[],filterContent:Ke==null?void 0:Ke.filterContents,menus:Ke==null?void 0:Ke.menus,groups:Ke==null?void 0:Ke.groups,words:Ke==null?void 0:Ke.words,filter:Ke==null?void 0:Ke.filter,bindMenus:Ke==null?void 0:Ke.bindMenus,fatherPath:Ke==null?void 0:Ke.fatherPath,isMainPath:Ke==null?void 0:Ke.isMainPath,required:(Ke==null?void 0:Ke.required)??!1,relatedContents:Ke==null?void 0:Ke.relatedContents,functionName:Ke==null?void 0:Ke.functionName,functionRelatedWords:Ke==null?void 0:Ke.functionRelatedWords,calculatorFilter:Ke==null?void 0:Ke.calculatorFilter,relatedPages:Ke==null?void 0:Ke.relatedPages,multiple:(Ke==null?void 0:Ke.multiple)??!1})})}O.value=(oa=_e==null?void 0:_e[0])==null?void 0:oa.contents;const sn=ia.getNewColumnChild(pa),Wt=el=>Array.isArray(el)?el.map(Ke=>(Array.isArray(Ke==null?void 0:Ke.children)&&Ke.children.length>0?(Ke.sortable=!1,Wt(Ke.children)):(Ke==null?void 0:Ke.prop)==="operate"||(Ke==null?void 0:Ke.label)==="操作"||(Ke==null?void 0:Ke.type)==="operate"||(Ke.sortable=!1),Ke)):el;Wt(sn),await Ki(sn),e0(Z.value,sn),de.value=sn,da.value=sn,n.value=(xe=de.value)==null?void 0:xe.map(el=>el==null?void 0:el.label);let cn=(Na=(ta=ia.getAllLeafNodes(de.value))==null?void 0:ta.filter(el=>(el==null?void 0:el.type)!=="operate"))==null?void 0:Na.map((el,Ke)=>({prop:(el==null?void 0:el.prop)??"a"+Ke,column:el.label}));Lr.value=cn;let ln=[];Hl.value===""?ln=K==null?void 0:K[0]:ln=(K==null?void 0:K.find(el=>(el==null?void 0:el.selectLabel)==="("+Hl.value+")"))??(K==null?void 0:K.find(el=>!(el!=null&&el.selectLabel)));let no=Array.isArray((tl=ln==null?void 0:ln.contents)==null?void 0:tl[0])&&((Ya=ln==null?void 0:ln.contents)!=null&&Ya[0].every(el=>Array.isArray(el)))?(ul=ln==null?void 0:ln.contents)==null?void 0:ul[0]:ln==null?void 0:ln.contents;Pe!=null&&Pe.contents&&((dl=Pe==null?void 0:Pe.contents)==null?void 0:dl.length)!==0&&(no=(Vl=$.cloneDeep(no))==null?void 0:Vl.map((el,Ke)=>{if(!Array.isArray(el)){let Ql={};for(let $r in el)$r!=="id"&&$r!=="index"&&(Ql[$r]=el[$r]);el=Object.values(Ql)}return el}));const Bu=!!((Ka=de.value)!=null&&Ka.find(el=>el.prop==="index"));no=pc(no,Pe==null?void 0:Pe.contents,Bu);const go=[];no==null||no.forEach((el,Ke)=>{var $r;let Ql={};if(Array.isArray(el)){let Br=[];el==null||el.filter(Rr=>!(Rr!=null&&Rr.id)).forEach((Rr,Sr)=>{var oo,ko,xo,br,kn,Gn;if((oo=cn==null?void 0:cn[Sr])!=null&&oo.prop&&!Array.isArray(Rr)){let wo={};wo[cn[Sr].column]=Rr,Ia!=null&&Ia.value&&((ko=Ia==null?void 0:Ia.value)==null?void 0:ko.length)>0&&((xo=Ia==null?void 0:Ia.value)!=null&&xo.find(rn=>JSON.stringify(rn==null?void 0:rn[0])===JSON.stringify(wo)))&&(Br=(br=Ia==null?void 0:Ia.value)==null?void 0:br.find(rn=>JSON.stringify(rn==null?void 0:rn[0])===JSON.stringify(wo))),Br&&Br.length>0?Ql[cn[Sr].prop]=Br!=null&&Br.find(rn=>{var Yn;return((Yn=Object.keys(rn))==null?void 0:Yn[0])===cn[Sr].column})?(kn=Br==null?void 0:Br.find(rn=>{var Yn;return((Yn=Object.keys(rn))==null?void 0:Yn[0])===cn[Sr].column}))==null?void 0:kn[cn[Sr].column]:Rr:Ql[cn[Sr].prop]=Rr}else Array.isArray(Rr)&&((Gn=cn[Sr])!=null&&Gn.prop?Ql[cn[Sr].prop]=Rr:Ql.children=bt(Rr,cn))})}else Ql=el;if(Array.isArray(el)&&el.some(Br=>Br==null?void 0:Br.id)){const Br=($r=el==null?void 0:el.find(Rr=>Rr.id))==null?void 0:$r.id;go.push(Object.assign(Ql,{id:ii(Br)}))}else Ql.id?go.push(Ql):go.push(Object.assign(Ql,{id:Ke.toString()}))});try{const el=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ke=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),Ql=el==null?void 0:el.tableId,$r=el==null?void 0:el.compIndex;if(Ql&&Array.isArray(Ke)&&Ke.length>0&&String(Ql)===String(u==null?void 0:u.parentTableId)&&String($r)===String(u==null?void 0:u.index)){const Br=new Set(go.map(Sr=>String(Sr==null?void 0:Sr.id))),Rr=Ke.filter(Sr=>!Br.has(String(Sr)));if(Rr.length>0){const Sr=el==null?void 0:el.pageKey,oo=Sr!=null&&Sr.startsWith("/")?Sr.substring(1):Sr;((v==null?void 0:v[Sr])||(v==null?void 0:v[oo])||[]).filter(br=>{var kn,Gn;return((kn=br==null?void 0:br.key)==null?void 0:kn.type)==="data"&&String((Gn=br==null?void 0:br.key)==null?void 0:Gn.tableId)===String(Ql)&&Rr.includes(br==null?void 0:br.id)}).forEach(br=>{var kn;Br.has(String(br==null?void 0:br.id))||(go.push({id:br==null?void 0:br.id,...((kn=br==null?void 0:br.value)==null?void 0:kn.tableData)||{}}),Br.add(String(br==null?void 0:br.id)))})}}}catch{}let bo=null;try{const el=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ke=JSON.parse(sessionStorage.getItem(el)||"null");Array.isArray(Ke)&&Ke.length>0&&(bo=new Set(Ke.map(Ql=>String(Ql))))}catch{}const Kt=Array.from(((vl=ze.value)==null?void 0:vl.values())||[]).filter(el=>!(!(el!=null&&el._isOCRRow&&(el==null?void 0:el._ocrTableId)===(u==null?void 0:u.index))||bo&&bo.has(String(el==null?void 0:el.id)))),Tu=(we.value||[]).map(el=>String(el==null?void 0:el.id)),Gt=ti(go,Tu);if(we.value=Ft(Gt,I,de.value),ya.value=Gt,(Va=ya.value)==null||Va.forEach(el=>{var Ke;(Ke=ze.value)==null||Ke.set(el.id,el)}),bo&&bo.size>0)try{const el=new Set(Array.from(bo.values()));we.value=(we.value||[]).filter(Ke=>!el.has(String(Ke==null?void 0:Ke.id))),ya.value=(ya.value||[]).filter(Ke=>!el.has(String(Ke==null?void 0:Ke.id))),el.forEach(Ke=>{var Ql,$r;try{($r=(Ql=ze.value)==null?void 0:Ql.delete)==null||$r.call(Ql,Ke)}catch{}})}catch{}const fi=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ct=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(fi&&Array.isArray(ct)&&ct.length>0&&String(fi==null?void 0:fi.compIndex)===String(u==null?void 0:u.index)){const el=new Set((ya.value||[]).map(Ke=>String(Ke==null?void 0:Ke.id)));ct.filter(Ke=>!el.has(String(Ke)))}if(Kt.length>0){const el=new Set((we.value||[]).map(Ql=>Ql==null?void 0:Ql.id)),Ke=Kt.filter(Ql=>!el.has(Ql.id));Ke.length>0&&(we.value=[...we.value||[],...Ke],ya.value=[...ya.value||[],...Ke],Ke.forEach(Ql=>{var $r;return($r=ze.value)==null?void 0:$r.set(Ql.id,Ql)}))}}else de.value=[],ce.value=[],we.value=[],ya.value=[],ze.value=new Map;if(va=[...new Set(va)],va=va==null?void 0:va.map(pa=>({label:pa,type:"methodButton"})),((sl=oe==null?void 0:oe.contents)==null?void 0:sl.length)>0?Oa.value=oe==null?void 0:oe.contents:Oa.value=[],Oa.value=[...Oa.value,...va],Xe=[...new Set(Xe)],Xe=Xe==null?void 0:Xe.map(pa=>({label:pa,type:"methodButton"})),((Xa=ie==null?void 0:ie.contents)==null?void 0:Xa.length)>0)if((Nl=(_l=(cl=d==null?void 0:d.find(pa=>(pa==null?void 0:pa.key)==="filterAllType"))==null?void 0:cl.value)==null?void 0:_l.find(pa=>(pa==null?void 0:pa.value)==="onButtonContents"))!=null&&Nl.content){let pa=(yl=(Il=(xr=d==null?void 0:d.find(Sl=>(Sl==null?void 0:Sl.key)==="filterAllType"))==null?void 0:xr.value)==null?void 0:Il.find(Sl=>(Sl==null?void 0:Sl.value)==="onButtonContents"))==null?void 0:yl.content;if(pa=(Tl=pa==null?void 0:pa.split(":"))==null?void 0:Tl[1],pa=(Yl=pa.slice(1,(pa==null?void 0:pa.length)-1))==null?void 0:Yl.split(","),ua.value=(Bl=ie==null?void 0:ie.contents)==null?void 0:Bl.filter(Sl=>pa==null?void 0:pa.find(sn=>sn===(Sl==null?void 0:Sl.label))),ma.value=(Gl=ie==null?void 0:ie.contents)==null?void 0:Gl.filter(Sl=>pa==null?void 0:pa.find(sn=>sn===(Sl==null?void 0:Sl.label))),(er=ie==null?void 0:ie.contents)!=null&&er.some(Sl=>(Sl==null?void 0:Sl.label)==="OCR识别")&&!((ql=ua.value)!=null&&ql.some(Sl=>(Sl==null?void 0:Sl.label)==="OCR识别"))){const Sl=(fr=ie==null?void 0:ie.contents)==null?void 0:fr.find(sn=>(sn==null?void 0:sn.label)==="OCR识别");ua.value=[...ua.value,Sl],ma.value=[...ma.value,Sl]}C.value=!!(pa!=null&&pa.find(Sl=>Sl==="搜索")),M.value=!!(pa!=null&&pa.find(Sl=>Sl==="块状显示"))}else ua.value=ie==null?void 0:ie.contents,ma.value=ie==null?void 0:ie.contents;else ua.value=[],ma.value=[];ua.value=[...ua.value,...Xe],ma.value=[...ma.value,...Xe],typeof qe.value=="string"&&qe.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((qr=ua.value)!=null&&qr.some(pa=>(pa==null?void 0:pa.label)==="OCR识别")||(ua.value=[...ua.value||[],{label:"OCR识别"}]),(hr=ma.value)!=null&&hr.some(pa=>(pa==null?void 0:pa.label)==="OCR识别")||(ma.value=[...ma.value||[],{label:"OCR识别"}])):(ua.value=(ua.value||[]).filter(pa=>(pa==null?void 0:pa.label)!=="OCR识别"),ma.value=(ma.value||[]).filter(pa=>(pa==null?void 0:pa.label)!=="OCR识别")),(tr=ua.value)!=null&&tr.some(pa=>(pa==null?void 0:pa.label)==="切换视图")||(ua.value=[...ua.value||[],{label:"切换视图"}]),(ur=ma.value)!=null&&ur.some(pa=>(pa==null?void 0:pa.label)==="切换视图")||(ma.value=[...ma.value||[],{label:"切换视图"}]),x.value=((Ht=we==null?void 0:we.value)==null?void 0:Ht.length)??0,Rt(we.value),Yr.value=we.value,Al.value&&(de.value=(qt=(Ut=ce.value)==null?void 0:Ut.filter(pa=>(pa==null?void 0:pa.label)!=="操作"))==null?void 0:qt.map(pa=>{var Sl;return{...pa,type:"edit",optionUrl:pa!=null&&pa.formMenuSelect&&((Sl=pa==null?void 0:pa.formMenuSelect)==null?void 0:Sl.length)>0?{groupSelect:pa==null?void 0:pa.groupSelect,menuSelect:pa==null?void 0:pa.formMenuSelect,selectRelateType:"",type:pa==null?void 0:pa.formType}:null}}),st())};a.watch(()=>[u.itemData,Hl.value,wn.value,gn.value,Ia==null?void 0:Ia.value],async()=>{var d,v,T,I,F,B;if((d=u==null?void 0:u.itemData)!=null&&d.find(oe=>(oe==null?void 0:oe.key)==="columnPath")&&!((v=P.value)!=null&&v.find(oe=>{var ie,K;return(oe==null?void 0:oe.key)===((K=(ie=u==null?void 0:u.itemData)==null?void 0:ie.find(_e=>(_e==null?void 0:_e.key)==="columnPath"))==null?void 0:K.contents)}))){let oe=P.value,ie={key:(I=(T=u==null?void 0:u.itemData)==null?void 0:T.find(K=>(K==null?void 0:K.key)==="columnPath"))==null?void 0:I.contents,value:(B=(F=u==null?void 0:u.itemData)==null?void 0:F.find(K=>(K==null?void 0:K.key)==="columnUsingPath"))==null?void 0:B.contents};oe!=null&&oe.find(K=>(K==null?void 0:K.key)===(ie==null?void 0:ie.key))?oe=oe==null?void 0:oe.map(K=>((K==null?void 0:K.key)===(ie==null?void 0:ie.key)&&(K.value=ie.value),K)):oe.push(ie),He.setTableViewContents(oe)}await Pt(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.operatingForm,d=>{d!=null&&d.form&&($o(d==null?void 0:d.form),ne.value=d==null?void 0:d.dialogTitle,Pa.value=!0,Ue.value=!0)},{immediate:!0,deep:!0});const yu=()=>{var d;(d=j.value)!=null&&d.includes("read")&&(Al.value=!Al.value)},gu=()=>{yr.value=!yr.value};a.watch(()=>{var d;return(d=u==null?void 0:u.config)==null?void 0:d.viewport},d=>{var v;j.value=d,(d==null?void 0:d.length)===0?Al.value=!1:(d!=null&&d.includes("read")||(Al.value=!0),d!=null&&d.includes("edit")||(Al.value=!1)),N.value=((v=u==null?void 0:u.config)==null?void 0:v.showIndex)||Al.value},{immediate:!0}),a.watch(()=>Al.value,d=>{var v;d?(st("viewChange"),He.setCacheUpdatingData(null)):(ua.value=ma.value,de.value=da.value,V.value&&(He.setTableLoading(u==null?void 0:u.index),Be("change",V.value))),N.value=d||((v=u==null?void 0:u.config)==null?void 0:v.showIndex),ir.value=[]},{immediate:!0}),a.watch(()=>{var d;return(d=Un.value)==null?void 0:d.length},d=>{d===0&&(ue.currentPage=1)}),a.watch(()=>u==null?void 0:u.compNames,d=>{t.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:d||[],width:1}]},{immediate:!0}),a.ref(!1);const bu=(d,v)=>{var T;st("createClick"),v===ue.pageSize&&(ue.currentPage=Math.ceil(((T=we.value)==null?void 0:T.length)/ue.pageSize))},ku=async(d,v,T)=>{var F,B,oe,ie,K;const I=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(I&&di.includes(I)&&T!==void 0&&T!==null&&String(T).trim()!==""){const _e=String(T).trim();if(await tt(_e,d==null?void 0:d.id)){Ga.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const je=(F=we.value)==null?void 0:F.findIndex(Xe=>(Xe==null?void 0:Xe.id)===(d==null?void 0:d.id)),Pe=je!==-1?(oe=(B=we.value)==null?void 0:B[je])==null?void 0:oe[I]:void 0;I&&(d[I]=Pe??"");return}}if(Al.value){const _e=d==null?void 0:d.id;_e!=null&&(m.value.has(_e)||m.value.set(_e,$.cloneDeep(d)),c.value.add(_e));const Ce=(ie=we.value)==null?void 0:ie.findIndex(je=>(je==null?void 0:je.id)===(d==null?void 0:d.id));Ce!==-1&&I&&(we.value[Ce]={...we.value[Ce],[I]:T}),pi(T,d,v);return}pi(T,d,v),cr.value=$.cloneDeep(d),_a.value=d==null?void 0:d.id,x.value=(K=we.value)==null?void 0:K.length,ne.value=d!=null&&d._isTemp?"新增":"编辑",Vo(!1)},xu=async()=>{var d,v;try{const T=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(I=>{if(typeof I=="string"&&I.includes("content_")){const F=I.split("_")[1];F&&(T.push(`content_${F}`),T.push(`struct_${F}`))}})),T.length===0&&(u!=null&&u.itemData)){const I=(v=(d=u.itemData)==null?void 0:d.find(F=>(F==null?void 0:F.key)==="contentTableId"))==null?void 0:v.contents;I&&(T.push(`content_${I}`),T.push(`struct_${I}`))}return T}catch(T){return console.error("获取 tableNames 失败:",T),[]}},wu=async(d,v,T)=>{var B,oe;if(!T||typeof T!="string"||T.trim()===""){const ie=(v==null?void 0:v.property)??(v==null?void 0:v.prop),K=`${d==null?void 0:d.id}:${ie}`;f.value.delete(K),y.value.set(K,!1);return}const I=(v==null?void 0:v.property)??(v==null?void 0:v.prop),F=`${d==null?void 0:d.id}:${I}`;y.value.set(F,!0);try{const ie=await xu();if(ie.length===0){console.warn("未找到同名表,跳过全局搜索"),f.value.delete(F),y.value.set(F,!1);return}const K=parseInt((B=Ll.value)==null?void 0:B.plat_id);if(!K){console.warn("platId 无效,跳过全局搜索"),f.value.delete(F),y.value.set(F,!1);return}const _e=await $.getAllTables({platId:K,tableNames:ie??[]}),Ce=((oe=_e==null?void 0:_e.data)==null?void 0:oe.result)||[],je=[],Pe=[];for(let Xe=0;Xe<Ce.length;Xe+=2)Xe+1<Ce.length&&Pe.push([Ce[Xe],Ce[Xe+1]]);Pe.forEach(([Xe,va])=>{var Fa;if(!Array.isArray(Xe)||Xe.length===0||!Array.isArray(va)||va.length===0)return;const La=va[0];let qa=((Fa=La==null?void 0:La.结构)==null?void 0:Fa.contents)??[];if(!Array.isArray(qa)||qa.length===0)return;let sa=$.cloneDeep(qa);if(Array.isArray(sa==null?void 0:sa[0])&&(sa=ia.getColumnChild(sa[0])),!Array.isArray(sa)||sa.length===0||!sa.some(he=>(he==null?void 0:he.prop)===I))return;[...Xe].sort((he,Ea)=>{const ca=Number((he==null?void 0:he.update_time)??0);return Number((Ea==null?void 0:Ea.update_time)??0)-ca}).slice(0,20).forEach(he=>{const Ea=he[I];if(Ea!=null){const ca=String(Ea);ca.toLowerCase().includes(T.toLowerCase())&&je.findIndex(Ca=>{var A;return he.id&&((A=Ca.rowData)==null?void 0:A.id)===he.id?!0:Ca.label===ca})===-1&&je.push({label:ca,rowData:$.cloneDeep(he),sourceTable:(La==null?void 0:La.source_table)||""})}})}),f.value.set(F,je)}catch(ie){console.error("全局搜索建议失败:",ie),f.value.delete(F)}finally{y.value.set(F,!1)}},_u=(d,v,T)=>{if(!Al.value)return;const I=(v==null?void 0:v.property)??(v==null?void 0:v.prop),F=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(F&&F.toUpperCase()!=="INPUT"&&F!=="")return;const B=`${d==null?void 0:d.id}:${I}`;if(h.has(B)&&clearTimeout(h.get(B)),!T||T.trim()===""){f.value.delete(B),y.value.set(B,!1);return}const oe=setTimeout(()=>{wu(d,{prop:I,property:I},T),h.delete(B)},300);h.set(B,oe)};function Su(d,v){const T=`${d==null?void 0:d.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return f.value.get(T)||[]}const Eu=(d,v,T)=>{var Ce;if(!T||!T.rowData)return;const I=T.rowData,F=d==null?void 0:d.id,B=(v==null?void 0:v.property)??(v==null?void 0:v.prop),ie=(ia.getAllLeafNodes(de.value)||[]).filter(je=>(je==null?void 0:je.type)!=="operate"&&(je==null?void 0:je.label)!=="操作"&&(je==null?void 0:je.prop)!=="operate");ie.forEach(je=>{const Pe=je==null?void 0:je.prop;Pe&&I[Pe]!==void 0&&(d[Pe]=I[Pe])});const K=(Ce=we.value)==null?void 0:Ce.findIndex(je=>(je==null?void 0:je.id)===F);K!==-1&&ie.forEach(je=>{const Pe=je==null?void 0:je.prop;Pe&&I[Pe]!==void 0&&(we.value[K][Pe]=I[Pe])}),F!=null&&(m.value.has(F)||m.value.set(F,$.cloneDeep(d)),c.value.add(F));const _e=`${F}:${B}`;f.value.delete(_e),y.value.set(_e,!1),pi(d[B],d,v)},Ur=d=>{var K,_e,Ce,je,Pe,Xe,va,La,qa,sa,Qa;const{row:v,column:T,item:I,slotData:F}=d;let B=v!=null&&v[T==null?void 0:T.prop]||(v==null?void 0:v[T==null?void 0:T.prop])===0?((_e=(K=v==null?void 0:v[T==null?void 0:T.prop])==null?void 0:K[0])==null?void 0:_e.contents)??((v==null?void 0:v[T==null?void 0:T.prop])===0?"0":v==null?void 0:v[T==null?void 0:T.prop]):((je=(Ce=v==null?void 0:v[I==null?void 0:I.prop])==null?void 0:Ce[0])==null?void 0:je.contents)??(v==null?void 0:v[I==null?void 0:I.prop])??((Xe=(Pe=F==null?void 0:F[I==null?void 0:I.prop])==null?void 0:Pe[0])==null?void 0:Xe.contents)??(F==null?void 0:F[I==null?void 0:I.prop])??((qa=(La=v==null?void 0:v[(va=I==null?void 0:I.child)==null?void 0:va.prop])==null?void 0:La[0])==null?void 0:qa.contents)??(v==null?void 0:v[(sa=I==null?void 0:I.child)==null?void 0:sa.prop]),ie=Array.isArray(B)&&!(B!=null&&B.every(ga=>typeof ga=="string"||typeof ga=="number"))?"查看":B;if(ie=Array.isArray(ie)?ie.join(","):ie,(T==null?void 0:T.formType)==="Date")if(!ie||ie===""||ie===null||ie===void 0)ie="";else{const ga=Pn.dayjs(ie,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ie=ga.isValid()?ga.format("YYYYMMDD"):ie??""}return Array.isArray(T==null?void 0:T.relatedPages)&&((Qa=T==null?void 0:T.relatedPages)==null?void 0:Qa.length)>0&&(ie="详情页"),ie},Cu=d=>{var _e,Ce,je,Pe,Xe,va,La,qa,sa,Qa;const{row:v,column:T,item:I,slotData:F}=d;let B=v!=null&&v[T==null?void 0:T.prop]?((Ce=(_e=v==null?void 0:v[T==null?void 0:T.prop])==null?void 0:_e[0])==null?void 0:Ce.contents)??(v==null?void 0:v[T==null?void 0:T.prop]):((Pe=(je=v==null?void 0:v[I==null?void 0:I.prop])==null?void 0:je[0])==null?void 0:Pe.contents)??(v==null?void 0:v[I==null?void 0:I.prop])??((va=(Xe=F==null?void 0:F[I==null?void 0:I.prop])==null?void 0:Xe[0])==null?void 0:va.contents)??(F==null?void 0:F[I==null?void 0:I.prop])??((sa=(qa=v==null?void 0:v[(La=I==null?void 0:I.child)==null?void 0:La.prop])==null?void 0:qa[0])==null?void 0:sa.contents)??(v==null?void 0:v[(Qa=I==null?void 0:I.child)==null?void 0:Qa.prop]);const ie=Array.isArray(B)&&!(B!=null&&B.every(ga=>typeof ga=="string"||typeof ga=="number")),K=Array.isArray(B)&&(B==null?void 0:B.find(ga=>ga==null?void 0:ga.url));return ie&&K},Du=d=>{var F,B;if(!(d!=null&&d.column))return!1;const v=qe.value==="试验任务/任务管理",T=(u==null?void 0:u.compName)==="任务列表",I=((F=d==null?void 0:d.column)==null?void 0:F.label)==="任务状态"||((B=d==null?void 0:d.column)==null?void 0:B.prop)==="任务状态";return v&&T&&I},Nu=(d,v)=>d.find(T=>Object.values(T).some(I=>I===v));return a.watch(()=>te.value,async d=>{if(d){Ne.setContentLoading(!0),await a.nextTick();const v=Nu(we.value,d==null?void 0:d.data);if(!v)return Ne.setContentLoading(!1);await Kn(d==null?void 0:d.data,null,v,{data:d==null?void 0:d.data}),Ne.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.cacheNewData,d=>{var v;d&&(Array.isArray(d)?d.forEach(T=>{var I,F,B,oe,ie;if(换,String(T==null?void 0:T.compId)===String(u==null?void 0:u.index)&&(T!=null&&T.resId)&&((I=T==null?void 0:T.data)!=null&&I.id)){const K=(F=T==null?void 0:T.data)==null?void 0:F.id,_e=T==null?void 0:T.resId;if(we.value=(B=we.value)==null?void 0:B.map(Ce=>{if((Ce==null?void 0:Ce.id)===K){const je={...Ce,id:_e};return delete je._isOCRRow,delete je._ocrTableId,je}return Ce}),(ie=(oe=ze.value)==null?void 0:oe.has)!=null&&ie.call(oe,K)){const je={...ze.value.get(K)||{},id:_e};delete je._isOCRRow,delete je._ocrTableId,ze.value.delete(K),ze.value.set(_e,je)}ba(u==null?void 0:u.index,K,_e)}}):String(d==null?void 0:d.compId)===String(u==null?void 0:u.index)&&(we.value=(v=we.value)==null?void 0:v.map(T=>{var I;if((T==null?void 0:T.id)===((I=d==null?void 0:d.data)==null?void 0:I.id)){const F={...T,id:d==null?void 0:d.resId};return delete F._isOCRRow,delete F._ocrTableId,F}return T})))},{immediate:!0,deep:!0}),(d,v)=>{var sa,Qa,ga,Fa;const T=a.resolveComponent("svg-icon"),I=a.resolveComponent("el-popover"),F=a.resolveComponent("el-switch"),B=a.resolveComponent("el-checkbox"),oe=a.resolveComponent("el-radio"),ie=a.resolveComponent("el-radio-group"),K=a.resolveComponent("el-checkbox-group"),_e=a.resolveComponent("el-button"),Ce=a.resolveComponent("el-icon"),je=a.resolveComponent("el-progress"),Pe=a.resolveComponent("el-alert"),Xe=a.resolveComponent("el-table-column"),va=a.resolveComponent("el-table"),La=a.resolveComponent("el-upload"),qa=a.resolveComponent("el-text");return a.openBlock(),a.createElementBlock("div",V0,[Pr.value?(a.openBlock(),a.createBlock(il.ssTable,{id:"excel-table",pageObj:ue,showIndex:N.value,isTree:(sa=l.compItem)==null?void 0:sa.isTree,summaryInfo:G,columns:de.value,defaultSort:ae,isCardViewport:yr.value,checkedColumns:n.value,key:nn.value+de.value,tableData:Un.value,isEditViewport:Al.value,isShowPagination:Ae.value,isShowEdit:!1,isShowDelete:!1,allowSelect:w.value,onDbClickRow:si,extraButton:ua.value,rowButton:Oa.value,cacheExtraButtons:ma.value,isClearSelection:((Qa=ir.value)==null?void 0:Qa.length)===0,onDoCurrentChange:bn,onDoSizeChange:zo,onSortChange:Vi,onContentClick:Kn,onRowClick:ci,onSelectChange:qi,onCellChange:ku,onCellInput:_u,onSelectSuggest:Eu,onChange:pi,onPreview:Wn,onSubmitEditingTable:ei,onHandleColEditChange:Xo,onHandleColTypeChange:Zo,onClickButton:$n,onAddNewRow:jr,bottomButton:O.value},a.createSlots({headerButton:a.withCtx(he=>{var Ea,ca,wa,Ca;return[l.showHeader?(a.openBlock(),a.createBlock(yf,{key:0,id:"tableHeaderButton",pageLayout:l.pageLayout,lockingPage:a.unref(ve)===a.unref(qe),filterValues:Xi.value,selectNums:(Ea=ir.value)==null?void 0:Ea.length,dataNums:(ca=we.value)==null?void 0:ca.length,compName:l.compName,isDevMode:l.isDevMode,buttons:he.buttons,menuFilter:(Ca=(wa=l.compItem)==null?void 0:wa.component)==null?void 0:Ca.menuFilter,onButtonClick:v[1]||(v[1]=(A,J,$e)=>$n(A,J,{extra:$e})),columns:de.value,onFilter:Zi,onGetImportData:Pi,level:l.level,filterShow:C.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var he,Ea,ca,wa;return[((he=we.value)==null?void 0:he.length)>0&&l.allowOperate&&M.value?(a.openBlock(),a.createElementBlock("div",j0,[(Ea=j.value)!=null&&Ea.includes("read")&&((ca=j.value)!=null&&ca.includes("edit"))&&((wa=Oa.value)!=null&&wa.some(Ca=>(Ca==null?void 0:Ca.label)==="编辑"))&&!yr.value&&a.unref(ve)!==a.unref(qe)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:yu},[a.createVNode(T,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:he,index:Ea})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ca=>bu(he,Ea)},[a.createVNode(T,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,H0)]),operateCol:a.withCtx(()=>[a.createVNode(I,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:pu},{reference:a.withCtx(()=>[a.createElementVNode("span",U0,[a.createVNode(T,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",q0,[v[20]||(v[20]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(F,{"model-value":g.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=he=>li(he))},null,8,["model-value"]),v[21]||(v[21]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(K,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=he=>n.value=he),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:s},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Dn.value,he=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:he.label},[a.createVNode(B,{value:he.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:he.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(he.label),9,W0)]),_:2},1032,["value"]),a.createVNode(I,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(T,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Ea;return[a.createElementVNode("div",K0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ea=Object.keys(he))==null?void 0:Ea.filter(ca=>{var wa;return(wa=H.value)==null?void 0:wa.find(Ca=>(Ca==null?void 0:Ca.value)===ca)}),ca=>{var wa,Ca;return a.openBlock(),a.createElementBlock("div",{key:ca},[U[ca]=="radio"?(a.openBlock(),a.createElementBlock("div",G0,[v[19]||(v[19]=a.createElementVNode("div",null,"固定:",-1)),a.createVNode(ie,{"model-value":he==null?void 0:he[ca],onChange:A=>Nn(A,ca,he)},{default:a.withCtx(()=>{var A,J;return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((J=(A=H.value)==null?void 0:A.find($e=>($e==null?void 0:$e.value)===ca))==null?void 0:J.options,$e=>(a.openBlock(),a.createBlock(oe,{key:$e==null?void 0:$e.value,label:$e==null?void 0:$e.value,value:$e==null?void 0:$e.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString($e==null?void 0:$e.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):a.createCommentVNode("",!0),U[ca]=="switch"?(a.openBlock(),a.createBlock(F,{key:1,"model-value":he==null?void 0:he[ca],"active-text":(Ca=(wa=H.value)==null?void 0:wa.find(A=>(A==null?void 0:A.value)===ca))==null?void 0:Ca.label,onChange:A=>Nn(A,ca,he)},null,8,["model-value","active-text","onChange"])):a.createCommentVNode("",!0)])}),128))])]}),_:2},1024),a.createElementVNode("span",Y0,[a.createVNode(T,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(he=>{var Ea,ca,wa,Ca,A,J,$e,oa,xe,ta,Na,tl,Ya,ul,dl,Vl,Ka,vl,Va,sl;return[((Ea=he==null?void 0:he.column)==null?void 0:Ea.label)==="证书附件"||((ca=he==null?void 0:he.column)==null?void 0:ca.prop)==="证书附件"?(a.openBlock(),a.createElementBlock("div",J0,[a.createVNode(T,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Xa=>Jr(he),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Cu(he)?(a.openBlock(),a.createBlock(I,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",X0,a.toDisplayString(Ur(he)),1)]),default:a.withCtx(()=>{var Xa,cl;return[a.createElementVNode("div",Z0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((cl=he==null?void 0:he.row)==null?void 0:cl[(Xa=he==null?void 0:he.column)==null?void 0:Xa.prop],_l=>(a.openBlock(),a.createElementBlock("div",Q0,[a.createElementVNode("div",{class:"prop-url",title:lo(_l),onClick:Nl=>Yi(_l)},a.toDisplayString(lo(_l)),9,e3),a.createElementVNode("div",{class:"prop-download",onClick:Nl=>fo(_l)}," 下载 ",8,a3)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[Du(he)?(a.openBlock(),a.createBlock(Pu,{key:0,value:Ur(he)},null,8,["value"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"table-cell-content",style:a.normalizeStyle({color:!Array.isArray(Ur(he))&&((Ca=(wa=Ur(he))==null?void 0:wa.toString())!=null&&Ca.includes(".txt")||(J=(A=Ur(he))==null?void 0:A.toString())!=null&&J.includes(".cpt")||(oa=($e=Ur(he))==null?void 0:$e.toString())!=null&&oa.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ur(he))&&((ta=(xe=Ur(he))==null?void 0:xe.toString())!=null&&ta.includes(".txt")||(tl=(Na=Ur(he))==null?void 0:Na.toString())!=null&&tl.includes(".cpt")||(ul=(Ya=Ur(he))==null?void 0:Ya.toString())!=null&&ul.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ur(he))&&((Vl=(dl=Ur(he))==null?void 0:dl.toString())!=null&&Vl.includes(".txt")||(vl=(Ka=Ur(he))==null?void 0:Ka.toString())!=null&&vl.includes(".cpt")||(sl=(Va=Ur(he))==null?void 0:Va.toString())!=null&&sl.includes(".cyd"))?"pointer":"",marginLeft:(he==null?void 0:he.colIndex)===0?`${((he==null?void 0:he.level)??0)*20}px`:0}),onClick:Xa=>{var cl;return On(Ur(he),((cl=he==null?void 0:he.column)==null?void 0:cl.relatedPages)??[])}},a.toDisplayString(Ur(he)===0?"0":Ur(he)),13,l3))],64))]}),_:2},[((ga=Oa.value)==null?void 0:ga.length)>0?{name:"actions",fn:a.withCtx(({item:he,fIndex:Ea})=>[a.createVNode(I,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(T,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=a.withModifiers(()=>{},["stop"]))})]),default:a.withCtx(()=>[a.createElementVNode("div",F0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Ji(Oa.value,he),(ca,wa)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:wa,onClick:a.withModifiers(Ca=>$n(ca==null?void 0:ca.label,he,{extra:ca}),["stop"])},[a.createElementVNode("div",{style:a.normalizeStyle({color:ca==null?void 0:ca.textColor}),class:"extra-button-label"},a.toDisplayString(ca==null?void 0:ca.label),5)],8,P0))),128))])]),_:2},1024)]),key:"0"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection","bottomButton"])):a.createCommentVNode("",!0),Al.value?(a.openBlock(),a.createElementBlock("div",r3,[a.createVNode(_e,{id:"themeBorderButton",onClick:Ui},{default:a.withCtx(()=>v[22]||(v[22]=[a.createTextVNode("取消")])),_:1,__:[22]}),a.createVNode(_e,{class:"ok-button",id:"themeButton",onClick:Mo},{default:a.withCtx(()=>v[23]||(v[23]=[a.createTextVNode("保存")])),_:1,__:[23]})])):a.createCommentVNode("",!0),a.createVNode(wr.ssDialog,{title:ne.value,visible:Ue.value,width:Wl.value,onBeforeDestroy:ri,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",n3,[a.createVNode(il.ssForm,{ref_key:"formRef",ref:Je,rowContents:Ha.value,showOperator:!1,onChange:fu,isEnableWrap:!1,onFixChangeValue:Oo,onClickTrigger:ni,isEdit:We.value,onBlurChange:Wi,onCreate:ai,onTagChange:an},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Pa.value?(a.openBlock(),a.createElementBlock("div",o3,[a.createVNode(_e,{onClick:v[4]||(v[4]=he=>Ue.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>v[24]||(v[24]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[24]}),a.createVNode(_e,{class:"ok-button",onClick:v[5]||(v[5]=he=>Vo(!0)),id:"themeButton"},{default:a.withCtx(()=>v[25]||(v[25]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[25]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(wr.ssDialog,{title:ne.value,visible:Oe.value,width:za.value,onBeforeDestroy:v[7]||(v[7]=he=>Oe.value=!1)},{default:a.withCtx(()=>[a.createVNode(Bf)]),footer:a.withCtx(()=>[a.createElementVNode("div",i3,[a.createVNode(_e,{onClick:v[6]||(v[6]=he=>Oe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>v[26]||(v[26]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[26]}),a.createVNode(_e,{class:"ok-button",onClick:Lo,id:"themeButton"},{default:a.withCtx(()=>v[27]||(v[27]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),Ma.value?(a.openBlock(),a.createBlock(il.ssFilePreview,{key:2,fileDataList:re.value,onDestroy:Bn},null,8,["fileDataList"])):a.createCommentVNode("",!0),Ee.value?(a.openBlock(),a.createBlock(wr.ssDialog,{key:3,visible:Ee.value,onBeforeDestroy:uu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(Ci.ThreeViewerHost,{files:ka.value,threeData:ye.value},null,8,["files","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(wr.ssDialog,{title:"OCR扫描录入",visible:Da.value,"close-on-click-modal":!1,onBeforeDestroy:nl,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:a.withCtx(()=>[v[38]||(v[38]=a.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),a.createElementVNode("div",t3,[a.createElementVNode("div",s3,[a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ke.value===1}])},v[28]||(v[28]=[a.createElementVNode("div",{class:"step-circle"},"1",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),v[31]||(v[31]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ke.value===2}])},v[29]||(v[29]=[a.createElementVNode("div",{class:"step-circle"},"2",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),v[32]||(v[32]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ke.value===3}])},v[30]||(v[30]=[a.createElementVNode("div",{class:"step-circle"},"3",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),ke.value===1?(a.openBlock(),a.createElementBlock("div",c3,[a.createVNode(_e,{onClick:nt,class:"ocr-action-btn",disabled:Ua.value,size:"default"},{default:a.withCtx(()=>v[33]||(v[33]=[a.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),a.createVNode(_e,{onClick:Ul,class:"ocr-action-btn",disabled:Ua.value,size:"default"},{default:a.withCtx(()=>v[34]||(v[34]=[a.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):a.createCommentVNode("",!0),ke.value===1?(a.openBlock(),a.createElementBlock("div",u3,[a.createElementVNode("div",d3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(al.value,(he,Ea)=>{var ca;return a.openBlock(),a.createElementBlock("div",{key:Ea,class:"ocr-file-item"},[a.createElementVNode("div",p3,[he.raw&&((ca=he.raw.type)!=null&&ca.startsWith("image/"))?(a.openBlock(),a.createElementBlock("img",{key:0,src:kl(he),alt:"预览",class:"thumbnail-image"},null,8,f3)):(a.openBlock(),a.createElementBlock("div",h3,[a.createVNode(Ce,{size:40},{default:a.withCtx(()=>[a.createVNode(a.unref(Ga.document_default))]),_:1})])),a.createElementVNode("div",{class:a.normalizeClass(["file-progress-ring",{uploading:ol(he)==="uploading",processing:ol(he)==="processing",completed:ol(he)==="completed"||ol(he)==="uploaded",failed:ol(he)==="failed"}])},[(a.openBlock(),a.createElementBlock("svg",v3,[v[35]||(v[35]=a.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),a.createElementVNode("circle",{class:a.normalizeClass(["progress-ring-fill",{completed:ol(he)==="completed"||ol(he)==="uploaded",uploading:ol(he)==="uploading",processing:ol(he)==="processing",failed:ol(he)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:ol(he)==="failed"?"#f56c6c":ol(he)==="completed"||ol(he)==="uploaded"?"#67c23a":"#409eff","stroke-width":ol(he)==="completed"||ol(he)==="uploaded"||ol(he)==="failed"?3:2,"stroke-dasharray":Xl(he),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,m3)])),ol(he)==="completed"||ol(he)==="uploaded"?(a.openBlock(),a.createElementBlock("div",y3,[a.createVNode(Ce,{class:"check-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ga.check_default))]),_:1})])):a.createCommentVNode("",!0),ol(he)==="failed"?(a.openBlock(),a.createElementBlock("div",g3,[a.createVNode(Ce,{class:"error-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ga.close_default))]),_:1})])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:"file-delete-btn",onClick:wa=>mo(Ea)},[a.createVNode(Ce,null,{default:a.withCtx(()=>[a.createVNode(a.unref(Ga.close_default))]),_:1})],8,b3)]),a.createElementVNode("div",k3,a.toDisplayString(he.name||"文件名123"),1)])}),128))]),al.value.length>0?(a.openBlock(),a.createElementBlock("div",x3,[a.createVNode(_e,{onClick:ge,class:"ocr-start-recognize-btn",disabled:Ua.value||al.value.length===0,size:"default"},{default:a.withCtx(()=>v[36]||(v[36]=[a.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),ke.value===1?(a.openBlock(),a.createElementBlock("div",w3,[a.createVNode(je,{percentage:X.value,"stroke-width":8},null,8,["percentage"])])):a.createCommentVNode("",!0),ke.value===2?(a.openBlock(),a.createElementBlock("div",_3,[a.createElementVNode("div",S3,[a.createVNode(Pe,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",E3,[a.createVNode(va,{data:Qe.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(Xe,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Ie.value,he=>(a.openBlock(),a.createBlock(Xe,{key:he.prop,prop:he.prop,"min-width":he.minWidth||230,"class-name":he.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",C3,[a.createElementVNode("span",null,a.toDisplayString(he.label),1)])]),default:a.withCtx(({row:Ea,$index:ca})=>{var wa,Ca,A;return[he.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:rl(Ea[he.prop]),fontWeight:500})},a.toDisplayString(Aa(Ea[he.prop])),5)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Sa.value!==ca?(a.openBlock(),a.createElementBlock("span",D3,a.toDisplayString(Ea[he.prop]),1)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ll(he.prop)),{key:1,modelValue:Ea[he.prop],"onUpdate:modelValue":J=>Ea[he.prop]=J,size:"small",placeholder:"请输入"+he.label,content:((wa=xl(he.prop))==null?void 0:wa.contents)??((Ca=xl(he.prop))==null?void 0:Ca.options)??[],optionUrl:(A=xl(he.prop))==null?void 0:A.optionUrl,onChange:J=>ea(ca,he.prop,J),onFocus:J=>me.value=he.prop,onBlur:v[8]||(v[8]=J=>me.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),a.createVNode(Xe,{label:"编辑",width:"80",fixed:"right"},{default:a.withCtx(({$index:he})=>[Sa.value===he?(a.openBlock(),a.createBlock(Ce,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:a.withModifiers(Ea=>Ja(he),["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(Ga.check_default))]),_:2},1032,["onClick"])):(a.openBlock(),a.createBlock(T,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:a.withModifiers(Ea=>Ja(he),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0),ke.value===3?(a.openBlock(),a.createElementBlock("div",N3,[a.createVNode(Ce,{size:"32",class:"ocr-success-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ga.check_default))]),_:1}),v[37]||(v[37]=a.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):a.createCommentVNode("",!0)]),a.createVNode(La,{ref:"ocrUploadRef","file-list":al.value,"onUpdate:fileList":v[9]||(v[9]=he=>al.value=he),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":Y,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:a.withCtx(()=>[ke.value!==3?(a.openBlock(),a.createElementBlock("div",B3,[a.createVNode(_e,{onClick:Hr,class:"ocr-start-recognize-btn",disabled:ke.value===1||Ua.value},{default:a.withCtx(()=>v[39]||(v[39]=[a.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),a.createVNode(_e,{onClick:_r,class:"ocr-start-recognize-btn",disabled:Ua.value},{default:a.withCtx(()=>v[40]||(v[40]=[a.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):a.createCommentVNode("",!0)]),_:1},8,["visible"]),a.createVNode(Kf,{visible:vo.value,onConfirm:ot,onCancel:v[10]||(v[10]=he=>vo.value=!1)},null,8,["visible"]),a.createVNode(wd,{visible:Me.value,"onUpdate:visible":v[11]||(v[11]=he=>Me.value=he),versions:na.value},null,8,["visible","versions"]),a.createVNode(sd,{visible:xa.value,"onUpdate:visible":v[12]||(v[12]=he=>xa.value=he),images:wl.value,"default-image-name":Rl.value,"field-meta":Sa.value!==null?((Fa=Qe.value[Sa.value])==null?void 0:Fa.__ocrFieldMeta)||{}:{},"focused-field-name":me.value,onClose:v[13]||(v[13]=he=>xa.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),a.createVNode(Od,{visible:Fl.value,"onUpdate:visible":v[14]||(v[14]=he=>Fl.value=he),candidates:or.value,"name-prop":rr.value,"mfr-prop":en.value,columns:de.value,onSubmit:Ir,onPreviewFile:tn},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),a.createVNode(jd,{visible:aa.value,"onUpdate:visible":v[15]||(v[15]=he=>aa.value=he),ocrPreviewData:Qe.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=he=>Qe.value=he),ocrSelectedFields:Wa.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=he=>Wa.value=he),ocrPreviewColumns:Ie.value,onConfirm:Se,onFieldChange:v[18]||(v[18]=({rowIndex:he,prop:Ea,value:ca})=>ea(he,Ea,ca))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),a.createVNode(wr.ssDialog,{title:t.title,visible:t.show,width:t.width,onBeforeDestroy:_},{default:a.withCtx(()=>[a.createElementVNode("div",T3,[a.createVNode(il.ssForm,{rowContents:t==null?void 0:t.contents,formRules:t==null?void 0:t.formRules,showOperator:!1,buttonValue:t.buttonValue,isEdit:We.value,isStartJustify:!1,onOnButtonClick:L},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),a.createVNode(wr.ssDialog,{title:i.title,visible:i.show,width:i.width,alignCenter:!0,onBeforeDestroy:p},{header:a.withCtx(()=>[a.createVNode(qa,{size:"small",type:"danger",style:{width:"100%"}},{default:a.withCtx(()=>v[41]||(v[41]=[a.createTextVNode("(选择【覆盖】,可能会影响到原数据的引用关系;选择【取消】将会放弃重复数据的导入。请谨慎操作!)")])),_:1,__:[41]})]),footer:a.withCtx(()=>[a.createElementVNode("div",A3,[a.createVNode(qa,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:a.withCtx(()=>[a.createTextVNode("引用模块:"+a.toDisplayString(Mn.value||"暂无"),1)]),_:1}),a.createElementVNode("div",z3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i==null?void 0:i.buttonValue,he=>(a.openBlock(),a.createBlock(_e,{key:he==null?void 0:he.label,style:a.normalizeStyle({background:he==null?void 0:he.background,color:he==null?void 0:he.color}),onClick:Ea=>b(he==null?void 0:he.value)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(he==null?void 0:he.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:a.withCtx(()=>[a.createVNode(gf,{columns:i==null?void 0:i.columns,tableData:i==null?void 0:i.tableData},{content:a.withCtx(({row:he,item:Ea,slotData:ca,scope:wa,column:Ca,columnProp:A,$index:J})=>[a.createTextVNode(a.toDisplayString((he==null?void 0:he[(Ca==null?void 0:Ca.prop)||(Ca==null?void 0:Ca.label)])||(ca==null?void 0:ca[Ca==null?void 0:Ca.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["title","visible","width"])])}}},Tc=Jl._export_sfc(I3,[["__scopeId","data-v-25a8b813"]]),O3={key:1,class:"static-form-body"},L3=["onClick"],$3={key:1},R3=a.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0}},emits:["update:backGroundImage"],setup(l,{emit:r}){const n=l,o=r,s=k=>{switch(k){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},c=a.computed(()=>{var R;const k=(R=n.itemData)==null?void 0:R.find(G=>(G==null?void 0:G.key)==="formContent"),g=(k==null?void 0:k.contents)||[];return(n.fields&&n.fields.length>0?n.fields:g).filter(G=>(G==null?void 0:G.label)||(G==null?void 0:G.isHideInForm)).map(G=>{let ue=G==null?void 0:G.value;Array.isArray(ue)&&(ue=ue.map(pe=>pe==null?"":typeof pe=="object"?pe.label??pe.value??pe.name??JSON.stringify(pe):String(pe)).filter(Boolean).join(",")),ue!=null&&typeof ue=="object"&&(ue=ue.label??ue.value??ue.name??JSON.stringify(ue));const Be=G.isHideInForm?"":G.label??"",de=ue==null||ue===""?"-":String(ue),Z=Be==="使用状态";return{label:Be,value:de,isStatus:Z,tagType:Z?s(de):"",width:G.width??1,field:G}})}),m=a.ref(null),f=a.ref(null),h=k=>{if(Array.isArray(k)&&k.length>=3){const[g,M,R,G]=k;return G!==void 0?`rgba(${g}, ${M}, ${R}, ${G})`:`rgb(${g}, ${M}, ${R})`}if(typeof k=="string"){const g=k.trim();if(g.startsWith("[")&&g.endsWith("]")){const M=g.slice(1,-1).split(",").map(R=>Number(R.trim()));if(M.length>=3&&M.every(R=>!Number.isNaN(R))){const[R,G,ue,Be]=M;return Be!==void 0?`rgba(${R}, ${G}, ${ue}, ${Be})`:`rgb(${R}, ${G}, ${ue})`}}return g}},y=a.computed(()=>{const k=Number(n==null?void 0:n.textSize),g=h(n==null?void 0:n.textColor),M={},R={},G={},ue={};return!Number.isNaN(k)&&k&&(M.fontSize=`${k}px`,R.fontSize=`${k+1}px`,G.fontSize=`${k}px`,ue.fontSize=`${k}px`),g&&(R.color=g,G.color=g,ue.color=g),{item:M,label:R,value:G,empty:ue}}),u=a.ref(""),w=a.ref(""),N=a.ref(!1),j=async k=>{if(k){w.value&&(URL.revokeObjectURL(w.value),w.value="");try{const g=await $.platformDownloadFile({url:k}),M=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});w.value=URL.createObjectURL(M)}catch{w.value=""}}};a.watch(()=>n==null?void 0:n.backGroundImage,k=>{k&&(u.value=k)},{immediate:!0}),a.watch(u,k=>{j(k)},{immediate:!0});const C=()=>{var k;(k=f.value)==null||k.click()},W=async k=>{var R,G,ue;const g=k.target,M=(R=g==null?void 0:g.files)==null?void 0:R[0];if(!M){g.value="";return}N.value=!0;try{const Be=new FormData;Be.append("file",M);const de=await $.platformUploadFile(Be),Z=(ue=(G=de==null?void 0:de.data)==null?void 0:G.result)==null?void 0:ue.url;Z?(u.value=Z,o("update:backGroundImage",Z),j(Z),Ga.ElMessage.success("背景图片上传成功")):Ga.ElMessage.error("背景图片上传失败")}catch{Ga.ElMessage.error("背景图片上传失败")}finally{N.value=!1,g.value=""}},O=a.computed(()=>w.value?{backgroundImage:`url(${w.value})`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),U=k=>il.getComponent(k),H=k=>{if(!k)return;const g=k.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},D=(k,g,M)=>{n.disabled||(m.value=g,a.nextTick(()=>{H(M.currentTarget)}))},S=()=>{m.value=null},E=k=>{const g=k!=null&&k.width&&k.width>0?k.width:1,R=`calc((100% - ${(g-1)*48}px) / ${g})`;return{flex:`0 0 ${R}`,maxWidth:R,minWidth:"0",boxSizing:"border-box"}};return(k,g)=>{const M=a.resolveComponent("el-tag");return a.openBlock(),a.createElementBlock("div",{class:"static-form-card",style:a.normalizeStyle(O.value),onClick:g[2]||(g[2]=R=>(n==null?void 0:n.backGround)==="Yes"&&C())},[(n==null?void 0:n.backGround)==="Yes"?(a.openBlock(),a.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:g[0]||(g[0]=a.withModifiers(R=>C(),["stop"]))},[a.createElementVNode("input",{ref_key:"bgUploadRef",ref:f,type:"file",accept:"image/*",style:{display:"none"},onChange:W},null,544),g[3]||(g[3]=a.createElementVNode("img",{src:il._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):a.createCommentVNode("",!0),c.value.length?(a.openBlock(),a.createElementBlock("div",O3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,(R,G)=>{var ue,Be,de,Z,pe,ae,ce,Ee;return a.openBlock(),a.createElementBlock("div",{key:G,class:"static-form-item",style:a.normalizeStyle({...E(R),...y.value.item}),onClick:g[1]||(g[1]=a.withModifiers(()=>{},["stop"]))},[R.label?(a.openBlock(),a.createElementBlock("div",{key:0,class:"static-form-label",style:a.normalizeStyle(y.value.label)},a.toDisplayString(R.label)+": ",5)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"static-form-value",style:a.normalizeStyle(y.value.value),onClick:Ve=>D(R,G,Ve)},[m.value===G&&R.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(U(((ue=R.field)==null?void 0:ue.type)??"Input")),{key:0,modelValue:R.field.value,"onUpdate:modelValue":Ve=>R.field.value=Ve,isEdit:!0,disabled:(Be=R.field)==null?void 0:Be.disabled,content:((de=R.field)==null?void 0:de.contents)??[],optionUrl:R.field,originalValue:(Z=R.field)==null?void 0:Z.value,config:(pe=R.field)==null?void 0:pe.config,configModel:((ae=R.field)==null?void 0:ae.prop)??((ce=R.field)==null?void 0:ce.name),selectedTagList:((Ee=R.field)==null?void 0:Ee.selectValue)??[],onBlur:S,onBlurChange:S},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[R.isStatus?(a.openBlock(),a.createBlock(M,{key:0,type:R.tagType,size:"Default",effect:"plain"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(R.value??"-"),1)]),_:2},1032,["type"])):(a.openBlock(),a.createElementBlock("span",$3,a.toDisplayString(R.value??"-"),1))],64))],12,L3)],4)}),128))])):(a.openBlock(),a.createElementBlock("div",{key:2,class:"static-form-empty",style:a.normalizeStyle(y.value.empty)}," 暂无数据 ",4))],4)}}}),Ac=Jl._export_sfc(R3,[["__scopeId","data-v-195b0dcc"]]),V3={class:"form-content"},F3={title:"选择标签"},P3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},j3={class:"col-operate-wrap"},H3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},U3={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object},config:{type:Object,default:()=>{}}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(l,{emit:r}){const n=()=>{m.value=!1,f.value=!1,h.value=[]},o=l;a.computed(()=>{var ne;const x=(ne=be.value)==null?void 0:ne.split("/");return(x==null?void 0:x.some(Ue=>(Ue==null?void 0:Ue.includes("updateLoading"))||(Ue==null?void 0:Ue.includes("loading"))))?!1:Ee.value==="view"});const s=r,c=a.ref([]),m=a.ref(!1),f=a.ref(!1),h=a.ref([]),{getFileExtension:y}=Ci.useThreeSystem(),u=a.ref(),w=a.ref(!1),N=a.ref(!1),j=$.useUnit($.pinia),{chooseTitle:C}=$.storeToRefs(j),W=a.ref([]),O=a.ref(),U=a.ref(!1),H=a.ref([]),D=dc($.pinia),S=Bt($.pinia),E=a.ref(!1),k=a.ref(),g=a.ref(),M=a.ref(),R=a.ref(),G=a.ref(),ue=$.useLoginState($.pinia),{loginUserInfo:Be}=$.storeToRefs(ue),de=a.ref(),Z=a.ref(!0),pe=$.useModelComp($.pinia),{tableViewContents:ae,itemData:ce,isEdit:Ee,routeToChildPath:Ve,lockingPage:ye}=$.storeToRefs(pe),z=a.ref(null),q=a.ref(!1),le=a.ref(!1),De=$.useMenuState(),{activeMenuPath:be}=$.storeToRefs(De),Ye=ia.useOriginalState($.pinia),{originalPath:da}=$.storeToRefs(Ye),{compType:Ma,hasEditable:re}=Xs.useRole(),Ne=()=>!re(o.config,{type:Ma.FORM});a.computed(()=>be.value==="设备管理/试验设备"&&o.compName==="设备概要");const Te=a.ref([]),qe=a.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Re=async x=>{le.value=x,await P("disabled",null,x,!0)},te=async x=>{await P("operable",null,x,!0)};a.watch(()=>be.value,async()=>{c.value=[],h.value=[]},{deep:!0,immediate:!0});const Le=()=>{a.nextTick(()=>{V()})},He=x=>{var Ae;c.value=(Ae=c.value)==null?void 0:Ae.map(ne=>({...ne,isFormColHidden:!(x!=null&&x.includes(ne.label))}))};a.onUnmounted(()=>{z.value=null});const Ba=x=>{s("clickTrigger",x)},Ia=async x=>{var Ae,ne,Ue,Je,ra,Oe;if(x===""){let za="";(Ae=c.value)==null||Ae.forEach(ka=>{ka!=null&&ka.isMain&&(za=ka==null?void 0:ka.value)});let fa=await ia.getItemData(Ve.value,sessionStorage.getItem("systemKey"),"");za=((Oe=(ra=(Je=(Ue=(ne=fa==null?void 0:fa[0])==null?void 0:ne.compData)==null?void 0:Ue.find(ka=>(ka==null?void 0:ka.key)==="mainRouters"))==null?void 0:Je.contents)==null?void 0:ra[0])==null?void 0:Oe.routerContent)+da.value+za;let Pa=await ia.getItemData(za,sessionStorage.getItem("systemKey"),"");U.value=!0,H.value=Pa==null?void 0:Pa.filter(ka=>(ka==null?void 0:ka.comp)!=="methodButton"),s("routeUrl",H.value)}},V=()=>{var Ae;const x=(Ae=z.value)==null?void 0:Ae.$el;x&&la.Sortable.create(x,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ne=>{const{oldIndex:Ue,newIndex:Je}=ne;if(Ue===Je)return;const ra=c.value.splice(Ue,1)[0];c.value.splice(Je,0,ra)}})},P=async(x,Ae,ne,Ue=!1)=>{try{pe.setRefreshCurStructure(!1)}catch{Ga.ElMessage.error("编辑处理失败")}},ee=async(x,Ae)=>{await P()},fe=async(x,Ae)=>{x&&await P()},ve=async(x,Ae,ne)=>{await P(Ae,ne,x,!1)},ha=(x,Ae)=>{de.value===Ae?Z.value=!1:Z.value=!0,de.value=Ae==null?void 0:Ae.changeProp},Ze=x=>{R.value=x;const Ae=o.itemData,ne=Ae==null?void 0:Ae.find(Ue=>(Ue==null?void 0:Ue.key)==="backGroundImage");ne?ne.contents=x:Ae==null||Ae.push({key:"backGroundImage",contents:x}),s("change",{key:"backGroundImage",contents:x})},se=async x=>{var ne,Ue,Je,ra,Oe,za,fa,Oa,Pa,ka,ua,ma,Ha,pl,$l;let Ae=[];if((ne=x==null?void 0:x.toString())!=null&&ne.includes(".urdf")){if(x.includes(",")){Ga.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[{url:x,extension:y(x)}],f.value=!0,m.value=!0;return}if((Ue=x==null?void 0:x.toString())!=null&&Ue.includes(".stl")||(Je=x==null?void 0:x.toString())!=null&&Je.includes(".STL")||(ra=x==null?void 0:x.toString())!=null&&ra.includes(".obj")||(Oe=x==null?void 0:x.toString())!=null&&Oe.includes(".mtl")){const Ol=((za=x==null?void 0:x.toString())==null?void 0:za.split(",")).map($a=>({url:$a,extension:y($a)}));h.value=Ol,f.value=!1,m.value=!0;return}if((fa=x==null?void 0:x.toString())!=null&&fa.includes(".stl")||(Oa=x==null?void 0:x.toString())!=null&&Oa.includes(".STL")||(Pa=x==null?void 0:x.toString())!=null&&Pa.includes(".obj")||(ka=x==null?void 0:x.toString())!=null&&ka.includes(".mtl")){let gl,Ol=[],$a={};if(Array.isArray(x)?gl=x:gl=x==null?void 0:x.split(","),gl==null||gl.forEach(jl=>{jl.includes(".mtl")?Ol.push(jl):$a.blob=$a.blob?$a.blob+","+jl:jl}),(Ol==null?void 0:Ol.length)>0&&($a.mtlBlobs=Ol),(ma=(ua=Object.values($a))==null?void 0:ua[0])!=null&&ma.includes("http:"))Ae.push($a);else{const jl=new Blob([$a.blob],{type:"application/octet-stream;charset=UTF-8"});let Zl=URL.createObjectURL(jl),ja="";(Ha=x==null?void 0:x.split("/"))==null||Ha.forEach((ba,Da)=>{var Ua;Da===((Ua=x==null?void 0:x.split("/"))==null?void 0:Ua.length)-1&&(ja=ba)}),(pl=$a.blob)!=null&&pl.includes(".stl")&&(ja=(ja==null?void 0:ja.replaceAll(">",""))+".urdf"),O.value=[{name:ja,blobUrl:Zl}],N.value=!0}}else{const gl=jo.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ol=await Ga.axios.get(x,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{gl.close()}),$a=new Blob([Ol.data],{type:"application/octet-stream;charset=UTF-8"});let jl=URL.createObjectURL($a),Zl="";($l=x==null?void 0:x.split("/"))==null||$l.forEach((ja,ba)=>{var Da;ba===((Da=x==null?void 0:x.split("/"))==null?void 0:Da.length)-1&&(Zl=ja)}),O.value=[{name:Zl,blobUrl:jl}],N.value=!0}(Ae==null?void 0:Ae.length)>0&&S.setBlobUrls(Ae)},we=()=>{N.value=!1},ya=x=>{var ra,Oe,za,fa;const Ae=(Oe=(ra=il.safeClone(o.itemData))==null?void 0:ra.find(Oa=>(Oa==null?void 0:Oa.key)==="formContent"))==null?void 0:Oe.contents,ne=il.safeClone(x.content);let Ue={};ne&&((za=Object.values(ne))==null?void 0:za.length)>0&&((fa=Object.values(ne))==null||fa.forEach((Oa,Pa)=>{Ue[Ae[Pa].key]=Oa}));const Je={content:Ue,index:o==null?void 0:o.index,buttonName:x==null?void 0:x.buttonName};s("change",Je)};a.computed(()=>"http://222.92.178.198:62001");const ze=async x=>{var ua,ma,Ha,pl,$l,gl,Ol,$a,jl,Zl,ja,ba,Da,Ua,al,Za;if(!x)return;(ma=(ua=o==null?void 0:o.itemData)==null?void 0:ua.find(Me=>(Me==null?void 0:Me.key)==="parentFormPath"))==null||ma.contents;let Ae=ae.value;(Ae==null?void 0:Ae.length)>0&&(Ae=Ae==null?void 0:Ae.map(Me=>{var ke,Ta,Ge,X;let na=(ke=Me==null?void 0:Me.key)==null?void 0:ke.split("/");return(o==null?void 0:o.compName)===(na==null?void 0:na[0])&&(Ta=c.value)!=null&&Ta.find(aa=>(aa==null?void 0:aa.prop)===(na==null?void 0:na[1]))&&(Me.value=(X=(Ge=c.value)==null?void 0:Ge.find(aa=>(aa==null?void 0:aa.prop)===(na==null?void 0:na[1])))==null?void 0:X.value),Me}),pe.setTableViewContents(Ae));const ne=il.safeClone(o.itemData);let Ue=ne==null?void 0:ne.map(Me=>{var na;return(Me==null?void 0:Me.key)==="formContent"&&((na=Me.contents)==null||na.map((ke,Ta)=>{var Ge,X,aa,Qe,Ie,xl,ll,hl,Ra,Wa,Sa,me,xa,wl,Rl,Fl,or,gr,Cl,sr,Tr;return ke.type=(X=(Ge=c.value)==null?void 0:Ge.find(Ml=>(Ml==null?void 0:Ml.prop)===(ke==null?void 0:ke.prop)))==null?void 0:X.type,ke.options=ke!=null&&ke.options?ke.options:((Ie=(Qe=(aa=ke==null?void 0:ke.key)==null?void 0:aa.split("$"))==null?void 0:Qe[1])==null?void 0:Ie.length)>0?(Ra=(hl=Ru((ll=(xl=ke==null?void 0:ke.key)==null?void 0:xl.split("$"))==null?void 0:ll[1]))==null?void 0:hl.split(","))==null?void 0:Ra.map(Ml=>({label:Ml,value:Ml})):[],(Wa=ke==null?void 0:ke.key)!=null&&Wa.includes("$")&&(ke.key=(me=(Sa=ke==null?void 0:ke.key)==null?void 0:Sa.split("$"))==null?void 0:me[0]),ke.signature=(wl=(xa=c.value)==null?void 0:xa.find(Ml=>(Ml==null?void 0:Ml.prop)===(ke==null?void 0:ke.prop)))==null?void 0:wl.signature,ke.isLoginUser=(Fl=(Rl=c.value)==null?void 0:Rl.find(Ml=>(Ml==null?void 0:Ml.prop)===(ke==null?void 0:ke.prop)))==null?void 0:Fl.isLoginUser,ke.value=(or=Object.values(x))==null?void 0:or[Ta],ke.isFormColHidden=(Cl=(gr=c.value)==null?void 0:gr.find(Ml=>(Ml==null?void 0:Ml.prop)===(ke==null?void 0:ke.prop)))==null?void 0:Cl.isFormColHidden,ke.isHideInForm=(Tr=(sr=c.value)==null?void 0:sr.find(Ml=>(Ml==null?void 0:Ml.prop)===(ke==null?void 0:ke.prop)))==null?void 0:Tr.isHideInForm,ke})),Me}),Je=c.value,ra=(pl=(Ha=il.safeClone(Ue))==null?void 0:Ha.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:pl.contents;if(Je=Je==null?void 0:Je.map(Me=>{var na,ke;return(Me==null?void 0:Me.type)==="Select"&&((na=Me==null?void 0:Me.allSelectionContents)==null?void 0:na.length)>0&&(Me.contactValue=x),Me.value=(ke=ra==null?void 0:ra.find((Ta,Ge)=>((Ta==null?void 0:Ta.id)??Ge)===(Me==null?void 0:Me.id)))==null?void 0:ke.value,Me}),!Z.value){s("contentChange",{contents:Ue,index:o.index});return}let Oe="",za=(Ol=(gl=($l=il.safeClone(Ue))==null?void 0:$l.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:gl.contents)==null?void 0:Ol.find((Me,na)=>{var ke,Ta,Ge;return(Me==null?void 0:Me.label)===de.value||na.toString()===((Ge=(Ta=(ke=de.value)==null?void 0:ke.split("t"))==null?void 0:Ta[1])==null?void 0:Ge.toString())}),fa=($a=za==null?void 0:za.optionUrl)==null?void 0:$a.menuSelect,Oa=!0;if((ja=(Zl=(jl=il.safeClone(Ue))==null?void 0:jl.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:Zl.contents)==null||ja.forEach(Me=>{var na,ke,Ta,Ge,X,aa;Oa&&((Ta=(ke=(na=Me==null?void 0:Me.optionUrl)==null?void 0:na.groupSelect)==null?void 0:ke[1])!=null&&Ta.includes("["))&&(Oe=(X=(Ge=Me==null?void 0:Me.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:X[1],JSON.stringify(fa)===JSON.stringify((aa=Me==null?void 0:Me.optionUrl)==null?void 0:aa.menuSelect)&&(Oa=!1))}),(ba=za==null?void 0:za.optionUrl)!=null&&ba.menuSelect&&Z.value){let Me=await kt(za),na,ke=(Da=za==null?void 0:za.optionUrl)==null?void 0:Da.menuSelect;if(Me==null||Me.forEach(Ta=>{var Ge,X,aa,Qe,Ie,xl,ll,hl,Ra,Wa;Oe===((X=(Ge=za==null?void 0:za.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:X[1])&&((Ie=(Qe=(aa=za==null?void 0:za.optionUrl)==null?void 0:aa.groupSelect)==null?void 0:Qe[1])!=null&&Ie.includes("["))&&((Wa=il.safeClone(Ta))==null?void 0:Wa[(Ra=(hl=(ll=(xl=za==null?void 0:za.optionUrl)==null?void 0:xl.groupSelect)==null?void 0:ll[1])==null?void 0:hl.replaceAll("[",""))==null?void 0:Ra.replaceAll("]","")])===(za==null?void 0:za.value)&&(na=Ta)}),na){let Ta=il.safeClone(Je);Ta=Ta==null?void 0:Ta.map(X=>{var aa,Qe,Ie,xl,ll,hl,Ra,Wa,Sa,me,xa;return(na!=null&&na[X==null?void 0:X.label]||na!=null&&na[(xl=(Ie=(Qe=(aa=X==null?void 0:X.optionUrl)==null?void 0:aa.groupSelect)==null?void 0:Qe[1])==null?void 0:Ie.replaceAll("[",""))==null?void 0:xl.replaceAll("]","")])&&((Ra=(hl=(ll=X==null?void 0:X.optionUrl)==null?void 0:ll.groupSelect)==null?void 0:hl[1])!=null&&Ra.includes("["))&&ke!=null&&ke.every(wl=>{var Rl,Fl;return(Fl=(Rl=X==null?void 0:X.optionUrl)==null?void 0:Rl.menuSelect)==null?void 0:Fl.includes(wl)})&&(X.value=(na==null?void 0:na[X==null?void 0:X.label])||(na==null?void 0:na[(xa=(me=(Sa=(Wa=X==null?void 0:X.optionUrl)==null?void 0:Wa.groupSelect)==null?void 0:Sa[1])==null?void 0:me.replaceAll("[",""))==null?void 0:xa.replaceAll("]","")]),Array.isArray(X.value)&&X.value.every(wl=>(wl==null?void 0:wl.url)&&(wl==null?void 0:wl.name))&&(X.type="Upload")),X}),Ta=Ta==null?void 0:Ta.map(X=>{var aa,Qe,Ie;return(aa=X==null?void 0:X.optionUrl)!=null&&aa.oldMenuSelect&&(X.optionUrl.menuSelect=(Ie=(Qe=il.safeClone(X))==null?void 0:Qe.optionUrl)==null?void 0:Ie.oldMenuSelect),X}),c.value=il.safeClone(Ta);let Ge=il.safeClone(Ta);Ge=Ge==null?void 0:Ge.map(X=>{var aa,Qe,Ie,xl,ll,hl;return(Qe=(aa=X==null?void 0:X.optionUrl)==null?void 0:aa.menuSelect)!=null&&Qe.some(Ra=>Ra==null?void 0:Ra.includes("["))&&(X.optionUrl.oldMenuSelect=(xl=(Ie=il.safeClone(X))==null?void 0:Ie.optionUrl)==null?void 0:xl.menuSelect,X.optionUrl.menuSelect=(hl=(ll=X==null?void 0:X.optionUrl)==null?void 0:ll.menuSelect)==null?void 0:hl.map(Ra=>{var Wa,Sa,me,xa;if(Ra!=null&&Ra.includes("[")){let wl=(Sa=(Wa=Ra==null?void 0:Ra.replaceAll("[","").replaceAll("]",""))==null?void 0:Wa.split(":"))==null?void 0:Sa[1];Ra=(xa=(me=il.safeClone(Ta))==null?void 0:me.find(Rl=>(Rl==null?void 0:Rl.label)===wl))==null?void 0:xa.value}return Ra})),X}),c.value=Ge}else c.value=Je;Ue=Ue==null?void 0:Ue.map(Ta=>{var Ge;return(Ta==null?void 0:Ta.key)==="formContent"&&(Ta.contents=(Ge=Ta.contents)==null?void 0:Ge.map(X=>{var aa,Qe,Ie,xl;return X.value=((Qe=(aa=c.value)==null?void 0:aa.find(ll=>(ll==null?void 0:ll.label)===(X==null?void 0:X.key)))==null?void 0:Qe.value)??(X==null?void 0:X.value),X.type=((xl=(Ie=c.value)==null?void 0:Ie.find(ll=>(ll==null?void 0:ll.prop)===(X==null?void 0:X.key)))==null?void 0:xl.type)??(X==null?void 0:X.type),X})),Ta})}Z.value=!1,s("contentChange",{contents:Ue,index:o.index});let Pa=[],ka=[];if((al=il.safeClone((Ua=Ue==null?void 0:Ue.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:Ua.contents))==null||al.forEach(Me=>{var na;Array.isArray(Me==null?void 0:Me.value)&&((na=Me==null?void 0:Me.value)!=null&&na.find(ke=>{var Ta;return(Ta=ke==null?void 0:ke.url)==null?void 0:Ta.includes(".obj")}))&&(ka=Me==null?void 0:Me.value)}),(ka==null?void 0:ka.length)>0){const Me=(Za=il.safeClone(ka))==null?void 0:Za.filter(na=>{var ke;return(ke=na==null?void 0:na.url)==null?void 0:ke.includes(".obj")});Me==null||Me.forEach(na=>{var Ta,Ge,X,aa;const ke=(Ta=ka==null?void 0:ka.filter(Qe=>{var Ie;return(Qe==null?void 0:Qe.name)===(na==null?void 0:na.name)&&((Ie=Qe==null?void 0:Qe.url)==null?void 0:Ie.includes(".mtl"))}))==null?void 0:Ta.map(Qe=>Qe==null?void 0:Qe.url);Pa.push({objUrl:na==null?void 0:na.url,mtlUrls:((Ge=ka==null?void 0:ka.filter(Qe=>{var Ie;return(Qe==null?void 0:Qe.name)===(na==null?void 0:na.name)&&((Ie=Qe==null?void 0:Qe.url)==null?void 0:Ie.includes(".mtl"))}))==null?void 0:Ge.length)===1?(aa=(X=ka==null?void 0:ka.filter(Qe=>{var Ie;return(Qe==null?void 0:Qe.name)===(na==null?void 0:na.name)&&((Ie=Qe==null?void 0:Qe.url)==null?void 0:Ie.includes(".mtl"))}))==null?void 0:X[0])==null?void 0:aa.url:ke})}),S.setObjUrl(Pa)}},_a=(x,Ae,ne)=>{let Ue="";const Je=Ae==null?void 0:Ae.map(ra=>{var Oe;return(Oe=ra==null?void 0:ra.value)==null?void 0:Oe.pageData});return Je==null||Je.forEach(ra=>{var Oe;(ra==null?void 0:ra.name)===(x==null?void 0:x[0])&&((Oe=ra==null?void 0:ra.compData)==null||Oe.forEach(za=>{var fa;(za==null?void 0:za.key)==="formContent"&&((fa=za==null?void 0:za.contents)==null||fa.forEach(Oa=>{var Pa;(Oa==null?void 0:Oa.prop)===(x==null?void 0:x[1])&&(Ue=(Oa==null?void 0:Oa.value)===""?ia.judgeContents((Pa=il.safeClone(Oa))==null?void 0:Pa.optionUrl,ne):Oa==null?void 0:Oa.value)}))}))}),Ue},We=(x,Ae,ne,Ue)=>{var za,fa;let Je="",ra="";(za=il.safeClone(Ae))==null||za.forEach((Oa,Pa)=>{Oa!=null&&Oa.includes("[")?ra=ra+da.value+x[Pa]:ra=ra===""?ra+Oa:ra+"/"+Oa});let Oe=(fa=Ue[ra])==null?void 0:fa.map(Oa=>{var Pa;return(Pa=Oa==null?void 0:Oa.value)==null?void 0:Pa.pageData});return Oe==null||Oe.forEach(Oa=>{var Pa;(Oa==null?void 0:Oa.name)===(ne==null?void 0:ne[0])&&((Pa=Oa==null?void 0:Oa.compData)==null||Pa.forEach(ka=>{var ua;(ka==null?void 0:ka.key)==="formContent"&&((ua=ka==null?void 0:ka.contents)==null||ua.forEach(ma=>{(ma==null?void 0:ma.prop)===(ne==null?void 0:ne[1])&&(Je=ma==null?void 0:ma.value)}))}))}),Je};return a.watch(()=>o.itemData,async()=>{var ua,ma,Ha,pl,$l,gl,Ol,$a,jl,Zl,ja,ba,Da,Ua,al,Za,Me,na,ke,Ta,Ge,X,aa;const x=(ua=o.itemData)==null?void 0:ua.find(Qe=>(Qe==null?void 0:Qe.key)==="formContent"),Ae=(ma=il.safeClone(o.itemData))==null?void 0:ma.find(Qe=>(Qe==null?void 0:Qe.key)==="formButton"),ne=(Ha=il.safeClone(o.itemData))==null?void 0:Ha.find(Qe=>(Qe==null?void 0:Qe.key)==="formFlex"),Ue=(pl=il.safeClone(o.itemData))==null?void 0:pl.find(Qe=>(Qe==null?void 0:Qe.key)==="formWrap"),Je=($l=il.safeClone(o.itemData))==null?void 0:$l.find(Qe=>(Qe==null?void 0:Qe.key)==="enableWrap"),ra=(gl=il.safeClone(o.itemData))==null?void 0:gl.find(Qe=>(Qe==null?void 0:Qe.key)==="textSize"),Oe=(Ol=il.safeClone(o.itemData))==null?void 0:Ol.find(Qe=>(Qe==null?void 0:Qe.key)==="textRGBA"),za=($a=il.safeClone(o.itemData))==null?void 0:$a.find(Qe=>(Qe==null?void 0:Qe.key)==="backGround"),fa=(jl=il.safeClone(o.itemData))==null?void 0:jl.find(Qe=>(Qe==null?void 0:Qe.key)==="backGroundImage");(Ue==null?void 0:Ue.contents)==="纵向"?w.value=!1:w.value=!0;const Oa=Number(ra==null?void 0:ra.contents);k.value=Number.isNaN(Oa)?void 0:Oa,g.value=Oe==null?void 0:Oe.contents,M.value=za==null?void 0:za.contents,R.value=fa==null?void 0:fa.contents;const Pa=Je==null?void 0:Je.contents;if(Pa===void 0?E.value=to.BLOCK:typeof Pa=="boolean"?E.value=Pa?to.ORDINARY:to.BLOCK:E.value=Pa,G.value=typeof(ne==null?void 0:ne.contents)!="boolean"?!(!(ne!=null&&ne.contents)===""||((Zl=ne==null?void 0:ne.contents)==null?void 0:Zl.toUpperCase())==="VERTICAL"):ne==null?void 0:ne.contents,((ja=x==null?void 0:x.contents)==null?void 0:ja.length)>0&&Array.isArray(x==null?void 0:x.contents)){let Qe=o.allMapContents;const Ie=(Da=(ba=il.safeClone(x))==null?void 0:ba.contents)==null?void 0:Da.map((me,xa)=>{var Cr,Mr,Ir,Nr,Fr,Lr,cr,xn,Yr,nn,zn,wn,gn;let wl=(me==null?void 0:me.label)??(me==null?void 0:me.key)??"";me==null||me.type;let Rl=(me==null?void 0:me.options)??[];if((Cr=me==null?void 0:me.key)!=null&&Cr.includes("$")&&(wl=(Mr=il.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:Mr[0],((Nr=(Ir=il.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:Ir[1])==null?void 0:Nr.length)>0)){const[mr,Hl]=(Lr=(Fr=il.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:Fr[1])==null?void 0:Lr.split(/[()]/);(cr=ia.FormType.find(pr=>(pr==null?void 0:pr.key)===mr))==null||cr.value,((xn=Hl==null?void 0:Hl.split(","))==null?void 0:xn.length)>0&&(Rl=(Yr=Hl==null?void 0:Hl.split(","))==null?void 0:Yr.map(pr=>({label:pr,value:pr})))}let Fl=me==null?void 0:me.options;((nn=me==null?void 0:me.optionUrl)==null?void 0:nn.selectRelateType)==="自定义绑定"&&(Fl=(wn=(zn=me==null?void 0:me.optionUrl)==null?void 0:zn.defaultSelect)==null?void 0:wn.map(mr=>({label:mr,value:mr})));let or=(me==null?void 0:me.menuPath)??[],gr=(me==null?void 0:me.groups)??[],Cl=(me==null?void 0:me.columns)??[],sr=!1,Tr=(me==null?void 0:me.isFormColHidden)??!1,Ml="",rr=me!=null&&me.value?me.value:(Fl==null?void 0:Fl.length)>0?(gn=Fl==null?void 0:Fl[0])==null?void 0:gn.value:(me==null?void 0:me.value)??"",en=!1,Or="Input";return((Fl==null?void 0:Fl.length)>0||(or==null?void 0:or.length)>0)&&(Or="Select"),(Array.isArray(Ml)&&(Ml!=null&&Ml.every(mr=>(mr==null?void 0:mr.name)&&(mr==null?void 0:mr.url)))||Array.isArray(rr)&&(rr!=null&&rr.every(mr=>(mr==null?void 0:mr.name)&&(mr==null?void 0:mr.url))))&&(Or="upload"),me!=null&&me.isMainUrl&&(Or="Url"),{label:wl??"",name:wl??"t"+xa,prop:wl??il.safeClone(me==null?void 0:me.key),type:(me==null?void 0:me.type)??Or,value:(me==null?void 0:me.type)==="Date"&&rr===""?new Date:rr,id:(me==null?void 0:me.id)??xa,contents:(Fl==null?void 0:Fl.length)>0?Fl:Rl??[],width:(me==null?void 0:me.width)??1,isLoginUser:sr,config:me==null?void 0:me.config,optionUrl:(me==null?void 0:me.optionUrl)??me,isFormColHidden:Tr,isHideInForm:(me==null?void 0:me.isHideInForm)??!1,signature:en,isMain:me==null?void 0:me.isMain,required:(me==null?void 0:me.required)??!1,isMainUrl:me==null?void 0:me.isMainUrl,operable:(me==null?void 0:me.operable)??!1,disabled:(me==null?void 0:me.disabled)??!1,isSync:me==null?void 0:me.isSync,menus:or,groups:gr,words:Cl,allSelectionContents:me==null?void 0:me.allContents,filterContent:me==null?void 0:me.filterContents}}),xl=Ie==null?void 0:Ie.map(me=>me==null?void 0:me.value);let ll="";xl==null||xl.forEach(me=>{me!==""&&me!==void 0&&(ll=ll===""?me:ll+"/"+me)}),D.setSelectArray(xl),D.setSelectString(ll);let hl=(Ua=il.safeClone(Ie))==null?void 0:Ua.map(me=>(me!=null&&me.value&&ia.IsJson(me==null?void 0:me.value)&&Array.isArray(JSON.parse(me==null?void 0:me.value))&&(me.value=JSON.parse(me.value)),me)),Ra={};hl==null||hl.forEach(me=>{Ra[me.label]=me==null?void 0:me.value}),hl=hl==null?void 0:hl.map(me=>{var xa,wl,Rl,Fl,or,gr,Cl,sr,Tr;if((me==null?void 0:me.type)==="Select"&&((xa=me==null?void 0:me.allSelectionContents)==null?void 0:xa.length)>0&&(me.contactValue=Ra),(Rl=(wl=me==null?void 0:me.optionUrl)==null?void 0:wl.menuSelect)!=null&&Rl.some(Ml=>Ml==null?void 0:Ml.includes("["))){let Ml="";me.optionUrl.oldMenuSelect=(or=(Fl=il.safeClone(me))==null?void 0:Fl.optionUrl)==null?void 0:or.menuSelect,me.optionUrl.menuSelect=(Cl=(gr=me==null?void 0:me.optionUrl)==null?void 0:gr.menuSelect)==null?void 0:Cl.map(rr=>{var en,Or,zr,Cr,Mr,Ir;if(rr!=null&&rr.includes("[")){let Nr=(Or=(en=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:en.split(":"))==null?void 0:Or[1];Ml=_a((zr=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:zr.split(":"),Qe==null?void 0:Qe[be.value],Qe),rr=((Mr=(Cr=il.safeClone(hl))==null?void 0:Cr.find(Fr=>(Fr==null?void 0:Fr.label)===Nr))==null?void 0:Mr.value)||_a((Ir=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:Ir.split(":"),Qe==null?void 0:Qe[be.value],Qe)}return rr}),Ml!==""&&me.value===""&&(me.value=We(me.optionUrl.menuSelect,me.optionUrl.oldMenuSelect,(sr=me==null?void 0:me.optionUrl)==null?void 0:sr.groupSelect,Qe),Array.isArray(me.value)&&((Tr=me.value)!=null&&Tr.every(rr=>rr==null?void 0:rr.url))&&(me.type="UPLOAD"))}return me}),c.value=hl,le.value=((al=c.value)==null?void 0:al.every(me=>me==null?void 0:me.disabled))||ye.value===be.value,q.value=(Za=c.value)==null?void 0:Za.every(me=>me==null?void 0:me.operable),Te.value=(Me=c.value)==null?void 0:Me.map(me=>me==null?void 0:me.label);let Wa=[],Sa=[];if((na=il.safeClone(c.value))==null||na.forEach(me=>{var xa;Array.isArray(me==null?void 0:me.value)&&((xa=me==null?void 0:me.value)!=null&&xa.find(wl=>{var Rl;return(Rl=wl==null?void 0:wl.url)==null?void 0:Rl.includes(".obj")}))&&(Sa=me==null?void 0:me.value)}),(Sa==null?void 0:Sa.length)>0){const me=(ke=il.safeClone(Sa))==null?void 0:ke.filter(xa=>{var wl;return(wl=xa==null?void 0:xa.url)==null?void 0:wl.includes(".obj")});me==null||me.forEach(xa=>{var Rl,Fl,or,gr;const wl=(Rl=Sa==null?void 0:Sa.filter(Cl=>{var sr;return(Cl==null?void 0:Cl.name)===(xa==null?void 0:xa.name)&&((sr=Cl==null?void 0:Cl.url)==null?void 0:sr.includes(".mtl"))}))==null?void 0:Rl.map(Cl=>Cl==null?void 0:Cl.url);Wa.push({objUrl:xa==null?void 0:xa.url,mtlUrls:((Fl=Sa==null?void 0:Sa.filter(Cl=>{var sr;return(Cl==null?void 0:Cl.name)===(xa==null?void 0:xa.name)&&((sr=Cl==null?void 0:Cl.url)==null?void 0:sr.includes(".mtl"))}))==null?void 0:Fl.length)===1?(gr=(or=Sa==null?void 0:Sa.filter(Cl=>{var sr;return(Cl==null?void 0:Cl.name)===(xa==null?void 0:xa.name)&&((sr=Cl==null?void 0:Cl.url)==null?void 0:sr.includes(".mtl"))}))==null?void 0:or[0])==null?void 0:gr.url:wl})}),S.setObjUrl(Wa)}(Ta=il.safeClone(c.value))==null||Ta.forEach(me=>{var xa,wl,Rl,Fl,or,gr,Cl,sr,Tr,Ml,rr,en,Or;if((wl=(xa=me==null?void 0:me.value)==null?void 0:xa.toString())!=null&&wl.includes(".stl")||(Fl=(Rl=me==null?void 0:me.value)==null?void 0:Rl.toString())!=null&&Fl.includes(".STL")||(gr=(or=me==null?void 0:me.value)==null?void 0:or.toString())!=null&&gr.includes(".obj")||(sr=(Cl=me==null?void 0:me.value)==null?void 0:Cl.toString())!=null&&sr.includes(".mtl")||(Ml=(Tr=me==null?void 0:me.value)==null?void 0:Tr.toString())!=null&&Ml.includes(".urdf")){let zr={},Cr=[],Mr;Array.isArray(me==null?void 0:me.value)?Mr=me==null?void 0:me.value:Mr=(rr=me==null?void 0:me.value)==null?void 0:rr.split(","),Mr==null||Mr.forEach(Ir=>{Ir.includes(".mtl")?Cr.push(Ir):zr.blob=zr.blob==="undefined"?Ir:zr.blob+","+Ir}),(Cr==null?void 0:Cr.length)>0&&(zr.mtlBlobs=Cr),(Or=(en=Object.values(zr))==null?void 0:en[0])!=null&&Or.includes("http:")}})}else c.value=[];let ka=ae.value;if((ka==null?void 0:ka.length)>0&&(ka=ka==null?void 0:ka.map(Qe=>{var xl,ll,hl,Ra;let Ie=(xl=Qe==null?void 0:Qe.key)==null?void 0:xl.split("/");return(o==null?void 0:o.compName)===(Ie==null?void 0:Ie[0])&&(ll=c.value)!=null&&ll.find(Wa=>(Wa==null?void 0:Wa.prop)===(Ie==null?void 0:Ie[1]))&&(Qe.value=(Ra=(hl=c.value)==null?void 0:hl.find(Wa=>(Wa==null?void 0:Wa.prop)===(Ie==null?void 0:Ie[1])))==null?void 0:Ra.value),Qe}),pe.setTableViewContents(ka)),o!=null&&o.formRules)u.value=o==null?void 0:o.formRules;else{let Qe={};(Ge=il.safeClone(c).value)==null||Ge.forEach(Ie=>{((Ie==null?void 0:Ie.isMain)===!0||(Ie==null?void 0:Ie.required)===!0)&&(Qe[(Ie==null?void 0:Ie.prop)??(Ie==null?void 0:Ie.name)]=[{required:!0,message:`${(Ie==null?void 0:Ie.label)||(Ie==null?void 0:Ie.prop)||(Ie==null?void 0:Ie.name)}不能为空`}])}),u.value=Qe}if(((X=Ae==null?void 0:Ae.contents)==null?void 0:X.length)>0){const Qe=[];(aa=Ae==null?void 0:Ae.contents)==null||aa.forEach((Ie,xl)=>{(Ie==null?void 0:Ie.label)!==""&&Qe.push({label:(Ie==null?void 0:Ie.label)??"",id:(Ie==null?void 0:Ie.id)??xl,type:(Ie==null?void 0:Ie.type)??"",background:Ie==null?void 0:Ie.background})}),W.value=Qe}else W.value=[]},{deep:!0,immediate:!0}),a.watch(()=>ye.value,x=>{le.value=x===be.value},{immediate:!0}),(x,Ae)=>{var za;const ne=a.resolveComponent("svg-icon"),Ue=a.resolveComponent("el-switch"),Je=a.resolveComponent("el-checkbox"),ra=a.resolveComponent("el-popover"),Oe=a.resolveComponent("el-checkbox-group");return a.openBlock(),a.createElementBlock("div",V3,[E.value===a.unref(to).TEXT?(a.openBlock(),a.createBlock(Ac,{key:0,itemData:l.itemData,compName:l.compName,fields:c.value,textSize:k.value,textColor:g.value,backGround:M.value,backGroundImage:R.value,disabled:le.value||Ne(),"onUpdate:backGroundImage":Ze},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled"])):E.value===a.unref(to).BLOCK?(a.openBlock(),a.createBlock(Sf,{key:1,items:(za=c.value)==null?void 0:za.map(fa=>({label:fa!=null&&fa.isHideInForm?"":fa==null?void 0:fa.label,value:fa==null?void 0:fa.value,width:(fa==null?void 0:fa.width)??1,field:fa})),textSize:k.value,textColor:g.value,backGround:M.value,backGroundImage:R.value,disabled:le.value||Ne(),"onUpdate:backGroundImage":Ze},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass({"form-shadow-box":E.value===a.unref(to).ORDINARY})},[a.createVNode(il.ssForm,{rowContents:c.value,formRules:u.value,buttonValue:W.value,isRowFlex:!1,isEnableWrap:!0,textSize:k.value,textColor:g.value,backGround:M.value,backGroundImage:R.value,onOnButtonClick:ya,onChange:ze,formDisabled:le.value||Ne(),formLabelsOperable:q.value,isButtonRow:w.value,onPreview:se,onBlurChange:ha,onHandleColEditChange:ee,onHandleColTypeChange:fe,onRouteUrl:Ia,onClickTrigger:Ba,"onUpdate:backGroundImage":Ze},{operateCol:a.withCtx(({renderColumns:fa,formDisabled:Oa,formLabelsOperable:Pa})=>[a.createVNode(ra,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Le},{reference:a.withCtx(()=>[a.createElementVNode("span",F3,[a.createVNode(ne,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",P3,[Ae[1]||(Ae[1]=a.createElementVNode("div",{class:"group-title"},"表单操作",-1)),a.createVNode(Ue,{"model-value":Oa,"active-text":"禁用","inactive-text":"",onChange:Re,style:{"margin-right":"8px"}},null,8,["model-value"]),a.createVNode(Ue,{"model-value":Pa,"active-text":"编辑所有标签","inactive-text":"",onChange:te},null,8,["model-value"]),Ae[2]||(Ae[2]=a.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),a.createVNode(Oe,{modelValue:Te.value,"onUpdate:modelValue":Ae[0]||(Ae[0]=ka=>Te.value=ka),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:z,onChange:He},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(fa,ka=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ka.label},[a.createVNode(Je,{value:ka.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(ka.label),1)]),_:2},1032,["value"]),a.createVNode(ra,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(ne,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var ua;return[a.createElementVNode("div",j3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ua=Object.keys(ka))==null?void 0:ua.filter(ma=>{var Ha;return(Ha=qe.value)==null?void 0:Ha.find(pl=>(pl==null?void 0:pl.value)===ma)}),ma=>{var Ha,pl;return a.openBlock(),a.createElementBlock("div",{key:ma},[a.createVNode(il._sfc_main$1,{value:ka==null?void 0:ka[ma],"active-text":(pl=(Ha=qe.value)==null?void 0:Ha.find($l=>($l==null?void 0:$l.value)===ma))==null?void 0:pl.label,inactiveText:"",onChange:$l=>ve($l,ma,ka)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",H3,[a.createVNode(ne,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","backGround","backGroundImage","formDisabled","formLabelsOperable","isButtonRow"])],2)),N.value?(a.openBlock(),a.createBlock(il.ssFilePreview,{key:3,fileDataList:O.value,onDestroy:we},null,8,["fileDataList"])):a.createCommentVNode("",!0),m.value?(a.openBlock(),a.createBlock(wr.ssDialog,{key:4,visible:m.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:a.withCtx(()=>[a.createVNode(Ci.ThreeViewerHost,{files:h.value,onGetAnimationData:x.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0)])}}},ws=Jl._export_sfc(U3,[["__scopeId","data-v-752d82ac"]]),Oi=a.ref(0),zc=l=>{var r;return!l||(l==null?void 0:l.length)===0?[]:(r=$.cloneDeep(l))==null?void 0:r.map(o=>(Oi.value++,o={label:(o==null?void 0:o.label)??"",prop:(o==null?void 0:o.label)==="操作"?"operate":o==null?void 0:o.prop,width:o!=null&&o.width?parseInt(o.width):"",fixed:(o==null?void 0:o.fixed)??void 0,sortable:(o==null?void 0:o.sortable)??!1,align:(o==null?void 0:o.align)??"left",showOverflowTooltip:(o==null?void 0:o.showOverflowTooltip)??!0,isNotDrag:(o==null?void 0:o.isNotDrag)??!1,isEditCol:(o==null?void 0:o.isEditCol)??!1,isOperate:(o==null?void 0:o.isOperate)??!1,id:(o==null?void 0:o.id)??Oi.value,children:zc(o==null?void 0:o.children)},o))},q3=l=>{var n;return(n=$.cloneDeep(l))==null?void 0:n.map(o=>(Oi.value++,o={label:(o==null?void 0:o.label)??"",prop:(o==null?void 0:o.label)==="操作"?"operate":o==null?void 0:o.prop,width:o!=null&&o.width?parseInt(o.width):"",fixed:(o==null?void 0:o.fixed)??void 0,sortable:(o==null?void 0:o.sortable)??!1,align:(o==null?void 0:o.align)??"left",showOverflowTooltip:(o==null?void 0:o.showOverflowTooltip)??!0,isNotDrag:(o==null?void 0:o.isNotDrag)??!1,isEditCol:(o==null?void 0:o.isEditCol)??!1,isOperate:(o==null?void 0:o.isOperate)??!1,id:(o==null?void 0:o.id)??Oi.value,children:zc(o==null?void 0:o.children)},o))},Mc=(l,r)=>{var n;return l!=null&&l.find(o=>(o==null?void 0:o.id)===r)?(n=$.cloneDeep(l))==null?void 0:n.filter(s=>(s==null?void 0:s.id)!==r):(l=l==null?void 0:l.map(o=>(o.children=Mc(o==null?void 0:o.children,r),o)),l)},Ic=(l,r)=>{var n;return l!=null&&l.find(o=>(o==null?void 0:o.id)===(r==null?void 0:r.id))?(n=$.cloneDeep(l))==null?void 0:n.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s=r),s)):(l=l==null?void 0:l.map(o=>(o.children=Ic(o==null?void 0:o.children,r),o)),l)},Oc=(l,r)=>{var n;return l!=null&&l.find(o=>{var s;return(o==null?void 0:o.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)})?(n=$.cloneDeep(l))==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.id)===((c=r==null?void 0:r.contents)==null?void 0:c.id)&&(s=r==null?void 0:r.contents),s}):(l=l==null?void 0:l.map(o=>(o.children=Oc(o==null?void 0:o.children,r),o)),l)},Lc=(l,r)=>{var n;return l!=null&&l.find(o=>(o==null?void 0:o.id)===(r==null?void 0:r.id))?(n=$.cloneDeep(l))==null?void 0:n.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s!=null&&s.children||(s.children=[]),s.children.push(r.contents)),s)):(l=l==null?void 0:l.map(o=>(o.children=Lc(o==null?void 0:o.children,r),o)),l)},lr=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],W3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],K3=[{label:"新增",value:"add"}],Vn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:K3},{key:"background",label:"按钮背景色",type:"Color"}],Fn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:W3},{key:"textColor",label:"按钮颜色",type:"Color"}],G3={class:"table-header-child"},Y3={class:"table-header-child-main"},J3={class:"table-header-child-content"},X3={class:"table-header-child-content-item"},Z3={class:"fix-button"},Q3={key:0},e2={class:"form-content"},a2={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,o=r,s=a.ref(!1),c=a.ref(""),m=ia.useTableComp($.pinia),{tableIndex:f}=$.storeToRefs(m);a.ref(0);const h=a.ref(""),y=a.ref([]),u=a.ref([]),w=D=>{var E;s.value=!0;let S=[];lr==null||lr.forEach(k=>{let g=$.cloneDeep(f.value)+1;m.setTableIndex(g),S.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:D[k.key],id:f.value,contents:k==null?void 0:k.options})}),D!=null&&D.children&&((E=D==null?void 0:D.children)==null?void 0:E.length)>0&&S.push({children:D==null?void 0:D.children,isFormColHidden:!0}),h.value=D==null?void 0:D.id,y.value=S,u.value=S},N=D=>{o("fixChange",$.cloneDeep(D))},j=D=>{o("deleteChange",$.cloneDeep(D))},C=D=>{s.value=!0;let S=[];lr==null||lr.forEach(E=>{let k=$.cloneDeep(f.value)+1;m.setTableIndex(k),S.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:"",id:f.value,contents:E==null?void 0:E.options})}),c.value=D==null?void 0:D.id,y.value=S,u.value=S},W=D=>{let S=$.cloneDeep(u.value);S=S==null?void 0:S.map(E=>(E.children||(E.value=D==null?void 0:D[E.name]),E)),u.value=S},O=()=>{var S,E;y.value=u.value;let D={};if(h.value!=="")D.id=h.value,(S=y.value)==null||S.forEach(k=>{const g=lr==null?void 0:lr.find(M=>(M==null?void 0:M.label)===(k==null?void 0:k.label));g?D[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(D.children=k.children)}),s.value=!1,o("fixChange",{contents:$.cloneDeep(D),id:c.value,type:"fix"});else{let k=$.cloneDeep(f.value)+1;m.setTableIndex(k),D.id="id"+f.value,(E=y.value)==null||E.forEach(g=>{const M=lr==null?void 0:lr.find(R=>(R==null?void 0:R.label)===(g==null?void 0:g.label));M?D[M.key]=g.value:g!=null&&g.children&&g.children.length>0&&(D.children=g.children)}),s.value=!1,o("fixChange",{contents:$.cloneDeep(D),id:c.value,type:"add"})}h.value="",y.value=[],u.value=[]},U=()=>{s.value=!1,h.value="",c.value="",y.value=[],u.value=[]},H=D=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{o("deleteChange",D),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,S)=>{const E=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",G3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(k,g)=>(a.openBlock(),a.createElementBlock("div",Y3,[a.createElementVNode("div",J3,[a.createElementVNode("div",X3,a.toDisplayString(k.label),1),a.createElementVNode("div",Z3,[a.createVNode(E,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>C(k)},null,8,["onClick"]),a.createVNode(E,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>w(k)},null,8,["onClick"]),a.createVNode(E,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>H(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(a.openBlock(),a.createElementBlock("div",Q3,[a.createVNode($c,{tableChildContents:k==null?void 0:k.children,onDeleteChange:j,onFixChange:N},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(wr.ssDialog,{visible:s.value,onBeforeDestroy:U,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",e2,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:U,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:O},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},l2=Jl._export_sfc(a2,[["__scopeId","data-v-e0fef72d"]]),r2={class:"table-header-child"},n2={class:"table-header-child-main"},o2={class:"table-header-child-content"},i2={class:"table-header-child-content-item"},t2={class:"fix-button"},s2={key:0},c2={class:"form-content"},u2={class:"dialog-footer"},d2={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,o=r,s=a.ref(!1),c=a.ref(""),m=ia.useTableComp($.pinia),{tableIndex:f}=$.storeToRefs(m),h=a.ref(""),y=a.ref([]),u=a.ref([]),w=D=>{o("fixChange",$.cloneDeep(D))},N=D=>{var E;s.value=!0;let S=[];lr==null||lr.forEach(k=>{let g=$.cloneDeep(f.value)+1;m.setTableIndex(g),S.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:D[k.key],id:f.value,contents:k==null?void 0:k.options})}),D!=null&&D.children&&((E=D==null?void 0:D.children)==null?void 0:E.length)>0&&S.push({children:D==null?void 0:D.children,isFormColHidden:!0}),h.value=D==null?void 0:D.id,y.value=S,u.value=S},j=D=>{s.value=!0;let S=[];lr==null||lr.forEach(E=>{let k=$.cloneDeep(f.value)+1;m.setTableIndex(k),S.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:"",id:f.value,contents:E==null?void 0:E.options})}),c.value=D==null?void 0:D.id,y.value=S,u.value=S},C=D=>{let S=$.cloneDeep(u.value);S=S==null?void 0:S.map(E=>(E.children||(E.value=D==null?void 0:D[E.name]),E)),u.value=S},W=()=>{var S,E;y.value=u.value;let D={};if(h.value!=="")D.id=h.value,(S=y.value)==null||S.forEach(k=>{const g=lr==null?void 0:lr.find(M=>(M==null?void 0:M.label)===(k==null?void 0:k.label));g?D[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(D.children=k.children)}),s.value=!1,o("fixChange",{contents:$.cloneDeep(D),id:c.value,type:"fix"});else{let k=$.cloneDeep(f.value)+1;m.setTableIndex(k),D.id="idChild"+f.value,(E=y.value)==null||E.forEach(g=>{const M=lr==null?void 0:lr.find(R=>(R==null?void 0:R.label)===(g==null?void 0:g.label));M?D[M.key]=g.value:g!=null&&g.children&&g.children.length>0&&(D.children=g.children)}),s.value=!1,o("fixChange",{contents:$.cloneDeep(D),id:c.value,type:"add"})}h.value="",y.value=[],u.value=[]},O=()=>{s.value=!1,h.value="",c.value="",y.value=[],u.value=[]},U=D=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{o("deleteChange",D),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},H=D=>{o("deleteChange",D)};return(D,S)=>{const E=a.resolveComponent("svg-icon"),k=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",r2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(g,M)=>(a.openBlock(),a.createElementBlock("div",n2,[a.createElementVNode("div",o2,[a.createElementVNode("div",i2,a.toDisplayString(g.label),1),a.createElementVNode("div",t2,[a.createVNode(E,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>j(g)},null,8,["onClick"]),a.createVNode(E,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>N(g)},null,8,["onClick"]),a.createVNode(E,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>U(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(a.openBlock(),a.createElementBlock("div",s2,[a.createVNode(l2,{tableChildContents:g==null?void 0:g.children,onDeleteChange:H,onFixChange:w},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(wr.ssDialog,{visible:s.value,onBeforeDestroy:O,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",c2,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:C},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",u2,[a.createVNode(k,{onClick:O,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>S[0]||(S[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(k,{class:"ok-button button",onClick:W,id:"themeButton"},{default:a.withCtx(()=>S[1]||(S[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},$c=Jl._export_sfc(d2,[["__scopeId","data-v-ebd68fa1"]]),p2={class:"table-operate-content"},f2={class:"table-operate-item"},h2={class:"operate-title"},v2={class:"operate-content"},m2={class:"fix-content"},y2={class:"fix-content-label"},g2={class:"fix-button"},b2={key:0},k2={class:"operate-title"},x2={class:"operate-content"},w2={class:"fix-content"},_2={class:"fix-content-label"},S2={class:"fix-button"},E2={class:"operate-title"},C2={class:"operate-content"},D2={class:"fix-content"},N2={class:"fix-content-label"},B2={class:"fix-button"},T2={class:"operate-title"},A2={class:"operate-content"},z2={class:"fix-content"},M2={class:"fix-content-label"},I2={class:"fix-button"},O2={class:"operate-content"},L2={style:{display:"flex","justify-content":"space-between"}},$2={class:"form-content"},R2={class:"dialog-footer"},V2={class:"form-content"},F2={class:"dialog-footer"},P2={class:"form-content"},j2={class:"dialog-footer"},H2={class:"form-content"},U2={class:"dialog-footer"},q2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,o=r,s=a.ref([]),c=a.ref(!1),m=a.ref(!1),f=a.ref([]),h=a.ref(!1),y=a.ref([]),u=a.ref(!1),w=a.ref([]),N=a.ref(""),j=a.ref(""),C=a.ref([]),W=a.ref([]),O=a.ref([]),U=a.ref([]),H=a.ref(!1),D=a.ref([]),S=a.ref([]),E=a.ref(0),k=a.ref([]),g=a.ref([]),M=a.ref([]),R=()=>{H.value=!0;let V=[];Vn==null||Vn.forEach(P=>{E.value++,V.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:(P==null?void 0:P.key)==="background"?"var(--ssComponent-primary-color)":"",id:E.value,contents:P==null?void 0:P.options})}),D.value=V,S.value=V},G=()=>{var P,ee,fe;m.value=!0;let V=[];(fe=(ee=(P=ia.FormContent)==null?void 0:P.find(ve=>(ve==null?void 0:ve.key)==="Input"))==null?void 0:ee.value)==null||fe.forEach(ve=>{E.value++,V.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.label),type:ve.type,value:(ve==null?void 0:ve.label)==="类型"?"Input":"",id:E.value,contents:ve==null?void 0:ve.options})}),k.value=V,g.value=V},ue=V=>{V||(k.value=g.value)},Be=async V=>{var P,ee,fe,ve,ha,Ze,se,we,ya,ze,_a,We;if((V==null?void 0:V.类型)!==((ee=(P=g.value)==null?void 0:P.find(x=>(x==null?void 0:x.label)==="类型"))==null?void 0:ee.value)){let x=[],Ae=await((ha=(ve=(fe=ia.FormContent)==null?void 0:fe.find(ne=>(ne==null?void 0:ne.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:ve.value)==null?void 0:ha.value)?await((ze=(ya=(we=ia.FormContent)==null?void 0:we.find(ne=>(ne==null?void 0:ne.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:ya.value)==null?void 0:ze.value):(se=(Ze=ia.FormContent)==null?void 0:Ze.find(ne=>(ne==null?void 0:ne.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:se.value;if(Ae==null||Ae.forEach(ne=>{E.value++,x.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label),type:ne.type,value:ne!=null&&ne.属性名?(V==null?void 0:V.prop)||(V==null?void 0:V.name)||(V==null?void 0:V.label):(V==null?void 0:V[ne.label])??"",id:E.value,contents:ne==null?void 0:ne.options,prop:(ne==null?void 0:ne.prop)||(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label)})}),V!=null&&V.菜单选项&&((_a=V==null?void 0:V.菜单选项)==null?void 0:_a.length)>0){const ne=await ia.menuToContentType(V==null?void 0:V.菜单选项);x=x==null?void 0:x.map(Ue=>((Ue==null?void 0:Ue.name)==="组信息选项"&&(Ue.contents=ne),Ue))}g.value=await ia.selectToBase($.cloneDeep(x)),k.value=await ia.selectToBase($.cloneDeep(x))}else{let x=$.cloneDeep(k.value);if(x=x==null?void 0:x.map(Ae=>(Ae.value=V==null?void 0:V[Ae.name],Ae)),V!=null&&V.菜单选项&&((We=V==null?void 0:V.菜单选项)==null?void 0:We.length)>0){const Ae=await ia.menuToContentType(V==null?void 0:V.菜单选项);x=x==null?void 0:x.map(ne=>((ne==null?void 0:ne.name)==="组信息选项"&&(ne.contents=Ae),ne))}x=ia.formToOptionsContents(x),g.value=await ia.selectToBase($.cloneDeep(x))}},de=async V=>{await Be(V),k.value=g.value},Z=(V,P)=>{if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const ee=P==null?void 0:P.optionUrl;return(ee==null?void 0:ee.selectRelateType)||P[V.key]}if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const ee=P==null?void 0:P.optionUrl;return(ee==null?void 0:ee.menuSelect)||P[V.key]}if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const ee=P==null?void 0:P.optionUrl;return(ee==null?void 0:ee.groupSelect)||P[V.key]}if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(P==null?void 0:P.value)||P[V.key];if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const ee=P[V.key];return Qs(ee)?ee:V.default}return(V==null?void 0:V.label)==="类型"&&P[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!P[V.key]?!1:P[V.key]},pe=async V=>{var fe,ve,ha,Ze,se,we,ya,ze,_a;m.value=!0;let P=[];const ee=await((ha=(ve=(fe=ia.FormContent)==null?void 0:fe.find(We=>(We==null?void 0:We.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:ve.value)==null?void 0:ha.value)?await((ze=(ya=(we=ia.FormContent)==null?void 0:we.find(We=>(We==null?void 0:We.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:ya.value)==null?void 0:ze.value):(se=(Ze=ia.FormContent)==null?void 0:Ze.find(We=>(We==null?void 0:We.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:se.value;if(ee==null||ee.forEach(We=>{E.value++,P.push({label:We==null?void 0:We.label,name:(We==null?void 0:We.name)||(We==null?void 0:We.label),type:We.type,value:(We==null?void 0:We.label)==="属性名"?(V==null?void 0:V.prop)||(V==null?void 0:V.name)||(V==null?void 0:V.label):Z(We,V),id:E.value,contents:We==null?void 0:We.options})}),V!=null&&V.menuSelect&&((_a=V==null?void 0:V.menuSelect)==null?void 0:_a.length)>0){const We=await ia.menuToContentType(V==null?void 0:V.menuSelect);P=P==null?void 0:P.map(x=>((x==null?void 0:x.name)==="组信息选项"&&(x.contents=We),x))}N.value=V==null?void 0:V.id,k.value=await ia.selectToBase(ia.formToOptionsContents(P)),g.value=await ia.selectToBase(ia.formToOptionsContents(P))},ae=V=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,ee;M.value=(P=$.cloneDeep(M.value))==null?void 0:P.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),o("change",(ee=$.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>((fe==null?void 0:fe.key)==="tableToForm"&&(fe.contents=M.value),fe))),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ce=()=>{m.value=!1,k.value=[],N.value=""},Ee=async()=>{var fe,ve,ha,Ze,se,we,ya,ze,_a,We;k.value=g.value;let V={};N.value!==""?V.id=N.value:(E.value++,V.id="id"+E.value);let P=await((ha=(ve=(fe=ia.FormContent)==null?void 0:fe.find(x=>{var Ae,ne;return(x==null?void 0:x.key)===(((ne=(Ae=k.value)==null?void 0:Ae.find(Ue=>(Ue==null?void 0:Ue.label)==="类型"))==null?void 0:ne.value)??"label")}))==null?void 0:ve.value)==null?void 0:ha.value)??((se=(Ze=ia.FormContent)==null?void 0:Ze.find(x=>{var Ae,ne;return(x==null?void 0:x.key)===(((ne=(Ae=k.value)==null?void 0:Ae.find(Ue=>(Ue==null?void 0:Ue.label)==="类型"))==null?void 0:ne.value)??"label")}))==null?void 0:se.value);if((we=k.value)==null||we.forEach(x=>{const Ae=P==null?void 0:P.find(ne=>(ne==null?void 0:ne.label)===(x==null?void 0:x.label));Ae&&(V[Ae.key]=x.value)}),V.name=V.label,(ya=M.value)!=null&&ya.find(x=>x.id===V.id))M.value=(ze=M.value)==null?void 0:ze.map(x=>(x.id===V.id&&(x=V),x));else{let x=$.cloneDeep(M.value);M.value||(M.value=[]),x.push(V),M.value=x}M.value=M.value.map(({id:x,...Ae})=>Ae),m.value=!1,N.value="";let ee=$.cloneDeep(n.originalItemContents);(_a=$.cloneDeep(n.originalItemContents))!=null&&_a.find(x=>(x==null?void 0:x.key)==="tableToForm")?ee=(We=$.cloneDeep(n.originalItemContents))==null?void 0:We.map(x=>((x==null?void 0:x.key)==="tableToForm"&&(x.contents=M.value),x)):ee.push({key:"tableToForm",contents:M.value}),o("change",ee)},Ve=V=>{H.value=!0;let P=[];Vn==null||Vn.forEach(ee=>{E.value++,P.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:V[ee.key],id:E.value,contents:ee==null?void 0:ee.options})}),N.value=V==null?void 0:V.id,D.value=P,S.value=P};a.watch(()=>u.value,()=>{var P,ee;let V=$.cloneDeep(n.originalItemContents);(P=$.cloneDeep(n.originalItemContents))!=null&&P.find(fe=>(fe==null?void 0:fe.key)==="page")?V=(ee=$.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>((fe==null?void 0:fe.key)==="page"&&(fe.contents=u.value),fe)):V.push({key:"page",contents:u.value}),o("change",V)},{deep:!0});const ye=V=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,ee;W.value=(P=$.cloneDeep(W.value))==null?void 0:P.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),o("change",(ee=$.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>((fe==null?void 0:fe.key)==="extraButton"&&(fe.contents=W.value),fe))),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},z=()=>{var ee,fe,ve,ha,Ze;D.value=S.value;let V={};if(N.value!==""?V.id=N.value:(E.value++,V.id="id"+E.value),(ee=D.value)==null||ee.forEach(se=>{const we=Vn==null?void 0:Vn.find(ya=>(ya==null?void 0:ya.label)===(se==null?void 0:se.label));we?V[we.key]=se.value:se!=null&&se.children&&se.children.length>0&&(V.children=se.children)}),(fe=W.value)!=null&&fe.find(se=>se.id===V.id))W.value=(ve=W.value)==null?void 0:ve.map(se=>(se.id===V.id&&(se=V),se));else{let se=$.cloneDeep(W.value)??[];se.push(V),W.value=se}H.value=!1,N.value="";let P=$.cloneDeep(n.originalItemContents);(ha=$.cloneDeep(n.originalItemContents))!=null&&ha.find(se=>(se==null?void 0:se.key)==="extraButton")?P=(Ze=$.cloneDeep(n.originalItemContents))==null?void 0:Ze.map(se=>((se==null?void 0:se.key)==="extraButton"&&(se.contents=W.value),se)):P.push({key:"extraButton",contents:W.value}),o("change",P)},q=V=>{let P=$.cloneDeep(S.value);P=P==null?void 0:P.map(ee=>(ee.children||(ee.value=V==null?void 0:V[ee.name]),ee)),S.value=P},le=()=>{H.value=!1,D.value=[],N.value=""},De=V=>{h.value=!0;let P=[];Fn==null||Fn.forEach(ee=>{E.value++,P.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:V[ee.key],id:E.value,contents:ee==null?void 0:ee.options})}),N.value=V==null?void 0:V.id,O.value=P,U.value=P},be=V=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,ee;C.value=(P=$.cloneDeep(C.value))==null?void 0:P.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),o("change",(ee=$.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>((fe==null?void 0:fe.key)==="rowButton"&&(fe.contents=C.value),fe))),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ye=()=>{c.value=!0;let V=[];lr==null||lr.forEach(P=>{E.value++,V.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:"",id:E.value,contents:P==null?void 0:P.options})}),y.value=V,w.value=V},da=()=>{h.value=!0;let V=[];Fn==null||Fn.forEach(P=>{E.value++,V.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:"",id:E.value,contents:P==null?void 0:P.options})}),O.value=V,U.value=V},Ma=V=>{let P=$.cloneDeep(U.value);P=P==null?void 0:P.map(ee=>(ee.children||(ee.value=V==null?void 0:V[ee.name]),ee)),U.value=P},re=()=>{var ee,fe,ve,ha,Ze;O.value=U.value;let V={};if(N.value!==""?V.id=N.value:(E.value++,V.id="id"+E.value),(ee=O.value)==null||ee.forEach(se=>{const we=Fn==null?void 0:Fn.find(ya=>(ya==null?void 0:ya.label)===(se==null?void 0:se.label));we?V[we.key]=se.value:se!=null&&se.children&&se.children.length>0&&(V.children=se.children)}),(fe=C.value)!=null&&fe.find(se=>se.id===V.id))C.value=(ve=C.value)==null?void 0:ve.map(se=>(se.id===V.id&&(se=V),se));else{let se=$.cloneDeep(C.value);se.push(V),C.value=se}h.value=!1,N.value="";let P=$.cloneDeep(n.originalItemContents);(ha=$.cloneDeep(n.originalItemContents))!=null&&ha.find(se=>(se==null?void 0:se.key)==="rowButton")?P=(Ze=$.cloneDeep(n.originalItemContents))==null?void 0:Ze.map(se=>((se==null?void 0:se.key)==="rowButton"&&(se.contents=C.value),se)):P.push({key:"rowButton",contents:C.value}),o("change",P)},Ne=()=>{h.value=!1,N.value="",U.value=[],O.value=[]},Te=V=>{c.value=!0;let P=[];lr==null||lr.forEach(ee=>{E.value++,P.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:"",id:E.value,contents:ee==null?void 0:ee.options})}),y.value=P,j.value=V==null?void 0:V.id,w.value=P},qe=V=>{var P;f.value=Mc($.cloneDeep(f.value),V==null?void 0:V.id),o("change",(P=$.cloneDeep(n.originalItemContents))==null?void 0:P.map(ee=>{var fe;return(ee==null?void 0:ee.key)==="header"&&(ee.contents=(fe=f.value)!=null&&fe.some(ve=>ve==null?void 0:ve.children)?[f.value]:f.value),ee}))},Re=V=>{var ee,fe,ve;V.type==="fix"?V.id!==""?f.value=Oc(f.value,V):f.value=Ic(f.value,V==null?void 0:V.contents):f.value=Lc(f.value,V),f.value=(ee=f.value)!=null&&ee.some(ha=>ha==null?void 0:ha.children)?[f.value]:f.value,N.value="";let P=$.cloneDeep(n.originalItemContents);(fe=$.cloneDeep(n.originalItemContents))!=null&&fe.find(ha=>(ha==null?void 0:ha.key)==="header")?P=(ve=$.cloneDeep(n.originalItemContents))==null?void 0:ve.map(ha=>((ha==null?void 0:ha.key)==="header"&&(ha.contents=f.value),ha)):P.push({key:"header",contents:f.value}),o("change",P)},te=V=>{var ee;c.value=!0;let P=[];lr==null||lr.forEach(fe=>{E.value++,P.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:V[fe.key],id:E.value,contents:fe==null?void 0:fe.options})}),V!=null&&V.children&&((ee=V==null?void 0:V.children)==null?void 0:ee.length)>0&&P.push({children:V==null?void 0:V.children,isFormColHidden:!0}),N.value=V==null?void 0:V.id,j.value="",y.value=P,w.value=P},Le=V=>{let P=$.cloneDeep(w.value);P=P==null?void 0:P.map(ee=>(ee.children||(ee.value=V==null?void 0:V[ee.name]),ee)),w.value=P},He=()=>{c.value=!1,N.value="",j.value="",w.value=[]},Ba=()=>{var ee,fe,ve,ha,Ze,se;y.value=w.value;let V={};if(N.value!==""?V.id=N.value:(E.value++,V.id="id"+E.value),(ee=y.value)==null||ee.forEach(we=>{const ya=lr==null?void 0:lr.find(ze=>(ze==null?void 0:ze.label)===(we==null?void 0:we.label));ya?V[ya.key]=we.value:we!=null&&we.children&&we.children.length>0&&(V.children=we.children)}),(fe=f.value)!=null&&fe.find(we=>we.id===V.id))f.value=(ve=f.value)==null?void 0:ve.map(we=>(we.id===V.id&&(we=V),we));else{let we=$.cloneDeep(f.value)??[];j.value===""?we.push(V):we=we==null?void 0:we.map(ya=>(ya.id===j.value&&(ya.children||(ya.children=[]),ya.children.push(V)),ya)),f.value=we}f.value=(ha=f.value)!=null&&ha.some(we=>we==null?void 0:we.children)?[f.value]:f.value,c.value=!1,N.value="",j.value="";let P=$.cloneDeep(n.originalItemContents);(Ze=$.cloneDeep(n.originalItemContents))!=null&&Ze.find(we=>(we==null?void 0:we.key)==="header")?P=(se=$.cloneDeep(n.originalItemContents))==null?void 0:se.map(we=>((we==null?void 0:we.key)==="header"&&(we.contents=f.value),we)):P.push({key:"header",contents:f.value}),o("change",P)},Ia=V=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,ee;f.value=(P=$.cloneDeep(f.value))==null?void 0:P.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),o("change",(ee=$.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>{var ve;return(fe==null?void 0:fe.key)==="header"&&(fe.contents=(ve=f.value)!=null&&ve.some(ha=>ha==null?void 0:ha.children)?[f.value]:f.value),fe})),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return a.watch(()=>n.originalItemContents,()=>{var V,P,ee,fe,ve,ha,Ze,se,we,ya,ze,_a,We,x,Ae,ne,Ue,Je,ra;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(s.value=$.cloneDeep(n.originalItemContents),f.value=(P=(V=s.value)==null?void 0:V.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:P.contents,C.value=(fe=(ee=s.value)==null?void 0:ee.find(Oe=>(Oe==null?void 0:Oe.key)==="rowButton"))==null?void 0:fe.contents,W.value=(ha=(ve=s.value)==null?void 0:ve.find(Oe=>(Oe==null?void 0:Oe.key)==="extraButton"))==null?void 0:ha.contents,u.value=(se=(Ze=s.value)==null?void 0:Ze.find(Oe=>(Oe==null?void 0:Oe.key)==="page"))!=null&&se.contents?!!((ya=(we=s.value)==null?void 0:we.find(Oe=>(Oe==null?void 0:Oe.key)==="page"))!=null&&ya.contents):!1,M.value=(_a=(ze=s.value)==null?void 0:ze.find(Oe=>(Oe==null?void 0:Oe.key)==="tableToForm"))==null?void 0:_a.contents,f.value=(We=f.value)==null?void 0:We.map((Oe,za)=>(Array.isArray(Oe)?Oe=q3(Oe):Oe={label:(Oe==null?void 0:Oe.label)??"",prop:(Oe==null?void 0:Oe.label)==="操作"?"operate":Oe==null?void 0:Oe.prop,width:Oe!=null&&Oe.width?parseInt(Oe.width):"",fixed:(Oe==null?void 0:Oe.fixed)??void 0,sortable:(Oe==null?void 0:Oe.sortable)??!1,align:(Oe==null?void 0:Oe.align)??"left",showOverflowTooltip:(Oe==null?void 0:Oe.showOverflowTooltip)??!0,isNotDrag:(Oe==null?void 0:Oe.isNotDrag)??!1,isEditCol:(Oe==null?void 0:Oe.isEditCol)??!1,isOperate:(Oe==null?void 0:Oe.isOperate)??!1,id:(Oe==null?void 0:Oe.id)??za,formMenuSelect:(Oe==null?void 0:Oe.formMenuSelect)??void 0,groupSelect:(Oe==null?void 0:Oe.groupSelect)??void 0},Oe)),f.value=(x=f.value)!=null&&x.every(Oe=>Array.isArray(Oe))?(Ae=f.value)==null?void 0:Ae[0]:f.value,C.value=(ne=C.value)==null?void 0:ne.map((Oe,za)=>Oe={label:(Oe==null?void 0:Oe.label)??"",type:(Oe==null?void 0:Oe.type)??"",textColor:(Oe==null?void 0:Oe.textColor)??"#000000",id:(Oe==null?void 0:Oe.id)??za}),W.value=(Ue=W.value)==null?void 0:Ue.map((Oe,za)=>Oe={label:(Oe==null?void 0:Oe.label)??"",type:(Oe==null?void 0:Oe.type)??"",background:(Oe==null?void 0:Oe.background)??"var(--ssComponent-primary-color)",id:(Oe==null?void 0:Oe.id)??za}),M.value)M.value=(ra=M.value)==null?void 0:ra.map(Oe=>{E.value++;let za=Oe;return za.id=E.value,za});else{let Oe=[];const za=(Je=ia.getColumnChild($.cloneDeep(f.value)))==null?void 0:Je.filter(fa=>(fa==null?void 0:fa.prop)!=="operate");za==null||za.forEach(fa=>{var Oa;E.value++,Oe.push({label:fa==null?void 0:fa.label,name:(fa==null?void 0:fa.prop)||(fa==null?void 0:fa.label),type:fa!=null&&fa.groupSelect?"Select":"Input",value:"",id:E.value,contents:fa==null?void 0:fa.options,menuSelect:fa==null?void 0:fa.formMenuSelect,groupSelect:(Oa=fa==null?void 0:fa.groupSelect)==null?void 0:Oa.split(":"),selectRelateType:"关联绑定列"})}),M.value=Oe}},{deep:!0,immediate:!0}),(V,P)=>{const ee=a.resolveComponent("svg-icon"),fe=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",p2,[a.createElementVNode("div",f2,[a.createElementVNode("div",h2,[P[2]||(P[2]=a.createElementVNode("div",null,a.toDisplayString("表头"),-1)),a.createVNode(fe,{class:"icon-content",onClick:Ye,id:"themeButton"},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[P[1]||(P[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",v2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.value,(ve,ha)=>(a.openBlock(),a.createElementBlock("div",{key:ha},[a.createElementVNode("div",m2,[a.createElementVNode("div",y2,a.toDisplayString(ve==null?void 0:ve.label),1),a.createElementVNode("div",g2,[a.createVNode(ee,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>Te(ve)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>te(ve)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>Ia(ve)},null,8,["onClick"])])]),ve!=null&&ve.children&&ve.children.length>0?(a.openBlock(),a.createElementBlock("div",b2,[a.createVNode($c,{tableChildContents:ve==null?void 0:ve.children,onDeleteChange:qe,onFixChange:Re},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),128))]),a.createElementVNode("div",k2,[P[4]||(P[4]=a.createElementVNode("div",null,a.toDisplayString("行内按钮"),-1)),a.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:da},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[P[3]||(P[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",x2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.value,(ve,ha)=>(a.openBlock(),a.createElementBlock("div",{key:ha},[a.createElementVNode("div",w2,[a.createElementVNode("div",_2,a.toDisplayString(ve==null?void 0:ve.label),1),a.createElementVNode("div",S2,[a.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ze=>De(ve)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>be(ve)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",E2,[P[6]||(P[6]=a.createElementVNode("div",null,a.toDisplayString("表外按钮"),-1)),a.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:R},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[P[5]||(P[5]=a.createTextVNode(" 新增 "))]),_:1,__:[5]})]),a.createElementVNode("div",C2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(W.value,(ve,ha)=>(a.openBlock(),a.createElementBlock("div",{key:ha},[a.createElementVNode("div",D2,[a.createElementVNode("div",N2,a.toDisplayString(ve==null?void 0:ve.label),1),a.createElementVNode("div",B2,[a.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ze=>Ve(ve)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>ye(ve)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",T2,[P[8]||(P[8]=a.createElementVNode("div",null,a.toDisplayString("表格弹框字段设置"),-1)),a.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:G},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[P[7]||(P[7]=a.createTextVNode(" 新增 "))]),_:1,__:[7]})]),a.createElementVNode("div",A2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(M.value,(ve,ha)=>(a.openBlock(),a.createElementBlock("div",{key:ha},[a.createElementVNode("div",z2,[a.createElementVNode("div",M2,a.toDisplayString(ve==null?void 0:ve.label),1),a.createElementVNode("div",I2,[a.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Ze=>pe(ve)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>ae(ve)},null,8,["onClick"])])])]))),128))]),P[10]||(P[10]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("分页"))],-1)),a.createElementVNode("div",O2,[a.createElementVNode("div",L2,[P[9]||(P[9]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否分页"),-1)),a.createVNode(il._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":P[0]||(P[0]=ve=>u.value=ve)},null,8,["modelValue"])])])]),a.createVNode(wr.ssDialog,{visible:c.value,onBeforeDestroy:He,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",$2,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Le},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",R2,[a.createVNode(fe,{onClick:He,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>P[11]||(P[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(fe,{class:"ok-button button",onClick:Ba,id:"themeButton"},{default:a.withCtx(()=>P[12]||(P[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),a.createVNode(wr.ssDialog,{visible:h.value,onBeforeDestroy:Ne,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",V2,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:Ma},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",F2,[a.createVNode(fe,{onClick:Ne,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>P[13]||(P[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(fe,{class:"ok-button button",onClick:re,id:"themeButton"},{default:a.withCtx(()=>P[14]||(P[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),a.createVNode(wr.ssDialog,{visible:H.value,onBeforeDestroy:le,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",P2,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:q},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",j2,[a.createVNode(fe,{onClick:le,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>P[15]||(P[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(fe,{class:"ok-button button",onClick:z,id:"themeButton"},{default:a.withCtx(()=>P[16]||(P[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),a.createVNode(wr.ssDialog,{visible:m.value,onBeforeDestroy:ce,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",H2,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:Be,onChangeVisible:ue,onBlurChange:de},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",U2,[a.createVNode(fe,{onClick:ce,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>P[17]||(P[17]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[17]}),a.createVNode(fe,{class:"ok-button button",onClick:Ee,id:"themeButton"},{default:a.withCtx(()=>P[18]||(P[18]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},W2=Jl._export_sfc(q2,[["__scopeId","data-v-7a6b87b5"]]),K2=$.useModelComp($.pinia),{pageMapState:G2}=$.storeToRefs(K2),Y2=$.useMenuState($.pinia),{activeMenuPath:J2}=$.storeToRefs(Y2),X2=a.ref(24),Z2=a.ref(6),Q2=a.ref(10),eh=a.ref(70),ah=a.ref(.18),lh=a.ref(45),rh=(l,r,n,o)=>{var s,c,m,f,h,y,u,w,N,j,C,W,O,U,H,D;return{x:((c=(s=l==null?void 0:l.value)==null?void 0:s.tableData)==null?void 0:c.x)||r%2*12,y:((f=(m=l==null?void 0:l.value)==null?void 0:m.tableData)==null?void 0:f.y)||r,w:((y=(h=l==null?void 0:l.value)==null?void 0:h.tableData)==null?void 0:y.w)||X2.value,h:((w=(u=l==null?void 0:l.value)==null?void 0:u.tableData)==null?void 0:w.h)||n,minW:((j=(N=l==null?void 0:l.value)==null?void 0:N.tableData)==null?void 0:j.minW)||Z2.value,minH:((W=(C=l==null?void 0:l.value)==null?void 0:C.tableData)==null?void 0:W.minH)||ah.value,maxH:((U=(O=l==null?void 0:l.value)==null?void 0:O.tableData)==null?void 0:U.maxH)||lh.value,i:((D=(H=l==null?void 0:l.value)==null?void 0:H.tableData)==null?void 0:D.i)||r,id:(l==null?void 0:l.id)||r+"",component:o}},nh=(l,r)=>{var o,s,c,m,f,h,y,u;let n=1;if(l!=null&&l.compData&&Array.isArray(l==null?void 0:l.compData))if(((o=l==null?void 0:l.comp)==null?void 0:o.toUpperCase())==="TABLE"){if(((m=(c=(s=l==null?void 0:l.compData)==null?void 0:s.find(N=>(N==null?void 0:N.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:m.length)===0)return 2}else((f=l==null?void 0:l.comp)==null?void 0:f.toUpperCase())==="FORM"&&(n=((u=(y=(h=l==null?void 0:l.compData)==null?void 0:h.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:y.contents)==null?void 0:u.length)/5);return n*2},Rc=(l,r,n)=>{var m,f;const o=(f=(m=G2.value)==null?void 0:m[J2.value])==null?void 0:f.filter(h=>{var y;return((y=h==null?void 0:h.key)==null?void 0:y.type)==="gridLayout"}),s=o==null?void 0:o.find(h=>{var y,u,w;return((w=(u=(y=h==null?void 0:h.value)==null?void 0:y.tableData)==null?void 0:u.component)==null?void 0:w.id)===l.id}),c=nh(l);return l!=null&&l.children&&(l==null?void 0:l.children.length)>0&&(l.children=l.children.map((h,y)=>Rc(h,y))),{...rh(s,r,c,l)}},oh=(l,r)=>{if((l==null?void 0:l.length)===0)return[];const n=$.cloneDeep(l);return Array.isArray(l)?n==null?void 0:n.map((o,s)=>Rc(o,s)):[]},ih=l=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),th=(l,r)=>l==null?void 0:l.map(n=>{for(const o in r)if(o===(n==null?void 0:n.prop))return{...n,value:r[o]};return n}),sh=a.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(l,{emit:r}){const n=l,o=r,s=a.ref([]);a.watch(()=>n.compType,f=>{var u;const h=ih(n==null?void 0:n.optionItems),y=f?(u=h[f==null?void 0:f.toUpperCase()])==null?void 0:u[n==null?void 0:n.target]:[];s.value=y==null?void 0:y.map(w=>{for(const[N,j]of Object.entries((n==null?void 0:n.comp)||{}))if((w==null?void 0:w.prop)===N)return{...w,value:j};return w})},{immediate:!0});const c=f=>il.getComponent(f),m=f=>{var h,y;(f==null?void 0:f.prop)==="layout"&&(f==null?void 0:f.value)==="horizontal"?s.value=(h=s.value)==null?void 0:h.map(u=>{var w;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(w=u==null?void 0:u.options)==null?void 0:w.map(N=>({...N,disabled:!0}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!0}:u}):s.value=(y=s.value)==null?void 0:y.map(u=>{var w;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(w=u==null?void 0:u.options)==null?void 0:w.map(N=>({...N,disabled:!1}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!1}:u}),o("change",{target:n==null?void 0:n.target,styleConfigs:s.value,prop:f==null?void 0:f.prop})};return(f,h)=>{const y=a.resolveComponent("el-col"),u=a.resolveComponent("el-row");return a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,w=>(a.openBlock(),a.createBlock(u,{class:"style-row",key:w==null?void 0:w.prop},{default:a.withCtx(()=>[a.createVNode(y,{span:6,class:"style-row-title"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(w==null?void 0:w.label)+":",1)]),_:2},1024),a.createVNode(y,{span:18,style:{display:"flex"}},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c(w.type)),{modelValue:w.value,"onUpdate:modelValue":N=>w.value=N,content:w==null?void 0:w.options,optionUrl:w==null?void 0:w.optionUrl,disabled:w==null?void 0:w.disabled,activeText:w==null?void 0:w.activeText,inactiveText:w==null?void 0:w.inactiveText,onChange:N=>m(w)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ch=Jl._export_sfc(sh,[["__scopeId","data-v-6c233914"]]),uh=a.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(l,{emit:r}){const n=l,o=r,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=a.ref([]),m=U=>U==null?void 0:U.reduce((H,D)=>(H[D==null?void 0:D.prop]=D==null?void 0:D.rule,H),{}),f=a.computed(()=>({formRules:m(c.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=a.ref([]),y=a.ref(""),u=(U,H,D)=>{var k;let S=[];(n==null?void 0:n.activeTabName)==="任务配置"?(S=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:U},{label:"按钮名称",value:"按钮名称",children:H}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(S=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(k=n==null?void 0:n.relatedData)==null?void 0:k.map(g=>({label:g==null?void 0:g.任务名称,value:g==null?void 0:g.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let E;return D&&(D==null?void 0:D.length)>0?E=[...S,...w(U,H,D)]:E=S,E},w=(U,H,D)=>{const S=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return D?S==null?void 0:S.filter(E=>D==null?void 0:D.includes(E==null?void 0:E.prop)):S},N=(U,H)=>{var g,M,R,G,ue,Be,de,Z,pe;const D=((ue=(G=(R=(M=(g=n==null?void 0:n.comp)==null?void 0:g.compData)==null?void 0:M.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:R.contents)==null?void 0:G.filter(ae=>(ae==null?void 0:ae.label)!=="操作"))==null?void 0:ue.map(ae=>({value:ae==null?void 0:ae.prop,label:ae.label})))||[],S=/button/i,E=((pe=(Z=(de=(Be=n==null?void 0:n.comp)==null?void 0:Be.compData)==null?void 0:de.filter(ae=>S.test(ae==null?void 0:ae.key)))==null?void 0:Z.flatMap(ae=>ae==null?void 0:ae.contents))==null?void 0:pe.map(ae=>({value:ae==null?void 0:ae.label,label:ae.label})))||[],k=u(D,E,U);h.value=H?th(k,H):k,U&&(U==null?void 0:U.length)>0&&c.value.push(...U==null?void 0:U.map(ae=>({prop:ae,rule:s})))};a.onMounted(()=>{N(null,n==null?void 0:n.extendItem)});const j=U=>{const H=U==null?void 0:U[y.value];if(y.value==="执行任务"){if(!(H!=null&&H.join("/")))return;const D=H==null?void 0:H.join("/");N(D==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:D==="进度设置/进度条"?["进度关键词"]:null,U)}},C=U=>{o("change",{target:n==null?void 0:n.target,extendConfigs:U})},W=(U,H)=>{y.value=H==null?void 0:H.changeProp,j(U)},O=U=>{o("onButtonClick",U)};return(U,H)=>(a.openBlock(),a.createBlock(il.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:f.value.formRules,buttonValue:f.value.buttonValue,onChange:C,onBlurChange:W,onOnButtonClick:O},null,8,["rowContents","formRules","buttonValue"]))}}),dh=Jl._export_sfc(uh,[["__scopeId","data-v-7c660c1f"]]),ph={};function fh(l,r){return null}const hh=Jl._export_sfc(ph,[["render",fh]]),vh={class:"form-operate-content"},mh={class:"form-operate-item"},yh={class:"operate-title"},gh={class:"operate-content"},bh={class:"fix-content"},kh={class:"fix-button"},xh={class:"operate-title"},wh={class:"operate-content"},_h={class:"fix-content"},Sh={class:"fix-button"},Eh={style:{display:"flex","justify-content":"space-between"}},Ch={class:"form-content"},Dh={class:"dialog-footer"},Nh={class:"form-content"},Bh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,o=r,s=a.ref(!1),c=a.ref([]),m=a.ref([]),f=a.ref(!1),h=a.ref([]),y=a.ref([]),u=a.ref(""),w=a.ref(!1),N=a.ref(0),j=a.ref([]),C=a.ref([]),W=(Z,pe)=>{if((pe==null?void 0:pe.type)=="Select"&&(Z==null?void 0:Z.key)==="selectRelateType"){const ae=pe==null?void 0:pe.optionUrl;return(ae==null?void 0:ae.selectRelateType)||pe[Z.key]}if((pe==null?void 0:pe.type)=="Select"&&(Z==null?void 0:Z.key)==="menuSelect"){const ae=pe==null?void 0:pe.optionUrl;return(ae==null?void 0:ae.menuSelect)||pe[Z.key]}if((pe==null?void 0:pe.type)=="Select"&&(Z==null?void 0:Z.key)==="groupSelect"){const ae=pe==null?void 0:pe.optionUrl;return(ae==null?void 0:ae.groupSelect)||pe[Z.key]}if((pe==null?void 0:pe.type)=="Select"&&(Z==null?void 0:Z.key)==="originalContent")return(pe==null?void 0:pe.value)||pe[Z.key];if((pe==null?void 0:pe.type)=="Select"&&(Z==null?void 0:Z.key)==="multiple"){const ae=pe[Z.key];return Qs(ae)?ae:Z.default}return(Z==null?void 0:Z.label)==="类型"&&pe[Z.key]===""?"Input":(Z==null?void 0:Z.key)==="isFormColHidden"&&!pe[Z.key]?!1:pe[Z.key]},O=async Z=>{var ce,Ee,Ve,ye,z,q;s.value=!0;let pe=[];const ae=await((Ve=(Ee=(ce=ia.FormContent)==null?void 0:ce.find(le=>(le==null?void 0:le.key)===((Z==null?void 0:Z.type)===""?"Input":Z==null?void 0:Z.type)))==null?void 0:Ee.value)==null?void 0:Ve.value)??((z=(ye=ia.FormContent)==null?void 0:ye.find(le=>(le==null?void 0:le.key)===((Z==null?void 0:Z.type)===""?"Input":Z==null?void 0:Z.type)))==null?void 0:z.value);if(ae==null||ae.forEach(le=>{N.value++,pe.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,prop:le==null?void 0:le.prop,value:W(le,Z),id:N.value,contents:le==null?void 0:le.options,width:(Z==null?void 0:Z.width)??1})}),Z!=null&&Z.menuSelect&&((q=Z==null?void 0:Z.menuSelect)==null?void 0:q.length)>0){const le=await ia.menuToContentType(Z==null?void 0:Z.menuSelect);pe=pe==null?void 0:pe.map(De=>((De==null?void 0:De.name)==="组信息选项"&&(De.contents=le),De))}u.value=Z==null?void 0:Z.id,c.value=await ia.selectToBase(ia.formToOptionsContents(pe)),m.value=await ia.selectToBase(ia.formToOptionsContents(pe))},U=Z=>{var ae;f.value=!0;let pe=[];(ae=ia.FormButton)==null||ae.forEach(ce=>{N.value++,pe.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,value:(ce==null?void 0:ce.label)==="类型"&&Z[ce.key]===""?"normal":Z[ce.key],id:N.value,contents:ce==null?void 0:ce.options})}),j.value=pe,C.value=pe,u.value=Z==null?void 0:Z.id};a.watch(()=>w.value,()=>{var pe,ae;let Z=$.cloneDeep(n.originalItemContents);(pe=$.cloneDeep(n.originalItemContents))!=null&&pe.find(ce=>(ce==null?void 0:ce.key)==="enableWrap")?Z=(ae=$.cloneDeep(n.originalItemContents))==null?void 0:ae.map(ce=>((ce==null?void 0:ce.key)==="enableWrap"&&(ce.contents=!w.value),ce)):Z.push({key:"enableWrap",contents:!w.value}),o("change",Z)},{deep:!0});const H=()=>{var ae,ce,Ee,Ve,ye;j.value=C.value;let Z={};if(u.value!==""?Z.id=u.value:(N.value++,Z.id="id"+N.value),(ae=j.value)==null||ae.forEach(z=>{var le;const q=(le=ia.FormButton)==null?void 0:le.find(De=>(De==null?void 0:De.label)===(z==null?void 0:z.label));q&&(Z[q.key]=z.value)}),(ce=h.value)!=null&&ce.find(z=>z.id===Z.id))h.value=(Ee=h.value)==null?void 0:Ee.map(z=>(z.id===Z.id&&(z=Z),z));else{let z=$.cloneDeep(h.value);h.value||(h.value=[]),z.push(Z),h.value=z}f.value=!1,u.value="";let pe=$.cloneDeep(n.originalItemContents);(Ve=$.cloneDeep(n.originalItemContents))!=null&&Ve.find(z=>(z==null?void 0:z.key)==="formButton")?pe=(ye=$.cloneDeep(n.originalItemContents))==null?void 0:ye.map(z=>((z==null?void 0:z.key)==="formButton"&&(z.contents=h.value),z)):pe.push({key:"formButton",contents:h.value}),o("change",pe)},D=Z=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var pe,ae;y.value=(pe=$.cloneDeep(y.value))==null?void 0:pe.filter(ce=>(ce==null?void 0:ce.id)!==(Z==null?void 0:Z.id)),o("change",(ae=$.cloneDeep(n.originalItemContents))==null?void 0:ae.map(ce=>((ce==null?void 0:ce.key)==="formContent"&&(ce.contents=y.value),ce))),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=Z=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var pe,ae;h.value=(pe=$.cloneDeep(h.value))==null?void 0:pe.filter(ce=>(ce==null?void 0:ce.id)!==(Z==null?void 0:Z.id)),o("change",(ae=$.cloneDeep(n.originalItemContents))==null?void 0:ae.map(ce=>((ce==null?void 0:ce.key)==="formButton"&&(ce.contents=h.value),ce))),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},E=()=>{var pe;f.value=!0;let Z=[];(pe=ia.FormButton)==null||pe.forEach(ae=>{N.value++,Z.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:(ae==null?void 0:ae.label)==="类型"?"normal":"",id:N.value,contents:ae==null?void 0:ae.options})}),j.value=Z,C.value=Z},k=()=>{var pe,ae,ce;s.value=!0;let Z=[];(ce=(ae=(pe=ia.FormContent)==null?void 0:pe.find(Ee=>(Ee==null?void 0:Ee.key)==="Input"))==null?void 0:ae.value)==null||ce.forEach(Ee=>{N.value++,Z.push({label:Ee==null?void 0:Ee.label,name:Ee==null?void 0:Ee.label,type:Ee.type,value:(Ee==null?void 0:Ee.label)==="类型"?"Input":"",id:N.value,contents:Ee==null?void 0:Ee.options})}),c.value=Z,m.value=Z},g=Z=>{let pe=$.cloneDeep(C.value);pe=pe==null?void 0:pe.map(ae=>(ae.value=Z==null?void 0:Z[ae.name],ae)),C.value=pe},M=Z=>{const pe=Z.find(Ee=>(Ee==null?void 0:Ee.name)==="类型");if((pe==null?void 0:pe.value)!="Select")return;const ae=Z.find(Ee=>(Ee==null?void 0:Ee.name)==="多选"),ce=Z.find(Ee=>(Ee==null?void 0:Ee.name)==="初始值");ae!=null&&ae.value&&Di.isString(ce.value)&&(ce.value=[ce.value]),!(ae!=null&&ae.value)&&!Di.isString(ce.value)&&(ce.value="")},R=async Z=>{var pe,ae,ce,Ee,Ve,ye,z,q,le,De,be,Ye;if((Z==null?void 0:Z.类型)!==((ae=(pe=m.value)==null?void 0:pe.find(da=>(da==null?void 0:da.label)==="类型"))==null?void 0:ae.value)){let da=[];const Ma=await((Ve=(Ee=(ce=ia.FormContent)==null?void 0:ce.find(re=>(re==null?void 0:re.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:Ee.value)==null?void 0:Ve.value)?await((De=(le=(q=ia.FormContent)==null?void 0:q.find(re=>(re==null?void 0:re.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:le.value)==null?void 0:De.value):(z=(ye=ia.FormContent)==null?void 0:ye.find(re=>(re==null?void 0:re.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:z.value;if(Ma==null||Ma.forEach(re=>{var Te,qe;N.value++;const Ne=$u(re==null?void 0:re.default)?(Z==null?void 0:Z[re.label])??re.value??"":re==null?void 0:re.default;da.push({label:re==null?void 0:re.label,name:re==null?void 0:re.label,type:re.type,value:Ne,prop:re==null?void 0:re.prop,id:N.value,contents:re==null?void 0:re.options,width:((qe=(Te=m.value)==null?void 0:Te[0])==null?void 0:qe.width)??1})}),Z!=null&&Z.菜单选项&&((be=Z==null?void 0:Z.菜单选项)==null?void 0:be.length)>0){const re=await ia.menuToContentType(Z==null?void 0:Z.菜单选项);da=da==null?void 0:da.map(Ne=>((Ne==null?void 0:Ne.name)==="组信息选项"&&(Ne.contents=re),Ne))}M(da),m.value=await ia.selectToBase($.cloneDeep(da)),c.value=await ia.selectToBase($.cloneDeep(da))}else{let da=$.cloneDeep(m.value);if(da=da==null?void 0:da.map(Ma=>(Ma.value=Z==null?void 0:Z[Ma.name],Ma)),Z!=null&&Z.菜单选项&&((Ye=Z==null?void 0:Z.菜单选项)==null?void 0:Ye.length)>0){const Ma=await ia.menuToContentType(Z==null?void 0:Z.菜单选项);da=da==null?void 0:da.map(re=>((re==null?void 0:re.name)==="组信息选项"&&(re.contents=Ma),re))}da=ia.formToOptionsContents(da),M(da),m.value=await ia.selectToBase($.cloneDeep(da))}},G=Z=>{Z||(c.value=m.value)},ue=async Z=>{await R(Z),c.value=m.value},Be=la.debounce(async()=>{var ce,Ee,Ve,ye,z,q,le,De,be,Ye,da,Ma;c.value=m.value;let Z={};Z.width=((Ee=(ce=c.value)==null?void 0:ce[0])==null?void 0:Ee.width)??1,u.value!==""?Z.id=u.value:(N.value++,Z.id="id"+N.value);let pe=await((z=(ye=(Ve=ia.FormContent)==null?void 0:Ve.find(re=>{var Ne,Te;return(re==null?void 0:re.key)===(((Te=(Ne=c.value)==null?void 0:Ne.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:Te.value)??"label")}))==null?void 0:ye.value)==null?void 0:z.value)??((le=(q=ia.FormContent)==null?void 0:q.find(re=>{var Ne,Te;return(re==null?void 0:re.key)===(((Te=(Ne=c.value)==null?void 0:Ne.find(qe=>(qe==null?void 0:qe.label)==="类型"))==null?void 0:Te.value)??"label")}))==null?void 0:le.value);if((De=c.value)==null||De.forEach(re=>{const Ne=pe==null?void 0:pe.find(Te=>(Te==null?void 0:Te.label)===(re==null?void 0:re.label));Ne&&(Z[Ne.key]=re.value)}),Z.width=Z.width?Z.width:1,Z.key=Z==null?void 0:Z.label,Z.isFormColHidden=Z==null?void 0:Z.isFormColHidden,(be=y.value)!=null&&be.find(re=>re.id===Z.id))y.value=(Ye=y.value)==null?void 0:Ye.map(re=>(re.id===Z.id&&(re=Z),re));else{let re=$.cloneDeep(y.value);re.push(Z),y.value=re}y.value=y.value.map(({id:re,...Ne})=>Ne),s.value=!1,u.value="";let ae=$.cloneDeep(n.originalItemContents);(da=$.cloneDeep(n.originalItemContents))!=null&&da.find(re=>(re==null?void 0:re.key)==="formContent")?ae=(Ma=$.cloneDeep(n.originalItemContents))==null?void 0:Ma.map(re=>((re==null?void 0:re.key)==="formContent"&&(re.contents=y.value),re)):ae.push({key:"formContent",contents:y.value}),o("change",ae)},300),de=()=>{s.value=!1,f.value=!1,u.value="",m.value=[],C.value=[]};return a.watch(()=>n.originalItemContents,()=>{var pe,ae,ce,Ee,Ve,ye;if(!n.originalItemContents||n.originalItemContents.length===0)return;const Z=$.cloneDeep(n.originalItemContents);y.value=((pe=Z==null?void 0:Z.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:pe.contents)??[],h.value=((ae=Z==null?void 0:Z.find(z=>(z==null?void 0:z.key)==="formButton"))==null?void 0:ae.contents)??[],w.value=(ce=Z==null?void 0:Z.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&ce.contents?!((Ee=Z==null?void 0:Z.find(z=>(z==null?void 0:z.key)==="enableWrap"))!=null&&Ee.contents):!0,y.value=(Ve=$.cloneDeep(y.value))==null?void 0:Ve.map((z,q)=>{var De;let le=z;return le.id=(z==null?void 0:z.id)??q,z!=null&&z.label||(z.label=(z==null?void 0:z.key)??(z==null?void 0:z.label)??""),z!=null&&z.type||(z.type=(z==null?void 0:z.type)??""),z.contents=((De=z==null?void 0:z.options)==null?void 0:De.length)===0?(z==null?void 0:z.contents)??"":z==null?void 0:z.options,le}),y.value=ia.formToOptionsContents(y.value),h.value=(ye=h.value)==null?void 0:ye.map((z,q)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",background:(z==null?void 0:z.background)??"var(--ssComponent-primary-color)",id:q})},{deep:!0,immediate:!0}),(Z,pe)=>{const ae=a.resolveComponent("svg-icon"),ce=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",vh,[a.createElementVNode("div",mh,[a.createElementVNode("div",yh,[pe[2]||(pe[2]=a.createElementVNode("div",null,a.toDisplayString("表单内容"),-1)),a.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:k},{icon:a.withCtx(()=>[a.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[pe[1]||(pe[1]=a.createElementVNode("div",null,a.toDisplayString("新增"),-1))]),_:1,__:[1]})]),a.createElementVNode("div",gh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,(Ee,Ve)=>(a.openBlock(),a.createElementBlock("div",{key:Ve},[a.createElementVNode("div",bh,[a.createElementVNode("div",null,a.toDisplayString(Ee.label),1),a.createElementVNode("div",kh,[a.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>O(Ee)},null,8,["onClick"]),a.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>D(Ee)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",xh,[pe[4]||(pe[4]=a.createElementVNode("div",null,a.toDisplayString("表单按钮"),-1)),a.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:E},{icon:a.withCtx(()=>[a.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[pe[3]||(pe[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",wh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(Ee,Ve)=>(a.openBlock(),a.createElementBlock("div",{key:Ve},[a.createElementVNode("div",_h,[a.createElementVNode("div",null,a.toDisplayString(Ee.label),1),a.createElementVNode("div",Sh,[a.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>U(Ee)},null,8,["onClick"]),a.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>S(Ee)},null,8,["onClick"])])])]))),128))]),pe[6]||(pe[6]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("表单布局"))],-1)),a.createElementVNode("div",Eh,[pe[5]||(pe[5]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否自动撑宽"),-1)),a.createVNode(il._sfc_main$1,{modelValue:w.value,"onUpdate:modelValue":pe[0]||(pe[0]=Ee=>w.value=Ee)},null,8,["modelValue"])])]),a.createVNode(wr.ssDialog,{visible:s.value,onBeforeDestroy:de,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",Ch,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:R,onChangeVisible:G,onBlurChange:ue},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Dh,[a.createVNode(ce,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>pe[7]||(pe[7]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[7]}),a.createVNode(ce,{class:"ok-button button",onClick:a.unref(Be),id:"themeButton"},{default:a.withCtx(()=>pe[8]||(pe[8]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),a.createVNode(wr.ssDialog,{visible:f.value,onBeforeDestroy:de,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",Nh,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:j.value,key:j.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:de,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:H},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},_s=Jl._export_sfc(Bh,[["__scopeId","data-v-20850524"]]),Th={class:"step-module content"},Ah={class:"module-data"},zh={class:"step-module layout"},Mh={class:"form-content"},Ih=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,o=r,s=a.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),c=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),f=a.reactive({visible:!1,width:"40%",title:"步骤条"}),h=a.ref("create"),y=a.ref({}),u=a.ref([]),w=O=>{var U;y.value=O,o("change",(U=C())==null?void 0:U.compData)},N=(O,U)=>{var H,D;switch(O){case"create":(H=c.value)==null||H.forEach(S=>{S.value=""}),h.value="create",f.visible=!0;break;case"update":(D=c.value)==null||D.forEach(S=>{S.value=U[S==null?void 0:S.prop]}),h.value="update",f.visible=!0;break;case"delete":u.value.splice(U,1),h.value="delete";break}},j=O=>{var U,H,D;if((O==null?void 0:O.buttonName)==="确认"){const S=$.cloneDeep(O==null?void 0:O.content);switch(Object.keys(S).forEach(E=>{S[E]===""&&delete S[E]}),h.value){case"create":u.value.push({...S,index:((U=u.value)==null?void 0:U.length)+1});break;case"update":u.value=(H=u.value)==null?void 0:H.map(E=>E.index===(S==null?void 0:S.index)?{...E,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:E);break}o("change",(D=C())==null?void 0:D.compData),f.visible=!1}else f.visible=!1},C=()=>({comp:"Step",compData:[{key:"stepList",contents:u.value},{key:"stepConfig",contents:y.value}]}),W=()=>{f.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,O=>{var U,H;O&&(y.value=((U=O==null?void 0:O.find(D=>D.key==="stepConfig"))==null?void 0:U.contents)??{},u.value=((H=O==null?void 0:O.find(D=>D.key==="stepList"))==null?void 0:H.contents)??[])},{immediate:!0}),(O,U)=>{const H=a.resolveComponent("svg-icon"),D=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",Th,[U[2]||(U[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(D,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=S=>N("create"))},{icon:a.withCtx(()=>[a.createVNode(H,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[U[1]||(U[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",Ah,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(S,E)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:E},[a.createElementVNode("span",null,a.toDisplayString(S==null?void 0:S.title),1),a.createElementVNode("div",null,[a.createVNode(D,{type:"primary",size:"small",onClick:k=>N("update",{...S,index:E+1})},{default:a.withCtx(()=>U[3]||(U[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(D,{type:"danger",size:"small",onClick:k=>N("delete",E)},{default:a.withCtx(()=>U[4]||(U[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",zh,[U[5]||(U[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(il.ssForm,{rowContents:s.value,onChange:w},null,8,["rowContents"])])]),a.createVNode(wr.ssDialog,{visible:f.visible,title:f.title,onBeforeDestroy:W,width:f.width},{default:a.withCtx(()=>[a.createElementVNode("div",Mh,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Oh=Jl._export_sfc(Ih,[["__scopeId","data-v-7dbd17f2"]]),Lh={class:"step-module content"},$h={class:"module-data"},Rh={class:"step-module layout"},Vh={class:"form-content"},Fh=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,o=r,s=a.ref("create"),c=a.ref({}),m=a.ref([]),f=a.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),h=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),y=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),u=a.reactive({visible:!1,width:"40%",title:"时间线"}),w=O=>{var U;c.value=O,o("change",(U=C())==null?void 0:U.compData)},N=(O,U)=>{var H,D;switch(O){case"create":(H=h.value)==null||H.forEach(S=>{S.value=""}),s.value="create",u.visible=!0;break;case"update":(D=h.value)==null||D.forEach(S=>{S.value=U[S==null?void 0:S.prop]}),s.value="update",u.visible=!0;break;case"delete":m.value.splice(U,1),s.value="delete";break}},j=O=>{var U,H,D,S;if((O==null?void 0:O.buttonName)==="确认"){const E=$.cloneDeep(O==null?void 0:O.content);switch(Object.keys(E).forEach(k=>{E[k]===""&&delete E[k]}),s.value){case"create":(H=m.value)==null||H.push({...E,index:((U=m.value)==null?void 0:U.length)+1});break;case"update":m.value=(D=m.value)==null?void 0:D.map(k=>k.index===(E==null?void 0:E.index)?{...k,content:E==null?void 0:E.content,timestamp:E==null?void 0:E.timestamp}:k);break}o("change",(S=C())==null?void 0:S.compData),u.visible=!1}else u.visible=!1},C=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:m.value},{key:"timeLineConfig",contents:c.value}]}),W=()=>{u.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,O=>{var U,H;O&&(c.value=((U=O==null?void 0:O.find(D=>D.key==="timeLineConfig"))==null?void 0:U.contents)??{},m.value=((H=O==null?void 0:O.find(D=>D.key==="timeLineList"))==null?void 0:H.contents)??[])},{immediate:!0}),(O,U)=>{const H=a.resolveComponent("svg-icon"),D=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",Lh,[U[2]||(U[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(D,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=S=>N("create"))},{icon:a.withCtx(()=>[a.createVNode(H,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[U[1]||(U[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",$h,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(S,E)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:E},[a.createElementVNode("span",null,a.toDisplayString(S==null?void 0:S.content),1),a.createElementVNode("div",null,[a.createVNode(D,{type:"primary",size:"small",onClick:k=>N("update",{...S,index:E+1})},{default:a.withCtx(()=>U[3]||(U[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(D,{type:"danger",size:"small",onClick:k=>N("delete",E)},{default:a.withCtx(()=>U[4]||(U[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",Rh,[U[5]||(U[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(il.ssForm,{rowContents:f.value,onChange:w},null,8,["rowContents"])])]),a.createVNode(wr.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:W,width:u.width},{default:a.withCtx(()=>[a.createElementVNode("div",Vh,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Ph=Jl._export_sfc(Fh,[["__scopeId","data-v-39ffc861"]]),jh={};function Hh(l,r){return a.openBlock(),a.createElementBlock("div")}const Uh=Jl._export_sfc(jh,[["render",Hh]]),qh={class:"extra-content"},Wh={key:0},Kh={key:1},Gh={class:"dialog-footer"},Yh={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(l,{emit:r}){const n=l,o=a.ref(0),s=a.ref(),c=a.ref(),m=r,f=a.ref(!1),h=a.ref({}),y=a.ref({}),u=a.ref();a.watch(()=>[n.itemData],()=>{var S;const D=$.cloneDeep(n.itemData);s.value=(S=$.cloneDeep(D))==null?void 0:S.map(E=>{var k;if(E.key==="extra"){let g=[];(k=E.value)==null||k.forEach(M=>{var R;g.push((R=Object.values(M))==null?void 0:R[0])}),E.value=g}return E})},{deep:!0,immediate:!0});const w=(D,S,E,k)=>{var M;let g={};((M=D==null?void 0:D[0])==null?void 0:M.contents)==="详情"&&(f.value=!0,g[S]=D,c.value=D==null?void 0:D.filter(R=>(R==null?void 0:R.key)!=="tableContentName"),h.value=g,y.value=E,u.value=k.id)},N=D=>{var R,G,ue,Be;const S=(G=(R=Object.values($.cloneDeep(h.value)))==null?void 0:R[0])==null?void 0:G.filter(de=>(de==null?void 0:de.key)==="tableContentName"),E=(Be=(ue=Object.values($.cloneDeep(h.value)))==null?void 0:ue[0])==null?void 0:Be.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),k=E==null?void 0:E.map((de,Z)=>{var pe;return Z===D.index&&(de==null?void 0:de.comp)==="Table"&&(de.compData=(pe=de.compData)==null?void 0:pe.map(ae=>{var ce,Ee;return(ae==null?void 0:ae.key)==="tableContents"&&(ae.contents=(Ee=(ce=D.content)==null?void 0:ce.map(Ve=>{let ye={};for(let z in Ve)z!=="id"&&(ye[z]=Ve[z]);return ye}))==null?void 0:Ee.map(Ve=>Object.values(Ve))),ae})),de});k.unshift(S==null?void 0:S[0]);let g=$.cloneDeep(h.value),M={};for(let de in g)M[de]=k;h.value=M},j=()=>{f.value=!1,h.value={},y.value={},u.value=void 0,o.value++},C=D=>{var R,G,ue,Be;const S=(G=(R=Object.values($.cloneDeep(h.value)))==null?void 0:R[0])==null?void 0:G.filter(de=>(de==null?void 0:de.key)==="tableContentName"),E=(Be=(ue=Object.values($.cloneDeep(h.value)))==null?void 0:ue[0])==null?void 0:Be.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),k=E==null?void 0:E.map((de,Z)=>(Z===D.index&&(de.compData=D.contents),de));k.unshift(S==null?void 0:S[0]);let g=$.cloneDeep(h.value),M={};for(let de in g)M[de]=k;h.value=M},W=()=>{var S,E;let D={};for(let k in y.value)k===((S=Object.keys(h.value))==null?void 0:S[0])?D[k]=(E=Object.values(h.value))==null?void 0:E[0]:D[k]=y.value[k];m("change",{buttonName:"编辑",index:u.value,singleContent:D},"methodData"),f.value=!1,h.value={},y.value={},u.value=void 0},O=()=>{f.value=!1,h.value={},y.value={},u.value=void 0},U=D=>{m("change",D,"methodData")},H=D=>Ao(D);return(D,S)=>{const E=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",qh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:o.value},[(k==null?void 0:k.key)==="extra"?(a.openBlock(),a.createElementBlock("div",Wh)):(a.openBlock(),a.createElementBlock("div",Kh,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(H(k.comp)),{itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,key:g,index:(k==null?void 0:k.id)??g,onContentClick:w,onChange:U},null,40,["itemData","childItemData","index"]))]))]))),128)),a.createVNode(wr.ssDialog,{visible:f.value,onBeforeDestroy:O},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:g,class:"extra-dialog"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(H(k.comp)),{itemData:k==null?void 0:k.compData,onChange:N,childItemData:k==null?void 0:k.itemChildData,key:g,onContentChange:C,index:(k==null?void 0:k.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:a.withCtx(()=>[a.createElementVNode("div",Gh,[a.createVNode(E,{class:"cancel-button footer-button",onClick:j,id:"themeBorderButton"},{default:a.withCtx(()=>S[0]||(S[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(E,{class:"confirm-button footer-button",onClick:W,id:"themeButton"},{default:a.withCtx(()=>S[1]||(S[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Jh=Jl._export_sfc(Yh,[["__scopeId","data-v-2d9c5ab2"]]),Xh={key:0,class:"method-content"},Zh={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(l){const r=a.ref([]),n=ia.useOriginalState($.pinia),{originalPath:o}=$.storeToRefs(n),s=l,c=a.ref(!1),m=a.ref(),f=ia.useTableComp($.pinia),{multipleTableConst:h}=$.storeToRefs(f),y=$.useModelComp($.pinia),u=a.ref(!1),w=$.useMenuState($.pinia),N=$.useLoginState($.pinia),{itemData:j,isEdit:C,routeToChildPath:W,tableViewContents:O,lockingPage:U,payloadTypes:H}=$.storeToRefs(y),{activeMenuPath:D,platform:S,childMenu:E}=$.storeToRefs(w),{loginUserInfo:k}=$.storeToRefs(N),g=a.ref(!1),M=async()=>{var ye,z;(ye=r.value)!=null&&ye.find(q=>(q==null?void 0:q.buttonName)==="保存")&&await ae((z=r.value)==null?void 0:z.find(q=>(q==null?void 0:q.buttonName)==="保存")),await ia.onSaveBack()};a.watch(()=>j.value,async()=>{C.value==="view"&&!g.value&&await Ve($.cloneDeep(s.itemData)),g.value=!1},{deep:!0});const R=()=>{c.value=!1,m.value=void 0},G=ye=>ye.map(z=>{const q={};for(const le in z){const De=z[le];if(le.includes(h.value)){const be=le.split(h.value);let Ye=q;be.forEach((da,Ma)=>{Ma===be.length-1?Ye[da]=De:(Ye[da]||(Ye[da]={}),Ye=Ye[da])})}else q[le]=De}return q}),ue=async(ye,z,q=[])=>{var De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia;let le=(De=$.cloneDeep(z))==null?void 0:De.filter(V=>(V==null?void 0:V.comp)!=="methodButton");if(ye!=null&&ye.includes("[")){let V=(re=(Ma=(da=(Ye=(be=$.cloneDeep(ye))==null?void 0:be.split("["))==null?void 0:Ye[1])==null?void 0:da.split("]"))==null?void 0:Ma[0])==null?void 0:re.split(":"),P="";if(V!=null&&V[0]){let ee=(Ne=le==null?void 0:le.find(fe=>(fe==null?void 0:fe.name)===(V==null?void 0:V[0])))==null?void 0:Ne.compData;if(!ee){let fe=(Te=ye==null?void 0:ye.split("["))==null?void 0:Te[0],ve=await ia.getItemData(fe,sessionStorage.getItem("systemKey"),"",!1,"","",q);ee=(qe=ve==null?void 0:ve.find(ha=>(ha==null?void 0:ha.name)===(V==null?void 0:V[0])))==null?void 0:qe.compData}ee==null||ee.forEach(fe=>{var ve,ha,Ze,se,we,ya;if((fe==null?void 0:fe.key)==="formContent")(ve=fe==null?void 0:fe.contents)==null||ve.forEach(ze=>{var _a;(ze==null?void 0:ze.key)===(V==null?void 0:V[1])&&(Array.isArray(ze==null?void 0:ze.value)?P=ze==null?void 0:ze.value:P=(_a=ze==null?void 0:ze.value)==null?void 0:_a.toString())});else if((fe==null?void 0:fe.key)==="tableContents"){let ze=[],_a=(ha=ee==null?void 0:ee.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:ha.contents,We=(V==null?void 0:V[1])??"";if(_a!=null&&_a.every(x=>Array.isArray(x))){let x=ia.getColumnChild((we=_a==null?void 0:_a[0])==null?void 0:we.filter(Ae=>(Ae==null?void 0:Ae.label)!=="操作"));(ya=fe.contents)==null||ya.forEach(Ae=>{let ne={};Ae=Ae==null?void 0:Ae.filter(Ue=>!(Ue!=null&&Ue.id)),x==null||x.forEach((Ue,Je)=>{let ra=Ae[Je];typeof Ae[Je]=="number"&&(ra=Ae[Je].toString()),(We===""||We===Ue.prop)&&(ne[Ue.prop]=ra)}),ze.push(ne)}),ze=G(ze)}else{let x=(Ze=_a==null?void 0:_a.map(Ae=>Ae==null?void 0:Ae.label))==null?void 0:Ze.filter(Ae=>Ae!=="操作");(se=fe.contents)==null||se.forEach(Ae=>{let ne={};Ae=Ae==null?void 0:Ae.filter(Ue=>!(Ue!=null&&Ue.id)),x==null||x.forEach((Ue,Je)=>{let ra=Ae[Je];typeof Ae[Je]=="number"&&(ra=Ae[Je].toString()),(We===""||We===Ue)&&(ne[Ue]=ra)}),ze.push(ne)})}P=ze}})}return P}else if(ye!=null&&ye.includes("/")){let V={};return(Re=$.cloneDeep(le))==null||Re.forEach((P,ee)=>{var fe,ve,ha,Ze,se,we,ya,ze,_a,We,x,Ae,ne,Ue,Je,ra,Oe,za,fa;if((P==null?void 0:P.comp)==="Table"){let Oa=Array.isArray((ha=(ve=(fe=P==null?void 0:P.compData)==null?void 0:fe.find(ma=>(ma==null?void 0:ma.key)==="header"))==null?void 0:ve.contents)==null?void 0:ha[0])?(ya=(we=(se=(Ze=P==null?void 0:P.compData)==null?void 0:Ze.find(ma=>(ma==null?void 0:ma.key)==="header"))==null?void 0:se.contents)==null?void 0:we[0])==null?void 0:ya.some(ma=>ma==null?void 0:ma.children):[],Pa=(We=(_a=(ze=P==null?void 0:P.compData)==null?void 0:ze.find(ma=>(ma==null?void 0:ma.key)==="tableContents"))==null?void 0:_a.contents)==null?void 0:We.map(ma=>(ma!=null&&ma.find(Ha=>Ha==null?void 0:Ha.id)&&(ma=ma.slice(1)),ma)),ka=(Je=(Ue=(ne=(Ae=(x=P==null?void 0:P.compData)==null?void 0:x.find(ma=>(ma==null?void 0:ma.key)==="header"))==null?void 0:Ae.contents)==null?void 0:ne[0])==null?void 0:Ue[0])==null?void 0:Je.label,ua=(Oe=(ra=P==null?void 0:P.compData)==null?void 0:ra.find(ma=>(ma==null?void 0:ma.key)==="header"))==null?void 0:Oe.contents;if(Oa)(Oa==null?void 0:Oa.length)===0?V[P.name]=V!=null&&V[P.name]?V[P.name]:ia.tableToForm(Pa,ua):V[ka]=ia.tableToForm(Pa,ua);else{const ma=[];ua=ua.slice(1,ua.length-1),ua==null||ua.forEach((Ha,pl)=>{Pa==null||Pa.forEach($l=>{ma.push({key:Ha.label+$l[0],value:$l[pl+1]})})}),V["form"+ee]=ma}}else{const Oa=(fa=(za=P.compData)==null?void 0:za.find(ka=>(ka==null?void 0:ka.key)==="formContent"))==null?void 0:fa.contents;V!=null&&V.form||(V.form=[]);const Pa=[];Oa==null||Oa.forEach(ka=>{ka.key!==""&&(ka={key:(ka==null?void 0:ka.key)??(ka==null?void 0:ka.label),value:ka==null?void 0:ka.value},Pa.push(ka))}),V.form=[...Pa,...$.cloneDeep(V==null?void 0:V.form)]}}),V}else{if(ye==="createInsofDataApi"){let V=(te=$.cloneDeep(z))==null?void 0:te[0];return V={comp:(Le=$.cloneDeep(V))==null?void 0:Le.comp,compData:(He=$.cloneDeep(V))==null?void 0:He.compData,name:(Ba=$.cloneDeep(V))==null?void 0:Ba.name,isShow:(Ia=$.cloneDeep(V))==null?void 0:Ia.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:D.value},value:{pageData:V}}}return ye}},Be=async(ye,z,q)=>{var be,Ye,da;let le=await ia.getItemData(z,sessionStorage.getItem("systemKey"),""),De=le==null?void 0:le.find(Ma=>(Ma==null?void 0:Ma.name)===(q==null?void 0:q[0]));if(De){if((De==null?void 0:De.comp)==="Table"){let Ma={};for(let Le in $.cloneDeep(ye))$.cloneDeep(ye)[Le]!=="loginUser"?Ma[Le]=$.cloneDeep(ye)[Le]:Ma[Le]=((be=k.value)==null?void 0:be.account)||((Ye=k.value)==null?void 0:Ye.账号);let re=[],Ne=Ma;Array.isArray(ye)||(Ne=[Ma]),Ne==null||Ne.forEach(Le=>{re.push({[Le[q[1]]]:Le})});let Te=[],qe=re==null?void 0:re.map(Le=>{var He;return(He=Object.keys(Le))==null?void 0:He[0]});le==null||le.forEach(Le=>{var He;(Le==null?void 0:Le.name)===(q==null?void 0:q[0])&&((He=Le==null?void 0:Le.compData)==null||He.forEach(Ba=>{var Ia;(Ba==null?void 0:Ba.key)==="tableContents"&&((Ia=Ba==null?void 0:Ba.contents)==null||Ia.forEach(V=>{V!=null&&V.some(P=>qe.includes(P))&&Te.push({[V.find(P=>P.id).id]:V.find(P=>qe.includes(P))})}))}))});let Re=Te==null?void 0:Te.map(Le=>{var He;return(He=Object.keys(Le))==null?void 0:He[0]}),te=[];if(Re==null||Re.forEach(Le=>{var Ia;let He=(Ia=Te==null?void 0:Te.find(V=>{var P;return((P=Object.keys(V))==null?void 0:P[0].toString())===Le.toString()}))==null?void 0:Ia[Le],Ba=re==null?void 0:re.find(V=>{var P;return((P=Object.keys(V))==null?void 0:P[0])===He});te.push({id:parseInt(Le),value:{tableData:Ba[He]}})}),(te==null?void 0:te.length)>0)return te}else if((De==null?void 0:De.comp)==="Form"){let Ma=$.cloneDeep(De);Ma.compData=(da=Ma.compData)==null?void 0:da.map(Te=>{var qe;return(Te==null?void 0:Te.key)==="formContent"&&(Te.contents=(qe=Te.contents)==null?void 0:qe.map(Re=>((Re==null?void 0:Re.key)===(q==null?void 0:q[1])&&(Re.value=(ye==null?void 0:ye[Re==null?void 0:Re.prop])||ye),Re))),Te});let re={};for(let Te in Ma)Te!=="id"&&(re[Te]=Ma[Te]);let Ne=[];if(Ne.push({id:De==null?void 0:De.id,keyType:q==null?void 0:q[1],value:{pageData:re}}),(Ne==null?void 0:Ne.length)>0)return Ne}}},de=async(ye,z,q)=>{var be,Ye,da,Ma,re,Ne,Te,qe,Re,te;let le=await ia.getItemData(z,sessionStorage.getItem("systemKey"),""),De=le==null?void 0:le.find(Le=>(Le==null?void 0:Le.name)===(q==null?void 0:q[0]));if(De){if((De==null?void 0:De.comp)==="Table"){let Le={};for(let He in $.cloneDeep(ye))$.cloneDeep(ye)[He]!=="loginUser"?Le[He]=$.cloneDeep(ye)[He]:Le[He]=((be=k.value)==null?void 0:be.account)||((Ye=k.value)==null?void 0:Ye.账号);await Dr.createInsofDataApi({key:{type:"data",pageKey:z,tableId:De==null?void 0:De.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Le}})}else if((De==null?void 0:De.comp)==="Form"){let Le=$.cloneDeep(De),He=Object.keys(ye),Ba="";(Ma=(da=$.cloneDeep(Le))==null?void 0:da.compData)==null||Ma.forEach(ve=>{var ha,Ze;(ve==null?void 0:ve.key)==="formContent"&&((Ze=(ha=$.cloneDeep(ve))==null?void 0:ha.contents)==null||Ze.forEach(se=>{var we;He.includes(se==null?void 0:se.key)&&(se==null?void 0:se.value)===((we=k.value)==null?void 0:we.姓名)&&(Ba=se==null?void 0:se.key)}))});let Ia=[];(re=Object.values(ye[Ba]))==null||re.forEach(ve=>{ve!=null&&ve.includes("(")&&Ia.push(ve)}),Ia=[...new Set(Ia)];const V=Ia==null?void 0:Ia.map(async ve=>{var ya,ze,_a,We,x,Ae,ne,Ue,Je,ra,Oe,za;let ha="";(Ae=(x=(We=(_a=(ze=(ya=$.cloneDeep(ve))==null?void 0:ya.split("("))==null?void 0:ze[1])==null?void 0:_a.split(")"))==null?void 0:We[0])==null?void 0:x.split(":"))==null||Ae.forEach(fa=>{ha=ha===""?ha+fa.replaceAll("'",""):ha+"/"+fa.replaceAll("'","")});let Ze=[];(za=(Oe=(ra=(Je=(Ue=(ne=$.cloneDeep(ve))==null?void 0:ne.split("<"))==null?void 0:Ue[1])==null?void 0:Je.split(">"))==null?void 0:ra[0])==null?void 0:Oe.split(":"))==null||za.forEach(fa=>{Ze.push(fa.replaceAll("'",""))});const se=await ia.getItemData(ha,sessionStorage.getItem("systemKey"),"");let we="";return se==null||se.forEach(fa=>{var Oa;fa.name===(Ze==null?void 0:Ze[0])&&((Oa=fa==null?void 0:fa.compData)==null||Oa.forEach(Pa=>{var ka;(Pa==null?void 0:Pa.key)==="formContent"&&((ka=Pa.contents)==null||ka.forEach(ua=>{(ua==null?void 0:ua.key)===(Ze==null?void 0:Ze[1])&&(we=ua==null?void 0:ua.value)}))}))}),{[ve]:we}}),P=await Promise.all(V);Le.compData=(Te=(Ne=$.cloneDeep(Le))==null?void 0:Ne.compData)==null?void 0:Te.map(ve=>{var ha,Ze;return(ve==null?void 0:ve.key)==="formContent"&&(ve.contents=(Ze=(ha=$.cloneDeep(ve))==null?void 0:ha.contents)==null?void 0:Ze.map(se=>{var we,ya,ze,_a;return(we=ye[Ba])!=null&&we[se==null?void 0:se.key]&&(ye[Ba][se==null?void 0:se.key].includes("(")?se.value=(ya=P==null?void 0:P.find(We=>{var x;return((x=Object.keys(We))==null?void 0:x[0])===ye[Ba][se==null?void 0:se.key]}))==null?void 0:ya[ye[Ba][se==null?void 0:se.key]]:se.value=(_a=(ze=$.cloneDeep(ye))==null?void 0:ze[Ba])==null?void 0:_a[se==null?void 0:se.key]),se})),ve});const ee=await Dr.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let fe="";((qe=ee==null?void 0:ee.data)==null?void 0:qe.type)==="success"&&((te=(Re=ee==null?void 0:ee.data)==null?void 0:Re.result)==null||te.forEach(ve=>{var ha,Ze;((Ze=(ha=ve==null?void 0:ve.value)==null?void 0:ha.pageData)==null?void 0:Ze.name)===(q==null?void 0:q[0])&&(fe=ve.id)}),await Dr.updateInsofDataApi({id:fe,value:{pageData:Le}}))}}},Z=(ye,z="",q={})=>{for(const[le,De]of Object.entries(ye)){const be=z?`${z}.${le}`:le;De!==null&&typeof De=="object"&&!Array.isArray(De)&&Object.prototype.toString.call(De)!=="[object Date]"?Z(De,be,q):q[be]=De}return q},pe=async(ye,z,q,le)=>{var Ye,da,Ma,re,Ne,Te,qe,Re,te,Le,He,Ba,Ia,V,P,ee,fe,ve,ha,Ze,se,we,ya,ze,_a;let De=await ia.getItemData(z,sessionStorage.getItem("systemKey"),""),be=De==null?void 0:De.find(We=>(We==null?void 0:We.name)===(q==null?void 0:q[0]));if(be){if(!(q!=null&&q[1])&&(be==null?void 0:be.comp)==="Table"){let We={},x=[],Ae=(da=(Ye=be==null?void 0:be.compData)==null?void 0:Ye.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:da.contents;Ae!=null&&Ae.every(Je=>Array.isArray(Je))?x=(re=ia.getColumnChild((Ma=Ae==null?void 0:Ae[0])==null?void 0:Ma.filter(Je=>(Je==null?void 0:Je.label)!=="操作")))==null?void 0:re.map(Je=>Je==null?void 0:Je.prop):x=Ae==null?void 0:Ae.map(Je=>Je==null?void 0:Je.label);for(let Je in $.cloneDeep(ye))if($.cloneDeep(ye)[Je]!=="loginUser"){let ra=Z($.cloneDeep(ye)[Je]),Oe={};for(let za in ra)if(x!=null&&x.find(fa=>fa===za))Oe[za]=ra[za];else if(x!=null&&x.find(fa=>(fa==null?void 0:fa.toUpperCase())===(za==null?void 0:za.toUpperCase()))){let fa=x==null?void 0:x.find(Oa=>(Oa==null?void 0:Oa.toUpperCase())===(za==null?void 0:za.toUpperCase()));Oe[fa]=ra[za]}We[Je]=Oe}else We[Je]=((Ne=k.value)==null?void 0:Ne.account)||((Te=k.value)==null?void 0:Te.账号);let ne=await Dr.getInsofDataApi({keyLikes:{tableId:be==null?void 0:be.id}});if(((Re=(qe=ne==null?void 0:ne.data)==null?void 0:qe.result)==null?void 0:Re.length)>0){let Je=(Le=(te=ne==null?void 0:ne.data)==null?void 0:te.result)==null?void 0:Le.map(ra=>ra==null?void 0:ra.id);(Je==null?void 0:Je.length)>0&&await Dr.batchDeleteInsofDataApi({ids:Je})}let Ue=[];if((He=be==null?void 0:be.compData)!=null&&He.find(Je=>(Je==null?void 0:Je.key)==="pageColumn")&&((V=(Ia=(Ba=be==null?void 0:be.compData)==null?void 0:Ba.find(Je=>(Je==null?void 0:Je.key)==="pageColumn"))==null?void 0:Ia.contents)!=null&&V.includes("["))){const Je=await Dr.getInsofDataApi({id:be==null?void 0:be.tableId});let ra=((ve=(fe=(ee=(P=Je==null?void 0:Je.data)==null?void 0:P.result)==null?void 0:ee[0])==null?void 0:fe.key)==null?void 0:ve.pageKey)??"";(ha=Object.values(We))==null||ha.forEach(Oe=>{Ue.push({key:{type:"data",pageKey:ra,tableId:be==null?void 0:be.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Oe}})})}else(Ze=Object.values(We))==null||Ze.forEach(Je=>{Ue.push({key:{type:"data",pageKey:z,tableId:be==null?void 0:be.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Je}})});(Ue==null?void 0:Ue.length)>0&&await Dr.batchAddInsofDataApi({dataList:Ue})}else if(!(q!=null&&q[1])&&(be==null?void 0:be.comp)==="Form"){let We=$.cloneDeep(be);We.compData=(we=(se=$.cloneDeep(We))==null?void 0:se.compData)==null?void 0:we.map(ne=>{var Ue,Je;return(ne==null?void 0:ne.key)==="formContent"&&(ne.contents=(Je=(Ue=$.cloneDeep(ne))==null?void 0:Ue.contents)==null?void 0:Je.map(ra=>{var Oe,za;return(Oe=$.cloneDeep(ye))!=null&&Oe[ra==null?void 0:ra.key]&&(ra.value=(za=$.cloneDeep(ye))==null?void 0:za[ra==null?void 0:ra.key]),ra})),ne});const x=await Dr.getInsofDataApi({key:{type:"structure",pageKey:z,systemKey:sessionStorage.getItem("systemKey")}});let Ae="";((ya=x==null?void 0:x.data)==null?void 0:ya.type)==="success"&&((_a=(ze=x==null?void 0:x.data)==null?void 0:ze.result)==null||_a.forEach(ne=>{var Ue,Je;((Je=(Ue=ne==null?void 0:ne.value)==null?void 0:Ue.pageData)==null?void 0:Je.name)===(q==null?void 0:q[0])&&(Ae=ne.id)}),await Dr.updateInsofDataApi({id:Ae,value:{pageData:We}}))}}},ae=async ye=>{var z,q,le,De,be,Ye,da,Ma,re,Ne,Te,qe,Re,te;w.setImportLoading(!0);try{if(ye.api){let Le=new WeakMap,He=await ia.getItemData((E==null?void 0:E.value)===""?D.value:E==null?void 0:E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Le),Ba="";if(He=He==null?void 0:He.map(Ze=>{var se,we,ya,ze,_a,We,x,Ae,ne,Ue,Je,ra;if((Ze==null?void 0:Ze.comp)==="Form")Ze.compData=(se=Ze.compData)==null?void 0:se.map(Oe=>{var za;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=(za=Oe.contents)==null?void 0:za.map(fa=>{var Oa;if((fa==null?void 0:fa.value)===""&&(fa==null?void 0:fa.type)==="Select"){let Pa=ia.judgeContents((Oa=$.cloneDeep(fa))==null?void 0:Oa.optionUrl,Le);fa.value=fa.value||Pa}return fa})),Oe});else if((Ze==null?void 0:Ze.comp)==="Table"&&(we=Ze.compData)!=null&&we.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn")){let Oe=(ze=(ya=Ze.compData)==null?void 0:ya.find(Pa=>(Pa==null?void 0:Pa.key)==="pageColumn"))==null?void 0:ze.contents,za=((We=(_a=Ze.compData)==null?void 0:_a.find(Pa=>(Pa==null?void 0:Pa.key)==="pageGroup"))==null?void 0:We.contents)??"",fa=(ne=(Ae=(x=Oe==null?void 0:Oe.split("["))==null?void 0:x[1])==null?void 0:Ae.split("]"))==null?void 0:ne[0];Ba=((Ue=Oe==null?void 0:Oe.split("["))==null?void 0:Ue[0])+((ra=(Je=O.value)==null?void 0:Je.find(Pa=>(Pa==null?void 0:Pa.key)===fa))==null?void 0:ra.value)}return Ze}),!(Ba===""||Ba==="")){const Ze=await ia.getItemData(Ba,sessionStorage.getItem("systemKey"),"",!1,"","",Le);He=He==null?void 0:He.map(se=>{var we,ya,ze,_a,We,x,Ae,ne,Ue,Je,ra,Oe,za;if((se==null?void 0:se.comp)==="Table"&&(we=se.compData)!=null&&we.find(fa=>(fa==null?void 0:fa.key)==="pageColumn")){let fa=(ze=(ya=se.compData)==null?void 0:ya.find(ma=>(ma==null?void 0:ma.key)==="pageColumn"))==null?void 0:ze.contents,Oa=((We=(_a=se.compData)==null?void 0:_a.find(ma=>(ma==null?void 0:ma.key)==="pageGroup"))==null?void 0:We.contents)??"",Pa=(ne=(Ae=(x=fa==null?void 0:fa.split("["))==null?void 0:x[1])==null?void 0:Ae.split("]"))==null?void 0:ne[0],ka=((Ue=fa==null?void 0:fa.split("["))==null?void 0:Ue[0])+((ra=(Je=O.value)==null?void 0:Je.find(ma=>(ma==null?void 0:ma.key)===Pa))==null?void 0:ra.value),ua=(Oe=Ze==null?void 0:Ze.find(ma=>(ma==null?void 0:ma.name)===(Oa===""?s==null?void 0:s.compName:Oa)))==null?void 0:Oe.compData;se.compData=(za=se.compData)==null?void 0:za.map(ma=>{var Ha;return(ma==null?void 0:ma.key)==="tableContents"&&(ma.contents=(Ha=ua==null?void 0:ua.find(pl=>(pl==null?void 0:pl.key)==="tableContents"))==null?void 0:Ha.contents),ma})}return se})}let Ia={};if(((q=(z=ye==null?void 0:ye.extraValues)==null?void 0:z.input)==null?void 0:q.length)>0){const Ze=(De=(le=ye==null?void 0:ye.extraValues)==null?void 0:le.input)==null?void 0:De.map(async se=>{var we;ce!=null&&ce.find(ya=>ya===se)?Ia=await ue(se,He):Ia[Object.keys(se)[0]]=await ue((we=Object.values(se))==null?void 0:we[0],He,Le)});await Promise.all(Ze)}else Ia=await ue("/",He);let V=!1;(Ye=(be=ye==null?void 0:ye.extraValues)==null?void 0:be.output)==null||Ye.forEach(Ze=>{var se,we;(we=(se=Object.values(Ze))==null?void 0:se[0])!=null&&we.includes(".doc")&&(V=!0)});let P;if(V){const Ze=jo.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});P=await Ga.axios.post(ye.api,Ia,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ze.close()})}else P=await Ga.axios.post(ye.api,Ia,{headers:{"Content-Type":"application/json"}});let ee=(Ne=(re=(Ma=(da=$.cloneDeep(ye))==null?void 0:da.extraValues)==null?void 0:Ma.output)==null?void 0:re.map(Ze=>{var se,we,ya,ze,_a,We,x,Ae,ne,Ue,Je,ra,Oe,za,fa,Oa;if(!((we=(se=Object.values(Ze))==null?void 0:se[0])!=null&&we.includes(".doc"))){let Pa=(Ue=(ne=(Ae=(ze=$.cloneDeep((ya=Object.values(Ze))==null?void 0:ya[0]))==null?void 0:ze.split("["))==null?void 0:Ae[((x=(We=$.cloneDeep((_a=Object.values(Ze))==null?void 0:_a[0]))==null?void 0:We.split("["))==null?void 0:x.length)-1])==null?void 0:ne.split("]"))==null?void 0:Ue[0],ka=Pa==null?void 0:Pa.split(":"),ua=(Oe=$.cloneDeep((Je=Object.values(Ze))==null?void 0:Je[0]))==null?void 0:Oe.substring(0,$.cloneDeep((ra=Object.values(Ze))==null?void 0:ra[0]).lastIndexOf("["));if(ua=(fa=$.cloneDeep(ua))==null?void 0:fa.slice(0,((za=$.cloneDeep(ua))==null?void 0:za.length)-1),ua!=null&&ua.includes("[")){let ma="";if((Oa=ia.contentTransArrayToAll(ua,"/"))==null||Oa.forEach(Ha=>{var pl,$l,gl,Ol,$a,jl,Zl;if(!(Ha!=null&&Ha.includes("[")))ma=ma===""?ma+Ha.replaceAll("/",""):ma+"/"+Ha.replaceAll("/","");else{let ja=$.cloneDeep(Ha).slice(1,((pl=$.cloneDeep(Ha))==null?void 0:pl.length)-1),ba=(jl=($a=(Ol=(gl=($l=$.cloneDeep(ja))==null?void 0:$l.split("["))==null?void 0:gl[1])==null?void 0:Ol.split("]"))==null?void 0:$a[0])==null?void 0:jl.split(":"),Da="",Ua=(Zl=He==null?void 0:He.find(al=>(al==null?void 0:al.name)===(ba==null?void 0:ba[0])))==null?void 0:Zl.compData;Ua==null||Ua.forEach(al=>{var Za;(al==null?void 0:al.key)==="formContent"&&((Za=al==null?void 0:al.contents)==null||Za.forEach(Me=>{(Me==null?void 0:Me.key)===(ba==null?void 0:ba[1])&&(Da=Me==null?void 0:Me.value)}))}),ma=ma===""?ma+Da.replaceAll("/",""):ma+"/"+Da.replaceAll("/","")}}),ua=ma,ua[(ua==null?void 0:ua.length)-1]!=="/")return ua}}}))==null?void 0:Ne.filter(Ze=>Ze);ee=[...new Set($.cloneDeep(ee))];let fe=ee==null?void 0:ee.map(async Ze=>{let se=await ia.getItemData(Ze,sessionStorage.getItem("systemKey"),"",!1,"","",Le);if((se==null?void 0:se.length)===0)return await ia.getParentContents(Ze)});await Promise.all(fe);let ve=[],ha=(Re=(qe=(Te=$.cloneDeep(ye))==null?void 0:Te.extraValues)==null?void 0:qe.output)==null?void 0:Re.map(async Ze=>{var Ae,ne,Ue,Je,ra,Oe,za,fa,Oa,Pa,ka,ua,ma,Ha,pl,$l,gl,Ol,$a,jl,Zl,ja,ba,Da,Ua,al,Za,Me,na,ke,Ta,Ge,X,aa,Qe,Ie,xl,ll,hl,Ra,Wa,Sa,me,xa,wl,Rl,Fl,or,gr,Cl,sr,Tr,Ml,rr,en,Or,zr,Cr,Mr,Ir,Nr,Fr,Lr,cr,xn,Yr,nn,zn,wn,gn;if((ne=(Ae=Object.values(Ze))==null?void 0:Ae[0])!=null&&ne.includes(".doc")){var se=new Blob([P.data],{type:"application/octet-stream;charset=UTF-8"}),we=P.headers["content-disposition"],ya=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ze=ya.exec(we),_a=ze==null?void 0:ze[1],We=document.createElement("a"),x=window.URL.createObjectURL(se);m.value=[{name:_a,blobUrl:x}],c.value=!0}else{let mr=(Pa=(Oa=(fa=(Je=$.cloneDeep((Ue=Object.values(Ze))==null?void 0:Ue[0]))==null?void 0:Je.split("["))==null?void 0:fa[((za=(Oe=$.cloneDeep((ra=Object.values(Ze))==null?void 0:ra[0]))==null?void 0:Oe.split("["))==null?void 0:za.length)-1])==null?void 0:Oa.split("]"))==null?void 0:Pa[0],Hl=mr==null?void 0:mr.split(":"),pr=(ma=$.cloneDeep((ka=Object.values(Ze))==null?void 0:ka[0]))==null?void 0:ma.substring(0,$.cloneDeep((ua=Object.values(Ze))==null?void 0:ua[0]).lastIndexOf("["));if(pr!=null&&pr.includes("[")?pr=(pl=$.cloneDeep(pr))==null?void 0:pl.slice(0,((Ha=$.cloneDeep(pr))==null?void 0:Ha.length)-1):pr===""&&(pr=D.value),pr=pr.replaceAll("<","[").replaceAll(">","]"),pr!=null&&pr.includes("[")){let Wl="";($l=ia.contentTransArrayToAll(pr,"/"))==null||$l.forEach((Al,yr)=>{var ir,Pl,Vr,Pr,_n,on,eo,Mn,ao,Sn,In;if(!(Al!=null&&Al.includes("[")))Wl=Wl===""?Wl+Al.replaceAll("/",""):Wl+"/"+Al.replaceAll("/","");else{let Hn="",an="";(ir=$.cloneDeep(Al))!=null&&ir.includes("]")?(Hn=$.cloneDeep(Al).slice(1,((Pl=$.cloneDeep(Al))==null?void 0:Pl.length)-1),an=(eo=(on=(_n=(Pr=(Vr=$.cloneDeep(Hn))==null?void 0:Vr.split("["))==null?void 0:Pr[1])==null?void 0:_n.split("]"))==null?void 0:on[0])==null?void 0:eo.split(":")):(Hn=$.cloneDeep(Al).slice(1,(Mn=$.cloneDeep(Al))==null?void 0:Mn.length),an=(ao=$.cloneDeep(Hn))==null?void 0:ao.split("/"));let On="",En=(Sn=He==null?void 0:He.find(Gr=>(Gr==null?void 0:Gr.name)===(an==null?void 0:an[0])))==null?void 0:Sn.compData;En==null||En.forEach(Gr=>{var Un;(Gr==null?void 0:Gr.key)==="formContent"&&((Un=Gr==null?void 0:Gr.contents)==null||Un.forEach(bn=>{(bn==null?void 0:bn.key)===(an==null?void 0:an[1])&&(On=bn==null?void 0:bn.value)}))}),((In=ia.contentTransArrayToAll(pr,"/"))==null?void 0:In.length)-1!==yr?Wl=Wl===""?Wl+On.replaceAll("/",""):Wl+"/"+On.replaceAll("/",""):Wl=Wl+o.value+On.replaceAll("/","")}}),(gl=D.value)!=null&&gl.includes(Wl)?pr=D.value:pr=Wl}let Ll=$.cloneDeep((Ol=Object.keys(Ze))==null?void 0:Ol[0]);if((($a=P==null?void 0:P.data)==null?void 0:$a.statusCode)===200||((jl=P==null?void 0:P.data)==null?void 0:jl.code)===200){if(((ja=(Zl=P==null?void 0:P.data)==null?void 0:Zl.data)!=null&&ja[Ll]||(Da=(ba=P==null?void 0:P.data)==null?void 0:ba.result)!=null&&Da[Ll])&&(Hl==null?void 0:Hl.length)===1)return await pe(((al=(Ua=P==null?void 0:P.data)==null?void 0:Ua.data)==null?void 0:al[Ll])||((Me=(Za=P==null?void 0:P.data)==null?void 0:Za.result)==null?void 0:Me[Ll]),$.cloneDeep(pr),Hl,Ba);if((ke=(na=P==null?void 0:P.data)==null?void 0:na.data)!=null&&ke[Ll]||(Ge=(Ta=P==null?void 0:P.data)==null?void 0:Ta.result)!=null&&Ge[Ll]){let Wl=await Be(((aa=(X=P==null?void 0:P.data)==null?void 0:X.data)==null?void 0:aa[Ll])||((Ie=(Qe=P==null?void 0:P.data)==null?void 0:Qe.result)==null?void 0:Ie[Ll]),$.cloneDeep(pr),Hl);return Wl&&(ve=[...ve,...Wl]),Wl}else{if(!((xl=P==null?void 0:P.data)!=null&&xl.data)){let Wl=await ia.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,"","",Le);Wl=Wl==null?void 0:Wl.map(yr=>{var ir;return(yr==null?void 0:yr.name)===(Hl==null?void 0:Hl[0])&&(yr.compData=(ir=yr.compData)==null?void 0:ir.map(Pl=>{var Vr;return(Pl==null?void 0:Pl.key)==="formContent"&&(Pl.contents=(Vr=Pl.contents)==null?void 0:Vr.map(Pr=>{var _n,on;return(Pr==null?void 0:Pr.key)===(Hl==null?void 0:Hl[1])&&(Pr.value=(on=(_n=P==null?void 0:P.data)==null?void 0:_n.result)==null?void 0:on[Ll==null?void 0:Ll.replaceAll(":","")]),Pr})),Pl})),yr});let Al=[];(ll=Wl==null?void 0:Wl.filter(yr=>(yr==null?void 0:yr.comp)==="Form"))==null||ll.forEach(async yr=>{let ir={};for(let Pl in yr)Pl!=="id"&&(ir[Pl]=yr[Pl]);Al.push({id:yr==null?void 0:yr.id,value:{pageData:ir}})}),(Al==null?void 0:Al.length)>0&&await Dr.batchUpdateInsofDataApi({dataList:Al});return}if((Hl==null?void 0:Hl.length)===1){const Wl=(Wa=(Ra=(hl=P==null?void 0:P.data)==null?void 0:hl.data)==null?void 0:Ra.path)==null?void 0:Wa.path;let Al="";(Rl=(wl=(xa=(me=(Sa=Wl==null?void 0:Wl.split("("))==null?void 0:Sa[1])==null?void 0:me.split(")"))==null?void 0:xa[0])==null?void 0:wl.split(":"))==null||Rl.forEach(Pl=>{var Vr,Pr;Al=Al===""?Al+((Vr=Pl==null?void 0:Pl.replaceAll("'",""))==null?void 0:Vr.trim()):Al+"/"+((Pr=Pl==null?void 0:Pl.replaceAll("'",""))==null?void 0:Pr.trim())});let yr=[(sr=(Cl=(gr=(or=(Fl=Wl==null?void 0:Wl.split("<"))==null?void 0:Fl[1])==null?void 0:or.split(">"))==null?void 0:gr[0])==null?void 0:Cl.replaceAll("'",""))==null?void 0:sr.trim()],ir;return(rr=(Ml=(Tr=P==null?void 0:P.data)==null?void 0:Tr.data)==null?void 0:Ml.data)!=null&&rr[Hl==null?void 0:Hl[0]]?ir=await pe((zr=(Or=(en=P==null?void 0:P.data)==null?void 0:en.data)==null?void 0:Or.data)==null?void 0:zr[Hl==null?void 0:Hl[0]],Al,Hl,Ba):ir=await de((Mr=(Cr=P==null?void 0:P.data)==null?void 0:Cr.data)==null?void 0:Mr.data,Al,yr,Le),ir}else{const Wl=(Fr=(Nr=(Ir=P==null?void 0:P.data)==null?void 0:Ir.data)==null?void 0:Nr.path)==null?void 0:Fr.path;let Al="";return(nn=(Yr=(xn=(cr=(Lr=Wl==null?void 0:Wl.split("("))==null?void 0:Lr[1])==null?void 0:cr.split(")"))==null?void 0:xn[0])==null?void 0:Yr.split(":"))==null||nn.forEach(ir=>{var Pl,Vr;Al=Al===""?Al+((Pl=ir==null?void 0:ir.replaceAll("'",""))==null?void 0:Pl.trim()):Al+"/"+((Vr=ir==null?void 0:ir.replaceAll("'",""))==null?void 0:Vr.trim())}),await Be((gn=(wn=(zn=P==null?void 0:P.data)==null?void 0:zn.data)==null?void 0:wn.data)==null?void 0:gn[Hl==null?void 0:Hl[0]],Al,Hl)}}}}});if(await Promise.all(ha),(ve==null?void 0:ve.length)>0){let Ze=[];ve==null||ve.forEach(ya=>{Ze!=null&&Ze.find(ze=>{var _a,We,x,Ae;return((We=(_a=ze==null?void 0:ze.value)==null?void 0:_a.pageData)==null?void 0:We.name)===((Ae=(x=ya==null?void 0:ya.value)==null?void 0:x.pageData)==null?void 0:Ae.name)})||Ze.push(ya)});let se=[];Ze==null||Ze.forEach(ya=>{var We,x,Ae,ne;let ze=$.cloneDeep(ya);ze.value.pageData.compData=(We=ze.value.pageData.compData)==null?void 0:We.map(Ue=>{var Je;return(Ue==null?void 0:Ue.key)==="formContent"&&(Ue.contents=(Je=Ue.contents)==null?void 0:Je.map(ra=>{var za,fa,Oa,Pa;let Oe=(za=$.cloneDeep(ve))==null?void 0:za.find(ka=>(ka==null?void 0:ka.keyType)===(ra==null?void 0:ra.key));if(Oe){let ka=(Pa=(Oa=(fa=Oe.value.pageData.compData)==null?void 0:fa.find(ua=>(ua==null?void 0:ua.key)==="formContent"))==null?void 0:Oa.contents)==null?void 0:Pa.find(ua=>(ua==null?void 0:ua.key)===(ra==null?void 0:ra.key));ra.value=ka==null?void 0:ka.value}return ra})),Ue}),se.push({id:ze==null?void 0:ze.id,value:ze==null?void 0:ze.value});let _a=[];(ne=(Ae=(x=ze==null?void 0:ze.value)==null?void 0:x.pageData)==null?void 0:Ae.compData)==null||ne.forEach(Ue=>{var Je;(Ue==null?void 0:Ue.key)==="formContent"&&((Je=Ue==null?void 0:Ue.contents)==null||Je.forEach(ra=>{var Oe,za,fa,Oa,Pa,ka;if((za=(Oe=ra==null?void 0:ra.optionUrl)==null?void 0:Oe.menuSelect)!=null&&za.find(ua=>ua==null?void 0:ua.includes("[")))if(_a!=null&&_a.find(ua=>{var ma,Ha,pl;return((ma=ua==null?void 0:ua.key)==null?void 0:ma.join(","))===((pl=(Ha=ra==null?void 0:ra.optionUrl)==null?void 0:Ha.menuSelect)==null?void 0:pl.join(","))})){let ua=(fa=_a==null?void 0:_a.find(ma=>{var Ha,pl,$l;return((Ha=ma==null?void 0:ma.key)==null?void 0:Ha.join(","))===(($l=(pl=ra==null?void 0:ra.optionUrl)==null?void 0:pl.menuSelect)==null?void 0:$l.join(","))}))==null?void 0:fa.value;ua.push({key:ra==null?void 0:ra.prop,groups:(Oa=ra==null?void 0:ra.optionUrl)==null?void 0:Oa.groupSelect,value:ra==null?void 0:ra.value}),_a=_a==null?void 0:_a.map(ma=>{var Ha,pl,$l;return((Ha=ma==null?void 0:ma.key)==null?void 0:Ha.join(","))===(($l=(pl=ra==null?void 0:ra.optionUrl)==null?void 0:pl.menuSelect)==null?void 0:$l.join(","))&&(ma.value=ua),ma})}else _a.push({key:(Pa=ra==null?void 0:ra.optionUrl)==null?void 0:Pa.menuSelect,value:[{key:ra==null?void 0:ra.prop,groups:(ka=ra==null?void 0:ra.optionUrl)==null?void 0:ka.groupSelect,value:ra==null?void 0:ra.value}]})}))}),(_a==null?void 0:_a.length)>0&&(_a=_a==null?void 0:_a.map(Ue=>{var ra;let Je="";return(ra=Ue==null?void 0:Ue.key)==null||ra.forEach(Oe=>{var za;if(!(Oe!=null&&Oe.includes("[")))Je=Je===""?Je+Oe:Je+"/"+Oe;else{let fa="",Oa=(za=Oe==null?void 0:Oe.replaceAll("[","").replaceAll("]",""))==null?void 0:za.split(":");He==null||He.forEach(Pa=>{var ka;(Pa==null?void 0:Pa.name)===(Oa==null?void 0:Oa[0])&&((ka=Pa==null?void 0:Pa.compData)==null||ka.forEach(ua=>{var ma;(ua==null?void 0:ua.key)==="formContent"&&((ma=ua==null?void 0:ua.contents)==null||ma.forEach(Ha=>{(Ha==null?void 0:Ha.prop)===(Oa==null?void 0:Oa[1])&&(fa=Ha==null?void 0:Ha.value)}))}))}),Je=Je+o.value+fa}}),Ue.key=Je,Ue})),_a==null||_a.forEach(Ue=>{var za,fa,Oa;let Je=(za=Le[Ue.key])==null?void 0:za.find(Pa=>{var ka,ua,ma,Ha,pl,$l,gl;return((ua=(ka=Pa==null?void 0:Pa.value)==null?void 0:ka.pageData)==null?void 0:ua.name)===((pl=(Ha=(ma=Ue==null?void 0:Ue.value)==null?void 0:ma[0])==null?void 0:Ha.groups)==null?void 0:pl[0])&&((gl=($l=Pa==null?void 0:Pa.value)==null?void 0:$l.pageData)==null?void 0:gl.name)!==void 0}),ra=Je==null?void 0:Je.id,Oe=(fa=Je==null?void 0:Je.value)==null?void 0:fa.pageData;Oe.compData=(Oa=Oe.compData)==null?void 0:Oa.map(Pa=>{var ka;return(Pa==null?void 0:Pa.key)==="formContent"&&(Pa.contents=(ka=Pa.contents)==null?void 0:ka.map(ua=>{var Ha;let ma=(Ha=Ue.value)==null?void 0:Ha.find(pl=>(pl==null?void 0:pl.key)===(ua==null?void 0:ua.prop));return ma&&(ua.value=ma.value),ua})),Pa}),se.push({id:ra,value:{pageData:Oe}})})});let we=(te=$.cloneDeep(ve))==null?void 0:te[0];(se==null?void 0:se.length)>0&&await Dr.batchUpdateInsofDataApi({dataList:se})}y.setFreshContent(!0)}w.setImportLoading(!1)}catch{Ga.ElMessage.error("方法执行错误,请查看方法!"),w.setImportLoading(!1)}g.value=!0},ce=["createInsofDataApi"],Ee=la.debounce(async ye=>{ae(ye)},100),Ve=async ye=>{var Ye,da,Ma;const z=$.cloneDeep(ye);let q,le=new WeakMap;ye!=null&&ye[0].path&&(q=await(z==null?void 0:z.map(async(re,Ne)=>{var Ia,V,P,ee,fe,ve,ha,Ze,se,we,ya,ze,_a,We,x,Ae;const qe=(Ia=le[re==null?void 0:re.path])==null?void 0:Ia.filter(ne=>{var Ue;return((Ue=ne==null?void 0:ne.key)==null?void 0:Ue.type)==="data"});let Re="";const te=await ia.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,le);qe==null||qe.forEach(ne=>{var Ue,Je,ra,Oe,za;((Je=(Ue=ne==null?void 0:ne.value)==null?void 0:Ue.tableData)==null?void 0:Je.算法名称)===((ra=z==null?void 0:z[Ne])==null?void 0:ra.method)&&(Re=(za=(Oe=ne==null?void 0:ne.value)==null?void 0:Oe.tableData)==null?void 0:za.算法体)});const Le=await ia.getItemData(re==null?void 0:re.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,le);let He="",Ba=(fe=(ee=(P=(V=Le==null?void 0:Le[0])==null?void 0:V.compData)==null?void 0:P.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:ee.contents)==null?void 0:fe.findIndex(ne=>(ne==null?void 0:ne.prop)==="算法体");return(ha=(ve=Le==null?void 0:Le[0])==null?void 0:ve.compData)==null||ha.forEach(ne=>{var Ue;(ne==null?void 0:ne.key)==="tableContents"&&((Ue=ne==null?void 0:ne.contents)==null||Ue.forEach(Je=>{Je!=null&&Je.find(ra=>ra===(re==null?void 0:re.method))&&(He=Je[Ba])}))}),{buttonName:((Ze=z==null?void 0:z[Ne])==null?void 0:Ze.method)||((ya=(we=(se=qe==null?void 0:qe[0])==null?void 0:se.value)==null?void 0:we.tableData)==null?void 0:ya.算法名称),api:(Re===""?(We=(_a=(ze=qe==null?void 0:qe[0])==null?void 0:ze.value)==null?void 0:_a.tableData)==null?void 0:We.算法体:Re)||He,content:te==null?void 0:te.filter(ne=>ne.comp!=="methodButton"),extraContent:(x=$.cloneDeep(re.value))==null?void 0:x.slice(1),methodName:(re==null?void 0:re.path)??"",extraValues:(Ae=z==null?void 0:z[Ne])==null?void 0:Ae.data}})));const De=z==null?void 0:z.map(async re=>{var Le,He,Ba,Ia,V,P;const Ne=(Le=resAll.data.result)==null?void 0:Le.filter(ee=>{var fe,ve,ha;return((fe=ee==null?void 0:ee.key)==null?void 0:fe.parentTable)===""&&((ve=ee==null?void 0:ee.key)==null?void 0:ve.type)==="method"&&((ha=ee==null?void 0:ee.key)==null?void 0:ha.methodName)===ee.method}),Te=Ne==null?void 0:Ne[0],qe=(He=resAll.data.result)==null?void 0:He.filter(ee=>{var fe,ve;return((fe=ee==null?void 0:ee.key)==null?void 0:fe.type)==="methodData"&&((ve=ee==null?void 0:ee.key)==null?void 0:ve.tableId)===(Te==null?void 0:Te.id)}),Re=await ia.getItemData(D.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,le),te=qe==null?void 0:qe[0];return{buttonName:(Ba=Te==null?void 0:Te.key)==null?void 0:Ba.methodKey,api:(V=(Ia=te==null?void 0:te.value)==null?void 0:Ia.tableData)==null?void 0:V[0],content:Re==null?void 0:Re.filter(ee=>ee.comp!=="methodButton"),extraContent:(P=$.cloneDeep(re.value))==null?void 0:P.slice(1),methodName:(re==null?void 0:re.method)??""}}),be=(Ye=ye==null?void 0:ye[0])!=null&&Ye.path&&((da=ye==null?void 0:ye[0])==null?void 0:da.path)!==""?await Promise.all(q):await Promise.all(De);r.value=be==null?void 0:be.filter(re=>re==null?void 0:re.extraContent),(Ma=r.value)==null||Ma.forEach(re=>{var Ne;re.api===""&&((Ne=re.content)==null||Ne.forEach(Te=>{var qe;Te.comp=="Table"&&y.setExtraContents(ia.methodTableToContent(Te.compData,(qe=re.extraContent)==null?void 0:qe[0]))}))})};return a.watch(()=>s.itemData,async()=>{C.value=="view"&&!g.value&&await Ve($.cloneDeep(s.itemData)),g.value=!1},{immediate:!0,deep:!0}),(ye,z)=>{var q,le,De;return a.unref(C)!=="edit"?(a.openBlock(),a.createElementBlock("div",Xh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((q=r.value)==null?void 0:q.filter(be=>(be==null?void 0:be.buttonName)!=="保存"),be=>{var Ye;return a.openBlock(),a.createElementBlock("div",null,[be.api!==""?(a.openBlock(),a.createBlock(a.unref(ns._sfc_main),{key:0,disabled:a.unref(U)===a.unref(D)&&!((Ye=be==null?void 0:be.buttonName)!=null&&Ye.includes("预览")),class:"calculator-content",modelValue:be.buttonName,onClickTrigger:da=>a.unref(Ee)(be),loading:u.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):a.createCommentVNode("",!0)])}),256)),a.createElementVNode("div",null,[a.unref(W)!==""&&((De=a.unref(D))==null?void 0:De[((le=a.unref(D))==null?void 0:le.length)-1])!==a.unref(o)?(a.openBlock(),a.createBlock(a.unref(ns._sfc_main),{key:0,class:"calculator-content",onClickTrigger:M,modelValue:"保存"})):a.createCommentVNode("",!0)]),c.value?(a.openBlock(),a.createBlock(il.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:R},null,8,["fileDataList"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)}}},Qh=Jl._export_sfc(Zh,[["__scopeId","data-v-063aa9af"]]),e4={};function a4(l,r){return" 567 "}const l4=Jl._export_sfc(e4,[["render",a4]]),r4={class:"module content"},n4={class:"module data"},o4={class:"module layout"},i4={class:"form-content"},t4=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,o=r,s=a.reactive({visible:!1,width:"40%",title:"签名配置"}),c=a.ref("create"),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),f=a.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),h=a.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),y=a.ref({}),u=a.ref([]),w=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:u.value},{key:"signConfig",contents:y.value}]}),N=O=>{var U;y.value=$.cloneDeep(O),o("change",(U=w())==null?void 0:U.compData)},j=O=>{var U,H;if((O==null?void 0:O.buttonName)==="确认"){const D=$.cloneDeep(O==null?void 0:O.content);switch(c.value){case"create":u.value.push({...D,index:((U=u.value)==null?void 0:U.length)+1});break}o("change",(H=w())==null?void 0:H.compData),s.visible=!1}else s.visible=!1},C=(O,U)=>{var H,D;switch(O){case"create":(H=h.value)==null||H.forEach(S=>{S.value=""}),c.value="create",s.visible=!0;break;case"update":(D=h.value)==null||D.forEach(S=>{S.value=U[S==null?void 0:S.prop]}),c.value="update",s.visible=!0;break;case"delete":u.value.splice(U,1),c.value="delete";break}},W=()=>{s.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,O=>{var U,H;O&&(y.value=((U=O==null?void 0:O.find(D=>D.key==="signConfig"))==null?void 0:U.contents)??{},u.value=((H=O==null?void 0:O.find(D=>D.key==="signTypeList"))==null?void 0:H.contents)??[])},{immediate:!0}),(O,U)=>{const H=a.resolveComponent("svg-icon"),D=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",r4,[U[2]||(U[2]=a.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),a.createVNode(D,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=S=>C("create"))},{icon:a.withCtx(()=>[a.createVNode(H,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[U[1]||(U[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",n4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(S,E)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:E},[a.createElementVNode("span",null,a.toDisplayString(S==null?void 0:S.label),1),a.createElementVNode("div",null,[a.createVNode(D,{type:"primary",size:"small",onClick:k=>C("update",{...S,index:E+1})},{default:a.withCtx(()=>U[3]||(U[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(D,{type:"danger",size:"small",onClick:k=>C("delete",E)},{default:a.withCtx(()=>U[4]||(U[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",o4,[a.createVNode(il.ssForm,{rowContents:f.value,onChange:N},null,8,["rowContents"])])]),a.createVNode(wr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:W,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",i4,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),s4=Jl._export_sfc(t4,[["__scopeId","data-v-487e0536"]]),c4=a.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(l,{emit:r}){const n=l,o=r,s=a.ref(0),c=a.computed(()=>{var w,N;return(w=n==null?void 0:n.stepConfig)!=null&&w.allowTrigger?s.value:(N=n==null?void 0:n.stepConfig)==null?void 0:N.active}),m=(w,N)=>{s.value=N-1,o("clickStep",w,N)};a.onMounted(()=>{var w;o("clickStep",(w=n==null?void 0:n.stepList)==null?void 0:w[0],0)});const f=w=>il.getComponent(w),h=()=>{var N;const w=(N=n==null?void 0:n.stepList)==null?void 0:N.find((j,C)=>C+1===c.value);return console.log("findStep",w),w?w==null?void 0:w.children:[]},y=w=>{o("clickTrigger",w)},u=w=>{o("changeTrigger",w)};return(w,N)=>{var W,O,U,H,D;const j=a.resolveComponent("el-step"),C=a.resolveComponent("el-steps");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(C,{direction:(W=l.stepConfig)==null?void 0:W.direction,active:c.value,"finish-status":"success",simple:(O=l.stepConfig)==null?void 0:O.simple,"align-center":((U=l.stepConfig)==null?void 0:U.alignCenter)??!0},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.stepList,(S,E)=>(a.openBlock(),a.createBlock(j,{key:E,class:"step-item",onClick:k=>m(S,E+1)},{title:a.withCtx(()=>[a.renderSlot(w.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:a.withCtx(()=>[a.renderSlot(w.$slots,"description",{descriptions:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(H=l.stepConfig)!=null&&H.allowTrigger&&((D=l.stepConfig)!=null&&D.active)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(h(),(S,E)=>(a.openBlock(),a.createElementBlock("div",{key:E,class:"step-cont-wrap"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(f(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":k=>S.value=k,onClickTrigger:y,onChangeTrigger:u,content:S==null?void 0:S.content},a.createSlots({_:2},[a.renderList(w.$slots,(k,g)=>({name:g,fn:a.withCtx(M=>[a.renderSlot(w.$slots,g,a.mergeProps({ref_for:!0},M||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):a.createCommentVNode("",!0)],64)}}}),u4=Jl._export_sfc(c4,[["__scopeId","data-v-fdbd6832"]]),d4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(l,{emit:r}){const n=l,o=r,s=a.ref({}),c=a.ref([]),m=(f,h)=>{o("clickStep",f,h)};return a.watch(()=>n==null?void 0:n.itemData,f=>{var w,N,j,C;s.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let h=((w=f==null?void 0:f.find(W=>(W==null?void 0:W.key)==="stepName"))==null?void 0:w.contents)??[],y=[];(j=(N=f==null?void 0:f.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:N.contents)==null||j.forEach(W=>{y.push({label:W==null?void 0:W.label,prop:W==null?void 0:W.prop,name:W==null?void 0:W.prop,type:"text",disabled:!0})});let u=((C=f==null?void 0:f.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:C.contents)??[];h=h==null?void 0:h.map((W,O)=>{let U=y==null?void 0:y.map(H=>{var D;return{...H,value:(D=u==null?void 0:u[O])==null?void 0:D[H==null?void 0:H.prop]}});return{title:W,description:U}}),c.value=h},{immediate:!0,deep:!0}),(f,h)=>{const y=a.resolveComponent("svg-icon");return a.openBlock(),a.createBlock(u4,{stepConfig:s.value,stepList:c.value,onClickStep:m},{icon:a.withCtx(()=>[a.createVNode(y,{name:"import"})]),title:a.withCtx(({title:u})=>[a.createTextVNode(a.toDisplayString(u),1)]),description:a.withCtx(({descriptions:u})=>[a.createVNode(il.ssForm,{ref:"formRef",rowContents:u,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),p4=a.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(l){return(r,n)=>{const o=a.resolveComponent("el-timeline-item"),s=a.resolveComponent("el-timeline");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.activities,(c,m)=>(a.openBlock(),a.createBlock(o,{key:m,timestamp:c.timestamp,placement:l.timeLineConfig.placement,center:l.timeLineConfig.isCenter,"hide-timestamp":!0,type:l.timeLineConfig.type,color:l.timeLineConfig.color,size:l.timeLineConfig.size,icon:l.timeLineConfig.icon,hollow:l.timeLineConfig.isHollow},{default:a.withCtx(()=>[a.renderSlot(r.$slots,"content",{content:c==null?void 0:c.content,timestamp:c==null?void 0:c.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),f4=Jl._export_sfc(p4,[["__scopeId","data-v-4172a886"]]),h4={class:"line-content"},v4={class:"line-time"},m4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(l){const r=l,n=a.ref({}),o=a.ref([]);return a.watch(()=>r==null?void 0:r.itemData,s=>{var c,m;o.value=(c=s==null?void 0:s.find(f=>(f==null?void 0:f.key)==="timeLineList"))==null?void 0:c.contents,n.value=(m=s==null?void 0:s.find(f=>(f==null?void 0:f.key)==="timeLineConfig"))==null?void 0:m.contents},{immediate:!0}),(s,c)=>(a.openBlock(),a.createBlock(f4,{activities:o.value,timeLineConfig:n.value},{content:a.withCtx(({content:m,timestamp:f})=>[a.createElementVNode("span",h4,a.toDisplayString(m),1),a.createElementVNode("span",v4,a.toDisplayString(f),1)]),_:1},8,["activities","timeLineConfig"]))}}),y4=Jl._export_sfc(m4,[["__scopeId","data-v-b4d9deed"]]),g4={class:"tabs-content"},b4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(l,{emit:r}){const n=l,o=r,s=a.ref();a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const c=N=>{o("change",N)},m=(N,j)=>{o("contentChange",N,j)},f=N=>{o("pageChange",N)},h=N=>{o("rowClick",N)},y=(N,j)=>{o("routeUrl",N,j)},u=N=>{o("clickTrigger",N)},w=(N,j)=>{o("clickMainKey",N,j)};return(N,j)=>{var C,W;return a.openBlock(),a.createElementBlock("div",g4,[(C=s.value)!=null&&C.length?(a.openBlock(),a.createBlock(il.ssTab,{tabsContents:s.value,key:(W=s.value)==null?void 0:W.length},{pane:a.withCtx(({tab:O,index:U})=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Go)(O==null?void 0:O.comp)),{related:O==null?void 0:O.relatedTables,compNames:n==null?void 0:n.compNames,compName:O==null?void 0:O.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:l.isDevMode,itemData:O==null?void 0:O.compData,childItemData:O==null?void 0:O.itemChildData,onChange:c,index:(O==null?void 0:O.id)??U,config:{showIndex:O==null?void 0:O.showIndex,allowMove:O==null?void 0:O.allowMove,viewport:O==null?void 0:O.viewport},onContentChange:m,onPageChange:f,onRowClick:h,onRouteUrl:y,parentTableId:O==null?void 0:O.tableId,allMapContents:l.allMapContents,children:O==null?void 0:O.children,level:1,onClickTrigger:u,onClickMainKey:w},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):a.createCommentVNode("",!0)])}}}),k4=Jl._export_sfc(b4,[["__scopeId","data-v-ded4e0d9"]]),x4={class:"type-select"},w4=["onClick"],_4={class:"list-icon"},S4={__name:"modelSelect",setup(l){const r=Qn($.pinia),{itemData:n}=$.storeToRefs(r),o=s=>{const c=$.cloneDeep(n.value);c.push({comp:s.comp,name:s.name,compData:[]}),r.setItemData(c)};return(s,c)=>{const m=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",x4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(iu),(f,h)=>(a.openBlock(),a.createElementBlock("div",{class:"type-list",key:h},[a.createElementVNode("div",{class:"list-content",onClick:y=>o(f)},[a.createElementVNode("div",_4,[a.createVNode(m,{name:f.icon},null,8,["name"])]),a.createElementVNode("div",null,a.toDisplayString(f.name),1)],8,w4)]))),128))])}}},E4=Jl._export_sfc(S4,[["__scopeId","data-v-91799bf8"]]),C4={class:"fill-content"},D4={class:"operate-content"},N4={class:"collapse-title-content"},B4={class:"collapse-title-item"},T4={key:1},A4=["onClick"],z4={class:"icon-content"},M4={key:0,class:"edit-content"},I4=["onClick"],O4={class:"comp-child"},L4={__name:"modelFill",setup(l){const r=Qn($.pinia),{itemData:n,originalData:o}=$.storeToRefs(r),s=a.ref([]);a.ref([]);const c=a.ref([]),m=a.ref([]),f=j=>{var W;let C=(W=$.cloneDeep(m.value))==null?void 0:W.map((O,U)=>(j===U&&(O.content=!0),O));m.value=C},h=j=>{var W;let C=(W=$.cloneDeep(m.value))==null?void 0:W.map((O,U)=>(j===U&&(O.content=!1),O));m.value=C,s.value=$.cloneDeep(n.value)},y=(j,C)=>{var H;let W=(H=$.cloneDeep(m.value))==null?void 0:H.map((D,S)=>(j===S&&(D.content=!1),D));m.value=W;const O=$.cloneDeep(n.value),U=O==null?void 0:O.filter((D,S)=>(S===j&&(D.name=C),D));r.setOriginalData(U),r.setItemData(U)};a.watch(()=>n.value,()=>{var j,C,W;!n.value||((j=n.value)==null?void 0:j.length)===0?s.value=[]:s.value=(C=$.cloneDeep(n.value))==null?void 0:C.filter(O=>(O==null?void 0:O.comp)!=="methodButton"),c.value=s.value,m.value=(W=$.cloneDeep(c.value))==null?void 0:W.map((O,U)=>({id:U,content:!1}))},{deep:!0,immediate:!0});const u=j=>Ao(j),w=(j,C,W)=>{var U,H;if(!j)return;let O=$.cloneDeep(n.value);O=(U=O==null?void 0:O.map((D,S)=>(S===W&&(D.compData=j),D)))==null?void 0:U.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),m.value=(H=$.cloneDeep(O))==null?void 0:H.map((D,S)=>({id:S,content:!1})),r.setOriginalData(O),r.setItemData(O)},N=j=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const C=$.cloneDeep(n.value),W=C==null?void 0:C.filter((O,U)=>U!==j);r.setOriginalData(W),r.setItemData(W),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(j,C)=>{const W=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",C4,[C[1]||(C[1]=a.createElementVNode("div",{class:"fill-operate"},a.toDisplayString("操作栏"),-1)),a.createElementVNode("div",D4,[a.createVNode(Zs.default,{class:"collapse-content",collapseContents:s.value},{title:a.withCtx(({item:O,index:U})=>{var H,D,S,E,k,g,M,R,G,ue;return[a.createElementVNode("div",N4,[a.createElementVNode("div",B4,[(D=(H=m.value)==null?void 0:H.find(Be=>Be.id===U))!=null&&D.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"collapse-title",style:a.normalizeStyle({marginRight:O.name&&O.name!==""?"8px":"0px"})},a.toDisplayString(O.name),5)),(E=(S=m.value)==null?void 0:S.find(Be=>Be.id===U))!=null&&E.content?(a.openBlock(),a.createElementBlock("div",T4,[a.createVNode(il.ssInput,{modelValue:O.name,"onUpdate:modelValue":Be=>O.name=Be,onClick:C[0]||(C[0]=a.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):a.createCommentVNode("",!0),(g=(k=m.value)==null?void 0:k.find(Be=>Be.id===U))!=null&&g.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(Be=>f(U),["stop"]),class:"icon-content"},[a.createVNode(W,{name:"Edit",style:{width:"16px",height:"16px"}})],8,A4))]),a.createElementVNode("div",z4,[(R=(M=m.value)==null?void 0:M.find(Be=>Be.id===U))!=null&&R.content?(a.openBlock(),a.createElementBlock("div",M4,[a.createVNode(W,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:a.withModifiers(Be=>h(U),["stop"])},null,8,["onClick"]),a.createVNode(W,{name:"Save",onClick:a.withModifiers(Be=>y(U,O.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):a.createCommentVNode("",!0),(ue=(G=m.value)==null?void 0:G.find(Be=>Be.id===U))!=null&&ue.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,onClick:a.withModifiers(Be=>N(U),["stop"]),class:"icon-content"},[a.createVNode(W,{name:"Delete",style:{width:"16px",height:"16px"}})],8,I4))])])]}),content:a.withCtx(({item:O,index:U})=>{var H,D;return[a.createElementVNode("div",O4,[a.createTextVNode(a.toDisplayString(u(O.comp+"Operate"))+" ",1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u(O.comp+"Operate")),{itemContents:O==null?void 0:O.compData,originalItemContents:(D=(H=c.value)==null?void 0:H.find((S,E)=>E===U))==null?void 0:D.compData,onChange:S=>w(S,O,U)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},$4=Jl._export_sfc(L4,[["__scopeId","data-v-a46a44b9"]]),R4={key:0,class:"show-content"},V4={style:{display:"flex"}},F4={__name:"modelShow",setup(l){const r=Qn($.pinia),{itemData:n}=$.storeToRefs(r),o=a.ref([]);a.watch(()=>n.value,()=>{var c;!n.value||((c=n.value)==null?void 0:c.length)===0?o.value=[]:o.value=$.cloneDeep(n.value)},{deep:!0,immediate:!0});const s=c=>Ao(c);return(c,m)=>{var f;return((f=o.value)==null?void 0:f.length)>0?(a.openBlock(),a.createElementBlock("div",R4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.value,(h,y)=>(a.openBlock(),a.createElementBlock("div",{class:"item-content",key:y},[a.createElementVNode("div",V4,a.toDisplayString(h.name),1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:y},null,8,["itemData","childItemData"]))]))),128))])):a.createCommentVNode("",!0)}}},P4=Jl._export_sfc(F4,[["__scopeId","data-v-3f3e863e"]]),j4={class:"tabs-header"},H4={class:"tabs-list"},U4={class:"tab-name"},q4={class:"tab-actions"},W4=["onClick"],K4=["onClick"],G4=["onClick"],Y4={class:"model-operate"},J4={class:"model-select",style:{display:"unset"}},X4={class:"existing-components"},Z4={class:"component-list"},Q4=["onClick"],e6={class:"component-info"},a6={class:"component-type"},l6={class:"component-name"},r6={class:"model-fill"},n6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,o=r,s=a.ref([]),c=a.ref(!1),m=a.ref(""),f=a.ref({title:""}),h=a.ref(-1),y=a.ref(!1),u=a.ref(-1),w=a.ref(new WeakMap),N=a.ref(null),j=Qn($.pinia),{itemData:C}=$.storeToRefs(j),W=()=>{m.value="新增标签页",f.value.title="",h.value=-1,c.value=!0},O=ye=>{m.value="修改标签页",f.value.title=s.value[ye].title,h.value=ye,c.value=!0},U=ye=>{const z=S(ye);w.value.delete(z),s.value.splice(ye,1),Ve()},H=()=>{if(f.value.title.trim()){if(h.value===-1){const ye={title:f.value.title,value:f.value.title,label:f.value.title,children:[],id:D()};s.value.push(ye)}else s.value[h.value].title=f.value.title,s.value[h.value].value=f.value.title,s.value[h.value].label=f.value.title;c.value=!1,Ve()}},D=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=ye=>{const z=s.value[ye];return z.id||(z.id=D()),z.id},E=ye=>{var le;u.value=ye;const z=S(ye);N.value=$.cloneDeep(C.value);let q=w.value.get(z);!q&&((le=s.value[ye].children)==null?void 0:le.length)>0&&(q=R(s.value[ye].children)),q?j.setItemData($.cloneDeep(q)):j.setItemData([]),y.value=!0},k=a.computed(()=>{const ye=$.useModelComp($.pinia),z=$.storeToRefs(ye).itemData.value;return console.log("可用组件数据",z),!z||!Array.isArray(z)?[]:z.filter(q=>{var le;if(q.comp==="Tabs"&&u.value>=0){const De=S(u.value);if((le=q.compData)==null?void 0:le.some(Ye=>{var da;return Ye.key==="stepList"&&((da=Ye.contents)==null?void 0:da.some(Ma=>Ma.id===De))}))return!1}return!0})}),g=ye=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ye]||ye,M=ye=>{var z;try{const q=$.cloneDeep(ye);q.id=Date.now()+Math.random(),q.comp==="Tabs"&&((z=q.compData)==null||z.forEach(De=>{De.key==="stepList"&&De.contents&&De.contents.forEach(be=>{be.id=D()})}));const le=$.cloneDeep(C.value);le.push(q),j.setItemData(le)}catch(q){console.error("添加组件失败:",q)}},R=ye=>ye.map(z=>{var q;switch(z.type){case"form":return{comp:"Form",name:z.value||"表单",compData:G(z.content)};case"table":return{comp:"Table",name:z.value||"表格",compData:ue(z.content)};default:return{comp:"Unknown",name:z.value||"",compData:((q=z.content)==null?void 0:q.originalData)||[]}}}),G=ye=>{if(!ye)return[];const z=[];return ye.rowContents&&z.push({key:"formContent",contents:ye.rowContents}),ye.buttonValue&&z.push({key:"formButton",contents:ye.buttonValue}),typeof ye.isEnableWrap<"u"&&z.push({key:"enableWrap",contents:ye.isEnableWrap}),z},ue=ye=>[],Be=()=>{if(u.value>=0&&u.value<s.value.length){const ye=S(u.value);w.value.set(ye,$.cloneDeep(C.value)),s.value[u.value].children=pe(C.value),console.log("保存后的数据",pe(C.value))}y.value=!1,u.value=-1,N.value=null,Ve()},de=()=>{N.value&&j.setItemData($.cloneDeep(N.value)),y.value=!1,u.value=-1,N.value=null},Z=()=>{y.value&&de()},pe=ye=>{if(!Array.isArray(ye))throw new Error("sourceData must be an array");return ye.map((z,q)=>{if(!z||typeof z!="object")return z;const{comp:le,name:De,compData:be}=z;switch(le){case"Form":return{type:"form",content:ae(be||[]),value:"表单"};case"Table":return{type:"table",content:ce(be||[]),value:"表格"};default:return{type:"xxx",content:Ee(be||[]),value:""}}})},ae=ye=>{const z={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},q={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ye.forEach((le,De)=>{if(!le||typeof le!="object"){console.warn(`Invalid config at index ${De}:`,le);return}const{key:be,contents:Ye}=le,da=q[be];if(!da){console.warn(`Unknown Form config key: ${be}`);return}be==="enableWrap"?z[da]=!!Ye:z[da]=Array.isArray(Ye)?Ye:[]}),z},ce=ye=>{const z={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},q={header:"columns",tableContents:"tableData"};return ye.forEach((le,De)=>{if(!le||typeof le!="object"){console.warn(`Invalid config at index ${De}:`,le);return}const{key:be,contents:Ye}=le,da=q[be];if(!da){console.warn(`Unknown Table config key: ${be}`);return}z[da]=Array.isArray(Ye)?Ye:[]}),z},Ee=ye=>(console.log("Default conversion logic - to be implemented"),{originalData:ye,processed:!1,componentType:"unknown"}),Ve=()=>{const ye=[{key:"stepList",contents:s.value}];o("change",ye)};return a.watch(()=>n.itemContents,ye=>{if(ye&&ye.length>0){const z=ye.find(q=>q.key==="stepList");z&&z.contents&&(s.value=z.contents.map(q=>({title:q.title||"",value:q.value||q.title||"",label:q.label||q.title||"",children:q.children||[],id:q.id||D()})))}},{immediate:!0,deep:!0}),(ye,z)=>{const q=a.resolveComponent("svg-icon"),le=a.resolveComponent("el-input"),De=a.resolveComponent("el-form-item"),be=a.resolveComponent("el-form");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",j4,[z[6]||(z[6]=a.createElementVNode("h4",null,"标签页管理",-1)),a.createElementVNode("button",{onClick:W},[a.createVNode(q,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),z[5]||(z[5]=a.createTextVNode(" 新增标签页 "))])]),a.createElementVNode("div",H4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(Ye,da)=>(a.openBlock(),a.createElementBlock("div",{class:"tab-item",key:da},[a.createElementVNode("span",U4,a.toDisplayString(Ye.title),1),a.createElementVNode("div",q4,[a.createElementVNode("button",{onClick:Ma=>O(da)},"修改标题",8,W4),a.createElementVNode("button",{onClick:Ma=>E(da)},"布局调整",8,K4),a.createElementVNode("button",{onClick:Ma=>U(da)},"删除",8,G4)])]))),128))]),a.createVNode(wr.ssDialog,{modelValue:c.value,"onUpdate:modelValue":z[2]||(z[2]=Ye=>c.value=Ye),title:m.value,onBeforeDestroy:z[3]||(z[3]=Ye=>c.value=!1)},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:z[1]||(z[1]=Ye=>c.value=!1)},"取消"),a.createElementVNode("button",{type:"primary",onClick:H},"确定")]),default:a.withCtx(()=>[a.createVNode(be,{model:f.value,"label-width":"80px"},{default:a.withCtx(()=>[a.createVNode(De,{label:"标签名称",required:""},{default:a.withCtx(()=>[a.createVNode(le,{modelValue:f.value.title,"onUpdate:modelValue":z[0]||(z[0]=Ye=>f.value.title=Ye),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),a.createVNode(wr.ssDialog,{modelValue:y.value,"onUpdate:modelValue":z[4]||(z[4]=Ye=>y.value=Ye),title:"布局调整",fullScreen:"",onBeforeDestroy:Z},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:de},"取消"),a.createElementVNode("button",{onClick:Be},"确定")]),default:a.withCtx(()=>[a.createElementVNode("div",Y4,[a.createElementVNode("div",J4,[a.createVNode(E4),a.createElementVNode("div",X4,[z[8]||(z[8]=a.createElementVNode("h5",null,"添加已有组件",-1)),a.createElementVNode("div",Z4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(k.value,Ye=>(a.openBlock(),a.createElementBlock("div",{key:Ye.id,class:"component-item",onClick:da=>M(Ye)},[a.createElementVNode("div",e6,[a.createElementVNode("span",a6,a.toDisplayString(g(Ye.comp)),1),a.createElementVNode("span",l6,a.toDisplayString(Ye.name),1)]),z[7]||(z[7]=a.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Q4))),128))])])]),(a.openBlock(),a.createElementBlock("div",{class:"model-show",key:ye.innerWidth},[a.createVNode(P4)])),a.createElementVNode("div",r6,[a.createVNode($4)])])]),_:1},8,["modelValue"])])}}},o6=Jl._export_sfc(n6,[["__scopeId","data-v-9096ed0d"]]);function i6(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function t6(l){return{type:"line",...l}}function s6(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function c6(l){return{type:"bar",barWidth:"60%",...l}}function u6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function d6(l){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...l}}const jn={line:{initBaseoptions:i6,initSeries:t6},bar:{initBaseoptions:s6,initSeries:c6},pie:{initBaseoptions:u6,initSeries:d6}},Ss=$.useMenuState($.pinia),Vc=(l,r)=>{var u;const n=[],o=[],{group:s,nameCol:c,valueCol:m}=r||{},f=l==null?void 0:l.find(w=>{const{name:N}=w;return N===s});if(!f)return{names:n,values:o};const h=(u=f==null?void 0:f.compData)==null?void 0:u.find(w=>{const{key:N}=w;return N==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(w=>{const N=w==null?void 0:w[0];let j=!1;Ga.isObject(N)&&(N!=null&&N.id)&&(j=!0);let C=c,W=m;j&&(C=C+1,W=W+1);const O=w==null?void 0:w[C],U=w==null?void 0:w[W];n.push(O),o.push(U)}),{names:n,values:o}},p6=async l=>{const{menu:r,mainKey:n,detailGroup:o,detailNameCol:s,detailValueCol:c,isSelfDetail:m}=l||{};let f=null;const h=sessionStorage.getItem("systemKey");if(m&&Ss.activeMenuPath&&(f=await ia.getItemData(`${Ss.activeMenuPath}`,h,"")),!m){const y=r==null?void 0:r.join("/");f=await ia.getItemData(`${y}^${n}`,h,"")}return Vc(f,{group:o,nameCol:s,valueCol:c})},f6=async l=>{const{menu:r,group:n,nameCol:o,valueCol:s}=l||{},c=r==null?void 0:r.join("/"),m=sessionStorage.getItem("systemKey"),f=await ia.getItemData(c,m,"");return Vc(f,{group:n,nameCol:o,valueCol:s})},At=async(l,r)=>{const n={names:[],values:[]},{menu:o,group:s,nameCol:c,valueCol:m}=l||{};if(!o.length||!s)return n;const{mainKey:f,group:h,nameCol:y,valueCol:u,isSelfDetail:w}=r||{};return f&&h&&il.isNumber(y)&&il.isNumber(u)?await p6({menu:o,mainKey:f,detailGroup:h,detailNameCol:y,detailValueCol:u,isSelfDetail:w}):il.isNumber(c)&&il.isNumber(m)?await f6({menu:o,group:s,nameCol:c,valueCol:m}):n},h6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:o,title:s}=l||{},c=jn==null?void 0:jn[o];if(!c)return;const{initBaseoptions:m,initSeries:f}=c,h=m();h.title.text=s??"";const{names:y,values:u}=await At(r,n);if(!y||!u)return h;h.xAxis.data=y;const w=f({data:u});return h.series.push(w),h},v6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:o,title:s}=l||{},c=jn==null?void 0:jn[o];if(!c)return;const{initBaseoptions:m,initSeries:f}=c,h=m();h.title.text=s??"";const{names:y,values:u}=await At(r,n);if(!y||!u)return h;h.xAxis.data=y;const w=f({data:u});return h.series.push(w),h},m6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:o,title:s}=l||{},c=jn==null?void 0:jn[o];if(!c)return;const{initBaseoptions:m,initSeries:f}=c,h=m();h.title.text=s??"";const{names:y,values:u}=await At(r,n);if(!y||!u)return h;const w=[];for(let j=0;j<y.length;j++){const C=y[j],W=u[j];w.push({name:C,value:W})}const N=f({data:w});return h.series.push(N),h},y6=async(l=[])=>{var m,f,h;const r=((m=l==null?void 0:l.find(y=>y.key==="chartBaseConfig"))==null?void 0:m.contents)??{},n=((f=l==null?void 0:l.find(y=>y.key==="chartDataConfig"))==null?void 0:f.contents)??{},o=((h=l==null?void 0:l.find(y=>y.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:s}=r;let c={};return s==="line"&&(c=await h6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:o})),s==="bar"&&(c=await v6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:o})),s==="pie"&&(c=await m6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:o})),c},g6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(l){const r=l,n=a.ref({});a.onMounted(async()=>{const s=r==null?void 0:r.itemData;n.value=await y6(s)});const o=a.computed(()=>(r==null?void 0:r.height)||"300px");return(s,c)=>(a.openBlock(),a.createElementBlock("div",{class:"eCharts",style:a.normalizeStyle({height:o.value})},[a.createVNode(Iu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),b6=Jl._export_sfc(g6,[["__scopeId","data-v-d4c081e8"]]),k6={class:"chart-module layout"},x6={class:"chart-module content"},w6={class:"chart-module content"},_6={class:"form-content"},S6={class:"dialog-footer"},E6={class:"form-content"},C6={class:"dialog-footer"},D6={class:"form-content"},N6={class:"dialog-footer"},B6=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,o=r,s=a.reactive({visible:!1,width:"840",title:"基础配置"}),c=a.ref([]),m=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],f=a.ref({}),h=()=>{var Re;c.value=m(),(Re=c.value)==null||Re.forEach(te=>{var He;const Le=te==null?void 0:te.prop;te.value=(He=f==null?void 0:f.value)==null?void 0:He[Le]}),s.visible=!0},y=Re=>{f.value=Re},u=()=>{var Re;s.visible=!1,o("change",(Re=Te())==null?void 0:Re.compData)},w=a.reactive({visible:!1,width:"840",title:"数据配置"}),N=a.ref([]),j=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],C=a.ref({}),W=()=>{const Re=N.value,te=$.cloneDeep(Re);return te==null||te.forEach(Le=>{var Ba;const He=Le==null?void 0:Le.prop;Le.value=(Ba=C.value)==null?void 0:Ba[He]}),te},O=Re=>{var Le;C.value=Re;const te=W();N.value=te,o("change",(Le=Te())==null?void 0:Le.compData)},U=async()=>{const Re=await ia.getMenusContent(),te=W();te==null||te.forEach(Le=>{(Le==null?void 0:Le.prop)==="menu"&&(Le.contents=Re)}),N.value=te,w.visible=!0,await Ye(C.value.menu),await re(C.value.group)},H=a.reactive({visible:!1,width:"840",title:"详情页配置"}),D=a.ref([]),S=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],E=a.ref({}),k=()=>{const Re=D.value,te=$.cloneDeep(Re);return te==null||te.forEach(Le=>{var Ba;const He=Le==null?void 0:Le.prop;Le.value=(Ba=E.value)==null?void 0:Ba[He]}),te},g=Re=>{var Le;E.value=Re;const te=k();D.value=te,o("change",(Le=Te())==null?void 0:Le.compData)},M=async()=>{await Z();const Re=$.cloneDeep(R.value),te=k();te==null||te.forEach(Le=>{var Ba;const He=Le==null?void 0:Le.prop;Le.value=(Ba=E==null?void 0:E.value)==null?void 0:Ba[He],He==="mainKey"&&(Le.contents=Re)}),D.value=te,H.visible=!0},R=a.ref([]),G=a.ref([]),ue=a.ref({}),Be=a.ref({}),de=()=>{const{compData:Re}=le.value||{},te=Re==null?void 0:Re.find(ee=>{const{key:fe}=ee;return fe==="header"}),Le=(te==null?void 0:te.contents)||[],He=Le==null?void 0:Le.filter((ee,fe)=>{const{label:ve}=ee;return ve!=="操作"}),Ba=He==null?void 0:He.findIndex((ee,fe)=>{const{isMainKey:ve}=ee;return ve});if(Ba<0)return[];const Ia=Re==null?void 0:Re.find(ee=>{const{key:fe}=ee;return fe==="tableContents"}),V=(Ia==null?void 0:Ia.contents)||[];return V==null?void 0:V.map(ee=>{const fe=ee==null?void 0:ee[0];let ve=Ba;Ga.isObject(fe)&&(fe!=null&&fe.id)&&(ve=ve+1);const ha=ee==null?void 0:ee[ve];return{label:ha,value:ha}})},Z=async()=>{const Re=await de();R.value=Re},pe=async Re=>{const te=sessionStorage.getItem("systemKey");return await ia.getItemData(Re,te,"")},ae=async Re=>{const te=Re;G.value=te==null?void 0:te.map(Le=>{const{name:He}=Le;return ue.value[He]=Le,{label:He,value:He}})},ce=Re=>{const{comp:te,compData:Le}=Be.value||{};if(te==="Table"){let He=k();He=He.filter(Ba=>{const{prop:Ia}=Ba;return Ia!=="formItems"}),da(He,Le),D.value=He}},Ee=async()=>{var Le,He;const Re=(Le=E==null?void 0:E.value)==null?void 0:Le.mainKey,te=(He=C==null?void 0:C.value)==null?void 0:He.menu;if(Re){const Ia=`${te==null?void 0:te.join("/")}^${Re}`,V=await pe(Ia);await ae(V);const P=k();P==null||P.forEach(ee=>{(ee==null?void 0:ee.prop)==="group"&&(ee.contents=G.value)}),D.value=P}};a.watch(()=>{var Re;return(Re=E==null?void 0:E.value)==null?void 0:Re.mainKey},async(Re,te)=>{Re!=te&&Re&&await Ee()});const Ve=async Re=>{const te=ue.value[Re];Be.value=te,await ce()};a.watch(()=>{var Re;return(Re=E==null?void 0:E.value)==null?void 0:Re.group},async(Re,te)=>{Re!=te&&Re&&Ve(Re)});const ye=async()=>{var te;await Ee();const Re=(te=E.value)==null?void 0:te.group;await Ve(Re)},z=a.ref([]),q=a.ref({}),le=a.ref({}),De=async Re=>{const te=Re==null?void 0:Re.join("/"),Le=sessionStorage.getItem("systemKey");return await ia.getItemData(te,Le,"")},be=async Re=>{const te=await De(Re);z.value=te==null?void 0:te.map(Le=>{const{name:He}=Le;return q.value[He]=Le,{label:He,value:He}})},Ye=async(Re,te)=>{await be(Re);const Le=W();Le==null||Le.forEach(He=>{(He==null?void 0:He.prop)==="group"&&(He.contents=z.value)}),N.value=Le};a.watch(()=>{var Re;return(Re=C==null?void 0:C.value)==null?void 0:Re.menu},async(Re,te)=>{const Le=Re==null?void 0:Re.join("/"),He=te==null?void 0:te.join("/");Le!=He&&await Ye(Re)});const da=(Re,te)=>{const Le=te==null?void 0:te.find(V=>{const{key:P}=V;return P==="header"}),He=(Le==null?void 0:Le.contents)||[],Ba=He==null?void 0:He.filter((V,P)=>{const{label:ee}=V;return ee!=="操作"}),Ia=Ba==null?void 0:Ba.map((V,P)=>{const{label:ee}=V;return{label:ee,value:P}});Re==null||Re.forEach(V=>{const P=V==null?void 0:V.prop;(P==="nameCol"||P==="valueCol")&&(V.contents=Ia)})},Ma=Re=>{const{comp:te,compData:Le}=le.value||{};if(te==="Table"){C.value.formItems=[];let He=W();He=He.filter(Ba=>{const{prop:Ia}=Ba;return Ia!=="formItems"}),da(He,Le),N.value=He}},re=async Re=>{const te=q.value[Re];le.value=te,await Ma()};a.watch(()=>{var Re;return(Re=C==null?void 0:C.value)==null?void 0:Re.group},async(Re,te)=>{Re!=te&&re(Re)});const Ne=async()=>{var Le,He;const Re=(Le=C.value)==null?void 0:Le.menu;await Ye(Re);const te=(He=C.value)==null?void 0:He.group;await re(te)},Te=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:f.value},{key:"chartDataConfig",contents:C.value},{key:"chartDetailConfig",contents:E.value}]}),qe=()=>{s.visible=!1,w.visible=!1,H.visible=!1};return a.onMounted(async()=>{var te,Le,He;N.value=j(),D.value=S();const Re=n==null?void 0:n.itemContents;f.value=((te=Re==null?void 0:Re.find(Ba=>Ba.key==="chartBaseConfig"))==null?void 0:te.contents)??{},C.value=((Le=Re==null?void 0:Re.find(Ba=>Ba.key==="chartDataConfig"))==null?void 0:Le.contents)??{},await Ne(),E.value=((He=Re==null?void 0:Re.find(Ba=>Ba.key==="chartDetailConfig"))==null?void 0:He.contents)??{},await ye()}),(Re,te)=>{const Le=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",k6,[te[4]||(te[4]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:te[0]||(te[0]=He=>h())},{default:a.withCtx(()=>te[3]||(te[3]=[a.createTextVNode(" 修改 ")])),_:1,__:[3]})]),a.createElementVNode("div",x6,[te[6]||(te[6]=a.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:te[1]||(te[1]=He=>U())},{default:a.withCtx(()=>te[5]||(te[5]=[a.createTextVNode(" 修改 ")])),_:1,__:[5]})]),a.createElementVNode("div",w6,[te[8]||(te[8]=a.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),a.createVNode(Le,{id:"themeButton",onClick:te[2]||(te[2]=He=>M())},{default:a.withCtx(()=>te[7]||(te[7]=[a.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),a.createVNode(wr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:qe,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",_6,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",S6,[a.createVNode(Le,{class:"cancel-button button",onClick:qe,id:"themeBorderButton"},{default:a.withCtx(()=>te[9]||(te[9]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[9]}),a.createVNode(Le,{class:"ok-button button",onClick:u,id:"themeButton"},{default:a.withCtx(()=>te[10]||(te[10]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),a.createVNode(wr.ssDialog,{visible:w.visible,title:w.title,onBeforeDestroy:qe,width:w.width},{default:a.withCtx(()=>[a.createElementVNode("div",E6,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:O},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",C6,[a.createVNode(Le,{class:"cancel-button button",onClick:qe,id:"themeBorderButton"},{default:a.withCtx(()=>te[11]||(te[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(Le,{class:"ok-button button",onClick:qe,id:"themeButton"},{default:a.withCtx(()=>te[12]||(te[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),a.createVNode(wr.ssDialog,{visible:H.visible,title:H.title,onBeforeDestroy:qe,width:H.width},{default:a.withCtx(()=>[a.createElementVNode("div",D6,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",N6,[a.createVNode(Le,{class:"cancel-button button",onClick:qe,id:"themeBorderButton"},{default:a.withCtx(()=>te[13]||(te[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(Le,{class:"ok-button button",onClick:qe,id:"themeButton"},{default:a.withCtx(()=>te[14]||(te[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),T6=Jl._export_sfc(B6,[["__scopeId","data-v-fe119645"]]),A6={class:"layout"},z6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(l,{emit:r}){const n=r,o=l;a.onMounted(async()=>{});const s=a.computed(()=>$.cloneDeep(o==null?void 0:o.itemData)||[]),c=a.computed(()=>{var u;const y=(u=s==null?void 0:s.value)==null?void 0:u.find(w=>{const{key:N}=w;return N==="baseConfig"});return y==null?void 0:y.contents}),m=a.computed(()=>{var u;const y=(u=s==null?void 0:s.value)==null?void 0:u.find(w=>{const{key:N}=w;return N==="children"});return y==null?void 0:y.contents}),f=a.computed(()=>{let y=$.cloneDeep(m.value)||[];const u=y.length;let w=0;const N=[];if(y=y.map(j=>{const C=j.span;return C?(j.span=Number(C),w=w+j.span):N.push(j),j}),w<24){const j=Math.floor((24-w)/u);N.forEach(C=>{C.span=j})}return y}),h=y=>{n("rowClick",y)};return(y,u)=>{var j;const w=a.resolveComponent("el-col"),N=a.resolveComponent("el-row");return a.openBlock(),a.createElementBlock("div",A6,[a.createVNode(N,{style:a.normalizeStyle({height:(j=c.value)==null?void 0:j.height})},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.value,(C,W)=>(a.openBlock(),a.createBlock(w,{span:C==null?void 0:C.span},{default:a.withCtx(()=>{var O;return[a.unref(To)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Go)(C.comp)),{key:a.unref(Zn),compName:C.name,index:(C==null?void 0:C.id)??W,height:(O=c.value)==null?void 0:O.height,itemData:C==null?void 0:C.compData,childItemData:C==null?void 0:C.itemChildData,onChange:a.unref(zi),onContentChange:a.unref(Mi),onPageChange:a.unref(Ii),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):a.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),M6=Jl._export_sfc(z6,[["__scopeId","data-v-ab9a36ed"]]),I6={class:"layout-operate"},O6={class:"layout-module"},L6={class:"collapse-title-item"},$6={class:"collapse-title"},R6={class:"icon-content"},V6=["onClick"],F6={class:"comp-child"},P6=a.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,o=r;a.onMounted(()=>{W()});const s=a.ref({}),c=a.ref({}),m=a.ref([]),f=E=>[{label:"高度",prop:"height",type:"input",value:E==null?void 0:E.height}],h=E=>{c.value=E,o("change",S(),!0)},y=a.ref([]),u=a.ref([]),w=E=>[{label:"占比",prop:"span",type:"input",value:E==null?void 0:E.span}],N=a.computed(()=>{const E=n==null?void 0:n.itemContents;return $.cloneDeep(E)}),j=a.computed(()=>{const E=N==null?void 0:N.value,k=E==null?void 0:E.find(g=>{const{key:M}=g;return M==="baseConfig"});return k==null?void 0:k.contents}),C=a.computed(()=>{const E=N==null?void 0:N.value,k=E==null?void 0:E.find(g=>{const{key:M}=g;return M==="children"});return k==null?void 0:k.contents}),W=()=>{var E;s.value=N.value||{},y.value=(C==null?void 0:C.value)||[],m.value=f(),m.value=(E=m.value)==null?void 0:E.map(k=>{var M;const{prop:g}=k;return k.value=(M=j.value)==null?void 0:M[g],k})};a.watch(()=>{var E;return(E=C==null?void 0:C.value)==null?void 0:E.length},()=>{var E;y.value=(C==null?void 0:C.value)||[],u.value=(E=C.value)==null?void 0:E.map(k=>w(k))},{immediate:!0});const O=(E,k)=>{const g=$.cloneDeep(C==null?void 0:C.value);g[k].span=E.span,y.value=g,o("change",S(),!0)},U=E=>Ao(E),H=(E,k,g)=>{if(!E)return;const M=$.cloneDeep(C==null?void 0:C.value);M[g]&&(M[g].compData=E,y.value=M,o("change",S(),!0))},D=E=>{dn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let k=$.cloneDeep(C==null?void 0:C.value);k=k==null?void 0:k.filter((g,M)=>E!==M),y.value=k,o("change",S(),!0),Ga.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:y==null?void 0:y.value}]});return(E,k)=>{const g=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",I6,[a.createElementVNode("div",O6,[k[1]||(k[1]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createElementVNode("div",null,[a.createVNode(il.ssForm,{rowContents:m.value,isEnableWrap:!0,onChange:k[0]||(k[0]=M=>h(M))},null,8,["rowContents"])])]),a.createVNode(Zs.default,{class:"collapse-content",collapseContents:C.value},{title:a.withCtx(({item:M,index:R})=>[a.createElementVNode("div",L6,[a.createElementVNode("div",$6,a.toDisplayString(M.name),1),a.createElementVNode("div",R6,[a.createElementVNode("div",{onClick:a.withModifiers(G=>D(R),["stop"]),class:"icon-content"},[a.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,V6)])])]),content:a.withCtx(({item:M,index:R})=>[a.createElementVNode("div",F6,[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(il.ssForm,{rowContents:u.value[R],key:R,isEnableWrap:!0,onChange:G=>O(G,R)},null,8,["rowContents","onChange"]))]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(U(M.comp+"Operate")),{itemContents:M==null?void 0:M.compData,originalItemContents:M.compData,onChange:G=>H(G,M,R)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),j6=Jl._export_sfc(P6,[["__scopeId","data-v-ba05456e"]]),H6=typeof window<"u";var Es;H6&&((Es=window==null?void 0:window.navigator)!=null&&Es.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function un(l){return l==null}function Fc(){}const U6=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(U6)));function q6(){const l=new Map;return{on(r,n){const o=l.get(r);o!=null&&o.add(n)||l.set(r,new Set([n]))},off(r,n){const o=l.get(r);o&&o.delete(n)},clear(r){const n=l.get(r);n&&n.clear()},clearAll(){l.clear()},emit(r,...n){const o=l.get(r);o&&o.forEach(s=>{s(...n)})}}}function Cs(l,r=16){if(typeof l!="function")return Fc;const n=(...c)=>{l(...c)};if(r<=0)return Pc(n);let o=0,s;return function(...c){const m=Date.now(),f=m-o;clearTimeout(s),f>=r?(o=m,n(...c)):s=setTimeout(()=>{o=Date.now(),n(...c)},Math.max(0,r-f))}}function W6(l,r=100){if(typeof l!="function")return Fc;const n=(...s)=>{l(...s)};if(r<=0)return Pc(n);let o;return function(...s){clearTimeout(o),o=setTimeout(()=>{n(...s)},r)}}function Pc(l){if(typeof l!="function")return l;let r=!1,n,o;return function(...s){return n=s,r||(r=!0,o=Promise.resolve().then(()=>(r=!1,o=void 0,l(...n)))),o}}const Uo=new Set,jc=new WeakMap;function K6(){Uo.forEach(l=>{l(...jc.get(l))}),Uo.clear()}function Xr(l,...r){if(typeof l!="function")return l;jc.set(l,r),!Uo.has(l)&&(Uo.add(l),Uo.size===1&&Promise.resolve().then(K6))}const Hc=Symbol("LAYOUT_KEY"),Uc=Symbol("EMITTER_KEY");function G6(l){let r=0,n;for(let o=0,s=l.length;o<s;o++)n=l[o].y+l[o].h,n>r&&(r=n);return r}function Et(l){const r=Array(l.length);for(let n=0,o=l.length;n<o;n++)r[n]=Y6(l[n]);return r}function Y6(l){return{...l}}function qc(l,r){return!(l===r||l.x+l.w<=r.x||l.x>=r.x+r.w||l.y+l.h<=r.y||l.y>=r.y+r.h)}function Eo(l,r,n){const o=Kc(l),s=Gc(l),c=Array(l.length);for(let m=0,f=s.length;m<f;m++){let h=s[m];h.static||(h=J6(o,h,r,n),o.push(h)),c[l.findIndex(y=>y.i===h.i)]=h,h.moved=!1}return c}function J6(l,r,n,o){if(n)for(;r.y>0&&!qo(l,r);)r.y--;else if(o){const c=o[r.i].y;for(;r.y>c&&!qo(l,r);)r.y--}let s;for(;s=qo(l,r);)r.y=s.y+s.h;return r}function X6(l,r){const n=Kc(l);for(let o=0,s=l.length;o<s;o++){const c=l[o];if(c.x+c.w>r.cols&&(c.x=r.cols-c.w),c.x<0&&(c.x=0,c.w=r.cols),!c.static)n.push(c);else for(;qo(n,c);)c.y++}return l}function Ds(l,r){for(let n=0,o=l.length;n<o;n++)if(l[n].i===r)return l[n]}function qo(l,r){for(let n=0,o=l.length;n<o;n++)if(qc(l[n],r))return l[n]}function Wc(l,r){return l.filter(n=>qc(n,r))}function Kc(l){return l.filter(r=>r.static)}function Ct(l,r,n,o,s=!1,c=!1){if(r.static)return l;const m=r.x,f=r.y,h=o&&r.y>o;typeof n=="number"&&(r.x=n),typeof o=="number"&&(r.y=o),r.moved=!0;let y=Gc(l);h&&(y=y.reverse());const u=Wc(y,r);if(c&&u.length)return r.x=m,r.y=f,r.moved=!1,l;for(let w=0,N=u.length;w<N;w++){const j=u[w];j.moved||r.y>j.y&&r.y-j.y>j.h/4||(j.static?l=Ns(l,j,r,s):l=Ns(l,r,j,s))}return l}function Ns(l,r,n,o){if(o){const s={x:n.x,y:n.y,w:n.w,h:n.h};if(s.y=Math.max(r.y-n.h,0),!qo(l,s))return Ct(l,n,void 0,s.y,!1)}return Ct(l,n,void 0,n.y+1,!1)}function Z6(l,r,n,o){const s="translate3d("+r+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:o+"px",position:"absolute"}}function Q6(l,r,n,o){const s="translate3d("+r*-1+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:o+"px",position:"absolute"}}function e1(l,r,n,o){return{top:l+"px",left:r+"px",width:n+"px",height:o+"px",position:"absolute"}}function a1(l,r,n,o){return{top:l+"px",right:r+"px",width:n+"px",height:o+"px",position:"absolute"}}function Gc(l){return Array.from(l).sort(function(r,n){return r.y===n.y&&r.x===n.x?0:r.y>n.y||r.y===n.y&&r.x>n.x?1:-1})}function l1(l,r){r=r||"Layout";const n=["x","y","w","h"],o=[];if(!Array.isArray(l))throw new Error(r+" must be an array!");for(let s=0,c=l.length;s<c;s++){const m=l[s];for(let f=0;f<n.length;f++)if(typeof m[n[f]]!="number")throw new Error("VueGridLayout: "+r+"["+s+"]."+n[f]+" must be a number!");if(m.i===void 0||m.i===null)throw new Error("VueGridLayout: "+r+"["+s+"].i cannot be null!");if(typeof m.i!="number"&&typeof m.i!="string")throw new Error("VueGridLayout: "+r+"["+s+"].i must be a string or number!");if(o.indexOf(m.i)>=0)throw new Error("VueGridLayout: "+r+"["+s+"].i must be unique!");if(o.push(m.i),m.static!==void 0&&typeof m.static!="boolean")throw new Error("VueGridLayout: "+r+"["+s+"].static must be a boolean!")}}function r1(l,r="vgl"){const n=()=>`${r}-${l}`;return{b:n,be:o=>`${n()}__${o}`,bm:o=>`${n()}--${o}`,bem:(o,s)=>`${n()}__${o}--${s}`}}function Bs(l){return n1(l)}function n1(l){var r;const n=((r=l.target)==null?void 0:r.offsetParent)||document.body,o=l.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),s=l.clientX+n.scrollLeft-o.left,c=l.clientY+n.scrollTop-o.top;return{x:s,y:c}}function Ts(l,r,n,o){return o1(l)?{deltaX:n-l,deltaY:o-r,lastX:l,lastY:r,x:n,y:o}:{deltaX:0,deltaY:0,lastX:n,lastY:o,x:n,y:o}}function o1(l){return typeof l=="number"&&!Number.isNaN(l)}function i1(l,r){const n=Jc(l);let o=n[0];for(let s=1,c=n.length;s<c;s++){const m=n[s];r>l[m]&&(o=m)}return o}function Yc(l,r){if(!r[l])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+l+" is missing!");return r[l]}function s1(l,r,n,o,s,c,m){if(r[o])return Et(r[o]);let f=l;const h=Jc(n),y=h.slice(h.indexOf(o));for(let u=0,w=y.length;u<w;u++){const N=y[u];if(r[N]){f=r[N];break}}return f=Et(f||[]),Eo(X6(f,{cols:c}),m)}function Jc(l){return Object.keys(l).sort((r,n)=>l[r]-l[n])}let c1="auto";function u1(){return typeof document<"u"}function As(){return u1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):c1}var Po={exports:{}},d1=Po.exports,zs;function p1(){return zs||(zs=1,function(l,r){(function(n,o){l.exports=o()})(d1,function(){function n(t,i){var p=Object.keys(t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(t);i&&(b=b.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),p.push.apply(p,b)}return p}function o(t){for(var i=1;i<arguments.length;i++){var p=arguments[i]!=null?arguments[i]:{};i%2?n(Object(p),!0).forEach(function(b){h(t,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(p)):n(Object(p)).forEach(function(b){Object.defineProperty(t,b,Object.getOwnPropertyDescriptor(p,b))})}return t}function s(t){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},s(t)}function c(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function m(t,i){for(var p=0;p<i.length;p++){var b=i[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(t,W(b.key),b)}}function f(t,i,p){return i&&m(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,i,p){return(i=W(i))in t?Object.defineProperty(t,i,{value:p,enumerable:!0,configurable:!0,writable:!0}):t[i]=p,t}function y(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),i&&w(t,i)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},u(t)}function w(t,i){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,b){return p.__proto__=b,p},w(t,i)}function N(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t){var i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var p,b=u(t);if(i){var _=u(this).constructor;p=Reflect.construct(b,arguments,_)}else p=b.apply(this,arguments);return function(L,Y){if(Y&&(typeof Y=="object"||typeof Y=="function"))return Y;if(Y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(L)}(this,p)}}function C(){return C=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,i,p){var b=function(L,Y){for(;!Object.prototype.hasOwnProperty.call(L,Y)&&(L=u(L))!==null;);return L}(t,i);if(b){var _=Object.getOwnPropertyDescriptor(b,i);return _.get?_.get.call(arguments.length<3?t:p):_.value}},C.apply(this,arguments)}function W(t){var i=function(p,b){if(typeof p!="object"||p===null)return p;var _=p[Symbol.toPrimitive];if(_!==void 0){var L=_.call(p,b);if(typeof L!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(t,"string");return typeof i=="symbol"?i:i+""}var O=function(t){return!(!t||!t.Window)&&t instanceof t.Window},U=void 0,H=void 0;function D(t){U=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(i)===i&&(t=t.wrap(t)),H=t}function S(t){return O(t)?t:(t.ownerDocument||t).defaultView||H.window}typeof window<"u"&&window&&D(window);var E=function(t){return!!t&&s(t)==="object"},k=function(t){return typeof t=="function"},g={window:function(t){return t===H||O(t)},docFrag:function(t){return E(t)&&t.nodeType===11},object:E,func:k,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||s(t)!=="object")return!1;var i=S(t)||H;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?t instanceof Element||t instanceof i.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return E(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return E(t)&&t.length!==void 0&&k(t.splice)}};function M(t){var i=t.interaction;if(i.prepared.name==="drag"){var p=i.prepared.axis;p==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):p==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function R(t){var i=t.iEvent,p=t.interaction;if(p.prepared.name==="drag"){var b=p.prepared.axis;if(b==="x"||b==="y"){var _=b==="x"?"y":"x";i.page[_]=p.coords.start.page[_],i.client[_]=p.coords.start.client[_],i.delta[_]=0}}}var G={id:"actions/drag",install:function(t){var i=t.actions,p=t.Interactable,b=t.defaults;p.prototype.draggable=G.draggable,i.map.drag=G,i.methodDict.drag="draggable",b.actions.drag=G.defaults},listeners:{"interactions:before-action-move":M,"interactions:action-resume":M,"interactions:action-move":R,"auto-start:check":function(t){var i=t.interaction,p=t.interactable,b=t.buttons,_=p.options.drag;if(_&&_.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(b&p.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(t){return g.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):g.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:M,move:R,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},ue=G,Be={init:function(t){var i=t;Be.document=i.document,Be.DocumentFragment=i.DocumentFragment||de,Be.SVGElement=i.SVGElement||de,Be.SVGSVGElement=i.SVGSVGElement||de,Be.SVGElementInstance=i.SVGElementInstance||de,Be.Element=i.Element||de,Be.HTMLElement=i.HTMLElement||Be.Element,Be.Event=i.Event,Be.Touch=i.Touch||de,Be.PointerEvent=i.PointerEvent||i.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function de(){}var Z=Be,pe={init:function(t){var i=Z.Element,p=t.navigator||{};pe.supportsTouch="ontouchstart"in t||g.func(t.DocumentTouch)&&Z.document instanceof t.DocumentTouch,pe.supportsPointerEvent=p.pointerEnabled!==!1&&!!Z.PointerEvent,pe.isIOS=/iP(hone|od|ad)/.test(p.platform),pe.isIOS7=/iP(hone|od|ad)/.test(p.platform)&&/OS 7[^\d]/.test(p.appVersion),pe.isIe9=/MSIE 9/.test(p.userAgent),pe.isOperaMobile=p.appName==="Opera"&&pe.supportsTouch&&/Presto/.test(p.userAgent),pe.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",pe.pEventTypes=pe.supportsPointerEvent?Z.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,pe.wheelEvent=Z.document&&"onmousewheel"in Z.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ae=pe;function ce(t,i){if(t.contains)return t.contains(i);for(;i;){if(i===t)return!0;i=i.parentNode}return!1}function Ee(t,i){for(;g.element(t);){if(ye(t,i))return t;t=Ve(t)}return null}function Ve(t){var i=t.parentNode;if(g.docFrag(i)){for(;(i=i.host)&&g.docFrag(i););return i}return i}function ye(t,i){return H!==U&&(i=i.replace(/\/deep\//g," ")),t[ae.prefixedMatchesSelector](i)}var z=function(t){return t.parentNode||t.host};function q(t,i){for(var p,b=[],_=t;(p=z(_))&&_!==i&&p!==_.ownerDocument;)b.unshift(_),_=p;return b}function le(t,i,p){for(;g.element(t);){if(ye(t,i))return!0;if((t=Ve(t))===p)return ye(t,i)}return!1}function De(t){return t.correspondingUseElement||t}function be(t){var i=t instanceof Z.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return i&&{left:i.left,right:i.right,top:i.top,bottom:i.bottom,width:i.width||i.right-i.left,height:i.height||i.bottom-i.top}}function Ye(t){var i,p=be(t);if(!ae.isIOS7&&p){var b={x:(i=(i=S(t))||H).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};p.left+=b.x,p.right+=b.x,p.top+=b.y,p.bottom+=b.y}return p}function da(t){for(var i=[];t;)i.push(t),t=Ve(t);return i}function Ma(t){return!!g.string(t)&&(Z.document.querySelector(t),!0)}function re(t,i){for(var p in i)t[p]=i[p];return t}function Ne(t,i,p){return t==="parent"?Ve(p):t==="self"?i.getRect(p):Ee(p,t)}function Te(t,i,p,b){var _=t;return g.string(_)?_=Ne(_,i,p):g.func(_)&&(_=_.apply(void 0,b)),g.element(_)&&(_=Ye(_)),_}function qe(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Re(t){return!t||"x"in t&&"y"in t||((t=re({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function te(t,i,p){t.left&&(i.left+=p.x),t.right&&(i.right+=p.x),t.top&&(i.top+=p.y),t.bottom&&(i.bottom+=p.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Le(t,i,p){var b=p&&t.options[p];return qe(Te(b&&b.origin||t.options.origin,t,i,[t&&i]))||{x:0,y:0}}function He(t,i){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(ge){return!0},b=arguments.length>3?arguments[3]:void 0;if(b=b||{},g.string(t)&&t.search(" ")!==-1&&(t=Ba(t)),g.array(t))return t.forEach(function(ge){return He(ge,i,p,b)}),b;if(g.object(t)&&(i=t,t=""),g.func(i)&&p(t))b[t]=b[t]||[],b[t].push(i);else if(g.array(i))for(var _=0,L=i;_<L.length;_++){var Y=L[_];He(t,Y,p,b)}else if(g.object(i))for(var Q in i)He(Ba(Q).map(function(ge){return"".concat(t).concat(ge)}),i[Q],p,b);return b}function Ba(t){return t.trim().split(/ +/)}var Ia=function(t,i){return Math.sqrt(t*t+i*i)},V=["webkit","moz"];function P(t,i){t.__set||(t.__set={});var p=function(_){if(V.some(function(L){return _.indexOf(L)===0}))return 1;typeof t[_]!="function"&&_!=="__set"&&Object.defineProperty(t,_,{get:function(){return _ in t.__set?t.__set[_]:t.__set[_]=i[_]},set:function(L){t.__set[_]=L},configurable:!0})};for(var b in i)p(b);return t}function ee(t,i){t.page=t.page||{},t.page.x=i.page.x,t.page.y=i.page.y,t.client=t.client||{},t.client.x=i.client.x,t.client.y=i.client.y,t.timeStamp=i.timeStamp}function fe(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function ve(t){return t instanceof Z.Event||t instanceof Z.Touch}function ha(t,i,p){return t=t||"page",(p=p||{}).x=i[t+"X"],p.y=i[t+"Y"],p}function Ze(t,i){return i=i||{x:0,y:0},ae.isOperaMobile&&ve(t)?(ha("screen",t,i),i.x+=window.scrollX,i.y+=window.scrollY):ha("page",t,i),i}function se(t){return g.number(t.pointerId)?t.pointerId:t.identifier}function we(t,i,p){var b=i.length>1?ze(i):i[0];Ze(b,t.page),function(_,L){L=L||{},ae.isOperaMobile&&ve(_)?ha("screen",_,L):ha("client",_,L)}(b,t.client),t.timeStamp=p}function ya(t){var i=[];return g.array(t)?(i[0]=t[0],i[1]=t[1]):t.type==="touchend"?t.touches.length===1?(i[0]=t.touches[0],i[1]=t.changedTouches[0]):t.touches.length===0&&(i[0]=t.changedTouches[0],i[1]=t.changedTouches[1]):(i[0]=t.touches[0],i[1]=t.touches[1]),i}function ze(t){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},p=0;p<t.length;p++){var b=t[p];for(var _ in i)i[_]+=b[_]}for(var L in i)i[L]/=t.length;return i}function _a(t){if(!t.length)return null;var i=ya(t),p=Math.min(i[0].pageX,i[1].pageX),b=Math.min(i[0].pageY,i[1].pageY),_=Math.max(i[0].pageX,i[1].pageX),L=Math.max(i[0].pageY,i[1].pageY);return{x:p,y:b,left:p,top:b,right:_,bottom:L,width:_-p,height:L-b}}function We(t,i){var p=i+"X",b=i+"Y",_=ya(t),L=_[0][p]-_[1][p],Y=_[0][b]-_[1][b];return Ia(L,Y)}function x(t,i){var p=i+"X",b=i+"Y",_=ya(t),L=_[1][p]-_[0][p],Y=_[1][b]-_[0][b];return 180*Math.atan2(Y,L)/Math.PI}function Ae(t){return g.string(t.pointerType)?t.pointerType:g.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof Z.Touch?"touch":"mouse"}function ne(t){var i=g.func(t.composedPath)?t.composedPath():t.path;return[De(i?i[0]:t.target),De(t.currentTarget)]}var Ue=function(){function t(i){c(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return f(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(Ue.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Je=function(t,i){for(var p=0;p<i.length;p++){var b=i[p];t.push(b)}return t},ra=function(t){return Je([],t)},Oe=function(t,i){for(var p=0;p<t.length;p++)if(i(t[p],p,t))return p;return-1},za=function(t,i){return t[Oe(t,i)]},fa=function(t){y(p,t);var i=j(p);function p(b,_,L){var Y;c(this,p),(Y=i.call(this,_._interaction)).dropzone=void 0,Y.dragEvent=void 0,Y.relatedTarget=void 0,Y.draggable=void 0,Y.propagationStopped=!1,Y.immediatePropagationStopped=!1;var Q=L==="dragleave"?b.prev:b.cur,ge=Q.element,Fe=Q.dropzone;return Y.type=L,Y.target=ge,Y.currentTarget=ge,Y.dropzone=Fe,Y.dragEvent=_,Y.relatedTarget=_.target,Y.draggable=_.interactable,Y.timeStamp=_.timeStamp,Y}return f(p,[{key:"reject",value:function(){var b=this,_=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&_.cur.dropzone===this.dropzone&&_.cur.element===this.target)if(_.prev.dropzone=this.dropzone,_.prev.element=this.target,_.rejected=!0,_.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var L=_.activeDrops,Y=Oe(L,function(ge){var Fe=ge.dropzone,Se=ge.element;return Fe===b.dropzone&&Se===b.target});_.activeDrops.splice(Y,1);var Q=new p(_,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new p(_,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),p}(Ue);function Oa(t,i){for(var p=0,b=t.slice();p<b.length;p++){var _=b[p],L=_.dropzone,Y=_.element;i.dropzone=L,i.target=Y,L.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function Pa(t,i){for(var p=function(L,Y){for(var Q=[],ge=0,Fe=L.interactables.list;ge<Fe.length;ge++){var Se=Fe[ge];if(Se.options.drop.enabled){var ea=Se.options.drop.accept;if(!(g.element(ea)&&ea!==Y||g.string(ea)&&!ye(Y,ea)||g.func(ea)&&!ea({dropzone:Se,draggableElement:Y})))for(var Aa=0,rl=Se.getAllElements();Aa<rl.length;Aa++){var Ja=rl[Aa];Ja!==Y&&Q.push({dropzone:Se,element:Ja,rect:Se.getRect(Ja)})}}}return Q}(t,i),b=0;b<p.length;b++){var _=p[b];_.rect=_.dropzone.getRect(_.element)}return p}function ka(t,i,p){for(var b=t.dropState,_=t.interactable,L=t.element,Y=[],Q=0,ge=b.activeDrops;Q<ge.length;Q++){var Fe=ge[Q],Se=Fe.dropzone,ea=Fe.element,Aa=Fe.rect,rl=Se.dropCheck(i,p,_,L,ea,Aa);Y.push(rl?ea:null)}var Ja=function(nl){for(var kl,ol,Dl,zl=[],Xl=0;Xl<nl.length;Xl++){var El=nl[Xl],Ul=nl[kl];if(El&&Xl!==kl)if(Ul){var Hr=z(El),_r=z(Ul);if(Hr!==El.ownerDocument)if(_r!==El.ownerDocument)if(Hr!==_r){zl=zl.length?zl:q(Ul);var Jr=void 0;if(Ul instanceof Z.HTMLElement&&El instanceof Z.SVGElement&&!(El instanceof Z.SVGSVGElement)){if(El===_r)continue;Jr=El.ownerSVGElement}else Jr=El;for(var tn=q(Jr,Ul.ownerDocument),fn=0;tn[fn]&&tn[fn]===zl[fn];)fn++;var mo=[tn[fn-1],tn[fn],zl[fn]];if(mo[0])for(var $n=mo[0].lastChild;$n;){if($n===mo[1]){kl=Xl,zl=tn;break}if($n===mo[2])break;$n=$n.previousSibling}}else Dl=Ul,(parseInt(S(ol=El).getComputedStyle(ol).zIndex,10)||0)>=(parseInt(S(Dl).getComputedStyle(Dl).zIndex,10)||0)&&(kl=Xl);else kl=Xl}else kl=Xl}return kl}(Y);return b.activeDrops[Ja]||null}function ua(t,i,p){var b=t.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return p.type==="dragstart"&&(_.activate=new fa(b,p,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),p.type==="dragend"&&(_.deactivate=new fa(b,p,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),b.rejected||(b.cur.element!==b.prev.element&&(b.prev.dropzone&&(_.leave=new fa(b,p,"dragleave"),p.dragLeave=_.leave.target=b.prev.element,p.prevDropzone=_.leave.dropzone=b.prev.dropzone),b.cur.dropzone&&(_.enter=new fa(b,p,"dragenter"),p.dragEnter=b.cur.element,p.dropzone=b.cur.dropzone)),p.type==="dragend"&&b.cur.dropzone&&(_.drop=new fa(b,p,"drop"),p.dropzone=b.cur.dropzone,p.relatedTarget=b.cur.element),p.type==="dragmove"&&b.cur.dropzone&&(_.move=new fa(b,p,"dropmove"),p.dropzone=b.cur.dropzone)),_}function ma(t,i){var p=t.dropState,b=p.activeDrops,_=p.cur,L=p.prev;i.leave&&L.dropzone.fire(i.leave),i.enter&&_.dropzone.fire(i.enter),i.move&&_.dropzone.fire(i.move),i.drop&&_.dropzone.fire(i.drop),i.deactivate&&Oa(b,i.deactivate),p.prev.dropzone=_.dropzone,p.prev.element=_.element}function Ha(t,i){var p=t.interaction,b=t.iEvent,_=t.event;if(b.type==="dragmove"||b.type==="dragend"){var L=p.dropState;i.dynamicDrop&&(L.activeDrops=Pa(i,p.element));var Y=b,Q=ka(p,Y,_);L.rejected=L.rejected&&!!Q&&Q.dropzone===L.cur.dropzone&&Q.element===L.cur.element,L.cur.dropzone=Q&&Q.dropzone,L.cur.element=Q&&Q.element,L.events=ua(p,0,Y)}}var pl={id:"actions/drop",install:function(t){var i=t.actions,p=t.interactStatic,b=t.Interactable,_=t.defaults;t.usePlugin(ue),b.prototype.dropzone=function(L){return function(Y,Q){if(g.object(Q)){if(Y.options.drop.enabled=Q.enabled!==!1,Q.listeners){var ge=He(Q.listeners),Fe=Object.keys(ge).reduce(function(ea,Aa){return ea[/^(enter|leave)/.test(Aa)?"drag".concat(Aa):/^(activate|deactivate|move)/.test(Aa)?"drop".concat(Aa):Aa]=ge[Aa],ea},{}),Se=Y.options.drop.listeners;Se&&Y.off(Se),Y.on(Fe),Y.options.drop.listeners=Fe}return g.func(Q.ondrop)&&Y.on("drop",Q.ondrop),g.func(Q.ondropactivate)&&Y.on("dropactivate",Q.ondropactivate),g.func(Q.ondropdeactivate)&&Y.on("dropdeactivate",Q.ondropdeactivate),g.func(Q.ondragenter)&&Y.on("dragenter",Q.ondragenter),g.func(Q.ondragleave)&&Y.on("dragleave",Q.ondragleave),g.func(Q.ondropmove)&&Y.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?Y.options.drop.overlap=Q.overlap:g.number(Q.overlap)&&(Y.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(Y.options.drop.accept=Q.accept),"checker"in Q&&(Y.options.drop.checker=Q.checker),Y}return g.bool(Q)?(Y.options.drop.enabled=Q,Y):Y.options.drop}(this,L)},b.prototype.dropCheck=function(L,Y,Q,ge,Fe,Se){return function(ea,Aa,rl,Ja,nl,kl,ol){var Dl=!1;if(!(ol=ol||ea.getRect(kl)))return!!ea.options.drop.checker&&ea.options.drop.checker(Aa,rl,Dl,ea,kl,Ja,nl);var zl=ea.options.drop.overlap;if(zl==="pointer"){var Xl=Le(Ja,nl,"drag"),El=Ze(Aa);El.x+=Xl.x,El.y+=Xl.y;var Ul=El.x>ol.left&&El.x<ol.right,Hr=El.y>ol.top&&El.y<ol.bottom;Dl=Ul&&Hr}var _r=Ja.getRect(nl);if(_r&&zl==="center"){var Jr=_r.left+_r.width/2,tn=_r.top+_r.height/2;Dl=Jr>=ol.left&&Jr<=ol.right&&tn>=ol.top&&tn<=ol.bottom}return _r&&g.number(zl)&&(Dl=Math.max(0,Math.min(ol.right,_r.right)-Math.max(ol.left,_r.left))*Math.max(0,Math.min(ol.bottom,_r.bottom)-Math.max(ol.top,_r.top))/(_r.width*_r.height)>=zl),ea.options.drop.checker&&(Dl=ea.options.drop.checker(Aa,rl,Dl,ea,kl,Ja,nl)),Dl}(this,L,Y,Q,ge,Fe,Se)},p.dynamicDrop=function(L){return g.bool(L)?(t.dynamicDrop=L,p):t.dynamicDrop},re(i.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),i.methodDict.drop="dropzone",t.dynamicDrop=!1,_.actions.drop=pl.defaults},listeners:{"interactions:before-action-start":function(t){var i=t.interaction;i.prepared.name==="drag"&&(i.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,i){var p=t.interaction,b=(t.event,t.iEvent);if(p.prepared.name==="drag"){var _=p.dropState;_.activeDrops=[],_.events={},_.activeDrops=Pa(i,p.element),_.events=ua(p,0,b),_.events.activate&&(Oa(_.activeDrops,_.events.activate),i.fire("actions/drop:start",{interaction:p,dragEvent:b}))}},"interactions:action-move":Ha,"interactions:after-action-move":function(t,i){var p=t.interaction,b=t.iEvent;if(p.prepared.name==="drag"){var _=p.dropState;ma(p,_.events),i.fire("actions/drop:move",{interaction:p,dragEvent:b}),_.events={}}},"interactions:action-end":function(t,i){if(t.interaction.prepared.name==="drag"){var p=t.interaction,b=t.iEvent;Ha(t,i),ma(p,p.dropState.events),i.fire("actions/drop:end",{interaction:p,dragEvent:b})}},"interactions:stop":function(t){var i=t.interaction;if(i.prepared.name==="drag"){var p=i.dropState;p&&(p.activeDrops=null,p.events=null,p.cur.dropzone=null,p.cur.element=null,p.prev.dropzone=null,p.prev.element=null,p.rejected=!1)}}},getActiveDrops:Pa,getDrop:ka,getDropEvents:ua,fireDropEvents:ma,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},$l=pl;function gl(t){var i=t.interaction,p=t.iEvent,b=t.phase;if(i.prepared.name==="gesture"){var _=i.pointers.map(function(Fe){return Fe.pointer}),L=b==="start",Y=b==="end",Q=i.interactable.options.deltaSource;if(p.touches=[_[0],_[1]],L)p.distance=We(_,Q),p.box=_a(_),p.scale=1,p.ds=0,p.angle=x(_,Q),p.da=0,i.gesture.startDistance=p.distance,i.gesture.startAngle=p.angle;else if(Y||i.pointers.length<2){var ge=i.prevEvent;p.distance=ge.distance,p.box=ge.box,p.scale=ge.scale,p.ds=0,p.angle=ge.angle,p.da=0}else p.distance=We(_,Q),p.box=_a(_),p.scale=p.distance/i.gesture.startDistance,p.angle=x(_,Q),p.ds=p.scale-i.gesture.scale,p.da=p.angle-i.gesture.angle;i.gesture.distance=p.distance,i.gesture.angle=p.angle,g.number(p.scale)&&p.scale!==1/0&&!isNaN(p.scale)&&(i.gesture.scale=p.scale)}}var Ol={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var i=t.actions,p=t.Interactable,b=t.defaults;p.prototype.gesturable=function(_){return g.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):g.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},i.map.gesture=Ol,i.methodDict.gesture="gesturable",b.actions.gesture=Ol.defaults},listeners:{"interactions:action-start":gl,"interactions:action-move":gl,"interactions:action-end":gl,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var i=t.interactable.options.gesture;if(i&&i.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},$a=Ol;function jl(t,i,p,b,_,L,Y){if(!i)return!1;if(i===!0){var Q=g.number(L.width)?L.width:L.right-L.left,ge=g.number(L.height)?L.height:L.bottom-L.top;if(Y=Math.min(Y,Math.abs((t==="left"||t==="right"?Q:ge)/2)),Q<0&&(t==="left"?t="right":t==="right"&&(t="left")),ge<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var Fe=Q>=0?L.left:L.right;return p.x<Fe+Y}if(t==="top"){var Se=ge>=0?L.top:L.bottom;return p.y<Se+Y}if(t==="right")return p.x>(Q>=0?L.right:L.left)-Y;if(t==="bottom")return p.y>(ge>=0?L.bottom:L.top)-Y}return!!g.element(b)&&(g.element(i)?i===b:le(b,i,_))}function Zl(t){var i=t.iEvent,p=t.interaction;if(p.prepared.name==="resize"&&p.resizeAxes){var b=i;p.interactable.options.resize.square?(p.resizeAxes==="y"?b.delta.x=b.delta.y:b.delta.y=b.delta.x,b.axes="xy"):(b.axes=p.resizeAxes,p.resizeAxes==="x"?b.delta.y=0:p.resizeAxes==="y"&&(b.delta.x=0))}}var ja,ba,Da={id:"actions/resize",before:["actions/drag"],install:function(t){var i=t.actions,p=t.browser,b=t.Interactable,_=t.defaults;Da.cursors=function(L){return L.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(p),Da.defaultMargin=p.supportsTouch||p.supportsPointerEvent?20:10,b.prototype.resizable=function(L){return function(Y,Q,ge){return g.object(Q)?(Y.options.resize.enabled=Q.enabled!==!1,Y.setPerAction("resize",Q),Y.setOnEvents("resize",Q),g.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?Y.options.resize.axis=Q.axis:Q.axis===null&&(Y.options.resize.axis=ge.defaults.actions.resize.axis),g.bool(Q.preserveAspectRatio)?Y.options.resize.preserveAspectRatio=Q.preserveAspectRatio:g.bool(Q.square)&&(Y.options.resize.square=Q.square),Y):g.bool(Q)?(Y.options.resize.enabled=Q,Y):Y.options.resize}(this,L,t)},i.map.resize=Da,i.methodDict.resize="resizable",_.actions.resize=Da.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(i){var p=i.iEvent,b=i.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var _=p,L=b.rect;b._rects={start:re({},L),corrected:re({},L),previous:re({},L),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=b.prepared.edges,_.rect=b._rects.corrected,_.deltaRect=b._rects.delta}})(t),Zl(t)},"interactions:action-move":function(t){(function(i){var p=i.iEvent,b=i.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var _=p,L=b.interactable.options.resize.invert,Y=L==="reposition"||L==="negate",Q=b.rect,ge=b._rects,Fe=ge.start,Se=ge.corrected,ea=ge.delta,Aa=ge.previous;if(re(Aa,Se),Y){if(re(Se,Q),L==="reposition"){if(Se.top>Se.bottom){var rl=Se.top;Se.top=Se.bottom,Se.bottom=rl}if(Se.left>Se.right){var Ja=Se.left;Se.left=Se.right,Se.right=Ja}}}else Se.top=Math.min(Q.top,Fe.bottom),Se.bottom=Math.max(Q.bottom,Fe.top),Se.left=Math.min(Q.left,Fe.right),Se.right=Math.max(Q.right,Fe.left);for(var nl in Se.width=Se.right-Se.left,Se.height=Se.bottom-Se.top,Se)ea[nl]=Se[nl]-Aa[nl];_.edges=b.prepared.edges,_.rect=Se,_.deltaRect=ea}})(t),Zl(t)},"interactions:action-end":function(t){var i=t.iEvent,p=t.interaction;if(p.prepared.name==="resize"&&p.prepared.edges){var b=i;b.edges=p.prepared.edges,b.rect=p._rects.corrected,b.deltaRect=p._rects.delta}},"auto-start:check":function(t){var i=t.interaction,p=t.interactable,b=t.element,_=t.rect,L=t.buttons;if(_){var Y=re({},i.coords.cur.page),Q=p.options.resize;if(Q&&Q.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(L&Q.mouseButtons)!=0)){if(g.object(Q.edges)){var ge={left:!1,right:!1,top:!1,bottom:!1};for(var Fe in ge)ge[Fe]=jl(Fe,Q.edges[Fe],Y,i._latestPointer.eventTarget,b,_,Q.margin||Da.defaultMargin);ge.left=ge.left&&!ge.right,ge.top=ge.top&&!ge.bottom,(ge.left||ge.right||ge.top||ge.bottom)&&(t.action={name:"resize",edges:ge})}else{var Se=Q.axis!=="y"&&Y.x>_.right-Da.defaultMargin,ea=Q.axis!=="x"&&Y.y>_.bottom-Da.defaultMargin;(Se||ea)&&(t.action={name:"resize",axes:(Se?"x":"")+(ea?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var i=t.edges,p=t.axis,b=t.name,_=Da.cursors,L=null;if(p)L=_[b+p];else if(i){for(var Y="",Q=0,ge=["top","bottom","left","right"];Q<ge.length;Q++){var Fe=ge[Q];i[Fe]&&(Y+=Fe)}L=_[Y]}return L},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},Ua=Da,al={id:"actions",install:function(t){t.usePlugin($a),t.usePlugin(Ua),t.usePlugin(ue),t.usePlugin($l)}},Za=0,Me={request:function(t){return ja(t)},cancel:function(t){return ba(t)},init:function(t){if(ja=t.requestAnimationFrame,ba=t.cancelAnimationFrame,!ja)for(var i=["ms","moz","webkit","o"],p=0;p<i.length;p++){var b=i[p];ja=t["".concat(b,"RequestAnimationFrame")],ba=t["".concat(b,"CancelAnimationFrame")]||t["".concat(b,"CancelRequestAnimationFrame")]}ja=ja&&ja.bind(t),ba=ba&&ba.bind(t),ja||(ja=function(_){var L=Date.now(),Y=Math.max(0,16-(L-Za)),Q=t.setTimeout(function(){_(L+Y)},Y);return Za=L+Y,Q},ba=function(_){return clearTimeout(_)})}},na={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){na.isScrolling=!0,Me.cancel(na.i),t.autoScroll=na,na.interaction=t,na.prevTime=na.now(),na.i=Me.request(na.scroll)},stop:function(){na.isScrolling=!1,na.interaction&&(na.interaction.autoScroll=null),Me.cancel(na.i)},scroll:function(){var t=na.interaction,i=t.interactable,p=t.element,b=t.prepared.name,_=i.options[b].autoScroll,L=ke(_.container,i,p),Y=na.now(),Q=(Y-na.prevTime)/1e3,ge=_.speed*Q;if(ge>=1){var Fe={x:na.x*ge,y:na.y*ge};if(Fe.x||Fe.y){var Se=Ta(L);g.window(L)?L.scrollBy(Fe.x,Fe.y):L&&(L.scrollLeft+=Fe.x,L.scrollTop+=Fe.y);var ea=Ta(L),Aa={x:ea.x-Se.x,y:ea.y-Se.y};(Aa.x||Aa.y)&&i.fire({type:"autoscroll",target:p,interactable:i,delta:Aa,interaction:t,container:L})}na.prevTime=Y}na.isScrolling&&(Me.cancel(na.i),na.i=Me.request(na.scroll))},check:function(t,i){var p;return(p=t.options[i].autoScroll)==null?void 0:p.enabled},onInteractionMove:function(t){var i=t.interaction,p=t.pointer;if(i.interacting()&&na.check(i.interactable,i.prepared.name))if(i.simulation)na.x=na.y=0;else{var b,_,L,Y,Q=i.interactable,ge=i.element,Fe=i.prepared.name,Se=Q.options[Fe].autoScroll,ea=ke(Se.container,Q,ge);if(g.window(ea))Y=p.clientX<na.margin,b=p.clientY<na.margin,_=p.clientX>ea.innerWidth-na.margin,L=p.clientY>ea.innerHeight-na.margin;else{var Aa=be(ea);Y=p.clientX<Aa.left+na.margin,b=p.clientY<Aa.top+na.margin,_=p.clientX>Aa.right-na.margin,L=p.clientY>Aa.bottom-na.margin}na.x=_?1:Y?-1:0,na.y=L?1:b?-1:0,na.isScrolling||(na.margin=Se.margin,na.speed=Se.speed,na.start(i))}}};function ke(t,i,p){return(g.string(t)?Ne(t,i,p):t)||S(p)}function Ta(t){return g.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Ge={id:"auto-scroll",install:function(t){var i=t.defaults,p=t.actions;t.autoScroll=na,na.now=function(){return t.now()},p.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=na.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,na.stop(),na.interaction&&(na.interaction=null)},"interactions:stop":na.stop,"interactions:action-move":function(t){return na.onInteractionMove(t)}}},X=Ge;function aa(t,i){var p=!1;return function(){return p||(H.console.warn(i),p=!0),t.apply(this,arguments)}}function Qe(t,i){return t.name=i.name,t.axis=i.axis,t.edges=i.edges,t}function Ie(t){return g.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function xl(t){return g.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var ll={id:"auto-start/interactableMethods",install:function(t){var i=t.Interactable;i.prototype.getAction=function(p,b,_,L){var Y=function(Q,ge,Fe,Se,ea){var Aa=Q.getRect(Se),rl=ge.buttons||{0:1,1:4,3:8,4:16}[ge.button],Ja={action:null,interactable:Q,interaction:Fe,element:Se,rect:Aa,buttons:rl};return ea.fire("auto-start:check",Ja),Ja.action}(this,b,_,L,t);return this.options.actionChecker?this.options.actionChecker(p,b,Y,this,L,_):Y},i.prototype.ignoreFrom=aa(function(p){return this._backCompatOption("ignoreFrom",p)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=aa(function(p){return this._backCompatOption("allowFrom",p)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=xl,i.prototype.styleCursor=Ie}};function hl(t,i,p,b,_){return i.testIgnoreAllow(i.options[t.name],p,b)&&i.options[t.name].enabled&&me(i,p,t,_)?t:null}function Ra(t,i,p,b,_,L,Y){for(var Q=0,ge=b.length;Q<ge;Q++){var Fe=b[Q],Se=_[Q],ea=Fe.getAction(i,p,t,Se);if(ea){var Aa=hl(ea,Fe,Se,L,Y);if(Aa)return{action:Aa,interactable:Fe,element:Se}}}return{action:null,interactable:null,element:null}}function Wa(t,i,p,b,_){var L=[],Y=[],Q=b;function ge(Se){L.push(Se),Y.push(Q)}for(;g.element(Q);){L=[],Y=[],_.interactables.forEachMatch(Q,ge);var Fe=Ra(t,i,p,L,Y,b,_);if(Fe.action&&!Fe.interactable.options[Fe.action.name].manualStart)return Fe;Q=Ve(Q)}return{action:null,interactable:null,element:null}}function Sa(t,i,p){var b=i.action,_=i.interactable,L=i.element;b=b||{name:null},t.interactable=_,t.element=L,Qe(t.prepared,b),t.rect=_&&b.name?_.getRect(L):null,Rl(t,p),p.fire("autoStart:prepared",{interaction:t})}function me(t,i,p,b){var _=t.options,L=_[p.name].max,Y=_[p.name].maxPerElement,Q=b.autoStart.maxInteractions,ge=0,Fe=0,Se=0;if(!(L&&Y&&Q))return!1;for(var ea=0,Aa=b.interactions.list;ea<Aa.length;ea++){var rl=Aa[ea],Ja=rl.prepared.name;if(rl.interacting()&&(++ge>=Q||rl.interactable===t&&((Fe+=Ja===p.name?1:0)>=L||rl.element===i&&(Se++,Ja===p.name&&Se>=Y))))return!1}return Q>0}function xa(t,i){return g.number(t)?(i.autoStart.maxInteractions=t,this):i.autoStart.maxInteractions}function wl(t,i,p){var b=p.autoStart.cursorElement;b&&b!==t&&(b.style.cursor=""),t.ownerDocument.documentElement.style.cursor=i,t.style.cursor=i,p.autoStart.cursorElement=i?t:null}function Rl(t,i){var p=t.interactable,b=t.element,_=t.prepared;if(t.pointerType==="mouse"&&p&&p.options.styleCursor){var L="";if(_.name){var Y=p.options[_.name].cursorChecker;L=g.func(Y)?Y(_,p,b,t._interacting):i.actions.map[_.name].getCursor(_)}wl(t.element,L||"",i)}else i.autoStart.cursorElement&&wl(i.autoStart.cursorElement,"",i)}var Fl={id:"auto-start/base",before:["actions"],install:function(t){var i=t.interactStatic,p=t.defaults;t.usePlugin(ll),p.base.actionChecker=null,p.base.styleCursor=!0,re(p.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(b){return xa(b,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:me,cursorElement:null}},listeners:{"interactions:down":function(t,i){var p=t.interaction,b=t.pointer,_=t.event,L=t.eventTarget;p.interacting()||Sa(p,Wa(p,b,_,L,i),i)},"interactions:move":function(t,i){(function(p,b){var _=p.interaction,L=p.pointer,Y=p.event,Q=p.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||Sa(_,Wa(_,L,Y,Q,b),b)})(t,i),function(p,b){var _=p.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){b.fire("autoStart:before-start",p);var L=_.interactable,Y=_.prepared.name;Y&&L&&(L.options[Y].manualStart||!me(L,_.element,_.prepared,b)?_.stop():(_.start(_.prepared,L,_.element),Rl(_,b)))}}(t,i)},"interactions:stop":function(t,i){var p=t.interaction,b=p.interactable;b&&b.options.styleCursor&&wl(p.element,"",i)}},maxInteractions:xa,withinInteractionLimit:me,validateAction:hl},or=Fl,gr={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,i){var p=t.interaction,b=t.eventTarget,_=t.dx,L=t.dy;if(p.prepared.name==="drag"){var Y=Math.abs(_),Q=Math.abs(L),ge=p.interactable.options.drag,Fe=ge.startAxis,Se=Y>Q?"x":Y<Q?"y":"xy";if(p.prepared.axis=ge.lockAxis==="start"?Se[0]:ge.lockAxis,Se!=="xy"&&Fe!=="xy"&&Fe!==Se){p.prepared.name=null;for(var ea=b,Aa=function(Ja){if(Ja!==p.interactable){var nl=p.interactable.options.drag;if(!nl.manualStart&&Ja.testIgnoreAllow(nl,ea,b)){var kl=Ja.getAction(p.downPointer,p.downEvent,p,ea);if(kl&&kl.name==="drag"&&function(ol,Dl){if(!Dl)return!1;var zl=Dl.options.drag.startAxis;return ol==="xy"||zl==="xy"||zl===ol}(Se,Ja)&&or.validateAction(kl,Ja,ea,b,i))return Ja}}};g.element(ea);){var rl=i.interactables.forEachMatch(ea,Aa);if(rl){p.prepared.name="drag",p.interactable=rl,p.element=ea;break}ea=Ve(ea)}}}}}};function Cl(t){var i=t.prepared&&t.prepared.name;if(!i)return null;var p=t.interactable.options;return p[i].hold||p[i].delay}var sr={id:"auto-start/hold",install:function(t){var i=t.defaults;t.usePlugin(or),i.perAction.hold=0,i.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var i=t.interaction,p=Cl(i);p>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},p))},"interactions:move":function(t){var i=t.interaction,p=t.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!p&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var i=t.interaction;Cl(i)>0&&(i.prepared.name=null)}},getHoldDuration:Cl},Tr=sr,Ml={id:"auto-start",install:function(t){t.usePlugin(or),t.usePlugin(Tr),t.usePlugin(gr)}},rr=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):g.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function en(t){var i=t.interaction,p=t.event;i.interactable&&i.interactable.checkAndPreventDefault(p)}var Or={id:"core/interactablePreventDefault",install:function(t){var i=t.Interactable;i.prototype.preventDefault=rr,i.prototype.checkAndPreventDefault=function(p){return function(b,_,L){var Y=b.options.preventDefault;if(Y!=="never")if(Y!=="always"){if(_.events.supportsPassive&&/^touch(start|move)$/.test(L.type)){var Q=S(L.target).document,ge=_.getDocOptions(Q);if(!ge||!ge.events||ge.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(L.type)||g.element(L.target)&&ye(L.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||L.preventDefault()}else L.preventDefault()}(this,t,p)},t.interactions.docEvents.push({type:"dragstart",listener:function(p){for(var b=0,_=t.interactions.list;b<_.length;b++){var L=_[b];if(L.element&&(L.element===p.target||ce(L.element,p.target)))return void L.interactable.checkAndPreventDefault(p)}}})},listeners:["down","move","up","cancel"].reduce(function(t,i){return t["interactions:".concat(i)]=en,t},{})};function zr(t,i){if(i.phaselessTypes[t])return!0;for(var p in i.map)if(t.indexOf(p)===0&&t.substr(p.length)in i.phases)return!0;return!1}function Cr(t){var i={};for(var p in t){var b=t[p];g.plainObject(b)?i[p]=Cr(b):g.array(b)?i[p]=ra(b):i[p]=b}return i}var Mr=function(){function t(i){c(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=i,this.result=Ir(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return f(t,[{key:"start",value:function(i,p){var b,_,L=i.phase,Y=this.interaction,Q=function(Fe){var Se=Fe.interactable.options[Fe.prepared.name],ea=Se.modifiers;return ea&&ea.length?ea:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Aa){var rl=Se[Aa];return rl&&rl.enabled&&{options:rl,methods:rl._methods}}).filter(function(Aa){return!!Aa})}(Y);this.prepareStates(Q),this.startEdges=re({},Y.edges),this.edges=re({},this.startEdges),this.startOffset=(b=Y.rect,_=p,b?{left:_.x-b.left,top:_.y-b.top,right:b.right-_.x,bottom:b.bottom-_.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var ge=this.fillArg({phase:L,pageCoords:p,preEnd:!1});return this.result=Ir(),this.startAll(ge),this.result=this.setAll(ge)}},{key:"fillArg",value:function(i){var p=this.interaction;return i.interaction=p,i.interactable=p.interactable,i.element=p.element,i.rect||(i.rect=p.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var p=0,b=this.states;p<b.length;p++){var _=b[p];_.methods.start&&(i.state=_,_.methods.start(i))}}},{key:"setAll",value:function(i){var p=i.phase,b=i.preEnd,_=i.skipModifiers,L=i.rect,Y=i.edges;i.coords=re({},i.pageCoords),i.rect=re({},L),i.edges=re({},Y);for(var Q=_?this.states.slice(_):this.states,ge=Ir(i.coords,i.rect),Fe=0;Fe<Q.length;Fe++){var Se,ea=Q[Fe],Aa=ea.options,rl=re({},i.coords),Ja=null;(Se=ea.methods)!=null&&Se.set&&this.shouldDo(Aa,b,p)&&(i.state=ea,Ja=ea.methods.set(i),te(i.edges,i.rect,{x:i.coords.x-rl.x,y:i.coords.y-rl.y})),ge.eventProps.push(Ja)}re(this.edges,i.edges),ge.delta.x=i.coords.x-i.pageCoords.x,ge.delta.y=i.coords.y-i.pageCoords.y,ge.rectDelta.left=i.rect.left-L.left,ge.rectDelta.right=i.rect.right-L.right,ge.rectDelta.top=i.rect.top-L.top,ge.rectDelta.bottom=i.rect.bottom-L.bottom;var nl=this.result.coords,kl=this.result.rect;if(nl&&kl){var ol=ge.rect.left!==kl.left||ge.rect.right!==kl.right||ge.rect.top!==kl.top||ge.rect.bottom!==kl.bottom;ge.changed=ol||nl.x!==ge.coords.x||nl.y!==ge.coords.y}return ge}},{key:"applyToInteraction",value:function(i){var p=this.interaction,b=i.phase,_=p.coords.cur,L=p.coords.start,Y=this.result,Q=this.startDelta,ge=Y.delta;b==="start"&&re(this.startDelta,Y.delta);for(var Fe=0,Se=[[L,Q],[_,ge]];Fe<Se.length;Fe++){var ea=Se[Fe],Aa=ea[0],rl=ea[1];Aa.page.x+=rl.x,Aa.page.y+=rl.y,Aa.client.x+=rl.x,Aa.client.y+=rl.y}var Ja=this.result.rectDelta,nl=i.rect||p.rect;nl.left+=Ja.left,nl.right+=Ja.right,nl.top+=Ja.top,nl.bottom+=Ja.bottom,nl.width=nl.right-nl.left,nl.height=nl.bottom-nl.top}},{key:"setAndApply",value:function(i){var p=this.interaction,b=i.phase,_=i.preEnd,L=i.skipModifiers,Y=this.setAll(this.fillArg({preEnd:_,phase:b,pageCoords:i.modifiedCoords||p.coords.cur.page}));if(this.result=Y,!Y.changed&&(!L||L<this.states.length)&&p.interacting())return!1;if(i.modifiedCoords){var Q=p.coords.cur.page,ge={x:i.modifiedCoords.x-Q.x,y:i.modifiedCoords.y-Q.y};Y.coords.x+=ge.x,Y.coords.y+=ge.y,Y.delta.x+=ge.x,Y.delta.y+=ge.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var p=i.interaction,b=i.event,_=this.states;if(_&&_.length){for(var L=!1,Y=0;Y<_.length;Y++){var Q=_[Y];i.state=Q;var ge=Q.options,Fe=Q.methods,Se=Fe.beforeEnd&&Fe.beforeEnd(i);if(Se)return this.endResult=Se,!1;L=L||!L&&this.shouldDo(ge,!0,i.phase,!0)}L&&p.move({event:b,preEnd:!0})}}},{key:"stop",value:function(i){var p=i.interaction;if(this.states&&this.states.length){var b=re({states:this.states,interactable:p.interactable,element:p.element,rect:null},i);this.fillArg(b);for(var _=0,L=this.states;_<L.length;_++){var Y=L[_];b.state=Y,Y.methods.stop&&Y.methods.stop(b)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var p=0;p<i.length;p++){var b=i[p],_=b.options,L=b.methods,Y=b.name;this.states.push({options:_,methods:L,index:p,name:Y})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var p=i.interaction,b=p.coords,_=p.rect,L=p.modification;if(L.result){for(var Y=L.startDelta,Q=L.result,ge=Q.delta,Fe=Q.rectDelta,Se=0,ea=[[b.start,Y],[b.cur,ge]];Se<ea.length;Se++){var Aa=ea[Se],rl=Aa[0],Ja=Aa[1];rl.page.x-=Ja.x,rl.page.y-=Ja.y,rl.client.x-=Ja.x,rl.client.y-=Ja.y}_.left-=Fe.left,_.right-=Fe.right,_.top-=Fe.top,_.bottom-=Fe.bottom}}},{key:"shouldDo",value:function(i,p,b,_){return!(!i||i.enabled===!1||_&&!i.endOnly||i.endOnly&&!p||b==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(p){return Cr(p)}),this.result=Ir(re({},i.result.coords),re({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),t}();function Ir(t,i){return{rect:i,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Nr(t,i){var p=t.defaults,b={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},_=function(L){var Y=L||{};for(var Q in Y.enabled=Y.enabled!==!1,p)Q in Y||(Y[Q]=p[Q]);var ge={options:Y,methods:b,name:i,enable:function(){return Y.enabled=!0,ge},disable:function(){return Y.enabled=!1,ge}};return ge};return i&&typeof i=="string"&&(_._defaults=p,_._methods=b),_}function Fr(t){var i=t.iEvent,p=t.interaction.modification.result;p&&(i.modifiers=p.eventProps)}var Lr={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var i=t.interaction;i.modification=new Mr(i)},"interactions:before-action-start":function(t){var i=t.interaction,p=t.interaction.modification;p.start(t,i.coords.start.page),i.edges=p.edges,p.applyToInteraction(t)},"interactions:before-action-move":function(t){var i=t.interaction,p=i.modification,b=p.setAndApply(t);return i.edges=p.edges,b},"interactions:before-action-end":function(t){var i=t.interaction,p=i.modification,b=p.beforeEnd(t);return i.edges=p.startEdges,b},"interactions:action-start":Fr,"interactions:action-move":Fr,"interactions:action-end":Fr,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},cr=Lr,xn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Yr=function(t){y(p,t);var i=j(p);function p(b,_,L,Y,Q,ge,Fe){var Se;c(this,p),(Se=i.call(this,b)).relatedTarget=null,Se.screenX=void 0,Se.screenY=void 0,Se.button=void 0,Se.buttons=void 0,Se.ctrlKey=void 0,Se.shiftKey=void 0,Se.altKey=void 0,Se.metaKey=void 0,Se.page=void 0,Se.client=void 0,Se.delta=void 0,Se.rect=void 0,Se.x0=void 0,Se.y0=void 0,Se.t0=void 0,Se.dt=void 0,Se.duration=void 0,Se.clientX0=void 0,Se.clientY0=void 0,Se.velocity=void 0,Se.speed=void 0,Se.swipe=void 0,Se.axes=void 0,Se.preEnd=void 0,Q=Q||b.element;var ea=b.interactable,Aa=(ea&&ea.options||xn).deltaSource,rl=Le(ea,Q,L),Ja=Y==="start",nl=Y==="end",kl=Ja?N(Se):b.prevEvent,ol=Ja?b.coords.start:nl?{page:kl.page,client:kl.client,timeStamp:b.coords.cur.timeStamp}:b.coords.cur;return Se.page=re({},ol.page),Se.client=re({},ol.client),Se.rect=re({},b.rect),Se.timeStamp=ol.timeStamp,nl||(Se.page.x-=rl.x,Se.page.y-=rl.y,Se.client.x-=rl.x,Se.client.y-=rl.y),Se.ctrlKey=_.ctrlKey,Se.altKey=_.altKey,Se.shiftKey=_.shiftKey,Se.metaKey=_.metaKey,Se.button=_.button,Se.buttons=_.buttons,Se.target=Q,Se.currentTarget=Q,Se.preEnd=ge,Se.type=Fe||L+(Y||""),Se.interactable=ea,Se.t0=Ja?b.pointers[b.pointers.length-1].downTime:kl.t0,Se.x0=b.coords.start.page.x-rl.x,Se.y0=b.coords.start.page.y-rl.y,Se.clientX0=b.coords.start.client.x-rl.x,Se.clientY0=b.coords.start.client.y-rl.y,Se.delta=Ja||nl?{x:0,y:0}:{x:Se[Aa].x-kl[Aa].x,y:Se[Aa].y-kl[Aa].y},Se.dt=b.coords.delta.timeStamp,Se.duration=Se.timeStamp-Se.t0,Se.velocity=re({},b.coords.velocity[Aa]),Se.speed=Ia(Se.velocity.x,Se.velocity.y),Se.swipe=nl||Y==="inertiastart"?Se.getSwipe():null,Se}return f(p,[{key:"getSwipe",value:function(){var b=this._interaction;if(b.prevEvent.speed<600||this.timeStamp-b.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(b.prevEvent.velocityY,b.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var L=112.5<=_&&_<247.5,Y=202.5<=_&&_<337.5;return{up:Y,down:!Y&&22.5<=_&&_<157.5,left:L,right:!L&&(292.5<=_||_<67.5),angle:_,speed:b.prevEvent.speed,velocity:{x:b.prevEvent.velocityX,y:b.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),p}(Ue);Object.defineProperties(Yr.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var nn=f(function t(i,p,b,_,L){c(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=i,this.pointer=p,this.event=b,this.downTime=_,this.downTarget=L}),zn=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),wn=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),gn=0,mr=function(){function t(i){var p=this,b=i.pointerType,_=i.scopeFire;c(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=aa(function(Se){this.move(Se)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=gn++,this._scopeFire=_,this.pointerType=b;var L=this;this._proxy={};var Y=function(Se){Object.defineProperty(p._proxy,Se,{get:function(){return L[Se]}})};for(var Q in zn)Y(Q);var ge=function(Se){Object.defineProperty(p._proxy,Se,{value:function(){return L[Se].apply(L,arguments)}})};for(var Fe in wn)ge(Fe);this._scopeFire("interactions:new",{interaction:this})}return f(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,p,b){var _=this.updatePointer(i,p,b,!0),L=this.pointers[_];this._scopeFire("interactions:down",{pointer:i,event:p,eventTarget:b,pointerIndex:_,pointerInfo:L,type:"down",interaction:this})}},{key:"start",value:function(i,p,b){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!p.options[i.name].enabled)&&(Qe(this.prepared,i),this.interactable=p,this.element=b,this.rect=p.getRect(b),this.edges=this.prepared.edges?re({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(i,p,b){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,p,b,!1);var _,L,Y=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(_=this.coords.cur.client.x-this.coords.start.client.x,L=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ia(_,L)>this.pointerMoveTolerance);var Q,ge,Fe,Se=this.getPointerIndex(i),ea={pointer:i,pointerIndex:Se,pointerInfo:this.pointers[Se],event:p,type:"move",eventTarget:b,dx:_,dy:L,duplicate:Y,interaction:this};Y||(Q=this.coords.velocity,ge=this.coords.delta,Fe=Math.max(ge.timeStamp/1e3,.001),Q.page.x=ge.page.x/Fe,Q.page.y=ge.page.y/Fe,Q.client.x=ge.client.x/Fe,Q.client.y=ge.client.y/Fe,Q.timeStamp=Fe),this._scopeFire("interactions:move",ea),Y||this.simulation||(this.interacting()&&(ea.type=null,this.move(ea)),this.pointerWasMoved&&ee(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||fe(this.coords.delta),(i=re({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},i||{})).phase="move",this._doPhase(i)}},{key:"pointerUp",value:function(i,p,b,_){var L=this.getPointerIndex(i);L===-1&&(L=this.updatePointer(i,p,b,!1));var Y=/cancel$/i.test(p.type)?"cancel":"up";this._scopeFire("interactions:".concat(Y),{pointer:i,pointerIndex:L,pointerInfo:this.pointers[L],event:p,eventTarget:b,type:Y,curEventTarget:_,interaction:this}),this.simulation||this.end(p),this.removePointer(i,p)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var p;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(p=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,p===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(i){var p=se(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Oe(this.pointers,function(b){return b.id===p})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,p,b,_){var L,Y,Q,ge=se(i),Fe=this.getPointerIndex(i),Se=this.pointers[Fe];return _=_!==!1&&(_||/(down|start)$/i.test(p.type)),Se?Se.pointer=i:(Se=new nn(ge,i,p,null,null),Fe=this.pointers.length,this.pointers.push(Se)),we(this.coords.cur,this.pointers.map(function(ea){return ea.pointer}),this._now()),L=this.coords.delta,Y=this.coords.prev,Q=this.coords.cur,L.page.x=Q.page.x-Y.page.x,L.page.y=Q.page.y-Y.page.y,L.client.x=Q.client.x-Y.client.x,L.client.y=Q.client.y-Y.client.y,L.timeStamp=Q.timeStamp-Y.timeStamp,_&&(this.pointerIsDown=!0,Se.downTime=this.coords.cur.timeStamp,Se.downTarget=b,P(this.downPointer,i),this.interacting()||(ee(this.coords.start,this.coords.cur),ee(this.coords.prev,this.coords.cur),this.downEvent=p,this.pointerWasMoved=!1)),this._updateLatestPointer(i,p,b),this._scopeFire("interactions:update-pointer",{pointer:i,event:p,eventTarget:b,down:_,pointerInfo:Se,pointerIndex:Fe,interaction:this}),Fe}},{key:"removePointer",value:function(i,p){var b=this.getPointerIndex(i);if(b!==-1){var _=this.pointers[b];this._scopeFire("interactions:remove-pointer",{pointer:i,event:p,eventTarget:null,pointerIndex:b,pointerInfo:_,interaction:this}),this.pointers.splice(b,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,p,b){this._latestPointer.pointer=i,this._latestPointer.event=p,this._latestPointer.eventTarget=b}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,p,b,_){return new Yr(this,i,this.prepared.name,p,this.element,b,_)}},{key:"_fireEvent",value:function(i){var p;(p=this.interactable)==null||p.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var p=i.event,b=i.phase,_=i.preEnd,L=i.type,Y=this.rect;if(Y&&b==="move"&&(te(this.edges,Y,this.coords.delta[this.interactable.options.deltaSource]),Y.width=Y.right-Y.left,Y.height=Y.bottom-Y.top),this._scopeFire("interactions:before-action-".concat(b),i)===!1)return!1;var Q=i.iEvent=this._createPreparedEvent(p,b,_,L);return this._scopeFire("interactions:action-".concat(b),i),b==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(b),i),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function Hl(t){pr(t.interaction)}function pr(t){if(!function(p){return!(!p.offset.pending.x&&!p.offset.pending.y)}(t))return!1;var i=t.offset.pending;return Wl(t.coords.cur,i),Wl(t.coords.delta,i),te(t.edges,t.rect,i),i.x=0,i.y=0,!0}function Ll(t){var i=t.x,p=t.y;this.offset.pending.x+=i,this.offset.pending.y+=p,this.offset.total.x+=i,this.offset.total.y+=p}function Wl(t,i){var p=t.page,b=t.client,_=i.x,L=i.y;p.x+=_,p.y+=L,b.x+=_,b.y+=L}wn.offsetBy="";var Al={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Ll},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(i){i.pointerIsDown&&(Wl(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":Hl,"interactions:before-action-move":Hl,"interactions:before-action-end":function(t){var i=t.interaction;if(pr(i))return i.move({offset:!0}),i.end(),!1},"interactions:stop":function(t){var i=t.interaction;i.offset.total.x=0,i.offset.total.y=0,i.offset.pending.x=0,i.offset.pending.y=0}}},yr=Al,ir=function(){function t(i){c(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=i}return f(t,[{key:"start",value:function(i){var p=this.interaction,b=Pl(p);if(!b||!b.enabled)return!1;var _=p.coords.velocity.client,L=Ia(_.x,_.y),Y=this.modification||(this.modification=new Mr(p));if(Y.copyFrom(p.modification),this.t0=p._now(),this.allowResume=b.allowResume,this.v0=L,this.currentOffset={x:0,y:0},this.startCoords=p.coords.cur.page,this.modifierArg=Y.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-p.coords.cur.timeStamp<50&&L>b.minSpeed&&L>b.endSpeed)this.startInertia();else{if(Y.result=Y.setAll(this.modifierArg),!Y.result.changed)return!1;this.startSmoothEnd()}return p.modification.result.rect=null,p.offsetBy(this.targetOffset),p._doPhase({interaction:p,event:i,phase:"inertiastart"}),p.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),p.modification.result.rect=null,this.active=!0,p.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,p=this.interaction.coords.velocity.client,b=Pl(this.interaction),_=b.resistance,L=-Math.log(b.endSpeed/this.v0)/_;this.targetOffset={x:(p.x-L)/_,y:(p.y-L)/_},this.te=L,this.lambda_v0=_/this.v0,this.one_ve_v0=1-b.endSpeed/this.v0;var Y=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},Y.result=Y.setAll(Q),Y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+Y.result.delta.x,y:this.targetOffset.y+Y.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var p=this;this.timeout=Me.request(function(){p.active&&i()})}},{key:"inertiaTick",value:function(){var i,p,b,_,L,Y,Q,ge=this,Fe=this.interaction,Se=Pl(Fe).resistance,ea=(Fe._now()-this.t0)/1e3;if(ea<this.te){var Aa,rl=1-(Math.exp(-Se*ea)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,p=0,b=this.targetOffset.x,_=this.targetOffset.y,L=this.modifiedOffset.x,Y=this.modifiedOffset.y,Aa={x:Pr(Q=rl,i,b,L),y:Pr(Q,p,_,Y)}):Aa={x:this.targetOffset.x*rl,y:this.targetOffset.y*rl};var Ja={x:Aa.x-this.currentOffset.x,y:Aa.y-this.currentOffset.y};this.currentOffset.x+=Ja.x,this.currentOffset.y+=Ja.y,Fe.offsetBy(Ja),Fe.move(),this.onNextFrame(function(){return ge.inertiaTick()})}else Fe.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,p=this.interaction,b=p._now()-this.t0,_=Pl(p).smoothEndDuration;if(b<_){var L={x:_n(b,0,this.targetOffset.x,_),y:_n(b,0,this.targetOffset.y,_)},Y={x:L.x-this.currentOffset.x,y:L.y-this.currentOffset.y};this.currentOffset.x+=Y.x,this.currentOffset.y+=Y.y,p.offsetBy(Y),p.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else p.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var p=i.pointer,b=i.event,_=i.eventTarget,L=this.interaction;L.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),L.updatePointer(p,b,_,!0),L._doPhase({interaction:L,event:b,phase:"resume"}),ee(L.coords.prev,L.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Me.cancel(this.timeout)}}]),t}();function Pl(t){var i=t.interactable,p=t.prepared;return i&&i.options&&p.name&&i.options[p.name].inertia}var Vr={id:"inertia",before:["modifiers","actions"],install:function(t){var i=t.defaults;t.usePlugin(yr),t.usePlugin(cr),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,i.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var i=t.interaction;i.inertia=new ir(i)},"interactions:before-action-end":function(t){var i=t.interaction,p=t.event;return(!i._interacting||i.simulation||!i.inertia.start(p))&&null},"interactions:down":function(t){var i=t.interaction,p=t.eventTarget,b=i.inertia;if(b.active)for(var _=p;g.element(_);){if(_===i.element){b.resume(t);break}_=Ve(_)}},"interactions:stop":function(t){var i=t.interaction.inertia;i.active&&i.stop()},"interactions:before-action-resume":function(t){var i=t.interaction.modification;i.stop(t),i.start(t,t.interaction.coords.cur.page),i.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":Fr,"interactions:action-inertiastart":Fr,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function Pr(t,i,p,b){var _=1-t;return _*_*i+2*_*t*p+t*t*b}function _n(t,i,p,b){return-p*(t/=b)*(t-2)+i}var on=Vr;function eo(t,i){for(var p=0;p<i.length;p++){var b=i[p];if(t.immediatePropagationStopped)break;b(t)}}var Mn=function(){function t(i){c(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=re({},i||{})}return f(t,[{key:"fire",value:function(i){var p,b=this.global;(p=this.types[i.type])&&eo(i,p),!i.propagationStopped&&b&&(p=b[i.type])&&eo(i,p)}},{key:"on",value:function(i,p){var b=He(i,p);for(i in b)this.types[i]=Je(this.types[i]||[],b[i])}},{key:"off",value:function(i,p){var b=He(i,p);for(i in b){var _=this.types[i];if(_&&_.length)for(var L=0,Y=b[i];L<Y.length;L++){var Q=Y[L],ge=_.indexOf(Q);ge!==-1&&_.splice(ge,1)}}}},{key:"getRect",value:function(i){return null}}]),t}(),ao=function(){function t(i){c(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,P(this,i)}return f(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Sn(t){return g.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function In(t,i){return t===i||(typeof t=="boolean"?!!i.capture===t&&!i.passive:!!t.capture==!!i.capture&&!!t.passive==!!i.passive)}var Hn={id:"events",install:function(t){var i,p=[],b={},_=[],L={add:Y,remove:Q,addDelegate:function(Se,ea,Aa,rl,Ja){var nl=Sn(Ja);if(!b[Aa]){b[Aa]=[];for(var kl=0;kl<_.length;kl++){var ol=_[kl];Y(ol,Aa,ge),Y(ol,Aa,Fe,!0)}}var Dl=b[Aa],zl=za(Dl,function(Xl){return Xl.selector===Se&&Xl.context===ea});zl||(zl={selector:Se,context:ea,listeners:[]},Dl.push(zl)),zl.listeners.push({func:rl,options:nl})},removeDelegate:function(Se,ea,Aa,rl,Ja){var nl,kl=Sn(Ja),ol=b[Aa],Dl=!1;if(ol)for(nl=ol.length-1;nl>=0;nl--){var zl=ol[nl];if(zl.selector===Se&&zl.context===ea){for(var Xl=zl.listeners,El=Xl.length-1;El>=0;El--){var Ul=Xl[El];if(Ul.func===rl&&In(Ul.options,kl)){Xl.splice(El,1),Xl.length||(ol.splice(nl,1),Q(ea,Aa,ge),Q(ea,Aa,Fe,!0)),Dl=!0;break}}if(Dl)break}}},delegateListener:ge,delegateUseCapture:Fe,delegatedEvents:b,documents:_,targets:p,supportsOptions:!1,supportsPassive:!1};function Y(Se,ea,Aa,rl){if(Se.addEventListener){var Ja=Sn(rl),nl=za(p,function(kl){return kl.eventTarget===Se});nl||(nl={eventTarget:Se,events:{}},p.push(nl)),nl.events[ea]||(nl.events[ea]=[]),za(nl.events[ea],function(kl){return kl.func===Aa&&In(kl.options,Ja)})||(Se.addEventListener(ea,Aa,L.supportsOptions?Ja:Ja.capture),nl.events[ea].push({func:Aa,options:Ja}))}}function Q(Se,ea,Aa,rl){if(Se.addEventListener&&Se.removeEventListener){var Ja=Oe(p,function(Hr){return Hr.eventTarget===Se}),nl=p[Ja];if(nl&&nl.events)if(ea!=="all"){var kl=!1,ol=nl.events[ea];if(ol){if(Aa==="all"){for(var Dl=ol.length-1;Dl>=0;Dl--){var zl=ol[Dl];Q(Se,ea,zl.func,zl.options)}return}for(var Xl=Sn(rl),El=0;El<ol.length;El++){var Ul=ol[El];if(Ul.func===Aa&&In(Ul.options,Xl)){Se.removeEventListener(ea,Aa,L.supportsOptions?Xl:Xl.capture),ol.splice(El,1),ol.length===0&&(delete nl.events[ea],kl=!0);break}}}kl&&!Object.keys(nl.events).length&&p.splice(Ja,1)}else for(ea in nl.events)nl.events.hasOwnProperty(ea)&&Q(Se,ea,"all")}}function ge(Se,ea){for(var Aa=Sn(ea),rl=new ao(Se),Ja=b[Se.type],nl=ne(Se)[0],kl=nl;g.element(kl);){for(var ol=0;ol<Ja.length;ol++){var Dl=Ja[ol],zl=Dl.selector,Xl=Dl.context;if(ye(kl,zl)&&ce(Xl,nl)&&ce(Xl,kl)){var El=Dl.listeners;rl.currentTarget=kl;for(var Ul=0;Ul<El.length;Ul++){var Hr=El[Ul];In(Hr.options,Aa)&&Hr.func(rl)}}}kl=Ve(kl)}}function Fe(Se){return ge(Se,!0)}return(i=t.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return L.supportsOptions=!0},get passive(){return L.supportsPassive=!0}}),t.events=L,L}},an={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var i=0,p=an.methodOrder;i<p.length;i++){var b=p[i],_=an[b](t);if(_)return _}return null},simulationResume:function(t){var i=t.pointerType,p=t.eventType,b=t.eventTarget,_=t.scope;if(!/down|start/i.test(p))return null;for(var L=0,Y=_.interactions.list;L<Y.length;L++){var Q=Y[L],ge=b;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===i)for(;ge;){if(ge===Q.element)return Q;ge=Ve(ge)}}return null},mouseOrPen:function(t){var i,p=t.pointerId,b=t.pointerType,_=t.eventType,L=t.scope;if(b!=="mouse"&&b!=="pen")return null;for(var Y=0,Q=L.interactions.list;Y<Q.length;Y++){var ge=Q[Y];if(ge.pointerType===b){if(ge.simulation&&!On(ge,p))continue;if(ge.interacting())return ge;i||(i=ge)}}if(i)return i;for(var Fe=0,Se=L.interactions.list;Fe<Se.length;Fe++){var ea=Se[Fe];if(!(ea.pointerType!==b||/down/i.test(_)&&ea.simulation))return ea}return null},hasPointer:function(t){for(var i=t.pointerId,p=0,b=t.scope.interactions.list;p<b.length;p++){var _=b[p];if(On(_,i))return _}return null},idle:function(t){for(var i=t.pointerType,p=0,b=t.scope.interactions.list;p<b.length;p++){var _=b[p];if(_.pointers.length===1){var L=_.interactable;if(L&&(!L.options.gesture||!L.options.gesture.enabled))continue}else if(_.pointers.length>=2)continue;if(!_.interacting()&&i===_.pointerType)return _}return null}};function On(t,i){return t.pointers.some(function(p){return p.id===i})}var En=an,Gr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Un(t,i){return function(p){var b=i.interactions.list,_=Ae(p),L=ne(p),Y=L[0],Q=L[1],ge=[];if(/^touch/.test(p.type)){i.prevTouchTime=i.now();for(var Fe=0,Se=p.changedTouches;Fe<Se.length;Fe++){var ea=Se[Fe],Aa={pointer:ea,pointerId:se(ea),pointerType:_,eventType:p.type,eventTarget:Y,curEventTarget:Q,scope:i},rl=bn(Aa);ge.push([Aa.pointer,Aa.eventTarget,Aa.curEventTarget,rl])}}else{var Ja=!1;if(!ae.supportsPointerEvent&&/mouse/.test(p.type)){for(var nl=0;nl<b.length&&!Ja;nl++)Ja=b[nl].pointerType!=="mouse"&&b[nl].pointerIsDown;Ja=Ja||i.now()-i.prevTouchTime<500||p.timeStamp===0}if(!Ja){var kl={pointer:p,pointerId:se(p),pointerType:_,eventType:p.type,curEventTarget:Q,eventTarget:Y,scope:i},ol=bn(kl);ge.push([kl.pointer,kl.eventTarget,kl.curEventTarget,ol])}}for(var Dl=0;Dl<ge.length;Dl++){var zl=ge[Dl],Xl=zl[0],El=zl[1],Ul=zl[2];zl[3][t](Xl,p,El,Ul)}}}function bn(t){var i=t.pointerType,p=t.scope,b={interaction:En.search(t),searchDetails:t};return p.fire("interactions:find",b),b.interaction||p.interactions.new({pointerType:i})}function zo(t,i){var p=t.doc,b=t.scope,_=t.options,L=b.interactions.docEvents,Y=b.events,Q=Y[i];for(var ge in b.browser.isIOS&&!_.events&&(_.events={passive:!1}),Y.delegatedEvents)Q(p,ge,Y.delegateListener),Q(p,ge,Y.delegateUseCapture,!0);for(var Fe=_&&_.events,Se=0;Se<L.length;Se++){var ea=L[Se];Q(p,ea.type,ea.listener,Fe)}}var Vi={id:"core/interactions",install:function(t){for(var i={},p=0;p<Gr.length;p++){var b=Gr[p];i[b]=Un(b,t)}var _,L=ae.pEventTypes;function Y(){for(var Q=0,ge=t.interactions.list;Q<ge.length;Q++){var Fe=ge[Q];if(Fe.pointerIsDown&&Fe.pointerType==="touch"&&!Fe._interacting)for(var Se=function(){var rl=Aa[ea];t.documents.some(function(Ja){return ce(Ja.doc,rl.downTarget)})||Fe.removePointer(rl.pointer,rl.event)},ea=0,Aa=Fe.pointers;ea<Aa.length;ea++)Se()}}(_=Z.PointerEvent?[{type:L.down,listener:Y},{type:L.down,listener:i.pointerDown},{type:L.move,listener:i.pointerMove},{type:L.up,listener:i.pointerUp},{type:L.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:Y},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(Q){for(var ge=0,Fe=t.interactions.list;ge<Fe.length;ge++)Fe[ge].documentBlur(Q)}}),t.prevTouchTime=0,t.Interaction=function(Q){y(Fe,Q);var ge=j(Fe);function Fe(){return c(this,Fe),ge.apply(this,arguments)}return f(Fe,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(Se){t.interactions.pointerMoveTolerance=Se}},{key:"_now",value:function(){return t.now()}}]),Fe}(mr),t.interactions={list:[],new:function(Q){Q.scopeFire=function(Fe,Se){return t.fire(Fe,Se)};var ge=new t.Interaction(Q);return t.interactions.list.push(ge),ge},listeners:i,docEvents:_,pointerMoveTolerance:1},t.usePlugin(Or)},listeners:{"scope:add-document":function(t){return zo(t,"add")},"scope:remove-document":function(t){return zo(t,"remove")},"interactable:unset":function(t,i){for(var p=t.interactable,b=i.interactions.list.length-1;b>=0;b--){var _=i.interactions.list[b];_.interactable===p&&(_.stop(),i.fire("interactions:destroy",{interaction:_}),_.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(b,1))}}},onDocSignal:zo,doOnInteractions:Un,methodNames:Gr},Fi=Vi,Cn=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Cn||{}),Pi=function(){function t(i,p,b,_){c(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Mn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=p.actions,this.target=i,this._context=p.context||b,this._win=S(Ma(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=_,this.set(p)}return f(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,p){return g.func(p.onstart)&&this.on("".concat(i,"start"),p.onstart),g.func(p.onmove)&&this.on("".concat(i,"move"),p.onmove),g.func(p.onend)&&this.on("".concat(i,"end"),p.onend),g.func(p.oninertiastart)&&this.on("".concat(i,"inertiastart"),p.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,p,b){var _,L=this,Y=(_=this._actions.map[i])==null?void 0:_.filterEventType,Q=function(ge){return(Y==null||Y(ge))&&zr(ge,L._actions)};(g.array(p)||g.object(p))&&this._onOff(Cn.Off,i,p,void 0,Q),(g.array(b)||g.object(b))&&this._onOff(Cn.On,i,b,void 0,Q)}},{key:"setPerAction",value:function(i,p){var b=this._defaults;for(var _ in p){var L=_,Y=this.options[i],Q=p[L];L==="listeners"&&this.updatePerActionListeners(i,Y.listeners,Q),g.array(Q)?Y[L]=ra(Q):g.plainObject(Q)?(Y[L]=re(Y[L]||{},Cr(Q)),g.object(b.perAction[L])&&"enabled"in b.perAction[L]&&(Y[L].enabled=Q.enabled!==!1)):g.bool(Q)&&g.object(b.perAction[L])?Y[L].enabled=Q:Y[L]=Q}}},{key:"getRect",value:function(i){return i=i||(g.element(this.target)?this.target:null),g.string(this.target)&&(i=i||this._context.querySelector(this.target)),Ye(i)}},{key:"rectChecker",value:function(i){var p=this;return g.func(i)?(this.getRect=function(b){var _=re({},i.apply(p,b));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):i===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(i,p){if(Ma(p)||g.object(p)){for(var b in this.options[i]=p,this._actions.map)this.options[b][i]=p;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return g.string(i)?Array.from(this._context.querySelectorAll(i)):g.func(i)&&i.getAllElements?i.getAllElements():g.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||ce(this._context,i)}},{key:"testIgnoreAllow",value:function(i,p,b){return!this.testIgnore(i.ignoreFrom,p,b)&&this.testAllow(i.allowFrom,p,b)}},{key:"testAllow",value:function(i,p,b){return!i||!!g.element(b)&&(g.string(i)?le(b,i,p):!!g.element(i)&&ce(i,b))}},{key:"testIgnore",value:function(i,p,b){return!(!i||!g.element(b))&&(g.string(i)?le(b,i,p):!!g.element(i)&&ce(i,b))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,p,b,_,L){g.object(p)&&!g.array(p)&&(_=b,b=null);var Y=He(p,b,L);for(var Q in Y){Q==="wheel"&&(Q=ae.wheelEvent);for(var ge=0,Fe=Y[Q];ge<Fe.length;ge++){var Se=Fe[ge];zr(Q,this._actions)?this.events[i===Cn.On?"on":"off"](Q,Se):g.string(this.target)?this._scopeEvents[i===Cn.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,Se,_):this._scopeEvents[i===Cn.On?"add":"remove"](this.target,Q,Se,_)}}return this}},{key:"on",value:function(i,p,b){return this._onOff(Cn.On,i,p,b)}},{key:"off",value:function(i,p,b){return this._onOff(Cn.Off,i,p,b)}},{key:"set",value:function(i){var p=this._defaults;for(var b in g.object(i)||(i={}),this.options=Cr(p.base),this._actions.methodDict){var _=b,L=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,re(re({},p.perAction),p.actions[_])),this[L](i[_])}for(var Y in i)Y!=="getRect"?g.func(this[Y])&&this[Y](i[Y]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var p=this._scopeEvents.delegatedEvents[i],b=p.length-1;b>=0;b--){var _=p[b],L=_.selector,Y=_.context,Q=_.listeners;L===this.target&&Y===this._context&&p.splice(b,1);for(var ge=Q.length-1;ge>=0;ge--)this._scopeEvents.removeDelegate(this.target,this._context,i,Q[ge][0],Q[ge][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),ji=function(){function t(i){var p=this;c(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(b){var _=b.interactable,L=_.target,Y=g.string(L)?p.selectorMap[L]:L[p.scope.id],Q=Oe(Y,function(ge){return ge===_});Y.splice(Q,1)}})}return f(t,[{key:"new",value:function(i,p){p=re(p||{},{actions:this.scope.actions});var b=new this.scope.Interactable(i,p,this.scope.document,this.scope.events);return this.scope.addDocument(b._doc),this.list.push(b),g.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(b)):(b.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(b)),this.scope.fire("interactable:new",{target:i,options:p,interactable:b,win:this.scope._win}),b}},{key:"getExisting",value:function(i,p){var b=p&&p.context||this.scope.document,_=g.string(i),L=_?this.selectorMap[i]:i[this.scope.id];if(L)return za(L,function(Y){return Y._context===b&&(_||Y.inContext(i))})}},{key:"forEachMatch",value:function(i,p){for(var b=0,_=this.list;b<_.length;b++){var L=_[b],Y=void 0;if((g.string(L.target)?g.element(i)&&ye(i,L.target):i===L.target)&&L.inContext(i)&&(Y=p(L)),Y!==void 0)return Y}}}]),t}(),Jo=function(){function t(){var i=this;c(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ae,this.defaults=Cr(xn),this.Eventable=Mn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(b){var _=function L(Y,Q){var ge=b.interactables.getExisting(Y,Q);return ge||((ge=b.interactables.new(Y,Q)).events.global=L.globalEvents),ge};return _.getPointerAverage=ze,_.getTouchBBox=_a,_.getTouchDistance=We,_.getTouchAngle=x,_.getElementRect=Ye,_.getElementClientRect=be,_.matchesSelector=ye,_.closest=Ee,_.globalEvents={},_.version="1.10.27",_.scope=b,_.use=function(L,Y){return this.scope.usePlugin(L,Y),this},_.isSet=function(L,Y){return!!this.scope.interactables.get(L,Y&&Y.context)},_.on=aa(function(L,Y,Q){if(g.string(L)&&L.search(" ")!==-1&&(L=L.trim().split(/ +/)),g.array(L)){for(var ge=0,Fe=L;ge<Fe.length;ge++){var Se=Fe[ge];this.on(Se,Y,Q)}return this}if(g.object(L)){for(var ea in L)this.on(ea,L[ea],Y);return this}return zr(L,this.scope.actions)?this.globalEvents[L]?this.globalEvents[L].push(Y):this.globalEvents[L]=[Y]:this.scope.events.add(this.scope.document,L,Y,{options:Q}),this},"The interact.on() method is being deprecated"),_.off=aa(function(L,Y,Q){if(g.string(L)&&L.search(" ")!==-1&&(L=L.trim().split(/ +/)),g.array(L)){for(var ge=0,Fe=L;ge<Fe.length;ge++){var Se=Fe[ge];this.off(Se,Y,Q)}return this}if(g.object(L)){for(var ea in L)this.off(ea,L[ea],Y);return this}var Aa;return zr(L,this.scope.actions)?L in this.globalEvents&&(Aa=this.globalEvents[L].indexOf(Y))!==-1&&this.globalEvents[L].splice(Aa,1):this.scope.events.remove(this.scope.document,L,Y,Q),this},"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return ae.supportsTouch},_.supportsPointerEvent=function(){return ae.supportsPointerEvent},_.stop=function(){for(var L=0,Y=this.scope.interactions.list;L<Y.length;L++)Y[L].stop();return this},_.pointerMoveTolerance=function(L){return g.number(L)?(this.scope.interactions.pointerMoveTolerance=L,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(L,Y){this.scope.addDocument(L,Y)},_.removeDocument=function(L){this.scope.removeDocument(L)},_}(this),this.InteractEvent=Yr,this.Interactable=void 0,this.interactables=new ji(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(b){return i.removeDocument(b.target)};var p=this;this.Interactable=function(b){y(L,b);var _=j(L);function L(){return c(this,L),_.apply(this,arguments)}return f(L,[{key:"_defaults",get:function(){return p.defaults}},{key:"set",value:function(Y){return C(u(L.prototype),"set",this).call(this,Y),p.fire("interactable:set",{options:Y,interactable:this}),this}},{key:"unset",value:function(){C(u(L.prototype),"unset",this).call(this);var Y=p.interactables.list.indexOf(this);Y<0||(p.interactables.list.splice(Y,1),p.fire("interactable:unset",{interactable:this}))}}]),L}(Pi)}return f(t,[{key:"addListeners",value:function(i,p){this.listenerMaps.push({id:p,map:i})}},{key:"fire",value:function(i,p){for(var b=0,_=this.listenerMaps;b<_.length;b++){var L=_[b].map[i];if(L&&L(p,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(p,b){return p.isInitialized=!0,g.window(b)&&D(b),Z.init(b),ae.init(b),Me.init(b),p.window=b,p.document=b.document,p.usePlugin(Fi),p.usePlugin(Hn),p}(this,i)}},{key:"pluginIsInstalled",value:function(i){var p=i.id;return p?!!this._plugins.map[p]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,p){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,p),i.listeners&&i.before){for(var b=0,_=this.listenerMaps.length,L=i.before.reduce(function(Q,ge){return Q[ge]=!0,Q[Xo(ge)]=!0,Q},{});b<_;b++){var Y=this.listenerMaps[b].id;if(Y&&(L[Y]||L[Xo(Y)]))break}this.listenerMaps.splice(b,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,p){if(this.getDocIndex(i)!==-1)return!1;var b=S(i);p=p?re({},p):{},this.documents.push({doc:i,options:p}),this.events.documents.push(i),i!==this.document&&this.events.add(b,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:b,scope:this,options:p})}},{key:"removeDocument",value:function(i){var p=this.getDocIndex(i),b=S(i),_=this.documents[p].options;this.events.remove(b,"unload",this.onWindowUnload),this.documents.splice(p,1),this.events.documents.splice(p,1),this.fire("scope:remove-document",{doc:i,window:b,scope:this,options:_})}},{key:"getDocIndex",value:function(i){for(var p=0;p<this.documents.length;p++)if(this.documents[p].doc===i)return p;return-1}},{key:"getDocOptions",value:function(i){var p=this.getDocIndex(i);return p===-1?null:this.documents[p].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Xo(t){return t&&t.replace(/\/.*$/,"")}var Zo=new Jo,jr=Zo.interactStatic,Hi=typeof globalThis<"u"?globalThis:window;Zo.init(Hi);var Mo=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(b){var _=b[0],L=b[1];return _ in t||L in t}),p=function(b,_){for(var L=t.range,Y=t.limits,Q=Y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:Y,ge=t.offset,Fe=ge===void 0?{x:0,y:0}:ge,Se={range:L,grid:t,x:null,y:null},ea=0;ea<i.length;ea++){var Aa=i[ea],rl=Aa[0],Ja=Aa[1],nl=Math.round((b-Fe.x)/t[rl]),kl=Math.round((_-Fe.y)/t[Ja]);Se[rl]=Math.max(Q.left,Math.min(Q.right,nl*t[rl]+Fe.x)),Se[Ja]=Math.max(Q.top,Math.min(Q.bottom,kl*t[Ja]+Fe.y))}return Se};return p.grid=t,p.coordFields=i,p}}),Ui={id:"snappers",install:function(t){var i=t.interactStatic;i.snappers=re(i.snappers||{},Mo),i.createSnapGrid=i.snappers.grid}},Io=Ui,Qo={start:function(t){var i=t.state,p=t.rect,b=t.edges,_=t.pageCoords,L=i.options,Y=L.ratio,Q=L.enabled,ge=i.options,Fe=ge.equalDelta,Se=ge.modifiers;Y==="preserve"&&(Y=p.width/p.height),i.startCoords=re({},_),i.startRect=re({},p),i.ratio=Y,i.equalDelta=Fe;var ea=i.linkedEdges={top:b.top||b.left&&!b.bottom,left:b.left||b.top&&!b.right,bottom:b.bottom||b.right&&!b.top,right:b.right||b.bottom&&!b.left};if(i.xIsPrimaryAxis=!(!b.left&&!b.right),i.equalDelta){var Aa=(ea.left?1:-1)*(ea.top?1:-1);i.edgeSign={x:Aa,y:Aa}}else i.edgeSign={x:ea.left?-1:1,y:ea.top?-1:1};if(Q!==!1&&re(b,ea),Se!=null&&Se.length){var rl=new Mr(t.interaction);rl.copyFrom(t.interaction.modification),rl.prepareStates(Se),i.subModification=rl,rl.startAll(o({},t))}},set:function(t){var i=t.state,p=t.rect,b=t.coords,_=i.linkedEdges,L=re({},b),Y=i.equalDelta?ei:qi;if(re(t.edges,_),Y(i,i.xIsPrimaryAxis,b,p),!i.subModification)return null;var Q=re({},p);te(_,Q,{x:b.x-L.x,y:b.y-L.y});var ge=i.subModification.setAll(o(o({},t),{},{rect:Q,edges:_,pageCoords:b,prevCoords:b,prevRect:Q})),Fe=ge.delta;return ge.changed&&(Y(i,Math.abs(Fe.x)>Math.abs(Fe.y),ge.coords,ge.rect),re(b,ge.coords)),ge.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function ei(t,i,p){var b=t.startCoords,_=t.edgeSign;i?p.y=b.y+(p.x-b.x)*_.y:p.x=b.x+(p.y-b.y)*_.x}function qi(t,i,p,b){var _=t.startRect,L=t.startCoords,Y=t.ratio,Q=t.edgeSign;if(i){var ge=b.width/Y;p.y=L.y+(ge-_.height)*Q.y}else{var Fe=b.height*Y;p.x=L.x+(Fe-_.width)*Q.x}}var Wi=Nr(Qo,"aspectRatio"),ai=function(){};ai._defaults={};var Dn=ai;function Nn(t,i,p){return g.func(t)?Te(t,i.interactable,i.element,[p.x,p.y,i]):Te(t,i.interactable,i.element)}var qn={start:function(t){var i=t.rect,p=t.startOffset,b=t.state,_=t.interaction,L=t.pageCoords,Y=b.options,Q=Y.elementRect,ge=re({left:0,top:0,right:0,bottom:0},Y.offset||{});if(i&&Q){var Fe=Nn(Y.restriction,_,L);if(Fe){var Se=Fe.right-Fe.left-i.width,ea=Fe.bottom-Fe.top-i.height;Se<0&&(ge.left+=Se,ge.right+=Se),ea<0&&(ge.top+=ea,ge.bottom+=ea)}ge.left+=p.left-i.width*Q.left,ge.top+=p.top-i.height*Q.top,ge.right+=p.right-i.width*(1-Q.right),ge.bottom+=p.bottom-i.height*(1-Q.bottom)}b.offset=ge},set:function(t){var i=t.coords,p=t.interaction,b=t.state,_=b.options,L=b.offset,Y=Nn(_.restriction,p,i);if(Y){var Q=function(ge){return!ge||"left"in ge&&"top"in ge||((ge=re({},ge)).left=ge.x||0,ge.top=ge.y||0,ge.right=ge.right||ge.left+ge.width,ge.bottom=ge.bottom||ge.top+ge.height),ge}(Y);i.x=Math.max(Math.min(Q.right-L.right,i.x),Q.left+L.left),i.y=Math.max(Math.min(Q.bottom-L.bottom,i.y),Q.top+L.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ki=Nr(qn,"restrict"),li={top:1/0,left:1/0,bottom:-1/0,right:-1/0},ri={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function ni(t,i){for(var p=0,b=["top","left","bottom","right"];p<b.length;p++){var _=b[p];_ in t||(t[_]=i[_])}return t}var Wn={noInner:li,noOuter:ri,start:function(t){var i,p=t.interaction,b=t.startOffset,_=t.state,L=_.options;L&&(i=qe(Nn(L.offset,p,p.coords.start.page))),i=i||{x:0,y:0},_.offset={top:i.y+b.top,left:i.x+b.left,bottom:i.y-b.bottom,right:i.x-b.right}},set:function(t){var i=t.coords,p=t.edges,b=t.interaction,_=t.state,L=_.offset,Y=_.options;if(p){var Q=re({},i),ge=Nn(Y.inner,b,Q)||{},Fe=Nn(Y.outer,b,Q)||{};ni(ge,li),ni(Fe,ri),p.top?i.y=Math.min(Math.max(Fe.top+L.top,Q.y),ge.top+L.top):p.bottom&&(i.y=Math.max(Math.min(Fe.bottom+L.bottom,Q.y),ge.bottom+L.bottom)),p.left?i.x=Math.min(Math.max(Fe.left+L.left,Q.x),ge.left+L.left):p.right&&(i.x=Math.max(Math.min(Fe.right+L.right,Q.x),ge.right+L.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},lo=Nr(Wn,"restrictEdges"),oi=re({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},qn.defaults),ii=Nr({start:qn.start,set:qn.set,defaults:oi},"restrictRect"),ro={width:-1/0,height:-1/0},Gi={width:1/0,height:1/0},ti=Nr({start:function(t){return Wn.start(t)},set:function(t){var i=t.interaction,p=t.state,b=t.rect,_=t.edges,L=p.options;if(_){var Y=Re(Nn(L.min,i,t.coords))||ro,Q=Re(Nn(L.max,i,t.coords))||Gi;p.options={endOnly:L.endOnly,inner:re({},Wn.noInner),outer:re({},Wn.noOuter)},_.top?(p.options.inner.top=b.bottom-Y.height,p.options.outer.top=b.bottom-Q.height):_.bottom&&(p.options.inner.bottom=b.top+Y.height,p.options.outer.bottom=b.top+Q.height),_.left?(p.options.inner.left=b.right-Y.width,p.options.outer.left=b.right-Q.width):_.right&&(p.options.inner.right=b.left+Y.width,p.options.outer.right=b.left+Q.width),Wn.set(t),p.options=L}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ln={start:function(t){var i,p=t.interaction,b=t.interactable,_=t.element,L=t.rect,Y=t.state,Q=t.startOffset,ge=Y.options,Fe=ge.offsetWithOrigin?function(Aa){var rl=Aa.interaction.element,Ja=qe(Te(Aa.state.options.origin,null,null,[rl])),nl=Ja||Le(Aa.interactable,rl,Aa.interaction.prepared.name);return nl}(t):{x:0,y:0};if(ge.offset==="startCoords")i={x:p.coords.start.page.x,y:p.coords.start.page.y};else{var Se=Te(ge.offset,b,_,[p]);(i=qe(Se)||{x:0,y:0}).x+=Fe.x,i.y+=Fe.y}var ea=ge.relativePoints;Y.offsets=L&&ea&&ea.length?ea.map(function(Aa,rl){return{index:rl,relativePoint:Aa,x:Q.left-L.width*Aa.x+i.x,y:Q.top-L.height*Aa.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(t){var i=t.interaction,p=t.coords,b=t.state,_=b.options,L=b.offsets,Y=Le(i.interactable,i.element,i.prepared.name),Q=re({},p),ge=[];_.offsetWithOrigin||(Q.x-=Y.x,Q.y-=Y.y);for(var Fe=0,Se=L;Fe<Se.length;Fe++)for(var ea=Se[Fe],Aa=Q.x-ea.x,rl=Q.y-ea.y,Ja=0,nl=_.targets.length;Ja<nl;Ja++){var kl=_.targets[Ja],ol=void 0;(ol=g.func(kl)?kl(Aa,rl,i._proxy,ea,Ja):kl)&&ge.push({x:(g.number(ol.x)?ol.x:Aa)+ea.x,y:(g.number(ol.y)?ol.y:rl)+ea.y,range:g.number(ol.range)?ol.range:_.range,source:kl,index:Ja,offset:ea})}for(var Dl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},zl=0;zl<ge.length;zl++){var Xl=ge[zl],El=Xl.range,Ul=Xl.x-Q.x,Hr=Xl.y-Q.y,_r=Ia(Ul,Hr),Jr=_r<=El;El===1/0&&Dl.inRange&&Dl.range!==1/0&&(Jr=!1),Dl.target&&!(Jr?Dl.inRange&&El!==1/0?_r/El<Dl.distance/Dl.range:El===1/0&&Dl.range!==1/0||_r<Dl.distance:!Dl.inRange&&_r<Dl.distance)||(Dl.target=Xl,Dl.distance=_r,Dl.range=El,Dl.inRange=Jr,Dl.delta.x=Ul,Dl.delta.y=Hr)}return Dl.inRange&&(p.x=Dl.target.x,p.y=Dl.target.y),b.closest=Dl,Dl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Yi=Nr(Ln,"snap"),fo={start:function(t){var i=t.state,p=t.edges,b=i.options;if(!p)return null;t.state={options:{targets:null,relativePoints:[{x:p.left?0:1,y:p.top?0:1}],offset:b.offset||"self",origin:{x:0,y:0},range:b.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],Ln.start(t),i.offsets=t.state.offsets,t.state=i},set:function(t){var i=t.interaction,p=t.state,b=t.coords,_=p.options,L=p.offsets,Y={x:b.x-L[0].x,y:b.y-L[0].y};p.options=re({},_),p.options.targets=[];for(var Q=0,ge=_.targets||[];Q<ge.length;Q++){var Fe=ge[Q],Se=void 0;if(Se=g.func(Fe)?Fe(Y.x,Y.y,i):Fe){for(var ea=0,Aa=p.targetFields;ea<Aa.length;ea++){var rl=Aa[ea],Ja=rl[0],nl=rl[1];if(Ja in Se||nl in Se){Se.x=Se[Ja],Se.y=Se[nl];break}}p.options.targets.push(Se)}}var kl=Ln.set(t);return p.options=_,kl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ji=Nr(fo,"snapSize"),Oo={aspectRatio:Wi,restrictEdges:lo,restrict:Ki,restrictRect:ii,restrictSize:ti,snapEdges:Nr({start:function(t){var i=t.edges;return i?(t.state.targetFields=t.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],fo.start(t)):null},set:fo.set,defaults:re(Cr(fo.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Yi,snapSize:Ji,spring:Dn,avoid:Dn,transform:Dn,rubberband:Dn},Xi={id:"modifiers",install:function(t){var i=t.interactStatic;for(var p in t.usePlugin(cr),t.usePlugin(Io),i.modifiers=Oo,Oo){var b=Oo[p],_=b._defaults,L=b._methods;_._methods=L,t.defaults.perAction[p]=_}}},Zi=Xi,si=function(t){y(p,t);var i=j(p);function p(b,_,L,Y,Q,ge){var Fe;if(c(this,p),P(N(Fe=i.call(this,Q)),L),L!==_&&P(N(Fe),_),Fe.timeStamp=ge,Fe.originalEvent=L,Fe.type=b,Fe.pointerId=se(_),Fe.pointerType=Ae(_),Fe.target=Y,Fe.currentTarget=null,b==="tap"){var Se=Q.getPointerIndex(_);Fe.dt=Fe.timeStamp-Q.pointers[Se].downTime;var ea=Fe.timeStamp-Q.tapTime;Fe.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===Fe.target&&ea<500}else b==="doubletap"&&(Fe.dt=_.timeStamp-Q.tapTime,Fe.double=!0);return Fe}return f(p,[{key:"_subtractOrigin",value:function(b){var _=b.x,L=b.y;return this.pageX-=_,this.pageY-=L,this.clientX-=_,this.clientY-=L,this}},{key:"_addOrigin",value:function(b){var _=b.x,L=b.y;return this.pageX+=_,this.pageY+=L,this.clientX+=_,this.clientY+=L,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),p}(Ue),Kn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Kn,t.defaults.actions.pointerEvents=Kn.defaults,re(t.actions.phaselessTypes,Kn.types)},listeners:{"interactions:new":function(t){var i=t.interaction;i.prevTap=null,i.tapTime=0},"interactions:update-pointer":function(t){var i=t.down,p=t.pointerInfo;!i&&p.hold||(p.hold={duration:1/0,timeout:null})},"interactions:move":function(t,i){var p=t.interaction,b=t.pointer,_=t.event,L=t.eventTarget;t.duplicate||p.pointerIsDown&&!p.pointerWasMoved||(p.pointerIsDown&&Lo(t),Bn({interaction:p,pointer:b,event:_,eventTarget:L,type:"move"},i))},"interactions:down":function(t,i){(function(p,b){for(var _=p.interaction,L=p.pointer,Y=p.event,Q=p.eventTarget,ge=p.pointerIndex,Fe=_.pointers[ge].hold,Se=da(Q),ea={interaction:_,pointer:L,event:Y,eventTarget:Q,type:"hold",targets:[],path:Se,node:null},Aa=0;Aa<Se.length;Aa++){var rl=Se[Aa];ea.node=rl,b.fire("pointerEvents:collect-targets",ea)}if(ea.targets.length){for(var Ja=1/0,nl=0,kl=ea.targets;nl<kl.length;nl++){var ol=kl[nl].eventable.options.holdDuration;ol<Ja&&(Ja=ol)}Fe.duration=Ja,Fe.timeout=setTimeout(function(){Bn({interaction:_,eventTarget:Q,pointer:L,event:Y,type:"hold"},b)},Ja)}})(t,i),Bn(t,i)},"interactions:up":function(t,i){Lo(t),Bn(t,i),function(p,b){var _=p.interaction,L=p.pointer,Y=p.event,Q=p.eventTarget;_.pointerWasMoved||Bn({interaction:_,eventTarget:Q,pointer:L,event:Y,type:"tap"},b)}(t,i)},"interactions:cancel":function(t,i){Lo(t),Bn(t,i)}},PointerEvent:si,fire:Bn,collectEventTargets:ci,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Bn(t,i){var p=t.interaction,b=t.pointer,_=t.event,L=t.eventTarget,Y=t.type,Q=t.targets,ge=Q===void 0?ci(t,i):Q,Fe=new si(Y,b,_,L,p,i.now());i.fire("pointerEvents:new",{pointerEvent:Fe});for(var Se={interaction:p,pointer:b,event:_,eventTarget:L,targets:ge,type:Y,pointerEvent:Fe},ea=0;ea<ge.length;ea++){var Aa=ge[ea];for(var rl in Aa.props||{})Fe[rl]=Aa.props[rl];var Ja=Le(Aa.eventable,Aa.node);if(Fe._subtractOrigin(Ja),Fe.eventable=Aa.eventable,Fe.currentTarget=Aa.node,Aa.eventable.fire(Fe),Fe._addOrigin(Ja),Fe.immediatePropagationStopped||Fe.propagationStopped&&ea+1<ge.length&&ge[ea+1].node!==Fe.currentTarget)break}if(i.fire("pointerEvents:fired",Se),Y==="tap"){var nl=Fe.double?Bn({interaction:p,pointer:b,event:_,eventTarget:L,type:"doubletap"},i):Fe;p.prevTap=nl,p.tapTime=nl.timeStamp}return Fe}function ci(t,i){var p=t.interaction,b=t.pointer,_=t.event,L=t.eventTarget,Y=t.type,Q=p.getPointerIndex(b),ge=p.pointers[Q];if(Y==="tap"&&(p.pointerWasMoved||!ge||ge.downTarget!==L))return[];for(var Fe=da(L),Se={interaction:p,pointer:b,event:_,eventTarget:L,type:Y,path:Fe,targets:[],node:null},ea=0;ea<Fe.length;ea++){var Aa=Fe[ea];Se.node=Aa,i.fire("pointerEvents:collect-targets",Se)}return Y==="hold"&&(Se.targets=Se.targets.filter(function(rl){var Ja,nl;return rl.eventable.options.holdDuration===((Ja=p.pointers[Q])==null||(nl=Ja.hold)==null?void 0:nl.duration)})),Se.targets}function Lo(t){var i=t.interaction,p=t.pointerIndex,b=i.pointers[p].hold;b&&b.timeout&&(clearTimeout(b.timeout),b.timeout=null)}var Qi=Object.freeze({__proto__:null,default:Kn});function ho(t){var i=t.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var et={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Kn);var i=t.pointerEvents;i.defaults.holdRepeatInterval=0,i.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,i){return t["pointerEvents:".concat(i)]=ho,t},{"pointerEvents:new":function(t){var i=t.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(t,i){var p=t.interaction,b=t.pointerEvent,_=t.eventTarget,L=t.targets;if(b.type==="hold"&&L.length){var Y=L[0].eventable.options.holdRepeatInterval;Y<=0||(p.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:p,eventTarget:_,type:"hold",pointer:b,event:b},i)},Y))}}})},at=et,lt={id:"pointer-events/interactableTargets",install:function(t){var i=t.Interactable;i.prototype.pointerEvents=function(b){return re(this.events.options,b),this};var p=i.prototype._backCompatOption;i.prototype._backCompatOption=function(b,_){var L=p.call(this,b,_);return L===this&&(this.events.options[b]=_),L}},listeners:{"pointerEvents:collect-targets":function(t,i){var p=t.targets,b=t.node,_=t.type,L=t.eventTarget;i.interactables.forEachMatch(b,function(Y){var Q=Y.events,ge=Q.options;Q.types[_]&&Q.types[_].length&&Y.testIgnoreAllow(ge,b,L)&&p.push({node:b,eventable:Q,props:{interactable:Y}})})},"interactable:new":function(t){var i=t.interactable;i.events.getRect=function(p){return i.getRect(p)}},"interactable:set":function(t,i){var p=t.interactable,b=t.options;re(p.events.options,i.pointerEvents.defaults),re(p.events.options,b.pointerEvents||{})}}},rt=lt,ui={id:"pointer-events",install:function(t){t.usePlugin(Qi),t.usePlugin(at),t.usePlugin(rt)}},vo=ui,nt={id:"reflow",install:function(t){var i=t.Interactable;t.actions.phases.reflow=!0,i.prototype.reflow=function(p){return function(b,_,L){for(var Y=b.getAllElements(),Q=L.window.Promise,ge=Q?[]:null,Fe=function(){var ea=Y[Se],Aa=b.getRect(ea);if(!Aa)return 1;var rl,Ja=za(L.interactions.list,function(ol){return ol.interacting()&&ol.interactable===b&&ol.element===ea&&ol.prepared.name===_.name});if(Ja)Ja.move(),ge&&(rl=Ja._reflowPromise||new Q(function(ol){Ja._reflowResolve=ol}));else{var nl=Re(Aa),kl=function(ol){return{coords:ol,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:nl.x,y:nl.y},client:{x:nl.x,y:nl.y},timeStamp:L.now()});rl=function(ol,Dl,zl,Xl,El){var Ul=ol.interactions.new({pointerType:"reflow"}),Hr={interaction:Ul,event:El,pointer:El,eventTarget:zl,phase:"reflow"};Ul.interactable=Dl,Ul.element=zl,Ul.prevEvent=El,Ul.updatePointer(El,El,zl,!0),fe(Ul.coords.delta),Qe(Ul.prepared,Xl),Ul._doPhase(Hr);var _r=ol.window,Jr=_r.Promise,tn=Jr?new Jr(function(fn){Ul._reflowResolve=fn}):void 0;return Ul._reflowPromise=tn,Ul.start(Xl,Dl,zl),Ul._interacting?(Ul.move(Hr),Ul.end(El)):(Ul.stop(),Ul._reflowResolve()),Ul.removePointer(El,El),tn}(L,b,ea,_,kl)}ge&&ge.push(rl)},Se=0;Se<Y.length&&!Fe();Se++);return ge&&Q.all(ge).then(function(){return b})}(this,p,t)}},listeners:{"interactions:stop":function(t,i){var p=t.interaction;p.pointerType==="reflow"&&(p._reflowResolve&&p._reflowResolve(),function(b,_){b.splice(b.indexOf(_),1)}(i.interactions.list,p))}}},ot=nt;if(jr.use(Or),jr.use(yr),jr.use(vo),jr.use(on),jr.use(Zi),jr.use(Ml),jr.use(al),jr.use(X),jr.use(ot),jr.default=jr,s(l)==="object"&&l)try{l.exports=jr}catch{}return jr.default=jr,jr})}(Po,Po.exports)),Po.exports}var f1=p1();const Ms=Pn.getDefaultExportFromCjs(f1),Li=a.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(l,{expose:r,emit:n}){const o=l,s=n,c=a.inject(Hc),m=a.inject(Uc);if(!c)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const f=a.shallowRef(null),h=a.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let y=!1,u=!1,w=NaN,N=NaN,j=NaN,C=NaN,W=-1,O=-1,U=-1,H=-1,D=o.x,S=o.y,E=o.w,k=o.h;const g=a.ref(),M=a.reactive({i:a.toRef(o,"i"),state:h,wrapper:g,calcXY:Te});function R(ve){He(ve)}function G(){Ba()}function ue(ve){un(o.isDraggable)&&(h.draggable=ve)}function Be(ve){un(o.isResizable)&&(h.resizable=ve)}function de(ve){un(o.isBounded)&&(h.bounded=ve)}function Z(ve){h.transformScale=ve}function pe(ve){h.rowHeight=ve}function ae(ve){h.maxRows=ve}function ce(){h.rtl=As()==="rtl",Ba()}function Ee(ve){h.cols=Math.floor(ve)}c.increaseItem(M),a.onBeforeMount(()=>{h.rtl=As()==="rtl"}),a.onMounted(()=>{c.responsive&&c.lastBreakpoint?h.cols=Yc(c.lastBreakpoint,c.cols):h.cols=c.colNum,h.rowHeight=c.rowHeight,h.containerWidth=c.width!==null?c.width:100,h.margin=c.margin!==void 0?c.margin.map(Number):[10,10],h.maxRows=c.maxRows,un(o.isDraggable)?h.draggable=c.isDraggable:h.draggable=o.isDraggable,un(o.isResizable)?h.resizable=c.isResizable:h.resizable=o.isResizable,un(o.isBounded)?h.bounded=c.isBounded:h.bounded=o.isBounded,h.transformScale=c.transformScale,h.useCssTransforms=c.useCssTransforms,h.useStyleCursor=c.useStyleCursor,a.watchEffect(()=>{D=o.x,S=o.y,k=o.h,E=o.w,Xr(Ye)}),m.on("updateWidth",R),m.on("compact",G),m.on("setDraggable",ue),m.on("setResizable",Be),m.on("setBounded",de),m.on("setTransformScale",Z),m.on("setRowHeight",pe),m.on("setMaxRows",ae),m.on("directionchange",ce),m.on("setColNum",Ee)}),a.onBeforeUnmount(()=>{m.off("updateWidth",R),m.off("compact",G),m.off("setDraggable",ue),m.off("setResizable",Be),m.off("setBounded",de),m.off("setTransformScale",Z),m.off("setRowHeight",pe),m.off("setMaxRows",ae),m.off("directionchange",ce),m.off("setColNum",Ee),f.value&&(f.value.unset(),f.value=null),c.decreaseItem(M)}),r({state:h,wrapper:g});const Ve=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ye=a.computed(()=>h.resizable&&!o.static),z=a.computed(()=>c.isMirrored?!h.rtl:h.rtl),q=a.computed(()=>(h.draggable||h.resizable)&&!o.static),le=r1("item"),De=a.computed(()=>({[le.b()]:!0,[le.bm("resizable")]:ye.value,[le.bm("static")]:o.static,[le.bm("resizing")]:h.isResizing,[le.bm("dragging")]:h.isDragging,[le.bm("transform")]:h.useCssTransforms,[le.bm("rtl")]:z.value,[le.bm("no-touch")]:Ve&&q.value})),be=a.computed(()=>[le.be("resizer"),z.value&&le.bem("resizer","rtl")].filter(Boolean));a.watch(()=>o.isDraggable,ve=>{h.draggable=ve}),a.watch(()=>o.static,()=>{Xr(P),Xr(fe)}),a.watch(()=>h.draggable,()=>{Xr(P)}),a.watch(()=>o.isResizable,ve=>{h.resizable=ve}),a.watch(()=>o.isBounded,ve=>{h.bounded=ve}),a.watch(()=>h.resizable,()=>{Xr(fe)}),a.watch(()=>h.rowHeight,()=>{Xr(Ye),Xr(da)}),a.watch([()=>h.cols,()=>h.containerWidth],()=>{Xr(fe),Xr(Ye),Xr(da)}),a.watch([()=>o.minH,()=>o.maxH,()=>o.minW,()=>o.maxW],()=>{Xr(fe)}),a.watch(z,()=>{Xr(fe),Xr(Ye)}),a.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const ve=c.margin;!ve||ve[0]===h.margin[0]&&ve[1]===h.margin[1]||(h.margin=ve.map(Number),Xr(Ye),Xr(da))});function Ye(){o.x+o.w>h.cols?(D=0,E=o.w>h.cols?h.cols:o.w):(D=o.x,E=o.w);const ve=Ne(D,S,E,k);h.isDragging&&(ve.top=h.dragging.top,z.value?ve.right=h.dragging.left:ve.left=h.dragging.left),h.isResizing&&(ve.width=h.resizing.width,ve.height=h.resizing.height);let ha;h.useCssTransforms?z.value?ha=Q6(ve.top,ve.right,ve.width,ve.height):ha=Z6(ve.top,ve.left,ve.width,ve.height):z.value?ha=a1(ve.top,ve.right,ve.width,ve.height):ha=e1(ve.top,ve.left,ve.width,ve.height),h.style=ha}function da(){const ve={};for(const ha of["width","height"]){const Ze=h.style[ha].match(/^(\d+)px$/);if(!Ze)return;ve[ha]=Ze[1]}s("container-resized",o.i,o.h,o.w,ve.height,ve.width)}function Ma(ve){if(o.static)return;const ha=ve.type;if(ha==="resizestart"&&h.isResizing||ha!=="resizestart"&&!h.isResizing)return;const Ze=Bs(ve);if(un(Ze))return;const{x:se,y:we}=Ze,ya={width:0,height:0};let ze;switch(ha){case"resizestart":{fe(),W=E,O=k,ze=Ne(D,S,E,k),ya.width=ze.width,ya.height=ze.height,h.resizing=ya,h.isResizing=!0;break}case"resizemove":{!ve.edges.right&&!ve.edges.left&&(j=se),!ve.edges.top&&!ve.edges.bottom&&(C=we);const _a=Ts(j,C,se,we);z.value?ya.width=h.resizing.width-_a.deltaX/h.transformScale:ya.width=h.resizing.width+_a.deltaX/h.transformScale,ya.height=h.resizing.height+_a.deltaY/h.transformScale,h.resizing=ya;break}case"resizeend":{ze=Ne(D,S,E,k),ya.width=ze.width,ya.height=ze.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}ze=Le(ya.height,ya.width),ze.w<o.minW&&(ze.w=o.minW),ze.w>o.maxW&&(ze.w=o.maxW),ze.h<o.minH&&(ze.h=o.minH),ze.h>o.maxH&&(ze.h=o.maxH),ze.h<1&&(ze.h=1),ze.w<1&&(ze.w=1),j=se,C=we,(E!==ze.w||k!==ze.h)&&s("resize",o.i,ze.h,ze.w,ya.height,ya.width),ve.type==="resizeend"&&(W!==E||O!==k)&&s("resized",o.i,ze.h,ze.w,ya.height,ya.width),m.emit("resizeEvent",ve.type,o.i,D,S,ze.h,ze.w)}function re(ve){if(o.static||h.isResizing)return;const ha=ve.type;if(ha==="dragstart"&&h.isDragging||ha!=="dragstart"&&!h.isDragging)return;const Ze=Bs(ve);if(un(Ze))return;const{x:se,y:we}=Ze,ya=ve.target;if(!ya.offsetParent)return;const ze={top:0,left:0};switch(ha){case"dragstart":{U=D,H=S;const We=ya.offsetParent.getBoundingClientRect(),x=ya.getBoundingClientRect(),Ae=x.left/h.transformScale,ne=We.left/h.transformScale,Ue=x.right/h.transformScale,Je=We.right/h.transformScale,ra=x.top/h.transformScale,Oe=We.top/h.transformScale;z.value?ze.left=(Ue-Je)*-1:ze.left=Ae-ne,ze.top=ra-Oe,h.dragging=ze,h.isDragging=!0;break}case"dragmove":{const We=Ts(w,N,se,we);if(z.value?ze.left=h.dragging.left-We.deltaX/h.transformScale:ze.left=h.dragging.left+We.deltaX/h.transformScale,ze.top=h.dragging.top+We.deltaY/h.transformScale,h.bounded){const x=ya.offsetParent.clientHeight-Re(o.h,h.rowHeight,h.margin[1]);ze.top=te(ze.top,0,x);const Ae=qe(),ne=h.containerWidth-Re(o.w,Ae,h.margin[0]);ze.left=te(ze.left,0,ne)}h.dragging=ze;break}case"dragend":{const We=ya.offsetParent.getBoundingClientRect(),x=ya.getBoundingClientRect(),Ae=x.left/h.transformScale,ne=We.left/h.transformScale,Ue=x.right/h.transformScale,Je=We.right/h.transformScale,ra=x.top/h.transformScale,Oe=We.top/h.transformScale;z.value?ze.left=(Ue-Je)*-1:ze.left=Ae-ne,ze.top=ra-Oe,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let _a;z.value,_a=Te(ze.top,ze.left),w=se,N=we,(D!==_a.x||S!==_a.y)&&s("move",o.i,_a.x,_a.y),ve.type==="dragend"&&(U!==D||H!==S)&&s("moved",o.i,_a.x,_a.y),m.emit("dragEvent",ve.type,o.i,_a.x,_a.y,k,E)}function Ne(ve,ha,Ze,se){const we=qe();let ya;return z.value?ya={right:Math.round(we*ve+(ve+1)*h.margin[0]),top:Math.round(h.rowHeight*ha+(ha+1)*h.margin[1]),width:Ze===1/0?Ze:Math.round(we*Ze+Math.max(0,Ze-1)*h.margin[0]),height:se===1/0?se:Math.round(h.rowHeight*se+Math.max(0,se-1)*h.margin[1])}:ya={left:Math.round(we*ve+(ve+1)*h.margin[0]),top:Math.round(h.rowHeight*ha+(ha+1)*h.margin[1]),width:Ze===1/0?Ze:Math.round(we*Ze+Math.max(0,Ze-1)*h.margin[0]),height:se===1/0?se:Math.round(h.rowHeight*se+Math.max(0,se-1)*h.margin[1])},ya}function Te(ve,ha){const Ze=qe();let se=Math.round((ha-h.margin[0])/(Ze+h.margin[0])),we=Math.round((ve-h.margin[1])/(h.rowHeight+h.margin[1]));return se=Math.max(Math.min(se,h.cols-E),0),we=Math.max(Math.min(we,h.maxRows-k),0),{x:se,y:we}}function qe(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function Re(ve,ha,Ze){return Number.isFinite(ve)?Math.round(ha*ve+Math.max(0,ve-1)*Ze):ve}function te(ve,ha,Ze){return Math.max(Math.min(ve,Ze),ha)}function Le(ve,ha,Ze=!1){const se=qe();let we=Math.round((ha+h.margin[0])/(se+h.margin[0])),ya=0;return Ze?ya=Math.ceil((ve+h.margin[1])/(h.rowHeight+h.margin[1])):ya=Math.round((ve+h.margin[1])/(h.rowHeight+h.margin[1])),we=Math.max(Math.min(we,h.cols-D),0),ya=Math.max(Math.min(ya,h.maxRows-S),0),{w:we,h:ya}}function He(ve,ha){h.containerWidth=ve}function Ba(){Ye()}function Ia(){!f.value&&g.value&&(f.value=Ms(g.value),h.useStyleCursor||f.value.styleCursor(!1))}const V=Cs(re);function P(){if(Ia(),!!f.value)if(h.draggable&&!o.static){const ve={ignoreFrom:o.dragIgnoreFrom,allowFrom:o.dragAllowFrom,...o.dragOption};f.value.draggable(ve),y||(y=!0,f.value.on("dragstart dragmove dragend",ha=>{ha.type==="dragmove"?V(ha):re(ha)}))}else f.value.draggable({enabled:!1})}const ee=Cs(Ma);function fe(){if(Ia(),!!f.value)if(h.resizable&&!o.static){const ve=Ne(0,0,o.maxW,o.maxH),ha=Ne(0,0,o.minW,o.minH),Ze={edges:{left:z.value?`.${be.value[0]}`:!1,right:z.value?!1:`.${be.value[0]}`,bottom:`.${be.value[0]}`,top:!1},ignoreFrom:o.resizeIgnoreFrom,restrictSize:{min:{height:ha.height*h.transformScale,width:ha.width*h.transformScale},max:{height:ve.height*h.transformScale,width:ve.width*h.transformScale}},...o.resizeOption};o.preserveAspectRatio&&(Ze.modifiers=[Ms.modifiers.aspectRatio({ratio:"preserve"})]),f.value.resizable(Ze),u||(u=!0,f.value.on("resizestart resizemove resizeend",se=>{se.type==="resizemove"?ee(se):Ma(se)}))}else f.value.resizable({enabled:!1})}return(ve,ha)=>(a.openBlock(),a.createElementBlock("section",{ref_key:"wrapper",ref:g,class:a.normalizeClass(De.value),style:a.normalizeStyle(h.style)},[a.renderSlot(ve.$slots,"default"),ye.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(be.value)},null,2)):a.createCommentVNode("",!0)],6))}}),po=typeof window<"u";var Is;po&&(Is=window==null?void 0:window.navigator)!=null&&Is.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Os(l){return l!=null}function Ls(){}const h1=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(h1)));const v1=po&&("ontouchstart"in window||y1()>0),m1=v1?"pointerdown":"click";function y1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function g1(l,r,n=window.Event){const{type:o,bubbles:s=!1,cancelable:c=!1,...m}=r;if(!Os(o)||o==="")return!1;let f;return Os(n)?f=new n(o,{bubbles:s,cancelable:c}):(f=document.createEvent("HTMLEvents"),f.initEvent(o,s,c)),Object.assign(f,m),l.dispatchEvent(f)}const b1="clickoutside",k1=new Set;po&&document.addEventListener(m1,l=>{const r=l.target,n=l.composedPath&&l.composedPath();k1.forEach(o=>{o!==r&&(n?!n.includes(o):!o.contains(r))&&(!o.__transferElement||o.__transferElement!==r&&!o.__transferElement.contains(r))&&g1(o,{type:b1})})},!0);const x1=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Si;if(po){for(const l of x1)if(l[1]in document){Si=l;break}}a.computed(()=>!1);const w1=new Set,_1=new WeakMap;if(po&&Si){const l=Si[2],r=Si[4];document.addEventListener(r,()=>{if(w1.forEach(n=>{n.value=!1}),document[l]){const n=_1.get(document[l]);n&&(n.value=!0)}},!1)}const Xc=new Map;Xc.set("x",0);Xc.set("y",0);var co=[],S1=function(){return co.some(function(l){return l.activeTargets.length>0})},E1=function(){return co.some(function(l){return l.skippedTargets.length>0})},$s="ResizeObserver loop completed with undelivered notifications.",C1=function(){var l;typeof ErrorEvent=="function"?l=new ErrorEvent("error",{message:$s}):(l=document.createEvent("Event"),l.initEvent("error",!1,!1),l.message=$s),window.dispatchEvent(l)},Yo;(function(l){l.BORDER_BOX="border-box",l.CONTENT_BOX="content-box",l.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Yo||(Yo={}));var uo=function(l){return Object.freeze(l)},D1=function(){function l(r,n){this.inlineSize=r,this.blockSize=n,uo(this)}return l}(),Zc=function(){function l(r,n,o,s){return this.x=r,this.y=n,this.width=o,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,uo(this)}return l.prototype.toJSON=function(){var r=this,n=r.x,o=r.y,s=r.top,c=r.right,m=r.bottom,f=r.left,h=r.width,y=r.height;return{x:n,y:o,top:s,right:c,bottom:m,left:f,width:h,height:y}},l.fromRect=function(r){return new l(r.x,r.y,r.width,r.height)},l}(),zt=function(l){return l instanceof SVGElement&&"getBBox"in l},Qc=function(l){if(zt(l)){var r=l.getBBox(),n=r.width,o=r.height;return!n&&!o}var s=l,c=s.offsetWidth,m=s.offsetHeight;return!(c||m||l.getClientRects().length)},Rs=function(l){var r;if(l instanceof Element)return!0;var n=(r=l==null?void 0:l.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(n&&l instanceof n.Element)},N1=function(l){switch(l.tagName){case"INPUT":if(l.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Wo=typeof window<"u"?window:{},ki=new WeakMap,Vs=/auto|scroll/,B1=/^tb|vertical/,T1=/msie|trident/i.test(Wo.navigator&&Wo.navigator.userAgent),An=function(l){return parseFloat(l||"0")},No=function(l,r,n){return l===void 0&&(l=0),r===void 0&&(r=0),n===void 0&&(n=!1),new D1((n?r:l)||0,(n?l:r)||0)},Fs=uo({devicePixelContentBoxSize:No(),borderBoxSize:No(),contentBoxSize:No(),contentRect:new Zc(0,0,0,0)}),eu=function(l,r){if(r===void 0&&(r=!1),ki.has(l)&&!r)return ki.get(l);if(Qc(l))return ki.set(l,Fs),Fs;var n=getComputedStyle(l),o=zt(l)&&l.ownerSVGElement&&l.getBBox(),s=!T1&&n.boxSizing==="border-box",c=B1.test(n.writingMode||""),m=!o&&Vs.test(n.overflowY||""),f=!o&&Vs.test(n.overflowX||""),h=o?0:An(n.paddingTop),y=o?0:An(n.paddingRight),u=o?0:An(n.paddingBottom),w=o?0:An(n.paddingLeft),N=o?0:An(n.borderTopWidth),j=o?0:An(n.borderRightWidth),C=o?0:An(n.borderBottomWidth),W=o?0:An(n.borderLeftWidth),O=w+y,U=h+u,H=W+j,D=N+C,S=f?l.offsetHeight-D-l.clientHeight:0,E=m?l.offsetWidth-H-l.clientWidth:0,k=s?O+H:0,g=s?U+D:0,M=o?o.width:An(n.width)-k-E,R=o?o.height:An(n.height)-g-S,G=M+O+E+H,ue=R+U+S+D,Be=uo({devicePixelContentBoxSize:No(Math.round(M*devicePixelRatio),Math.round(R*devicePixelRatio),c),borderBoxSize:No(G,ue,c),contentBoxSize:No(M,R,c),contentRect:new Zc(w,h,M,R)});return ki.set(l,Be),Be},au=function(l,r,n){var o=eu(l,n),s=o.borderBoxSize,c=o.contentBoxSize,m=o.devicePixelContentBoxSize;switch(r){case Yo.DEVICE_PIXEL_CONTENT_BOX:return m;case Yo.BORDER_BOX:return s;default:return c}},A1=function(){function l(r){var n=eu(r);this.target=r,this.contentRect=n.contentRect,this.borderBoxSize=uo([n.borderBoxSize]),this.contentBoxSize=uo([n.contentBoxSize]),this.devicePixelContentBoxSize=uo([n.devicePixelContentBoxSize])}return l}(),lu=function(l){if(Qc(l))return 1/0;for(var r=0,n=l.parentNode;n;)r+=1,n=n.parentNode;return r},z1=function(){var l=1/0,r=[];co.forEach(function(c){if(c.activeTargets.length!==0){var m=[];c.activeTargets.forEach(function(f){var h=new A1(f.target),y=lu(f.target);m.push(h),f.lastReportedSize=au(f.target,f.observedBox),y<l&&(l=y)}),r.push(function(){c.callback.call(c.observer,m,c.observer)}),c.activeTargets.splice(0,c.activeTargets.length)}});for(var n=0,o=r;n<o.length;n++){var s=o[n];s()}return l},Ps=function(l){co.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(n){n.isActive()&&(lu(n.target)>l?r.activeTargets.push(n):r.skippedTargets.push(n))})})},M1=function(){var l=0;for(Ps(l);S1();)l=z1(),Ps(l);return E1()&&C1(),l>0},ft,ru=[],I1=function(){return ru.splice(0).forEach(function(l){return l()})},O1=function(l){if(!ft){var r=0,n=document.createTextNode(""),o={characterData:!0};new MutationObserver(function(){return I1()}).observe(n,o),ft=function(){n.textContent="".concat(r?r--:r++)}}ru.push(l),ft()},L1=function(l){O1(function(){requestAnimationFrame(l)})},Ei=0,$1=function(){return!!Ei},R1=250,V1={attributes:!0,characterData:!0,childList:!0,subtree:!0},js=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Hs=function(l){return l===void 0&&(l=0),Date.now()+l},ht=!1,F1=function(){function l(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return l.prototype.run=function(r){var n=this;if(r===void 0&&(r=R1),!ht){ht=!0;var o=Hs(r);L1(function(){var s=!1;try{s=M1()}finally{if(ht=!1,r=o-Hs(),!$1())return;s?n.run(1e3):r>0?n.run(r):n.start()}})}},l.prototype.schedule=function(){this.stop(),this.run()},l.prototype.observe=function(){var r=this,n=function(){return r.observer&&r.observer.observe(document.body,V1)};document.body?n():Wo.addEventListener("DOMContentLoaded",n)},l.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),js.forEach(function(n){return Wo.addEventListener(n,r.listener,!0)}))},l.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),js.forEach(function(n){return Wo.removeEventListener(n,r.listener,!0)}),this.stopped=!0)},l}(),Dt=new F1,Us=function(l){!Ei&&l>0&&Dt.start(),Ei+=l,!Ei&&Dt.stop()},P1=function(l){return!zt(l)&&!N1(l)&&getComputedStyle(l).display==="inline"},j1=function(){function l(r,n){this.target=r,this.observedBox=n||Yo.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return l.prototype.isActive=function(){var r=au(this.target,this.observedBox,!0);return P1(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},l}(),H1=function(){function l(r,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=n}return l}(),xi=new WeakMap,qs=function(l,r){for(var n=0;n<l.length;n+=1)if(l[n].target===r)return n;return-1},wi=function(){function l(){}return l.connect=function(r,n){var o=new H1(r,n);xi.set(r,o)},l.observe=function(r,n,o){var s=xi.get(r),c=s.observationTargets.length===0;qs(s.observationTargets,n)<0&&(c&&co.push(s),s.observationTargets.push(new j1(n,o&&o.box)),Us(1),Dt.schedule())},l.unobserve=function(r,n){var o=xi.get(r),s=qs(o.observationTargets,n),c=o.observationTargets.length===1;s>=0&&(c&&co.splice(co.indexOf(o),1),o.observationTargets.splice(s,1),Us(-1))},l.disconnect=function(r){var n=this,o=xi.get(r);o.observationTargets.slice().forEach(function(s){return n.unobserve(r,s.target)}),o.activeTargets.splice(0,o.activeTargets.length)},l}(),U1=function(){function l(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");wi.connect(this,r)}return l.prototype.observe=function(r,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rs(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");wi.observe(this,r,n)},l.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rs(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");wi.unobserve(this,r)},l.prototype.disconnect=function(){wi.disconnect(this)},l.toString=function(){return"function ResizeObserver () { [polyfill code] }"},l}();const $i=new WeakMap;function q1(l){var r;for(let n=0,o=l.length;n<o;++n){const s=l[n],c=$i.get(s.target);if(typeof c=="function"){const{inlineSize:m,blockSize:f}=((r=s.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:h,offsetHeight:y}=s.target;c(Object.assign(s,{offsetWidth:h,offsetHeight:y,width:m??h,height:f??y}))}}}const nu=new(po&&window.ResizeObserver||U1)(q1);function Ws(l,r){$i.set(l,r),nu.observe(l)}function Ks(l){$i.has(l)&&(nu.unobserve(l),$i.delete(l))}function W1(l={}){let r=Ls;const n=a.watch(()=>a.unref(l.target),s=>{r(),!(!s||typeof l.onResize!="function")&&(Ws(s,l.onResize),r=()=>{Ks(s),r=Ls})},{immediate:!0}),o=()=>{n(),r()};return a.getCurrentScope()&&a.onScopeDispose(o),{observeResize:Ws,unobserveResize:Ks,unobserve:o}}const K1=a.ref(!1);a.computed(()=>K1.value);const Gs="__theme_style__",vt="__theme_observer__",Ys=a.reactive(new Map),Js=new Map;a.watch(Ys,()=>{if(!po)return;Js.clear();const l=document.head.querySelector(`#${Gs}`);l&&document.head.removeChild(l);const r=document.createElement("style");let n=`.${vt} { width: 1px }`,o=1;for(const[s,[c,m]]of Ys.entries())n+=` html.${c} .${vt}, .${m} .${vt} { width: ${++o}px }`,Js.set(o,s);r.textContent=n,r.id=Gs,document.head.appendChild(r)});const ou=a.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(l,{expose:r,emit:n}){const o=l,s=n,c=a.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),m=new Map,f=a.ref(o.layout),h=a.ref(),{observeResize:y,unobserveResize:u}=W1(),w=q6();w.on("resizeEvent",N),w.on("dragEvent",j),a.onBeforeMount(()=>{s("layout-before-mount",f.value)}),a.onMounted(()=>{s("layout-mounted",f.value),a.nextTick(()=>{l1(f.value),c.originalLayout=f.value,a.nextTick(()=>{R(),h.value&&y(h.value,W6(D,16)),Eo(f.value,o.verticalCompact),s("layout-updated",f.value),H(),D()})})}),a.onBeforeUnmount(()=>{w.clearAll(),h.value&&u(h.value)});function N(ue,Be,de,Z,pe,ae){g(ue,Be,de,Z,pe,ae)}function j(ue,Be,de,Z,pe,ae){k(ue,Be,de,Z,pe,ae)}a.watch(()=>c.width,(ue,Be)=>{a.nextTick(()=>{w.emit("updateWidth",ue),Be===-1&&a.nextTick(()=>{s("layout-ready",f.value)}),H()})}),a.watch(()=>[o.layout,o.layout.length],()=>{f.value=o.layout,U()}),a.watch(()=>o.colNum,ue=>{w.emit("setColNum",ue)}),a.watch(()=>o.rowHeight,ue=>{w.emit("setRowHeight",ue)}),a.watch(()=>o.isDraggable,ue=>{w.emit("setDraggable",ue)}),a.watch(()=>o.isResizable,ue=>{w.emit("setResizable",ue)}),a.watch(()=>o.isBounded,ue=>{w.emit("setBounded",ue)}),a.watch(()=>o.transformScale,ue=>{w.emit("setTransformScale",ue)}),a.watch(()=>o.responsive,ue=>{ue||(s("update:layout",c.originalLayout),w.emit("setColNum",o.colNum)),D()}),a.watch(()=>o.maxRows,ue=>{w.emit("setMaxRows",ue)}),a.watch([()=>o.margin,()=>o.margin[1]],H),a.provide(Hc,a.reactive({...a.toRefs(o),...a.toRefs(c),increaseItem:C,decreaseItem:W})),a.provide(Uc,w),r({state:c,getItem:O,resizeEvent:g,dragEvent:k,layoutUpdate:U});function C(ue){m.set(ue.i,ue)}function W(ue){m.delete(ue.i)}function O(ue){return m.get(ue)}function U(){if(!un(f.value)&&!un(c.originalLayout)){if(f.value.length!==c.originalLayout.length){const ue=G(f.value,c.originalLayout);if(ue.length>0)if(f.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(ue);else{const Be=new Set(ue.map(de=>de.i));c.originalLayout=c.originalLayout.filter(de=>!Be.has(de.i))}c.lastLayoutLength=f.value.length,R()}Eo(f.value,o.verticalCompact),w.emit("updateWidth",c.width),H(),s("layout-updated",f.value)}}function H(){c.mergedStyle={height:S()}}function D(){h.value&&(c.width=h.value.offsetWidth),w.emit("resizeEvent")}function S(){if(!o.autoSize)return;const ue=parseFloat(o.margin[1]);return G6(f.value)*(o.rowHeight+ue)+ue+"px"}let E;function k(ue,Be,de,Z,pe,ae){let ce=Ds(f.value,Be);un(ce)&&(ce={h:0,w:0,x:0,y:0,i:""}),ue==="dragstart"&&!o.verticalCompact&&(E=f.value.reduce((Ee,{i:Ve,x:ye,y:z})=>({...Ee,[Ve]:{x:ye,y:z}}),{})),ue==="dragmove"||ue==="dragstart"?(c.placeholder.i=Be,c.placeholder.x=ce.x,c.placeholder.y=ce.y,c.placeholder.w=ae,c.placeholder.h=pe,a.nextTick(()=>{c.isDragging=!0}),w.emit("updateWidth",c.width)):a.nextTick(()=>{c.isDragging=!1}),f.value=Ct(f.value,ce,de,Z,!0,o.preventCollision),o.restoreOnDrag?(ce.static=!0,Eo(f.value,o.verticalCompact,E),ce.static=!1):Eo(f.value,o.verticalCompact),w.emit("compact"),H(),ue==="dragend"&&(E=void 0,s("layout-updated",f.value))}function g(ue,Be,de,Z,pe,ae){let ce=Ds(f.value,Be);un(ce)&&(ce={h:0,w:0,x:0,y:0,i:""});let Ee;if(o.preventCollision){const Ve=Wc(f.value,{...ce,w:ae,h:pe}).filter(ye=>ye.i!==ce.i);if(Ee=Ve.length>0,Ee){let ye=1/0,z=1/0;Ve.forEach(q=>{q.x>ce.x&&(ye=Math.min(ye,q.x)),q.y>ce.y&&(z=Math.min(z,q.y))}),Number.isFinite(ye)&&(ce.w=ye-ce.x),Number.isFinite(z)&&(ce.h=z-ce.y)}}Ee||(ce.w=ae,ce.h=pe),ue==="resizestart"||ue==="resizemove"?(c.placeholder.i=Be,c.placeholder.x=de,c.placeholder.y=Z,c.placeholder.w=ce.w,c.placeholder.h=ce.h,a.nextTick(()=>{c.isDragging=!0}),w.emit("updateWidth",c.width)):ue&&a.nextTick(()=>{c.isDragging=!1}),o.responsive&&M(),Eo(f.value,o.verticalCompact),w.emit("compact"),H(),ue==="resizeend"&&s("layout-updated",f.value)}function M(){const ue=i1(o.breakpoints,c.width);if(ue===c.lastBreakpoint)return;const Be=Yc(ue,o.cols);!un(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=Et(f.value));const de=s1(c.originalLayout,c.layouts,o.breakpoints,ue,c.lastBreakpoint,Be,o.verticalCompact);c.layouts[ue]=de,c.lastBreakpoint!==ue&&s("breakpoint-changed",ue,de),f.value=de,s("update:layout",de),c.lastBreakpoint=ue,w.emit("setColNum",Be)}function R(){c.layouts=Object.assign({},o.responsiveLayouts)}function G(ue,Be){const de=new Set(Be.map(ce=>ce.i)),Z=new Set(ue.map(ce=>ce.i)),pe=ue.filter(ce=>!de.has(ce.i)),ae=Be.filter(ce=>!Z.has(ce.i));return pe.concat(ae)}return(ue,Be)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:a.normalizeStyle(c.mergedStyle)},[ue.$slots.default?a.renderSlot(ue.$slots,"default",{key:0}):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(f.value,de=>(a.openBlock(),a.createBlock(Li,a.mergeProps({key:de.i,ref_for:!0},de),{default:a.withCtx(()=>[a.renderSlot(ue.$slots,"item",{item:de})]),_:2},1040))),128)),a.withDirectives(a.createVNode(Li,{class:"vgl-item--placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:c.placeholder.i},null,8,["x","y","w","h","i"]),[[a.vShow,c.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var l=document.createElement("style");l.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(l)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const G1={key:0,class:"item-view-group"},Y1={key:0,class:"item-view-group"},J1=a.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(l,{emit:r}){const n=$.useModelComp($.pinia),{isEdit:o}=$.storeToRefs(n),s=Qn($.pinia),c=r,m=l,f=a.ref(""),h=a.computed(()=>m==null?void 0:m.children),y=a.computed(()=>{var H,D,S,E;return((H=m==null?void 0:m.children)==null?void 0:H.length)>0&&((D=m==null?void 0:m.children)!=null&&D.every(k=>k==null?void 0:k.layout))?(E=(S=m==null?void 0:m.children)==null?void 0:S[0])==null?void 0:E.layout:"vertical"}),u=H=>{f.value=H,c("radioChange",H)},w=a.computed(()=>{var H,D;return((D=(H=m==null?void 0:m.children)==null?void 0:H[0])==null?void 0:D.isGridLayout)||!1}),N=a.ref((m==null?void 0:m.level)+1),j=a.computed(()=>{if(!(m!=null&&m.children)||!Array.isArray(m.children)||m.children.length<2)return!1;const H=m.children.some(S=>(S==null?void 0:S.name)==="测量系统配置表"&&(S==null?void 0:S.comp)==="ParentItem"),D=m.children.some(S=>(S==null?void 0:S.name)==="测量系统传递表"&&(S==null?void 0:S.comp)==="ParentItem");return H&&D}),C=a.computed(()=>{var D,S,E,k,g,M;let H=(D=m==null?void 0:m.children)==null?void 0:D.filter(R=>R==null?void 0:R.choice);if(s.setSelectTab((S=H==null?void 0:H[0])==null?void 0:S.choiceName),(f==null?void 0:f.value)!=="")return(E=m==null?void 0:m.children)==null?void 0:E.filter(R=>!(R!=null&&R.choiceName)||(R==null?void 0:R.choiceName)===(f==null?void 0:f.value));{let R=(g=(k=m==null?void 0:m.children)==null?void 0:k.find(G=>G==null?void 0:G.choice))==null?void 0:g.choiceName;return(M=m==null?void 0:m.children)==null?void 0:M.filter(G=>!(G!=null&&G.choiceName)||(G==null?void 0:G.choiceName)===R)}}),W=H=>{const D=(H==null?void 0:H.menuFilter)||[];return Array.isArray(D)&&(D==null?void 0:D.some(S=>{const E=typeof S=="string"?S:JSON.stringify(S);return E==null?void 0:E.includes("@InterfaceHide=Yes")}))};a.watch(()=>m==null?void 0:m.children,()=>{j.value},{deep:!0});const O=H=>{c("rowClick",H)},U=(H,D)=>{c("routeUrl",H,D)};return(H,D)=>w.value?(a.openBlock(),a.createBlock(a.unref(ou),{key:0,layout:h.value,"onUpdate:layout":D[0]||(D[0]=S=>h.value=S),"is-draggable":a.unref(o)==="edit","is-resizable":a.unref(o)==="edit","col-num":24,margin:[8,16]},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(S,E)=>(a.openBlock(),a.createBlock(a.unref(Li),{key:S.i,x:S.x,y:S.y,"min-h":S.minH,"max-h":S.maxH,"min-w":S.minW,w:S.w,h:S.h,i:S.i},{default:a.withCtx(()=>{var k,g,M,R,G,ue,Be,de,Z,pe,ae,ce,Ee,Ve;return[a.createElementVNode("div",{style:a.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:E===((k=m==null?void 0:m.children)==null?void 0:k.length)-1?"0px":"24px"})},[((M=(g=S==null?void 0:S.component)==null?void 0:g.comp)==null?void 0:M.toUpperCase())!=="TABLE"&&((R=S==null?void 0:S.component)!=null&&R.name)?(a.openBlock(),a.createElementBlock("div",G1,[a.createElementVNode("div",{class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:(parseInt(N.value.toString())-1)*12+"px",fontWeight:600-(N.value-1)*100>=400?600-(N.value-1)*100:400,fontSize:17-N.value>=14?17-N.value+"px":"14px"})},a.toDisplayString((G=S==null?void 0:S.component)==null?void 0:G.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Go)((ue=S==null?void 0:S.component)==null?void 0:ue.comp)),{pageLayout:y.value,config:{showIndex:(Be=a.unref(nr)[E])==null?void 0:Be.showIndex,allowMove:(de=a.unref(nr)[E])==null?void 0:de.allowMove,viewport:(Z=a.unref(nr)[E])==null?void 0:Z.viewport,status:(pe=a.unref(nr)[E])==null?void 0:pe.status},related:S==null?void 0:S.relatedTables,compName:S==null?void 0:S.component.name,compNames:a.unref(Sc),itemData:(ae=S==null?void 0:S.component)==null?void 0:ae.compData,childItemData:(ce=S==null?void 0:S.component)==null?void 0:ce.itemChildData,key:a.unref(Zn),cacheNewData:a.unref(_c),onChange:a.unref(zi),index:(S==null?void 0:S.id)??E,onContentChange:a.unref(Mi),onPageChange:a.unref(Ii),parentTableId:(Ee=S==null?void 0:S.component)==null?void 0:Ee.tableId,allMapContents:a.unref(wt),children:(Ve=S==null?void 0:S.component)==null?void 0:Ve.children,level:N.value,onRowClick:O,onRouteUrl:U,onClickTrigger:a.unref(Ec),onClickMainKey:a.unref(Cc),onRadioChange:u},null,40,["pageLayout","config","related","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(C.value,(S,E)=>{var k,g;return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({gap:"16px",display:(S==null?void 0:S.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(E)===((k=m==null?void 0:m.children)==null?void 0:k.length)-1?"0px":"24px"})},[((g=S==null?void 0:S.comp)==null?void 0:g.toUpperCase())!=="TABLE"&&S.name?(a.openBlock(),a.createElementBlock("div",Y1,[W(S)?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:parseInt(N.value.toString())>1?"12px":"0px",fontWeight:600-(N.value-1)*100>=400?600-(N.value-1)*100:400,fontSize:17-N.value>=14?17-N.value+"px":"14px"})},a.toDisplayString(S.name),5))])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Go)(S.comp)),{compName:S.name,groupNames:S==null?void 0:S.nameContents,config:{showIndex:S==null?void 0:S.showIndex,allowMove:S==null?void 0:S.allowMove,viewport:S==null?void 0:S.viewport,status:S==null?void 0:S.status},itemData:S==null?void 0:S.compData,related:S==null?void 0:S.relatedTables,childItemData:S==null?void 0:S.itemChildData,key:a.unref(Zn),onChange:a.unref(zi),index:(S==null?void 0:S.id)??E,onContentChange:a.unref(Mi),onPageChange:a.unref(Ii),parentTableId:S==null?void 0:S.tableId,allMapContents:a.unref(wt),children:S==null?void 0:S.children,level:N.value,onRowClick:O,onRouteUrl:U,onRadioChange:u},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),X1=Jl._export_sfc(J1,[["__scopeId","data-v-de5883fb"]]),Z1={class:"radio-group-container"},Q1=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(l,{emit:r}){const n=l,o=r,s=a.ref(),c=Qn($.pinia),{selectTab:m}=$.storeToRefs(c);a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=m.value},{immediate:!0,deep:!0});const f=h=>{s.value=h,o("radioChange",s.value)};return(h,y)=>(a.openBlock(),a.createElementBlock("div",Z1,[a.createVNode(il.ssRadio,{modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=u=>s.value=u),content:n==null?void 0:n.itemData,onChange:f},null,8,["modelValue","content"])]))}}),ev=Jl._export_sfc(Q1,[["__scopeId","data-v-177d64c3"]]),iu=a.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),av={TABLE:Tc,FORM:ws,STATICFORM:Ac,TABLEOPERATE:W2,TABLESTYLE:ch,TABLEEXTEND:dh,TABLEINTERACTION:hh,FORMOPERATE:_s,FOLD:Uh,CALCULATOR:Jh,METHODBUTTON:Qh,AVATARUPLOAD:rs.ssAvatar,SIGNATURE:rs.ssSignature,FORMTOP:ws,STEP:d4,STEPOPERATE:Oh,TIMELINE:y4,TIMELINEOPERATE:Ph,FORMTOPOPERATE:_s,SIGNATUREOPERATE:s4,AVATARUPLOADOPERATE:l4,TABS:k4,TABSOPERATE:o6,CHART:b6,CHARTOPERATE:T6,LAYOUT:M6,LAYOUTOPERATE:j6,PARENTITEM:X1,RADIO:ev};function Ao(l){return av[l==null?void 0:l.toUpperCase()]||null}exports.De=ou;exports.activeStepInfo=Co;exports.addContents=Ko;exports.addVisibleDialog=Tt;exports.affixItems=w0;exports.allMapContents=wt;exports.analyzeMenu=rc;exports.cacheNewData=_c;exports.clickMainKey=Cc;exports.clickSavePage=x0;exports.clickStep=Nc;exports.clickTrigger=Ec;exports.compId=Zn;exports.compNames=Sc;exports.compShow=To;exports.existLayouts=T0;exports.fixChangeValue=Nt;exports.generateLayouts=oh;exports.getComponent=Ao;exports.getComponents=Go;exports.getPageConstruct=Jd;exports.getPageData=Kr;exports.getSliceContLength=L0;exports.gridRowHeight=eh;exports.gridRowHeightHmPg=Q2;exports.isStepLayout=Bc;exports.onBack=b0;exports.onButtonChange=C0;exports.onChange=zi;exports.onClick=k0;exports.onClickStep=A0;exports.onContentChange=Mi;exports.onExtendTaskEnd=B0;exports.onOk=D0;exports.onPageBack=M0;exports.onPageChange=Ii;exports.onSelectFixContent=g0;exports.renderShowItems=xc;exports.showItems=nr;exports.sliceTableLength=wc;exports.slotContent=iu;exports.ssTable=Tc;exports.st=Li;exports.stepItems=$0;exports.tabChange=z0;exports.toolBar=N0;exports.useFormComp=Bt;exports.useModelLoader=xf;exports.verifyButton=I0;
|