ss-component-new 1.3.355 → 1.3.356

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/{MTLLoader-C7OvulGh.cjs → MTLLoader-BefOV10J.cjs} +1 -1
  2. package/dist/{MTLLoader-5aLRwabe.js → MTLLoader-Cg0oDB2C.js} +1 -1
  3. package/dist/{OrbitControls-CDSlnRLN.js → OrbitControls-BWJhT98n.js} +1 -1
  4. package/dist/{OrbitControls-CIrPqmPS.cjs → OrbitControls-CqaGqoNF.cjs} +1 -1
  5. package/dist/{URDFLoader-AkFAgt5Y.js → URDFLoader-6foKe0Hk.js} +2 -2
  6. package/dist/{URDFLoader-BwFJx5UR.cjs → URDFLoader-Cg4tDxf9.cjs} +1 -1
  7. package/dist/{animationData-12pRw_Qv.cjs → animationData-1O9N8tYh.cjs} +1 -1
  8. package/dist/{animationData-iL7PIDLd.js → animationData-BmdynDCL.js} +2 -2
  9. package/dist/{array-BYQWjMT-.js → array-bTlTI7-m.js} +2 -2
  10. package/dist/{array-DUfexM7c.cjs → array-qJP7qOOm.cjs} +1 -1
  11. package/dist/{iconfont-DsgGs7UQ.cjs → iconfont-BkToWweJ.cjs} +1 -1
  12. package/dist/{iconfont-C6j3TodB.js → iconfont-M_-3pVq2.js} +2 -2
  13. package/dist/icons/svg/normal.svg +1 -0
  14. package/dist/{index-DQ74Iryx.js → index-B-Cf26_8.js} +2 -2
  15. package/dist/{index-QXOizZeU.cjs → index-B-w0TQLi.cjs} +1 -1
  16. package/dist/{index-3U6si0hy.cjs → index-B44yTwpg.cjs} +1 -1
  17. package/dist/{index-CsQiHOs9.js → index-BD78V5Fk.js} +1 -1
  18. package/dist/index-BNnoV73x.cjs +1 -0
  19. package/dist/{index-D6VrG7PD.js → index-BWqS2Db9.js} +1 -1
  20. package/dist/{index-CMHbvs1r.cjs → index-BnQAOGNI.cjs} +53 -53
  21. package/dist/{index-0TSZq_QR.js → index-BsCxdb2Q.js} +5 -5
  22. package/dist/{index-8SEJKzmd.js → index-BskTRZyB.js} +3 -3
  23. package/dist/{index-CmcJ1rry.js → index-BugbzHvK.js} +1 -1
  24. package/dist/{index-Dha6rhAJ.cjs → index-BxZ-Sqy1.cjs} +1 -1
  25. package/dist/{index-IjCgZgl3.cjs → index-CLqESmcJ.cjs} +1 -1
  26. package/dist/{index-C_e3ZAJu.js → index-CPI-GT09.js} +1 -1
  27. package/dist/index-CX-LO3gU.js +22927 -0
  28. package/dist/{index-D0HhfyPk.js → index-CdOAC0QO.js} +1 -1
  29. package/dist/{index-CRiJbVFR.cjs → index-Ck5mtjKc.cjs} +1 -1
  30. package/dist/index-CwMvkhaX.cjs +25 -0
  31. package/dist/{index-CsugrIEn.js → index-CzXy4Rjt.js} +1 -1
  32. package/dist/{index-D_EVB0Xj.js → index-DCV8AiAq.js} +4 -4
  33. package/dist/{index-B1f0xvtw.js → index-DIfe_pv9.js} +199 -199
  34. package/dist/{index-BAAPwqZY.cjs → index-DK5QS19w.cjs} +1 -1
  35. package/dist/{index-BCXL-Vag.cjs → index-DRno3-U_.cjs} +1 -1
  36. package/dist/{index-zUcPbdQ8.cjs → index-DTxACO21.cjs} +1 -1
  37. package/dist/{index-DyEYs8w4.cjs → index-DdLYDrQL.cjs} +1 -1
  38. package/dist/{index-BAdjupJP.cjs → index-DmmjTRGz.cjs} +1 -1
  39. package/dist/{index-BGruls3v.js → index-Dv0FPBX0.js} +4026 -4026
  40. package/dist/{index-B5T4n7g4.js → index-DyS4ycK4.js} +1596 -1593
  41. package/dist/{index-J-WjNVnM.js → index-G6xUS_LZ.js} +1 -1
  42. package/dist/{index-DpaJtzsH.cjs → index-MT9m_JvZ.cjs} +12 -12
  43. package/dist/{index-Dc_o63Jj.js → index-O7h8fPzP.js} +1 -1
  44. package/dist/{index-DDoHRYY5.cjs → index-Q3o-NsLb.cjs} +1 -1
  45. package/dist/{index-B-2anWSc.cjs → index-RSfi7VXm.cjs} +1 -1
  46. package/dist/{index-CI2NS7Ob.cjs → index-WQNqmmuC.cjs} +1 -1
  47. package/dist/{index-NbGwWzrU.js → index-hJh3eBHb.js} +1 -1
  48. package/dist/{index-Dobt9Q4Z.js → index-iaOps17f.js} +3 -3
  49. package/dist/index-l9_qZoks.cjs +2 -0
  50. package/dist/{index-BGtPvIhL.cjs → index-qVb0YQPi.cjs} +1 -1
  51. package/dist/{index-BnAAUtPN.js → index-wAZQvSsO.js} +1154 -1151
  52. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-D0uXxWIh.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CmdLcCoO.js} +1845 -1840
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BKbOLELt.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-feyCTReG.cjs} +61 -61
  54. package/dist/{main-Dxdq3RcS.js → main-205_4Nih.js} +3 -3
  55. package/dist/{main-Crsz9niF.cjs → main-D-xgau4u.cjs} +1 -1
  56. package/dist/obj/model.mtl +42 -0
  57. package/dist/obj/model.obj +26110 -0
  58. package/dist/ss-component.cjs +1 -1
  59. package/dist/ss-component.css +1 -1
  60. package/dist/ss-component.js +9 -9
  61. package/dist/ss-component2.cjs +1 -1
  62. package/dist/ss-component2.js +9 -9
  63. package/dist/{threeModel-DpsPcuIa.cjs → threeModel-DXueZHTM.cjs} +1 -1
  64. package/dist/{threeModel-DeRemq5u.js → threeModel-w1ZYoyvs.js} +3 -3
  65. package/dist/{threePreview-Dfkn0cBK.cjs → threePreview-BA1gosFY.cjs} +1 -1
  66. package/dist/{threePreview-DT2LkMs6.js → threePreview-D7k4bo5p.js} +3 -3
  67. package/dist/{threeSceneView-C6tPuxdW.cjs → threeSceneView-Bloj-2Kp.cjs} +1 -1
  68. package/dist/{threeSceneView-COO6IUge.js → threeSceneView-DeONIC8O.js} +10 -10
  69. package/dist/{threeSceneViewForCPMPIP-OyTbtTK8.cjs → threeSceneViewForCPMPIP-Cl14yLk7.cjs} +1 -1
  70. package/dist/{threeSceneViewForCPMPIP-DZV8D2vn.js → threeSceneViewForCPMPIP-Cob3ZkMt.js} +7 -7
  71. package/dist/{threeTrackPathView-DCBgrmNw.js → threeTrackPathView-DOmS1T6b.js} +3 -3
  72. package/dist/{threeTrackPathView-0JMPjO4k.cjs → threeTrackPathView-DXI6Wos2.cjs} +1 -1
  73. package/dist/{threeViewerHost-_ubQTgiY.js → threeViewerHost-DQ6Y3XLq.js} +2 -2
  74. package/dist/{threeViewerHost-DfI5l2__.cjs → threeViewerHost-DtwouxoX.cjs} +1 -1
  75. package/dist/{urdfTree-CwGYGMf_.js → urdfTree-BEQr2AP4.js} +1 -1
  76. package/dist/{urdfTree-CRWM03qh.cjs → urdfTree-r9giphpe.cjs} +1 -1
  77. package/dist/{workpieceTreePanel-DHoXiEkq.cjs → workpieceTreePanel-Bzn5WIm0.cjs} +1 -1
  78. package/dist/{workpieceTreePanel-DZn1rWeY.js → workpieceTreePanel-CozcD--G.js} +4 -4
  79. package/package.json +1 -1
  80. package/public/icons/svg/normal.svg +1 -0
  81. package/public/obj/model.mtl +42 -0
  82. package/public/obj/model.obj +26110 -0
  83. package/dist/index-DRoBrg1m.cjs +0 -25
  84. package/dist/index-DpNXljVj.cjs +0 -2
  85. package/dist/index-DvVR3mog.cjs +0 -1
  86. package/dist/index-U3ob6rDc.js +0 -22895
@@ -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"),Ka=require("./request-BC2w2vGr.cjs"),Pn=require("./dayjs.min-DxGf9IW4.cjs"),L=require("./menu-VIQivToR.cjs"),nl=require("./index-DpaJtzsH.cjs"),er=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Nl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BKbOLELt.cjs"),_r=require("./index-CUw6nGTo.cjs"),Co=require("./threeViewerHost-DfI5l2__.cjs"),me=require("./index-CMHbvs1r.cjs"),Mu=require("./index-DsNHJYr-.cjs"),Nr=require("./index-CW4qJdP8.cjs"),rs=require("./index-BCXL-Vag.cjs"),Xs=require("./index-DDoHRYY5.cjs"),Pi=require("./index-W8p89C7t.cjs"),fn=require("./index-CPB2ALZC.cjs");;/* empty css */const Do=require("./isString-DNBlKLZH.cjs"),ns=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Zs=require("./index-BVaHwt5f.cjs"),Iu=require("./index-QXOizZeU.cjs"),Rn=require("./MTLLoader-C7OvulGh.cjs"),Ou=require("./URDFLoader-BwFJx5UR.cjs");var Lu="[object Boolean]";function Qs(l){return l===!0||l===!1||Ka.isObjectLike(l)&&Ka.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),i=a.ref(!1),s=a.ref(null);return a.watch(()=>r==null?void 0:r.isVisible,()=>{i.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 p=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(p,{visible:i.value,"onUpdate:visible":m[0]||(m[0]=h=>i.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 i=String(r.value??"");return i==="已完成"?"task-status-completed":i==="进行中"?"task-status-running":i==="终止"||i==="暂停"?"task-status-stopped":""});return(i,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=er._export_sfc(Fu,[["__scopeId","data-v-d81f59b4"]]);function ju(l,r,n,i={}){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:p=.2}=i,h=l.getBoundingClientRect(),y=r.getBoundingClientRect(),u=r.naturalWidth,w=r.naturalHeight,D=y.width/u,V=y.height/w,E=Math.min(D,V),Y=u*E,M=w*E,O=(h.width-Y)/2,j=(h.height-M)/2,C=n.map(([_,k])=>{const g=O+_*Y,$=j+k*M;return{x:g,y:$}});s.clearRect(0,0,l.width,l.height),s.beginPath(),s.moveTo(C[0].x,C[0].y);for(let _=1;_<C.length;_++)s.lineTo(C[_].x,C[_].y);s.closePath();const S=c.replace(/[\d.]+\)$/,`${p})`);s.fillStyle=S,s.fill(),s.strokeStyle=c.replace(/[\d.]+\)$/,"1)"),s.lineWidth=m,s.stroke()}function wi(l){if(!l)return;const r=l.getContext("2d");r&&r.clearRect(0,0,l.width,l.height)}function is(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},id={key:1},od={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,i=r,s=a.computed({get:()=>n.visible,set:B=>i("update:visible",B)});let c=!1,m="",p=0,h=0,y=0,u=0,w=0,D=0,V=null;const E=B=>{var re,Ae;const q=(Ae=(re=B==null?void 0:B.target)==null?void 0:re.closest)==null?void 0:Ae.call(re,".ocr-img-preview-window");return q||document.querySelector(".ocr-img-preview-window")},Y=B=>{if(!B||B==="none")return{tx:0,ty:0};let q=B.match(/matrix\(([^)]+)\)/);if(q){const re=q[1].split(",").map(Ae=>Number(Ae.trim()));return{tx:(re==null?void 0:re[4])||0,ty:(re==null?void 0:re[5])||0}}if(q=B.match(/matrix3d\(([^)]+)\)/),q){const re=q[1].split(",").map(Ae=>Number(Ae.trim()));return{tx:(re==null?void 0:re[12])||0,ty:(re==null?void 0:re[13])||0}}return q=B.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}},M=(B,q,re)=>{B.style.transform=`translate(${q}px, ${re}px)`},O=B=>{const q=E(B);if(!q)return;c=!0,V=q,m="move",p=B.clientX,h=B.clientY;const re=window.getComputedStyle(q),{tx:Ae,ty:Ee}=Y(re.transform);w=Ae,D=Ee,document.addEventListener("mousemove",C),document.addEventListener("mouseup",S)},j=(B,q)=>{const re=E(B);if(!re)return;c=!0,V=re,m=q,p=B.clientX,h=B.clientY;const Ae=re.getBoundingClientRect();y=Ae.width,u=Ae.height;const Ee=window.getComputedStyle(re),{tx:We,ty:da}=Y(Ee.transform);w=We,D=da,document.addEventListener("mousemove",C),document.addEventListener("mouseup",S)},C=B=>{if(!c||!V)return;const q=B.clientX-p,re=B.clientY-h,Ae=360,Ee=420;let We=y,da=u,Ta=w,le=D;if(m==="move"){Ta=w+q,le=D+re,M(V,Ta,le);return}if(m.includes("right")&&(We=Math.max(Ae,y+q)),m.includes("bottom")&&(da=Math.max(Ee,u+re)),m.includes("left")){const la=y-q;la<Ae?(We=Ae,Ta=w+(y-Ae)):(We=la,Ta=w+q)}if(m.includes("top")){const la=u-re;la<Ee?(da=Ee,le=D+(u-Ee)):(da=la,le=D+re)}V.style.width=`${We}px`,V.style.height=`${da}px`,M(V,Ta,le)},S=()=>{c=!1,m="",V=null,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",S)},_=a.ref([]),k=a.ref(!1);a.watch(()=>n.images,async B=>{if(!Array.isArray(B)||B.length===0){_.value=[];return}k.value=!0;const q=[];for(const re of B)if(re.url&&!re.url.startsWith("blob:")&&!re.url.startsWith("http"))try{const Ae=await Nl.downloadFile(re.url),Ee=URL.createObjectURL(Ae);q.push({...re,blobUrl:Ee})}catch(Ae){console.error(`Failed to load image for preview: ${re.url}`,Ae),q.push({...re,blobUrl:""})}else q.push({...re,blobUrl:re.url});_.value=q,k.value=!1},{deep:!0,immediate:!0});const g=a.ref(0),$=a.ref(null),R=a.ref(null),G=a.computed(()=>_.value[g.value]||null),ie=()=>{if(!_.value.length){g.value=0;return}if(n.defaultImageName){const B=_.value.findIndex(q=>(q==null?void 0:q.name)===n.defaultImageName);g.value=B>=0?B:0}else g.value=0},Se=B=>{if(!_.value.length)return;const q=Math.max(0,Math.min(B,_.value.length-1));g.value=q},te=()=>Se(g.value-1),Z=()=>Se(g.value+1),fe=B=>{if(!B)return;const q=_.value.findIndex(re=>(re==null?void 0:re.name)===B);q>=0&&(g.value=q)},ae=()=>{if(!R.value)return;const B=R.value.parentElement;if(!B)return;const q=B.getBoundingClientRect();R.value.width=q.width,R.value.height=q.height},se=()=>{var Ae,Ee;if(!R.value||!$.value||!n.focusedFieldName){R.value&&wi(R.value);return}const B=(Ae=$.value.$el)==null?void 0:Ae.querySelector("img");if(!B)return;if(!B.complete||B.naturalWidth===0){B.onload=()=>{a.nextTick(()=>{se()})};return}const q=((Ee=G.value)==null?void 0:Ee.name)||"",re=is(n.fieldMeta,n.focusedFieldName);if(!re){wi(R.value);return}if(re.imageName!==q){wi(R.value);return}ae(),ju(R.value,B,re.bboxNorm)},De=()=>{a.nextTick(()=>{ae(),se()})};a.watch(()=>n.focusedFieldName,()=>{if(!s.value)return;const B=is(n.fieldMeta,n.focusedFieldName);B!=null&&B.imageName&&fe(B.imageName),a.nextTick(()=>{se()})}),a.watch(()=>{var B;return(B=G.value)==null?void 0:B.name},()=>{s.value&&a.nextTick(()=>{R.value&&wi(R.value),se()})}),a.watch(()=>n.visible,B=>{B?(ie(),a.nextTick(()=>{ae(),se()})):R.value&&wi(R.value)}),a.watch(()=>n.defaultImageName,()=>{s.value&&ie()});let Pe=null;a.onMounted(()=>{var B;typeof ResizeObserver<"u"&&(Pe=new ResizeObserver(()=>{ae(),a.nextTick(()=>{se()})}),(B=R.value)!=null&&B.parentElement&&Pe.observe(R.value.parentElement))}),a.onUnmounted(()=>{Pe&&(Pe.disconnect(),Pe=null),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",S)});const ke=()=>{R.value&&wi(R.value),i("update:visible",!1),i("close")};return(B,q)=>{var da,Ta;const re=a.resolveComponent("el-button"),Ae=a.resolveComponent("el-image"),Ee=a.resolveComponent("Loading"),We=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(O,["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:ke},"×")],32),a.createElementVNode("div",{class:"resizable-handle top",onMousedown:q[0]||(q[0]=a.withModifiers(le=>j(le,"top"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle right",onMousedown:q[1]||(q[1]=a.withModifiers(le=>j(le,"right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:q[2]||(q[2]=a.withModifiers(le=>j(le,"bottom"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle left",onMousedown:q[3]||(q[3]=a.withModifiers(le=>j(le,"left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:q[4]||(q[4]=a.withModifiers(le=>j(le,"top-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:q[5]||(q[5]=a.withModifiers(le=>j(le,"top-right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:q[6]||(q[6]=a.withModifiers(le=>j(le,"bottom-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:q[7]||(q[7]=a.withModifiers(le=>j(le,"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)]),_.value.length>1?(a.openBlock(),a.createElementBlock("div",Yu,[a.createVNode(re,{size:"small",disabled:g.value===0,onClick:te},{default:a.withCtx(()=>q[9]||(q[9]=[a.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),a.createElementVNode("span",Ju,a.toDisplayString(g.value+1)+" / "+a.toDisplayString(_.value.length),1),a.createVNode(re,{size:"small",disabled:g.value===_.value.length-1,onClick:Z},{default:a.withCtx(()=>q[10]||(q[10]=[a.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):a.createCommentVNode("",!0)]),_.value.length>1?(a.openBlock(),a.createElementBlock("div",Xu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(_.value,(le,la)=>(a.openBlock(),a.createElementBlock("div",{key:(le.name||"")+"-"+la,class:a.normalizeClass(["img-thumb-item",{active:la===g.value}]),onClick:ve=>Se(la)},[le!=null&&le.blobUrl?(a.openBlock(),a.createBlock(Ae,{key:0,src:le.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[le.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(a.openBlock(),a.createElementBlock("div",Qu,"加载失败")),a.createElementVNode("div",ed,a.toDisplayString(le.name||"-"),1)],10,Zu))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",ad,[k.value?(a.openBlock(),a.createElementBlock("div",ld,[a.createVNode(We,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(Ee)]),_: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(Ae,{ref_key:"imageRef",ref:$,src:G.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[G.value.blobUrl],onLoad:De},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,[(Ta=G.value)!=null&&Ta.url?(a.openBlock(),a.createElementBlock("span",nd,"图片加载失败")):(a.openBlock(),a.createElementBlock("span",id,"暂无图片"))]))])])):(a.openBlock(),a.createElementBlock("div",od,"暂无图片"))])])):a.createCommentVNode("",!0)}}}),sd=er._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,i=r,s=a.ref(""),c=a.ref(""),m=a.computed(()=>(n.versions||[]).find(E=>String(E.versionId)===String(s.value))),p=a.ref({}),h=a.ref(""),y=a.ref("证书附件.pdf"),u=()=>{try{Object.values(p.value||{}).forEach(E=>{E&&URL.revokeObjectURL(E)}),h.value&&URL.revokeObjectURL(h.value)}catch{}p.value={},h.value=""},w=async E=>{if(!E||E.fileType==="pdf")return;const Y=Array.isArray(E.images)?E.images:[];for(const M of Y){const O=M==null?void 0:M.url;if(!(!O||p.value[O]))try{const j=await L.platformDownloadFile({url:O}),C=URL.createObjectURL(j.data);p.value={...p.value,[O]:C}}catch{}}},D=async E=>{var M;if(!E||E.fileType!=="pdf"){h.value="";return}const Y=E.sourceUrl||"";if(!Y){h.value="";return}if(h.value){try{URL.revokeObjectURL(h.value)}catch{}h.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:Y,versionId:E==null?void 0:E.versionId,certNo:E==null?void 0:E.certNo});const O=await L.platformDownloadFile({url:Y});console.log("[CertificatePreview] PDF响应:",{url:Y,status:O==null?void 0:O.status,size:(M=O==null?void 0:O.data)==null?void 0:M.size});const j=URL.createObjectURL(O.data);h.value=j;const C=E.certNo?String(E.certNo):"";y.value=C?`${C}.pdf`:"证书附件.pdf"}catch(O){console.error("[CertificatePreview] PDF加载失败:",{url:Y,error:O}),h.value=""}};a.watch(()=>n.visible,async E=>{var M;if(!E){u();return}const Y=(M=n.versions)==null?void 0:M[0];s.value=(Y==null?void 0:Y.versionId)||"",await w(Y),await D(Y)},{immediate:!0}),a.watch(()=>s.value,async()=>{var Y,M;const E=m.value;if(!E){c.value="",h.value="";return}if(E.fileType==="pdf"){c.value="",await D(E);return}h.value="",c.value=((M=(Y=E.images)==null?void 0:Y[0])==null?void 0:M.url)||"",await w(E)},{immediate:!0});const V=()=>{i("update:visible",!1),u()};return a.onBeforeUnmount(()=>{u()}),(E,Y)=>{const M=a.resolveComponent("el-empty"),O=a.resolveComponent("el-tab-pane"),j=a.resolveComponent("el-tabs"),C=a.resolveComponent("el-button"),S=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock(S,{"model-value":E.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:V},{footer:a.withCtx(()=>[a.createVNode(C,{id:"themeBorderButton",onClick:V},{default:a.withCtx(()=>Y[1]||(Y[1]=[a.createTextVNode("关闭")])),_:1,__:[1]})]),default:a.withCtx(()=>[E.versions&&E.versions.length>0?(a.openBlock(),a.createBlock(j,{key:0,modelValue:s.value,"onUpdate:modelValue":Y[0]||(Y[0]=_=>s.value=_),type:"card",class:"cert-version-tabs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.versions,_=>(a.openBlock(),a.createBlock(O,{key:_.versionId,name:_.versionId,label:_.label},{default:a.withCtx(()=>[a.createElementVNode("div",cd,[_.fileType==="pdf"?(a.openBlock(),a.createElementBlock("div",ud,[h.value?(a.openBlock(),a.createBlock(nl.SsFilePreview,{key:1,fileName:y.value,blobUrl:h.value},null,8,["fileName","blobUrl"])):(a.openBlock(),a.createBlock(M,{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(_.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,[p.value[k.url]?(a.openBlock(),a.createElementBlock("img",{key:0,src:p.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},[p.value[c.value]?(a.openBlock(),a.createElementBlock("div",gd,[a.createElementVNode("img",{class:"viewer-img",src:p.value[c.value]},null,8,bd)])):(a.openBlock(),a.createElementBlock("div",kd,"加载中"))],64)):(a.openBlock(),a.createBlock(M,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(a.openBlock(),a.createBlock(M,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),wd=er._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 $=[],R=G=>{(G||[]).forEach(ie=>{if(!ie)return;const Se=ie.children||ie.childrens||ie.columns;Array.isArray(Se)&&Se.length>0?R(Se):$.push(ie)})};return R(g),$},i=l,s=r,c=a.computed(()=>{var g;return((g=D.value)==null?void 0:g.allowAdd)!==!1}),m=a.computed(()=>{var g;return((g=D.value)==null?void 0:g.allowReplace)!==!1}),p=g=>{if(!g)return[];if(Array.isArray(g))return g;if(typeof g=="string")try{const $=JSON.parse(g);return Array.isArray($)?$:[]}catch{return[]}return[]},h=g=>{s("preview-file",g)},y=a.ref([]),u=a.ref(0),w=a.ref("");a.watch(()=>i.candidates,g=>{var $,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=($=y.value)==null?void 0:$[0])==null?void 0:R.selectedTargetId)||""},{immediate:!0,deep:!0}),a.watch(()=>i.visible,g=>{var $,R;g&&(u.value=0,w.value=((R=($=y.value)==null?void 0:$[0])==null?void 0:R.selectedTargetId)||"")});const D=a.computed(()=>{var $;const g=Number(u.value||0);return(($=y.value||[])==null?void 0:$[g])||null}),V=a.computed(()=>(n(i.columns||[])||[]).filter(R=>R&&R.prop).filter(R=>R.type!=="operate"&&R.label!=="操作"&&R.prop!=="operate")),E=a.computed(()=>V.value.filter(g=>g.label!=="证书附件"&&g.prop!=="证书附件")),Y=g=>{if(!g)return;const $=(y.value||[]).findIndex(R=>(R==null?void 0:R.idx)===(g==null?void 0:g.idx));$>-1&&(u.value=$,w.value=(g==null?void 0:g.selectedTargetId)||"")},M=g=>{if(!g){w.value="";return}w.value=String((g==null?void 0:g.id)??"")},O=(g,$="")=>{const R=Number(u.value||0),G=y.value||[],ie=G[R];ie&&(ie.__decision=g,ie.selectedTargetId=$,w.value=$,y.value=[...G])},j=()=>O("skip",""),C=()=>O("add",""),S=()=>{if(!w.value){Ka.ElMessage.warning("请先选择要替换的目标记录");return}O("replace",w.value)},_=()=>{s("update:visible",!1)},k=()=>{const g=y.value||[];if(g.find(R=>(R==null?void 0:R.__decision)==="replace"&&!(R!=null&&R.selectedTargetId))){Ka.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}s("submit",g),s("update:visible",!1)};return(g,$)=>{const R=a.resolveComponent("el-table-column"),G=a.resolveComponent("svg-icon"),ie=a.resolveComponent("el-table"),Se=a.resolveComponent("el-button"),te=a.resolveComponent("el-alert");return a.openBlock(),a.createBlock(_r.ssDialog,{title:"OCR候选匹配",visible:l.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:_},{default:a.withCtx(()=>{var Z,fe;return[a.createElementVNode("div",_d,[a.createElementVNode("div",Sd,[$[0]||($[0]=a.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),a.createVNode(ie,{data:y.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:Y},{default:a.withCtx(()=>[a.createVNode(R,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.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:se})=>[ae.label==="证书附件"||ae.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[p(se==null?void 0:se[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(De=>h({row:se,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((se==null?void 0:se[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,[$[4]||($[4]=a.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),a.createElementVNode("div",Ad,[a.createVNode(Se,{id:"themeBorderButton",onClick:j},{default:a.withCtx(()=>$[1]||($[1]=[a.createTextVNode("跳过本行")])),_:1,__:[1]}),a.createVNode(Se,{id:"themeBorderButton",onClick:C,disabled:!c.value},{default:a.withCtx(()=>$[2]||($[2]=[a.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),a.createVNode(Se,{class:"ok-button",id:"themeButton",onClick:S,disabled:!m.value||!w.value},{default:a.withCtx(()=>$[3]||($[3]=[a.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((Z=D.value)==null?void 0:Z.candidates)||[]).length===0?(a.openBlock(),a.createBlock(te,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):a.createCommentVNode("",!0),a.createVNode(ie,{data:((fe=D.value)==null?void 0:fe.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:M,"highlight-current-row":""},{default:a.withCtx(()=>[a.createVNode(R,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(V.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:se})=>[ae.label==="证书附件"||ae.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[p(se==null?void 0:se[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(De=>h({row:se,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((se==null?void 0:se[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(Se,{id:"themeBorderButton",onClick:_},{default:a.withCtx(()=>$[5]||($[5]=[a.createTextVNode("取消")])),_:1,__:[5]}),a.createVNode(Se,{class:"ok-button",id:"themeButton",onClick:k},{default:a.withCtx(()=>$[6]||($[6]=[a.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Od=er._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,i=r,s=a.ref([]),c=a.ref([]),m=a.ref([]);a.watch(()=>n.visible,V=>{V&&(s.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),c.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),m.value=[...n.ocrSelectedFields])});const p=(V,E)=>{const Y=[...m.value];if(E)Y.includes(V)||Y.push(V);else{const M=Y.indexOf(V);M>-1&&Y.splice(M,1)}m.value=Y,i("update:ocrSelectedFields",Y)},h=(V,E,Y)=>{i("fieldChange",{rowIndex:V,prop:E,value:Y})},y=()=>{i("update:ocrPreviewData",s.value),i("confirm",s.value),i("update:visible",!1)},u=()=>{i("update:visible",!1)},w=V=>typeof V!="number"?"-":`${(V*100).toFixed(1)}%`,D=V=>typeof V!="number"?"#606266":V>=.9?"#67c23a":V>=.7?"#e6a23c":"#f56c6c";return(V,E)=>{const Y=a.resolveComponent("el-alert"),M=a.resolveComponent("el-table-column"),O=a.resolveComponent("el-checkbox"),j=a.resolveComponent("el-input"),C=a.resolveComponent("el-table"),S=a.resolveComponent("el-button");return a.openBlock(),a.createBlock(_r.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(Y,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",Rd,[a.createVNode(C,{data:s.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(M,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,_=>(a.openBlock(),a.createBlock(M,{key:_.prop,prop:_.prop,"min-width":_.minWidth||230,"class-name":_.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",Vd,[_.isAccuracy?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(O,{key:0,"model-value":m.value.includes(_.prop),onChange:k=>p(_.prop,k),onClick:E[0]||(E[0]=a.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),a.createElementVNode("span",null,a.toDisplayString(_.label),1)])]),default:a.withCtx(({row:k,$index:g})=>[_.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:D(k[_.prop]),fontWeight:500})},a.toDisplayString(w(k[_.prop])),5)):(a.openBlock(),a.createBlock(j,{key:1,modelValue:k[_.prop],"onUpdate:modelValue":$=>k[_.prop]=$,size:"small",placeholder:"请输入"+_.label,onChange:$=>h(g,_.prop,$)},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(()=>E[1]||(E[1]=[a.createTextVNode("取消")])),_:1,__:[1]}),a.createVNode(S,{class:"ok-button",onClick:y,id:"themeButton"},{default:a.withCtx(()=>E[2]||(E[2]=[a.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},jd=er._export_sfc(Pd,[["__scopeId","data-v-df66eb1f"]]),No=l=>{var i;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=(i=me.analyzeSplitToContent(r,","))==null?void 0:i.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)),pn(s)));return n=n==null?void 0:n.join(","),n};function ec(l){return Ka.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",l)}function Hd(l){return Ka.axios.get(l,{responseType:"blob"})}let Yl="$R",Ud="http://222.92.178.198:55002/AIRobot",ut=["Form","BarChart","FormText","FormBlock"];const ac=l=>{var n,i;let r=(i=me.analyzeSplitToContent(l,"@"))==null?void 0:i[((n=me.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,i)=>{var c,m,p,h,y,u,w,D,V,E,Y,M,O,j,C,S,_,k,g,$,R,G,ie,Se,te,Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la;let s=l;if(ac(s==null?void 0:s[0])){let ve=Zd(s),Ge=(c=ve==null?void 0:ve.filter)==null?void 0:c.join(","),Oe=[];(m=ve==null?void 0:ve.hideContents)==null||m.forEach(Fe=>{if(Fe){const xa=Fe;xa&&Oe.push(`(HideGroup=Yes, prop=${xa})`)}});let ce=(p=ve==null?void 0:ve.formContents)==null?void 0:p.filter(Fe=>{var xa;return(xa=Fe==null?void 0:Fe.filters)==null?void 0:xa.includes("@ShowHide=Hide")});(ce==null?void 0:ce.length)>0&&(ce==null||ce.forEach(Fe=>{if(Fe){const xa=Fe==null?void 0:Fe.prop;xa&&Oe.push(`(Hide=Yes, prop=${xa})`)}}));let ze=(i==null?void 0:i.menuFilter)??[];return Array.isArray(ze)||(ze=ze?[ze]:[]),ze=[...ze,...Oe],{key:"Form",name:ve==null?void 0:ve.groupName,value:ve==null?void 0:ve.formContents,contents:Array.isArray((h=ve==null?void 0:ve.contents)==null?void 0:h[0])&&((u=(y=ve==null?void 0:ve.contents)==null?void 0:y[0])!=null&&u.every(Fe=>Array.isArray(Fe)))?[(D=(w=ve==null?void 0:ve.contents)==null?void 0:w[0])==null?void 0:D[n]]:[ve==null?void 0:ve.contents],filter:"("+Ge+")",menuFilter:ze,groupFilter:ve==null?void 0:ve.groupFilters}}else if(((V=s==null?void 0:s[0])==null?void 0:V[0])!=="&"){let ve=nc(s,i),Ge="";(E=ve==null?void 0:ve.tableFilter)!=null&&E.includes(Yl)?ve.tableFilter=(Y=ve==null?void 0:ve.tableFilter)==null?void 0:Y.replace(Yl,""):Ge=(j=(O=(M=ve==null?void 0:ve.tableFilter)==null?void 0:M.replace("(",Yl))==null?void 0:O.split(Yl))==null?void 0:j[0];let Oe=[];ve!=null&&ve.tableFilter&&((C=me.analyzeSplitToContent(ve==null?void 0:ve.tableFilter,","))==null||C.forEach(ze=>{ze!=null&&ze.includes("@ShowHide=Hide")&&Oe.push("HideGroup=Yes")}));let ce=(i==null?void 0:i.menuFilter)??[];return Array.isArray(ce)||(ce=ce?[ce]:[]),ce=[...ce,...Oe],{key:"Table",name:ve==null?void 0:ve.groupName,tableColumns:ve==null?void 0:ve.tableColumns,assistColumn:ve==null?void 0:ve.columns,tableContents:r===1?ve==null?void 0:ve.tableContents:(_=(S=ve==null?void 0:ve.tableContents)==null?void 0:S[n])!=null&&_.every(ze=>Array.isArray(ze))?(k=ve==null?void 0:ve.tableContents)==null?void 0:k[n]:[(g=ve==null?void 0:ve.tableContents)==null?void 0:g[n]],filter:ve==null?void 0:ve.tableFilter,menuFilter:ce,quotePage:Ge!==""?((G=(R=($=Ge==null?void 0:Ge.replace("*",Yl))==null?void 0:$.split(Yl))==null?void 0:R[0])==null?void 0:G.replaceAll(":","/"))??"":void 0,quoteGroup:Ge!==""?((se=(ae=(fe=(Z=(te=(Se=(ie=Ge==null?void 0:Ge.replace("*",Yl))==null?void 0:ie.split(Yl))==null?void 0:Se[1])==null?void 0:te.replace("{",Yl))==null?void 0:Z.split(Yl))==null?void 0:fe[0])==null?void 0:ae.split(":"))==null?void 0:se.filter(ze=>ze!==""))??[]:[],relatedQuotes:ve==null?void 0:ve.relatedQuotes,fatherSyncContents:ve==null?void 0:ve.fatherSyncContents,sonSyncContents:ve==null?void 0:ve.sonSyncContents}}else{let ve=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Ge=s==null?void 0:s[0];Ge=Ge==null?void 0:Ge.slice(1,Ge==null?void 0:Ge.length),Ge=me.analyzeSplitToContent(Ge,":"),Ge=Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1];let Oe=[];Oe.push("1");let ce=Ge==null?void 0:Ge.replace("(",Yl);ce=(De=ce==null?void 0:ce.split(Yl))==null?void 0:De[0],Oe.push(ce);let ze=Ge==null?void 0:Ge.replace("(",Yl);if(ze=(Pe=ze==null?void 0:ze.split(Yl))==null?void 0:Pe[1],ze=(B=(ke=ze==null?void 0:ze.replace(")",Yl))==null?void 0:ke.split(Yl))==null?void 0:B[0],(re=(q=ze==null?void 0:ze.replace(",",Yl))==null?void 0:q.split(Yl))==null||re.forEach(Fe=>{Oe.push(Fe)}),Oe.push(""),Oe.push(""),(Ae=Oe==null?void 0:Oe[2])!=null&&Ae.includes(".xlsx")||(Ee=Oe==null?void 0:Oe[2])!=null&&Ee.includes(".xls"))try{let Fe=Ud+"/"+(Oe==null?void 0:Oe[2]),xa=await Hd(Fe),Ma=`生成js函数名称为${Oe==null?void 0:Oe[1]}的函数,规则为:`+(Oe==null?void 0:Oe[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((xa==null?void 0:xa.status)===200){let P=xa==null?void 0:xa.data;const H=new FormData;H.append("file",P,Oe==null?void 0:Oe[2]),H.append("query",Ma);let Q=await ec(H);Q=(Ta=(da=(We=Q==null?void 0:Q.data)==null?void 0:We.data)==null?void 0:da.response)==null?void 0:Ta.replace("generateResult",Oe==null?void 0:Oe[1]),Oe[Oe.length-2]=Q,Oe[Oe.length-1]=[{name:(la=(le=Oe==null?void 0:Oe[2])==null?void 0:le.split("."))==null?void 0:la[0],url:Fe}]}}catch{}return Oe=[Oe],{key:"Method",name:[],tableContents:Oe,tableColumns:ve}}},Wd=(l,r)=>{var i,s,c,m,p,h,y,u,w,D,V,E,Y,M,O,j,C,S,_,k,g,$,R,G,ie,Se,te,Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe;let n=(s=(i=me.analyzeSplitToContent(l,"="))==null?void 0:i.filter(ce=>ce!=="="))==null?void 0:s.map(ce=>((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));if(ac(n==null?void 0:n[1])){let ce=Xd(n),ze=(p=(m=(c=ce==null?void 0:ce.filter)==null?void 0:c.replace("@",Yl))==null?void 0:m.split(Yl))==null?void 0:p[0],Fe=(u=(y=(h=ce==null?void 0:ce.filter)==null?void 0:h.replace("(",Yl))==null?void 0:y.split(Yl))==null?void 0:u[1],xa=(V=(D=(w=ce==null?void 0:ce.filter)==null?void 0:w.replace("(",Yl))==null?void 0:D.split(Yl))==null?void 0:V[0];xa="@"+((E=xa==null?void 0:xa.split("@"))==null?void 0:E[1]),Fe=Fe==null?void 0:Fe.slice(0,(Fe==null?void 0:Fe.length)-1),Fe=(M=(Y=me.analyzeSplitToContent(Fe,","))==null?void 0:Y.map(P=>(P=xa+P,P)))==null?void 0:M.join("");let Ma=ze+"("+Fe+")";return{key:"Form",name:ce==null?void 0:ce.group,filter:Ma,formPage:((C=(j=(O=ze==null?void 0:ze.replace("*",Yl))==null?void 0:O.split(Yl))==null?void 0:j[0])==null?void 0:C.replaceAll(":","/"))??"",formGroup:((G=(R=($=(g=(k=(_=(S=ze==null?void 0:ze.replace("*",Yl))==null?void 0:S.split(Yl))==null?void 0:_[1])==null?void 0:k.replace("{",Yl))==null?void 0:g.split(Yl))==null?void 0:$[0])==null?void 0:R.split(":"))==null?void 0:G.filter(P=>P!==""))??[],value:[],menuFilter:r==null?void 0:r.menuFilter}}else{let ce=nc(n,r,n==null?void 0:n[1]),ze="";(ie=ce==null?void 0:ce.tableFilter)!=null&&ie.includes(Yl)?ce.tableFilter=(Se=ce==null?void 0:ce.tableFilter)==null?void 0:Se.replace(Yl,""):ze=(fe=(Z=(te=ce==null?void 0:ce.tableFilter)==null?void 0:te.replace("(",Yl))==null?void 0:Z.split(Yl))==null?void 0:fe[0];let Fe=(De=(se=(ae=ce==null?void 0:ce.tableFilter)==null?void 0:ae.replace("(",Yl))==null?void 0:se.split(Yl))==null?void 0:De[0];Fe=[{menus:(ke=(Pe=Fe==null?void 0:Fe.split("*"))==null?void 0:Pe[0])==null?void 0:ke.replaceAll(":","/"),groups:((q=(B=Fe==null?void 0:Fe.split("*"))==null?void 0:B[1])==null?void 0:q.split(":"))??[]}];let xa=(Ee=(Ae=(re=ce==null?void 0:ce.tableFilter)==null?void 0:re.replace("(",Yl))==null?void 0:Ae.split(Yl))==null?void 0:Ee[1];(xa==null?void 0:xa[(xa==null?void 0:xa.length)-1])===")"&&(xa=xa==null?void 0:xa.slice(0,(xa==null?void 0:xa.length)-1));let Ma=[];ce!=null&&ce.tableFilter&&((We=me.analyzeSplitToContent(ce==null?void 0:ce.tableFilter,","))==null||We.forEach(H=>{H!=null&&H.includes("@ShowHide=Hide")&&Ma.push("HideGroup=Yes")}));let P=(r==null?void 0:r.menuFilter)??[];return Array.isArray(P)||(P=P?[P]:[]),P=[...P,...Ma],{key:"Table",name:ce==null?void 0:ce.groupName,filter:ce==null?void 0:ce.tableFilter,tableColumns:ce==null?void 0:ce.tableColumns,quotePage:ze!==""?((le=(Ta=(da=ze==null?void 0:ze.replace("*",Yl))==null?void 0:da.split(Yl))==null?void 0:Ta[0])==null?void 0:le.replaceAll(":","/"))??"":void 0,quoteGroup:ze!==""?((Oe=(Ge=(ve=(la=ze==null?void 0:ze.replace("*",Yl))==null?void 0:la.split(Yl))==null?void 0:ve[1])==null?void 0:Ge.split(":"))==null?void 0:Oe.filter(H=>H!==""))??[]:[],menuFilter:P,relatedQuotes:Fe,fatherSyncContents:(ce==null?void 0:ce.fatherSyncContents)??[],sonSyncContents:(ce==null?void 0:ce.sonSyncContents)??[]}}},Kd=async(l,r)=>{let n=[],i=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 p=>{var h,y;if(m.push(p),((h=me.analyzeSplitToContent(l,"="))==null?void 0:h.length)<=2){if(((y=me.analyzeSplitToContent(l,"="))==null?void 0:y.length)!==0){const u=await qd(me.analyzeSplitToContent(l,"="),i,c,p);m.push(u)}}else m.push(Wd(l,p))}),await Promise.all(s),n.push(m)}),await Promise.all(r),n};let Vi="/",Gd="$",mn="$R";const lc=l=>{var n,i,s;let r="";if((l==null?void 0:l.length)>1){let c=l==null?void 0:l.filter((m,p)=>p!==0);c=c==null?void 0:c.join(""),c=me.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,p)=>p!==(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[((i=l==null?void 0:l[0])==null?void 0:i.length)-2])==="@"&&(r="@"+r)}return{filter:r}},rc=(l,r=[])=>{let n=(l==null?void 0:l.map(c=>{var m,p;return(p=c==null?void 0:c.key)==null?void 0:p.slice(1,(m=c==null?void 0:c.key)==null?void 0:m.length)}))??[],i=[];n==null||n.forEach(c=>{var m,p,h,y,u,w,D,V,E,Y,M,O,j,C,S,_,k,g,$,R,G,ie,Se;if(c===""&&(c="算法库:通用算法"),c!=null&&c.includes(Gd)){let te="",Z=!0,fe=me.analyzerSplitToWord(c,"(");(fe==null?void 0:fe.length)>1&&(te="("+((m=me.analyzerSplitToWord(fe==null?void 0:fe[1],")"))==null?void 0:m[0]),((h=fe==null?void 0:fe[0])==null?void 0:h[((p=fe==null?void 0:fe[0])==null?void 0:p.length)-2])==="@"&&(te="@"+te));let ae=c;ae=ae==null?void 0:ae.replace(te,""),te=pn(te),te=(y=me.analyzeSplitToContent(te,","))==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)),te!=null&&te.includes("@ShowHide=Hide")&&(Z=!1);let se=(u=ae==null?void 0:ae.replace("$",mn))==null?void 0:u.split(mn),De=se==null?void 0:se[1],Pe=se==null?void 0:se[0];Pe!=null&&Pe.includes("[")&&(Pe=(D=(w=Pe==null?void 0:Pe.replace("[",mn))==null?void 0:w.split(mn))==null?void 0:D[0],De=De+":["+((Y=(E=(V=se==null?void 0:se[0])==null?void 0:V.replace("[",mn))==null?void 0:E.split(mn))==null?void 0:Y[1])),Pe=(O=(M=Pe==null?void 0:Pe.replaceAll(":","/"))==null?void 0:M.replaceAll("{",""))==null?void 0:O.replaceAll("}",""),(Pe==null?void 0:Pe[(Pe==null?void 0:Pe.length)-1])!=="/"&&(Pe=Pe+"/"),De=((j=Pe==null?void 0:Pe.split("/"))==null?void 0:j[0])+":"+De;let B="";if(!(De!=null&&De.includes("[")))B=De==null?void 0:De.replaceAll(":","/"),i==null||i.push({path:B,isShow:Z,filter:te,fatherPath:Pe});else{let q=(S=(C=De==null?void 0:De.replace("[",mn))==null?void 0:C.split(mn))==null?void 0:S[1];q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1),q=(_=me.analyzeSplitToContent(q,","))==null?void 0:_.map(re=>((re==null?void 0:re[(re==null?void 0:re.length)-1])===","&&(re=re==null?void 0:re.slice(0,(re==null?void 0:re.length)-1)),re)),q==null||q.forEach(re=>{var Ae,Ee;B=((Ee=(Ae=De==null?void 0:De.replace("[",mn))==null?void 0:Ae.split(mn))==null?void 0:Ee[0])+re,B=B==null?void 0:B.replaceAll(":","/"),i==null||i.push({path:B,isShow:Z,filter:te,fatherPath:Pe})})}}else{let te="",Z=!0,fe=me.analyzerSplitToWord(c,"(");(fe==null?void 0:fe.length)>1&&(te=(k=lc(fe))==null?void 0:k.filter);let ae=c;if(ae=ae==null?void 0:ae.replace(te,""),(te==null?void 0:te[0])==="("){te=te==null?void 0:te.slice(1,(te==null?void 0:te.length)-1);let De=[];(g=me.analyzeSplitToContent(te,","))==null||g.forEach(Pe=>{(Pe==null?void 0:Pe[(Pe==null?void 0:Pe.length)-1])===","&&(Pe=Pe==null?void 0:Pe.slice(0,(Pe==null?void 0:Pe.length)-1)),(Pe==null?void 0:Pe[0])==="("&&(Pe=Pe==null?void 0:Pe.slice(1,(Pe==null?void 0:Pe.length)-1)),(Pe==null?void 0:Pe[0])!=="@"&&(Pe="@"+Pe),De.push(pn(Pe))}),te=De==null?void 0:De.join(",")}else te=pn(te);te=($=me.analyzeSplitToContent(te,","))==null?void 0:$.map(De=>((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)),te!=null&&te.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 se="";if(ae!=null&&ae.includes("[")){let De=(G=ae==null?void 0:ae.replace("[",mn))==null?void 0:G.split(mn),Pe=De==null?void 0:De[1];Pe=Pe==null?void 0:Pe.slice(0,(Pe==null?void 0:Pe.length)-1),(Se=(ie=me.analyzeSplitToContent(Pe,","))==null?void 0:ie.map(ke=>((ke==null?void 0:ke[(ke==null?void 0:ke.length)-1])===","&&(ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1)),ke)))==null||Se.forEach(ke=>{se=(De==null?void 0:De[0])+ke,se=se==null?void 0:se.replaceAll(":","/"),i==null||i.push({path:se,isShow:Z,filter:te})})}else se=ae==null?void 0:ae.replaceAll(":","/"),i==null||i.push({path:se,isShow:Z,filter:te})}});let s=L.cloneDeep(i);return(r==null?void 0:r.length)>0&&(s=r),s=s==null?void 0:s.filter(c=>{var m,p,h,y;return!(c!=null&&c.fatherPath)&&((p=(m=c==null?void 0:c.path)==null?void 0:m.split(Vi))==null?void 0:p.length)>1&&((y=(h=c==null?void 0:c.path)==null?void 0:h.split(Vi))==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(Vi,""),c.path}),(s==null?void 0:s.length)>0&&(i=i==null?void 0:i.map(c=>{var p,h,y,u,w,D,V;let m=s==null?void 0:s.find(E=>{var Y;return(Y=c==null?void 0:c.path)==null?void 0:Y.includes(E)});return!(c!=null&&c.fatherPath)&&m&&!((p=c==null?void 0:c.path)!=null&&p.includes(Vi))&&!(s!=null&&s.find(E=>(c==null?void 0:c.path)===E))&&(c.path=m+Vi+((V=(y=(h=c==null?void 0:c.path)==null?void 0:h.split(m))==null?void 0:y[1])==null?void 0:V.slice(1,(D=(w=(u=c==null?void 0:c.path)==null?void 0:u.split(m))==null?void 0:w[1])==null?void 0:D.length))),c})),i},Yd=(l,r)=>rc([{key:l}],r),Jd=async(l,r)=>{const n=[],i=Yd(l==null?void 0:l.key,r);return i&&(i==null?void 0:i.length)>0&&(i==null||i.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 gl="$R",ji="[Any]";const Xd=l=>{var m,p;let r={},i=l==null?void 0:l[0];(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),i=i==null?void 0:i.split(":"),r.group=i;let s=l==null?void 0:l[1],c;return s!=null&&s.includes("{")?c=(p=(m=s==null?void 0:s.replaceAll("{",""))==null?void 0:m.replaceAll("}",""))==null?void 0:p.replaceAll(ji,""):c=s==null?void 0:s.replaceAll(ji,""),(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 D,V,E,Y,M,O;let r=[],n=[],i=[],s=[],c=[],m=[],p="",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=me.analyzeSplitToContent(h,":");(D=y==null?void 0:y.filter(j=>(j==null?void 0:j[0])!=="{"&&(j==null?void 0:j[0])!=="["))==null||D.forEach(j=>{var S,_,k;(j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1));let C=me.analyzerSplitToWord(j,"(");if((C==null?void 0:C.length)>1){p=(S=lc(C))==null?void 0:S.filter;let g=j==null?void 0:j.replace(p,"");if(i.push(g),(p==null?void 0:p[0])==="("){p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1);let $=[];(_=me.analyzeSplitToContent(p,","))==null||_.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),$.push(pn(R))}),p=$==null?void 0:$.join(",")}else p=pn(p);p=(k=me.analyzeSplitToContent(p,","))==null?void 0:k.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$)),p!=null&&p.includes("@ShowHide=Hide")&&m.push(g),s=[...s,...p]}else i.push(C==null?void 0:C[0])});let u=(V=y==null?void 0:y.filter(j=>(j==null?void 0:j[0])==="{"))==null?void 0:V[0],w=(E=y==null?void 0:y.filter(j=>(j==null?void 0:j[0])==="["))==null?void 0:E[0];return r=Ni(w??""),r!=null&&r.every(j=>Array.isArray(j))&&(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=(Y=me.analyzeSplitToContent(u,"@"))==null?void 0:Y[1],c="@"+c,u=u==null?void 0:u.replace(c,""),c=pn(c),c=(M=me.analyzeSplitToContent(c,","))==null?void 0:M.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),(u==null?void 0:u[0])==="{"&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1)),u=(O=me.analyzeSplitToContent(u,","))==null?void 0:O.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),u==null||u.forEach((j,C)=>{var Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma,P,H,Q,he,ge,ha;let S=[],_=[],k=!1,g,$=[],R=[],G=[],ie="Input",Se=[],te=[];if(j!=null&&j.includes("==")){g=(Z=j==null?void 0:j.split("=="))==null?void 0:Z[0];let Qe=(fe=j==null?void 0:j.split("=="))==null?void 0:fe[1],pe="";((ae=me.analyzeSplitToContent(Qe,"$"))==null?void 0:ae.length)>1&&((se=me.analyzeSplitToContent(Qe,"$"))==null?void 0:se[0])!=="$"?(pe=(De=me.analyzeSplitToContent(Qe,"$"))==null?void 0:De[0],pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1)):((Pe=me.analyzeSplitToContent(Qe,"}"))==null?void 0:Pe.length)>1&&(pe=(ke=me.analyzeSplitToContent(Qe,"}"))==null?void 0:ke[1]);let Ce=Qe==null?void 0:Qe.replace(pe,"");(pe==null?void 0:pe[0])==="("&&(pe=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1)),(B=me.analyzeSplitToContent(pe,","))==null||B.forEach(qe=>{var Aa;(qe==null?void 0:qe[0])!=="@"&&(qe="@"+qe),(qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])===","&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1));let Ia=pn(qe);(Aa=me.analyzeSplitToContent(Ia,","))==null||Aa.forEach(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)),S.push(Ze)})}),(Ce==null?void 0:Ce[0])==="$"&&(Ce=Ce==null?void 0:Ce.slice(1,Ce==null?void 0:Ce.length));let ma=(q=Ce==null?void 0:Ce.replace("*",gl))==null?void 0:q.split(gl);$=(re=ma==null?void 0:ma[0])==null?void 0:re.split(":"),R=(Ee=(Ae=me.analyzeSplitToContent(ma==null?void 0:ma[1],":"))==null?void 0:Ae.filter((qe,Ia)=>{var Aa,Ze;return Ia!==((Ze=(Aa=ma==null?void 0:ma[1])==null?void 0:Aa.split(":"))==null?void 0:Ze.length)-1}))==null?void 0:Ee.map(qe=>((qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])===":"&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1)),qe)),G=(da=(We=me.analyzeSplitToContent(ma==null?void 0:ma[1],":"))==null?void 0:We.filter((qe,Ia)=>{var Aa,Ze;return Ia===((Ze=(Aa=ma==null?void 0:ma[1])==null?void 0:Aa.split(":"))==null?void 0:Ze.length)-1}))==null?void 0:da[0],G=(le=(Ta=G==null?void 0:G.replaceAll("{",""))==null?void 0:Ta.replaceAll("}",""))==null?void 0:le.split(":"),ie="Select"}else if(((la=me.analyzeSplitToContent(j,"="))==null?void 0:la.length)>1)if(ie="Select",g=(Ge=(ve=j==null?void 0:j.replace("=",gl))==null?void 0:ve.split(gl))==null?void 0:Ge[0],!(j!=null&&j.includes("If")))Se=(ce=(Oe=j==null?void 0:j.replace("=",gl))==null?void 0:Oe.split(gl))==null?void 0:ce[1],Se=Se==null?void 0:Se.split("||");else{let Qe=(Fe=(ze=j==null?void 0:j.replace("=",gl))==null?void 0:ze.split(gl))==null?void 0:Fe[1];te=(xa=me.analyzeSplitToContent(Qe,")"))==null?void 0:xa.filter(pe=>!(pe!=null&&pe.includes("If"))),te=te==null?void 0:te.map(pe=>((pe==null?void 0:pe[0])==="("&&(pe=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1)),pe=pe==null?void 0:pe.split("||"),pe)),_=(Ma=me.analyzeSplitToContent(Qe,")"))==null?void 0:Ma.filter(pe=>pe==null?void 0:pe.includes("If")),_=_==null?void 0:_.map(pe=>((pe==null?void 0:pe[0])==="|"&&(pe=pe==null?void 0:pe.slice(2,pe==null?void 0:pe.length)),(pe==null?void 0:pe[0])==="("&&(pe=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1)),(pe==null?void 0:pe[0])!=="@"&&(pe="@"+pe),pe))}else if(((P=me.analyzeSplitToContent(j,"@"))==null?void 0:P.length)>1){g=(H=me.analyzeSplitToContent(j,"@"))==null?void 0:H[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 Qe="@"+((Q=me.analyzeSplitToContent(j,"@"))==null?void 0:Q[1]);Qe=pn(Qe),S=(he=me.analyzeSplitToContent(Qe,","))==null?void 0:he.map(pe=>((pe==null?void 0:pe[(pe==null?void 0:pe.length)-1])===","&&(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1)),pe)),S!=null&&S.find(pe=>pe==null?void 0:pe.includes("@Type"))&&(ie=(ha=(ge=S==null?void 0:S.find(pe=>pe==null?void 0:pe.includes("@Type")))==null?void 0:ge.split("="))==null?void 0:ha[1])}else g=j;S!=null&&S.includes("@ShowHide=Hide")&&(k=!0),n.push({prop:g,label:g,value:"",menuPath:$,groups:R,columns:G,type:ie,options:Se,allContents:te,filters:S,width:u==null?void 0:u.length,isFormColHidden:k,filterContents:_})}),{groupName:i,groupFilters:s,formContents:n,contents:r,filter:c,hideContents:m}},Ni=l=>{var i,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])!=="[")(i=me.analyzeSplitToContent(n,","))==null||i.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=me.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(Ni(m))}),r=c}return r},mt=(l,r)=>{var O,j,C,S,_,k,g,$,R,G,ie,Se,te,Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma,P,H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa,Ze;let n,i=[],s=[],c=[],m=[],p=[],h=[],y=[],u="Input",w,D="",V="",E="",Y=[],M="";if(l!=null&&l.includes("==")||l!=null&&l.includes("=")||l!=null&&l.includes("@")||l!=null&&l.includes("||"))if(n=(O=l==null?void 0:l.split("=="))==null?void 0:O[0],w=(j=l==null?void 0:l.split("=="))==null?void 0:j[0],u="Select",l!=null&&l.includes("=")&&!(l!=null&&l.includes("=="))&&!((_=(S=(C=l==null?void 0:l.replace("=",gl))==null?void 0:C.split(gl))==null?void 0:S[1])!=null&&_.includes("If")))if(n=me.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("=",gl))==null?void 0:k.split(gl))==null?void 0:g[0],n!=null&&n.includes("&")&&(n=(R=($=n==null?void 0:n.replace("&",gl))==null?void 0:$.split(gl))==null?void 0:R[0]),w=n,((G=me.analyzeSplitToContent(l,"@"))==null?void 0:G.length)>1){if(!(l!=null&&l.includes("&"))){let oa=(ie=me.analyzeSplitToContent(l,"@"))==null?void 0:ie[1];if((oa==null?void 0:oa[0])!=="@"&&(oa="@"+oa),oa=pn(oa),V=oa,V!=null&&V.includes("@Type")){let ue=me.analyzeSplitToContent(V,",");ue=ue==null?void 0:ue.map(U=>((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)),U)),ue=(Se=ue==null?void 0:ue.filter(U=>U==null?void 0:U.includes("@Type")))==null?void 0:Se[0],u=(te=ue==null?void 0:ue.split("="))==null?void 0:te[1]}}}else l!=null&&l.includes("||")?i=(ae=(fe=(Z=l==null?void 0:l.split("="))==null?void 0:Z[1])==null?void 0:fe.split("||"))==null?void 0:ae.map(oa=>({label:oa==null?void 0:oa.replaceAll("'",""),value:oa==null?void 0:oa.replaceAll("'","")})):(u="Input",D=(Pe=(De=(se=l==null?void 0:l.replace("=",gl))==null?void 0:se.split(gl))==null?void 0:De[1])==null?void 0:Pe.replaceAll("'",""));else if((q=(B=(ke=l==null?void 0:l.replace("=",gl))==null?void 0:ke.split(gl))==null?void 0:B[1])!=null&&q.includes("||")){n=(re=l==null?void 0:l.split("="))==null?void 0:re[0],w=(Ae=l==null?void 0:l.split("="))==null?void 0:Ae[0];let oa=(We=(Ee=l==null?void 0:l.replace("=",gl))==null?void 0:Ee.split(gl))==null?void 0:We[1];oa=me.analyzeSplitToContent(oa,")");let ue=oa==null?void 0:oa.filter(W=>!(W!=null&&W.includes("If")));ue==null||ue.forEach(W=>{(W==null?void 0:W[0])==="("&&(W=W==null?void 0:W.slice(1,(W==null?void 0:W.length)-1)),s==null||s.push(W==null?void 0:W.split("||"))});let U=oa==null?void 0:oa.filter(W=>W==null?void 0:W.includes("If"));U=U==null?void 0:U.map(W=>((W==null?void 0:W[0])==="|"&&(W==null?void 0:W[1])==="|"&&(W=W==null?void 0:W.slice(2,W==null?void 0:W.length)),(W==null?void 0:W[0])==="("&&(W=W==null?void 0:W.slice(1,(W==null?void 0:W.length)-1)),(W==null?void 0:W[0])!=="@"&&(W="@"+W),W)),c=U}else{let oa=l==null?void 0:l.split("=="),ue=(da=oa==null?void 0:oa.filter(U=>(U==null?void 0:U.includes("$"))&&(U==null?void 0:U[0])!=="{"))==null?void 0:da[0];if(ue&&!(ue!=null&&ue.includes("&"))){let U=(Ta=ue==null?void 0:ue.replace("*",gl))==null?void 0:Ta.split(gl),W=(U==null?void 0:U[0])===""?r==null?void 0:r.value:U==null?void 0:U[0];(W==null?void 0:W[0])==="("&&(W=(le=me.analyzeSplitToContent(W,")"))==null?void 0:le[1]),W=(ve=(la=W==null?void 0:W.replaceAll("{",""))==null?void 0:la.replaceAll("}",""))==null?void 0:ve.replaceAll(ji,""),(W==null?void 0:W[0])==="$"&&(W=(Ge=W==null?void 0:W.slice(1,W==null?void 0:W.length))==null?void 0:Ge.replaceAll(":","/")),m=W==null?void 0:W.split("/");let Me=(ce=(Oe=U==null?void 0:U[1])==null?void 0:Oe.replace("{",gl))==null?void 0:ce.split(gl),we=Me==null?void 0:Me[0];(we==null?void 0:we[(we==null?void 0:we.length)-1])===":"&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),p=we==null?void 0:we.split(":"),h=(Ma=(xa=(Fe=(ze=Me==null?void 0:Me[1])==null?void 0:ze.replace("}",gl))==null?void 0:Fe.split(gl))==null?void 0:xa[0])==null?void 0:Ma.split(":");let na="";((P=me.analyzeSplitToContent(ue,")"))==null?void 0:P.length)>1&&(na=(H=me.analyzeSplitToContent(ue,")"))==null?void 0:H[0]),na&&na!==""&&((na==null?void 0:na[0])!=="@"&&(na="@"+na),V=No(na))}if(oa!=null&&oa.some(U=>(U==null?void 0:U[0])==="&")){let U=(Q=oa==null?void 0:oa.filter(we=>(we==null?void 0:we[0])==="&"))==null?void 0:Q[0];(U==null?void 0:U[0])==="&"&&(U=U==null?void 0:U.slice(1,U==null?void 0:U.length)),E=(ge=(he=U==null?void 0:U.replace("(",gl))==null?void 0:he.split(gl))==null?void 0:ge[0];let W=(ha=me.analyzeSplitToContent(U,")"))==null?void 0:ha[0];W=(pe=(Qe=W==null?void 0:W.replace("(",gl))==null?void 0:Qe.split(gl))==null?void 0:pe[1],W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1),(W==null?void 0:W[0])==="{"&&(W=W==null?void 0:W.slice(1,W==null?void 0:W.length)),(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)),Y=W==null?void 0:W.split(",");let Me=(Ce=me.analyzeSplitToContent(U,")"))==null?void 0:Ce[1];Me&&Me!==""&&(M=No(Me))}else if(!ue&&((ma=oa==null?void 0:oa.filter(U=>(U==null?void 0:U[0])==="{"))==null?void 0:ma.length)>0){let U=oa==null?void 0:oa[(oa==null?void 0:oa.length)-1];U=U==null?void 0:U.slice(1,(U==null?void 0:U.length)-1),U=me.analyzeSplitToContent(U,","),U=U==null?void 0:U.map(W=>((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)),U=U==null?void 0:U.map(W=>{var Me,we,na,ta;if(W=W==null?void 0:W.replaceAll("$",""),W!=null&&W.includes("{")){let Sa="";W=W==null?void 0:W.replaceAll("{","");let ba=W==null?void 0:W.split("}");Sa=((we=(Me=ba==null?void 0:ba[0])==null?void 0:Me.split(":"))==null?void 0:we[0])+":"+(ba==null?void 0:ba[1]),W=Sa,W=W+":"}if(W!=null&&W.includes(ji)){let Sa="",ba=W==null?void 0:W.split(ji);Sa=((ta=(na=ba==null?void 0:ba[0])==null?void 0:na.split(":"))==null?void 0:ta[0])+":"+(ba==null?void 0:ba[1]),W=Sa,W=W+":"}return W=W==null?void 0:W.replaceAll(":","/"),W}),y=U}else!((qe=oa==null?void 0:oa[1])!=null&&qe.includes("$"))&&((Ia=oa==null?void 0:oa[1])==null?void 0:Ia[0])!=="("&&h.push(oa==null?void 0:oa[1])}else n=(Aa=l==null?void 0:l.split("&"))==null?void 0:Aa[0],w=(Ze=l==null?void 0:l.split("&"))==null?void 0:Ze[0];return{label:n,prop:w,options:i,allContents:s,filterContents:c,menus:m,groups:p,words:h,align:"center",formType:u,filter:V,functionName:E,functionRelatedWords:Y,calculatorFilter:M,relatedPages:y,value:D}},Bo=(l,r)=>{var i,s,c,m,p,h,y,u,w,D,V,E,Y,M,O,j,C,S,_,k,g,$,R,G,ie,Se,te,Z,fe,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=(i=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:i.replace(":",gl))==null?void 0:s.split(gl))==null?void 0:c[0])!=null&&m.includes(","))){let se=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),De=(p=se==null?void 0:se.replace(":",gl))==null?void 0:p.split(gl);if(((h=me.analyzeSplitToContent(De==null?void 0:De[1],"="))==null?void 0:h.length)===1){let Pe=De==null?void 0:De[0],ke=[];(w=me.analyzeSplitToContent((u=De==null?void 0:De[1])==null?void 0:u.slice(1,((y=De==null?void 0:De[1])==null?void 0:y.length)-1),","))==null||w.forEach(B=>{var q,re;((q=me.analyzeSplitToContent(B,"="))==null?void 0:q.length)>1?((B==null?void 0:B[(B==null?void 0:B.length)-1])===","&&(B=B==null?void 0:B.slice(0,(B==null?void 0:B.length)-1)),ke=[...ke,...Bo(B,r)]):((B==null?void 0:B[(B==null?void 0:B.length)-1])===","&&(B=B==null?void 0:B.slice(0,(B==null?void 0:B.length)-1)),ke.push((re=Bo(B,r))==null?void 0:re[0]))}),n==null||n.push({label:Pe,prop:Pe,children:ke,align:"center"})}else{let Pe=[];if(((D=me.analyzeSplitToContent(se,"="))==null?void 0:D.length)>=2){let B=(V=me.analyzeSplitToContent(se,"="))==null?void 0:V[1],q=(E=me.analyzeSplitToContent(B,"/"))==null?void 0:E.map(re=>((re==null?void 0:re[(re==null?void 0:re.length)-1])==="/"&&(re=re==null?void 0:re.slice(0,(re==null?void 0:re.length)-1)),re));Pe=q==null?void 0:q.map(re=>(re=Ni(re),re))}let ke=(S=(C=(j=(O=(M=(Y=se==null?void 0:se.replace("{",gl))==null?void 0:Y.split(gl))==null?void 0:M[1])==null?void 0:O.replace("}",gl))==null?void 0:j.split(gl))==null?void 0:C[0])==null?void 0:S.split(",");ke==null||ke.forEach((B,q)=>{(Pe==null?void 0:Pe.length)>0&&q===0?n==null||n.push({label:B,prop:B,align:"center",formType:"Select",relatedContents:Pe==null?void 0:Pe.map(re=>{let Ae={};return ke==null||ke.forEach((Ee,We)=>{Ae[Ee]=re==null?void 0:re[We]}),Ae}),options:Pe==null?void 0:Pe.map(re=>({label:re==null?void 0:re[0],value:re==null?void 0:re[0]})),mainKey:!0}):n==null||n.push({label:B,prop:B,align:"center"})})}}else if((l==null?void 0:l[0])==="{")if(((_=me.analyzeSplitToContent(l,"="))==null?void 0:_.length)===2&&((g=(k=me.analyzeSplitToContent(l,"="))==null?void 0:k[1])==null?void 0:g[0])==="["){let se=[];if((($=me.analyzeSplitToContent(l,"="))==null?void 0:$.length)>=2){let Pe=(R=me.analyzeSplitToContent(l,"="))==null?void 0:R[1],ke=(ie=(G=me.analyzeSplitToContent(Pe,"|"))==null?void 0:G.filter(B=>B!=="|"))==null?void 0:ie.map(B=>((B==null?void 0:B[(B==null?void 0:B.length)-1])==="|"&&(B=B==null?void 0:B.slice(0,(B==null?void 0:B.length)-1)),B));se=ke==null?void 0:ke.map(B=>(B=Ni(B),B))}let De=(te=(Se=l==null?void 0:l.replace("}",gl))==null?void 0:Se.split(gl))==null?void 0:te[0];De=(Z=De==null?void 0:De.slice(1,De==null?void 0:De.length))==null?void 0:Z.split(","),De==null||De.forEach((Pe,ke)=>{(se==null?void 0:se.length)>0&&ke===0?n==null||n.push({label:Pe,prop:Pe,align:"center",formType:"Select",relatedContents:se==null?void 0:se.map(B=>{let q={};return De==null||De.forEach((re,Ae)=>{q[re]=B==null?void 0:B[Ae]}),q}),options:se==null?void 0:se.map(B=>({label:B==null?void 0:B[0],value:B==null?void 0:B[0]})),mainKey:!0}):n==null||n.push({label:Pe,prop:Pe,align:"center"})})}else(fe=me.analyzeSplitToContent(l,","))==null||fe.forEach(se=>{var De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma,P,H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa,Ze,oa,ue;if((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==null?void 0:se[0])==="{"){let U=me.analyzeSplitToContent(se,"="),W=U==null?void 0:U[(U==null?void 0:U.length)-1],Me=[],we=[],na=[],ta="",Sa="",ba=[],Pa=[],ya=(De=W==null?void 0:W.replace("*",gl))==null?void 0:De.split(gl),$e=(ya==null?void 0:ya[0])===""?r==null?void 0:r.value:ya==null?void 0:ya[0];$e=me.analyzeSplitToContent($e,")");let $a="";if(($e==null?void 0:$e.length)>1&&((Pe=$e==null?void 0:$e[0])==null?void 0:Pe[0])!=="&"&&($a=$e==null?void 0:$e[0],($a==null?void 0:$a[0])!=="@"&&($a="@"+$a),Sa=$a??""),$e=(ke=$e==null?void 0:$e.filter(bl=>(bl==null?void 0:bl[0])==="$"))==null?void 0:ke[0],((B=me.analyzeSplitToContent($e,"}"))==null?void 0:B.length)>1&&((re=(q=me.analyzeSplitToContent($e,"}"))==null?void 0:q[1])==null?void 0:re[0])==="("&&($a=(Ae=me.analyzeSplitToContent($e,"}"))==null?void 0:Ae[1],($a==null?void 0:$a[0])!=="@"&&($a="@"+$a),Sa!==""&&(Sa=Sa+","),Sa=Sa+$a),(Ee=$e==null?void 0:$e.slice(1,($e==null?void 0:$e.length)-1))!=null&&Ee.includes("$")||($e=(We=me.analyzeSplitToContent($e,"}"))==null?void 0:We[0]),($e==null?void 0:$e[0])==="$"&&($e=(da=$e==null?void 0:$e.replace("{",""))==null?void 0:da.replace("}",":"),$e=(Ta=$e==null?void 0:$e.slice(1,$e==null?void 0:$e.length))==null?void 0:Ta.replaceAll(":","/")),$e!=null&&$e.includes("$")){let bl=(le=$e==null?void 0:$e.split("$"))==null?void 0:le[0];bl=(la=bl==null?void 0:bl.split("/"))==null?void 0:la[0],$e=bl+"/"+((ve=$e==null?void 0:$e.split("$"))==null?void 0:ve[1])+"/"}Me=($e==null?void 0:$e.split("/"))??[];let fl=(Oe=(Ge=ya==null?void 0:ya[1])==null?void 0:Ge.replace("{",gl))==null?void 0:Oe.split(gl);if((Fe=(ze=(ce=ya==null?void 0:ya[1])==null?void 0:ce.split("(@"))==null?void 0:ze[0])!=null&&Fe.includes("&&")||(P=(Ma=(xa=ya==null?void 0:ya[1])==null?void 0:xa.split("@"))==null?void 0:Ma[0])!=null&&P.includes("&&")){let bl=(H=ya==null?void 0:ya[1])!=null&&H.includes("(@")?(ge=(he=(Q=ya==null?void 0:ya[1])==null?void 0:Q.split("(@"))==null?void 0:he[0])==null?void 0:ge.split("&&"):(pe=(Qe=(ha=ya==null?void 0:ya[1])==null?void 0:ha.split("@"))==null?void 0:Qe[0])==null?void 0:pe.split("&&");ba=bl==null?void 0:bl.map(qa=>{var Rl,Il;return(qa==null?void 0:qa[0])==="*"&&(qa=qa==null?void 0:qa.slice(1,qa==null?void 0:qa.length)),qa=(Il=(Rl=qa==null?void 0:qa.replace("{",gl))==null?void 0:Rl.split(gl))==null?void 0:Il[0],(qa==null?void 0:qa[(qa==null?void 0:qa.length)-1])===":"&&(qa=qa==null?void 0:qa.slice(0,(qa==null?void 0:qa.length)-1)),qa=qa==null?void 0:qa.split(":"),qa});let Vl=[];bl==null||bl.forEach((qa,Rl)=>{var Il,La;(qa==null?void 0:qa[0])==="*"&&(qa=qa==null?void 0:qa.slice(1,qa==null?void 0:qa.length)),qa=(La=(Il=qa==null?void 0:qa.replace("{",gl))==null?void 0:Il.split(gl))==null?void 0:La[1],(qa==null?void 0:qa[(qa==null?void 0:qa.length)-1])==="}"&&(qa=qa==null?void 0:qa.slice(0,(qa==null?void 0:qa.length)-1)),qa=qa==null?void 0:qa.split(","),Vl.push(Rl===0?(qa==null?void 0:qa.length)-1:qa==null?void 0:qa.length),Pa=[...Pa,...qa]}),Vl=(Ce=me.prefixSum(Vl))==null?void 0:Ce.map(qa=>qa==null?void 0:qa.total),ba=ba==null?void 0:ba.map((qa,Rl)=>({number:Vl==null?void 0:Vl[Rl],contents:qa}))}let Sl=fl==null?void 0:fl[0];(Sl==null?void 0:Sl[(Sl==null?void 0:Sl.length)-1])===":"&&(Sl=Sl==null?void 0:Sl.slice(0,(Sl==null?void 0:Sl.length)-1)),we=(Sl==null?void 0:Sl.split(":"))??[],na=((Aa=(Ia=(qe=(ma=fl==null?void 0:fl[1])==null?void 0:ma.replace("}",gl))==null?void 0:qe.split(gl))==null?void 0:Ia[0])==null?void 0:Aa.split(","))??[];let Xl=(oa=U==null?void 0:U[0])==null?void 0:oa.slice(1,((Ze=U==null?void 0:U[0])==null?void 0:Ze.length)-2);Sa&&Sa!==""&&(ta=No(Sa)),(ue=Xl==null?void 0:Xl.split(","))==null||ue.forEach((bl,Vl)=>{var qa,Rl,Il,La,al;((qa=me.analyzeSplitToContent(bl,"@"))==null?void 0:qa.length)>1&&(bl=(Rl=me.analyzeSplitToContent(bl,"@"))==null?void 0:Rl[0],(bl==null?void 0:bl[(bl==null?void 0:bl.length)-1])==="@"&&(bl=bl==null?void 0:bl.slice(0,(bl==null?void 0:bl.length)-1))),n.push({label:bl,prop:bl,align:"center",menus:Me,groups:(ba==null?void 0:ba.length)===0?we:(Il=ba==null?void 0:ba.find(ol=>(ol==null?void 0:ol.number)>=Vl))==null?void 0:Il.contents,words:(Pa==null?void 0:Pa.length)===0?(La=na==null?void 0:na[Vl])==null?void 0:La.split(":"):(al=Pa==null?void 0:Pa[Vl])==null?void 0:al.split(":"),formType:(Me==null?void 0:Me.length)>0?"Select":"Input",mainKey:Vl===0,filter:ta,isMainPath:(ba==null?void 0:ba.findIndex(ol=>(ol==null?void 0:ol.number)>=Vl))===0})})}else n.push({label:se,prop:se,align:"center"})});else{let se=(ae=me.analyzeSplitToContent(l,","))==null?void 0:ae.map(De=>((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));se==null||se.forEach(De=>{n.push(mt(De,r))})}return n},Qd=(l,r)=>{var m,p,h,y,u;let n=l;if(!l)return;let i="";((m=me.analyzeSplitToContent(l,"}"))==null?void 0:m.length)>1&&(n=(p=me.analyzeSplitToContent(l,"}"))==null?void 0:p[0],i=(h=me.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=me.analyzeSplitToContent(n,","))==null||y.forEach(w=>{var D;(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])==="{"?(D=Bo(w,r))==null||D.forEach(V=>{s.push(V)}):s.push(mt(w,r))}),s!=null&&s.some(w=>{var D;return(D=w==null?void 0:w.prop)==null?void 0:D.includes("@")})&&(s=s==null?void 0:s.filter(w=>{var D;return!((D=w==null?void 0:w.prop)!=null&&D.includes("@"))})),i!==""&&((i==null?void 0:i[0])=="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),(u=me.analyzeSplitToContent(i,","))==null||u.forEach(w=>{var D;(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])==="{"?(D=Bo(w,r))==null||D.forEach(V=>{c.push(V)}):c.push(mt(w,r))})),{columns:s,secondColumns:c}},pn=l=>{var r,n,i,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("(",gl))==null?void 0:r.split(gl))==null?void 0:n[1],p=(s=(i=l==null?void 0:l.replace("(",gl))==null?void 0:i.split(gl))==null?void 0:s[0];return m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1),m=(c=me.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)),p+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}},os=l=>{let r=l==null?void 0:l.map(n=>{var i,s;return{menus:n==null?void 0:n.menus,content:((i=n==null?void 0:n.menus)==null?void 0:i.join("/"))+gl+((s=n==null?void 0:n.groups)==null?void 0:s.join("/"))}});return r=r==null?void 0:r.filter(n=>{var i;return(n==null?void 0:n.menus)&&((i=n==null?void 0:n.menus)==null?void 0:i.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 i,s;return{menus:(i=n==null?void 0:n.split(gl))==null?void 0:i[0],groups:((s=n==null?void 0:n.split(gl))==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=me.analyzeSplitToContent(r,","))==null?void 0:n.map(i=>((i==null?void 0:i[(i==null?void 0:i.length)-1])===","&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),(i==null?void 0:i[0])!=="@"&&(i="@"+i),i=pn(i),i)),r==null?void 0:r.join(",")},nc=(l,r,n="")=>{var j,C,S,_,k,g,$,R,G,ie,Se,te,Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma,P,H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa,Ze,oa,ue;let i=[],s=[],c=[],m="",p="",h="",y=[],u=[],w=[],D="";if(((j=l==null?void 0:l[0])==null?void 0:j[0])!=="*"&&((C=l==null?void 0:l[0])==null?void 0:C[0])!=="$"&&!((S=l==null?void 0:l[0])!=null&&S.includes("$")))return;((_=l==null?void 0:l[0])==null?void 0:_[0])!=="*"&&((k=l==null?void 0:l[0])==null?void 0:k[0])!=="$"&&(m=(g=me.analyzeSplitToContent(l==null?void 0:l[0],")"))==null?void 0:g[0],(m==null?void 0:m[0])!=="@"&&(m="@"+m),m=No(m),h=($=me.analyzeSplitToContent(l==null?void 0:l[0],")"))==null?void 0:$[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 E=me.analyzeSplitToContent(l==null?void 0:l[0],":");if(i=(R=E==null?void 0:E.filter(U=>(U==null?void 0:U[0])!=="{"&&(U==null?void 0:U[0])!=="["))==null?void 0:R.join(""),p=(G=l==null?void 0:l[0])==null?void 0:G.replace(i,""),(i==null?void 0:i[0])==="("&&(i=""),D=(ie=E==null?void 0:E.filter(U=>(U==null?void 0:U[0])!=="["))==null?void 0:ie.join(""),D=(Se=l==null?void 0:l[0])==null?void 0:Se.replace(D,""),p=p==null?void 0:p.replace(D,""),(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),(i==null?void 0:i[(i==null?void 0:i.length)-1])===":"&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),((te=me.analyzeSplitToContent(p,"@"))==null?void 0:te.length)>1&&(m=(Z=me.analyzeSplitToContent(p,"@"))==null?void 0:Z[1],(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="@"+m,m=pn(m),p=(fe=me.analyzeSplitToContent(p,"@"))==null?void 0:fe[0],p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),((ae=me.analyzeSplitToContent(i,"@"))==null?void 0:ae.length)>1){m!==""&&(m=m+",");let U=(se=me.analyzeSplitToContent(i,"@"))==null?void 0:se[1];U="@"+U,U=pn(U),m=m+U,i=(De=me.analyzeSplitToContent(i,"@"))==null?void 0:De[0]}if((i==null?void 0:i[(i==null?void 0:i.length)-1])==="@"&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),i=i===""?[]:i==null?void 0:i.split(":"),(p==null?void 0:p[(p==null?void 0:p.length)-1])===":"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),n!==""){let U=(Pe=me.analyzeSplitToContent(n,")"))==null?void 0:Pe[0],W=(ke=me.analyzeSplitToContent(n,"@"))==null?void 0:ke[1];h=(q=(B=me.analyzeSplitToContent(n,"@"))==null?void 0:B[0])==null?void 0:q.replace(U,""),(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)),U=ts(U),W=ts(W);let Me=U??"";if(Me!==""&&(Me=Me+","),Me=Me+W,(Me==null?void 0:Me[(Me==null?void 0:Me.length)-1])===","&&(Me=Me==null?void 0:Me.slice(0,(Me==null?void 0:Me.length)-1)),Me!==""&&m!==""&&(m=m+","),m=m+Me,(h==null?void 0:h[0])==="$"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length)),h=(re=me.analyzeSplitToContent(h,":"))==null?void 0:re.filter((we,na)=>{var ta;return!((we==null?void 0:we[0])==="{"&&na===((ta=me.analyzeSplitToContent(h,":"))==null?void 0:ta.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 we=(Ee=(Ae=h==null?void 0:h.replace("*",gl))==null?void 0:Ae.split(gl))==null?void 0:Ee[1],na=(da=(We=h==null?void 0:h.replace("*",gl))==null?void 0:We.split(gl))==null?void 0:da[0];na=na==null?void 0:na.split("$"),na=((le=(Ta=na==null?void 0:na[0])==null?void 0:Ta.split(":"))==null?void 0:le[0])+":"+(na==null?void 0:na[1])+":",h=na+"*"+we}else h=(la=h==null?void 0:h.replaceAll("{",""))==null?void 0:la.replaceAll("}","")}m!==""&&m&&(m="("+m+")"),m=h+m,((ve=me.analyzeSplitToContent(p,"}"))==null?void 0:ve.length)>1&&(p=(Ge=me.analyzeSplitToContent(p,"}"))==null?void 0:Ge.filter(U=>(U==null?void 0:U[0])!=="@"),p=p==null?void 0:p.join(""));let Y=Qd(p,r);c=p===""?[]:(Y==null?void 0:Y.columns)??[],w=me.getColumnChild(c);let M=me.getColumnChild(c);c!=null&&c.some(U=>{var W;return Array.isArray(U==null?void 0:U.children)&&((W=U==null?void 0:U.children)==null?void 0:W.length)>0})&&(c=[c]),s=D?Ni(D):[],!(s!=null&&s.every(U=>Array.isArray(U)))&&(s==null?void 0:s.length)>0&&(s=[s]),(s==null?void 0:s.length)>0&&(Array.isArray(s==null?void 0:s[0])&&((Oe=s==null?void 0:s[0])!=null&&Oe.every(U=>Array.isArray(U)))?s=s==null?void 0:s.map((U,W)=>(U=U.map((Me,we)=>(Me.unshift("{}"),Me.unshift((we+1).toString()),Me)),U)):s=s==null?void 0:s.map((U,W)=>(U.unshift("{}"),U.unshift((W+1).toString()),U))),Y!=null&&Y.secondColumns&&((ce=Y==null?void 0:Y.secondColumns)==null?void 0:ce.length)>0&&((s==null?void 0:s.length)>0?s=s==null?void 0:s.map((U,W)=>{var Me,we;return Array.isArray(U==null?void 0:U[0])?U=U==null?void 0:U.map((na,ta)=>{var Sa,ba;return na.unshift((ba=(Sa=Y==null?void 0:Y.secondColumns)==null?void 0:Sa[ta])==null?void 0:ba.prop),na}):U.unshift((we=(Me=Y==null?void 0:Y.secondColumns)==null?void 0:Me[W])==null?void 0:we.prop),U}):s=(ze=Y==null?void 0:Y.secondColumns)==null?void 0:ze.map((U,W)=>(U=[U==null?void 0:U.label],U.push(W),U)),c.unshift({label:"",prop:"disabled",sortable:!1})),w=w==null?void 0:w.map(U=>{var W,Me;return{menus:U==null?void 0:U.menus,content:((W=U==null?void 0:U.menus)==null?void 0:W.join("/"))+gl+((Me=U==null?void 0:U.groups)==null?void 0:Me.join("/"))}});let O=[];if(((xa=(Fe=m==null?void 0:m.replace("(",gl))==null?void 0:Fe.split(gl))==null?void 0:xa[0])!==""&&(O=(P=(Ma=m==null?void 0:m.replace("(",gl))==null?void 0:Ma.split(gl))==null?void 0:P[0],O=[O],O=O==null?void 0:O.map(U=>{var Me,we,na;let W=U==null?void 0:U.split("*");return{menus:(Me=W==null?void 0:W[0])==null?void 0:Me.split(":"),content:((we=W==null?void 0:W[0])==null?void 0:we.replaceAll(":","/"))+gl+((na=W==null?void 0:W[1])==null?void 0:na.replaceAll(":","/"))}}),w=[...w,...O]),w=w==null?void 0:w.filter(U=>{var W;return(U==null?void 0:U.menus)&&((W=U==null?void 0:U.menus)==null?void 0:W.length)>0}),w=w==null?void 0:w.map(U=>U==null?void 0:U.content),w=[...new Set(w)],w=w==null?void 0:w.map(U=>{var W,Me;return{menus:(W=U==null?void 0:U.split(gl))==null?void 0:W[0],groups:((Me=U==null?void 0:U.split(gl))==null?void 0:Me[1])??[]}}),y=M==null?void 0:M.filter(U=>{var W;return(U==null?void 0:U.filter)&&((W=U==null?void 0:U.filter)==null?void 0:W.includes("@Sync"))}),(y==null?void 0:y.length)>0&&(y=y==null?void 0:y.filter(U=>{var W,Me,we,na;return(na=(we=(Me=(W=me.analyzeSplitToContent(U==null?void 0:U.filter,","))==null?void 0:W.find(ta=>ta==null?void 0:ta.includes("@Sync")))==null?void 0:Me.split(","))==null?void 0:we[0])==null?void 0:na.includes("Yes")}),y=os(y)),u=M==null?void 0:M.filter(U=>{var W;return(U==null?void 0:U.filter)&&((W=U==null?void 0:U.filter)==null?void 0:W.includes("@Sync"))}),(u==null?void 0:u.length)>0&&(u=u==null?void 0:u.filter(U=>{var W,Me,we,na;return(na=(we=(Me=(W=me.analyzeSplitToContent(U==null?void 0:U.filter,","))==null?void 0:W.find(ta=>ta==null?void 0:ta.includes("@Sync")))==null?void 0:Me.split(","))==null?void 0:we[1])==null?void 0:na.includes("Yes")}),u=os(u)),m!==""&&(m!=null&&m.includes("@Sync"))&&(m==null?void 0:m[0])!=="("){let U=(H=m==null?void 0:m.replace("(",gl))==null?void 0:H.split(gl),W=U==null?void 0:U[1];if(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1),W=me.analyzeSplitToContent(W,","),(ge=(he=(Q=W==null?void 0:W.find(Me=>Me==null?void 0:Me.includes("@Sync")))==null?void 0:Q.split(","))==null?void 0:he[0])!=null&&ge.includes("Yes")){let Me=U==null?void 0:U[0];Me=[{menus:(Qe=(ha=Me==null?void 0:Me.split("*"))==null?void 0:ha[0])==null?void 0:Qe.replaceAll(":","/"),groups:((Ce=(pe=Me==null?void 0:Me.split("*"))==null?void 0:pe[1])==null?void 0:Ce.split(":"))??[]}],y=[...y,...Me]}if((Ia=(qe=(ma=W==null?void 0:W.find(Me=>Me==null?void 0:Me.includes("@Sync")))==null?void 0:ma.split(","))==null?void 0:qe[1])!=null&&Ia.includes("Yes")){let Me=U==null?void 0:U[0];Me=[{menus:(Ze=(Aa=Me==null?void 0:Me.split("*"))==null?void 0:Aa[0])==null?void 0:Ze.replaceAll(":","/"),groups:((ue=(oa=Me==null?void 0:Me.split("*"))==null?void 0:oa[1])==null?void 0:ue.split(":"))??[]}],u=[...u,...Me]}}return{groupName:i,tableColumns:c,tableFilter:m,tableContents:s,columns:(Y==null?void 0:Y.secondColumns)??[],relatedQuotes:w,fatherSyncContents:y,sonSyncContents:u}},ic=(l,r)=>(l=l==null?void 0:l.map((n,i)=>{var s,c,m,p;if(Array.isArray(n))n=n==null?void 0:n.map(h=>{var y,u,w,D;return h!=null&&h.isMainPath||(((y=h==null?void 0:h.children)==null?void 0:y.length)>0?h.children=ic(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=(D=h.menus)==null?void 0:D.map((V,E)=>{var Y,M;return((Y=h.menus)==null?void 0:Y.length)-1===E&&V===""&&(r==null?void 0:r.parentContent)+"/"!==((M=h.menus)==null?void 0:M.join("/"))&&(V=r==null?void 0:r.value),h}),h.bindMenus=h.menus)),h});else{if(i===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=(p=n.menus)==null?void 0:p.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=ic(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(i=>(i=yt(i,r),i)):n=n==null?void 0:n.map(i=>{var s,c;return i!=null&&i.children&&((s=i==null?void 0:i.children)==null?void 0:s.length)>0?i.children=yt(i==null?void 0:i.children,r):i!=null&&i.words&&((c=i==null?void 0:i.words)==null?void 0:c.length)>0&&(r!=null&&r.find(m=>{var p,h,y,u;return((u=(p=i==null?void 0:i.prop)==null?void 0:p.split("."))==null?void 0:u[((y=(h=i==null?void 0:i.prop)==null?void 0:h.split("."))==null?void 0:y.length)-1])===m}))&&(i.mainKey=!0),i}),n};let kr="$R";const ap=L.useUnit(L.pinia),{selectTitle:Zr}=L.storeToRefs(ap),yn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",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 ti=(l=>(l[l.ORDINARY=1]="ORDINARY",l[l.BLOCK=2]="BLOCK",l[l.TEXT=3]="TEXT",l))(ti||{});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},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;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},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;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(i=>{var s;return(i==null?void 0:i.key)==="tableContents"&&(i.contents=(s=i.contents)==null?void 0:s.slice(0,parseInt(l==null?void 0:l.filter))),i})},sp=async l=>{var r,n,i,s,c,m,p,h,y,u,w,D,V,E,Y,M,O,j,C,S,_,k,g,$,R,G,ie,Se,te,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=me.shuffle(ae.contents)),ae));if((l==null?void 0:l.filter)==="Auto"){let fe=(i=(n=l==null?void 0:l.contents)==null?void 0:n.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:i.contents;Array.isArray(fe==null?void 0:fe[0])&&(fe=fe==null?void 0:fe[0]),fe=me.getColumnChild(fe);let ae=fe==null?void 0:fe.filter(Ae=>(Ae==null?void 0:Ae.filter)&&(Ae==null?void 0:Ae.filter)!==""),se=new Map,De=[];ae==null||ae.forEach(Ae=>{var Ee,We;se.get((Ee=Ae==null?void 0:Ae.menus)==null?void 0:Ee.join("/"))||(se.set((We=Ae==null?void 0:Ae.menus)==null?void 0:We.join("/"),Ae),De.push(Ae))});let Pe=(c=(s=Zr==null?void 0:Zr.value)==null?void 0:s.find(Ae=>(Ae==null?void 0:Ae.condition)==="child"))==null?void 0:c.value,ke=De==null?void 0:De.map(Ae=>{var Ee,We,da;return Ae=(Ee=Ae==null?void 0:Ae.menus)==null?void 0:Ee.join("/"),(Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1])==="/"&&((da=(We=Zr==null?void 0:Zr.value)==null?void 0:We.find(Ta=>(Ta==null?void 0:Ta.condition)==="child"))==null?void 0:da.parentContent)+"/"!==Ae?Ae=Ae+Pe:(Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1])==="/"&&(Ae=Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1)),Ae}),B=De==null?void 0:De.map(Ae=>Ae==null?void 0:Ae.groups),q=ke==null?void 0:ke.map(async Ae=>{let Ee=await Kr(Ae,!1);return{path:Ae,contents:Ee}});q=await Promise.all(q);let re=q==null?void 0:q.map((Ae,Ee)=>{var da,Ta,le,la,ve,Ge,Oe;let We=(da=Ae==null?void 0:Ae.contents)==null?void 0:da.filter(ce=>{var ze,Fe;return(ce==null?void 0:ce.name)===((Fe=B==null?void 0:B[Ee])==null?void 0:Fe[((ze=B==null?void 0:B[Ee])==null?void 0:ze.length)-1])});return We=(la=(le=(Ta=We==null?void 0:We[0])==null?void 0:Ta.compData)==null?void 0:le.find(ce=>(ce==null?void 0:ce.key)==="tableContents"))==null?void 0:la.contents,(Ae==null?void 0:Ae.path)===((Ge=(ve=Zr==null?void 0:Zr.value)==null?void 0:ve.find(ce=>(ce==null?void 0:ce.condition)==="child"))==null?void 0:Ge.parentContent)&&(We=((Oe=We==null?void 0:We.map(ce=>{for(let ze in ce)if(ce[ze]===Pe)return ce}))==null?void 0:Oe.filter(ce=>ce))??[]),We??[]});if(re=re==null?void 0:re.map(Ae=>(Ae=Ae==null?void 0:Ae.map(Ee=>{var da;let We={};for(let Ta in Ee)if(ae!=null&&ae.find(le=>{var la,ve;return((ve=(la=le==null?void 0:le.words)==null?void 0:la[0])==null?void 0:ve.replaceAll("'",""))===Ta})){let le=(da=ae==null?void 0:ae.find(la=>{var ve,Ge;return((Ge=(ve=la==null?void 0:la.words)==null?void 0:ve[0])==null?void 0:Ge.replaceAll("'",""))===Ta}))==null?void 0:da.prop;We[le]=Ee==null?void 0:Ee[Ta]}return We}),Ae)),re=me.cartesianProduct(re),Array.isArray(re==null?void 0:re[0])&&(re=re==null?void 0:re[0]),(re==null?void 0:re.length)>0&&((w=(p=(m=ae==null?void 0:ae[0])==null?void 0:m.menus)==null?void 0:p.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(D=l==null?void 0:l.contents)==null?void 0:D.map(Ee=>{var We;return(Ee==null?void 0:Ee.key)==="tableContents"&&(re==null?void 0:re.length)>0&&(Ee.contents=((We=Ee.contents)==null?void 0:We.length)>0?Ee.contents:re),Ee})}if((l==null?void 0:l.filter)==="Manual"){let fe=[],ae=[],se=(E=(V=l==null?void 0:l.contents)==null?void 0:V.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:E.contents;(se==null?void 0:se[(se==null?void 0:se.length)-1])===")"?se=(M=(Y=se==null?void 0:se.replace("(",kr))==null?void 0:Y.split(kr))==null?void 0:M[0]:se="",se!==""&&(fe=((j=(O=se==null?void 0:se.split("*"))==null?void 0:O[0])==null?void 0:j.split(":"))??[],ae=((g=(k=(_=(S=(C=se==null?void 0:se.split("*"))==null?void 0:C[1])==null?void 0:S.replace("{",kr))==null?void 0:_.split(kr))==null?void 0:k[0])==null?void 0:g.split(":"))??[]);let De=(R=($=l==null?void 0:l.contents)==null?void 0:$.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:R.contents;De=(ie=(G=De==null?void 0:De.replace("(",kr))==null?void 0:G.split(kr))==null?void 0:ie[1],De=De==null?void 0:De.slice(0,(De==null?void 0:De.length)-1);let Pe=(Se=l==null?void 0:l.contents)==null?void 0:Se.map(B=>{var q,re,Ae,Ee,We,da,Ta,le,la;return(B==null?void 0:B.key)==="header"&&((q=B==null?void 0:B.contents)!=null&&q.every(ve=>(ve==null?void 0:ve.mainKey)!==!0)&&Array.isArray(B==null?void 0:B.contents)&&!Array.isArray((re=B==null?void 0:B.contents)==null?void 0:re[0])?B.contents=(Ae=B==null?void 0:B.contents)==null?void 0:Ae.map((ve,Ge)=>{var Oe,ce,ze;return ve!=null&&ve.isMainPath||(Ge===0?(ve.mainKey=!0,ve.formType="Select",ve.bindMenus=fe,ve.groups=((Oe=ve.groups)==null?void 0:Oe.length)===0?ae:ve.groups,ve.words=((ce=ve.words)==null?void 0:ce.length)===0?[ve==null?void 0:ve.prop]:ve.words,ve.filter=De,(!(ve!=null&&ve.menus)||((ze=ve==null?void 0:ve.menus)==null?void 0:ze.length)===0)&&(ve.menus=fe)):(ve.mainKey=!1,ve.bindMenus=fe)),ve}):Array.isArray((Ee=B==null?void 0:B.contents)==null?void 0:Ee[0])&&((Ta=(da=(We=B==null?void 0:B.contents)==null?void 0:We[0])==null?void 0:da.filter(()=>(fe==null?void 0:fe.length)>0))==null?void 0:Ta.length)>0&&(B.contents[0]=(la=(le=B==null?void 0:B.contents)==null?void 0:le[0])==null?void 0:la.map((ve,Ge)=>{var Oe,ce,ze;return ve!=null&&ve.isMainPath||(Ge===0?(ve.mainKey=!0,ve.formType="Select",ve.bindMenus=fe,ve.groups=((Oe=ve.groups)==null?void 0:Oe.length)===0?ae:ve.groups,ve.words=((ce=ve.words)==null?void 0:ce.length)===0?[ve==null?void 0:ve.prop]:ve.words,ve.filter=De,(!(ve!=null&&ve.menus)||Array.isArray(ve==null?void 0:ve.menus)&&((ze=ve==null?void 0:ve.menus)==null?void 0:ze.length)===0)&&(fe==null?void 0:fe.length)>0&&(ve.menus=fe)):(ve.mainKey=!1,ve.bindMenus=fe)),ve}))),B}),ke=(te=Pe==null?void 0:Pe.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:te.contents;if(Array.isArray(ke==null?void 0:ke[0])&&(ke=ke==null?void 0:ke[0]),ke=me.getColumnChild(ke),ke!=null&&ke.some(B=>{var q,re;return((re=B==null?void 0:B.menus)==null?void 0:re[((q=B==null?void 0:B.menus)==null?void 0:q.length)-1])===""})){let B=(Z=Zr==null?void 0:Zr.value)==null?void 0:Z.find(q=>(q==null?void 0:q.condition)==="child");Pe=ep(Pe,B)}return Pe}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 i,s,c,m,p,h,y,u,w,D,V,E;let r=l==null?void 0:l.filter;if(r!=null&&r.includes("*")&&(r="({"+((s=(i=r==null?void 0:r.replace(":",kr))==null?void 0:i.split(kr))==null?void 0:s[1])),r=(c=r==null?void 0:r.replaceAll("{",""))==null?void 0:c.replaceAll("}",""),(p=(m=r==null?void 0:r.split("="))==null?void 0:m[1])!=null&&p.includes("$")){(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let Y=(h=r==null?void 0:r.split("="))==null?void 0:h[0],M=(y=r==null?void 0:r.split("="))==null?void 0:y[1];(u=M==null?void 0:M.slice(1,M==null?void 0:M.length))!=null&&u.includes("$")&&(M=(V=(D=(w=Zr==null?void 0:Zr.value)==null?void 0:w.filter(O=>(O==null?void 0:O.condition)==="child"))==null?void 0:D[0])==null?void 0:V.value),r=Y+"="+M}if((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=me.calculatorAndToOr(r);if((n==null?void 0:n.length)>0){let Y=[];return n==null||n.forEach(O=>{let j={};for(let C in O){let S=C;S!=null&&S.includes("[")||(j[S]=O[C])}Y.push(j)}),(E=l==null?void 0:l.contents)==null?void 0:E.map(O=>{var C,S,_;let j=(S=(C=l==null?void 0:l.contents)==null?void 0:C.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:S.contents;if(j=(_=me.getEqualChild(j))==null?void 0:_.filter(k=>(k==null?void 0:k.label)!=="操作"),(O==null?void 0:O.key)==="tableContents"){let g=me.tableToForm(O==null?void 0:O.contents,j);Y==null||Y.forEach($=>{var R,G;for(let ie in $)!((R=g==null?void 0:g[0])!=null&&R.find(Se=>{var te;return(Se==null?void 0:Se.key)===ie||((te=Se==null?void 0:Se.key)==null?void 0:te.includes(ie))}))&&!(g!=null&&g.find(Se=>{var te;return(Se==null?void 0:Se.key)===ie||((te=Se==null?void 0:Se.key)==null?void 0:te.includes(ie))}))||(((G=$[ie])==null?void 0:G[0])!=="!"?g=g==null?void 0:g.filter(Se=>{var te,Z;return((te=Se==null?void 0:Se.find(fe=>{var ae;return(fe==null?void 0:fe.key)===ie||((ae=fe==null?void 0:fe.key)==null?void 0:ae.includes(ie))}))==null?void 0:te.value)===$[ie]||Array.isArray($==null?void 0:$[ie])&&((Z=$==null?void 0:$[ie])==null?void 0:Z.find(fe=>{var ae;return((ae=Se==null?void 0:Se.find(se=>{var De;return(se==null?void 0:se.key)===ie||((De=se==null?void 0:se.key)==null?void 0:De.includes(ie))}))==null?void 0:ae.value)===fe}))}):g=g==null?void 0:g.filter(Se=>{var te;return((te=Se==null?void 0:Se.find(Z=>{var fe;return(Z==null?void 0:Z.key)===ie||((fe=Z==null?void 0:Z.key)==null?void 0:fe.includes(ie))}))==null?void 0:te.value)!==$[ie]}))}),(g==null?void 0:g.length)===0?O.contents=[]:O.contents=g==null?void 0:g.map($=>{let R={};return $==null||$.forEach(G=>{R[G==null?void 0:G.key]=G==null?void 0:G.value}),R})}return O})}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,i,s;if((l==null?void 0:l.filter)!==""&&(l!=null&&l.filter)){let c=(i=(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:i.split(",");return(s=l==null?void 0:l.contents)==null?void 0:s.map(p=>((p==null?void 0:p.key)==="header"&&(p.contents=yt(p.contents,c)),p))}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 i=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 i.push({key:"bottomButton",contents:s}),i}return l==null?void 0:l.contents},gp=l=>{var r;return(l==null?void 0:l.filter)==="Read"?(r=l==null?void 0:l.contents)==null?void 0:r.map(i=>{var s;return(i==null?void 0:i.key)==="formContent"&&(i.contents=(s=i.contents)==null?void 0:s.map(c=>(c.isNoClick=!0,c))),i}):l==null?void 0:l.contents},bp=l=>{var r;if(l!=null&&l.filter){const n=parseInt(l==null?void 0:l.filter);return!n||Number.isNaN(n)?l==null?void 0:l.contents:(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var c;return(s==null?void 0:s.key)==="formContent"&&(s.contents=(c=s.contents)==null?void 0:c.map(m=>(m.width=n,m))),s})}return l==null?void 0:l.contents},kp=l=>{var r,n,i,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(p=>{var h;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(h=p.contents)==null?void 0:h.map(y=>(y.width=c,y))),p})}if(((i=l==null?void 0:l.filter)==null?void 0:i[0])==="["){let c=Ni(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 D=w+1;let V=0,E=0;for(let M=0;M<m.length;M++){if(E+=m[M],D<=E){V=M;break}M===m.length-1&&(V=m.length-1)}const Y=m[V]||m[m.length-1]||1;return u.width=Y,u})}return h}):l==null?void 0:l.contents}return l==null?void 0:l.contents},xp=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,p;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]=(p=s.contents[0])==null?void 0:p.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},wp=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 i=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=>i(m))),c);return(r=l==null?void 0:l.contents)==null?void 0:r.map(c=>{var m,p,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=>i(y)):c.contents=(p=c.contents)==null?void 0:p.map(y=>i(y))),c})}return l==null?void 0:l.contents},_p=async l=>{var i,s,c,m,p,h,y,u,w,D,V,E,Y,M,O,j,C;const r=L.useUnit(L.pinia),{chooseTitle:n}=L.storeToRefs(r);if((l==null?void 0:l.filter)==="true"){let S=await Kr(((s=(i=n==null?void 0:n.value)==null?void 0:i[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),_=(h=(p=n==null?void 0:n.value)==null?void 0:p[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=(V=(D=S==null?void 0:S.filter(R=>{var G;return(G=R==null?void 0:R.compData)==null?void 0:G.find(ie=>(ie==null?void 0:ie.key)==="header")}))==null?void 0:D[0])==null?void 0:V.compData;let k=(E=S==null?void 0:S.find(R=>(R==null?void 0:R.key)==="header"))==null?void 0:E.contents;Array.isArray(k==null?void 0:k[0])&&(k=k==null?void 0:k[0]),k=((Y=k==null?void 0:k.find(R=>R==null?void 0:R.isMainKey))==null?void 0:Y.prop)??((M=k==null?void 0:k[0])==null?void 0:M.prop);let g=(j=(O=S==null?void 0:S.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:O.contents)==null?void 0:j.find(R=>(R==null?void 0:R[k])===_);return(C=l==null?void 0:l.contents)==null?void 0:C.map(R=>{var G;return(R==null?void 0:R.key)==="formContent"&&(R.contents=(G=R.contents)==null?void 0:G.map(ie=>(ie.value=g==null?void 0:g[ie==null?void 0:ie.prop],ie))),R})}return l==null?void 0:l.contents},Sp=l=>{var r,n,i,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="({"+((i=(n=m==null?void 0:m.replace("{",kr))==null?void 0:n.split(kr))==null?void 0:i[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 p=me.calculatorAndToOr(m),h=p==null?void 0:p[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},Ep=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},Cp=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},Dp=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},Np=l=>{var r;if(l!=null&&l.filter){let n=l==null?void 0:l.contents,i=l==null?void 0:l.filter;return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=(r=me.analyzeSplitToContent(i,","))==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:i}),n}return l==null?void 0:l.contents},Bp=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},oc={onNumSlice:tp,onRandomContents:sp,onConditionContents:up,onFatherPaceContents:dp,onPaceContents:pp,onMainTagContents:fp,onButtonContents:hp,onPamButtonContents:vp,onRowButtonContents:mp,onRelated:_p,onRowNum:kp,onFixRow:xp,onReqItem:wp,onBottomButtonContents:yp,onConditionContent:Sp,onTabs:Ep,onSinChoice:Cp,onTextSize:ip,onTextRGBA:op,onPosition:rp,onSize:np,onShowType:Dp,onStepName:Np,onStep:Bp,onInterfaceTypeContents:cp,onBackGround:lp,onMaxColumn:bp,onEditRead:gp},Tp=async(l,r)=>{var c,m,p,h,y,u,w,D,V,E,Y,M;let n="";if(((c=l==null?void 0:l.find(O=>(O==null?void 0:O.key)==="filter"))==null?void 0:c.contents)!==""&&(n=(m=l==null?void 0:l.find(O=>(O==null?void 0:O.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=(p=n==null?void 0:n.replace("(",kr))==null?void 0:p.split(kr))==null?void 0:h[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(y=me.analyzeSplitToContent(n,","))==null?void 0:y.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&&O.includes("(")||(O=O==null?void 0:O.replaceAll(":","=")),O)),s=l;for(let O in i){let j,C="";j=(D=(w=(u=i==null?void 0:i[O])==null?void 0:u.replace("=",kr))==null?void 0:w.split(kr))==null?void 0:D[0],C=(Y=(E=(V=i==null?void 0:i[O])==null?void 0:V.replace("=",kr))==null?void 0:E.split(kr))==null?void 0:Y[1];let S=(M=yn==null?void 0:yn.find(_=>(_==null?void 0:_.key)===j))==null?void 0:M.value;if(S){const _=oc[S];s=await _({contents:s,filter:C})}}return s},Nt=async(l,r)=>{var m,p,h,y,u,w,D,V,E,Y,M,O,j,C,S,_,k,g,$,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=(p=l==null?void 0:l.find(G=>(G==null?void 0:G.key)==="filter"))==null?void 0:p.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("(",kr))==null?void 0:h.split(kr))==null?void 0:y[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(u=me.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;i==null||i.forEach(G=>{var Se,te,Z;let ie=(Se=G==null?void 0:G.split("="))==null?void 0:Se[0];if(ie==="@MainPam"&&c.get(ie)){let fe=c.get(ie);fe=fe==null?void 0:fe.slice(0,(fe==null?void 0:fe.length)-1);let ae=(Z=(te=G==null?void 0:G.replace("{",kr))==null?void 0:te.split(kr))==null?void 0:Z[1];ae=fe+","+ae,c.set(ie,ae)}else c.set(ie,G)}),i=Array.from(c.values()),i=i==null?void 0:i.sort((G,ie)=>{var Se,te;return((Se=yn==null?void 0:yn.find(Z=>ie==null?void 0:ie.includes(Z==null?void 0:Z.key)))==null?void 0:Se.order)-((te=yn==null?void 0:yn.find(Z=>G==null?void 0:G.includes(Z==null?void 0:Z.key)))==null?void 0:te.order)});for(let G in i){let ie,Se="";(w=i==null?void 0:i[G])!=null&&w.includes("(")&&((D=i==null?void 0:i[G])!=null&&D.includes("@If"))?(ie=(Y=(E=(V=i==null?void 0:i[G])==null?void 0:V.replace("(",kr))==null?void 0:E.split(kr))==null?void 0:Y[0],Se="("+((j=(O=(M=i==null?void 0:i[G])==null?void 0:M.replace("(",kr))==null?void 0:O.split(kr))==null?void 0:j[1])):(ie=(_=(S=(C=i==null?void 0:i[G])==null?void 0:C.replace("=",kr))==null?void 0:S.split(kr))==null?void 0:_[0],Se=($=(g=(k=i==null?void 0:i[G])==null?void 0:k.replace("=",kr))==null?void 0:g.split(kr))==null?void 0:$[1]);let te=(R=yn==null?void 0:yn.find(Z=>(Z==null?void 0:Z.key)===ie))==null?void 0:R.value;if(te){const Z=oc[te];s=await Z({contents:s,filter:Se,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(i=>Number(i.trim()));return n.length<2||n.some(i=>Number.isNaN(i))?null:[n[0],n[1]]},sc=(l,r)=>{var Y,M,O,j,C;const n=Array.isArray(l)?l:[],i=n.find(S=>(S==null?void 0:S.key)==="formContent"),s=Array.isArray(i==null?void 0:i.contents)?i.contents:[],c=((Y=n.find(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"))==null?void 0:Y.contents)??{},m=(s==null?void 0:s[0])??{};let p=((M=r==null?void 0:r.position)==null?void 0:M[0])??(c==null?void 0:c._positionStartRow)??(m==null?void 0:m._positionStartRow),h=((O=r==null?void 0:r.position)==null?void 0:O[1])??(c==null?void 0:c._positionRowSpan)??(m==null?void 0:m._positionRowSpan);(!p||Number.isNaN(p)||p<1)&&(p=1),(!h||Number.isNaN(h)||h<1)&&(h=1);let y=((j=r==null?void 0:r.size)==null?void 0:j[0])??(c==null?void 0:c._sizeStart)??(m==null?void 0:m._sizeStart),u=((C=r==null?void 0:r.size)==null?void 0:C[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,D=Math.max(1,Math.round(1/w));let V=n.map(S=>{if((S==null?void 0:S.key)!=="formContent")return S;const _=Array.isArray(S==null?void 0:S.contents)?S.contents:[];return{...S,contents:_.map(k=>({...k,width:D,_positionStartRow:p,_positionRowSpan:h,_sizeStart:y,_sizeEnd:u}))}});const E={_positionStartRow:p,_positionRowSpan:h,_sizeStart:y,_sizeEnd:u};return V.some(S=>(S==null?void 0:S.key)==="_gridLayoutMeta")?V=V.map(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"?{...S,contents:E}:S):V.push({key:"_gridLayoutMeta",contents:E}),V};let ho="$R";const Ap=L.useUnit(L.pinia),{selectTitle:zp}=L.storeToRefs(Ap);let Mp=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Ip=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Op=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Lp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ss=async(l,r,n=!0)=>{let i=[],s=l==null?void 0:l.map(async c=>{var w,D,V,E,Y,M,O,j,C,S,_,k,g,$,R,G,ie,Se,te,Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma,P,H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa,Ze,oa,ue,U,W,Me,we,na,ta,Sa,ba,Pa,ya,$e,$a,fl,Sl,Xl,bl,Vl,qa,Rl,Il,La,al,ol;let m=(E=(V=(D=(w=c==null?void 0:c.contents)==null?void 0:w.find(ia=>{var ja;return(ja=ia==null?void 0:ia.key)==null?void 0:ja.includes("struct")}))==null?void 0:D.value)==null?void 0:V[0])==null?void 0:E.类型,p=Object.values(c==null?void 0:c.name);p=p==null?void 0:p.reverse();let h=(Y=c==null?void 0:c.contents)==null?void 0:Y.map(ia=>ia==null?void 0:ia.key),y={comp:m,isShow:c==null?void 0:c.is_show,name:p==null?void 0:p[0],id:c==null?void 0:c.object_id,order_no:c==null?void 0:c.order_no,relatedTables:h,menuFilter:(M=c==null?void 0:c.filter)==null?void 0:M.menuFilter,status:c==null?void 0:c.status,fatherSyncContents:(O=c==null?void 0:c.filter)==null?void 0:O.fatherSyncs,relatedQuotes:(j=c==null?void 0:c.filter)==null?void 0:j.quotes,sonSyncContents:(C=c==null?void 0:c.filter)==null?void 0:C.sonSyncs,nameContents:(S=L.cloneDeep(p))==null?void 0:S.reverse()};for(let ia in p)parseInt(ia)>=1&&(y[`name${parseInt(ia)-1}`]=p[ia]);let u=Array.isArray((_=c==null?void 0:c.filter)==null?void 0:_.menuFilter)?(k=c==null?void 0:c.filter)==null?void 0:k.menuFilter:[];if(((g=u==null?void 0:u.filter(ia=>ia==null?void 0:ia.includes("@Filter")))==null?void 0:g.length)>0){let ia=u==null?void 0:u.filter(Le=>Le==null?void 0:Le.includes("@Filter"));ia=ia==null?void 0:ia[0],ia=(R=($=ia==null?void 0:ia.replace("(",ho))==null?void 0:$.split(ho))==null?void 0:R[1],ia=ia==null?void 0:ia.slice(0,(ia==null?void 0:ia.length)-1),ia!=null&&ia.includes("*")&&(ia=(ie=(G=ia==null?void 0:ia.replace("{",ho))==null?void 0:G.split(ho))==null?void 0:ie[1],ia=ia==null?void 0:ia.replace("}","")),ia=me.calculatorAndToOr(ia);let ja=(r==null?void 0:r.originPath)??"";(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])==="/"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1));let Oa=await Kr(ja,!1),Ra=(Se=Oa==null?void 0:Oa.filter(Le=>(Le==null?void 0:Le.comp)==="Table"))==null?void 0:Se[0];Ra=(Z=(te=Ra==null?void 0:Ra.compData)==null?void 0:te.find(Le=>(Le==null?void 0:Le.key)==="tableContents"))==null?void 0:Z.contents;let be=(ae=(fe=zp.value)==null?void 0:fe.find(Le=>(Le==null?void 0:Le.condition)==="child"))==null?void 0:ae.value;Ra=(se=Ra==null?void 0:Ra.map(Le=>{for(let de in Le)if((Le==null?void 0:Le[de])===be)return Le}))==null?void 0:se.filter(Le=>Le),Ra=Ra==null?void 0:Ra[0],ia=ia==null?void 0:ia[0];let ga=[];for(let Le in ia){let de="";Ka.isObject(Ra)&&(de=(Pe=(De=Object.keys(Ra))==null?void 0:De.filter(wa=>wa==null?void 0:wa.includes("."+Le)))==null?void 0:Pe[0]),de!==""&&(Ra!=null&&Ra[de])&&(ia==null?void 0:ia[Le])===(Ra==null?void 0:Ra[de])||Ra!=null&&Ra[Le]&&(ia==null?void 0:ia[Le])===(Ra==null?void 0:Ra[Le])?ga.push(!0):ga.push(!1)}if(ga!=null&&ga.some(Le=>Le===!1)&&((B=r==null?void 0:r.originPath)==null?void 0:B[((ke=r==null?void 0:r.originPath)==null?void 0:ke.length)-1])!=="/")return}if(m==="Table"||m==="Method"){!n&&((q=y==null?void 0:y.fatherSyncContents)==null?void 0:q.length)>0;let ia=((re=c==null?void 0:c.contents)==null?void 0:re.find(ea=>{var Je;return(Je=ea==null?void 0:ea.key)==null?void 0:Je.includes("content")}))||[],ja=[];y.comp="Table",ia.value=(Ae=ia==null?void 0:ia.value)==null?void 0:Ae.sort((ea,Je)=>parseInt(ea==null?void 0:ea.id)-parseInt(Je==null?void 0:Je.id)),ia.value=(Ee=ia==null?void 0:ia.value)==null?void 0:Ee.map(ea=>{let Je={};for(let Xe in ea)JSON.stringify(ea==null?void 0:ea[Xe])==="{}"?Je[Xe]="":Je[Xe]=ea==null?void 0:ea[Xe];return Je}),ja.push({key:"tableContents",contents:ia==null?void 0:ia.value});let Oa=(la=(le=(Ta=(da=(We=c==null?void 0:c.contents)==null?void 0:We.find(ea=>{var Je;return(Je=ea==null?void 0:ea.key)==null?void 0:Je.includes("struct")}))==null?void 0:da.value)==null?void 0:Ta[0])==null?void 0:le.结构)==null?void 0:la.contents;Array.isArray(Oa==null?void 0:Oa[0])?Oa[0]=(ve=Oa==null?void 0:Oa[0])==null?void 0:ve.filter(ea=>(ea==null?void 0:ea.prop)!=="sort"&&(ea==null?void 0:ea.prop)!=="relatedId"):Oa=Oa==null?void 0:Oa.filter(ea=>(ea==null?void 0:ea.prop)!=="sort"&&(ea==null?void 0:ea.prop)!=="relatedId"),ja.push({key:"header",contents:Oa}),ja.push({key:"filter",contents:(Fe=(ze=(ce=(Oe=(Ge=c==null?void 0:c.contents)==null?void 0:Ge.find(ea=>{var Je;return(Je=ea==null?void 0:ea.key)==null?void 0:Je.includes("struct")}))==null?void 0:Oe.value)==null?void 0:ce[0])==null?void 0:ze.引用)==null?void 0:Fe.contents});let Ra=Mp,be=L.cloneDeep(Ip);m==="Method"&&be.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Oa==null?void 0:Oa[0])&&((xa=Oa==null?void 0:Oa[0])==null?void 0:xa.prop)==="disabled"&&(Ra=Op,be=Lp);const ga=["推力","真空","压力","温度","流量"],Le=y.name;Le&&ga.includes(Le)&&(Ra=[...Ra],Ra.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let de=[];if(!Array.isArray(Oa==null?void 0:Oa[0])&&(Oa!=null&&Oa.some(ea=>{var Je;return(ea==null?void 0:ea.calculatorFilter)&&((Je=ea==null?void 0:ea.calculatorFilter)==null?void 0:Je.includes("Manual"))}))){let ea=(Ma=Oa==null?void 0:Oa.map(Je=>Je==null?void 0:Je.calculatorFilter))==null?void 0:Ma.filter(Je=>Je&&(Je==null?void 0:Je.includes("Manual")));ea==null||ea.forEach(Je=>{var dl;let Xe=me.analyzeSplitToContent(Je,",");if(Xe=Xe==null?void 0:Xe.map(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)),Xe!=null&&Xe.find(Ve=>(Ve==null?void 0:Ve.includes("Extent"))&&(Ve==null?void 0:Ve.includes("Row")))&&(Xe!=null&&Xe.find(Ve=>(Ve==null?void 0:Ve.includes("Button"))&&(Ve==null?void 0:Ve.includes(","))))){let Ve=Xe==null?void 0:Xe.find(Va=>Va==null?void 0:Va.includes("@FunctionButton"));Ve=(dl=Ve==null?void 0:Ve.split("="))==null?void 0:dl[1],Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1),Ve=Ve==null?void 0:Ve.split(","),Ve=Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1],de.push(Ve)}}),de=[...new Set(de)],de=de==null?void 0:de.map(Je=>({label:Je,prop:Je,type:"methodButton"}))}else if(Array.isArray(Oa==null?void 0:Oa[0])&&((P=me.getColumnChild(Oa==null?void 0:Oa[0]))!=null&&P.some(ea=>{var Je;return(ea==null?void 0:ea.calculatorFilter)&&((Je=ea==null?void 0:ea.calculatorFilter)==null?void 0:Je.includes("Manual"))}))){let ea=(Q=(H=me.getColumnChild(Oa==null?void 0:Oa[0]))==null?void 0:H.map(Je=>Je==null?void 0:Je.calculatorFilter))==null?void 0:Q.filter(Je=>Je&&(Je==null?void 0:Je.includes("Manual")));ea==null||ea.forEach(Je=>{var dl;let Xe=me.analyzeSplitToContent(Je,",");if(Xe=Xe==null?void 0:Xe.map(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)),Xe!=null&&Xe.find(Ve=>(Ve==null?void 0:Ve.includes("Extent"))&&(Ve==null?void 0:Ve.includes("Row")))&&(Xe!=null&&Xe.find(Ve=>(Ve==null?void 0:Ve.includes("Button"))&&(Ve==null?void 0:Ve.includes(","))))){let Ve=Xe==null?void 0:Xe.find(Va=>Va==null?void 0:Va.includes("@FunctionButton"));Ve=(dl=Ve==null?void 0:Ve.split("="))==null?void 0:dl[1],Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1),Ve=Ve==null?void 0:Ve.split(","),Ve=Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1],de.push(Ve)}}),de=[...new Set(de)],de=de==null?void 0:de.map(Je=>({label:Je,prop:Je,type:"methodButton"}))}ja.push({key:"extraButton",contents:Ra}),ja.push({key:"rowButton",contents:[...be,...de]}),y.compData=await Nt(ja,r),(he=y.compData)!=null&&he.find(ea=>(ea==null?void 0:ea.key)==="tab")&&(y.tab=(ha=(ge=y.compData)==null?void 0:ge.find(ea=>(ea==null?void 0:ea.key)==="tab"))==null?void 0:ha.contents),(Qe=y.compData)!=null&&Qe.find(ea=>(ea==null?void 0:ea.key)==="step")&&(y.step=(Ce=(pe=y.compData)==null?void 0:pe.find(ea=>(ea==null?void 0:ea.key)==="step"))==null?void 0:Ce.contents),(ma=y.compData)!=null&&ma.find(ea=>(ea==null?void 0:ea.key)==="choice")&&(y.choice=(Ia=(qe=y.compData)==null?void 0:qe.find(ea=>(ea==null?void 0:ea.key)==="choice"))==null?void 0:Ia.contents);let wa="",pa=(Aa=y==null?void 0:y.compData)==null?void 0:Aa.filter(ea=>(ea==null?void 0:ea.key)==="fixType");(pa==null?void 0:pa.length)>0&&n&&(wa=(Ze=pa==null?void 0:pa[0])==null?void 0:Ze.contents,y.comp=wa)}else if(m==="Form"){let ia=[],ja=(U=(ue=(oa=c==null?void 0:c.contents)==null?void 0:oa.find(Le=>{var de;return(de=Le==null?void 0:Le.key)==null?void 0:de.includes("content")}))==null?void 0:ue.value)==null?void 0:U[0],Oa=[],Ra=Array.isArray((W=c==null?void 0:c.filter)==null?void 0:W.menuFilter)?(Me=c==null?void 0:c.filter)==null?void 0:Me.menuFilter:[];Ra==null||Ra.forEach(Le=>{if(Le!=null&&Le.includes("@Param(Hide=Yes, prop=")||Le!=null&&Le.includes("(Hide=Yes, prop=")){const de=Le==null?void 0:Le.match(/prop=([^,)]+)/);de!=null&&de[1]&&Oa.push(de==null?void 0:de[1])}});let be=(ba=(Sa=(ta=(na=(we=c==null?void 0:c.contents)==null?void 0:we.find(Le=>{var de;return(de=Le==null?void 0:Le.key)==null?void 0:de.includes("struct")}))==null?void 0:na.value)==null?void 0:ta[0])==null?void 0:Sa.结构)==null?void 0:ba.contents,ga=(Pa=be==null?void 0:be.map(Le=>(Le.value=ja==null?void 0:ja[Le==null?void 0:Le.prop],Le)))==null?void 0:Pa.filter(Le=>(Le==null?void 0:Le.prop)!=="sort"&&(Le==null?void 0:Le.prop)!=="relatedId");ga=ga==null?void 0:ga.map(Le=>(Oa!=null&&Oa.includes(Le==null?void 0:Le.prop)&&(Le.isHideInForm=!0),Le)),ia.push({key:"filter",contents:(Sl=(fl=($a=($e=(ya=c==null?void 0:c.contents)==null?void 0:ya.find(Le=>{var de;return(de=Le==null?void 0:Le.key)==null?void 0:de.includes("struct")}))==null?void 0:$e.value)==null?void 0:$a[0])==null?void 0:fl.引用)==null?void 0:Sl.contents}),ia.push({key:"formContent",contents:ga}),ia.push({key:"paramHideProps",contents:Oa}),y.compData=await Tp(ia),(Xl=y.compData)!=null&&Xl.find(Le=>(Le==null?void 0:Le.key)==="tab")&&(y.tab=(Vl=(bl=y.compData)==null?void 0:bl.find(Le=>(Le==null?void 0:Le.key)==="tab"))==null?void 0:Vl.contents),(qa=y.compData)!=null&&qa.find(Le=>(Le==null?void 0:Le.key)==="step")&&(y.step=(Il=(Rl=y.compData)==null?void 0:Rl.find(Le=>(Le==null?void 0:Le.key)==="step"))==null?void 0:Il.contents),(La=y.compData)!=null&&La.find(Le=>(Le==null?void 0:Le.key)==="choice")&&(y.choice=(ol=(al=y.compData)==null?void 0:al.find(Le=>(Le==null?void 0:Le.key)==="choice"))==null?void 0:ol.contents)}return y});return i=await Promise.all(s),i},$p=L.useLoginState(L.pinia),{loginUserInfo:_i}=L.storeToRefs($p),gt=async(l,r,n="Manual",i=[])=>{var h;let s=l,c;Array.isArray(r==null?void 0:r[0])?c=me.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})),p=s==null?void 0:s.map(async y=>(y=await Hp(y,m,c,n,s,i),y));return p=await Promise.all(p),p},Rp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=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=me.getValueToObjectValue(r,me.getColumnContents(s))),n==null||n.forEach(m=>{var p;if(r!=null&&r[m]){let h=r==null?void 0:r[m];c=c?h?Nl.isEqual(h.toString(),c.toString()):void 0:h}else{let h=(p=s==null?void 0:s.find(u=>(u==null?void 0:u.label)===m))==null?void 0:p.prop,y=(r==null?void 0:r[h])??0;c=c?y?Nl.isEqual(y.toString(),c.toString()):void 0:y}}),r[i]=c===void 0?void 0:c?1:0,r},xr=l=>{const[r,n,i]=L.cloneDeep(l).split(":").map(Number);let s=+l;return!l||!(l!=null&&l.includes(":"))?s:(r??0)*3600+(n??0)*60+(i??0)},Xn=l=>{const r=c=>c.toString().padStart(2,"0"),n=Math.floor(l/3600),i=Math.floor(l%3600/60),s=l%60;return`${r(n)}:${r(i)}:${parseInt(r(s))}`},Vp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=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,p=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=me.getValueToObjectValue(r,me.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,w,D,V,E,Y,M,O;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=p==null?void 0:p.toString())!=null&&w.includes(":"))){let j=+(r==null?void 0:r[h]);p=p+j}else p=xr(p.toString())+xr((D=r==null?void 0:r[h])==null?void 0:D.toString()),p=Xn(p)}else if(c==="Row"){let j=(V=s==null?void 0:s.find(C=>(C==null?void 0:C.label)===h))==null?void 0:V.prop;if(!((Y=Number.isNaN(r==null?void 0:r[j])?"":(E=r==null?void 0:r[j])==null?void 0:E.toString())!=null&&Y.includes(":"))&&!((M=p==null?void 0:p.toString())!=null&&M.includes(":"))){let C=+((r==null?void 0:r[j])??0);p=p+C}else p=xr(p==null?void 0:p.toString())+xr((O=(r==null?void 0:r[j])??0)==null?void 0:O.toString()),p=Xn(p)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(w=>{var D;return(w==null?void 0:w[y])??(w==null?void 0:w[(D=s==null?void 0:s.find(V=>(V==null?void 0:V.label)===y))==null?void 0:D.prop])});h=[...h,...u]}),p=h.reduce((y,u)=>{let w=0;Number.isNaN(y)||(w=+y);let D=0;return Number.isNaN(u)||(D=+u),w+D},0)}return r[i]=p,r},Fp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=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,p=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=me.getValueToObjectValue(r,me.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,w,D,V,E,Y;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=p==null?void 0:p.toString())!=null&&w.includes(":"))){let M=+(r==null?void 0:r[h]);p=p===0?p+M:p-M}else p=p===0?xr(p.toString())+xr(r==null?void 0:r[h].toString()):xr(p.toString())-xr(r==null?void 0:r[h].toString()),p=Xn(p)}else if(c==="Row"){let M=(D=s==null?void 0:s.find(O=>(O==null?void 0:O.label)===h))==null?void 0:D.prop;if(!((E=Number.isNaN(r==null?void 0:r[M])?"":(V=r==null?void 0:r[M])==null?void 0:V.toString())!=null&&E.includes(":"))&&!((Y=p==null?void 0:p.toString())!=null&&Y.includes(":"))){let O=+((r==null?void 0:r[M])??0);p=p===0?p+O:p-O}else p=p===0?xr(p.toString())+xr(((r==null?void 0:r[M])??0).toString()):xr(p.toString())-xr(((r==null?void 0:r[M])??0).toString()),p=Xn(p)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(w=>{var D;return(w==null?void 0:w[y])??(w==null?void 0:w[(D=s==null?void 0:s.find(V=>(V==null?void 0:V.label)===y))==null?void 0:D.prop])});h=[...h,...u]}),p=h.reduce((y,u)=>{let w=0;Number.isNaN(y)||(w=+y);let D=0;return Number.isNaN(u)||(D=+u),w-D},0)}return r[i]=p,r},Pp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=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,p=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=me.getValueToObjectValue(r,me.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,w,D,V,E,Y;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=p==null?void 0:p.toString())!=null&&w.includes(":"))){let M=+(r==null?void 0:r[h]);p=p===0?p+M:p*M}else p=p===0?xr(p.toString())+xr(r==null?void 0:r[h].toString()):xr(p.toString())*xr(r==null?void 0:r[h].toString()),p=Xn(p)}else if(c==="Row"){let M=(D=s==null?void 0:s.find(O=>(O==null?void 0:O.label)===h))==null?void 0:D.prop;if(!(r!=null&&r[M]))p=void 0;else if(!((E=Number.isNaN(r==null?void 0:r[M])?"":(V=r==null?void 0:r[M])==null?void 0:V.toString())!=null&&E.includes(":"))&&!((Y=p==null?void 0:p.toString())!=null&&Y.includes(":"))){let O=+((r==null?void 0:r[M])??0);p=p===0?p+O:p*O}else p=p===0?xr(p.toString())+xr(((r==null?void 0:r[M])??0).toString()):xr(p.toString())*xr(((r==null?void 0:r[M])??0).toString()),p=Xn(p)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(w=>{var D;return(w==null?void 0:w[y])??(w==null?void 0:w[(D=s==null?void 0:s.find(V=>(V==null?void 0:V.label)===y))==null?void 0:D.prop])});h=[...h,...u]}),p=h.reduce((y,u)=>{let w=0;Number.isNaN(y)||(w=+y);let D=0;return Number.isNaN(u)||(D=+u),w*D},0)}return r[i]=p,r},jp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=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,p=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=me.getValueToObjectValue(r,me.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,w,D,V,E,Y;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=p==null?void 0:p.toString())!=null&&w.includes(":"))){let M=+(r==null?void 0:r[h]);p=p===0?p+M:p/M}else p=p===0?xr(p.toString())+xr(r==null?void 0:r[h].toString()):xr(p.toString())/xr(r==null?void 0:r[h].toString()),p=Xn(p)}else if(c==="Row"){let M=(D=s==null?void 0:s.find(O=>(O==null?void 0:O.label)===h))==null?void 0:D.prop;if(!((E=Number.isNaN(r==null?void 0:r[M])?"":(V=r==null?void 0:r[M])==null?void 0:V.toString())!=null&&E.includes(":"))&&!((Y=p==null?void 0:p.toString())!=null&&Y.includes(":"))){let O=+((r==null?void 0:r[M])??0);p=p===0?p+O:p/O}else p=p===0?xr(p.toString())+xr(((r==null?void 0:r[M])??0).toString()):xr(p.toString())/xr(((r==null?void 0:r[M])??0).toString()),p=Xn(p)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(w=>{var D;return(w==null?void 0:w[y])??(w==null?void 0:w[(D=s==null?void 0:s.find(V=>(V==null?void 0:V.label)===y))==null?void 0:D.prop])});h=[...h,...u]}),p=h.reduce((y,u)=>{let w=0;Number.isNaN(y)||(w=+y);let D=0;return Number.isNaN(u)||(D=+u),w/D},0)}return r[i]=p.toFixed(2),r},vo={Sum:Vp,Substract:Fp,Multiple:Pp,Divide:jp,Compare:Rp},Hp=async(l,r,n,i="Auto",s,c=[])=>{var u,w,D,V,E,Y,M,O,j,C,S,_,k,g,$,R,G,ie,Se,te,Z;let m=l,p=[],h=await L.getPageDataApi({platId:parseInt((u=_i==null?void 0:_i.value)==null?void 0:u.plat_id),pageName:"menu"});h=(V=(D=(w=h==null?void 0:h.data)==null?void 0:w.result)==null?void 0:D.filter(fe=>(fe==null?void 0:fe.property_name)===""))==null?void 0:V[0];let y=[];if(h!=null&&h.object_name){h=h==null?void 0:h.object_name;let fe=await L.getPageDataApi({platId:parseInt((E=_i==null?void 0:_i.value)==null?void 0:E.plat_id),pageName:h});fe=(C=(j=(O=(M=(Y=fe==null?void 0:fe.data)==null?void 0:Y.result)==null?void 0:M[0])==null?void 0:O.contents)==null?void 0:j.find(ae=>{var se;return(se=ae==null?void 0:ae.key)==null?void 0:se.includes("content")}))==null?void 0:C.value,p=(S=fe==null?void 0:fe.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)!==""),p==null||p.forEach(ae=>{y.push(ae.functionName),vo[ae.functionName]=new Function("return "+ae.functionContent)()})}if((r==null?void 0:r.length)===0)return m;for(let fe in r){let ae=(_=r==null?void 0:r[fe])==null?void 0:_.functionName;const se=vo==null?void 0:vo[ae];let De=(k=r==null?void 0:r[fe])==null?void 0:k.methods;if(De=me.analyzeSplitToContent(De,","),console.log(De),(g=De==null?void 0:De.find(Pe=>Pe==null?void 0:Pe.includes("@FunctionType")))!=null&&g.includes(i)||(De==null?void 0:De.length)===0){let Pe=((G=(R=($=De==null?void 0:De.find(ke=>ke==null?void 0:ke.includes("@FunctionExtent")))==null?void 0:$.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(ke=>ke===ae)){let ke="";try{let q=(ie=r==null?void 0:r[fe])==null?void 0:ie.functionRelatedWords,re=(c==null?void 0:c.length)>0?c==null?void 0:c.map(Ee=>{var We;return Ee==null?void 0:Ee[(We=r==null?void 0:r[fe])==null?void 0:We.prop]}):["0"];re=re==null?void 0:re.map(Ee=>Ee==null?void 0:Ee.slice((Ee==null?void 0:Ee.length)-5,Ee==null?void 0:Ee.length)),re=re==null?void 0:re.map(Ee=>me.isNumber(parseInt(Ee))&&parseInt(Ee)?parseInt(Ee):0);let Ae=Math.max(...re);q=q==null?void 0:q.map(Ee=>{if(Ee!=null&&Ee.includes("'"))return Ee==null?void 0:Ee.replaceAll("'","");if(Ee!=null&&Ee.includes("@"))return Ae+1;{let We=Object.keys(m);return Ee=(m==null?void 0:m[Ee])??(m==null?void 0:m[We==null?void 0:We.find(da=>da==null?void 0:da.includes("."+Ee))]),Ee}}),ke=se(...q)}catch(q){Ka.ElMessage.warning("关联数据出现错误,"+q.message)}let B=(Se=r==null?void 0:r[fe])==null?void 0:Se.prop;m[B]=ke}else m=se({contents:m,valueString:(te=r==null?void 0:r[fe])==null?void 0:te.functionRelatedWords,prop:(Z=r==null?void 0:r[fe])==null?void 0:Z.prop,headers:n,typeString:Pe,allContents:s})}}return m},Up=L.useLoginState(L.pinia),{loginUserInfo:Qr}=L.storeToRefs(Up),qp=L.useMenuState(L.pinia),{activeMenuPath:cs,currentMenuPath:mo}=L.storeToRefs(qp),cc=L.useUnit(L.pinia);let us="$R";const{selectTitle:Ci}=L.storeToRefs(cc),uc=async(l,r)=>{var m,p,h,y,u,w,D,V,E,Y,M,O,j;let n=cs.value,i="",s=((m=Ci==null?void 0:Ci.value)==null?void 0:m.find(C=>(C==null?void 0:C.condition)==="child"&&!(C!=null&&C.relatedContent)))??void 0;(l==null?void 0:l.length)===0||(n=r?n:(p=l==null?void 0:l[0])==null?void 0:p.object_name,i=(h=l==null?void 0:l[0])==null?void 0:h.father_name);let c=[];if(i!==""){let C=i;(C==null?void 0:C[(C==null?void 0:C.length)-1])==="/"&&(C=C==null?void 0:C.slice(0,(C==null?void 0:C.length)-1));let S=await Kr(C,!1);S=(y=S==null?void 0:S[0])==null?void 0:y.compData;let _=(u=S==null?void 0:S.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:u.contents;_=((w=_==null?void 0:_.find(g=>g==null?void 0:g.isMainKey))==null?void 0:w.prop)??((D=_==null?void 0:_[0])==null?void 0:D.prop);let k=(E=(V=S==null?void 0:S.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:V.contents)==null?void 0:E.map(g=>({label:g==null?void 0:g[_],value:g==null?void 0:g[_]}));c=(Y=i==null?void 0:i.split("/"))==null?void 0:Y.map(g=>(g===""?s?(s.isShow=!0,g=s):g={value:g,condition:"child",options:k,parentContent:(i==null?void 0:i[(i==null?void 0:i.length)-1])==="/"?i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1):i,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(n!==""){let C=(M=n==null?void 0:n.split("/"))==null?void 0:M.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((O=C==null?void 0:C[0])==null?void 0:O.value)===((j=c==null?void 0:c[0])==null?void 0:j.value)&&(C=C==null?void 0:C.filter((S,_)=>_!==0)),c=[...c??[],...C??[]]}i===""&&s&&((s==null?void 0:s.parentContent)!==cs.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&c.push(s)),cc.setSelectTitle(c)},Wp=async l=>{var c,m,p,h,y,u,w,D,V;let r=await L.getPageDataApi({platId:parseInt((c=Qr==null?void 0:Qr.value)==null?void 0:c.plat_id),pageName:"menu"}),n=(m=r==null?void 0:r.data)==null?void 0:m.result,i=(u=(y=(h=(p=l==null?void 0:l.filter(E=>(E==null?void 0:E.comp)==="Table"))==null?void 0:p[0])==null?void 0:h.compData)==null?void 0:y.find(E=>(E==null?void 0:E.key)==="filter"))==null?void 0:u.contents;i=(V=(D=(w=i==null?void 0:i.replace("(",us))==null?void 0:w.split(us))==null?void 0:D[0])==null?void 0:V.replaceAll(":","/");let s=n==null?void 0:n.filter(E=>{var Y;return(E==null?void 0:E.object_name)===mo.value+"/"||((Y=mo.value)==null?void 0:Y.includes(i))&&i+"/"===(E==null?void 0:E.object_name)});return(s==null?void 0:s.length)>0&&(l=l==null?void 0:l.map(E=>{var Y;return(E==null?void 0:E.comp)==="Table"&&(E.compData=(Y=E==null?void 0:E.compData)==null?void 0:Y.map(M=>{var O,j,C;return(M==null?void 0:M.key)==="header"&&(Array.isArray((O=M.contents)==null?void 0:O[0])?M.contents[0]=(C=M.contents[0])==null?void 0:C.map((S,_)=>{var k;return _===0&&(S.isExistChild=!0,(k=mo.value)!=null&&k.includes(i)&&(S.fatherPath=i)),S}):M.contents=(j=M.contents)==null?void 0:j.map((S,_)=>{var k;return _===0&&(S.isExistChild=!0,(k=mo.value)!=null&&k.includes(i)&&(S.fatherPath=i)),S})),M})),E})),l},Kr=async(l,r,n={})=>{var m,p,h,y,u,w,D,V,E,Y,M,O;let i=await L.getPageDataApi({platId:parseInt((m=Qr==null?void 0:Qr.value)==null?void 0:m.plat_id),pageName:l}),s=(p=i==null?void 0:i.data)==null?void 0:p.result;if((s==null?void 0:s.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==l){let j=await L.getPageDataApi({platId:parseInt((h=Qr==null?void 0:Qr.value)==null?void 0:h.plat_id),pageName:n==null?void 0:n.originPath});if(((u=(y=j==null?void 0:j.data)==null?void 0:y.result)==null?void 0:u.length)>0){let C=await ss((w=j==null?void 0:j.data)==null?void 0:w.result,n,!1);C=C==null?void 0:C.map(async k=>{var R,G,ie,Se,te,Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma;let g=[],$=(R=Object.keys(k))==null?void 0:R.filter(P=>(P==null?void 0:P.includes("name"))&&P!=="nameContents");for(let P in k)$!=null&&$.find(H=>H===P)&&g.push(k==null?void 0:k[P]);if(g=g.reverse(),(k==null?void 0:k.comp)==="Table"){let P=(Se=(ie=(G=k==null?void 0:k.compData)==null?void 0:G.find(Q=>(Q==null?void 0:Q.key)==="tableContents"))==null?void 0:ie.contents)==null?void 0:Se.map(Q=>{let he={};for(let ge in Q)ge!=="id"&&ge!=="create_time"&&ge!=="update_time"&&ge!=="sort"&&ge!=="create_user_id"&&ge!=="update_user_id"&&ge!=="department_id"&&ge!=="relatedId"&&(he[ge]=Q==null?void 0:Q[ge]);return Q=Object.values(he),Q}),H=(Z=(te=k==null?void 0:k.compData)==null?void 0:te.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:Z.contents;if(Array.isArray(H==null?void 0:H[0])?(H[0].push({label:"排序",prop:"sort"}),H[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(fe=H[0])!=null&&fe.find(Q=>(Q==null?void 0:Q.prop)==="disabled")&&(H[0]=(ae=H[0])==null?void 0:ae.filter(Q=>(Q==null?void 0:Q.prop)!=="disabled"),H[0].unshift({label:"",prop:"disabled",sortable:!1}))):(H||(H=[]),H.push({label:"排序",prop:"sort"}),H.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),H!=null&&H.find(Q=>(Q==null?void 0:Q.prop)==="disabled")&&(H=H==null?void 0:H.filter(Q=>(Q==null?void 0:Q.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(Q=>{var he;return(Q==null?void 0:Q.calculatorFilter)&&((he=Q==null?void 0:Q.calculatorFilter)==null?void 0:he.includes("Auto"))})&&(P=await gt(P,H,"Auto"),P=P==null?void 0:P.map(Q=>Object.values(Q))),k!=null&&k.fatherSyncContents){Array.isArray((se=k==null?void 0:k.fatherSyncContents)==null?void 0:se[0])&&(k.fatherSyncContents=(De=k==null?void 0:k.fatherSyncContents)==null?void 0:De[0]);let Q=(Pe=Ci.value)==null?void 0:Pe.find(he=>(he==null?void 0:he.condition)==="child");k.fatherSyncContents=(ke=k==null?void 0:k.fatherSyncContents)==null?void 0:ke.map(he=>{var ge,ha,Qe,pe,Ce,ma;return((ha=he==null?void 0:he.menus)==null?void 0:ha[((ge=he==null?void 0:he.menus)==null?void 0:ge.length)-1])==="/"&&(Q==null?void 0:Q.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(Q==null?void 0:Q.value):((pe=he==null?void 0:he.menus)==null?void 0:pe[((Qe=he==null?void 0:he.menus)==null?void 0:Qe.length)-1])==="/"&&(Q==null?void 0:Q.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ma=he.menus)==null?void 0:ma.slice(0,((Ce=he.menus)==null?void 0:Ce.length)-1)),he})}if(k!=null&&k.sonSyncContents){Array.isArray((B=k==null?void 0:k.sonSyncContents)==null?void 0:B[0])&&(k.sonSyncContents=(q=k==null?void 0:k.sonSyncContents)==null?void 0:q[0]);let Q=(re=Ci.value)==null?void 0:re.find(he=>(he==null?void 0:he.condition)==="child");k.sonSyncContents=(Ae=k==null?void 0:k.sonSyncContents)==null?void 0:Ae.map(he=>{var ge,ha,Qe,pe,Ce,ma;return((ha=he==null?void 0:he.menus)==null?void 0:ha[((ge=he==null?void 0:he.menus)==null?void 0:ge.length)-1])==="/"&&(Q==null?void 0:Q.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(Q==null?void 0:Q.value):((pe=he==null?void 0:he.menus)==null?void 0:pe[((Qe=he==null?void 0:he.menus)==null?void 0:Qe.length)-1])==="/"&&(Q==null?void 0:Q.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ma=he.menus)==null?void 0:ma.slice(0,((Ce=he.menus)==null?void 0:Ce.length)-1)),he})}if(k!=null&&k.relatedQuotes){Array.isArray((Ee=k==null?void 0:k.relatedQuotes)==null?void 0:Ee[0])&&(k.relatedQuotes=(We=k==null?void 0:k.relatedQuotes)==null?void 0:We[0]);let Q=(da=Ci.value)==null?void 0:da.find(he=>(he==null?void 0:he.condition)==="child");k.relatedQuotes=(Ta=k==null?void 0:k.relatedQuotes)==null?void 0:Ta.map(he=>{var ge,ha,Qe,pe,Ce,ma;return((ha=he==null?void 0:he.menus)==null?void 0:ha[((ge=he==null?void 0:he.menus)==null?void 0:ge.length)-1])==="/"&&(Q==null?void 0:Q.parentContent)+"/"!==(he==null?void 0:he.menus)?he.menus=(he==null?void 0:he.menus)+(Q==null?void 0:Q.value):((pe=he==null?void 0:he.menus)==null?void 0:pe[((Qe=he==null?void 0:he.menus)==null?void 0:Qe.length)-1])==="/"&&(Q==null?void 0:Q.parentContent)+"/"===(he==null?void 0:he.menus)&&(he.menus=(ma=he.menus)==null?void 0:ma.slice(0,((Ce=he.menus)==null?void 0:Ce.length)-1)),he})}k={filter:(la=(le=k==null?void 0:k.compData)==null?void 0:le.find(Q=>(Q==null?void 0:Q.key)==="filter"))==null?void 0:la.contents,key:k==null?void 0:k.comp,name:g,tableColumns:H,tableContents:P,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 P=(Oe=(Ge=(ve=k==null?void 0:k.compData)==null?void 0:ve.find(Q=>(Q==null?void 0:Q.key)==="formContent"))==null?void 0:Ge.contents)==null?void 0:Oe.map(Q=>(Q==null?void 0:Q.value)??"");P=[P];let H=(Fe=(ze=(ce=k==null?void 0:k.compData)==null?void 0:ce.find(Q=>(Q==null?void 0:Q.key)==="formContent"))==null?void 0:ze.contents)==null?void 0:Fe.map(Q=>(Q.value="",Q));k={contents:P,filter:(Ma=(xa=k==null?void 0:k.compData)==null?void 0:xa.find(Q=>(Q==null?void 0:Q.key)==="filter"))==null?void 0:Ma.contents,key:k==null?void 0:k.comp,name:g,value:H,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}),C=await Promise.all(C);let S=[{key:"menuPath",contents:[{path:l,fatherPath:(E=(V=(D=j==null?void 0:j.data)==null?void 0:D.result)==null?void 0:V[0])==null?void 0:E.father_name,isShow:!1}]},{key:l,contents:C}];await L.createPlatFormDataApi({platId:parseInt((Y=Qr==null?void 0:Qr.value)==null?void 0:Y.plat_id),changeData:S});let _=await L.getPageDataApi({platId:parseInt((M=Qr==null?void 0:Qr.value)==null?void 0:M.plat_id),pageName:l});s=(O=_==null?void 0:_.data)==null?void 0:O.result}}r&&await uc(s,!!(n!=null&&n.originPath));let c=await ss(s,n);return r&&(c=await Wp(c)),c==null?void 0:c.filter(j=>j)},ds=async l=>{var i,s,c,m,p,h,y,u,w,D,V;let r=(i=l==null?void 0:l.menus)==null?void 0:i.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(E=>{var Y,M;return(E==null?void 0:E.name)===((M=l==null?void 0:l.groups)==null?void 0:M[((Y=l==null?void 0:l.groups)==null?void 0:Y.length)-1])}))==null?void 0:m[0],(h=(p=n==null?void 0:n.compData)==null?void 0:p.find(E=>(E==null?void 0:E.key)==="tableContents"))!=null&&h.contents){n=(u=(y=n==null?void 0:n.compData)==null?void 0:y.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:u.contents;let E=((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(Y=>{var M,O,j,C;return(Y==null?void 0:Y[l!=null&&l.endChildMenu?E:(M=l==null?void 0:l.words)==null?void 0:M[0]])===(l!=null&&l.relatedWords&&((O=l==null?void 0:l.relatedWords)==null?void 0:O.length)>0?(C=(j=l.value)==null?void 0:j.split(" "))==null?void 0:C[0]:l.value)}),n==null?void 0:n[0]}else{let E=(V=(D=n==null?void 0:n.compData)==null?void 0:D.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:V.contents,Y={};return E==null||E.forEach(M=>{Y[M.prop]=M.value}),Y}},Kp={key:0,class:"extra-button-content"},Gp={class:"table-operator-wrap"},Yp={key:0,class:"extra-button-filter"},Jp={key:1,class:"extra-header"},Xp=["onClick"],Zp={class:"table-op-text"},Qp={class:"table-op-text"},ef={class:"drop-menu",style:{width:"120px"}},af=["onClick"],lf={key:0},rf={key:1},nf=["onClick"],of={class:"table-op-text"},tf={key:1,class:"extra-button-content tabs-button-wrapper"},sf={class:"table-operator-wrap"},cf={class:"extra-button-filter"},uf={key:0,class:"extra-header"},df={class:"table-op-action"},pf={class:"table-op-text"},ff={class:"drop-menu",style:{width:"120px"}},hf={key:0},vf={key:1},mf=["onClick"],yf={class:"table-op-text"},gf={__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,i=l,s=()=>{const g=(i==null?void 0:i.menuFilter)||[];return Array.isArray(g)&&(g==null?void 0:g.some($=>{const R=typeof $=="string"?$:JSON.stringify($);return R==null?void 0:R.includes("HideGroup=Yes")}))},c=a.ref(""),m=a.ref(!1),p=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,$){return g.map(R=>{const G={...R};return $.forEach(ie=>{delete G[ie]}),G})}function w(g){if(!g||g.t!=="n")return(g==null?void 0:g.v)??"";const $=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 te of G)if(R.includes(te))return D($);const ie=/[ymdhms]/.test(R),Se=/^[0#\.\,\s]+$/.test(R.replace(/[\\\/\-:]/g,""));if(ie&&!Se)return D($)}if($>=1&&$<=73050){if($<5e3)return $;if($>=5e3&&$<4e4){const R=Math.floor(($-25569)/365.25)+1970;return R>=1970&&R<=2e3&&g.z&&/[ymd]/.test(String(g.z).toLowerCase())?D($):$}if($>=4e4)return D($)}return $}function D(g){if(typeof g!="number")return g;try{const $=new Date((g-25569)*86400*1e3);if(isNaN($.getTime()))return g;const R=$.getFullYear(),G=String($.getMonth()+1).padStart(2,"0"),ie=String($.getDate()).padStart(2,"0");return`${R}-${G}-${ie}`}catch{return g}}const V=g=>{const $=g.raw;if(!$)return;const R=new FileReader;R.onload=G=>{try{const ie=new Uint8Array(G.target.result),Se=me.readSync(ie,{type:"array"}),te=Se.SheetNames[0],Z=Se.Sheets[te],ae=me.utils.decode_range(Z["!ref"]).e.c+1,se=new Array(ae).fill(""),De=[];for(const re in Z){if(re[0]==="!")continue;const{r:Ae,c:Ee}=me.utils.decode_cell(re),We=Z[re];let da=w(We);if((da==null||da==="")&&(da=""),Ae===0)se[Ee]=da;else{if(!De[Ae-1]){De[Ae-1]={};for(let Ta=0;Ta<ae;Ta++)De[Ae-1][`col_${Ta}`]=""}De[Ae-1][`col_${Ee}`]=da}}for(let re=0;re<ae;re++)se[re]===void 0&&(se[re]="");const Pe=[];for(let re=0;re<se.length;re++)(!se[re]||se[re].toString().trim()==="")&&Pe.push(re);let ke,B;(Pe==null?void 0:Pe.length)>0?(Ka.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),ke=se.filter((re,Ae)=>!Pe.includes(Ae)),B=u(De,Pe==null?void 0:Pe.map(re=>`col_${re}`))):(ke=se,B=De);const q=De==null?void 0:De[0];if(!(q!=null&&q.hasOwnProperty("col_0")))return Ka.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",ke,B)}catch(ie){throw Ka.ElMessage.error(ie.message),new Error(ie.message)}},R.readAsArrayBuffer($)},E=g=>{var R;const $=(R=p.value)==null?void 0:R.reduce((G,ie,Se)=>(Se===0?G[ie.label]=g:G[ie.label]=ie==null?void 0:ie.value,G),{});n("filter",$,g,!0)},Y=(g,$={})=>{n("buttonClick",g,"",$)},M=g=>{var $,R;p.value=(R=($=me.getColumnChild(L.cloneDeep(g)))==null?void 0:$.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)??""}))},O=a.ref(!1),j=g=>{var $;if((g==null?void 0:g.buttonName)==="确认"&&(n("filter",g==null?void 0:g.content),O.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=L.cloneDeep(g==null?void 0:g.content);for(const G in R)R[G]="";p.value=($=p.value)==null?void 0:$.map(G=>({...G,value:""})),n("filter",R),O.value=!1}m.value=!1},C=()=>{m.value=!m.value},S=()=>{var $,R;p.value=($=p.value)==null?void 0:$.map(G=>({...G,value:""}));const g=(R=p.value)==null?void 0:R.reduce((G,ie)=>(G[ie.label]=ie.value,G),{});n("filter",g)},_=a.ref(null);let k;return k=g=>{var ie;if(!m.value)return;const $=(ie=_==null?void 0:_.value)==null?void 0:ie.$el,R=$==null?void 0:$.contains(g.target);let G=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(Se=>{Se.contains(g.target)&&(G=!0)}),!R&&!G&&(m.value=!1)},a.onMounted(()=>{document.addEventListener("click",k),M(i.columns)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",k)}),a.watch(()=>i.columns,()=>{M(i.columns)},{deep:!0,immediate:!0}),(g,$)=>{var Z,fe,ae,se,De,Pe,ke,B;const R=a.resolveComponent("el-icon"),G=a.resolveComponent("svg-icon"),ie=a.resolveComponent("el-input"),Se=a.resolveComponent("el-upload"),te=a.resolveComponent("el-button");return l.pageLayout==="vertical"?(a.openBlock(),a.createElementBlock("div",Kp,[s()?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(l.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(i==null?void 0:i.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((i==null?void 0:i.level)-1)*12+"px",fontWeight:600-((i==null?void 0:i.level)-1)*100>=400?600-((i==null?void 0:i.level)-1)*100:400,fontSize:17-(i==null?void 0:i.level)>=14?17-(i==null?void 0:i.level)+"px":"14px"})},a.toDisplayString(l.compName),7)),a.createElementVNode("div",Gp,[i!=null&&i.filterShow?(a.openBlock(),a.createElementBlock("div",Yp,[a.createVNode(Vu,{trigger:"contextmenu",ref_key:"popOverRef",ref:_,title:"",width:800,placement:"bottom-start",isVisible:m.value,"onUpdate:isVisible":$[4]||($[4]=q=>m.value=q)},{reference:a.withCtx(()=>{var q,re,Ae,Ee;return[a.createVNode(ie,{modelValue:c.value,"onUpdate:modelValue":$[0]||($[0]=We=>c.value=We),style:{"min-width":"80px"},placeholder:O.value?(Ae=(re=(q=l.filterValues)==null?void 0:q.filter(We=>We))==null?void 0:re.slice(0,3))==null?void 0:Ae.join("/"):"搜索","prefix-icon":a.unref(Ka.search_default),clearable:"",onInput:E,disabled:((Ee=p.value)==null?void 0:Ee.length)===0},{suffix:a.withCtx(()=>{var We,da;return[!c.value&&((da=(We=l.filterValues)==null?void 0:We.filter(Ta=>Ta))!=null&&da.join("/"))?(a.openBlock(),a.createBlock(R,{key:0,style:{cursor:"pointer"},onClick:S},{default:a.withCtx(()=>[a.createVNode(a.unref(Ka.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(C,["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:$[1]||($[1]=a.withModifiers(()=>{},["stop"])),onKeyup:$[2]||($[2]=a.withModifiers(()=>{},["stop"])),onKeypress:$[3]||($[3]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:p.value,buttonValue:h.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:h.value,isStartJustify:!1,onOnButtonClick:j},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",Jp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((fe=l.buttons)==null?void 0:fe.filter(q=>l.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,re)=>{var Ae;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:re},[(q==null?void 0:q.type)==="upload"?(a.openBlock(),a.createBlock(Se,{key:0,class:"upload-button-wrap","on-change":V,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!l.lockingPage},{default:a.withCtx(()=>{var Ee;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:We=>Y(q==null?void 0:q.label)},[a.createVNode(G,{class:"table-op-icon",name:(Ee=y==null?void 0:y.find(We=>(We==null?void 0:We.label)===(q==null?void 0:q.label)))==null?void 0:Ee.icon},null,8,["name"]),a.createElementVNode("span",Zp,a.toDisplayString(q==null?void 0:q.label),1)],10,Xp)]}),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(nl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>{var Ee;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}])},[a.createVNode(G,{class:"table-op-icon",name:(Ee=y==null?void 0:y.find(We=>(We==null?void 0:We.label)===(q==null?void 0:q.label)))==null?void 0:Ee.icon},null,8,["name"]),a.createElementVNode("span",Qp,a.toDisplayString(q==null?void 0:q.label),1)],2)]}),dropMenu:a.withCtx(()=>[a.createElementVNode("div",ef,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q==null?void 0:q.contents,Ee=>{var We,da;return a.openBlock(),a.createElementBlock("div",{key:Ee==null?void 0:Ee.label,class:a.normalizeClass(["table-op-drop-item",{"is-disabled":!!l.lockingPage}]),onClick:Ta=>!l.lockingPage&&Y(Ee==null?void 0:Ee.label)},[a.createTextVNode(a.toDisplayString(Ee==null?void 0:Ee.label),1),(We=Ee==null?void 0:Ee.label)!=null&&We.includes("选中")?(a.openBlock(),a.createElementBlock("span",lf,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(da=Ee==null?void 0:Ee.label)!=null&&da.includes("全部")?(a.openBlock(),a.createElementBlock("span",rf,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)],10,af)}),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:Ee=>!l.lockingPage&&Y(q==null?void 0:q.label,q)},[a.createVNode(G,{class:"table-op-icon",name:(Ae=y==null?void 0:y.find(Ee=>(Ee==null?void 0:Ee.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"]),a.createElementVNode("span",of,a.toDisplayString(q==null?void 0:q.label),1)],10,nf)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",tf,[a.createElementVNode("div",sf,[a.createElementVNode("div",cf,[a.createVNode(ie,{modelValue:c.value,"onUpdate:modelValue":$[5]||($[5]=q=>c.value=q),style:{"min-width":"80px"},placeholder:O.value?(De=(se=(ae=l.filterValues)==null?void 0:ae.filter(q=>q))==null?void 0:se.slice(0,3))==null?void 0:De.join("/"):"搜索","prefix-icon":a.unref(Ka.search_default),clearable:"",onInput:E,disabled:((Pe=p.value)==null?void 0:Pe.length)===0},{suffix:a.withCtx(()=>{var q,re;return[!c.value&&((re=(q=l.filterValues)==null?void 0:q.filter(Ae=>Ae))!=null&&re.join("/"))?(a.openBlock(),a.createBlock(R,{key:0,style:{cursor:"pointer"},onClick:S},{default:a.withCtx(()=>[a.createVNode(a.unref(Ka.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(C,["stop"])},[a.createVNode(G,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),l.buttons&&((ke=l.buttons)==null?void 0:ke.length)>0?(a.openBlock(),a.createElementBlock("div",uf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((B=l.buttons)==null?void 0:B.filter(q=>l.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,re)=>{var Ae;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:re},[(q==null?void 0:q.type)==="upload"?(a.openBlock(),a.createBlock(Se,{key:0,class:"upload-button-wrap","on-change":V,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>{var Ee;return[a.createElementVNode("div",df,[a.createVNode(G,{class:"table-op-icon",name:(Ee=y==null?void 0:y.find(We=>(We==null?void 0:We.label)===(q==null?void 0:q.label)))==null?void 0:Ee.icon},null,8,["name"]),a.createElementVNode("span",pf,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(nl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(te,{key:0,style:{background:"transparent",color:"#000000"}},{icon:a.withCtx(()=>{var Ee;return[a.createVNode(G,{class:"table-op-icon",name:(Ee=y==null?void 0:y.find(We=>(We==null?void 0:We.label)===(q==null?void 0:q.label)))==null?void 0:Ee.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",ff,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q==null?void 0:q.contents,Ee=>(a.openBlock(),a.createBlock(te,{key:Ee==null?void 0:Ee.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:We=>Y(Ee==null?void 0:Ee.label)},{default:a.withCtx(()=>{var We,da;return[a.createTextVNode(a.toDisplayString(Ee==null?void 0:Ee.label),1),(We=Ee==null?void 0:Ee.label)!=null&&We.includes("选中")?(a.openBlock(),a.createElementBlock("span",hf,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(da=Ee==null?void 0:Ee.label)!=null&&da.includes("全部")?(a.openBlock(),a.createElementBlock("span",vf,"("+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:Ee=>!l.lockingPage&&Y(q==null?void 0:q.label,q)},[a.createVNode(G,{class:"table-op-icon",name:(Ae=y==null?void 0:y.find(Ee=>(Ee==null?void 0:Ee.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"]),a.createElementVNode("span",yf,a.toDisplayString(q==null?void 0:q.label),1)],10,mf)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])]))}}},bf=er._export_sfc(gf,[["__scopeId","data-v-b53ce8ac"]]),kf={__name:"index",props:{columns:Array,tableData:Array},setup(l){return(r,n)=>{const i=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(i,{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(p=>[a.renderSlot(r.$slots,"content",{row:p.row,column:p.column,$index:p.$index,scope:p}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.children,(h,y)=>(a.openBlock(),a.createBlock(nl._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:D,slotData:V,item:E,column:Y})=>[a.renderSlot(r.$slots,w,a.mergeProps({ref_for:!0},V??D,{item:E??h,slotData:V??D,row:D,column:Y,columnProp:h}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class xf extends Nl.Loader{constructor(r){super(r),this.littleEndian=!0}load(r,n,i,s){const c=this,m=new Nl.FileLoader(c.manager);m.setPath(c.path),m.setResponseType("arraybuffer"),m.setRequestHeader(c.requestHeader),m.setWithCredentials(c.withCredentials),m.load(r,function(p){try{n(c.parse(p))}catch(h){s?s(h):console.error(h),c.manager.itemError(r)}},i,s)}_getDataView(r,n,i,s){switch(i){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(V,E){const Y=V.length,M=new Uint8Array(E);let O=0,j=0,C,S,_;do if(C=V[O++],C<32){if(C++,j+C>E)throw new Error("Output buffer is not large enough");if(O+C>Y)throw new Error("Invalid compressed data");do M[j++]=V[O++];while(--C)}else{if(S=C>>5,_=j-((C&31)<<8)-1,O>=Y)throw new Error("Invalid compressed data");if(S===7&&(S+=V[O++],O>=Y))throw new Error("Invalid compressed data");if(_-=V[O++],j+S+2>E)throw new Error("Output buffer is not large enough");if(_<0)throw new Error("Invalid compressed data");if(_>=j)throw new Error("Invalid compressed data");do M[j++]=M[_++];while(--S+2)}while(O<Y);return M}function i(V){const E={},Y=new Uint8Array(V);let M="",O="",j=0,C=!1;const S=Y.length;for(;j<S&&C===!1;){const $=String.fromCharCode(Y[j++]);$===`
2
- `||$==="\r"?(O.trim().toLowerCase().startsWith("data")&&(C=!0),O=""):O+=$,M+=$}const _=M.search(/[\r\n]DATA\s(\S*)\s/i),k=/[\r\n]DATA\s(\S*)\s/i.exec(M.slice(_-1));if(E.data=k[1],E.headerLen=k[0].length+_,E.str=M.slice(0,E.headerLen),E.str=E.str.replace(/#.*/gi,""),E.version=/^VERSION (.*)/im.exec(E.str),E.fields=/^FIELDS (.*)/im.exec(E.str),E.size=/^SIZE (.*)/im.exec(E.str),E.type=/^TYPE (.*)/im.exec(E.str),E.count=/^COUNT (.*)/im.exec(E.str),E.width=/^WIDTH (.*)/im.exec(E.str),E.height=/^HEIGHT (.*)/im.exec(E.str),E.viewpoint=/^VIEWPOINT (.*)/im.exec(E.str),E.points=/^POINTS (.*)/im.exec(E.str),E.version!==null&&(E.version=parseFloat(E.version[1])),E.fields=E.fields!==null?E.fields[1].split(" "):[],E.type!==null&&(E.type=E.type[1].split(" ")),E.width!==null&&(E.width=parseInt(E.width[1])),E.height!==null&&(E.height=parseInt(E.height[1])),E.viewpoint!==null&&(E.viewpoint=E.viewpoint[1]),E.points!==null&&(E.points=parseInt(E.points[1],10)),E.points===null&&(E.points=E.width*E.height),E.size!==null&&(E.size=E.size[1].split(" ").map(function($){return parseInt($,10)})),E.count!==null)E.count=E.count[1].split(" ").map(function($){return parseInt($,10)});else{E.count=[];for(let $=0,R=E.fields.length;$<R;$++)E.count.push(1)}E.offset={};let g=0;for(let $=0,R=E.fields.length;$<R;$++)E.data==="ascii"?E.offset[E.fields[$]]=$:(E.offset[E.fields[$]]=g,g+=E.size[$]*E.count[$]);return E.rowSize=g,E}const s=i(r),c=[],m=[],p=[],h=[],y=[],u=new Nl.Color;if(s.data==="ascii"){const V=s.offset,M=new TextDecoder().decode(r).slice(s.headerLen).split(`
3
- `);for(let O=0,j=M.length;O<j;O++){if(M[O]==="")continue;const C=M[O].split(" ");if(V.x!==void 0&&(c.push(parseFloat(C[V.x])),c.push(parseFloat(C[V.y])),c.push(parseFloat(C[V.z]))),V.rgb!==void 0){const S=s.fields.findIndex(ie=>ie==="rgb"),_=s.type[S],k=parseFloat(C[V.rgb]);let g=k;if(_==="F"){const ie=new Float32Array(1);ie[0]=k,g=new Int32Array(ie.buffer)[0]}const $=(g>>16&255)/255,R=(g>>8&255)/255,G=(g>>0&255)/255;u.setRGB($,R,G,Nl.SRGBColorSpace),p.push(u.r,u.g,u.b)}V.normal_x!==void 0&&(m.push(parseFloat(C[V.normal_x])),m.push(parseFloat(C[V.normal_y])),m.push(parseFloat(C[V.normal_z]))),V.intensity!==void 0&&h.push(parseFloat(C[V.intensity])),V.label!==void 0&&y.push(parseInt(C[V.label]))}}if(s.data==="binary_compressed"){const V=new Uint32Array(r.slice(s.headerLen,s.headerLen+8)),E=V[0],Y=V[1],M=n(new Uint8Array(r,s.headerLen+8,E),Y),O=new DataView(M.buffer),j=s.offset;for(let C=0;C<s.points;C++){if(j.x!==void 0){const S=s.fields.indexOf("x"),_=s.fields.indexOf("y"),k=s.fields.indexOf("z");c.push(this._getDataView(O,s.points*j.x+s.size[S]*C,s.type[S],s.size[S])),c.push(this._getDataView(O,s.points*j.y+s.size[_]*C,s.type[_],s.size[_])),c.push(this._getDataView(O,s.points*j.z+s.size[k]*C,s.type[k],s.size[k]))}if(j.rgb!==void 0){const S=s.fields.indexOf("rgb"),_=O.getUint8(s.points*j.rgb+s.size[S]*C+2)/255,k=O.getUint8(s.points*j.rgb+s.size[S]*C+1)/255,g=O.getUint8(s.points*j.rgb+s.size[S]*C+0)/255;u.setRGB(_,k,g,Nl.SRGBColorSpace),p.push(u.r,u.g,u.b)}if(j.normal_x!==void 0){const S=s.fields.indexOf("normal_x"),_=s.fields.indexOf("normal_y"),k=s.fields.indexOf("normal_z");m.push(this._getDataView(O,s.points*j.normal_x+s.size[S]*C,s.type[S],s.size[S])),m.push(this._getDataView(O,s.points*j.normal_y+s.size[_]*C,s.type[_],s.size[_])),m.push(this._getDataView(O,s.points*j.normal_z+s.size[k]*C,s.type[k],s.size[k]))}if(j.intensity!==void 0){const S=s.fields.indexOf("intensity");h.push(this._getDataView(O,s.points*j.intensity+s.size[S]*C,s.type[S],s.size[S]))}if(j.label!==void 0){const S=s.fields.indexOf("label");y.push(O.getInt32(s.points*j.label+s.size[S]*C,this.littleEndian))}}}if(s.data==="binary"){const V=new DataView(r,s.headerLen),E=s.offset;for(let Y=0,M=0;Y<s.points;Y++,M+=s.rowSize){if(E.x!==void 0){const O=s.fields.indexOf("x"),j=s.fields.indexOf("y"),C=s.fields.indexOf("z");c.push(this._getDataView(V,M+E.x,s.type[O],s.size[O])),c.push(this._getDataView(V,M+E.y,s.type[j],s.size[j])),c.push(this._getDataView(V,M+E.z,s.type[C],s.size[C]))}if(E.rgb!==void 0){const O=V.getUint8(M+E.rgb+2)/255,j=V.getUint8(M+E.rgb+1)/255,C=V.getUint8(M+E.rgb+0)/255;u.setRGB(O,j,C,Nl.SRGBColorSpace),p.push(u.r,u.g,u.b)}if(E.normal_x!==void 0){const O=s.fields.indexOf("normal_x"),j=s.fields.indexOf("normal_y"),C=s.fields.indexOf("normal_z");m.push(this._getDataView(V,M+E.normal_x,s.type[O],s.size[O])),m.push(this._getDataView(V,M+E.normal_y,s.type[j],s.size[j])),m.push(this._getDataView(V,M+E.normal_z,s.type[C],s.size[C]))}if(E.intensity!==void 0){const O=s.fields.indexOf("intensity");h.push(this._getDataView(V,M+E.intensity,s.type[O],s.size[O]))}E.label!==void 0&&y.push(V.getInt32(M+E.label,this.littleEndian))}}const w=new Nl.BufferGeometry;c.length>0&&w.setAttribute("position",new Nl.Float32BufferAttribute(c,3)),m.length>0&&w.setAttribute("normal",new Nl.Float32BufferAttribute(m,3)),p.length>0&&w.setAttribute("color",new Nl.Float32BufferAttribute(p,3)),h.length>0&&w.setAttribute("intensity",new Nl.Float32BufferAttribute(h,1)),y.length>0&&w.setAttribute("label",new Nl.Int32BufferAttribute(y,1)),w.computeBoundingSphere();const D=new Nl.PointsMaterial({size:.005});return p.length>0&&(D.vertexColors=!0),new Nl.Points(w,D)}}const wf=L.useModelComp(L.pinia),{systemPath:ps}=L.storeToRefs(wf),yo=a.ref(),fs=new WeakMap;function _f(l,r,n,i,s){const c=async D=>{try{const V=await L.platformDownloadFile({url:D});if(V.status!==200)throw new Error(`下载失败: ${V.status}`);return V.data}catch(V){throw console.error("addModelFromUrl失败:",V),V}},m=D=>new Promise((V,E)=>{const Y=new FileReader;Y.onload=M=>{try{const O=M.target.result,C=new Rn.MTLLoader().parse(O);C.preload(),V(C)}catch(O){E(O)}},Y.onerror=()=>{E(new Error("MTL文件读取失败"))},Y.readAsText(D)}),p=async D=>{const V={materials:{},create:function(E){return this.materials[E]?this.materials[E]:(console.warn(`Material '${E}' not found, using default material`),new Nl.MeshPhongMaterial({color:8947848,side:Nl.DoubleSide}))},getAsArray:function(){const E=[];for(const Y in this.materials)E.push(this.materials[Y]);return E},preload:function(){for(const E in this.materials)this.materials[E].map&&(this.materials[E].map.needsUpdate=!0)}};for(const E of D){const Y=await m(E);Object.assign(V.materials,Y.materials)}return V.preload(),V},h=async(D,V=[])=>new Promise((E,Y)=>{const M=new FileReader;M.onload=async O=>{try{const j=O.target.result;let C=null;V&&V.length>0&&(V.length===1?C=await m(V[0]):C=await p(V));const S=new Rn.OBJLoader;C&&S.setMaterials(C);const _=S.parse(j);C||_.traverse(k=>{k.isMesh&&(k.material=new Nl.MeshPhongMaterial({color:8947848,side:Nl.DoubleSide}))}),E(_)}catch(j){Y(j)}},M.onerror=()=>{Y(new Error("OBJ文件读取失败"))},M.readAsText(D)}),y=async D=>{var V;try{n.value=!0;const{scene:E}=l();if(!E)throw new Error("Scene not initialized");s();const Y=[];for(let M=0;M<D.length;M++){const O=D[M];i.value=`正在加载模型 ${M+1}/${D.length}...`;const j=await c(O.objUrl),C=((V=O.objUrl)==null?void 0:V.split("/").pop())||`model_${M}.obj`,S=new File([j],C,{type:j.type});let _=[];if(O.mtlUrls){const g=Array.isArray(O.mtlUrls)?O.mtlUrls:[O.mtlUrls];for(let $=0;$<g.length;$++){const R=g[$],G=await c(R),ie=(R==null?void 0:R.split("/").pop())||`material_${M}_${$}.mtl`,Se=new File([G],ie,{type:G.type});_.push(Se)}}const k=await h(S,_);E.add(k),r.value.push(k),Y.push(k)}return n.value=!1,Y}catch(E){throw console.error("加载模型失败:",E),n.value=!1,E}},u=async(D,V,E=[],Y=[])=>{let M;const O=D.toLowerCase();switch(O){case".txt":case".cpt":case".obj":const j=await V.text();if(O===".txt"||O===".cpt"){const le=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,ve=[...j.matchAll(le)].map(ce=>({x:parseFloat(ce[1]),y:parseFloat(ce[2]),z:parseFloat(ce[3])})),Ge=new Nl.BufferGeometry,Oe=ve.flatMap(ce=>[ce.x,ce.y,ce.z]);if(Ge.setAttribute("position",new Nl.Float32BufferAttribute(Oe,3)),O===".txt"){const ce=new Nl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});M=new Nl.Points(Ge,ce)}else if(O===".cpt"){const ce=new Nl.LineBasicMaterial({color:"#5B5C99",linewidth:100});M=new Nl.Line(Ge,ce)}}else if(O===".obj"){const le=new Rn.OBJLoader;if(E&&E.length>0){const la=new Rn.MTLLoader;for(const ve of E){const Ge=await ve.text(),Oe=la.parse(Ge);Oe.preload(),le.setMaterials(Oe);break}}M=le.parse(j),(!E||E.length===0)&&M.traverse(la=>{la.isMesh&&(la.material=new Nl.MeshPhongMaterial({color:"#B3B3D4"})),la instanceof Nl.Mesh&&(la.material.side=Nl.DoubleSide)})}break;case".stl":const C=await V.arrayBuffer(),_=new Rn.STLLoader().parse(C),k=new Nl.MeshPhongMaterial({color:"#B3B3D4",side:Nl.DoubleSide});M=new Nl.Mesh(_,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"],$={"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 Nl.Group,G=g.map(le=>new Promise((la,ve)=>{new Rn.STLLoader().load(ps.value===""?`/model/${le}`:`${ps.value}\\${le}`,Oe=>{const ce=new Nl.MeshPhongMaterial({color:$[le]||"#B3B3D4",side:Nl.DoubleSide}),ze=new Nl.Mesh(Oe,ce);la(ze)},void 0,ve)}));try{(await Promise.all(G)).forEach(la=>R.add(la)),M=R}catch(le){throw console.error("加载NC文件对应的STL文件失败:",le),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const ie=new xf,Se=new Nl.Group;try{const le=await Ka.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),la=new Blob([le.data],{type:"application/octet-stream;charset=UTF-8"}),ve=await Ka.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ge=new Blob([ve.data],{type:"application/octet-stream;charset=UTF-8"}),Oe=await new Promise((ze,Fe)=>{const xa=URL.createObjectURL(la);ie.load(xa,Ma=>{const P=new Float32Array(Ma.geometry.attributes.position.count*3);for(let H=0;H<Ma.geometry.attributes.position.count;H++)P[H*3]=1,P[H*3+1]=0,P[H*3+2]=0;Ma.geometry.setAttribute("color",new Nl.BufferAttribute(P,3)),Ma.material.vertexColors=!0,Ma.scale.set(.3,.3,.3),URL.revokeObjectURL(xa),ze(Ma)},void 0,Fe)}),ce=await new Promise((ze,Fe)=>{const xa=URL.createObjectURL(Ge);ie.load(xa,Ma=>{const P=new Float32Array(Ma.geometry.attributes.position.count*3);for(let H=0;H<Ma.geometry.attributes.position.count;H++)P[H*3]=0,P[H*3+1]=1,P[H*3+2]=0;Ma.geometry.setAttribute("color",new Nl.BufferAttribute(P,3)),Ma.material.vertexColors=!0,Ma.scale.set(.3,.3,.3),URL.revokeObjectURL(xa),ze(Ma)},void 0,Fe)});Se.add(Oe),Se.add(ce),M=Se}catch(le){throw console.error("PCD文件加载失败:",le),new Error("无法加载PCD文件")}break;case".urdf":const te=URL.createObjectURL(V),Z=new Ou.URDFLoader,fe="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},se=new WeakMap,De=new WeakMap,Pe=new WeakMap,ke=async le=>{if(se.has(le))return console.log(`从缓存加载: ${le}`),se.get(le);try{const la=await Ka.axios.get(`${fe}/${le}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),ve=new Blob([la.data],{type:"application/octet-stream;charset=UTF-8"});return ae.enableCache&&se.set(le,ve),ve}catch(la){throw console.error(`加载文件失败: ${le}`,la),new Error(`无法加载文件: ${le}`)}},B=(le="default")=>{if(De.has(le))return De.get(le);const la=new Nl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Nl.FrontSide});return De.set(le,la),la},q=le=>{try{le.isBufferGeometry&&le.mergeVertices&&le.mergeVertices(),le.computeVertexNormals&&le.computeVertexNormals(),le.computeBoundingSphere&&le.computeBoundingSphere(),le.deleteAttribute&&le.deleteAttribute("uv2")}catch(la){console.warn("几何体优化失败,使用原始几何体:",la)}return le},re=async(le,la,ve)=>{const Ge=`stl_${la}`;if(Pe.has(Ge)){const Fe=Pe.get(Ge);return new Nl.Mesh(Fe,B())}const Oe=await le.arrayBuffer();let ze=new Rn.STLLoader(ve).parse(Oe);return ze=q(ze),Pe.set(Ge,ze),new Nl.Mesh(ze,B())},Ae=async(le,la,ve)=>{const Ge=`obj_${la}`;if(se.has(Ge))return se.get(Ge).clone();const Oe=await le.text(),ce=new Rn.OBJLoader(ve),ze=la.replace(".obj",".mtl");try{const Ma=await(await ke(ze)).text(),H=new Rn.MTLLoader(ve).parse(Ma);H.preload(),ce.setMaterials(H)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${ze}`)}const Fe=ce.parse(Oe);return Fe.traverse(xa=>{xa.isMesh&&(xa.geometry=q(xa.geometry),xa.castShadow=!0,xa.receiveShadow=!0,xa.renderOrder=1)}),se.set(Ge,Fe),Fe},Ee=(le,la)=>{const ve=new Nl.LOD;if(ve.addLevel(le,0),le.geometry){const Ge=le.geometry.clone(),Oe=new Nl.Mesh(Ge,le.material);ve.addLevel(Oe,50)}return ve};let We=0,da=0;const Ta=[];Z.loadMeshCb=async(le,la,ve,Ge,Oe)=>{const ce=le.split("/").pop(),ze=ve||(()=>{});We++;const Fe=new Promise(async(xa,Ma)=>{try{const P=await ke(ce);if(!P||P.size===0)throw new Error(`文件为空: ${ce}`);const H=ce.split(".").pop().toLowerCase();let Q;switch(H){case"stl":Q=await re(P,ce,la);break;case"obj":Q=await Ae(P,ce,la);break;default:throw new Error(`不支持的文件格式: ${H}`)}ae.enableLOD&&Q.isMesh&&(Q=Ee(Q,ce)),ze(Q),da++,Ge&&Ge({loaded:da,total:We,progress:da/We}),xa(Q)}catch(P){console.error(`mesh文件加载失败: ${ce}`,P);const H=new Nl.Group;ze(H),xa(H);const Q=new Nl.BoxGeometry(.1,.1,.1),he=new Nl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Nl.Mesh(Q,he)}});Ta.push(Fe)};try{if(!te){yo.value=void 0;break}if(M=await Z.loadAsync(te),console.log(`URDF文件加载完成,等待${We}个mesh文件加载...`),Ta.length>0)try{await Promise.allSettled(Ta),console.log(`所有mesh文件处理完成,成功加载: ${da}/${We}`)}catch(ve){console.warn("部分mesh文件加载失败,但继续显示模型",ve)}M.traverse(ve=>{ve.isMesh&&(ve.castShadow=!0,ve.receiveShadow=!0,ve.renderOrder=1,ve.material&&(ve.material.needsUpdate=!0))}),console.time("计算包围盒");const le=new Nl.Box3;le.expandByObject(M);const la=`urdf_${Date.now()}`;M.userData.boundingBox=le.clone(),M.userData.modelId=la,fs.set(la,{box:le.clone(),center:le.getCenter(new Nl.Vector3),size:le.getSize(new Nl.Vector3),maxSize:Math.max(...le.getSize(new Nl.Vector3).toArray())}),yo.value=M,console.log("URDF模型加载完成并优化")}catch(le){console.error("URDF加载失败:",le),yo.value=void 0}finally{te&&URL.revokeObjectURL(te)}break;default:throw new Error(`不支持的文件格式: ${D}`)}return M};return{addModelsFromUrls:y,loadModelByDefaultPath:async D=>{console.log(D);try{n.value=!0,i.value="正在加载模型...";const{scene:V}=l();if(!V)throw new Error("Scene not initialized");s(),await new Promise(Y=>setTimeout(Y,100));const E=[];for(let Y=0;Y<D.length;Y++){const M=D[Y],O=await u(M.suffix,M.blob,M.mtlBlobs||[],M.meshFiles||[]);O&&(V.add(O),r.value.push(O),E.push(O))}return n.value=!1,i.value="",E}catch(V){throw console.error("加载模型失败:",V),n.value=!1,i.value="",V}},urdfModel:yo,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 i,s,c,m,p,h=function(w,D){D.parentNode.insertBefore(w,D)};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)}}i=function(){var w,D=document.createElement("div");D.innerHTML=l._iconfont_svg_string_4827314,(D=D.getElementsByTagName("svg")[0])&&(D.setAttribute("aria-hidden","true"),D.style.position="absolute",D.style.width=0,D.style.height=0,D.style.overflow="hidden",D=D,(w=document.body).firstChild?h(D,w.firstChild):w.appendChild(D))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(s=function(){document.removeEventListener("DOMContentLoaded",s,!1),i()},document.addEventListener("DOMContentLoaded",s,!1)):document.attachEvent&&(c=i,m=l.document,p=!1,u(),m.onreadystatechange=function(){m.readyState=="complete"&&(m.onreadystatechange=null,y())})}function y(){p||(p=!0,c())}function u(){try{m.documentElement.doScroll("left")}catch{return void setTimeout(u,50)}y()}})(window);const Sf=["onClick"],Ef=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,i=r,s=a.ref(null),c=a.ref(null),m=_=>{if(Array.isArray(_)&&_.length>=3){const[k,g,$,R]=_;return R!==void 0?`rgba(${k}, ${g}, ${$}, ${R})`:`rgb(${k}, ${g}, ${$})`}if(typeof _=="string"){const k=_.trim();if(k.startsWith("[")&&k.endsWith("]")){const g=k.slice(1,-1).split(",").map($=>Number($.trim()));if(g.length>=3&&g.every($=>!Number.isNaN($))){const[$,R,G,ie]=g;return ie!==void 0?`rgba(${$}, ${R}, ${G}, ${ie})`:`rgb(${$}, ${R}, ${G})`}}return k}},p=a.computed(()=>{const _=Number(n==null?void 0:n.textSize),k=m(n==null?void 0:n.textColor),g={},$={};return!Number.isNaN(_)&&_&&(g.fontSize=`${_}px`,$.fontSize=`${_}px`),k&&(g.color=k,$.color=k),{label:g,value:$}}),h=a.ref(""),y=a.ref(""),u=a.ref(!1),w=async _=>{if(_){y.value&&(URL.revokeObjectURL(y.value),y.value="");try{const k=await L.platformDownloadFile({url:_}),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,_=>{_&&(h.value=_)},{immediate:!0}),a.watch(h,_=>{w(_)},{immediate:!0});const D=()=>{var _;(_=c.value)==null||_.click()},V=async _=>{var $,R,G;const k=_.target,g=($=k==null?void 0:k.files)==null?void 0:$[0];if(!g){k.value="";return}u.value=!0;try{const ie=new FormData;ie.append("file",g);const Se=await L.platformUploadFile(ie),te=(G=(R=Se==null?void 0:Se.data)==null?void 0:R.result)==null?void 0:G.url;te?(h.value=te,i("update:backGroundImage",te),w(te),Ka.ElMessage.success("背景图片上传成功")):Ka.ElMessage.error("背景图片上传失败")}catch{Ka.ElMessage.error("背景图片上传失败")}finally{u.value=!1,k.value=""}},E=a.computed(()=>y.value?{backgroundImage:`url(${y.value})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),Y=_=>nl.getComponent(_),M=_=>{if(!_)return;const k=_.querySelector("input, textarea, .el-input__inner");k&&typeof k.focus=="function"&&k.focus()},O=(_,k,g)=>{n.disabled||_.field&&(s.value=k,a.nextTick(()=>{M(g.currentTarget)}))},j=()=>{s.value=null},C=_=>{var g;const k=((g=_==null?void 0:_.field)==null?void 0:g.value)??(_==null?void 0:_.value);return k==null||k===""?"-":k},S=_=>{const k=_!=null&&_.width&&_.width>0?_.width:1,$=`calc((100% - ${(k-1)*16}px) / ${k})`;return{flex:`0 0 ${$}`,maxWidth:$,minWidth:"140px",boxSizing:"border-box"}};return(_,k)=>(a.openBlock(),a.createElementBlock("div",{class:"statistics-cards-container",style:a.normalizeStyle(E.value),onClick:k[2]||(k[2]=g=>(n==null?void 0:n.backGround)&&D())},[n!=null&&n.backGround?(a.openBlock(),a.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:k[0]||(k[0]=a.withModifiers(g=>D(),["stop"]))},[a.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:V},null,544),k[3]||(k[3]=a.createElementVNode("img",{src:nl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(_.items,(g,$)=>{var R,G,ie,Se,te,Z,fe,ae;return a.openBlock(),a.createElementBlock("div",{class:"statistics-card",key:$,style:a.normalizeStyle(S(g)),onClick:k[1]||(k[1]=a.withModifiers(()=>{},["stop"]))},[a.createElementVNode("div",{class:"statistics-label",style:a.normalizeStyle(p.value.label)},a.toDisplayString(g==null?void 0:g.label),5),a.createElementVNode("div",{class:"statistics-value",style:a.normalizeStyle(p.value.value),onClick:se=>{var De;return(De=g.field)!=null&&De.isNoClick?null:O(g,$,se)}},[s.value===$&&g.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Y(((R=g.field)==null?void 0:R.type)??"Input")),{key:0,modelValue:g.field.value,"onUpdate:modelValue":se=>g.field.value=se,isEdit:!0,disabled:(G=g.field)==null?void 0:G.disabled,content:((ie=g.field)==null?void 0:ie.contents)??[],optionUrl:g.field,originalValue:(Se=g.field)==null?void 0:Se.value,config:(te=g.field)==null?void 0:te.config,configModel:((Z=g.field)==null?void 0:Z.prop)??((fe=g.field)==null?void 0:fe.name),selectedTagList:((ae=g.field)==null?void 0:ae.selectValue)??[],onBlur:j,onBlurChange:j},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(C(g)),1)],64))],12,Sf)],4)}),128))],4))}}),Cf=er._export_sfc(Ef,[["__scopeId","data-v-060d233a"]]),dc=L.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(l){this.selectArray=l},setSelectString(l){this.selectString=l}}}),Df={class:"calculator-content"},Nf={class:"calculator-child"},Bf={class:"calculator-child"},Tf=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"}]}),(i,s)=>(a.openBlock(),a.createElementBlock("div",Df,[a.createElementVNode("div",Nf,[a.createVNode(nl.ssForm,{rowContents:r.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",Bf,[a.createVNode(nl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Af=er._export_sfc(Tf,[["__scopeId","data-v-73db0fe7"]]),bt=(l,r)=>{let n=l,i=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((p,h)=>{var y;(y=i==null?void 0:i[h])!=null&&y.prop?m[i[h].prop]=p:Array.isArray(p)&&(m.children=bt(p,i))}),Object.assign(m,{id:c})}else return s})),n},pc=(l,r,n)=>{let i=l,s=r;return i=i==null?void 0:i.map((c,m)=>{var p,h;return!Array.isArray(c)||!((p=s==null?void 0:s[m])!=null&&p.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}),i},zf=(l,r,n)=>{if(r==="")return l==null?void 0:l.filter(i=>(i==null?void 0:i.id)!==n);{const i=r.split("-");return Mf(l,i,n)}},Mf=(l,r,n)=>{let i=l,s=r;return(s==null?void 0:s.length)===0?i=i==null?void 0:i.filter(c=>c.id!==n):i=i==null?void 0:i.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=fc(c,s,n)),c)),i},fc=(l,r,n)=>{var c,m;let i=l,s=r;return(s==null?void 0:s.length)===0?i.children=(c=i.children)==null?void 0:c.filter(p=>p.id!==n):i.children=(m=i.children)==null?void 0:m.map(p=>(p.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),p=fc(p,s,n)),p)),i},If=(l,r,n)=>{if(r==="")return n;{const i=r.split("-");return Of(l,i,n)}},Of=(l,r,n)=>{let i=l,s=r;return(s==null?void 0:s.length)===0?i=n:i=i==null?void 0:i.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=hc(c,s,n)),c)),i},hc=(l,r,n)=>{var c;let i=l,s=r;return(s==null?void 0:s.length)===0?i.children=n:i.children=(c=i.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)),i};class Lf{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,i){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=i;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 i=new WebSocket(this.url);i.binaryType="arraybuffer",i.onopen=()=>{this.socket=i,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),r()},i.onerror=s=>{this.isConnected=!1,this.log("socket.onerror"),n(s)},i.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},i.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,i=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]=i>>8&255,s[11]=i&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,p,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 i=n[2];if(i===80){const u=n[3],w=n.length-4,D=new Uint8Array(w);for(let Y=0;Y<w;Y++)D[Y]=n[4+Y];const E=decodeURIComponent(this.byteToString(D)).split("|");(s=this.onDevCount)==null||s.call(this,u,E);return}if(i===81){const u=n[3]||0,w=[];for(let D=0;D<u;D++){const V=(n[4+D*4+0]||0)*256+(n[4+D*4+1]||0),E=(n[4+D*4+2]||0)*256+(n[4+D*4+3]||0);w.push({width:V,height:E,text:`${V}*${E}`})}(c=this.onResolution)==null||c.call(this,u,w);return}if(i===1){n[3]===1&&((m=this.onCameraStatus)==null||m.call(this,"opened")),n[3]===3&&((p=this.onCameraStatus)==null||p.call(this,"closed"));return}if(i===16){if(n[3]===1){const w=n[4]*256+n[5],D=n[6]*65536+n[7]*256+n[8];let V="";if(w>0){const M=new Uint8Array(w);for(let O=0;O<w;O++)M[O]=n[9+O];V=decodeURIComponent(this.byteToString(M))}const E=new Uint8Array(D);for(let M=0;M<D;M++)E[M]=n[9+w+M];const Y=this.uint8ArrayToString(E);(h=this.onPhoto)==null||h.call(this,{flag:0,imgPath:V,base64:Y})}n[3]===2&&((y=this.onPhoto)==null||y.call(this,{flag:2,imgPath:"",base64:""}));return}if(i===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 D=this.ctx.createImageData(u,w);let V=11;for(let E=0;E<D.data.length;E+=4)D.data[E+0]=n[V],D.data[E+1]=n[V+1],D.data[E+2]=n[V+2],D.data[E+3]=255,V+=3;this.ctx.putImageData(D,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(r){let n="";for(let i=0;i<r.length;i++)n+=String.fromCharCode(r[i]);return n}byteToString(r){let n="";for(let i=0;i<r.length;i++)n+=String.fromCharCode(r[i]);return n}}const $f={style:{display:"flex",gap:"16px",height:"100%"}},Rf={key:0,style:{color:"var(--el-text-color-secondary)"}},Vf={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},Ff={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Pf={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"}},jf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},Hf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},Uf=["src","onClick"],qf=["onClick"],Wf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},Kf={class:"dialog-footer"},Gf=a.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(null),c=a.ref(!1),m=a.ref([]),p=a.ref(""),h=a.ref(!1),y=a.ref([]),u=new Lf({url:"ws://127.0.0.1:22225"});function w(R,G){var ae;const ie=R.split(","),Se=((ae=ie[0].match(/:(.*?);/))==null?void 0:ae[1])??"image/jpeg",te=atob(ie[1]);let Z=te.length;const fe=new Uint8Array(Z);for(;Z--;)fe[Z]=te.charCodeAt(Z);return new File([fe],G,{type:Se})}function D(){u.onLog=R=>{console.log("[GPY]",R)},u.onDevCount=(R,G)=>{if(p.value+=`设备数量=${R},设备=${G.join(",")}
4
- `,R>0){p.value+=`检测到设备,正在获取分辨率...
5
- `;try{u.getResolution(0)}catch(ie){p.value+=`获取分辨率失败:${(ie==null?void 0:ie.message)??ie}
6
- `}}else p.value+=`未检测到高拍仪设备!
7
- `},u.onResolution=(R,G)=>{if(R<=0||!Array.isArray(G)||G.length===0){p.value+=`未获取到可用分辨率,回退使用 1280*720 打开...
8
- `;try{u.openCamera(0,1280,720)}catch(Se){p.value+=`打开摄像头失败:${(Se==null?void 0:Se.message)??Se}
9
- `}return}const ie=u.chooseResolution(G);if(!ie){p.value+=`分辨率选择失败,回退使用 1280*720 打开...
10
- `;try{u.openCamera(0,1280,720)}catch(Se){p.value+=`打开摄像头失败:${(Se==null?void 0:Se.message)??Se}
11
- `}return}p.value+=`获取分辨率 ${ie.text}成功,打开摄像头...
12
- `;try{u.closeCamera(),setTimeout(()=>{try{u.openCamera(0,ie.width,ie.height)}catch(Se){p.value+=`打开摄像头失败:${(Se==null?void 0:Se.message)??Se}
13
- `}},100)}catch{try{u.openCamera(0,ie.width,ie.height)}catch(Se){p.value+=`打开摄像头失败:${(Se==null?void 0:Se.message)??Se}
14
- `}}},u.onCameraStatus=R=>{R==="opened"?(c.value=!0,p.value+=`摄像头已打开
15
- `):(c.value=!1,p.value+=`摄像头已关闭
16
- `)},u.onPhoto=R=>{if(R.flag===0&&R.base64){const G=`data:image/jpeg;base64,${R.base64}`,ie=w(G,`gpy-capture-${Date.now()}.jpg`);m.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:G,file:ie}),p.value+=`拍照完成,已接收图片(当前 ${m.value.length} 张)
17
- `}else p.value+=`拍照失败 flag=${R.flag}
18
- `}}const V=async()=>{if(await a.nextTick(),!s.value)return;E(),D();const R=s.value.getBoundingClientRect();u.init(s.value,Math.floor(R.width),Math.floor(R.height)),p.value+=`正在连接设备服务...
19
- `,await u.connect(),p.value+=`正在获取设备数量...
20
- `,u.getDevCount()},E=()=>{try{u.destroy()}catch(R){console.error(R)}c.value=!1,m.value=[],p.value="",h.value=!1,y.value=[]};a.watch(()=>n.visible,R=>{R?V():E()});const Y=()=>{try{u.bestSize()}catch(R){console.error(R)}},M=()=>{try{u.rotateLeft()}catch(R){console.error(R)}},O=()=>{try{u.rotateRight()}catch(R){console.error(R)}},j=()=>{try{u.focus()}catch(R){console.error(R)}},C=()=>{p.value+=`正在拍照...
21
- `;try{u.photo()}catch(R){p.value+=`拍照调用失败:${(R==null?void 0:R.message)??R}
22
- `}},S=()=>{m.value.length>0?i("confirm",m.value.map(R=>R.file)):i("confirm",[])},_=R=>{R<0||R>=m.value.length||(m.value.splice(R,1),p.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},$=()=>{E(),i("cancel")};return(R,G)=>{const ie=a.resolveComponent("el-input"),Se=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(_r.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:$,width:"1200px",style:{height:"80%"}},{default:a.withCtx(()=>[a.createElementVNode("div",$f,[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",Rf,"初始化摄像头..."))],512),a.createElementVNode("div",Vf,[a.createElementVNode("div",Ff,[G[0]||(G[0]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),a.createElementVNode("div",Pf,[m.value.length===0?(a.openBlock(),a.createElementBlock("div",jf,"暂无图片")):(a.openBlock(),a.createElementBlock("div",Hf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(te,Z)=>(a.openBlock(),a.createElementBlock("div",{key:te.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[a.createElementVNode("img",{src:te.url,onClick:fe=>k(te.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,Uf),a.createElementVNode("div",{onClick:fe=>_(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,qf)]))),128))]))],512)]),a.createElementVNode("div",Wf,[G[1]||(G[1]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),a.createVNode(ie,{type:"textarea",value:p.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",Kf,[a.createVNode(Se,{onClick:Y,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>G[2]||(G[2]=[a.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),a.createVNode(Se,{onClick:M,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>G[3]||(G[3]=[a.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),a.createVNode(Se,{onClick:O,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>G[4]||(G[4]=[a.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),a.createVNode(Se,{onClick:j,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>G[5]||(G[5]=[a.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),a.createVNode(Se,{onClick:C,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(Se,{onClick:S,disabled:m.value.length===0,id:"themeButton"},{default:a.withCtx(()=>G[7]||(G[7]=[a.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),a.createVNode(Se,{onClick:$,id:"themeBorderButton"},{default:a.withCtx(()=>G[8]||(G[8]=[a.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),h.value?(a.openBlock(),a.createBlock(nl.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:g},null,8,["fileDataList"])):a.createCommentVNode("",!0)],64)}}}),Yf=er._export_sfc(Gf,[["__scopeId","data-v-24a2050a"]]),hs=L.useMenuState(L.pinia),Jf=async l=>{var c,m,p,h,y,u;let r=l==null?void 0:l.导入文件,n=l==null?void 0:l.函数参数,i=(c=r==null?void 0:r[0])==null?void 0:c.url,s="";if(!(i!=null&&i.includes("http"))||!(i!=null&&i.includes("https"))){hs.setContentLoading(!0);const w=await L.platformDownloadFile({url:i});let D=w==null?void 0:w.data;const V=new FormData;V.append("file",D,((m=r==null?void 0:r[0])==null?void 0:m.name)+"."+((p=i==null?void 0:i.split("."))==null?void 0:p[1])),V.append("query",n);let E=await ec(V);E=(u=(y=(h=E==null?void 0:E.data)==null?void 0:h.data)==null?void 0:y.response)==null?void 0:u.replace("generateResult",l==null?void 0:l.函数名称),s=E,hs.setContentLoading(!1)}return s},Bt=L.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(l){this.objUrl=l},setBlobUrls(l){this.blobUrls=l}}}),Xf=L.useLoginState(L.pinia),{extraUrl:si}=L.storeToRefs(Xf);let vc=si.value===""||!si.value?"http://139.196.154.85:20015":si.value;a.watch(()=>si.value,()=>{vc=si.value===""||!si.value?"http://139.196.154.85:20015":si.value},{deep:!0,immediate:!0});const To={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},vs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:vc+"/api/public/paddleOCR"};class Zf{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=Ka.Local.get(Ka.accessTokenKey);return r?`Bearer ${r}`:""}buildOCRRequest(r,n){return{title:n,form:{OCR图片文件:r}}}async recognize(r,n){const i=this.getAuthorizationToken(),s=this.buildOCRRequest(r,n),c=this.config.apiUrl||vs.apiUrl||"";return(await Ka.axios.post(c,s,{headers:{"Content-Type":"application/json",Authorization:i}})).data}getFieldAliases(r){return To[r]?To[r]:[r]}extractTableHeaders(r){const n=[],i=new Set,s=m=>{const p=m==null?void 0:m.label;return!(!p||p==="操作"||p===this.config.columnName||(m==null?void 0:m.type)==="operate"||(m==null?void 0:m.prop)==="operate")},c=m=>{(m||[]).forEach(p=>{if(!p)return;const h=(p==null?void 0:p.children)||(p==null?void 0:p.child)||(p==null?void 0:p.columns);if(Array.isArray(h)&&h.length>0){c(h);return}if(s(p)){const y=p.label;if(!i.has(y)){i.add(y);const u=this.getFieldAliases(y);n.push(u)}}})};return c(r||[]),n}}function mc(l){return new Zf(l)}mc();const kt=async(l,r)=>{var m,p,h,y,u,w,D,V,E,Y,M,O,j,C,S,_,k;let n=(p=(m=L.cloneDeep(l))==null?void 0:m.optionUrl)==null?void 0:p.menuSelect,i=[];n==null||n.forEach(g=>{});let s="",c=await me.menuToParent(n);if(c==null||c.forEach(g=>{var $,R,G,ie;(g==null?void 0:g.name)===(((ie=(G=(R=($=L.cloneDeep(l))==null?void 0:$.optionUrl)==null?void 0:R.groupSelect)==null?void 0:G[0])==null?void 0:ie.replaceAll("'",""))??"")&&(s=g==null?void 0:g.id)}),r){s=r;const g=await Nr.getInsofDataApi({id:s}),$=(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 me.getItemData($,sessionStorage.getItem("systemKey"),"")}if(s!==""){let g;r?g=(D=c==null?void 0:c.find(G=>(G==null?void 0:G.id)===r))==null?void 0:D.compData:g=(V=c==null?void 0:c.find(G=>{var ie,Se,te,Z;return(G==null?void 0:G.name)===(((Se=(ie=l==null?void 0:l.groupSelect)==null?void 0:ie.split(":"))==null?void 0:Se[0])||((Z=(te=l==null?void 0:l.optionUrl)==null?void 0:te.groupSelect)==null?void 0:Z[0]))}))==null?void 0:V.compData;let $=(Y=(E=g==null?void 0:g.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:E.contents)==null?void 0:Y.map(G=>G==null?void 0:G.label);(O=(M=g==null?void 0:g.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:M.contents)!=null&&O.every(G=>Array.isArray(G))&&($=(S=me.getColumnChild((C=(j=g==null?void 0:g.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:j.contents)==null?void 0:C[0]))==null?void 0:S.map(G=>G==null?void 0:G.prop));let R=(k=(_=g==null?void 0:g.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:k.map(G=>{if(Array.isArray(G))G=G==null?void 0:G.filter(ie=>!(ie!=null&&ie.id));else{let ie={};for(let Se in G)Se!=="id"&&(ie[Se]=G==null?void 0:G[Se]);G=ie}return G});R==null||R.forEach(G=>{Array.isArray(G)?i.push(me.getValueToObjectValue(G,$)):i.push(G)})}return i},Qf=L.useMenuState(L.pinia),{activeMenuPath:iv}=L.storeToRefs(Qf),e0=L.useUnit(L.pinia),{chooseTitle:ov}=L.storeToRefs(e0),a0="col-operate",yc=l=>`${a0}-${l}`,l0=(l,r)=>{const n=new Map;l.forEach(s=>{const{prop:c}=s;n.set(c,s)});const i=s=>{Array.isArray(s)&&s.forEach(c=>{const{prop:m}=c||{},p=n.get(m);r0(p,c),Array.isArray(c==null?void 0:c.children)&&c.children.length>0&&i(c.children)})};return i(r),r},r0=(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),n0=(l,r)=>{const{sortable:n=!1,filterable:i=!1,showSummary:s=!1,operable:c=!1,fixed:m=!1}=r||{};return{prop:l,sortable:n,filterable:i,showSummary:s,operable:c,fixed:m}},i0=async l=>{var c,m;if(!l)return;const r=yc(l),n=await Nr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r}}),i=(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(i==200)return s==null?void 0:s[0]},o0=async l=>{if(l)return[]},t0=async(l,r)=>{if(!l||!r)return;const n=yc(l);return await Nr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:r}})},s0=async(l,r)=>!l||!r?void 0:await Nr.updateInsofDataApi({id:l,value:{columns:r}}),ms=async(l,r)=>{const n=sessionStorage.getItem("systemKey");if(!l||!r||!n)return;const i=await i0(l);return i?await s0(i==null?void 0:i.id,r):await t0(l,r)};var _o={exports:{}},c0=_o.exports,ys;function u0(){return ys||(ys=1,function(l,r){(function(n,i){i()})(c0,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 i(y,u,w){var D=new XMLHttpRequest;D.open("GET",y),D.responseType="blob",D.onload=function(){h(D.response,u,w)},D.onerror=function(){console.error("could not download file")},D.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,p=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&&!p?function(y,u,w){var D=m.URL||m.webkitURL,V=document.createElement("a");u=u||y.name||"download",V.download=u,V.rel="noopener",typeof y=="string"?(V.href=y,V.origin===location.origin?c(V):s(V.href)?i(y,u,w):c(V,V.target="_blank")):(V.href=D.createObjectURL(y),setTimeout(function(){D.revokeObjectURL(V.href)},4e4),setTimeout(function(){c(V)},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))i(y,u,w);else{var D=document.createElement("a");D.href=y,D.target="_blank",setTimeout(function(){c(D)})}}:function(y,u,w,D){if(D=D||open("","_blank"),D&&(D.document.title=D.document.body.innerText="downloading..."),typeof y=="string")return i(y,u,w);var V=y.type==="application/octet-stream",E=/constructor/i.test(m.HTMLElement)||m.safari,Y=/CriOS\/[\d]+/.test(navigator.userAgent);if((Y||V&&E||p)&&typeof FileReader<"u"){var M=new FileReader;M.onloadend=function(){var C=M.result;C=Y?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),D?D.location.href=C:location=C,D=null},M.readAsDataURL(y)}else{var O=m.URL||m.webkitURL,j=O.createObjectURL(y);D?D.location=j:location.href=j,D=null,setTimeout(function(){O.revokeObjectURL(j)},4e4)}});m.saveAs=h.saveAs=h,l.exports=h})}(_o)),_o.exports}u0();const Qn=L.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}}}),d0=L.useLoginState(L.pinia),{loginUserInfo:dt}=L.storeToRefs(d0),p0=async l=>{var i,s,c;let r=await L.getAllTables({platId:parseInt((i=dt==null?void 0:dt.value)==null?void 0:i.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}]}]},f0=L.useLoginState(),{loginUserInfo:hl}=L.storeToRefs(f0);let go="$R";const Dr=L.useModelComp(L.pinia),gc=a.ref(!1),{itemData:h0,itemGridData:oi,curStructureCompIds:gs,isSubmitCurStructure:v0,routeToChildPath:m0,pageMapState:xt,itemExtendData:bo,refreshTable:bs}=L.storeToRefs(Dr),Ro=Qn(L.pinia),Ir=L.useMenuState(L.pinia),cr=a.shallowRef([]),{asideMenus:y0,activeTopMenuPath:g0,activeMenuPath:ml,platform:tv,buttonTriggerType:b0,currentMenuPath:en}=L.storeToRefs(Ir),hn=L.useUnit(L.pinia),{selectTitle:Jn,chooseTitle:Ao}=L.storeToRefs(hn);a.ref();const Bi=a.ref(!0),Zn=a.ref(0),wt=a.ref([]);a.ref(!1);const Tt=a.ref(!1),Wi=a.ref(),bc=a.ref(),kc=a.ref(),k0=()=>{Dr.setItemGridData([]),Dr.setIsEdit("edit"),Dr.setSubmitCurStructure(ml.value!=="/平台管理/菜单管理")},x0=()=>{Dr.setIsEdit("view"),Dr.setRefreshCurStructure(!0)},w0=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)),i=r==null?void 0:r.filter((c,m)=>m<=n);hn.setSelectTitle(nl.safeClone(i)),i=(s=i==null?void 0:i.map(c=>c==null?void 0:c.value))==null?void 0:s.join("/"),Ir.setActiveMenuPath(null),Ir.setActiveMenuPath(i)},pt=async(l,r,n,i="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:i,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=Nr.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=Nr.batchUpdateInsofDataApi):r==="delete"&&(c={ids:l},m=Nr.batchDeleteInsofDataApi);const p=await m(c);if(((s=p==null?void 0:p.data)==null?void 0:s.code)===200)return p.data.result;throw Ka.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Ka.ElMessage.error("保存响应失败")}},ks=async(l,r,n,i)=>{var s,c,m,p,h,y,u,w,D,V,E;try{const Y=(c=(s=l==null?void 0:l.results)==null?void 0:s.filter(_=>!(_!=null&&_.id)||typeof(_==null?void 0:_.id)=="string"))==null?void 0:c.map(_=>({key:{pageKey:l==null?void 0:l.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:n},value:{tableData:_}})),M=(p=(m=l==null?void 0:l.results)==null?void 0:m.filter(_=>(_==null?void 0:_.id)&&typeof(_==null?void 0:_.id)=="number"))==null?void 0:p.map(_=>({id:_==null?void 0:_.id,value:{tableData:_}})),O=JSON.parse(JSON.stringify(l)),j=(h=O==null?void 0:O.results)==null?void 0:h.map(_=>_.id);let C;n?C=(w=(u=(y=xt.value)==null?void 0:y[ml.value])==null?void 0:u.filter(_=>{var k,g,$;return((k=_==null?void 0:_.key)==null?void 0:k.type)===r&&(($=(g=_==null?void 0:_.key)==null?void 0:g.relatedInfo)==null?void 0:$.target)===i}))==null?void 0:w.map(_=>_==null?void 0:_.id):C=(E=(V=(D=xt.value)==null?void 0:D[ml.value])==null?void 0:V.filter(_=>{var k;return((k=_==null?void 0:_.key)==null?void 0:k.type)===r}))==null?void 0:E.map(_=>_==null?void 0:_.id);const S=C==null?void 0:C.filter(_=>!(j!=null&&j.includes(_))&&typeof _=="number");(Y==null?void 0:Y.length)>0&&await Nr.batchAddInsofDataApi({dataList:Y}),(M==null?void 0:M.length)>0&&await Nr.batchUpdateInsofDataApi({dataList:M}),(S==null?void 0:S.length)>0&&await Nr.batchDeleteInsofDataApi({ids:S})}catch(Y){throw new Error(Y)}},_0=async l=>{var y,u,w,D,V,E,Y,M,O,j;Ir.setContentLoading(!0);const r=JSON.parse(JSON.stringify(h0.value));if(!v0.value)return Ir.setCacheStructures({key:b0.value,data:r}),Ka.ElMessage.success("已暂存");const n=r==null?void 0:r.map(C=>C.id),i=n.filter(C=>{var S;return!((S=gs.value)!=null&&S.includes(C))}),s=(y=gs.value)==null?void 0:y.filter(C=>!n.includes(C)),c=[...i,...s].filter(C=>typeof C!==null&&typeof C<"u"),m=r==null?void 0:r.filter(C=>!C.id),p=r==null?void 0:r.filter(C=>C.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)),p&&(p==null?void 0:p.length)>0&&h.push(pt(p,"update",l)),oi.value&&((u=oi.value)!=null&&u.isDelete&&((D=(w=oi.value)==null?void 0:w.results)==null?void 0:D.length)>0&&((E=(V=oi.value)==null?void 0:V.results)!=null&&E.every(C=>typeof C=="number"))?await Nr.batchDeleteInsofDataApi({ids:(Y=oi.value)==null?void 0:Y.results}):(console.log("itemGridData.value",oi.value),h.push(await ks(oi.value,"gridLayout")))),bo.value)for(const C in bo.value)h.push(await ks((M=bo.value)==null?void 0:M[C],"extend",{target:C,compId:(j=(O=bo.value)==null?void 0:O[C])==null?void 0:j.compId},C));await Promise.all(h).then(()=>{Ka.ElMessage.success("保存成功"),Dr.setRefreshCurStructure(!0)}).catch(C=>{Ka.ElMessage.success(C)}),Ir.setContentLoading(!1)},Ki=l=>Ti(l),S0=a.computed(()=>{var l;return(l=cr.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=cr.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),E0="ocr_committed_temp_ids_v1",C0=(l,r)=>`${E0}:${String(l??"")}:${String(r??"")}`,D0=(l,r,n)=>{try{const i=C0(l,r),s=sessionStorage.getItem(i),c=s?JSON.parse(s):[],m=Array.isArray(c)?c:[],p=Array.from(new Set([...m,...n||[]].map(h=>String(h)))).slice(-200);sessionStorage.setItem(i,JSON.stringify(p))}catch{}},zo=async(l,r="data",n)=>{var s,c,m,p,h,y,u,w,D,V,E,Y,M,O,j,C,S,_,k,g,$,R,G,ie,Se,te,Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma,P,H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa,Ze,oa,ue,U,W,Me,we,na,ta,Sa,ba,Pa,ya,$e,$a,fl,Sl,Xl,bl,Vl,qa,Rl,Il;let i=((m=(c=(s=Jn.value)==null?void 0:s.filter(La=>(La==null?void 0:La.condition)==="child"))==null?void 0:c[0])==null?void 0:m.value)??"";if((l==null?void 0:l.buttonName)==="新增"){let La=(p=l==null?void 0:l.fixContent)==null?void 0:p.map(be=>{let ga={};for(let Le in be)Array.isArray(be==null?void 0:be[Le])?ga[Le]=JSON.stringify(be==null?void 0:be[Le]):ga[Le]=be==null?void 0:be[Le];return ga}),al=await L.quoteApi({platId:parseInt((h=hl==null?void 0:hl.value)==null?void 0:h.plat_id),type:"fatherSyncs",related:[{menus:i!==""?ml.value+"/"+i:ml.value,groups:l==null?void 0:l.name}]});al=(y=al==null?void 0:al.data)==null?void 0:y.result,al=al==null?void 0:al.filter(be=>{var ga,Le;return!((be==null?void 0:be.fatherPath)!==""&&((Le=(ga=be==null?void 0:be.quote)==null?void 0:ga[0])==null?void 0:Le.menus)===(ml==null?void 0:ml.value))});let ol=al==null?void 0:al.map(be=>{var wa,pa;let ga={},Le=La==null?void 0:La[0],de;return Array.isArray((wa=be==null?void 0:be.struct)==null?void 0:wa[0])?de=me.getColumnChild((pa=be==null?void 0:be.struct)==null?void 0:pa[0]):de=be==null?void 0:be.struct,de=de==null?void 0:de.filter(ea=>(ea==null?void 0:ea.prop)!=="relatedId"),de==null||de.forEach(ea=>{var Je,Xe;ga[ea.prop]=((Je=ea==null?void 0:ea.words)!=null&&Je[0]?(Le==null?void 0:Le[(Xe=ea==null?void 0:ea.words)==null?void 0:Xe[0]])??(Le==null?void 0:Le[ea==null?void 0:ea.prop]):Le==null?void 0:Le[ea==null?void 0:ea.prop])??""}),ga.id="1",ga.relatedId=`[${ga.id}]`,delete ga.sort,{tableName:"content_"+(be==null?void 0:be.id),tableContents:[ga]}}),ia=[{tableName:(u=l==null?void 0:l.relatedContents)==null?void 0:u.find(be=>be==null?void 0:be.includes("content")),tableContents:La}];ia=[...ia,...ol];let ja=await L.quoteApi({platId:parseInt((w=hl==null?void 0:hl.value)==null?void 0:w.plat_id),type:"sonSyncs",related:[{menus:i!==""?ml.value+"/"+i:ml.value,groups:l==null?void 0:l.name}]});ja=(V=(D=ja==null?void 0:ja.data)==null?void 0:D.result)==null?void 0:V.filter(be=>!(ia!=null&&ia.find(ga=>(ga==null?void 0:ga.tableName)==="content_"+(be==null?void 0:be.id)))),ja=ja==null?void 0:ja.filter(be=>{var ga,Le;return!((be==null?void 0:be.fatherPath)!==""&&((Le=(ga=be==null?void 0:be.quote)==null?void 0:ga[0])==null?void 0:Le.menus)===(ml==null?void 0:ml.value))});let Oa=ja==null?void 0:ja.map(be=>{var wa,pa,ea,Je,Xe,dl,Ve;let ga={},Le=La==null?void 0:La[0],de;return Array.isArray((wa=be==null?void 0:be.struct)==null?void 0:wa[0])?de=me.getColumnChild((pa=be==null?void 0:be.struct)==null?void 0:pa[0]):de=be==null?void 0:be.struct,de=de==null?void 0:de.filter(Va=>(Va==null?void 0:Va.prop)!=="relatedId"),((Je=(ea=de==null?void 0:de[0])==null?void 0:ea.words)!=null&&Je[0]?Le!=null&&Le[(dl=(Xe=de==null?void 0:de[0])==null?void 0:Xe.words)==null?void 0:dl[0]]:Le!=null&&Le[(Ve=de==null?void 0:de[0])==null?void 0:Ve.prop])?(de==null||de.forEach(Va=>{var _a,tl;ga[Va.prop]=((_a=Va==null?void 0:Va.words)!=null&&_a[0]?(Le==null?void 0:Le[(tl=Va==null?void 0:Va.words)==null?void 0:tl[0]])??(Le==null?void 0:Le[Va==null?void 0:Va.prop]):Le==null?void 0:Le[Va==null?void 0:Va.prop])??""}),ga.id="1",ga.relatedId=`[${ga.id}]`,delete ga.sort):ga=void 0,{tableName:"content_"+(be==null?void 0:be.id),tableContents:[ga]}});Oa=Oa==null?void 0:Oa.filter(be=>{var ga;return!((ga=be==null?void 0:be.tableContents)!=null&&ga.every(Le=>Le===void 0))}),ia=[...ia,...Oa],await L.pageBatchAddApi({platId:parseInt((E=hl==null?void 0:hl.value)==null?void 0:E.plat_id),changeContents:ia});let Ra=[];ia==null||ia.forEach(be=>{var ga;(ga=be==null?void 0:be.tableContents)==null||ga.forEach(Le=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Le),request_result:"{}",is_delete:!1,request_table:be==null?void 0:be.tableName,request_type:"add"})})}),await L.pageBatchAddApi({platId:parseInt((Y=hl==null?void 0:hl.value)==null?void 0:Y.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]})}if((l==null?void 0:l.buttonName)==="OCR批量新增"){const La=((l==null?void 0:l.ocrRows)||[]).map(ja=>ja==null?void 0:ja.id).filter(ja=>ja!=null),al=((l==null?void 0:l.ocrRows)||[]).map(ja=>{const Oa={...ja};return delete Oa._isOCRRow,delete Oa._ocrTableId,Object.keys(Oa).forEach(Ra=>{/(^|\.)证书附件$/.test(Ra)&&Array.isArray(Oa[Ra])&&(Oa[Ra]=JSON.stringify(Oa[Ra].map(be=>({url:(be==null?void 0:be.url)||"",name:(be==null?void 0:be.name)||(be==null?void 0:be.fileName)||"",fileName:(be==null?void 0:be.fileName)||(be==null?void 0:be.name)||""})).filter(be=>be.url||be.name)))}),Oa});let ol=[{tableName:(M=l==null?void 0:l.relatedContents)==null?void 0:M.find(ja=>ja==null?void 0:ja.includes("content")),tableContents:al}];await L.pageBatchAddApi({platId:parseInt((O=hl==null?void 0:hl.value)==null?void 0:O.plat_id),changeContents:ol});let ia=[];ol==null||ol.forEach(ja=>{var Oa;(Oa=ja==null?void 0:ja.tableContents)==null||Oa.forEach(Ra=>{ia.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ra),request_result:"{}",is_delete:!1,request_table:ja==null?void 0:ja.tableName,request_type:"ocrBatchAdd"})})}),await L.pageBatchAddApi({platId:parseInt((j=hl==null?void 0:hl.value)==null?void 0:j.plat_id),changeContents:[{tableName:"log",tableContents:ia}]}),D0(l==null?void 0:l.parentTableId,l==null?void 0:l.index,La)}if((l==null?void 0:l.buttonName)==="编辑"){const al=((l==null?void 0:l.fixContent)||(l==null?void 0:l.singleContent)||[]||[]).map(de=>{const wa={...de};return delete wa._isOCRRow,delete wa._ocrTableId,delete wa._isTemp,delete wa.tableEditType,delete wa.index,wa});let ol=al==null?void 0:al.map(de=>{let wa={};for(let pa in de)Array.isArray(de==null?void 0:de[pa])?wa[pa]=JSON.stringify(de==null?void 0:de[pa]):wa[pa]=de==null?void 0:de[pa];return wa}),ia=await L.quoteApi({platId:parseInt((C=hl==null?void 0:hl.value)==null?void 0:C.plat_id),type:"fatherSyncs",related:[{menus:i!==""?ml.value+"/"+i:ml.value,groups:l==null?void 0:l.name}]});ia=(S=ia==null?void 0:ia.data)==null?void 0:S.result,ia=ia==null?void 0:ia.filter(de=>{var wa,pa;return!((de==null?void 0:de.fatherPath)!==""&&((pa=(wa=de==null?void 0:de.quote)==null?void 0:wa[0])==null?void 0:pa.menus)===(ml==null?void 0:ml.value))});let ja=(_=ol==null?void 0:ol[0])==null?void 0:_.id,Oa=[{tableName:(k=l==null?void 0:l.relatedContents)==null?void 0:k.find(de=>de==null?void 0:de.includes("content")),tableContents:ol}],Ra=(g=ia==null?void 0:ia.map(de=>{var pa,ea,Je,Xe,dl;let wa=(pa=de==null?void 0:de.contents)==null?void 0:pa.filter(Ve=>{var Va,_a;return JSON.stringify(Ve==null?void 0:Ve.relatedId)!=="{}"&&(Ve==null?void 0:Ve.relatedId)!==""&&(Ve!=null&&Ve.relatedId)?(Va=Ve==null?void 0:Ve.relatedId)==null?void 0:Va.includes(parseInt(ja)):(Ve==null?void 0:Ve.sort)===((_a=ol==null?void 0:ol[0])==null?void 0:_a.sort)});if((wa==null?void 0:wa.length)>0){let Ve=ol==null?void 0:ol[0];Ve={...Ve,id:(ea=wa==null?void 0:wa[0])==null?void 0:ea.id};let Va={},_a=Ve,tl;return Array.isArray((Je=de==null?void 0:de.struct)==null?void 0:Je[0])?tl=me.getColumnChild((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0]):tl=de==null?void 0:de.struct,tl=tl==null?void 0:tl.filter(za=>(za==null?void 0:za.prop)!=="relatedId"),tl==null||tl.forEach(za=>{var Ie,El;Va[za.prop]=((Ie=za==null?void 0:za.words)!=null&&Ie[0]?(_a==null?void 0:_a[(El=za==null?void 0:za.words)==null?void 0:El[0]])??(_a==null?void 0:_a[za==null?void 0:za.prop]):_a==null?void 0:_a[za==null?void 0:za.prop])??""}),Va.id=(dl=wa==null?void 0:wa[0])==null?void 0:dl.id,delete Va.sort,delete Va.relatedId,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Va]}}else return}))==null?void 0:g.filter(de=>de);Oa=[...Oa,...Ra];let be=await L.quoteApi({platId:parseInt(($=hl==null?void 0:hl.value)==null?void 0:$.plat_id),type:"sonSyncs",related:[{menus:i!==""?ml.value+"/"+i:ml.value,groups:l==null?void 0:l.name}]});be=(G=(R=be==null?void 0:be.data)==null?void 0:R.result)==null?void 0:G.filter(de=>!(Oa!=null&&Oa.find(wa=>(wa==null?void 0:wa.tableName)==="content_"+(de==null?void 0:de.id)))),be=be==null?void 0:be.filter(de=>{var wa,pa;return!((de==null?void 0:de.fatherPath)!==""&&((pa=(wa=de==null?void 0:de.quote)==null?void 0:wa[0])==null?void 0:pa.menus)===(ml==null?void 0:ml.value))});let ga=(ie=be==null?void 0:be.map(de=>{var pa,ea,Je,Xe,dl;let wa=(pa=de==null?void 0:de.contents)==null?void 0:pa.filter(Ve=>{var Va,_a,tl;return JSON.stringify(Ve==null?void 0:Ve.relatedId)!=="{}"&&(Ve==null?void 0:Ve.relatedId)!==""&&(Ve!=null&&Ve.relatedId)?(Va=Ve==null?void 0:Ve.relatedId)==null?void 0:Va.includes(parseInt(ja)):(Ve==null?void 0:Ve.sort)===((_a=ol==null?void 0:ol[0])==null?void 0:_a.sort)||(Ve==null?void 0:Ve.sort)===(parseInt(((tl=ol==null?void 0:ol[0])==null?void 0:tl.sort)??"0")+1).toString()});if((wa==null?void 0:wa.length)>0){let Ve=ol==null?void 0:ol[0];Ve={...Ve,id:(ea=wa==null?void 0:wa[0])==null?void 0:ea.id};let Va={},_a=Ve,tl;return Array.isArray((Je=de==null?void 0:de.struct)==null?void 0:Je[0])?tl=me.getColumnChild((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0]):tl=de==null?void 0:de.struct,tl=tl==null?void 0:tl.filter(za=>(za==null?void 0:za.prop)!=="relatedId"),tl==null||tl.forEach(za=>{var Ie,El,Ol,Gl;((Ie=za==null?void 0:za.words)!=null&&Ie[0]?(_a==null?void 0:_a[(El=za==null?void 0:za.words)==null?void 0:El[0]])??(_a==null?void 0:_a[za==null?void 0:za.prop]):_a!=null&&_a[za==null?void 0:za.prop])&&(Va[za.prop]=((Ol=za==null?void 0:za.words)!=null&&Ol[0]?(_a==null?void 0:_a[(Gl=za==null?void 0:za.words)==null?void 0:Gl[0]])??(_a==null?void 0:_a[za==null?void 0:za.prop]):_a==null?void 0:_a[za==null?void 0:za.prop])??"")}),Va.id=(dl=wa==null?void 0:wa[0])==null?void 0:dl.id,delete Va.sort,delete Va.relatedId,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Va]}}else return}))==null?void 0:ie.filter(de=>de);Oa=[...Oa,...ga],await L.pageBatchUpdateApi({platId:parseInt((Se=hl==null?void 0:hl.value)==null?void 0:Se.plat_id),changeContents:Oa});let Le=[];Oa==null||Oa.forEach(de=>{var wa;(wa=de==null?void 0:de.tableContents)==null||wa.forEach(pa=>{Le.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(pa),request_result:"{}",is_delete:!1,request_table:de==null?void 0:de.tableName,request_type:"update"})})}),await L.pageBatchAddApi({platId:parseInt((te=hl==null?void 0:hl.value)==null?void 0:te.plat_id),changeContents:[{tableName:"log",tableContents:Le}]})}if((l==null?void 0:l.buttonName)==="删除"){let La=[{tableName:(Z=l==null?void 0:l.relatedContents)==null?void 0:Z.find(be=>be==null?void 0:be.includes("content")),tableContents:l==null?void 0:l.fixContent}],al=await L.quoteApi({platId:parseInt((fe=hl==null?void 0:hl.value)==null?void 0:fe.plat_id),type:"fatherSyncs",related:[{menus:i!==""?ml.value+"/"+i:ml.value,groups:l==null?void 0:l.name}]});al=(ae=al==null?void 0:al.data)==null?void 0:ae.result,al=al==null?void 0:al.filter(be=>{var ga,Le;return!((be==null?void 0:be.fatherPath)!==""&&((Le=(ga=be==null?void 0:be.quote)==null?void 0:ga[0])==null?void 0:Le.menus)===(ml==null?void 0:ml.value))});let ol=(De=(se=l==null?void 0:l.fixContent)==null?void 0:se[0])==null?void 0:De.id,ia=(Pe=al==null?void 0:al.map(be=>{var Le,de,wa,pa,ea,Je;let ga=(Le=be==null?void 0:be.contents)==null?void 0:Le.filter(Xe=>{var dl,Ve,Va;return JSON.stringify(Xe==null?void 0:Xe.relatedId)!=="{}"&&(Xe==null?void 0:Xe.relatedId)!==""&&(Xe!=null&&Xe.relatedId)?(dl=Xe==null?void 0:Xe.relatedId)==null?void 0:dl.includes(parseInt(ol)):(Xe==null?void 0:Xe.sort)===((Va=(Ve=l==null?void 0:l.fixContent)==null?void 0:Ve[0])==null?void 0:Va.sort)});if((ga==null?void 0:ga.length)>0){let Xe=(de=l==null?void 0:l.fixContent)==null?void 0:de[0];Xe={...Xe,id:(wa=ga==null?void 0:ga[0])==null?void 0:wa.id};let dl={},Ve=Xe,Va;return Array.isArray((pa=be==null?void 0:be.struct)==null?void 0:pa[0])?Va=me.getColumnChild((ea=be==null?void 0:be.struct)==null?void 0:ea[0]):Va=be==null?void 0:be.struct,Va=Va==null?void 0:Va.filter(_a=>(_a==null?void 0:_a.prop)!=="relatedId"),Va==null||Va.forEach(_a=>{var tl,za;dl[_a.prop]=((tl=_a==null?void 0:_a.words)!=null&&tl[0]?(Ve==null?void 0:Ve[(za=_a==null?void 0:_a.words)==null?void 0:za[0]])??(Ve==null?void 0:Ve[_a==null?void 0:_a.prop]):Ve==null?void 0:Ve[_a==null?void 0:_a.prop])??""}),dl.id=(Je=ga==null?void 0:ga[0])==null?void 0:Je.id,delete dl.sort,delete dl.relatedId,{tableName:"content_"+(be==null?void 0:be.id),tableContents:[dl]}}else return}))==null?void 0:Pe.filter(be=>be);La=[...La,...ia];let ja=await L.quoteApi({platId:parseInt((ke=hl==null?void 0:hl.value)==null?void 0:ke.plat_id),type:"sonSyncs",related:[{menus:i!==""?ml.value+"/"+i:ml.value,groups:l==null?void 0:l.name}]});ja=(q=(B=ja==null?void 0:ja.data)==null?void 0:B.result)==null?void 0:q.filter(be=>!(La!=null&&La.find(ga=>(ga==null?void 0:ga.tableName)==="content_"+(be==null?void 0:be.id)))),ja=ja==null?void 0:ja.filter(be=>{var ga,Le;return!((be==null?void 0:be.fatherPath)!==""&&((Le=(ga=be==null?void 0:be.quote)==null?void 0:ga[0])==null?void 0:Le.menus)===(ml==null?void 0:ml.value))});let Oa=(re=ja==null?void 0:ja.map(be=>{var Le,de,wa,pa,ea,Je;let ga=(Le=be==null?void 0:be.contents)==null?void 0:Le.filter(Xe=>{var dl,Ve,Va;return JSON.stringify(Xe==null?void 0:Xe.relatedId)!=="{}"&&(Xe==null?void 0:Xe.relatedId)!==""&&(Xe!=null&&Xe.relatedId)?(dl=Xe==null?void 0:Xe.relatedId)==null?void 0:dl.includes(parseInt(ol)):(Xe==null?void 0:Xe.sort)===((Va=(Ve=l==null?void 0:l.fixContent)==null?void 0:Ve[0])==null?void 0:Va.sort)});if((ga==null?void 0:ga.length)>0){let Xe=(de=l==null?void 0:l.fixContent)==null?void 0:de[0];Xe={...Xe,id:(wa=ga==null?void 0:ga[0])==null?void 0:wa.id};let dl={},Ve=Xe,Va;return Array.isArray((pa=be==null?void 0:be.struct)==null?void 0:pa[0])?Va=me.getColumnChild((ea=be==null?void 0:be.struct)==null?void 0:ea[0]):Va=be==null?void 0:be.struct,Va=Va==null?void 0:Va.filter(_a=>(_a==null?void 0:_a.prop)!=="relatedId"),Va==null||Va.forEach(_a=>{var tl,za;dl[_a.prop]=((tl=_a==null?void 0:_a.words)!=null&&tl[0]?(Ve==null?void 0:Ve[(za=_a==null?void 0:_a.words)==null?void 0:za[0]])??(Ve==null?void 0:Ve[_a==null?void 0:_a.prop]):Ve==null?void 0:Ve[_a==null?void 0:_a.prop])??""}),dl.id=(Je=ga==null?void 0:ga[0])==null?void 0:Je.id,delete dl.sort,delete dl.relatedId,{tableName:"content_"+(be==null?void 0:be.id),tableContents:[dl]}}else return}))==null?void 0:re.filter(be=>be);La=[...La,...Oa],await L.pageBatchDeleteApi({platId:parseInt((Ae=hl==null?void 0:hl.value)==null?void 0:Ae.plat_id),changeContents:La});let Ra=[];La==null||La.forEach(be=>{var ga;(ga=be==null?void 0:be.tableContents)==null||ga.forEach(Le=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Le),request_result:"{}",is_delete:!1,request_table:be==null?void 0:be.tableName,request_type:"delete"})})}),await L.pageBatchAddApi({platId:parseInt((Ee=hl==null?void 0:hl.value)==null?void 0:Ee.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]})}if((l==null?void 0:l.buttonName)==="复制新增"){let La=await L.getPageDataApi({platId:parseInt((We=hl==null?void 0:hl.value)==null?void 0:We.plat_id),pageName:"menu"});if(La=(da=La==null?void 0:La.data)==null?void 0:da.result,La!=null&&La.find(al=>(al==null?void 0:al.father_name)===ml.value+"/")){kc.value=l,bc.value=La==null?void 0:La.filter(ia=>(ia==null?void 0:ia.father_name)===ml.value+"/");let al=(le=(Ta=l==null?void 0:l.columns)==null?void 0:Ta.find(ia=>ia==null?void 0:ia.mainKey))==null?void 0:le.prop,ol=(ve=(la=l==null?void 0:l.fixContent)==null?void 0:la[0])==null?void 0:ve[al];Tt.value=!0,Wi.value=[{prop:al,label:al,name:al,value:ol}]}else{let al=(Ge=l==null?void 0:l.fixContent)==null?void 0:Ge.map(ja=>{let Oa={};for(let Ra in ja)Array.isArray(ja==null?void 0:ja[Ra])?Oa[Ra]=JSON.stringify(ja==null?void 0:ja[Ra]):Oa[Ra]=ja==null?void 0:ja[Ra];return Oa.relatedId="",Oa}),ol=[{tableName:(Oe=l==null?void 0:l.relatedContents)==null?void 0:Oe.find(ja=>ja==null?void 0:ja.includes("content")),tableContents:al}];await L.pageBatchAddApi({platId:parseInt((ce=hl==null?void 0:hl.value)==null?void 0:ce.plat_id),changeContents:ol});let ia=[];ol==null||ol.forEach(ja=>{var Oa;(Oa=ja==null?void 0:ja.tableContents)==null||Oa.forEach(Ra=>{ia.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ra),request_result:"{}",is_delete:!1,request_table:ja==null?void 0:ja.tableName,request_type:"copyAdd"})})}),await L.pageBatchAddApi({platId:parseInt((ze=hl==null?void 0:hl.value)==null?void 0:ze.plat_id),changeContents:[{tableName:"log",tableContents:ia}]})}}if((l==null?void 0:l.buttonName)==="methodButton"){let La=((Ma=(xa=(Fe=l==null?void 0:l.columns)==null?void 0:Fe.map(de=>de==null?void 0:de.filter))==null?void 0:xa.filter(de=>de!==""))==null?void 0:Ma[0])??"";La=me.analyzeSplitToContent(La,","),La=(La==null?void 0:La.find(de=>de==null?void 0:de.includes("@Filter")))??"";let al=(P=l==null?void 0:l.fixContent)==null?void 0:P.map(de=>{let wa={};for(let pa in de)Array.isArray(de==null?void 0:de[pa])?wa[pa]=JSON.stringify(de==null?void 0:de[pa]):wa[pa]=de==null?void 0:de[pa];return wa}),ol=await L.quoteApi({platId:parseInt((H=hl==null?void 0:hl.value)==null?void 0:H.plat_id),type:"fatherSyncs",related:[{menus:i!==""?ml.value+"/"+i:ml.value,groups:l==null?void 0:l.name}]});ol=(Q=ol==null?void 0:ol.data)==null?void 0:Q.result,ol=ol==null?void 0:ol.filter(de=>{var wa,pa;return!((de==null?void 0:de.fatherPath)!==""&&((pa=(wa=de==null?void 0:de.quote)==null?void 0:wa[0])==null?void 0:pa.menus)===(ml==null?void 0:ml.value))});let ia=(ge=(he=l==null?void 0:l.columns)==null?void 0:he[0])==null?void 0:ge.prop,ja=(ha=al==null?void 0:al[0])==null?void 0:ha[ia],Oa=[{tableName:(Qe=l==null?void 0:l.relatedContents)==null?void 0:Qe.find(de=>de==null?void 0:de.includes("content")),tableContents:al}],Ra=(pe=ol==null?void 0:ol.map(de=>{var pa,ea,Je,Xe,dl;let wa=(pa=de==null?void 0:de.contents)==null?void 0:pa.filter(Ve=>{var Va;return(Va=Object.values(Ve))==null?void 0:Va.find(_a=>_a===ja)});if((wa==null?void 0:wa.length)>0){let Ve=al==null?void 0:al[0];Ve={...Ve,id:(ea=wa==null?void 0:wa[0])==null?void 0:ea.id};let Va={},_a=Ve,tl;return Array.isArray((Je=de==null?void 0:de.struct)==null?void 0:Je[0])?tl=me.getColumnChild((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0]):tl=de==null?void 0:de.struct,tl=tl==null?void 0:tl.filter(za=>(za==null?void 0:za.prop)!=="relatedId"),tl==null||tl.forEach(za=>{var Ie,El;Va[za.prop]=((Ie=za==null?void 0:za.words)!=null&&Ie[0]?(_a==null?void 0:_a[(El=za==null?void 0:za.words)==null?void 0:El[0]])??(_a==null?void 0:_a[za==null?void 0:za.prop]):_a==null?void 0:_a[za==null?void 0:za.prop])??""}),Va.id=(dl=wa==null?void 0:wa[0])==null?void 0:dl.id,delete Va.sort,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Va]}}else return}))==null?void 0:pe.filter(de=>de);Oa=[...Oa,...Ra];let be=await L.quoteApi({platId:parseInt((Ce=hl==null?void 0:hl.value)==null?void 0:Ce.plat_id),type:"sonSyncs",related:[{menus:i!==""?ml.value+"/"+i:ml.value,groups:l==null?void 0:l.name}]});if(be=(qe=(ma=be==null?void 0:be.data)==null?void 0:ma.result)==null?void 0:qe.filter(de=>!(Oa!=null&&Oa.find(wa=>(wa==null?void 0:wa.tableName)==="content_"+(de==null?void 0:de.id)))),be=be==null?void 0:be.filter(de=>{var wa,pa;return!((de==null?void 0:de.fatherPath)!==""&&((pa=(wa=de==null?void 0:de.quote)==null?void 0:wa[0])==null?void 0:pa.menus)===(ml==null?void 0:ml.value))}),La&&La!==""){(La==null?void 0:La[(La==null?void 0:La.length)-1])===","&&(La=La==null?void 0:La.slice(0,(La==null?void 0:La.length)-1)),La=(Aa=(Ia=La==null?void 0:La.replace("(",go))==null?void 0:Ia.split(go))==null?void 0:Aa[1],La=La==null?void 0:La.slice(0,(La==null?void 0:La.length)-1),(La==null?void 0:La[0])==="*"&&(La="{"+((oa=(Ze=La==null?void 0:La.replace("{",go))==null?void 0:Ze.split(go))==null?void 0:oa[1])),La=(ue=La==null?void 0:La.replaceAll("{",""))==null?void 0:ue.replaceAll("}","");let de=me.calculatorAndToOr(La);de=de==null?void 0:de[0];let wa;if((U=Object.values(de))!=null&&U.some(pa=>(pa==null?void 0:pa[0])==="*")){let pa=(Me=(W=Jn.value)==null?void 0:W.find(ea=>(ea==null?void 0:ea.condition)==="child"))!=null&&Me.value?(en==null?void 0:en.value)+"/"+((na=(we=Jn.value)==null?void 0:we.find(ea=>(ea==null?void 0:ea.condition)==="child"))==null?void 0:na.value):en==null?void 0:en.value;wa=await Kr(pa,!1)}for(let pa in de)if(((ta=de==null?void 0:de[pa])==null?void 0:ta[0])==="*"){let ea=(ya=(Pa=(ba=de[pa])==null?void 0:ba.slice(1,(Sa=de[pa])==null?void 0:Sa.length))==null?void 0:Pa.split(":"))==null?void 0:ya[0],Je=($a=($e=de[pa])==null?void 0:$e.split(":"))==null?void 0:$a[1],Xe=(fl=wa==null?void 0:wa.filter(dl=>(dl==null?void 0:dl.name)===ea))==null?void 0:fl[0];Xe=(Xl=(Sl=Xe==null?void 0:Xe.compData)==null?void 0:Sl.find(dl=>(dl==null?void 0:dl.key)==="tableContents"))==null?void 0:Xl.contents,Xe=(bl=Xe==null?void 0:Xe[0])==null?void 0:bl[Je],de[pa]=Xe}La=((Vl=Object.values(de))==null?void 0:Vl[0])??""}let ga=(qa=be==null?void 0:be.map(de=>{var pa,ea,Je,Xe,dl;let wa=(pa=de==null?void 0:de.contents)==null?void 0:pa.filter(Ve=>{var Va;return(Va=Object.values(Ve))==null?void 0:Va.find(_a=>_a===(La===""?ja:La))});if((wa==null?void 0:wa.length)>0){let Ve=al==null?void 0:al[0];Ve={...Ve,id:(ea=wa==null?void 0:wa[0])==null?void 0:ea.id};let Va={},_a=Ve,tl;return Array.isArray((Je=de==null?void 0:de.struct)==null?void 0:Je[0])?tl=me.getColumnChild((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0]):tl=de==null?void 0:de.struct,tl=tl==null?void 0:tl.filter(za=>(za==null?void 0:za.prop)!=="relatedId"),tl==null||tl.forEach(za=>{var El,Ol,Gl,Hl;let Ie=(El=l==null?void 0:l.columns)==null?void 0:El.find(Zl=>{var Sr,Fl,fr;return((Fl=(Sr=Zl==null?void 0:Zl.words)==null?void 0:Sr[0])==null?void 0:Fl.replaceAll("'",""))===(za==null?void 0:za.prop)&&((fr=Zl==null?void 0:Zl.functionRelatedWords)==null?void 0:fr.length)>0});Ie=(Ol=Ie==null?void 0:Ie.prop)==null?void 0:Ol.replaceAll("'",""),Va[za.prop]=((Gl=za==null?void 0:za.words)!=null&&Gl[0]?(_a==null?void 0:_a[(Hl=za==null?void 0:za.words)==null?void 0:Hl[0]])??(_a==null?void 0:_a[za==null?void 0:za.prop])??(_a==null?void 0:_a[Ie]):(_a==null?void 0:_a[za==null?void 0:za.prop])??(_a==null?void 0:_a[Ie]))??void 0}),Va.id=(dl=wa==null?void 0:wa[0])==null?void 0:dl.id,delete Va.sort,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Va]}}else return}))==null?void 0:qa.filter(de=>de);Oa=[...Oa,...ga],await L.pageBatchUpdateApi({platId:parseInt((Rl=hl==null?void 0:hl.value)==null?void 0:Rl.plat_id),changeContents:Oa});let Le=[];Oa==null||Oa.forEach(de=>{var wa;(wa=de==null?void 0:de.tableContents)==null||wa.forEach(pa=>{Le.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(pa),request_result:"{}",is_delete:!1,request_table:de==null?void 0:de.tableName,request_type:"method"})})}),await L.pageBatchAddApi({platId:parseInt((Il=hl==null?void 0:hl.value)==null?void 0:Il.plat_id),changeContents:[{tableName:"log",tableContents:Le}]})}Dr.setRefreshCurStructure(!0),await St(l)},_t=async(l,r,n)=>{var s;let i=l==null?void 0:l.find(c=>(c==null?void 0:c.id)===r);if(i){let c=(s=i.compData)==null?void 0:s.map(m=>{var p;if((m==null?void 0:m.key)==="tableContents"){let h={...m,contents:n};return h.contents=(p=(h==null?void 0:h.contents)??[])==null?void 0:p.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 i.compData=await Nt(c,{}),l=l==null?void 0:l.map(m=>((m==null?void 0:m.id)===(i==null?void 0:i.id)&&(m=i),m)),l}else{let c=l==null?void 0:l.filter(p=>{var h;return(p==null?void 0:p.children)&&((h=p==null?void 0:p.children)==null?void 0:h.length)>0||(p==null?void 0:p.comp)==="Tabs"}),m=c==null?void 0:c.map(async p=>{var h;return p!=null&&p.children&&((h=p==null?void 0:p.children)==null?void 0:h.length)>0?p.children=await _t(p==null?void 0:p.children,r,n):p.compData=await _t(p==null?void 0:p.compData,r,n),p});return c=await Promise.all(m),c}},St=async l=>{var c,m,p,h,y,u,w;let r=(c=l==null?void 0:l.relatedContents)==null?void 0:c.filter(D=>D==null?void 0:D.includes("content_"));if(!r)return;let n=await L.getAllTables({platId:parseInt((m=hl==null?void 0:hl.value)==null?void 0:m.plat_id),tableNames:r??[]});if(n=(h=(p=n==null?void 0:n.data)==null?void 0:p.result)==null?void 0:h[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(D=>{D==null||delete D.source_table;const V={};for(let E in D){const Y=D==null?void 0:D[E],M=Y&&Object.prototype.toString.call(Y)==="[object Object]"&&Object.keys(Y).length===0,O=Array.isArray(Y)&&Y.length===0;Y==null||Y==="{}"||M||O?V[E]="":V[E]=Y}return V});let i=(u=(y=r==null?void 0:r[0])==null?void 0:y.split("_"))==null?void 0:u[1],s=await _t(cr.value,i,n);cr.value=(w=cr.value)==null?void 0:w.map(D=>{var V,E;return(V=s==null?void 0:s[0])!=null&&V.tabInform&&((E=s==null?void 0:s[0])==null?void 0:E.tabInform)===(D==null?void 0:D.tabInform)?D=s==null?void 0:s[0]:(D!=null&&D.name?(D==null?void 0:D.name)===(s==null?void 0:s.name):(D==null?void 0:D.id)===(s==null?void 0:s.id))&&(D=s),D})},N0=l=>{let r=Wi.value;Wi.value=r==null?void 0:r.map(n=>(n.value=l==null?void 0:l[n==null?void 0:n.prop],n))},B0=async()=>{var D,V,E,Y,M,O,j,C,S,_;let l=kc.value,r=bc.value,n=(V=(D=l==null?void 0:l.columns)==null?void 0:D.find(k=>k==null?void 0:k.mainKey))==null?void 0:V.prop,i=(Y=(E=Wi.value)==null?void 0:E[0])==null?void 0:Y.value,s=(M=l==null?void 0:l.fixContent)==null?void 0:M.map(k=>{var $;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($=l==null?void 0:l.columns)==null||$.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]=i,g}),c=[{tableName:(O=l==null?void 0:l.relatedContents)==null?void 0:O.find(k=>k==null?void 0:k.includes("content")),tableContents:s}];await L.pageBatchAddApi({platId:parseInt((j=hl==null?void 0:hl.value)==null?void 0:j.plat_id),changeContents:c}),r=r==null?void 0:r.filter(k=>{var g,$,R;return(R=k==null?void 0:k.object_name)==null?void 0:R.includes(($=(g=l==null?void 0:l.fixContent)==null?void 0:g[0])==null?void 0:$[n])});let m=[],p=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}`),p.set(k==null?void 0:k.object_id,k)});let h=await L.getAllTables({platId:parseInt((C=hl==null?void 0:hl.value)==null?void 0:C.plat_id),tableNames:m??[]});h=(S=h==null?void 0:h.data)==null?void 0:S.result;let y=[],u=[];h=me.chunk(h,2),h==null||h.forEach(k=>{var R,G,ie,Se,te,Z,fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta,le;let g=p.get((Se=(ie=(G=(R=k==null?void 0:k[1])==null?void 0:R[0])==null?void 0:G.source_table)==null?void 0:ie.split("_"))==null?void 0:Se[1]),$=(fe=(Z=(te=g==null?void 0:g.object_name)==null?void 0:te.split("/"))==null?void 0:Z.filter((la,ve)=>{var Ge,Oe;return((Oe=(Ge=g==null?void 0:g.object_name)==null?void 0:Ge.split("/"))==null?void 0:Oe.length)-1!==ve}))==null?void 0:fe.join("/");if($=$+"/"+i,u!=null&&u.find(la=>(la==null?void 0:la.path)===$)||u.push({fatherPath:g==null?void 0:g.father_name,isShow:g==null?void 0:g.is_show,path:$}),((se=(ae=k==null?void 0:k[1])==null?void 0:ae[0])==null?void 0:se.类型)==="Table"){let la=((ke=(Pe=(De=k==null?void 0:k[1])==null?void 0:De[0])==null?void 0:Pe.结构)==null?void 0:ke.contents)??[],ve=nl.safeClone(la);Array.isArray(ve==null?void 0:ve[0])&&(ve=me.getColumnChild(ve==null?void 0:ve[0]));let Ge=[];if(((B=k==null?void 0:k[0])==null?void 0:B.length)>0&&(Ge=(q=k==null?void 0:k[0])==null?void 0:q.map(Oe=>ve==null?void 0:ve.map(ze=>(ze=(Oe==null?void 0:Oe[ze==null?void 0:ze.prop])??"",ze)))),y!=null&&y.find(Oe=>(Oe==null?void 0:Oe.key)===$)){let Oe=(re=y==null?void 0:y.find(ze=>(ze==null?void 0:ze.key)===$))==null?void 0:re.contents;Oe.push({isShow:g==null?void 0:g.is_show,filter:((We=(Ee=(Ae=k==null?void 0:k[1])==null?void 0:Ae[0])==null?void 0:Ee.引用)==null?void 0:We.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:la,tableContents:Ge});let ce=y==null?void 0:y.findIndex(ze=>(ze==null?void 0:ze.key)===$);y[ce].contents=Oe}else y.push({key:$,contents:[{isShow:g==null?void 0:g.is_show,filter:((le=(Ta=(da=k==null?void 0:k[1])==null?void 0:da[0])==null?void 0:Ta.引用)==null?void 0:le.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:la,tableContents:Ge}]})}});let w=[];w.push({key:"menuPath",contents:u}),w=[...w,...y],await L.createPlatFormDataApi({platId:parseInt((_=hl==null?void 0:hl.value)==null?void 0:_.plat_id),changeData:w}),Tt.value=!1,Dr.setRefreshTable(!0)},Mo=async(l,r)=>{},Io=async l=>{cr.value=await me.getDeepDiffItems(l),Dr.setItemData(cr.value),Dr.setOriginalData(cr.value)};a.ref();const T0=a.ref(null),A0=()=>{var l,r;console.log("倒计时结束时"),fn.ElMessageBox.alert(`超时未提交,【${(r=(l=ml.value)==null?void 0:l.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Sc=a.ref([]),z0=a.computed(()=>{var l,r;return(r=(l=xt.value)==null?void 0:l[ml.value])==null?void 0:r.filter(n=>{var i;return((i=n==null?void 0:n.key)==null?void 0:i.type)==="gridLayout"})});a.watch(()=>[g0.value],()=>{hn.setSelectTitle([]),hn.setChooseTitle([])},{deep:!0});a.watch(()=>Ao.value,async(l,r)=>{var i,s,c,m,p,h;if(JSON.stringify(l)===JSON.stringify(r))return;let n=(i=Ao.value)==null?void 0:i.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==en.value);if((n==null?void 0:n.length)>0){Ir.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),D=await Kr(u,w,{originPath:y});D=(p=D==null?void 0:D.filter(Y=>Y))==null?void 0:p.map(Y=>(Y.isShow=!0,Y)),console.log(D,"loadingContents");let V=await me.getDeepDiffItems(D),E=V==null?void 0:V.filter(Y=>Y==null?void 0:Y.choice);Ro.setSelectTab((h=E==null?void 0:E[0])==null?void 0:h.choiceName),V=V==null?void 0:V.filter(Y=>{var M;return!(Y!=null&&Y.choiceName)||(Y==null?void 0:Y.choiceName)===((M=E==null?void 0:E[0])==null?void 0:M.choiceName)}),cr.value=V,Ir.setContentLoading(!1)}});const M0=(l,r)=>{setTimeout(async()=>{var p,h,y;let n=(p=Ao.value)==null?void 0:p.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==en.value),i=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),i=s+"/"+((y=n==null?void 0:n[0])==null?void 0:y.value));let c=await Kr(i,!1,{originPath:s});c=c==null?void 0:c.map(u=>(u.isShow=!0,u));let m=await me.getDeepDiffItems(c);cr.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)},I0=l=>{setTimeout(async()=>{var m,p,h;let r=(m=Ao.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)!==en.value),n=ml==null?void 0:ml.value,i=ml==null?void 0:ml.value;(r==null?void 0:r.length)>0&&(i=((p=r==null?void 0:r[0])==null?void 0:p.relatedContent)??(ml==null?void 0:ml.value),n=i+"/"+((h=r==null?void 0:r[0])==null?void 0:h.value));let s=await Kr(n,!1,{originPath:i});s=s==null?void 0:s.map(y=>(y.isShow=!0,y)),Ro.setSelectTab(l);let c=await me.getDeepDiffItems(s);cr.value=c==null?void 0:c.filter(y=>!(y!=null&&y.choiceName)||(y==null?void 0:y.choiceName)===l)},10)};a.watch(()=>y0.value,l=>{l!=null&&l.length||(cr.value=[])},{immediate:!0});a.watch(()=>[ml.value],async l=>{var c,m,p,h;if(!ml.value)return;if(ml.value==="/"){cr.value=[];return}Ir.setCurrentMenuPath(ml.value),Dr.setLockingPage(""),cr.value=[];let r=a.getCurrentInstance();(c=r==null?void 0:r.scope)==null||c.stop(),r=null,Bi.value=!1,Ir.setContentLoading(!0),gc.value=!0;let n=l==null?void 0:l[0],i=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+"/"+((p=s==null?void 0:s[0])==null?void 0:p.value)),n==="系统管理/日志管理")cr.value=await p0("log");else{let y=await Kr(n,!0,{originPath:i});y=y==null?void 0:y.map(D=>(D.isShow=!0,D));let u=await me.getDeepDiffItems(y),w=u==null?void 0:u.filter(D=>D==null?void 0:D.choice);Ro.setSelectTab((h=w==null?void 0:w[0])==null?void 0:h.choiceName),cr.value=u==null?void 0:u.filter(D=>{var V;return!(D!=null&&D.choiceName)||(D==null?void 0:D.choiceName)===((V=w==null?void 0:w[0])==null?void 0:V.choiceName)})}Ir.setContentLoading(!1),Dr.setExtraContents([]),hn.setSelectIndex(""),hn.setSelectMenu(""),Dr.setItemData(cr.value),Dr.setOriginalData(cr.value),Dr.setRefreshTable(!1),a.nextTick(()=>{Zn.value=Zn.value++,Bi.value=!0})},{immediate:!0});a.watch(()=>[bs.value],async()=>{var l,r,n,i;if(bs.value){cr.value=[];let s=a.getCurrentInstance();(l=s==null?void 0:s.scope)==null||l.stop(),s=null,Bi.value=!1,Ir.setContentLoading(!0),gc.value=!0;let c=en==null?void 0:en.value,m=c,p=(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)!==(en==null?void 0:en.value));(p==null?void 0:p.length)>0&&(c=c+"/"+((n=p==null?void 0:p[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 me.getDeepDiffItems(h),u=y==null?void 0:y.filter(w=>w==null?void 0:w.choice);if(Ro.setSelectTab((i=u==null?void 0:u[0])==null?void 0:i.choiceName),cr.value=y==null?void 0:y.filter(w=>{var D;return!(w!=null&&w.choiceName)||(w==null?void 0:w.choiceName)===((D=u==null?void 0:u[0])==null?void 0:D.choiceName)}),Ir.setContentLoading(!1),Dr.setExtraContents([]),hn.setSelectIndex(""),hn.setSelectMenu(""),Dr.setItemData(cr.value),Dr.setOriginalData(cr.value),Dr.setRefreshTable(!1),(p==null?void 0:p.length)>0){let w=[...Jn.value,...p];hn.setSelectTitle(w)}a.nextTick(()=>{Zn.value=Zn.value++,Bi.value=!0})}},{immediate:!0,deep:!0});const O0=async()=>{Ir.setLinkMenuInfo(null),Ir.setActiveMenuPath(m0.value),cr.value=null,Dr.setRouteToChildPath(""),Ir.setChildMenu("")},L0=l=>new RegExp("button","i").test(l),$0=l=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(l),Ec=l=>{if($0(l)){const r=l==null?void 0:l.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&Ir.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},Cc=async(l,r,n)=>{var D,V,E,Y,M,O,j,C,S,_,k,g;let i="",s="";for(let $ in r)(r==null?void 0:r[$])===l&&(s=$);n==null||n.forEach($=>{($==null?void 0:$.prop)===s&&(i=$==null?void 0:$.fatherPath)});let c=i===""?ml.value:i;i!==""&&Ir.setCurrentMenuPath(c),Ir.setCurrentMenuPath(c+"/"+l),Ir.setContentLoading(!0),await Kr(c+"/"+l,!0,{originPath:c+"/",row:r});let m=await Kr(c,!1),p=(D=m==null?void 0:m.filter($=>($==null?void 0:$.comp)==="Table"))==null?void 0:D[0],h=((M=(Y=(E=(V=p==null?void 0:p.compData)==null?void 0:V.find($=>($==null?void 0:$.key)==="header"))==null?void 0:E.contents)==null?void 0:Y[0])==null?void 0:M.prop)??((_=(S=(C=(j=(O=p==null?void 0:p.compData)==null?void 0:O.find($=>($==null?void 0:$.key)==="header"))==null?void 0:j.contents)==null?void 0:C[0])==null?void 0:S[0])==null?void 0:_.prop),y=(g=(k=p==null?void 0:p.compData)==null?void 0:k.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:g.contents;y=y==null?void 0:y.map($=>({label:$==null?void 0:$[h],value:$==null?void 0:$[h]}));let u=Jn.value,w={value:l,condition:"child",options:y,relatedContent:c,isShow:!0};u.push(w),hn.setSelectTitle(u),hn.setChooseTitle([w]),Ir.setContentLoading(!1),Dr.setExtraContents([]),hn.setSelectIndex(""),hn.setSelectMenu(""),Dr.setItemData(cr.value),Dr.setOriginalData(cr.value)},R0=l=>{wc.value=l},Ei=a.reactive({index:0,comp:null}),V0=a.computed(()=>{var l;return(l=cr.value)==null?void 0:l.map((r,n)=>({id:r.id,name:r.name,status:F0(r,n)}))}),Dc=(l,r)=>{var h,y,u,w,D;const n=r?l:l-2,i=(h=cr.value)==null?void 0:h[n],s=(u=(y=i==null?void 0:i.compData)==null?void 0:y.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:u.contents,c=s==null?void 0:s.findIndex(V=>(V==null?void 0:V.isMainKey)&&(V==null?void 0:V.label)!=="操作"),m=c===-1?0:c,p=(D=(w=i==null?void 0:i.compData)==null?void 0:w.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:D.contents;return{valid:p==null?void 0:p.every(V=>V==null?void 0:V[m+1]),length:(p==null?void 0:p.length)||0}},F0=(l,r)=>{var i;let n="process";if(((i=l==null?void 0:l.comp)==null?void 0:i.toUpperCase())==="TABLE"){const{valid:s,length:c}=Dc(r,!0);Ei.index===r?n="process":c===0?n="wait":n=s?"success":"error"}return n},Nc=l=>{var n,i,s,c,m;const r=l+1;if(r>1&&((s=(i=(n=cr.value)==null?void 0:n[l])==null?void 0:i.comp)==null?void 0:s.toUpperCase())==="TABLE"){const{valid:p}=Dc(r);p?(Ei.index=r,Ei.comp=(c=cr.value)==null?void 0:c[l]):Ka.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Ei.index=r,Ei.comp=(m=cr.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 P0={class:"table-content"},j0={class:"menu-config-wrap"},H0=["onClick"],U0={key:0,class:"viewport-wrap"},q0=["onClick"],W0={title:"选择显示列信息"},K0={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},G0=["title"],Y0={class:"col-operate-wrap"},J0={key:0,class:"col-operate-radio-wrapper"},X0={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Z0={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},Q0={class:"pop-view"},e3={class:"pop-wrapper"},a3={class:"file-list-pop"},l3=["title","onClick"],r3=["onClick"],n3=["onClick"],i3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},o3={class:"form-content"},t3={key:0,class:"dialog-footer"},s3={class:"dialog-footer"},c3={class:"ocr-dialog-content"},u3={class:"ocr-steps"},d3={key:0,class:"ocr-action-buttons"},p3={key:1,class:"ocr-preview-area"},f3={class:"ocr-file-grid"},h3={class:"file-thumbnail"},v3=["src"],m3={key:1,class:"thumbnail-placeholder"},y3={class:"progress-svg",viewBox:"0 0 36 36"},g3=["stroke","stroke-width","stroke-dasharray"],b3={key:0,class:"progress-icon"},k3={key:1,class:"progress-icon"},x3=["onClick"],w3={class:"file-name"},_3={key:0,class:"ocr-recognize-button"},S3={key:2,class:"ocr-progress-section"},E3={key:3,class:"ocr-confirm-area"},C3={class:"ocr-preview-tip"},D3={class:"ocr-preview-table"},N3={style:{display:"flex","align-items":"center",gap:"8px"}},B3={key:0},T3={key:4,class:"ocr-success-area"},A3={key:0,class:"ocr-dialog-footer"},z3={class:"form-content"},M3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},I3={style:{display:"flex"}},xs="ss-ocr-upload-history",O3="ss-ocr-cert-history-v1",L3={__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([]),i=Bt(L.pinia),s=a.ref(null),c=a.ref(new Set),m=a.ref(new Map),p=a.ref(new Map),h=new Map,y=a.ref(new Map),u=l,w=a.ref((u==null?void 0:u.allowSelect)??!0),D=a.ref(((jt=u==null?void 0:u.config)==null?void 0:jt.showIndex)??!0),V=a.ref(),E=a.ref(!0),Y=a.ref(!1),M=a.ref([]),O={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},j=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"}]}]),C=me.useOriginalState(L.pinia);let S="$R";const{originalPath:_}=L.storeToRefs(C),k=_.value,g=a.computed(()=>{var v;const d=(v=me.getAllLeafNodes(te.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=te.value)==null?void 0:v.every(T=>T==null?void 0:T.filterable)}),a.computed(()=>{var v;return(v=te.value)==null?void 0:v.every(T=>T==null?void 0:T.operable)});const $=a.ref(!0),R=a.ref([]),G=a.reactive({column:{},status:!1,text:"合计"}),ie=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),Se=r,te=a.ref([]),Z=a.ref([]),fe=a.ref([]),ae=a.reactive({prop:"",order:null}),se=a.ref([]),De=a.ref(!1),Pe=a.ref(!1),ke=a.ref(null),{isUseBackdrop:B,initTrackFileType:q,getFileExtension:re,setData:Ae,getFileInfo:Ee,getFilesInfo:We}=Co.useThreeSystem(),da=a.ref([]),Ta=a.ref(!1),le=a.ref(),la=L.useMenuState(),{importLoading:ve,activeMenuPath:Ge,contentLoading:Oe,linkMenuInfo:ce}=L.storeToRefs(la),ze=me.useTableComp(L.pinia),Fe=L.useModelComp(L.pinia),xa=Qn(L.pinia),{extraContents:Ma,cacheUpdatingData:P,tableViewContents:H,tableLoading:Q,pageMapState:he,lockingPage:ge}=L.storeToRefs(Fe),{selectTab:ha}=L.storeToRefs(xa),{compType:Qe,hasEditable:pe}=Xs.useRole(),Ce=a.ref([]),ma=a.ref([]),qe=a.ref(new Map);a.ref(!1);const Ia=a.ref("");a.ref();const Aa=a.ref(!0),Ze=a.ref(0),oa=a.ref(!0),ue=a.ref(""),U=a.ref(!1),W=a.ref(null);a.ref([]);const Me=a.ref({label:"查看三维模型"}),we=a.ref(!1),na=a.ref(),ta=a.ref([]),Sa=a.ref([]),ba=a.ref(!1),Pa=a.ref([]),ya=a.ref([]),$e=a.ref([]),$a=a.ref([]),fl=a.ref([]),Sl=()=>{try{const d=localStorage.getItem(xs),v=d?JSON.parse(d):[];fl.value=Array.isArray(v)?v:[]}catch{fl.value=[]}},Xl=()=>{try{localStorage.setItem(xs,JSON.stringify(fl.value||[]))}catch{}},bl=d=>{var ne,oe,K;if(!d)return;const v=d.url||((ne=d==null?void 0:d.uploadResult)==null?void 0:ne.url)||"",T=d.name||((oe=d==null?void 0:d.uploadResult)==null?void 0:oe.name)||((K=d==null?void 0:d.uploadResult)==null?void 0:K.fileName)||"";if(!v&&!T)return;const z={name:T,url:v,ts:Date.now()},F=String(z.name||"").trim().toLowerCase(),N=(fl.value||[]).findIndex(Ne=>String((Ne==null?void 0:Ne.name)||"").trim().toLowerCase()===F);N>-1&&fl.value.splice(N,1),fl.value.unshift(z),fl.value.length>20&&(fl.value=fl.value.slice(0,20)),Xl()};Sl();const Vl=(d,v)=>`${O3}:${String(d??"")}:${String(v??"")}`,qa=(d,v)=>{try{const T=sessionStorage.getItem(Vl(d,v)),z=T?JSON.parse(T):[];return Array.isArray(z)?z:[]}catch{return[]}},Rl=(d,v,T)=>{try{sessionStorage.setItem(Vl(d,v),JSON.stringify(Array.isArray(T)?T:[]))}catch{}},Il=(d,v,T)=>{if(!v)return;const z=qa(d,v),F=[T,...z||[]].filter(Boolean).slice(0,1);return Rl(d,v,F),F},La=(d,v,T)=>{if(!v||!T)return;const z=Vl(d,v),F=Vl(d,T);try{const N=sessionStorage.getItem(z);if(!N)return;const ne=(()=>{try{const Ne=JSON.parse(N);return Array.isArray(Ne)?Ne:[]}catch{return[]}})(),oe=qa(d,T),K=[...ne,...oe||[]].filter(Boolean).sort((Ne,Te)=>Number((Te==null?void 0:Te.ts)||0)-Number((Ne==null?void 0:Ne.ts)||0)).slice(0,1);sessionStorage.setItem(F,JSON.stringify(K)),sessionStorage.removeItem(z)}catch{}},al=a.ref(!1),ol=a.ref(!1),ia=a.ref([]),ja=a.ref(null);a.ref(!1),a.ref([]),a.ref(""),a.ref("");const Oa=a.ref(!1),Ra=a.ref([]),be=a.ref(1),ga=a.ref(new Map),Le=a.ref(new Map),de=a.ref(0),wa=a.ref(!1),pa=a.ref([]),ea=a.ref([]),Je=d=>{var v;try{const T=(v=me.getAllLeafNodes(te.value)||[])==null?void 0:v.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(T==null?void 0:T.find(z=>(z==null?void 0:z.prop)===d||(z==null?void 0:z.label)===d))||null}catch{return null}},Xe=d=>{const v=Je(d),T=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return nl.getComponent(T)||nl.getComponent("Input")},dl=a.ref([]),Ve=a.ref(null),Va=a.ref([]),_a=a.ref(null),tl=a.ref(""),za=a.ref(!1),Ie=a.ref([]),El=a.ref(""),Ol=a.ref(!1),Gl=a.ref([]),Hl=a.ref([]),Zl=a.ref([]),Sr=a.ref(null),Fl=a.ref([]),fr=a.ref("");a.computed(()=>{var d;try{const v=(d=me.getAllLeafNodes(te.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("编号")||""}catch{return""}});const Fr=a.computed(()=>{var d;try{const v=(d=me.getAllLeafNodes(te.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("名称")||""}catch{return""}}),Ul=a.computed(()=>{var d;try{const v=(d=me.getAllLeafNodes(te.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),T=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&T.set(z.label,z.prop)}),T.get("制造厂")||""}catch{return""}}),rr=()=>{Ol.value=!1,Gl.value=[],Hl.value=[],Zl.value=[],Sr.value=null,Fl.value=[],fr.value=""},$r=d=>d==null?!1:typeof d=="string"?d.trim()!=="":Array.isArray(d)?d.length>0:!0,Br=(d,v)=>{const T=(d==null?void 0:d.ocrRow)||{};for(const F of Object.keys(T))F==="id"||F==="_isOCRRow"||F==="_ocrTableId"||$r(T[F])&&(v[F]=T[F]);const z=ma.value.find(F=>F.id===v.id);if(z)for(const F of Object.keys(T))F==="id"||F==="_isOCRRow"||F==="_ocrTableId"||$r(T[F])&&(z[F]=T[F]);qe.value&&qe.value.set(v.id,v),Il(u==null?void 0:u.index,v.id,d==null?void 0:d.versionItem),Hl.value=[...Hl.value||[],JSON.parse(JSON.stringify(v))]},Rr=async(d,v=null)=>{var T,z,F,N,ne,oe,K;try{const Ne=(T=me.getAllLeafNodes(te.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"),Te=new Map;Ne==null||Ne.forEach(va=>{va!=null&&va.label&&(va!=null&&va.prop)&&Te.set(va.label,va.prop)});const Ue=Te.get("系统编号")||Te.get("编号");if(!Ue){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const He=v||Sr.value;if((Array.isArray(He==null?void 0:He.result)?He.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let va=0;va<d.length;va++){const Fa=d[va],Wa=Fa[Ue];if(!Wa){console.warn(`第 ${va+1} 条匹配行缺少系统编号,跳过`);continue}const ca=`设备管理/试验设备/${Wa}`,Za=await L.getPageDataApi({platId:parseInt((z=Al.value)==null?void 0:z.plat_id),pageName:ca});if(!((F=Za==null?void 0:Za.data)!=null&&F.result)||!Array.isArray(Za.data.result)){console.warn(`未找到详情页数据: ${ca}`);continue}const ka=Za.data.result.find(ra=>(ra==null?void 0:ra.property_name)==="校检记录");if(!ka){console.warn(`详情页 ${ca} 中未找到校检记录表`);continue}const Ua=(N=ka.contents)==null?void 0:N.find(ra=>(ra==null?void 0:ra.key)&&ra.key.startsWith("content_"));if(!Ua||!Ua.key){console.warn("校检记录表中未找到 content item");continue}const ye=Ua.key,Ca=Array.isArray(Ua.value)?Ua.value:[];if(Ca.length>=5){const _e=[...Ca].sort((sa,Na)=>{const il=Number((sa==null?void 0:sa.create_time)||0),Ya=Number((Na==null?void 0:Na.create_time)||0);return il-Ya})[0];_e!=null&&_e.id&&await L.pageBatchDeleteApi({platId:parseInt((ne=Al.value)==null?void 0:ne.plat_id),changeContents:[{tableName:ye,tableContents:[{id:_e.id}]}]})}const ua=(oe=Ne==null?void 0:Ne.find(ra=>(ra==null?void 0:ra.label)==="证书附件"))==null?void 0:oe.prop,Ea=String(Date.now()),Da={id:Ea},A=Ca[0]||{},X=new Date().toISOString().split("T")[0];if(Object.keys(A||{}).forEach(ra=>{if(ra!=="id"){if(ra==="证书附件"){Da[ra]="";return}if(ra==="校检日期"||ra==="检校日期"){Da[ra]=Fa[ra]||Fa.校检日期||Fa.检校日期||X;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(ra)){Da[ra]=Fa[ra]??"";return}Da[ra]=Fa[ra]??""}}),ua&&Fa[ua]){const ra=Fa[ua];if(Array.isArray(ra)&&ra.length>0)Da.证书附件=JSON.stringify(ra.map(_e=>({url:(_e==null?void 0:_e.url)||"",name:(_e==null?void 0:_e.name)||(_e==null?void 0:_e.fileName)||"",fileName:(_e==null?void 0:_e.fileName)||(_e==null?void 0:_e.name)||""})).filter(_e=>_e.url||_e.name));else if(typeof ra=="string")try{const _e=JSON.parse(ra);Da.证书附件=ra}catch{Da.证书附件=JSON.stringify([{url:ra,name:ra,fileName:ra}])}}console.log(ye,"tableName","inspectionRecordRow",Da),await L.pageBatchAddApi({platId:parseInt((K=Al.value)==null?void 0:K.plat_id),changeContents:[{tableName:ye,tableContents:[Da]}]});const Re=ka==null?void 0:ka.object_id;if(Re&&Ea){const ra=ua&&Fa[ua]?Fa[ua]:null;let _e=[],sa="",Na=!1;if(Array.isArray(ra)&&ra.length>0){_e=ra.map(pl=>({name:(pl==null?void 0:pl.name)||(pl==null?void 0:pl.fileName)||"",url:(pl==null?void 0:pl.url)||""})).filter(pl=>pl.url||pl.name);const Ya=ra[0];sa=(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(sa).toLowerCase().endsWith(".pdf")}else if(typeof ra=="string")try{const Ya=JSON.parse(ra);Array.isArray(Ya)?(_e=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),_e.length>0&&(sa=_e[0].url||"",Na=String(_e[0].name).toLowerCase().endsWith(".pdf")||String(sa).toLowerCase().endsWith(".pdf"))):(sa=ra,Na=String(ra).toLowerCase().endsWith(".pdf"))}catch{sa=ra,Na=String(ra).toLowerCase().endsWith(".pdf")}const il={ts:Date.now(),versionId:String(Date.now())+"_"+String(va),label:new Date().toLocaleString(),certType:Fa.证书类型||"",certNo:Fa.证书编号||"",fileType:Na?"pdf":"image",sourceUrl:Na?sa:"",images:_e};Il(Re,Ea,il)}}}catch(Ne){console.error("向校检记录表插入OCR识别结果失败:",Ne),Ka.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},Ar=d=>{const v=Array.isArray(d)?d:Gl.value||[];if(v.length===0){rr();return}if(v.find(N=>(N==null?void 0:N.__decision)==="replace"&&!(N!=null&&N.selectedTargetId))){Ka.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(N=>{var oe;const ne=N==null?void 0:N.__decision;if(!(!ne||ne==="skip")){if(ne==="add"){Il(u==null?void 0:u.index,(oe=N==null?void 0:N.ocrRow)==null?void 0:oe.id,N==null?void 0:N.versionItem),Zl.value=[...Zl.value||[],N.ocrRow];return}if(ne==="replace"){const K=N==null?void 0:N.selectedTargetId,Ne=(Ce.value||[]).find(Te=>String(Te==null?void 0:Te.id)===String(K));if(!Ne)return;Br(N,Ne)}}}),(Hl.value||[]).length>0&&(Ce.value=[...Ce.value||[]]),(Zl.value||[]).length>0&&(Ce.value=[...Ce.value||[],...Zl.value||[]],ma.value=[...ma.value||[],...Zl.value||[]],(Zl.value||[]).forEach(N=>{var ne,oe;return(oe=(ne=qe.value)==null?void 0:ne.set)==null?void 0:oe.call(ne,N.id,N)})),Yr.value=Ce.value;const z=Hl.value||[],F=Zl.value||[];if(z.length>0&&(Se("change",{buttonName:"编辑",singleContent:z,content:Ce.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:te.value,name:u==null?void 0:u.compName}),Rr(z)),F.length>0){const N=Sr.value;Se("change",{buttonName:"OCR批量新增",content:Ce.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:te.value,ocrRows:F,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(N==null?void 0:N.result)?N.result:[]).map(ne=>(Array.isArray(ne==null?void 0:ne.图片信息)?ne.图片信息:[]).map(oe=>({url:(oe==null?void 0:oe.url)||"",name:(oe==null?void 0:oe.name)||"",fileName:(oe==null?void 0:oe.name)||""})).filter(oe=>oe.url)),ocrResult:N,matchedCount:(z||[]).length,newCount:(F||[]).length})}Ka.ElMessage.success("已提交候选处理结果"),rr()},yr=mc(),zr=a.computed(()=>yr.getConfig()),Mr=a.ref(),ir=a.ref(),xn=dc(L.pinia),Yr=a.ref(),nn=a.ref(0),zn=L.useUnit(L.pinia),{selectIndex:wn,selectMenu:gn,selectTitle:on}=L.storeToRefs(zn),{selectString:ar}=L.storeToRefs(xn),ql=L.useLoginState(L.pinia),{loginUserInfo:Al}=L.storeToRefs(ql),Ll=a.ref(720),zl=a.ref(!1),gr=a.ref(!1),ur=a.ref([]),jl=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=Ce.value)==null?void 0:d.length},d=>{ie.total=d}),a.watch(()=>H.value,async()=>{var v,T,z,F,N,ne,oe,K,Ne,Te,Ue,He,Ye,va,Fa,Wa,ca;if(((v=H.value)==null?void 0:v.length)===0||!((T=u==null?void 0:u.itemData)!=null&&T.find(Za=>(Za==null?void 0:Za.key)==="columnPath"))||!((z=u==null?void 0:u.itemData)!=null&&z.find(Za=>(Za==null?void 0:Za.key)==="pageColumn")))return;let d=(Ne=(K=(oe=(ne=(N=(F=u==null?void 0:u.itemData)==null?void 0:F.find(Za=>(Za==null?void 0:Za.key)==="pageColumn"))==null?void 0:N.contents)==null?void 0:ne.split("["))==null?void 0:oe[1])==null?void 0:K.split("]"))==null?void 0:Ne[0];((Ye=(He=(Ue=(Te=u==null?void 0:u.itemData)==null?void 0:Te.find(Za=>(Za==null?void 0:Za.key)==="pageColumn"))==null?void 0:Ue.contents)==null?void 0:He.split("["))==null?void 0:Ye[0])+((Fa=(va=H.value)==null?void 0:va.find(Za=>(Za==null?void 0:Za.key)===d))==null?void 0:Fa.value),(ca=(Wa=u==null?void 0:u.itemData)==null?void 0:Wa.find(Za=>(Za==null?void 0:Za.key)==="pageGroup"))==null||ca.contents,Pt(compData,u.allMapContents)},{deep:!0});const tn=d=>{var T,z,F,N,ne;const v=(z=(T=te.value)==null?void 0:T.filter(oe=>oe==null?void 0:oe.mainKey))==null?void 0:z.map(oe=>oe==null?void 0:oe.prop);if(v.length===0){const oe=(F=te.value)==null?void 0:F.map(K=>K==null?void 0:K.prop);return(N=oe==null?void 0:oe.map(K=>d==null?void 0:d[K]))==null?void 0:N.join("|")}return(ne=v==null?void 0:v.map(oe=>d==null?void 0:d[oe]))==null?void 0:ne.join("|")},ei=d=>{var oe,K,Ne,Te,Ue;const v=(K=(oe=te.value)==null?void 0:oe.filter(He=>He==null?void 0:He.required))==null?void 0:K.map(He=>He==null?void 0:He.prop),T=[];if(d==null||d.forEach(He=>{v==null||v.forEach(Ye=>{const va=He[Ye];(va==null||va==="")&&(T.includes(Ye)||T.push(Ye))})}),T.length>0)return Ka.ElMessage.warning(`请填写必填项:${T.join("、")}`);const z=new Map,F=new Map;(Ne=Ce.value)==null||Ne.forEach(He=>{const Ye=tn(He);z.set(Ye,He)}),d==null||d.forEach(He=>{const Ye=tn(He);F.set(Ye,He)});const N=d==null?void 0:d.filter(He=>z.has(tn(He))),ne=(Te=Ce.value)==null?void 0:Te.filter(He=>F.has(tn(He)));return(N==null?void 0:N.length)>0&&(o.columns=(Ue=te.value)==null?void 0:Ue.filter(He=>(He==null?void 0:He.label)!=="操作"),o.existRows=ne,o.tableData=N,o.show=!0),d==null?void 0:d.filter(He=>{const Ye=tn(He);return!z.has(Ye)})},Mn=a.ref(""),ai=a.ref(null),Sn=async()=>{var d,v,T,z,F,N;try{const ne=await L.quoteApi({related:[{menus:Ge.value,groups:u==null?void 0:u.compName}],platId:parseInt((d=Al.value)==null?void 0:d.plat_id)});if(((v=ne==null?void 0:ne.data)==null?void 0:v.code)===200){ai.value=(T=ne==null?void 0:ne.data)==null?void 0:T.result;const oe=(z=te.value)==null?void 0:z.map(Te=>(Te==null?void 0:Te.prop)||(Te==null?void 0:Te.label)),K=In(oe,(F=ne==null?void 0:ne.data)==null?void 0:F.result),Ne=K==null?void 0:K.flatMap(Te=>Te==null?void 0:Te.quote);(Ne==null?void 0:Ne.length)>0&&(Mn.value=(N=Ne==null?void 0:Ne.map(Te=>Te==null?void 0:Te.menus))==null?void 0:N.join("、"))}}catch(ne){throw new Error(ne)}};function In(d,v){var T;return(T=v.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(F=>F.words&&Array.isArray(F.words)?F.words.some(N=>d.includes(N)):!1):!1))==null?void 0:T.map(z=>{const F={...z};return F.struct&&Array.isArray(F.struct)&&(F.struct=F.struct.filter(N=>N.words&&Array.isArray(N.words)?N.words.some(ne=>d.includes(ne)):!1)),F})}const Hn=async(d,v)=>{var T,z,F,N,ne,oe,K,Ne,Te,Ue;try{ai.value||await Sn();const He=v==null?void 0:v.map(Ua=>{const ye=Object.keys(Ua),Ca={};return ye.forEach((ua,Ea)=>{Ca[d[Ea]]=Ua[ua]}),Ca}),Ye=ei(He);if(!Ye||(Ye==null?void 0:Ye.length)===0)return;const va=[];let Fa=(Ce.value||[]).slice();(Ye||[]).forEach(Ua=>{const ye={...Ua};try{ye.sort=Ln(0,Fa)}catch{}va.push(ye),Fa.unshift(ye)});let Wa=await L.quoteApi({platId:parseInt((T=Al==null?void 0:Al.value)==null?void 0:T.plat_id),type:"fatherSyncs",related:[{menus:Ge.value,groups:""},{menus:Ge.value,groups:u==null?void 0:u.compName}]});Wa=(z=Wa==null?void 0:Wa.data)==null?void 0:z.result;let ca=Wa==null?void 0:Wa.map(Ua=>({tableName:"content_"+(Ua==null?void 0:Ua.id),tableContents:va==null?void 0:va.map((ye,Ca)=>({id:Ca,...ye}))})),Za=[{tableName:(F=u==null?void 0:u.related)==null?void 0:F.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:va==null?void 0:va.map((Ua,ye)=>({id:ye,...Ua}))}];Za=[...Za,...ca];const ka=await L.pageBatchAddApi({platId:parseInt((N=Al.value)==null?void 0:N.plat_id),changeContents:Za});if(((ne=ka==null?void 0:ka.data)==null?void 0:ne.code)===200){const Ua={buttonName:"新增",columns:te.value,fixContent:va==null?void 0:va.map((Ca,ua)=>({id:ua,...Ca})),relatedContents:u==null?void 0:u.related};await St(Ua),((oe=o==null?void 0:o.existRows)==null?void 0:oe.length)>0?Ka.ElMessage.success("部分数据导入成功"):Ka.ElMessage.success("数据导入成功");let ye=[];Za==null||Za.forEach(Ca=>{var ua;(ua=Ca==null?void 0:Ca.tableContents)==null||ua.forEach(Ea=>{ye.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ea),request_result:"{}",is_delete:!1,request_table:Ca==null?void 0:Ca.tableName,request_type:"export"})})}),await L.pageBatchAddApi({platId:parseInt((K=Al==null?void 0:Al.value)==null?void 0:K.plat_id),changeContents:[{tableName:"log",tableContents:ye}]})}else{let Ua=[];Za==null||Za.forEach(ye=>{var Ca;(Ca=ye==null?void 0:ye.tableContents)==null||Ca.forEach(ua=>{Ua.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ua),request_result:"{}",is_delete:!1,request_table:ye==null?void 0:ye.tableName,request_type:"error"})})}),await L.pageBatchAddApi({platId:parseInt((Ne=Al==null?void 0:Al.value)==null?void 0:Ne.plat_id),changeContents:[{tableName:"log",tableContents:Ua}]}),Ka.ElMessage.error("数据导入响应失败")}}catch(He){throw Ka.ElMessage.error("数据导入处理失败"),await L.pageBatchAddApi({platId:parseInt((Te=Al==null?void 0:Al.value)==null?void 0:Te.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(He),is_delete:!1,request_table:(Ue=u==null?void 0:u.related)==null?void 0:Ue.find(Ye=>Ye==null?void 0:Ye.includes("content")),request_type:"error"}]}]}),new Error(He)}},an=async d=>{var N,ne,oe,K,Ne,Te,Ue;let v=fe.value;v!=null&&v.find(He=>(d==null?void 0:d.key)===(He==null?void 0:He.key))&&(v=v==null?void 0:v.filter(He=>(d==null?void 0:d.key)!==(He==null?void 0:He.key))),v.push({key:d==null?void 0:d.key,value:[(ne=d==null?void 0:d.value)==null?void 0:ne[((N=d==null?void 0:d.value)==null?void 0:N.length)-1]]});let T=$a.value;T=T==null?void 0:T.map(He=>{var Ye,va;return(He==null?void 0:He.type)==="Select"&&(d==null?void 0:d.key)===(He==null?void 0:He.prop)&&Array.isArray(He.value)&&(Ye=He.value)!=null&&Ye.every(Fa=>typeof Fa=="string")&&(He.selectValue=(va=v==null?void 0:v.find(Fa=>(Fa==null?void 0:Fa.key)===(He==null?void 0:He.prop)))==null?void 0:va.value),He});let z=(K=(oe=T==null?void 0:T.find(He=>(He==null?void 0:He.prop)===(d==null?void 0:d.key)))==null?void 0:oe.optionUrl)==null?void 0:K.menuId,F=T==null?void 0:T.find(He=>(He==null?void 0:He.prop)===(d==null?void 0:d.key));if(z){let He=await kt(F==null?void 0:F.optionUrl,z),Ye,va=R.value,Fa=(Ue=(Te=(Ne=$a.value)==null?void 0:Ne.find(Wa=>{var ca;return(ca=F==null?void 0:F.optionUrl)==null?void 0:ca.menuId}))==null?void 0:Te.selectValue)==null?void 0:Ue[0];if(He==null||He.forEach(Wa=>{var ca,Za,ka,Ua,ye,Ca,ua,Ea,Da,A;if(z){let X=(Za=(ca=$a.value)==null?void 0:ca.find(ra=>{var _e,sa;return((_e=F==null?void 0:F.optionUrl)==null?void 0:_e.menuId)===((sa=ra==null?void 0:ra.optionUrl)==null?void 0:sa.menuId)}))==null?void 0:Za.prop,Re=(Ua=(ka=T==null?void 0:T.find(ra=>(ra==null?void 0:ra.prop)===X))==null?void 0:ka.selectValue)==null?void 0:Ua[0];X!=null&&X.includes("·")&&(X=(ye=X==null?void 0:X.split("·"))==null?void 0:ye[0],Re=(Da=(Ea=(ua=d==null?void 0:d.value)==null?void 0:ua[((Ca=d==null?void 0:d.value)==null?void 0:Ca.length)-1])==null?void 0:Ea.split(" "))==null?void 0:Da[0]),va!=null&&va.find(ra=>(ra==null?void 0:ra.value)===Fa)?Ye=(A=va==null?void 0:va.find(ra=>(ra==null?void 0:ra.value)===Fa))==null?void 0:A.objectValue:Wa[X]===Re&&(Ye=Wa)}}),Ye){let Wa=T;Wa=Wa==null?void 0:Wa.map(ca=>{var Za,ka,Ua,ye,Ca,ua;return z&&(Ye!=null&&Ye[ca==null?void 0:ca.prop])&&ue.value==="新增"&&(ca==null?void 0:ca.prop)!==(F==null?void 0:F.prop)?ca.value=(Ye==null?void 0:Ye[ca==null?void 0:ca.prop])||(Ye==null?void 0:Ye[(ye=(Ua=(ka=(Za=ca==null?void 0:ca.optionUrl)==null?void 0:Za.groupSelect)==null?void 0:ka[1])==null?void 0:Ua.replaceAll("[",""))==null?void 0:ye.replaceAll("]","")]):ca.value=(ua=(Ca=$a.value)==null?void 0:Ca.find(Ea=>(Ea==null?void 0:Ea.prop)===(ca==null?void 0:ca.prop)))==null?void 0:ua.value,ca}),$a.value=Wa}}fe.value=v},On=async(d,v)=>{var T,z,F,N,ne;if((T=d==null?void 0:d.toString())!=null&&T.includes(".txt")||(z=d==null?void 0:d.toString())!=null&&z.includes(".cpt")||(F=d==null?void 0:d.toString())!=null&&F.includes(".cyd")){const oe=await Ka.axios.get(d,{responseType:"blob",headers:{"Content-Type":"application/json"}}),K=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"});let Ne=URL.createObjectURL(K);le.value=[{name:(ne=d==null?void 0:d.split("/"))==null?void 0:ne[((N=d==null?void 0:d.split("/"))==null?void 0:N.length)-1],blobUrl:Ne}],Ta.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&Se("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=(Ce.value??[]).slice(),v=En.prop||ae.prop,T=En.order||ae.order;if(!v||!T)return d;const z=T==="ascending",F=ne=>{if(v)return ne&&Object.prototype.hasOwnProperty.call(ne,v)?ne[v]:v.includes(".")?v.split(".").reduce((oe,K)=>oe==null?oe:oe[K],ne):ne==null?void 0:ne[v]},N=ne=>{if(ne==null)return{ok:!1,value:NaN};if(typeof ne=="number")return{ok:Number.isFinite(ne),value:ne};const oe=String(ne).trim();if(oe==="")return{ok:!1,value:NaN};const K=oe.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(K))return{ok:!1,value:NaN};const Ne=Number(K);return{ok:Number.isFinite(Ne),value:Ne}};return d.sort((ne,oe)=>{const K=F(ne),Ne=F(oe);if(K==null&&Ne==null)return 0;if(K==null)return z?-1:1;if(Ne==null)return z?1:-1;const Te=N(K),Ue=N(Ne);if(Te.ok&&Ue.ok)return z?Te.value-Ue.value:Ue.value-Te.value;const He=ye=>{if(ye==null)return{ok:!1,value:NaN};const Ca=String(ye).trim();if(Ca==="")return{ok:!1,value:NaN};const ua=Ca.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ua)return{ok:!1,value:NaN};const Ea=ua[1]?-1:1,Da=Number(ua[2]),A=Number(ua[3]),X=Number(ua[4]);return[Da,A,X].some(Re=>Number.isNaN(Re))?{ok:!1,value:NaN}:A>=60||X>=60?{ok:!1,value:NaN}:{ok:!0,value:Ea*(Da*3600+A*60+X)}},Ye=He(K),va=He(Ne);if(Ye.ok&&va.ok)return z?Ye.value-va.value:va.value-Ye.value;const Fa=new Date(K).getTime(),Wa=new Date(Ne).getTime(),ca=!Number.isNaN(Fa),Za=!Number.isNaN(Wa);if(ca&&Za)return z?Fa-Wa:Wa-Fa;const ka=String(K),Ua=String(Ne);return z?ka.localeCompare(Ua):Ua.localeCompare(ka)})}),Un=a.computed(()=>{var T;const d=(ie.currentPage-1)*ie.pageSize,v=d+ie.pageSize;return Se("getSliceContLength",ie),(T=Gr.value)==null?void 0:T.slice(d,v)}),bn=d=>{ie.currentPage=d,Se("getSliceContLength",ie)},Ai=d=>{var z;ie.pageSize=d;const v=((z=Ce.value)==null?void 0:z.length)??0,T=d>0?Math.ceil(v/d):1;ie.currentPage>T&&(ie.currentPage=T||1,Ka.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),Se("getSliceContLength",ie)},Vo=({prop:d,order:v})=>{En.prop=d,En.order=v,ie.currentPage=1};function Fo(d){const v=[];function T(z,F=""){z.forEach(N=>{N.children&&N.children.length>0?T(N.children,N.prop):v.push(N.prop)})}return T(d),v}const Cn=(d,v)=>{var oe,K,Ne,Te;let T=(K=(oe=te.value)==null?void 0:oe.map(Ue=>Ue==null?void 0:Ue.prop))==null?void 0:K.filter(Ue=>Ue!=="operate");((Ne=te.value)==null?void 0:Ne.some(Ue=>{var He;return((He=Ue==null?void 0:Ue.children)==null?void 0:He.length)>0}))&&(T=Fo((Te=te.value)==null?void 0:Te.filter(Ue=>(Ue==null?void 0:Ue.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(Ue=>T==null?void 0:T.find(He=>Ue===He))))return Ka.ElMessage.error("导入的数据表头不匹配");Hn(F,v)},Po=(d,v)=>{var F;const T=d==null?void 0:d.filter(N=>N!=="序号"),z=v==null?void 0:v.map(N=>{const ne=Object.entries(N);return ne.shift(),Object.fromEntries(ne)});Fe.setRefreshCurStructure(!1),((F=te.value)==null?void 0:F.length)===0||Cn(T,z)},jo=(d,v,T,z)=>{const F=[],N=[],ne=Ne=>Object.keys(Ne).length;for(const Ne in d)if(d[Ne]!==void 0){const Te=d[Ne],Ue=[];for(const[He,Ye]of Object.entries(Te))Ue.push(Ye),N.length<ne(Te)&&N.push(He);F.push(Ue)}F.unshift(N);const oe=me.utils.aoa_to_sheet(F),K=me.utils.book_new();me.utils.book_append_sheet(K,oe,z),me.writeFileSync(K,`${v}.xlsx`),ur.value=[]},Yi=async(d,v,T,z=!1,F)=>{try{Fe.setRefreshCurStructure(!1)}catch(N){Ka.ElMessage.error(N)}},Ji=async(d,v)=>{await Yi()},Xi=async(d,v)=>{await Yi("columnType",v,d,!1)},jr=async({newRow:d,targetIndex:v})=>{var F;if(!pe(u.config,{type:Qe.TABLE}))return;const z=(ie.currentPage-1)*ie.pageSize+(v??0);d._isTemp=!0;try{(d.sort===void 0||d.sort===null||String(d.sort).trim()==="")&&(d.sort=Ln(z,Ce.value||[]))}catch{}Ce.value.splice(z,0,d),await a.nextTick(),m.value.has(d.id)||m.value.set(d.id,L.cloneDeep(d)),Ce.value=(F=Ce.value)==null?void 0:F.map(N=>({...N,tableEditType:(N==null?void 0:N.id)===d.id?"edit":(N==null?void 0:N.tableEditType)??"text"})),c.value.add(d.id),zl.value=!0},Ho=(d,v,T,z=[])=>(!Array.isArray(v)||v.length===0||v.forEach(F=>{const N=F==null?void 0:F.prop;if(!N)return;let ne=d==null?void 0:d[N];if(ne==null||String(ne).trim()==="")return;ne=String(ne);const oe=new Set([...(Array.isArray(T)?T:[]).filter(Te=>(Te==null?void 0:Te.id)!==(d==null?void 0:d.id)).map(Te=>Te==null?void 0:Te[N]).filter(Te=>Te!=null).map(Te=>String(Te)),...(Array.isArray(z)?z:[]).map(Te=>Te==null?void 0:Te[N]).filter(Te=>Te!=null).map(Te=>String(Te))]);if(!oe.has(ne))return;let K=1,Ne="";for(;Ne=`${ne}(${K})`,!!oe.has(Ne);)K++;d[N]=Ne}),d),zi=async()=>{var F,N,ne,oe,K,Ne,Te,Ue;const d=Array.from(c.value||[]);if(d.length===0)return;const v=(N=me.getColumnChild((F=L.cloneDeep(te.value))==null?void 0:F.filter(He=>(He==null?void 0:He.label)!=="操作")))==null?void 0:N.filter(He=>(He==null?void 0:He.required)===!0);if((v==null?void 0:v.length)>0)for(let He=0;He<d.length;He++){const Ye=d[He],va=(ne=Ce.value)==null?void 0:ne.find(Fa=>(Fa==null?void 0:Fa.id)===Ye);if(va)for(let Fa=0;Fa<v.length;Fa++){const Wa=v[Fa],ca=Wa==null?void 0:Wa.prop,Za=(Wa==null?void 0:Wa.label)??ca,ka=va==null?void 0:va[ca];if(ka===""||ka===null||ka===void 0||Array.isArray(ka)&&ka.length===0){Ka.ElMessage.error(`${Za}不能为空`);return}}}const T=[],z=[];if(d.forEach(He=>{var Za;const Ye=(Za=Ce.value)==null?void 0:Za.find(ka=>(ka==null?void 0:ka.id)===He);if(!Ye)return;if(Ye!=null&&Ye._isTemp){const Ua=(me.getAllLeafNodes(te.value)||[]).filter(A=>(A==null?void 0:A.mainKey)===!0||(A==null?void 0:A.isMainKey)===!0),ye=Ce.value.findIndex(A=>(A==null?void 0:A.id)===He),Ca=ye>=0?ye+1:Ce.value.length+1;Ho(Ye,Ua,Ce.value,T);const ua={id:Ca.toString()};(Ye==null?void 0:Ye.sort)!==void 0&&(Ye==null?void 0:Ye.sort)!==null&&String(Ye.sort).trim()!==""?ua.sort=String(Ye.sort):ua.sort=Ln(ye>=0?ye:Ce.value.length-1,Ce.value||[]),(me.getAllLeafNodes(te.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 X=A==null?void 0:A.prop;if(X){const Re=Ye[X];Re!==void 0?ua[X]=Re??"":ua[X]=""}}),T.push(ua);return}const Fa=(me.getAllLeafNodes(te.value)||[]).filter(ka=>(ka==null?void 0:ka.type)!=="operate"&&(ka==null?void 0:ka.label)!=="操作"&&(ka==null?void 0:ka.prop)!=="operate"),Wa=new Set(Fa.map(ka=>ka==null?void 0:ka.prop).filter(Boolean)),ca={};for(const ka of Wa)Object.prototype.hasOwnProperty.call(Ye,ka)&&(ca[ka]=Ye[ka]);z.push({id:Ye.id,value:{tableData:ca}})}),Fe.setTableLoading(u==null?void 0:u.index),z.length>0){const He=z.map(va=>{const Fa={id:va.id,...va.value.tableData};return delete Fa._isOCRRow,delete Fa._ocrTableId,delete Fa._isTemp,delete Fa.tableEditType,delete Fa.index,Fa}),Ye=[{tableName:(oe=u==null?void 0:u.related)==null?void 0:oe.find(va=>va==null?void 0:va.includes("content")),tableContents:He}];try{await L.pageBatchUpdateApi({platId:parseInt((K=Al.value)==null?void 0:K.plat_id),changeContents:Ye})}catch(va){Ka.ElMessage.error(((Te=(Ne=va==null?void 0:va.response)==null?void 0:Ne.data)==null?void 0:Te.message)||(va==null?void 0:va.message)||"保存失败"),Fe.setTableLoading(!1);return}}if(T.length>0){const He={fixContent:T,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:te.value};Se("change",He)}Ka.ElMessage.success("保存成功"),c.value.clear(),m.value.clear(),Ce.value=(Ue=Ce.value)==null?void 0:Ue.map(He=>({...He,tableEditType:"text"})),zl.value=!1,Fe.setRefreshCurStructure(!0)},Uo=()=>{var v;const d=Array.from(c.value||[]);if(d.length===0){zl.value=!1;return}d.forEach(T=>{var N,ne;const z=m.value.get(T),F=(N=Ce.value)==null?void 0:N.find(oe=>(oe==null?void 0:oe.id)===T);if(F!=null&&F._isTemp){Ce.value=Ce.value.filter(oe=>(oe==null?void 0:oe.id)!==F.id);return}if(z){const oe=(ne=Ce.value)==null?void 0:ne.findIndex(K=>(K==null?void 0:K.id)===T);oe!==-1&&(Ce.value[oe]={...Ce.value[oe],...z})}}),c.value.clear(),m.value.clear(),Ce.value=(v=Ce.value)==null?void 0:v.map(T=>({...T,tableEditType:"text"})),zl.value=!1},Mi=a.ref(!1),Zi=async d=>{var F,N,ne,oe;if(!zl.value||d!=null&&d.isComposing||(d==null?void 0:d.key)!=="Enter")return;const v=d==null?void 0:d.target;if(((N=(F=v==null?void 0:v.tagName)==null?void 0:F.toLowerCase)==null?void 0:N.call(F))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(v)||((ne=v==null?void 0:v.blur)==null||ne.call(v),(oe=d.preventDefault)==null||oe.call(d),await a.nextTick(),await Qi())},Qi=async()=>{if(P.value){zl.value=!1;return}if(!Mi.value){Mi.value=!0;try{Array.from(c.value||[]).length>0?await zi():zl.value=!1}finally{Promise.resolve().then(()=>{Mi.value=!1})}}},qo=d=>{ur.value=d},Wo=(d,v)=>{jl.value===v?Vr.value=!1:Vr.value=!0,jl.value=v==null?void 0:v.changeProp},eo=d=>{if(!d)return;const{item:v,value:T}=d,z=$a.value.find(F=>F.prop==v.prop);z&&z.contents.push({label:T,value:T})},Dn=a.computed(()=>{var T,z,F;const d=(T=te.value)==null?void 0:T.some(N=>N==null?void 0:N.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",d?"inline-block":"none"),(F=(z=te.value)==null?void 0:z.filter(N=>(N==null?void 0:N.label)!=="操作"))==null?void 0:F.map(N=>({...N,filterable:!!(N!=null&&N.filterable),showSummary:!!(N!=null&&N.showSummary),operable:!!(N!=null&&N.operable),fixed:N==null?void 0:N.fixed}))}),Nn=async(d,v,T)=>{const z=L.cloneDeep(te.value);await a.nextTick();const F=z==null?void 0:z.map(ne=>(T==null?void 0:T.label)===(ne==null?void 0:ne.label)?{...ne,[v]:d}:ne),N=qn(F);await ms(u.index,N),te.value=F,Z.value=N},qn=d=>{var F;const v=d||[];return((F=me.getAllLeafNodes(v)||[])==null?void 0:F.filter(N=>(N==null?void 0:N.prop)&&(N==null?void 0:N.type)!=="operate"&&(N==null?void 0:N.label)!=="操作"&&(N==null?void 0:N.prop)!=="operate")).map(N=>{const{prop:ne}=N;return n0(ne,N)})},Ko=async d=>{let v=await o0(u.index);v||(v=qn(d)),Z.value=v},ao=async(d,v)=>{const T=L.cloneDeep(te.value),z=ne=>Array.isArray(ne)?ne.map(oe=>{const K=Array.isArray(oe==null?void 0:oe.children)&&oe.children.length>0,Ne={...oe};return(Ne==null?void 0:Ne.prop)==="operate"||(Ne==null?void 0:Ne.label)==="操作"||(Ne==null?void 0:Ne.type)==="operate"?(Ne.sortable=!1,Ne.filterable=!1,Ne.operable=!1):Ne.sortable=K?!1:!!d,K&&(Ne.children=z(Ne.children)),Ne}):ne,F=z(T),N=qn(F);await ms(u.index,N),te.value=F,Z.value=N,await a.nextTick(),nn.value=nn.value+1},lo=()=>{U.value=!1},ro=d=>{Se("clickTrigger",d)},Wn=async d=>{var N,ne,oe,K,Ne,Te,Ue,He,Ye,va,Fa,Wa,ca,Za,ka;const v=d==null?void 0:d.row,T=d==null?void 0:d.rowData,z=d==null?void 0:d.suffix;if((N=v==null?void 0:v.toString())!=null&&N.includes(".urdf")||d!=null&&d.isUrdf||z!=null&&z.includes(".urdf")){if(v.includes(",")){Ka.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(B(v)){const ye={files:[Ee(v)],data:{}};Ae(ye);return}Pa.value=[{url:v,extension:re(v)}],Pe.value=!0,ke.value={data:L.cloneDeep(T)},De.value=!0;return}let F=[];if((ne=v==null?void 0:v.toString())!=null&&ne.includes(".stl")||(oe=v==null?void 0:v.toString())!=null&&oe.includes(".STL")||(K=v==null?void 0:v.toString())!=null&&K.includes(".obj")||(Ne=v==null?void 0:v.toString())!=null&&Ne.includes(".mtl")){const Ua=(Te=v==null?void 0:v.toString())==null?void 0:Te.split(","),ye=We(Ua),Ca=ye==null?void 0:ye[0];if(B(Ca==null?void 0:Ca.extension)){Ae({files:ye,data:{}});return}Pa.value=ye,Pe.value=!1,De.value=!0;return}if((Ue=v==null?void 0:v.toString())!=null&&Ue.includes(".stl")||(He=v==null?void 0:v.toString())!=null&&He.includes(".STL")||(Ye=v==null?void 0:v.toString())!=null&&Ye.includes(".obj")||(va=v==null?void 0:v.toString())!=null&&va.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let Ua,ye=[],Ca={};if(Array.isArray(v)?Ua=v:Ua=v==null?void 0:v.split(","),Ua==null||Ua.forEach(ua=>{ua.includes(".mtl")?ye.push(ua):Ca.blob=Ca.blob?Ca.blob+","+ua:ua}),(ye==null?void 0:ye.length)>0&&(Ca.mtlBlobs=ye),z&&(Ca.suffix=z),(Wa=(Fa=Object.values(Ca))==null?void 0:Fa[0])!=null&&Wa.includes("http:"))F.push(Ca);else{const ua=new Blob([Ca.blob],{type:"application/octet-stream;charset=UTF-8"});let Ea=URL.createObjectURL(ua),Da="";(ca=v==null?void 0:v.split("/"))==null||ca.forEach((A,X)=>{var Re;X===((Re=v==null?void 0:v.split("/"))==null?void 0:Re.length)-1&&(Da=A)}),(Za=Ca.blob)!=null&&Za.includes(".stl")&&(Da=(Da==null?void 0:Da.replaceAll(">",""))+".urdf"),le.value=[{name:Da,blobUrl:Ea}],Ta.value=!0}}else{const Ua=await Ka.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ye=new Blob([Ua.data],{type:"application/octet-stream;charset=UTF-8"});let Ca=URL.createObjectURL(ye),ua="";if((ka=v==null?void 0:v.split("/"))==null||ka.forEach((Ea,Da)=>{var A;Da===((A=v==null?void 0:v.split("/"))==null?void 0:A.length)-1&&(ua=Ea)}),B(ua)){const Ea=q(ua),Da=Ee(v);Ae({files:[Da],data:{trackFileType:Ea}});return}le.value=[{name:ua,blobUrl:Ca}],Ta.value=!0}(F==null?void 0:F.length)>0&&i.setBlobUrls(F)},li=d=>{var z,F,N,ne;if(d!=null&&d.downloadUrl)return d==null?void 0:d.name;const v=(ne=(z=d==null?void 0:d.url)==null?void 0:z.split("."))==null?void 0:ne[((N=(F=d==null?void 0:d.url)==null?void 0:F.split("."))==null?void 0:N.length)-1];return(d==null?void 0:d.name)+"."+v},no=d=>{if(!d)return"未知文件";try{const z=li(d);if(typeof z=="string"&&z.includes("."))return z}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}`},io=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]),z=Number(v[2]);return!Number.isFinite(T)||!Number.isFinite(z)?d:String(T*1e3+z)},ri=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},Go=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"),z=Date.parse(T);return Number.isFinite(z)?z:null},oo=(d,v=[])=>{const T=Array.isArray(d)?d.slice():[];if(T.length<=1)return T;const z=new Map((v||[]).map((ne,oe)=>[String(ne),oe])),F=T.some(ne=>ri(ne==null?void 0:ne.sort)!==null),N=T.map((ne,oe)=>({r:ne,idx:oe,id:String((ne==null?void 0:ne.id)??""),sortVal:ri(ne==null?void 0:ne.sort),createTimeMs:Go(ne==null?void 0:ne.create_time),prevIdx:z.has(String(ne==null?void 0:ne.id))?z.get(String(ne==null?void 0:ne.id)):Number.POSITIVE_INFINITY}));return N.sort((ne,oe)=>{if(F){const Te=ne.sortVal,Ue=oe.sortVal;if(Te===null&&Ue!==null)return 1;if(Te!==null&&Ue===null)return-1;if(Te!==null&&Ue!==null&&Te!==Ue)return Te-Ue}const K=ne.createTimeMs,Ne=oe.createTimeMs;return K!==null&&Ne!==null&&K!==Ne?Ne-K:K!==null&&Ne===null?-1:K===null&&Ne!==null?1:ne.prevIdx!==oe.prevIdx?ne.prevIdx-oe.prevIdx:ne.idx-oe.idx}),N.map(ne=>ne.r)},Ln=(d,v=[])=>{const T=v==null?void 0:v[d-1],z=v==null?void 0:v[d],F=ri(T==null?void 0:T.sort),N=ri(z==null?void 0:z.sort);let ne=null;F!==null&&N!==null&&N>F?ne=(F+N)/2:F!==null?ne=F+1:N!==null?ne=Math.max(N-1,0):ne=(d??0)+1;const oe=Number(ne.toFixed(6));return String(Number.isFinite(oe)?oe:ne)},Yo=async d=>{let v=null,T=null;if(d!=null&&d.id){const F=Pi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const N=await L.platformDownloadFile(d);v=URL.createObjectURL(N.data),T=no(d)}finally{F.close()}}else if(d!=null&&d.downloadUrl){const F=await fi(),N=Pi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ne=await Ka.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(()=>{N.close()}),oe=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(oe),T=d==null?void 0:d.name}else{const F=await L.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=li(d)):v=d==null?void 0:d.url}if(B(v)){const F={row:`${v}`,suffix:re(T)};Wn(F);return}const z={name:T,blobUrl:v};le.value=[z],Ta.value=!0},pi=async d=>{let v=null,T=null;if(d!=null&&d.id){const N=await L.platformDownloadFile(d);v=URL.createObjectURL(N.data),T=no(d)}else if(d!=null&&d.downloadUrl){const N=await fi(),ne=await Ka.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:N,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),oe=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(oe),T=d==null?void 0:d.name}else{const N=await L.platformDownloadFile({url:d==null?void 0:d.url});v=URL.createObjectURL(N.data),T=li(d)}const z={name:T,blobUrl:v},F=document.createElement("a");F.href=z.blobUrl,F.download=z.name,F.style.display="none",document.body.appendChild(F),F.click(),setTimeout(()=>{document.body.removeChild(F)},100)},Jo=(d,v)=>{var z;if(Object.values(v).length===0)return;let T=d;return Object.values(v).find(F=>{var N,ne,oe;return((N=F==null?void 0:F.toString())==null?void 0:N.includes(".txt"))||((ne=F==null?void 0:F.toString())==null?void 0:ne.includes(".cpt"))||((oe=F==null?void 0:F.toString())==null?void 0:oe.includes(".obj"))})?T=[...d,Me.value]:(z=u==null?void 0:u.config)!=null&&z.allowMove&&(T=[...d,{label:"迁移"}]),T},Ii=()=>{Y.value=!0},Xo=a.ref([]),Zo=async(d,v,T=!1)=>{var ne,oe,K,Ne;if(!d)return;if(T){Ce.value=[...qe.value.values()].filter(Te=>Object.values(Te).some(Ue=>typeof Ue=="string"?Ue==null?void 0:Ue.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let z={};for(let Te in d)(d==null?void 0:d[Te])!==""&&(z[Te]=d==null?void 0:d[Te]);if(JSON.stringify(z)==="{}"){Ce.value=Array.from(((ne=qe.value)==null?void 0:ne.values())??[]);return}let F=(oe=u==null?void 0:u.related)==null?void 0:oe.find(Te=>Te==null?void 0:Te.includes("content_")),N=await L.getFillFind({platId:parseInt((K=Al==null?void 0:Al.value)==null?void 0:K.plat_id),tableName:F,params:z});N=(Ne=N==null?void 0:N.data)==null?void 0:Ne.result,Ce.value=N,Fe.setTableLoading(!1)},to=async d=>{var T,z;if(!pe(u.config,{type:Qe.TABLE})||!d)return;((T=Array.from(c.value))==null?void 0:T.length)>0&&await zi();const v=d==null?void 0:d.id;v!=null&&(c.value.clear(),m.value.clear(),m.value.has(v)||m.value.set(v,L.cloneDeep(d)),Ce.value=(z=Ce.value)==null?void 0:z.map(F=>({...F,tableEditType:(F==null?void 0:F.id)===v?"edit":"text"})),c.value.add(v),zl.value=!0)},Kn=async(d,v,T,z)=>{z!=null&&z.isExistChild&&Se("clickMainKey",d,T,te.value)},Bn=()=>{Ta.value=!1},so=d=>{Se("rowClick",d)};a.watch(()=>u.changedContent,()=>{var T,z;if(!u.changedContent)return;let d=(T=Ce.value)==null?void 0:T.map(F=>{var N;return F.id===((N=u.changedContent)==null?void 0:N.id)&&(F={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete F.newId),F});const v=(z=u.itemData)==null?void 0:z.map(F=>((F==null?void 0:F.key)==="tableContents"&&(F.contents=d),F));Ce.value=d,Se("contentChange",{contents:v,index:u.index}),Se("change",{content:d,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const Oi=()=>{},Qo=async()=>{const d=Ge.value,v=sessionStorage.getItem("systemKey"),T=await me.getItemData(d,v,""),z=(T==null?void 0:T.find(oe=>(oe==null?void 0:oe.name)==="方法明细"))||(T==null?void 0:T[0]),F=(z==null?void 0:z.compData)||[],N=F==null?void 0:F.find(oe=>{const K=oe==null?void 0:oe.key;return K==="formContent"||K==="tableContents"});return N==null?void 0:N.contents},fi=async()=>{const v=Ka.Local.get("access-token");return v?`Bearer ${v}`:""},et=async(d,{token:v,inputData:T}={})=>await Ka.axios.post(d,T,{headers:{Authorization:v}}).catch(F=>(la.setImportLoading(!1),Promise.reject(F))),at=d=>{var z;let v={};const T=[];return v.form={},(z=L.cloneDeep(d))==null||z.forEach((F,N)=>{var ne,oe,K,Ne,Te,Ue,He,Ye,va,Fa,Wa,ca,Za,ka;if((F==null?void 0:F.comp)==="Table"){(oe=(ne=F==null?void 0:F.compData)==null?void 0:ne.find(ua=>(ua==null?void 0:ua.key)==="header"))==null||oe.contents;let Ua=(Te=(Ne=(K=F==null?void 0:F.compData)==null?void 0:K.find(ua=>(ua==null?void 0:ua.key)==="tableContents"))==null?void 0:Ne.contents)==null?void 0:Te.map(ua=>ua.slice(1));(Fa=(va=(Ye=(He=(Ue=F==null?void 0:F.compData)==null?void 0:Ue.find(ua=>(ua==null?void 0:ua.key)==="header"))==null?void 0:He.contents)==null?void 0:Ye[0])==null?void 0:va[0])==null||Fa.label;let ye=(ca=(Wa=F==null?void 0:F.compData)==null?void 0:Wa.find(ua=>(ua==null?void 0:ua.key)==="header"))==null?void 0:ca.contents,Ca=[];Ua==null||Ua.forEach(ua=>{let Ea=[];ua==null||ua.forEach((Da,A)=>{var Re;let X={};((Re=ye[A])==null?void 0:Re.label)!=="操作"&&(X[ye[A].label]=Da,Ea.push(X))}),Ca.push(Ea)}),v[F.name]=Ca}else{const Ua=(ka=(Za=F.compData)==null?void 0:Za.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:ka.contents;Ua==null||Ua.forEach(ye=>{var Ca,ua;if(ye.prop!==""){let Ea=ye==null?void 0:ye.value;Array.isArray(Ea)?Ea=((Ca=Ea==null?void 0:Ea[0])==null?void 0:Ca.oldUrl)||"http://222.92.178.198:62001/"+((ua=Ea==null?void 0:Ea[0])==null?void 0:ua.url):Ea=Ea.toString(),ye={key:(ye==null?void 0:ye.prop)??(ye==null?void 0:ye.label),value:Ea},T.push(ye)}})}}),v.form=me.getFormContents(T),v},lt=d=>{const v=[],T=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(T):v.push(z)};return T(d),v},rt=async(d,v,T)=>{var ye,Ca,ua,Ea,Da,A,X,Re,ra,_e,sa,Na,il,Ya,ul,pl,Pl;la.setImportLoading(!0),Fe.setFreshContent(!1);let z=await Qo().catch(Ga=>(la.setImportLoading(!1),Promise.reject(Ga)));z=z==null?void 0:z.filter(Ga=>{var vl;return((vl=Ga==null?void 0:Ga.find(Ha=>Ha==null?void 0:Ha.id))==null?void 0:vl.id)===(v==null?void 0:v.id)});let F=me.getEqualChild([(ye=te.value)==null?void 0:ye.filter(Ga=>(Ga==null?void 0:Ga.label)!=="操作")]);const N=(ua=(Ca=me.tableToForm(z,F))==null?void 0:Ca[0])==null?void 0:ua.find(Ga=>{const vl=Ga==null?void 0:Ga.key;return vl==="Interface"||vl==="方法体"}),ne=N==null?void 0:N.value;if(!ne){console.log("未搜索到isMain, 缺少算法执行接口"),la.setImportLoading(!1);return}const oe=te.value?me.getEqualChild([te.value]):[],K=oe.find(Ga=>{const vl=Ga==null?void 0:Ga.prop;return vl==="Input1"||vl==="输入数据.输入1"||vl==="样本输入数据"}),Ne=K==null?void 0:K.prop;let Te=v==null?void 0:v[Ne];const Ue=await fi().catch(Ga=>(la.setImportLoading(!1),Promise.reject(Ga)));let He=!0,Ye="";(Ea=te.value)==null||Ea.forEach(Ga=>{(Ga==null?void 0:Ga.prop)===Ne&&(He=!!(Ga!=null&&Ga.childPath),Ye=Ga==null?void 0:Ga.childPath)});let va="";if(He){let Ga=(A=(Da=te.value)==null?void 0:Da.find(cl=>(cl==null?void 0:cl.isMainKey)===!0))==null?void 0:A.prop;va=v==null?void 0:v[Ga];let vl=Ye==null?void 0:Ye.split(k),Ha=[];vl==null||vl.forEach((cl,xl)=>{(vl==null?void 0:vl.length)-1===xl&&Ha.push(va),Ha.push(cl)}),Ha=Ha==null?void 0:Ha[0];let sl=await me.getItemData(Ha,sessionStorage.getItem("systemKey"),""),Xa=sl==null?void 0:sl.filter(cl=>(cl==null?void 0:cl.name)===Ne);Xa=Xa==null?void 0:Xa.map(cl=>{var xl;return cl.compData=(xl=cl==null?void 0:cl.compData)==null?void 0:xl.map(Dl=>{var wr;return(Dl==null?void 0:Dl.key)==="tableContents"&&(Dl.contents=(wr=Dl==null?void 0:Dl.contents)==null?void 0:wr.filter($l=>($l==null?void 0:$l[1])===(v==null?void 0:v[Ne]))),Dl}),cl}),(!Xa||(Xa==null?void 0:Xa.length)===0)&&(Xa=sl,Xa=Xa==null?void 0:Xa.map(cl=>{var xl;return cl.compData=(xl=cl==null?void 0:cl.compData)==null?void 0:xl.map(Dl=>{var wr;return(Dl==null?void 0:Dl.key)==="tableContents"&&(Dl.contents=(wr=Dl==null?void 0:Dl.contents)==null?void 0:wr.filter($l=>{var yl,Tl;return($l==null?void 0:$l[1])===(v==null?void 0:v[(Tl=(yl=te==null?void 0:te.value)==null?void 0:yl[0])==null?void 0:Tl.prop])})),Dl}),cl})),Te=at(Xa)}const Fa=await et(ne,{token:Ue,inputData:Te}).catch(Ga=>(la.setImportLoading(!1),Promise.reject(Ga))),Wa=(X=Fa==null?void 0:Fa.data)==null?void 0:X.data,ca=oe.find(Ga=>(Ga==null?void 0:Ga.prop)==="Output1"),Za=ca==null?void 0:ca.prop;let ka=[],Ua=[];if(Wa&&((Re=Object.values(Wa))==null?void 0:Re.length)>0){let Ga=[];const vl=new FormData,Ha=(ra=lt(Wa))==null?void 0:ra.map(async Xa=>{var cl,xl;if(!Array.isArray(Xa)&&(Xa!=null&&Xa.includes("http"))){let Dl=await Ka.axios.get(Xa,{responseType:"blob"}),wr=(xl=Xa==null?void 0:Xa.split("/"))==null?void 0:xl[((cl=Xa==null?void 0:Xa.split("/"))==null?void 0:cl.length)-1];vl.append("files",Dl.data,wr)}else Ga.push(Xa)});if(await Promise.all(Ha),!me.isFormDataEmpty(vl)){let Xa=await Mu.uploadAmountApi(vl),cl=(sa=(_e=Xa==null?void 0:Xa.data)==null?void 0:_e.result)==null?void 0:sa.map(xl=>{var Dl,wr,$l,yl,Tl,Ql;return{name:(Ql=(Tl=(yl=(Dl=xl==null?void 0:xl.url)==null?void 0:Dl.split("/"))==null?void 0:yl[(($l=(wr=xl==null?void 0:xl.url)==null?void 0:wr.split("/"))==null?void 0:$l.length)-1])==null?void 0:Tl.split("."))==null?void 0:Ql[0],url:xl==null?void 0:xl.url}});Ga=[...Ga,...cl]}let sl={};for(let Xa in v)Xa!=="id"&&(sl[Xa]=v[Xa]);sl[Za]=Ga,Ua.push({id:v==null?void 0:v.id,value:{tableData:sl}})}if((Ua==null?void 0:Ua.length)>0){const Ga=Ua.map(Ha=>{const sl={id:Ha.id,...Ha.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(Ha=>Ha==null?void 0:Ha.includes("content")),tableContents:Ga}];await L.pageBatchUpdateApi({platId:parseInt((il=Al.value)==null?void 0:il.plat_id),changeContents:vl})}if((ka==null?void 0:ka.length)>0)try{await L.pageBatchAddApi({platId:parseInt((Ya=Al.value)==null?void 0:Ya.plat_id),changeContents:[{tableName:(ul=u==null?void 0:u.related)==null?void 0:ul.find(Ga=>Ga==null?void 0:Ga.includes("content")),tableContents:ka.map(Ga=>{var Ha,sl,Xa;const vl={id:((Ha=Ga==null?void 0:Ga.key)==null?void 0:Ha.id)??((sl=Ga==null?void 0:Ga.key)==null?void 0:sl.rowId)??(Ga==null?void 0:Ga.id),...((Xa=Ga==null?void 0:Ga.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(Ga){Ka.ElMessage.error(((Pl=(pl=Ga==null?void 0:Ga.response)==null?void 0:pl.data)==null?void 0:Pl.message)||(Ga==null?void 0:Ga.message)||"保存失败"),Fe.setTableLoading(!1);return}Ri(!0),la.setImportLoading(!1),Fe.setFreshContent(!0)},co=(d,v)=>(d=d==null?void 0:d.map(T=>{var z,F;return T!=null&&T.children&&((z=T.children)!=null&&z.find(N=>N.id===(v==null?void 0:v.id))?T.children=(F=T.children)==null?void 0:F.filter(N=>(N==null?void 0:N.id)!==(v==null?void 0:v.id)):T.children=co(T.children,v)),T}),d),hi=a.ref(!1),nt=()=>{hi.value=!0},it=async d=>{var T,z,F,N;hi.value=!1;const v=Array.isArray(d)?d:d?[d]:[];if(v.length!==0)for(const ne of v){const oe={name:ne.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(ne),raw:ne,uid:Date.now()+Math.random()};ia.value.push(oe),_l(oe,"uploading"),Ml(oe,0);try{const K=new FormData;K.append("file",ne,oe.name);const Ne=await L.platformUploadFile(K);oe.uploadResult=((T=Ne==null?void 0:Ne.data)==null?void 0:T.result)||{name:oe.name,url:"",fileName:oe.name},bl({name:((z=oe.uploadResult)==null?void 0:z.name)||oe.name,url:((F=oe.uploadResult)==null?void 0:F.url)||"",id:(N=oe.uploadResult)==null?void 0:N.id}),_l(oe,"uploaded"),Ml(oe,100)}catch(K){console.error("文件上传失败:",K),Ka.ElMessage.error(`文件 ${oe.name} 上传失败,请重试`),_l(oe,"pending"),Ml(oe,0);const Ne=ia.value.findIndex(Te=>Te.uid===oe.uid);Ne>-1&&ia.value.splice(Ne,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)"}]}),o=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:""}),f=()=>{o.show=!1},b=async d=>{var v,T,z,F,N,ne,oe,K;try{if(d==="cancel"&&(o.show=!1),d==="replace"&&((v=o==null?void 0:o.existRows)==null?void 0:v.length)>0){await L.pageBatchDeleteApi({platId:parseInt((T=Al.value)==null?void 0:T.plat_id),changeContents:[{tableName:((z=u==null?void 0:u.related)==null?void 0:z.find(Te=>Te==null?void 0:Te.includes("content_")))||((F=u==null?void 0:u.related)==null?void 0:F.find(Te=>Te==null?void 0:Te.includes("content"))),tableContents:o==null?void 0:o.existRows}]});const Ne=await L.pageBatchAddApi({platId:parseInt((N=Al.value)==null?void 0:N.plat_id),changeContents:[{tableName:(ne=u==null?void 0:u.related)==null?void 0:ne.find(Te=>Te==null?void 0:Te.includes("content")),tableContents:(()=>{const Te=(Ce.value||[]).filter(va=>!((o==null?void 0:o.existRows)||[]).some(Fa=>String(Fa==null?void 0:Fa.id)===String(va==null?void 0:va.id))),Ue=(o==null?void 0:o.tableData)||[],He=[];let Ye=Te.slice();return Ue.forEach(va=>{const Fa={...va};try{Fa.sort=Ln(0,Ye)}catch{}He.push(Fa),Ye.unshift(Fa)}),He.map((va,Fa)=>({id:Fa,...va}))})()}]});((oe=Ne==null?void 0:Ne.data)==null?void 0:oe.code)===200&&(await St({buttonName:"新增",columns:te.value,fixContent:(K=o==null?void 0:o.tableData)==null?void 0:K.map((Te,Ue)=>({id:Ue,...Te})),relatedContents:u==null?void 0:u.related}),Ka.ElMessage.success("数据导入替换成功"))}}catch{throw new Error(e)}finally{o.show=!1,o.columns=[],o.tableData=[],o.existRows=[]}},x=()=>{t.show=!1},I=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)&&(Se("change",{buttonName:"迁移",value:{from:t.from,to:t.to,data:t.selectRow}}),t.show=!1)},J=async d=>{var v,T,z,F;if(d){if(!yr.validateFileSize(d.raw)){Ka.ElMessage.warning(`文件大小不能超过 ${zr.value.maxSize}MB`);const N=ia.value.findIndex(ne=>ne.uid===d.uid);N>-1&&ia.value.splice(N,1),ee();return}if(!yr.validateFileType(d.raw)){Ka.ElMessage.warning("请上传图片文件");const N=ia.value.findIndex(ne=>ne.uid===d.uid);N>-1&&ia.value.splice(N,1),ee();return}_l(d,"uploading"),Ml(d,0);try{const N=new FormData;N.append("file",d.raw,d.name);const ne=await L.platformUploadFile(N);d.uploadResult=((v=ne==null?void 0:ne.data)==null?void 0:v.result)||{name:d.name,url:"",fileName:d.name},bl({name:((T=d.uploadResult)==null?void 0:T.name)||d.name,url:((z=d.uploadResult)==null?void 0:z.url)||"",id:(F=d.uploadResult)==null?void 0:F.id}),_l(d,"uploaded"),Ml(d,100)}catch(N){console.error("文件上传失败:",N),Ka.ElMessage.error(`文件 ${d.name} 上传失败,请重试`),_l(d,"pending"),Ml(d,0);const ne=ia.value.findIndex(oe=>oe.uid===d.uid);ne>-1&&ia.value.splice(ne,1)}finally{ee()}}},ee=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');d&&(d.value="")})},xe=async()=>{var T,z;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),ia.value.length===0){Ka.ElMessage.warning("请先选择要上传的图片");return}if(ia.value.filter(F=>{const N=rl(F);return N!=="uploaded"&&N!=="completed"&&N!=="failed"}).length>0){Ka.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ol.value=!0,de.value=0;let v=null;try{ia.value.forEach(ca=>{_l(ca,"processing")});const F=Math.floor(Math.random()*10)+90;v=setInterval(()=>{de.value<F?de.value+=1:clearInterval(v)},50);const N=ia.value.map(ca=>{var Za,ka,Ua;return{name:((Za=ca.uploadResult)==null?void 0:Za.name)||ca.name,url:((ka=ca.uploadResult)==null?void 0:ka.url)||"",fileName:((Ua=ca.uploadResult)==null?void 0:Ua.fileName)||ca.name}}),ne=yr.extractTableHeaders(te.value),oe=N.map(ca=>({name:(ca==null?void 0:ca.fileName)||(ca==null?void 0:ca.name),url:(ca==null?void 0:ca.url)||""})),K=await yr.recognize(oe,ne);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)){de.value=0,ia.value.forEach(ca=>{_l(ca,"failed"),Ml(ca,0)}),Ka.ElMessage.error((K==null?void 0:K.message)||"OCR识别失败,请重试"),ol.value=!1;return}de.value=F;const Ne=Array.isArray(K==null?void 0:K.result)?K.result:[];if(Ne.length===0){de.value=0,ia.value.forEach(ca=>{_l(ca,"failed"),Ml(ca,0)}),Ka.ElMessage.warning("OCR识别未返回有效数据"),ol.value=!1;return}const Te=new Set,Ue=[];Ne.forEach((ca,Za)=>{const ka=ca!=null&&ca.数据&&typeof(ca==null?void 0:ca.数据)=="object"?ca.数据:{},Ua=Array.isArray(ca==null?void 0:ca.图片信息)?ca.图片信息:[],ye=new Map;Ua.forEach(ua=>{ua!=null&&ua.name&&ye.set(ua.name,ua.url||"")});const Ca={_index:Za,_certType:(ca==null?void 0:ca.证书类型)||"",_certNo:(ca==null?void 0:ca.证书编号)||"",_ocrImages:Ua,__ocrFieldMeta:{}};Object.entries(ka).forEach(([ua,Ea])=>{let Da="",A=0,X=[],Re="";Ea&&typeof Ea=="object"&&!Array.isArray(Ea)?(Da=(Ea==null?void 0:Ea.value)??"",A=(Ea==null?void 0:Ea.score)??0,X=Array.isArray(Ea==null?void 0:Ea.bboxNorm)?Ea==null?void 0:Ea.bboxNorm:[],Re=(Ea==null?void 0:Ea.imageName)||""):Array.isArray(Ea)&&Ea.length>=2?(Da=Ea[0]??"",A=Ea[1]??0):(Da=Ea??"",A=0),Ca[ua]=Da,Ca[`${ua}_accuracy`]=A,Te.add(ua),Ca.__ocrFieldMeta[ua]={value:Da,score:A,bboxNorm:X,imageName:Re,imageUrl:Re&&ye.get(Re)||"",images:Ua}}),Ue.push(Ca)});const He=[],Ye=new Set;Ue.forEach(ca=>{ca&&Te.forEach(Za=>{const ka=ca[`${Za}_accuracy`];(typeof ka=="number"?ka>0:ka!=null&&String(ka).trim()!==""&&String(ka)!=="0")&&Ye.add(Za)})}),Te.forEach(ca=>{He.push({prop:ca,label:ca,editable:!0,minWidth:230}),Ye.has(ca)&&He.push({prop:`${ca}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),ia.value.forEach(ca=>{_l(ca,"completed")}),de.value=100,ea.value=He,pa.value=Ue,dl.value=N,Ve.value=K;const va=["出厂编号","设备名称","制造厂"],Fa=He.filter(ca=>ca&&!ca.isAccuracy&&typeof ca.prop=="string").map(ca=>ca.prop),Wa=["出厂编号","设备名称","制造厂"];Va.value=Fa.filter(ca=>Wa.includes(ca)),console.log("[OCR] 默认勾选字段 props:",Va.value),be.value=2,ol.value=!1,wa.value=!1}catch(F){console.error("OCR处理失败:",F),v&&(clearInterval(v),v=null),Ka.ElMessage.error(((z=(T=F==null?void 0:F.response)==null?void 0:T.data)==null?void 0:z.message)||"OCR识别失败,请重试"),ol.value=!1,de.value=0,ia.value.forEach(N=>{_l(N,"pending"),Ml(N,0)})}},je=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},Be=()=>{var ca,Za;const d=dl.value,v=Ve.value,T=pa.value;if(!T||T.length===0){Ka.ElMessage.warning("暂无数据可添加");return}const z=(ca=me.getAllLeafNodes(te.value)||[])==null?void 0:ca.filter(ka=>(ka==null?void 0:ka.type)!=="operate"&&(ka==null?void 0:ka.label)!=="操作"&&(ka==null?void 0:ka.prop)!=="operate"),F=new Map,N=new Map,ne=(Za=z==null?void 0:z.find(ka=>(ka==null?void 0:ka.label)==="证书附件"))==null?void 0:Za.prop;z==null||z.forEach(ka=>{ka!=null&&ka.label&&(ka!=null&&ka.prop)&&(F.set(ka.label,ka.prop),N.set(ka.prop,ka.label))});const oe=Date.now(),K=ka=>String(oe*1e3+ka),Ne=[],Te=[],Ue=ka=>{const Ua=To&&To[ka]||[ka];for(const ye of Ua){const Ca=F.get(ye);if(Ca)return Ca}return""},He=Ue("出厂编号"),Ye=Ue("设备名称"),va=Ue("制造厂"),Fa=[],Wa=ka=>{var Da,A;if(!ne)return[];const Ua=(Array.isArray(d)?d[ka]:null)||null,ye=(Ua==null?void 0:Ua.url)||"",Ca=(Ua==null?void 0:Ua.fileName)||(Ua==null?void 0:Ua.name)||"";return(String(Ca).toLowerCase().endsWith(".pdf")||String(ye).toLowerCase().endsWith(".pdf"))&&ye?[{url:ye,name:Ca,fileName:Ca}]:(Array.isArray((A=(Da=v==null?void 0:v.result)==null?void 0:Da[ka])==null?void 0:A.图片信息)?v.result[ka].图片信息:[]).map(X=>({url:(X==null?void 0:X.url)||"",name:(X==null?void 0:X.name)||"",fileName:(X==null?void 0:X.name)||""})).filter(X=>X.url)};if(T.forEach((ka,Ua)=>{var il;const ye={id:K(Ua),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[Ya,ul]of F.entries())Object.prototype.hasOwnProperty.call(ka,Ya)&&(ye[ul]=ka[Ya]);ne&&(ye[ne]=Wa(Ua));const Ca=(Array.isArray(v==null?void 0:v.result)?v.result[Ua]:null)||null,ua=(Array.isArray(d)?d[Ua]:null)||null,Ea=(ua==null?void 0:ua.url)||"",Da=(ua==null?void 0:ua.fileName)||(ua==null?void 0:ua.name)||"",A=String(Da).toLowerCase().endsWith(".pdf")||String(Ea).toLowerCase().endsWith(".pdf"),X={ts:Date.now(),versionId:String(Date.now())+"_"+String(Ua),label:new Date().toLocaleString(),certType:(Ca==null?void 0:Ca.证书类型)||"",certNo:(Ca==null?void 0:Ca.证书编号)||"",fileType:A?"pdf":"image",sourceUrl:A?Ea:"",images:Array.isArray(Ca==null?void 0:Ca.图片信息)?Ca.图片信息.map(Ya=>({name:(Ya==null?void 0:Ya.name)||"",url:(Ya==null?void 0:Ya.url)||""})).filter(Ya=>Ya.url):[]},Re=Ya=>je(Ya?ye==null?void 0:ye[Ya]:""),ra=Re(He),_e=Re(Ye),sa=Re(va);if(!!(He&&Ye&&va&&ra&&_e&&sa)){const Ya=(Ce.value||[]).find(ul=>{const pl=je(He?ul==null?void 0:ul[He]:""),Pl=je(Ye?ul==null?void 0:ul[Ye]:""),Ga=je(va?ul==null?void 0:ul[va]:"");return pl&&Pl&&Ga&&pl===ra&&Pl===_e&&Ga===sa});if(Ya){Fa.push({idx:Ua,ocrRow:ye,versionItem:X,ocrNo:ra,candidates:[Ya],selectedTargetId:String((Ya==null?void 0:Ya.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(ra&&He){const Ya=(Ce.value||[]).filter(ul=>{const pl=je(He?ul==null?void 0:ul[He]:"");return pl&&pl===ra});if(Ya.length>0){Fa.push({idx:Ua,ocrRow:ye,versionItem:X,ocrNo:ra,candidates:Ya,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ye.sort===void 0||ye.sort===null||String(ye.sort).trim()===""){const Ya=(Ce.value||[]).map(pl=>ri(pl==null?void 0:pl.sort)).filter(pl=>pl!==null),ul=Ya.length>0?Math.max(...Ya):((il=Ce.value)==null?void 0:il.length)??0;ye.sort=String(Number((ul+1).toFixed(6)))}}catch{}Il(u==null?void 0:u.index,ye.id,X),Fa.push({idx:Ua,ocrRow:ye,versionItem:X,ocrNo:ra,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Fa||[]).length>0){Gl.value=(Fa||[]).map(ka=>({...ka,selectedTargetId:(ka==null?void 0:ka.selectedTargetId)||""})),Ol.value=!0,Hl.value=Te,Zl.value=Ne,Sr.value=v,Fl.value=d,fr.value=ne||"";return}},aa=(d,v,T)=>{pa.value[d]&&(pa.value[d][v]=T)},Ba=d=>d==null||d===0?"-":`${(Number(d)*100).toFixed(1)}%`,el=d=>{if(d==null||d===0)return"#909399";const v=Number(d);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},Ja=d=>{var T,z,F,N;if(_a.value===d){_a.value=null,za.value=!1,tl.value="";return}_a.value=d,tl.value="";const v=(T=pa.value)==null?void 0:T[d];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){Ie.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 ne=v.__ocrFieldMeta||{},oe=(z=Object.values(ne))==null?void 0:z.find(K=>K==null?void 0:K.imageName);El.value=(oe==null?void 0:oe.imageName)||((N=(F=Ie.value)==null?void 0:F[0])==null?void 0:N.name)||"",za.value=Ie.value.length>0}else Ie.value=[],za.value=!1,El.value=""},ll=()=>{al.value=!1,ia.value=[],ja.value=null,be.value=1,ga.value.clear(),Le.value.clear(),de.value=0,za.value=!1},kl=d=>d.raw?URL.createObjectURL(d.raw):d.url?d.url:"",rl=d=>{const v=d.uid||d.name;return ga.value.get(v)||"pending"},Cl=d=>{const v=d.uid||d.name;return Le.value.get(v)||0},Ml=(d,v)=>{const T=d.uid||d.name;Le.value.set(T,Math.min(100,Math.max(0,v)))},lr=d=>{const v=rl(d),T=100.53;if(v==="completed"||v==="uploaded")return`${T} ${T}`;if(v==="failed")return`${T} ${T}`;if(v==="uploading"){const z=Cl(d);return`${T*(z/100)} ${T}`}else if(v==="processing")return`${T*.5} ${T}`;return`0 ${T}`},_l=(d,v)=>{const T=d.uid||d.name;ga.value.set(T,v),(v==="completed"||v==="uploaded")&&Ml(d,100)},Wl=()=>{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 z=Array.from(T.target.files||[]);for(const F of z){const N={name:F.name,raw:F,uid:Date.now()+Math.random()};ia.value.push(N),await J(N)}T.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},Hr=()=>{be.value>1&&be.value--},Er=()=>{be.value===1?ia.value.length>0&&!ol.value&&xe():be.value===2&&(Be(),be.value=3)},Jr=async d=>{await vn(d==null?void 0:d.row)},sn=async({row:d,prop:v})=>{!d||!v||await vn(d,v)},vn=async(d,v)=>{var F,N;const T=d==null?void 0:d.id;if(!T){Ka.ElMessage.warning("暂无可预览数据");return}let z=qa(u==null?void 0:u.index,T);if(!z||z.length===0){const ne=sessionStorage.getItem("ocr_root_table_id"),oe=ne!==null?Number(ne):null;if(oe!=null&&oe!==""&&!Number.isNaN(oe)){const K=qa(oe,T);Array.isArray(K)&&K.length>0&&(Rl(u==null?void 0:u.index,T,K),z=K)}}if(!z||z.length===0){const ne=(F=me.getAllLeafNodes(te.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"),oe=v||((N=ne==null?void 0:ne.find(K=>(K==null?void 0:K.label)==="证书附件"))==null?void 0:N.prop);if(oe&&d[oe]){const K=d[oe];let Ne=[],Te="",Ue=!1;if(typeof K=="string")try{const He=JSON.parse(K);Array.isArray(He)&&(Ne=He.map(Ye=>({name:(Ye==null?void 0:Ye.name)||(Ye==null?void 0:Ye.fileName)||"",url:(Ye==null?void 0:Ye.url)||""})).filter(Ye=>Ye.url||Ye.name),Ne.length>0&&(Te=Ne[0].url||"",Ue=String(Ne[0].name).toLowerCase().endsWith(".pdf")||String(Te).toLowerCase().endsWith(".pdf")))}catch{Te=K,Ue=String(K).toLowerCase().endsWith(".pdf"),Ne=[{name:K,url:K}]}else Array.isArray(K)&&(Ne=K.map(He=>({name:(He==null?void 0:He.name)||(He==null?void 0:He.fileName)||"",url:(He==null?void 0:He.url)||""})).filter(He=>He.url||He.name),Ne.length>0&&(Te=Ne[0].url||"",Ue=String(Ne[0].name).toLowerCase().endsWith(".pdf")||String(Te).toLowerCase().endsWith(".pdf")));if(Ne.length>0||Te){const He={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:d.证书类型||"",certNo:d.证书编号||"",fileType:Ue?"pdf":"image",sourceUrl:Ue?Te:"",images:Ne};z=[He],Il(u==null?void 0:u.index,T,He)}}}if(!z||z.length===0){Ka.ElMessage.warning("暂无可预览数据");return}Ra.value=z,Oa.value=!0},vi=d=>{ia.value=ia.value.filter((v,T)=>T!==d)},$n=async(d,v,T)=>{var z,F,N,ne,oe,K,Ne,Te,Ue,He,Ye,va,Fa,Wa,ca,Za,ka,Ua,ye,Ca,ua;if(pe(u.config,{type:Qe.TABLE,tableOperate:d})){if(Ia.value="",ba.value=!0,Aa.value=!0,Se("onButtonClick",d,v),R.value=[],d==="删除")fn.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ea,Da,A,X;(Ea=Ce.value)!=null&&Ea.find(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id))?Ce.value=(Da=L.cloneDeep(Ce.value))==null?void 0:Da.filter(Re=>(Re==null?void 0:Re.id)!==(v==null?void 0:v.id)):Ce.value=co(L.cloneDeep(Ce.value),v);try{v!=null&&v.id&&((X=(A=qe.value)==null?void 0:A.has)!=null&&X.call(A,v==null?void 0:v.id))&&qe.value.delete(v.id)}catch{}zf(Yr.value,gn.value,v==null?void 0:v.id),Fe.setTableLoading(u==null?void 0:u.index),Se("change",{content:Ce.value,fixContent:[v],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:d,columns:te.value,relatedContents:u==null?void 0:u.related}),console.log(v,"item")});else if(d==="批量删除"){if(((z=ur.value)==null?void 0:z.length)===0)return Ka.ElMessage.warning("请先勾选操作的数据");fn.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var A,X,Re,ra,_e;const Ea=(A=ur.value)==null?void 0:A.map(sa=>sa.id);Ce.value=(X=L.cloneDeep(Ce.value))==null?void 0:X.filter(sa=>!(Ea!=null&&Ea.includes(sa.id))),Fe.setTableLoading(u==null?void 0:u.index),Se("change",{content:Ce.value,fixContent:ur.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:te.value});const Da=(Ea||[]).filter(Boolean);if(Da.length>0&&Da.every(sa=>sa!=null&&sa!=="")){const sa=(ur.value||[]).map(Na=>{const il={...Na};return delete il._isOCRRow,delete il._ocrTableId,delete il._isTemp,delete il.tableEditType,delete il.index,il});await L.pageBatchDeleteApi({platId:parseInt((Re=Al.value)==null?void 0:Re.plat_id),changeContents:[{tableName:((ra=u==null?void 0:u.related)==null?void 0:ra.find(Na=>Na==null?void 0:Na.includes("content_")))||((_e=u==null?void 0:u.related)==null?void 0:_e.find(Na=>Na==null?void 0:Na.includes("content"))),tableContents:sa}]})}})}else if(d==="复制新增"){ue.value="复制新增",L.cloneDeep(v);const Ea=(F=te.value)==null?void 0:F.find(Da=>Da==null?void 0:Da.isMainKey);Ea||((N=te.value)==null||N[0]),ir.value=v,Ri(!0)}else if(d==="新增")ue.value="新增",Li(""),U.value=!0;else if(d==="编辑")ue.value="编辑",Li(v),U.value=!0;else if(d==="查看")ue.value="查看",Li(v),ba.value=!1,Aa.value=!1,U.value=!0;else if(d==="查看三维模型"){const Ea={};for(let A in v)A!=="id"&&(Ea[A]=v[A]);let Da=(ne=Object.values(Ea))==null?void 0:ne[1];ze.setTableShowThree(Da)}else if(d==="切换视图")gu();else if(((oe=T==null?void 0:T.extra)==null?void 0:oe.type)==="modelExample")ue.value=d,we.value=!0;else if(d==="新建"){let Ea=he.value,Da=[];for(let _e in Ea)_e!=null&&_e.includes(`loading${((K=Al.value)==null?void 0:K.account)||((Ne=Al.value)==null?void 0:Ne.账号)}`)&&(Da=[...Da,..._e]);let A=[];for(let _e in Ea)_e!=null&&_e.includes(`updateLoading${((Te=Al.value)==null?void 0:Te.account)||((Ue=Al.value)==null?void 0:Ue.账号)}`)&&(A=[...A,..._e]);let X=Da==null?void 0:Da.map(_e=>_e==null?void 0:_e.id);const Re=A==null?void 0:A.map(_e=>_e==null?void 0:_e.id);X=[...L.cloneDeep(X),...Re],(X==null?void 0:X.length)>0&&(X!=null&&X.every(_e=>_e!==null&&_e))&&await Nr.batchDeleteInsofDataApi({ids:X});const ra=(He=$e.value)==null?void 0:He.find(_e=>(_e==null?void 0:_e.label)==="新建");await cu(!1,ra)}else if(d==="修改模板"){let Ea=L.cloneDeep(Ge).value;Fe.setRouteToChildPath(Ea),la.setActiveMenuPath(Ea+k)}else if(d==="执行")rt(d,v);else if(d==="导出paraform"){const Ea=Pi.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Da=["推力","真空","压力","温度","流量"],A=yl=>{var Tl,Ql,Bl;return yl?typeof(yl==null?void 0:yl.value)=="string"?yl.value:((Bl=(Ql=(Tl=yl==null?void 0:yl._custom)==null?void 0:Tl.value)==null?void 0:Ql.value)==null?void 0:Bl.value)||"":""},X=Array.isArray(on.value)?on.value:[],Re=A(X.find(yl=>(yl==null?void 0:yl.condition)==="child")),ra=String(Re||"").slice(0,8),_e=yl=>{if(yl==null)return"";const Tl=String(yl).trim();if(!Tl)return"";if(/^\d{8}$/.test(Tl))return Tl;const Ql=Tl.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Ql){const Jl=Ql[1],or=Ql[2].padStart(2,"0"),Kl=Ql[3].padStart(2,"0");return`${Jl}${or}${Kl}`}const Bl=Tl.replace(/\D/g,"");return Bl.length>=8?Bl.slice(0,8):""},sa=async yl=>{var Tl,Ql;if(!yl)return"";try{const Bl=await Kr("试验任务/任务管理",!1),Jl=(vr,dr=[])=>{if(!Array.isArray(vr))return dr;for(const pr of vr)(pr==null?void 0:pr.comp)==="Table"&&(pr!=null&&pr.name)&&dr.push(pr),Array.isArray(pr==null?void 0:pr.children)&&Jl(pr.children,dr),Array.isArray(pr==null?void 0:pr.tab)&&Jl(pr.tab,dr),Array.isArray(pr==null?void 0:pr.choice)&&Jl(pr.choice,dr);return dr},Kl=Jl(Bl||[]).find(vr=>(vr==null?void 0:vr.name)==="任务列表"),hr=((Ql=(Tl=Kl==null?void 0:Kl.compData)==null?void 0:Tl.find(vr=>(vr==null?void 0:vr.key)==="tableContents"))==null?void 0:Ql.contents)||[];if(!Array.isArray(hr)||hr.length===0)return"";const qr=hr.find(vr=>String((vr==null?void 0:vr["试验代号(名称)"])||"").slice(0,8)===yl);return _e(qr==null?void 0:qr.计划试验时间)}catch(Bl){return console.warn("获取任务列表计划试验时间失败:",Bl),""}},Na=(Ge.value||"").replace(/\/+$/,""),il=Re?`${Na}/${Re}`:Na,Ya=await Kr(il||Ge.value,!1),ul=String(ha.value||"").trim(),pl=yl=>String(yl||"").trim(),Pl=(yl,Tl=[],Ql="")=>{if(!Array.isArray(yl))return Tl;for(const Bl of yl){const Jl=pl((Bl==null?void 0:Bl.choiceName)||(Bl==null?void 0:Bl.name0)||Ql);(Bl==null?void 0:Bl.comp)==="Table"&&(Bl==null?void 0:Bl.name)&&Da.includes(Bl.name)&&(!ul||Jl===ul)&&Tl.push(Bl),Array.isArray(Bl==null?void 0:Bl.children)&&Pl(Bl.children,Tl,Jl),Array.isArray(Bl==null?void 0:Bl.tab)&&Pl(Bl.tab,Tl,Jl),Array.isArray(Bl==null?void 0:Bl.choice)&&Pl(Bl.choice,Tl,Jl)}return Tl},Ga=Pl(Ya||[]),vl=new Map;for(const yl of Ga)yl!=null&&yl.name&&!vl.has(yl.name)&&vl.set(yl.name,yl);const Ha=Da.map(yl=>vl.get(yl)).filter(Boolean);if(!Ha||Ha.length===0)return Ka.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const sl=yl=>{const Tl=new Map,Ql=(Bl,Jl=[])=>{if(Array.isArray(Bl))for(const or of Bl){const Kl=((or==null?void 0:or.label)??"").toString().trim(),hr=Kl?[...Jl,Kl]:[...Jl];if(Array.isArray(or==null?void 0:or.children)&&or.children.length>0)Ql(or.children,hr);else{const vr=((or==null?void 0:or.prop)??"").toString();if(!vr)continue;const dr=Kl||vr,pr=(hr.length>0?[...Jl,dr]:[dr]).join(".");Tl.set(vr,pr)}}};return Ql(yl,[]),Tl},Xa=(yl,Tl)=>{const Ql=sl(yl||[]),Jl=(me.getAllLeafNodes(yl||[])||[]).filter(Kl=>(Kl==null?void 0:Kl.prop)&&(Kl==null?void 0:Kl.type)!=="operate"&&(Kl==null?void 0:Kl.label)!=="操作"&&(Kl==null?void 0:Kl.prop)!=="operate"),or=Array.isArray(Tl)?Tl:[];return or.length===0?[]:or.map(Kl=>{const hr={};return Jl.forEach(qr=>{const vr=String(qr.prop),dr=Ql.get(vr)||String(qr.label||qr.prop);hr[dr]=(Kl==null?void 0:Kl[vr])??""}),hr})},cl=Ha.map(yl=>{var or,Kl;const Tl=(yl==null?void 0:yl.compData)||[];let Ql=(or=Tl==null?void 0:Tl.find(hr=>(hr==null?void 0:hr.key)==="header"))==null?void 0:or.contents;Array.isArray(Ql==null?void 0:Ql[0])&&(Ql=Ql[0]);const Bl=((Kl=Tl==null?void 0:Tl.find(hr=>(hr==null?void 0:hr.key)==="tableContents"))==null?void 0:Kl.contents)||[];if(!Array.isArray(Ql)||Ql.length===0||!Array.isArray(Bl)||Bl.length===0)return null;const Jl=Xa(Ql||[],Bl||[]);return!Array.isArray(Jl)||Jl.length===0?null:{类型:yl==null?void 0:yl.name,数据:Jl}}).filter(Boolean);if(!cl||cl.length===0)return Ka.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const xl=await sa(ra),Dl={试验代号:ra,试验日期:xl,ParaForm:cl},wr=await fi().catch(()=>""),$l=await L.exportParaformApi(Dl,wr);if(((Ye=$l==null?void 0:$l.data)==null?void 0:Ye.code)===200&&((Fa=(va=$l==null?void 0:$l.data)==null?void 0:va.result)!=null&&Fa.Excel文件)){const yl=$l.data.result.Excel文件,Tl=await L.platformDownloadFile({url:yl}),Ql=new Blob([Tl.data],{type:"application/vnd.ms-excel"}),Bl=URL.createObjectURL(Ql),Jl=Pn.dayjs().format("YYYYMMDD"),Kl=`${(ra||"UNKNOWN").trim()||"UNKNOWN"}_${Jl}_paraform.xls`,hr=document.createElement("a");hr.href=Bl,hr.download=Kl,hr.style.display="none",document.body.appendChild(hr),hr.click(),setTimeout(()=>{document.body.removeChild(hr),URL.revokeObjectURL(Bl)},100);const qr=Array.isArray((ca=(Wa=$l==null?void 0:$l.data)==null?void 0:Wa.result)==null?void 0:ca.warnings)?$l.data.result.warnings:[];if(qr.length>0){const vr=qr.map((dr,pr)=>`${pr+1}. ${(dr==null?void 0:dr.field)||"未知字段"}:${(dr==null?void 0:dr.message)||""}`).join(`
24
- `);Ka.ElMessage.warning({message:`导出成功,但存在以下提示:
25
- ${vr}`,duration:5e3,showClose:!0})}else Ka.ElMessage.success("导出成功")}else Ka.ElMessage.error(((Za=$l==null?void 0:$l.data)==null?void 0:Za.message)||"导出失败")}catch(Da){console.error("导出paraform失败:",Da),Ka.ElMessage.error("导出失败:"+((Da==null?void 0:Da.message)||"未知错误"))}finally{Ea.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ka=ur.value)==null?void 0:ka.length)===0)return Ka.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((Ua=Ce.value)==null?void 0:Ua.length)===0)return Ka.ElMessage.warning("暂无数据导出");let Ea=["序号",...(Ca=(ye=te.value)==null?void 0:ye.map(Re=>Re==null?void 0:Re.prop))==null?void 0:Ca.filter(Re=>Re!=="操作")],Da=d==="导出全部"?Ce.value:ur.value;const A=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Da=Da==null?void 0:Da.map(Re=>Object.fromEntries(Object.entries(Re).filter(([ra])=>!A.includes(ra)))),Ea=["序号",...Ea],Da=Da==null?void 0:Da.map((Re,ra)=>({序号:ra+1,...Re}));let X=(u==null?void 0:u.compName)||"表格信息";jo(Da,X,Ea,X)}else if(d==="OCR识别")al.value=!0,ia.value=[],be.value=1,ga.value.clear(),Le.value.clear(),de.value=0;else if(d==="迁移")t.selectRow=v,t.show=!0;else if(d==="生成方法"){let Ea=await Jf(v),Da;v!==""?Da=[v]:Da=L.cloneDeep(Ce.value),Da=Da==null?void 0:Da.map(X=>(X.输出值=Ea,X));const A={fixContent:Da,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:te.value,name:u==null?void 0:u.groupNames};Se("change",A)}else if(((ua=T==null?void 0:T.extra)==null?void 0:ua.type)==="methodButton"){let Ea;v!==""?Ea=[v]:Ea=L.cloneDeep(Ce.value);const A={fixContent:await gt(Ea,te==null?void 0:te.value,"Manual",Ce.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:te.value,name:u==null?void 0:u.groupNames};Se("change",A)}}},tu=async(d,v)=>{var T,z,F,N,ne,oe,K,Ne,Te,Ue,He,Ye,va,Fa,Wa,ca,Za,ka,Ua,ye;try{let Ca,ua;const Ea=(T=he.value[Ge.value+k])==null?void 0:T.filter(Na=>{var il;return((il=Na==null?void 0:Na.key)==null?void 0:il.type)==="structureMethod"}),Da=(z=he.value[Ge.value+k])==null?void 0:z.filter(Na=>{var il;return((il=Na==null?void 0:Na.key)==null?void 0:il.type)==="structure"}),A=Ea==null?void 0:Ea.find(Na=>{var il,Ya;return((Ya=(il=Na==null?void 0:Na.value)==null?void 0:il.pageData)==null?void 0:Ya.method)==="保存"});if(!A)return;const X=(oe=(ne=he.value[(N=(F=A==null?void 0:A.value)==null?void 0:F.pageData)==null?void 0:N.path])==null?void 0:ne.filter(Na=>{var il;return((il=Na==null?void 0:Na.key)==null?void 0:il.type)==="data"}))==null?void 0:oe.find(Na=>{var il,Ya,ul,pl;return((Ya=(il=Na==null?void 0:Na.value)==null?void 0:il.tableData)==null?void 0:Ya.算法名称)===((pl=(ul=A==null?void 0:A.value)==null?void 0:ul.pageData)==null?void 0:pl.method)});if(!X)return;const Re={buttonName:(Ne=(K=A==null?void 0:A.value)==null?void 0:K.pageData)==null?void 0:Ne.method,api:(Ue=(Te=X==null?void 0:X.value)==null?void 0:Te.tableData)==null?void 0:Ue.算法体,content:Da==null?void 0:Da.map(Na=>{var il;return(il=Na==null?void 0:Na.value)==null?void 0:il.pageData}),extraContent:[],extraValues:(Ye=(He=A==null?void 0:A.value)==null?void 0:He.pageData)==null?void 0:Ye.data,methodName:(Fa=(va=A==null?void 0:A.value)==null?void 0:va.pageData)==null?void 0:Fa.path};if(!d)return;const ra={...d,compData:(Wa=d==null?void 0:d.compData)==null?void 0:Wa.map(Na=>{var il;return(Na==null?void 0:Na.key)==="formContent"?{...Na,contents:(il=Na==null?void 0:Na.contents)==null?void 0:il.map(Ya=>(Ya==null?void 0:Ya.prop)===v?{...Ya,value:""}:Ya)}:Na})},_e={key:{pageKey:Ge.value+k,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ra}},sa=await Ka.axios.post(Re.api,_e,{headers:{"Content-Type":"application/json"}});return((ca=sa==null?void 0:sa.data)==null?void 0:ca.code)===200&&(Ca=(ka=(Za=sa==null?void 0:sa.data)==null?void 0:Za.result)==null?void 0:ka.latestReportCode,ua=(ye=(Ua=sa==null?void 0:sa.data)==null?void 0:Ua.result)==null?void 0:ye.status),{newMainKeyValue:Ca,newStatus:ua}}catch(Ca){throw Ka.ElMessage.error(Ca),new Error(Ca)}},Mt=a.reactive({prop:"状态",value:""});a.ref(["系统自动生成信息","审批意见"]);const su=async(d,v,T)=>{var K,Ne;let z=d==null?void 0:d[v==null?void 0:v.prop],F=1,N,ne;const oe=L.cloneDeep(Ge).value+k+z;if(oe){Mt.value="",N=(K=he.value[oe])==null?void 0:K.filter(He=>{var Ye;return((Ye=He==null?void 0:He.key)==null?void 0:Ye.type)==="structure"});const Te=N==null?void 0:N.find(He=>{var Ye,va,Fa;return((Fa=(va=(Ye=He==null?void 0:He.value)==null?void 0:Ye.pageData)==null?void 0:va.comp)==null?void 0:Fa.toUpperCase())==="FORM"});ne={...(Ne=Te==null?void 0:Te.value)==null?void 0:Ne.pageData,id:Te==null?void 0:Te.id};const Ue=await tu(ne,v==null?void 0:v.prop);if(Mt.value=Ue==null?void 0:Ue.newStatus,Ue!=null&&Ue.newMainKeyValue)return Ue==null?void 0:Ue.newMainKeyValue}if(Ce.value.some(Te=>(Te==null?void 0:Te[v==null?void 0:v.prop])===z)){const Te=z;for(;Ce.value.some(Ue=>(Ue==null?void 0:Ue[v==null?void 0:v.prop])===`${Te}(${F})`);)F++;z=`${Te}(${F})`}return z},cu=async(d,v,T)=>{var N,ne,oe,K;let z,F;if(await su(T==null?void 0:T.data,T==null?void 0:T.firstCol),z=L.cloneDeep(Ge).value+k,F=L.cloneDeep(z)+`loading${((N=Al.value)==null?void 0:N.account)||((ne=Al.value)==null?void 0:ne.账号)}`,v){const Ne=(K=(oe=he.value[F])==null?void 0:oe.filter(Te=>{var Ue;return((Ue=Te==null?void 0:Te.key)==null?void 0:Ue.parentTable)===""}))==null?void 0:K.map(Te=>{var Ue;return{id:Te==null?void 0:Te.id,...(Ue=Te==null?void 0:Te.value)==null?void 0:Ue.pageData}});(Ne==null?void 0:Ne.length)>0||await me.loadingConstruct(z,F,null,null,null),Fe.setRouteToChildPath(L.cloneDeep(Ge).value),la.setActiveMenuPath(F)}else Fe.setRouteToChildPath(L.cloneDeep(Ge).value),la.setActiveMenuPath(F)},uu=()=>{De.value=!1,Pa.value=[],Pe.value=!1},Li=d=>{var N,ne,oe,K,Ne,Te,Ue,He,Ye,va,Fa,Wa,ca,Za,ka,Ua,ye,Ca,ua,Ea,Da;const v=[];se.value=L.cloneDeep(te.value),(ne=me.getColumnChild((N=L.cloneDeep(te.value))==null?void 0:N.filter(A=>(A==null?void 0:A.label)!=="操作")))==null||ne.forEach((A,X)=>{var Re,ra,_e;A!=null&&A.formType&&((Re=A==null?void 0:A.formType)==null?void 0:Re.toUpperCase())==="SELECT"||A!=null&&A.menuId?v.push({label:(ra=A==null?void 0:A.prop)!=null&&ra.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"+X,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)??X,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:(_e=A==null?void 0:A.prop)!=null&&_e.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"+X,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)??X,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||(Ia.value=(d==null?void 0:d.id)??"");let T=me.getColumnChild((oe=L.cloneDeep(te.value))==null?void 0:oe.filter(A=>(A==null?void 0:A.label)!=="操作"));ta.value&&((K=ta.value)==null?void 0:K.length)>0&&(ta.value=(Ne=L.cloneDeep(ta).value)==null?void 0:Ne.map(A=>{var Re;let X=(A==null?void 0:A.prop)||((Re=T==null?void 0:T.find(ra=>(ra==null?void 0:ra.label)===(A==null?void 0:A.label)))==null?void 0:Re.prop);return X&&(A.value=d[X]),A})),$a.value=ta.value&&((Te=ta.value)==null?void 0:Te.length)>0?me.getTableFormToForm(ta.value):v,$a.value=((Ue=$a.value)==null?void 0:Ue.map(A=>({...A,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled})))??$a.value;let z=[],F=((va=(Ye=(He=u.itemData)==null?void 0:He.filter(A=>(A==null?void 0:A.key)==="filter"))==null?void 0:Ye[0])==null?void 0:va.contents)??"";if(F=me.analyzeSplitToContent(F,","),(F==null?void 0:F.length)>0&&(z=F.flat()),(z==null?void 0:z.length)>0){let A=z==null?void 0:z.filter(sa=>sa==null?void 0:sa.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 sa=(Wa=(Fa=A==null?void 0:A.replace("=",S))==null?void 0:Fa.split(S))==null?void 0:Wa[1];((ca=sa==null?void 0:sa.trim())==null?void 0:ca.toUpperCase())==="MANUAL"&&(u==null||u.index,$a.value=(Za=$a.value)==null?void 0:Za.map((Na,il)=>Na))}let X=(ka=$a.value)==null?void 0:ka.filter(sa=>sa==null?void 0:sa.mainKey),Re;X==null||X.forEach(sa=>{var il;if(Re!==void 0)return;let Na=sa==null?void 0:sa.menus;((il=X==null?void 0:X.filter(Ya=>Ya==null?void 0:Ya.mainKey))==null?void 0:il.length)>1&&(Re=Na,sa==null||sa.groups)});let ra=[],_e=new Map;if(X==null||X.forEach(sa=>{var Na,il,Ya,ul,pl,Pl,Ga,vl,Ha,sl,Xa,cl,xl;if((Na=sa==null?void 0:sa.prop)!=null&&Na.includes(".")){let Dl=[];_e.get(((Ya=(il=sa==null?void 0:sa.prop)==null?void 0:il.split("."))==null?void 0:Ya[0])+(sa!=null&&sa.isMainPath?0:1)+((ul=sa==null?void 0:sa.groups)==null?void 0:ul[0]))&&(Dl=_e.get(((Pl=(pl=sa==null?void 0:sa.prop)==null?void 0:pl.split("."))==null?void 0:Pl[0])+(sa!=null&&sa.isMainPath?0:1)+((Ga=sa==null?void 0:sa.groups)==null?void 0:Ga[0]))),Dl.push(sa),_e.set(((Ha=(vl=sa==null?void 0:sa.prop)==null?void 0:vl.split("."))==null?void 0:Ha[0])+(sa!=null&&sa.isMainPath?0:1)+((sl=sa==null?void 0:sa.groups)==null?void 0:sl[0]),Dl)}else{let Dl=[];_e.get("normal"+(sa!=null&&sa.isMainPath?0:1)+((Xa=sa==null?void 0:sa.groups)==null?void 0:Xa[0]))&&(Dl=_e.get("normal"+(sa!=null&&sa.isMainPath?0:1)+((cl=sa==null?void 0:sa.groups)==null?void 0:cl[0]))),Dl.push(sa),_e.set("normal"+(sa!=null&&sa.isMainPath?0:1)+((xl=sa==null?void 0:sa.groups)==null?void 0:xl[0]),Dl)}}),ra=Array.from(_e.values()),(ra==null?void 0:ra.length)>0)for(let sa in ra){let Na=ra==null?void 0:ra[sa];if((Na==null?void 0:Na.length)!==1){if((Na==null?void 0:Na.length)>1){let il=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),pl=(Ua=L.cloneDeep(Na))==null?void 0:Ua[0],Pl=(ye=$a.value)==null?void 0:ye.findIndex(sl=>(sl==null?void 0:sl.prop)===(pl==null?void 0:pl.prop)),Ga=(Ca=$a.value)==null?void 0:Ca.slice(0,Pl),vl=(Ea=$a.value)==null?void 0:Ea.slice(Pl,(ua=$a.value)==null?void 0:ua.length);pl.label=Ya==null?void 0:Ya.join("·"),pl.value=ul==null?void 0:ul.join(" "),pl.value.trim()===""&&(pl.value=""),pl.prop=il==null?void 0:il.join("·");let Ha=Na==null?void 0:Na.map(sl=>{var Xa;return(Xa=sl==null?void 0:sl.words)==null?void 0:Xa.join(".")});pl.relatedWords=Ha,pl.usingType="parent",vl.unshift(pl),$a.value=[...Ga,...vl],$a.value=(Da=$a.value)==null?void 0:Da.map(sl=>(il!=null&&il.find(Xa=>Xa===(sl==null?void 0:sl.prop))&&(sl.isFormColHidden=!0,sl.relatedWords=Ha),sl))}}}}},du=()=>{var v;const d=(v=s.value)==null?void 0:v.$el;d&&Nl.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:T=>{var ne;const{oldIndex:z,newIndex:F}=T;if(z===F)return;const N=Dn.value.splice(z,1)[0];Dn.value.splice(F,0,N),te.value=(ne=te.value)==null?void 0:ne.slice().sort((oe,K)=>{if(oe.label==="操作")return 1;if(K.label==="操作")return-1;const Ne=Dn.value.findIndex(Ue=>Ue.label===oe.label),Te=Dn.value.findIndex(Ue=>Ue.label===K.label);return Ne-Te})}})};a.onMounted(()=>{na.value=window.innerWidth-240*2,window.addEventListener("keydown",Zi)});const pu=()=>{a.nextTick(()=>{du()})},ot=(d,v)=>{var z;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let T;return d.children=(z=d.children)==null?void 0:z.map(F=>{var N,ne;if((F==null?void 0:F.id)===Ia.value){let oe={};for(let K in F){let Ne=(N=v==null?void 0:v.find(Te=>(Te==null?void 0:Te.prop)===K))==null?void 0:N.label;Ne?oe[K]=(ne=ir.value)==null?void 0:ne[Ne]:oe[K]=F[K]??""}F=Object.assign(oe,ir.value),T=F}else{let oe=ot(F,v);F=oe==null?void 0:oe.contents,T=oe==null?void 0:oe.currentSelectContents}return F}),{contents:d,currentSelectContents:T}},It=(d,v)=>{let T,z;return d!=null&&d.find(F=>(F==null?void 0:F.id)===Ia.value)?T=d==null?void 0:d.map(F=>{var N,ne,oe;if((F==null?void 0:F.id)===Ia.value){let K={};for(let Te in F){let Ue=(N=v==null?void 0:v.find(He=>(He==null?void 0:He.prop)===Te))==null?void 0:N.label;Ue?K[Te]=((ne=ir.value)==null?void 0:ne[Ue])??"":K[Te]=F[Te]??""}let Ne=ir.value;for(let Te in K)(oe=ir.value)!=null&&oe[Te]||(Ne[Te]=(K==null?void 0:K[Te])??"");F=Ne,z=F}return F}):T=d==null?void 0:d.map(F=>{var N,ne,oe,K;if((F==null?void 0:F.id)===Ia.value){let Ne={};for(let Te in F){let Ue=(N=v==null?void 0:v.find(He=>(He==null?void 0:He.prop)===Te))==null?void 0:N.label;Ue?Ne[Te]=(ne=ir.value)==null?void 0:ne[Ue]:Ne[Te]=F[Te]??""}F=Object.assign(Ne,ir.value),z=F}else F=(oe=ot(F,v))==null?void 0:oe.contents,z=(K=ot(F,v))==null?void 0:K.currentSelectContents;return F}),{newContents:T,currentSelectContents:z}},Ot=(d,v,T)=>{var z,F;return d[v==null?void 0:v.prop]=T,typeof d.id=="number"&&(d.id=(z=d.id)==null?void 0:z.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(z=>{v.push(...Lt(z))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(z=>{const F={...z};return delete F.children,F}):[]},uo=["Pacific6000数据采集装置.通道号","通道号"],$i=d=>{if(!d)return"";const v=uo.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=Ye=>{var va,Fa,Wa;return Ye?typeof(Ye==null?void 0:Ye.value)=="string"?Ye.value:((Wa=(Fa=(va=Ye==null?void 0:Ye._custom)==null?void 0:va.value)==null?void 0:Fa.value)==null?void 0:Wa.value)||"":""},z=Array.isArray(on.value)?on.value:[],F=T(z.find(Ye=>(Ye==null?void 0:Ye.condition)==="child")),N=(Ge.value||"").replace(/\/+$/,""),ne=F?`${N}/${F}`:N,oe=await Kr(ne||Ge.value,!1),K=String(ha.value||"").trim(),Ne=Ye=>String(Ye||"").trim(),Te=(Ye,va=[],Fa="")=>{if(!Array.isArray(Ye))return va;for(const Wa of Ye){const ca=Ne((Wa==null?void 0:Wa.choiceName)||(Wa==null?void 0:Wa.name0)||Fa);(Wa==null?void 0:Wa.comp)==="Table"&&(!K||ca===K)&&va.push(Wa),Array.isArray(Wa==null?void 0:Wa.children)&&Te(Wa.children,va,ca),Array.isArray(Wa==null?void 0:Wa.tab)&&Te(Wa.tab,va,ca),Array.isArray(Wa==null?void 0:Wa.choice)&&Te(Wa.choice,va,ca)}return va},Ue=Te(oe||[]),He=String((u==null?void 0:u.compName)||"");return Ue.some(Ye=>{var Fa,Wa;const va=((Wa=(Fa=Ye==null?void 0:Ye.compData)==null?void 0:Fa.find(ca=>(ca==null?void 0:ca.key)==="tableContents"))==null?void 0:Wa.contents)||[];return!Array.isArray(va)||va.length===0?!1:va.some(ca=>{if(String((Ye==null?void 0:Ye.name)||"")===He&&(ca==null?void 0:ca.id)===v)return!1;const ka=$i(ca);return!!ka&&ka===d})})}catch{return(Ce.value||[]).some(z=>{if((z==null?void 0:z.id)===v)return!1;const F=$i(z);return!!F&&F===d})}},Ri=async(d=!0,v,T)=>{var Ne,Te,Ue,He,Ye,va,Fa,Wa,ca,Za,ka,Ua,ye,Ca,ua,Ea,Da,A,X,Re,ra,_e,sa,Na,il,Ya,ul,pl,Pl,Ga,vl;if(ir.value){const Ha=(Te=me.getColumnChild((Ne=L.cloneDeep(te.value))==null?void 0:Ne.filter(Xa=>(Xa==null?void 0:Xa.label)!=="操作")))==null?void 0:Te.filter(Xa=>(Xa==null?void 0:Xa.required)===!0);for(let Xa=0;Xa<((Ha==null?void 0:Ha.length)??0);Xa++){const cl=Ha[Xa],xl=cl==null?void 0:cl.prop,Dl=(cl==null?void 0:cl.label)??xl,wr=(Ue=ir.value)==null?void 0:Ue[xl];if(wr===""||wr===null||wr===void 0||Array.isArray(wr)&&wr.length===0){Ka.ElMessage.error(`${Dl}不能为空`);return}}const sl=$i(ir.value);if(sl&&await tt(sl,Ia.value||void 0)){Ka.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=me.getColumnChild((He=L.cloneDeep(te.value))==null?void 0:He.filter(Ha=>(Ha==null?void 0:Ha.label)!=="操作")),F,N=L.cloneDeep(Ce.value);if(!ir.value){U.value=!1;return}if(Ia.value===""){Ze.value++;let Ha;Ha={id:Ze.value.toString()};try{Ha.sort=Ln(0,Ce.value||[])}catch{}Ha!=null&&Ha.children&&(Ha={...Ha,children:(Ye=Ha.children)==null?void 0:Ye.map(Xa=>Ot(Xa,v,T))});const sl=Object.assign(ir.value,Ha);N.unshift(sl),F=sl}else N=(va=It(N,z))==null?void 0:va.newContents,F=(Fa=It(N,z))==null?void 0:Fa.currentSelectContents;const ne=(Wa=u.itemData)==null?void 0:Wa.filter(Ha=>(Ha==null?void 0:Ha.key)==="childTree")[0];if(((ca=ne==null?void 0:ne.contents)==null?void 0:ca.length)>0){ue.value="编辑";const Ha=[];N==null||N.forEach((cl,xl)=>{var wr;let Dl={};if(Array.isArray(cl)){let $l=[];cl==null||cl.filter(yl=>!(yl!=null&&yl.id)).forEach((yl,Tl)=>{var Ql,Bl,Jl,or,Kl,hr,qr;if((Bl=(Ql=Mr.value)==null?void 0:Ql[Tl])!=null&&Bl.prop&&!Array.isArray(yl)){let vr={};vr[Mr.value[Tl].column]=yl,Ma!=null&&Ma.value&&((Jl=Ma==null?void 0:Ma.value)==null?void 0:Jl.length)>0&&((or=Ma==null?void 0:Ma.value)!=null&&or.find(dr=>JSON.stringify(dr==null?void 0:dr[0])===JSON.stringify(vr)))&&($l=(Kl=Ma==null?void 0:Ma.value)==null?void 0:Kl.find(dr=>JSON.stringify(dr==null?void 0:dr[0])===JSON.stringify(vr))),$l&&$l.length>0?Dl[Mr.value[Tl].prop]=$l!=null&&$l.find(dr=>{var pr;return((pr=Object.keys(dr))==null?void 0:pr[0])===Mr.value[Tl].column})?(hr=$l==null?void 0:$l.find(dr=>{var pr;return((pr=Object.keys(dr))==null?void 0:pr[0])===Mr.value[Tl].column}))==null?void 0:hr[Mr.value[Tl].column]:yl:Dl[Mr.value[Tl].prop]=yl}else Array.isArray(yl)&&((qr=Mr.value[Tl])!=null&&qr.prop?Dl[Mr.value[Tl].prop]=yl:Dl.children=bt(yl,Mr.value))})}else Dl=cl;if(Array.isArray(cl)&&cl.some($l=>$l==null?void 0:$l.id)){const $l=(wr=cl==null?void 0:cl.find(yl=>yl.id))==null?void 0:wr.id;Ha.push(Object.assign(Dl,{id:io($l)}))}else Dl.id?Ha.push(Dl):Ha.push(Object.assign(Dl,{id:xl.toString()}))});const sl=(Ce.value||[]).map(cl=>String(cl==null?void 0:cl.id)),Xa=oo(Ha,sl);Ce.value=Ft(Xa,ne,te.value)}Rt(Ce.value),Yr.value=Ce.value;const oe=If(Yr.value,gn.value,N);let K=[];if(P.value?(K=(Za=L.cloneDeep(P).value.singleContent)==null?void 0:Za.filter(Ha=>(Ha==null?void 0:Ha.id)!==(F==null?void 0:F.id)),K.push(F)):K=[F],zl.value){const Ha={content:oe,singleContent:((ka=ne==null?void 0:ne.contents)==null?void 0:ka.length)>0?K==null?void 0:K.flatMap(Lt):K,index:u==null?void 0:u.index,buttonName:"编辑",column:te.value,parentTableId:u==null?void 0:u.parentTableId};Fe.setCacheUpdatingData(Ha)}if((Ua=te.value)==null||Ua.forEach(Ha=>{(Ha==null?void 0:Ha.formType)==="Upload"&&(F[Ha.prop]=F[Ha.prop]===""?"{}":typeof F[Ha.prop]!="string"?JSON.stringify(F[Ha.prop]):F[Ha.prop])}),d){(Ea=(ua=(Ca=(ye=u.itemData)==null?void 0:ye.find(Xa=>(Xa==null?void 0:Xa.key)==="filterAllType"))==null?void 0:Ca.value)==null?void 0:ua.find(Xa=>(Xa==null?void 0:Xa.value)==="onConditionContents"))==null||Ea.content;let Ha=(Da=u.itemData)==null?void 0:Da.filter(Xa=>(Xa==null?void 0:Xa.key)==="filterAllType");Ha=Array.from(new Map(Ha.filter(Boolean).map((Xa,cl)=>[Xa.value,{...Xa,_idx:cl}])).values()).sort((Xa,cl)=>Xa._idx-cl._idx).map(({_idx:Xa,...cl})=>cl),Ha=(A=Ha==null?void 0:Ha[(Ha==null?void 0:Ha.length)-1])==null?void 0:A.value;const sl={fixContent:[F],buttonName:ue.value,relatedContents:u==null?void 0:u.related,columns:te.value,name:u==null?void 0:u.groupNames};Fe.setTableLoading(u==null?void 0:u.index),U.value=!1,ir.value=void 0,Se("change",sl)}if((ra=(Re=(X=$a.value)==null?void 0:X[0])==null?void 0:Re.optionUrl)!=null&&ra.menuId){U.value=!1;let Ha=(_e=u.itemData)==null?void 0:_e.filter(sl=>(sl==null?void 0:sl.key)==="filterAllType");if((Ha==null?void 0:Ha.length)>0){let sl=Ha==null?void 0:Ha.map(xl=>xl==null?void 0:xl.value),Xa=(il=(Na=(sa=sl.flat().find(xl=>{var Dl;return(Dl=xl==null?void 0:xl.content)==null?void 0:Dl.includes("@Num")}))==null?void 0:sa.content)==null?void 0:Na.split(":"))==null?void 0:il[1];((pl=(ul=(Ya=sl.flat().find(xl=>{var Dl;return(Dl=xl==null?void 0:xl.content)==null?void 0:Dl.includes("@Type:")}))==null?void 0:Ya.content)==null?void 0:ul.split(":"))==null?void 0:pl[1])!=="Manual"&&(Xa=parseInt(Xa),Ce.value=(vl=Ce.value)==null?void 0:vl.slice(((Pl=Ce.value)==null?void 0:Pl.length)-Xa,(Ga=Ce.value)==null?void 0:Ga.length))}}};a.onUnmounted(()=>{window.removeEventListener("keydown",Zi),te.value=[],Ce.value=[],se.value=[],da.value=[],ta.value=[],Sa.value=[],Pa.value=[],ya.value=[],$a.value=[],ur.value=[],s.value=null,Mn.value=""});const po=async(d,v,T)=>{var Ye,va,Fa,Wa,ca,Za,ka,Ua,ye,Ca,ua,Ea,Da;jl.value=(T==null?void 0:T.prop)??(T==null?void 0:T.property);const z=L.cloneDeep(u.itemData),F=((Ye=z==null?void 0:z.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:Ye.contents)??[];let N=F==null?void 0:F.find((A,X)=>{var Re,ra,_e;return(A==null?void 0:A.prop)===jl.value||(A==null?void 0:A.label)===jl.value||(X==null?void 0:X.toString())===((_e=(ra=(Re=jl.value)==null?void 0:Re.split("a"))==null?void 0:ra[1])==null?void 0:_e.toString())});const ne=me.getColumnChild((va=L.cloneDeep(te.value))==null?void 0:va.filter(A=>(A==null?void 0:A.label)!=="操作"));if(N||(N=ne==null?void 0:ne.find(A=>(A==null?void 0:A.prop)===jl.value||(A==null?void 0:A.label)===jl.value)),N&&!((Fa=N==null?void 0:N.menus)!=null&&Fa.length)&&!((Wa=N==null?void 0:N.groups)!=null&&Wa.length)&&!((ca=N==null?void 0:N.words)!=null&&ca.length)){const A=(Za=$a.value)==null?void 0:Za.find(X=>(X==null?void 0:X.prop)===jl.value);A&&(N={...N,menus:(A==null?void 0:A.menus)??(N==null?void 0:N.menus),groups:(A==null?void 0:A.groups)??(N==null?void 0:N.groups),words:(A==null?void 0:A.words)??(N==null?void 0:N.words),bindMenus:(A==null?void 0:A.bindMenus)??(N==null?void 0:N.bindMenus),isMainPath:(A==null?void 0:A.isMainPath)??(N==null?void 0:N.isMainPath),relatedContents:(A==null?void 0:A.relatedContents)??(N==null?void 0:N.relatedContents),endChildMenu:(A==null?void 0:A.endChildMenu)??(N==null?void 0:N.endChildMenu)})}if(N&&((ka=$a==null?void 0:$a.value)==null||ka.forEach(A=>{var X,Re,ra,_e,sa;(A==null?void 0:A.prop)===(N==null?void 0:N.prop)&&(A!=null&&A.endChildMenu)&&((X=N==null?void 0:N.prop)!=null&&X.includes(".")&&((ra=(Re=N==null?void 0:N.prop)==null?void 0:Re.split("."))==null?void 0:ra[0])!==((sa=(_e=A==null?void 0:A.prop)==null?void 0:_e.split("."))==null?void 0:sa[0])?N.endChildMenu=A==null?void 0:A.value:N.endChildMenu=A==null?void 0:A.endChildMenu)})),!N)return;const oe=jl.value,K=(Ua=Ce.value)==null?void 0:Ua.findIndex(A=>(A==null?void 0:A.id)===(v==null?void 0:v.id));K!==-1&&oe&&(Ce.value[K]={...Ce.value[K],[oe]:d});const Ne=A=>{Array.isArray(A)&&A.forEach(X=>{Array.isArray(X==null?void 0:X.allSelectionContents)&&X.allSelectionContents.length>0&&(X.contactValue=Ce.value[K]??v),Array.isArray(X==null?void 0:X.children)&&X.children.length>0&&Ne(X.children)})};Ne(te.value),N.value=d,N.endChildMenu=N.endChildMenu||"";let Te=N!=null&&N.isMainPath&&(N!=null&&N.mainKey)?N==null?void 0:N.value:"";const Ue=A=>{Array.isArray(A)&&A.forEach(X=>{var ra,_e;if(((X==null?void 0:X.type)==="Select"||(X==null?void 0:X.formType)&&X.formType.toUpperCase()==="SELECT"||(X==null?void 0:X.columnType)&&X.columnType.toUpperCase()==="SELECT")&&Array.isArray(X==null?void 0:X.menus)&&X.menus.length>0&&X.menus[X.menus.length-1]===""&&(N!=null&&N.isMainPath)&&(N!=null&&N.mainKey)){const sa=(ra=X==null?void 0:X.prop)!=null&&ra.includes(".")?X.prop.split(".")[0]:null,Na=(_e=N==null?void 0:N.prop)!=null&&_e.includes(".")?N.prop.split(".")[0]:null;(!sa||!Na||sa===Na)&&(X.endChildMenu=Te)}Array.isArray(X==null?void 0:X.children)&&X.children.length>0&&Ue(X.children)})};if(Ue(te.value),!!(N!=null&&N.mainKey)&&Array.isArray(N==null?void 0:N.menus)&&(N==null?void 0:N.menus.length)>0&&(N!=null&&N.value)&&(N==null?void 0:N.value)!==""){let A=N!=null&&N.relatedContents&&((ye=N==null?void 0:N.relatedContents)==null?void 0:ye.length)>0?(Ca=N==null?void 0:N.relatedContents)==null?void 0:Ca.find(X=>{var Re,ra,_e,sa;return(X==null?void 0:X[(sa=(Re=N==null?void 0:N.prop)==null?void 0:Re.split("."))==null?void 0:sa[((_e=(ra=N==null?void 0:N.prop)==null?void 0:ra.split("."))==null?void 0:_e.length)-1]])===(N==null?void 0:N.value)}):await ds(N);if(A){const X={...v};ne==null||ne.forEach(Re=>{var ra,_e,sa,Na,il,Ya,ul,pl,Pl,Ga,vl,Ha,sl,Xa,cl,xl;(Re==null?void 0:Re.prop)!==(N==null?void 0:N.prop)&&(N!=null&&N.relatedContents&&((ra=N==null?void 0:N.relatedContents)==null?void 0:ra.length)>0?(_e=Re==null?void 0:Re.prop)!=null&&_e.includes(".")&&((Na=(sa=Re==null?void 0:Re.prop)==null?void 0:sa.split("."))==null?void 0:Na[0])===((Ya=(il=N==null?void 0:N.prop)==null?void 0:il.split("."))==null?void 0:Ya[0])?X[Re.prop]=A[(Ga=(ul=Re==null?void 0:Re.prop)==null?void 0:ul.split("."))==null?void 0:Ga[((Pl=(pl=Re==null?void 0:Re.prop)==null?void 0:pl.split("."))==null?void 0:Pl.length)-1]]??X[Re.prop]:X[Re.prop]=(A==null?void 0:A[Re.prop])??X[Re.prop]:me.same((N==null?void 0:N.menus)??[],(Re==null?void 0:Re.menus)??[])&&me.same((N==null?void 0:N.groups)??[],(Re==null?void 0:Re.groups)??[])&&!me.same((N==null?void 0:N.words)??[],(Re==null?void 0:Re.words)??[])?(vl=Re==null?void 0:Re.prop)!=null&&vl.includes(".")&&((sl=(Ha=Re==null?void 0:Re.prop)==null?void 0:Ha.split("."))==null?void 0:sl[0])!==((cl=(Xa=N==null?void 0:N.prop)==null?void 0:Xa.split("."))==null?void 0:cl[0])||(X[Re.prop]=(A==null?void 0:A[(xl=Re==null?void 0:Re.words)==null?void 0:xl.join(".")])??(A==null?void 0:A[Re.prop])??X[Re.prop]):(!(Re!=null&&Re.isMainPath)&&me.same((N==null?void 0:N.bindMenus)??[],(Re==null?void 0:Re.bindMenus)??[]),X[Re.prop]=(A==null?void 0:A[Re.prop])??X[Re.prop]))}),Ce.value=(ua=L.cloneDeep(Ce.value))==null?void 0:ua.map(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id)?{...X,id:Re==null?void 0:Re.id}:Re)}}if((Ea=N==null?void 0:N.optionUrl)!=null&&Ea.menuSelect){let A="";ne==null||ne.forEach(ra=>{var _e,sa,Na,il,Ya;A===""&&((Na=(sa=(_e=ra==null?void 0:ra.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:sa[1])!=null&&Na.includes("["))&&(A=(Ya=(il=ra==null?void 0:ra.optionUrl)==null?void 0:il.groupSelect)==null?void 0:Ya[1])});let X=await kt(N),Re;if(X==null||X.forEach(ra=>{var _e,sa,Na,il,Ya,ul,pl,Pl,Ga,vl;A===((sa=(_e=N==null?void 0:N.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:sa[1])&&((Ya=(il=(Na=N==null?void 0:N.optionUrl)==null?void 0:Na.groupSelect)==null?void 0:il[1])!=null&&Ya.includes("["))&&((vl=L.cloneDeep(ra))==null?void 0:vl[(Ga=(Pl=(pl=(ul=N==null?void 0:N.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:pl[1])==null?void 0:Pl.replaceAll("[",""))==null?void 0:Ga.replaceAll("]","")])===(N==null?void 0:N.value)&&(Re=ra)}),Re){const ra={...v};ne==null||ne.forEach(_e=>{var sa,Na,il,Ya,ul,pl,Pl,Ga,vl,Ha,sl;(Re!=null&&Re[_e==null?void 0:_e.label]||Re!=null&&Re[(Ya=(il=(Na=(sa=_e==null?void 0:_e.optionUrl)==null?void 0:sa.groupSelect)==null?void 0:Na[1])==null?void 0:il.replaceAll("[",""))==null?void 0:Ya.replaceAll("]","")])&&((Pl=(pl=(ul=_e==null?void 0:_e.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:pl[1])!=null&&Pl.includes("["))&&(ra[_e.prop]=(Re==null?void 0:Re[_e==null?void 0:_e.label])||(Re==null?void 0:Re[(sl=(Ha=(vl=(Ga=_e==null?void 0:_e.optionUrl)==null?void 0:Ga.groupSelect)==null?void 0:vl[1])==null?void 0:Ha.replaceAll("[",""))==null?void 0:sl.replaceAll("]","")]))}),Ce.value=(Da=L.cloneDeep(Ce.value))==null?void 0:Da.map(_e=>(_e==null?void 0:_e.id)===(v==null?void 0:v.id)?{...ra,id:_e==null?void 0:_e.id}:_e)}}},fu=async d=>{var Ye,va,Fa,Wa,ca,Za,ka,Ua,ye,Ca,ua,Ea,Da,A;if(!d)return;const v=L.cloneDeep(ir.value||{});ir.value=d;const T=$i(v),z=$i(ir.value);if(z&&z!==T&&await tt(z,Ia.value||void 0)){Ka.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),uo.forEach(Re=>{if(Object.prototype.hasOwnProperty.call(ir.value||{},Re)||Object.prototype.hasOwnProperty.call(v||{},Re)){const ra=(v==null?void 0:v[Re])??"";ir.value[Re]=ra,d[Re]=ra}}),$a.value=($a.value||[]).map(Re=>{if(!(Re!=null&&Re.prop)||!uo.includes(Re.prop))return Re;const ra=(v==null?void 0:v[Re.prop])??"";return{...Re,value:ra,selectValue:ra===""?[]:[ra]}});return}let F=L.cloneDeep(u.itemData);F==null||F.map(X=>{var Re,ra,_e,sa;return(X==null?void 0:X.key)==="header"&&(Array.isArray((Re=X.contents)==null?void 0:Re[0])?X.contents=(_e=me.getColumnChild((ra=X.contents)==null?void 0:ra[0]))==null?void 0:_e.map((Na,il)=>{var Ya,ul,pl,Pl,Ga,vl;return((pl=(ul=(Ya=$a.value)==null?void 0:Ya.find(Ha=>(Ha==null?void 0:Ha.prop)===(Na==null?void 0:Na.prop)))==null?void 0:ul.optionUrl)==null?void 0:pl.multiple)===!0&&!Array.isArray((Pl=Object.values(d))==null?void 0:Pl[il])?Na.value=[(Ga=Object.values(d))==null?void 0:Ga[il]]:Na.value=(vl=Object.values(d))==null?void 0:vl[il],Na}):X.contents=(sa=X.contents)==null?void 0:sa.map((Na,il)=>{var Ya,ul,pl,Pl,Ga,vl;return((pl=(ul=(Ya=$a.value)==null?void 0:Ya.find(Ha=>(Ha==null?void 0:Ha.prop)===(Na==null?void 0:Na.prop)))==null?void 0:ul.optionUrl)==null?void 0:pl.multiple)===!0&&!Array.isArray((Pl=Object.values(d))==null?void 0:Pl[il])?Na.value=[(Ga=Object.values(d))==null?void 0:Ga[il]]:Na.value=(vl=Object.values(d))==null?void 0:vl[il],Na})),X});let N=$a.value,ne=(Ye=F==null?void 0:F.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Ye.contents;if(jl.value||(N=N==null?void 0:N.map(X=>{var Re;return X.value=X.value??((Re=ne==null?void 0:ne.find((ra,_e)=>(ra==null?void 0:ra.prop)===(X==null?void 0:X.name)))==null?void 0:Re.value),X})),!Vr.value)return;let oe=L.cloneDeep(jl.value);(va=jl.value)!=null&&va.includes("·")&&(jl.value=(Wa=(Fa=jl.value)==null?void 0:Fa.split("·"))==null?void 0:Wa[0]);let K=(Za=(ca=F==null?void 0:F.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:ca.contents)==null?void 0:Za.find((X,Re)=>(X==null?void 0:X.prop)===jl.value);(ka=$a==null?void 0:$a.value)==null||ka.forEach(X=>{var Re,ra,_e,sa,Na,il,Ya,ul,pl;(X==null?void 0:X.prop)===(K==null?void 0:K.prop)&&(X!=null&&X.endChildMenu)&&((Re=K==null?void 0:K.prop)!=null&&Re.includes(".")&&((_e=(ra=K==null?void 0:K.prop)==null?void 0:ra.split("."))==null?void 0:_e[0])!==((Na=(sa=X==null?void 0:X.prop)==null?void 0:sa.split("."))==null?void 0:Na[0])?K.endChildMenu=(Ya=(il=X==null?void 0:X.value)==null?void 0:il.split(" "))==null?void 0:Ya[0]:K.endChildMenu=(pl=(ul=X==null?void 0:X.endChildMenu)==null?void 0:ul.split(" "))==null?void 0:pl[0])});let Ne=K!=null&&K.isMainPath&&(K!=null&&K.mainKey)?K==null?void 0:K.value:"",Te=N,Ue=fe.value;if(Ue!=null&&Ue.find(X=>(K==null?void 0:K.prop)===(X==null?void 0:X.key))&&(Ue=Ue==null?void 0:Ue.filter(X=>(K==null?void 0:K.prop)!==(X==null?void 0:X.key))),Ue!=null&&Ue.find(X=>oe===(X==null?void 0:X.key))&&(Ue=Ue==null?void 0:Ue.filter(X=>oe!==(X==null?void 0:X.key))),(K==null?void 0:K.formType)==="Select"?Te=Te==null?void 0:Te.map(X=>{var Re,ra,_e,sa,Na,il,Ya,ul,pl,Pl,Ga,vl,Ha,sl,Xa,cl;return(X==null?void 0:X.type)==="Select"&&(((Re=X==null?void 0:X.allSelectionContents)==null?void 0:Re.length)>0&&(X.contactValue=d),((K==null?void 0:K.prop)===(X==null?void 0:X.prop)||oe===(X==null?void 0:X.prop))&&K&&(Array.isArray(K.value)&&((ra=K.value)==null?void 0:ra.length)>0&&((_e=K.value)!=null&&_e.every(xl=>typeof xl=="string"))?(Ue.push({key:X==null?void 0:X.prop,value:[(Na=K.value)==null?void 0:Na[((sa=K.value)==null?void 0:sa.length)-1]]}),X.selectValue=(il=Ue==null?void 0:Ue.find(xl=>(xl==null?void 0:xl.key)===(X==null?void 0:X.prop)))==null?void 0:il.value):Array.isArray(K.value)&&((Ya=K.value)==null?void 0:Ya.length)===0?(Ue=[],X.selectValue=[],d[X==null?void 0:X.prop]=""):Array.isArray(X.value)&&Ue.push({key:X==null?void 0:X.prop,value:[(ul=X.value)==null?void 0:ul[(X==null?void 0:X.length)-1]]})),((Pl=X==null?void 0:X.menus)==null?void 0:Pl[((pl=X==null?void 0:X.menus)==null?void 0:pl.length)-1])===""&&(K!=null&&K.isMainPath)&&(K!=null&&K.mainKey)&&((Ga=X==null?void 0:X.prop)!=null&&Ga.includes(".")&&((Ha=(vl=X==null?void 0:X.prop)==null?void 0:vl.split("."))==null?void 0:Ha[0])!==((Xa=(sl=K==null?void 0:K.prop)==null?void 0:sl.split("."))==null?void 0:Xa[0])||(X.endChildMenu=(cl=Ne==null?void 0:Ne.split(" "))==null?void 0:cl[0]))),X.value=(d==null?void 0:d[X==null?void 0:X.prop])??(X==null?void 0:X.value),X}):(K==null?void 0:K.formType)!=="Input"&&(Te=Te==null?void 0:Te.map(X=>(X.value=(d==null?void 0:d[X==null?void 0:X.prop])??(X==null?void 0:X.value),X))),fe.value=Ue,Te!=null&&Te.some(X=>(X==null?void 0:X.functionName)&&(X==null?void 0:X.functionName)!=="")){let X=await gt([d],te==null?void 0:te.value,"Auto",Ce.value),Re=[];(Ua=Te==null?void 0:Te.filter(_e=>(_e==null?void 0:_e.functionName)&&(_e==null?void 0:_e.functionName)!==""))==null||Ua.forEach(_e=>{var sa;((sa=_e==null?void 0:_e.functionRelatedWords)==null?void 0:sa.length)>0&&(Re=[...Re,..._e==null?void 0:_e.functionRelatedWords])}),Re=Re==null?void 0:Re.filter(_e=>(_e==null?void 0:_e[0])!=="@");let ra=[];for(let _e in X==null?void 0:X[0])Re!=null&&Re.find(sa=>_e===sa||(_e==null?void 0:_e.includes("."+sa)))&&ra.push(((ye=X==null?void 0:X[0])==null?void 0:ye[_e])!=="");(X==null?void 0:X.length)>0&&ra.every(_e=>_e)&&(Te=Te==null?void 0:Te.map(_e=>{var sa;return _e.value=((sa=X==null?void 0:X[0])==null?void 0:sa[_e==null?void 0:_e.prop])??_e.value,_e})),ir.value=X==null?void 0:X[0]}if($a.value=Te,K=Object.assign({},K??{},{relatedWords:(ua=(Ca=$a==null?void 0:$a.value)==null?void 0:Ca.find(X=>(X==null?void 0:X.prop)===(K==null?void 0:K.prop)))==null?void 0:ua.relatedWords}),(K==null?void 0:K.mainKey)&&(K!=null&&K.value)&&(K==null?void 0:K.value)!==""){let X=K!=null&&K.relatedContents&&((Ea=K==null?void 0:K.relatedContents)==null?void 0:Ea.length)>0?(Da=K==null?void 0:K.relatedContents)==null?void 0:Da.find(Re=>{var ra,_e,sa,Na;return(Re==null?void 0:Re[(Na=(ra=K==null?void 0:K.prop)==null?void 0:ra.split("."))==null?void 0:Na[((sa=(_e=K==null?void 0:K.prop)==null?void 0:_e.split("."))==null?void 0:sa.length)-1]])===(K==null?void 0:K.value)}):await ds(K);if(X&&JSON.stringify(X)!=="{}"){let Re=Te;Re=Re==null?void 0:Re.map(_e=>{var sa,Na,il,Ya,ul,pl,Pl,Ga,vl,Ha,sl,Xa,cl,xl,Dl,wr,$l,yl,Tl,Ql,Bl;if((K==null?void 0:K.prop)===(_e==null?void 0:_e.prop))_e.value=(X==null?void 0:X[(sa=_e==null?void 0:_e.words)==null?void 0:sa.join(".")])??(X==null?void 0:X[_e==null?void 0:_e.prop])??X[(ul=(Na=_e==null?void 0:_e.prop)==null?void 0:Na.split("."))==null?void 0:ul[((Ya=(il=_e==null?void 0:_e.prop)==null?void 0:il.split("."))==null?void 0:Ya.length)-1]];else if(K!=null&&K.relatedContents&&((pl=K==null?void 0:K.relatedContents)==null?void 0:pl.length)>0)_e.value=(Pl=_e==null?void 0:_e.prop)!=null&&Pl.includes(".")&&((vl=(Ga=_e==null?void 0:_e.prop)==null?void 0:Ga.split("."))==null?void 0:vl[0])===((sl=(Ha=K==null?void 0:K.prop)==null?void 0:Ha.split("."))==null?void 0:sl[0])?X[(Dl=(Xa=_e==null?void 0:_e.prop)==null?void 0:Xa.split("."))==null?void 0:Dl[((xl=(cl=_e==null?void 0:_e.prop)==null?void 0:cl.split("."))==null?void 0:xl.length)-1]]:(X==null?void 0:X[_e==null?void 0:_e.prop])??(_e==null?void 0:_e.value);else if(me.same((K==null?void 0:K.menus)??[],(_e==null?void 0:_e.menus)??[])&&me.same((K==null?void 0:K.groups)??[],(_e==null?void 0:_e.groups)??[])&&!me.same((K==null?void 0:K.words)??[],(_e==null?void 0:_e.words)??[]))if((wr=_e==null?void 0:_e.prop)!=null&&wr.includes(".")&&((yl=($l=_e==null?void 0:_e.prop)==null?void 0:$l.split("."))==null?void 0:yl[0])!==((Ql=(Tl=K==null?void 0:K.prop)==null?void 0:Tl.split("."))==null?void 0:Ql[0])){let Jl=Object.keys(X);Jl=Jl==null?void 0:Jl.find(or=>{var Kl;return or==null?void 0:or.includes("."+((Kl=_e==null?void 0:_e.words)==null?void 0:Kl.join(".")))}),_e.value=(X==null?void 0:X[Jl])??(X==null?void 0:X[_e==null?void 0:_e.prop])??_e.value}else{let Jl=Object.keys(X);Jl=Jl==null?void 0:Jl.find(or=>{var Kl;return or==null?void 0:or.includes("."+((Kl=_e==null?void 0:_e.words)==null?void 0:Kl.join(".")))}),_e.value=(X==null?void 0:X[(Bl=_e==null?void 0:_e.words)==null?void 0:Bl.join(".")])??(X==null?void 0:X[Jl])??(X==null?void 0:X[_e==null?void 0:_e.prop])??_e.value}else!(_e!=null&&_e.isMainPath)&&me.same((K==null?void 0:K.bindMenus)??[],(_e==null?void 0:_e.bindMenus)??[]),_e.value=(X==null?void 0:X[_e==null?void 0:_e.prop])??_e.value;return _e}),$a.value=Re;let ra={};(A=$a.value)==null||A.forEach(_e=>{ra[_e.prop]=_e==null?void 0:_e.value}),ir.value=ra}}Vr.value=!0,Y.value=!1},hu=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",vu=d=>{var N,ne;const v=(ne=(N=ta.value)==null?void 0:N.find(oe=>(oe==null?void 0:oe.label)===(d==null?void 0:d.label)))==null?void 0:ne.multiple,T=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;Ce.value.forEach(oe=>{const K=oe==null?void 0:oe[T];v&&Do.isString(K)&&(oe[T]=[K]),!v&&!Do.isString(K)&&(oe[T]="")})},$t=(d,v)=>{var T;return v==null||v.forEach(z=>{d[z==null?void 0:z.prop]=z==null?void 0:z.value}),d.children&&((T=d.children)==null?void 0:T.length)>0&&(d.children=d.children.map(z=>$t(z,v))),d},st=d=>{var T,z,F,N,ne,oe;Li("");const v=(T=$a.value)==null?void 0:T.reduce((K,Ne)=>(K[Ne.name]=Ne.value,K),{});if(((z=Object.keys(v))==null?void 0:z.length)>0){ir.value=v,Ia.value="",Ze.value=(F=Ce.value)==null?void 0:F.length,ya.value=(N=$e.value)==null?void 0:N.filter(Ne=>(Ne==null?void 0:Ne.label)!=="新增");const K=(oe=(ne=se.value)==null?void 0:ne.filter(Ne=>(Ne==null?void 0:Ne.label)!=="操作"))==null?void 0:oe.map(Ne=>{var Ue,He,Ye;const Te=(He=(Ue=ta.value)==null?void 0:Ue.find(va=>(va==null?void 0:va.label)===(Ne==null?void 0:Ne.label)))==null?void 0:He.multiple;return vu(Ne),{...Ne,contents:(Ne==null?void 0:Ne.options)??[],optionUrl:Ne!=null&&Ne.formMenuSelect&&((Ye=Ne==null?void 0:Ne.formMenuSelect)==null?void 0:Ye.length)>0?{groupSelect:Ne==null?void 0:Ne.groupSelect,menuSelect:Ne==null?void 0:Ne.formMenuSelect,selectRelateType:"",type:Ne==null?void 0:Ne.formType,multiple:Te}:null}});te.value=K==null?void 0:K.map(Ne=>$t(Ne,[{prop:"type",value:"edit"},{prop:"columnType",value:hu(Ne==null?void 0:Ne.formType)||(Ne==null?void 0:Ne.columnType)}])),d==="createClick"&&(ue.value="新增",Ri(!0))}},mi={START:"开始时间",END:"结束时间",HOURS:"工时"},mu=(d,v)=>Number(Pn.dayjs(v).diff(Pn.dayjs(d),"day",!0).toFixed(1)),Rt=d=>{var N;const v=u.itemData,T=(N=v==null?void 0:v.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:N.contents,z=new Map;return T==null||T.forEach((ne,oe)=>{const{label:K}=ne;z.set(K,oe)}),!z.has(mi.START)||!z.has(mi.END)||!z.has(mi.HOURS)?d:d==null?void 0:d.map(ne=>{const oe=ne==null?void 0:ne[mi.START],K=ne==null?void 0:ne[mi.END],Ne=mu(oe,K);return oe&&K&&(ne[mi.HOURS]=`${Ne}天`),ne})},Vt=(d,v,T=0)=>{if(T>((v==null?void 0:v.length)??""))return d;const z=v==null?void 0:v[T],F=new Map;for(const ne of d){const oe=ne[z];F.has(oe)||F.set(oe,[]),F.get(oe)&&F.get(oe).push(ne)}const N=[];for(const[ne,oe]of F){const[K,...Ne]=oe,Te={...K};T+1===((v==null?void 0:v.length)??"")?Te.children=oe==null?void 0:oe.map(Ue=>(Ue.level=L.cloneDeep(T)+1,Ue)).filter((Ue,He)=>He!==0):Ne.length>0&&(Te.children=Vt(Ne,v,T+1)),Te.level=T,N.push(Te)}return N},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 z=[];return z=Vt(d,v==null?void 0:v.contents,0),z},Pt=async(d,v)=>{var Wa,ca,Za,ka,Ua,ye,Ca,ua,Ea,Da,A,X,Re,ra,_e,sa,Na,il,Ya,ul,pl,Pl,Ga,vl,Ha,sl,Xa,cl,xl,Dl,wr,$l,yl,Tl,Ql,Bl,Jl,or,Kl,hr,qr,vr,dr,pr,Ht,Ut,qt;const T=d==null?void 0:d.filter(fa=>(fa==null?void 0:fa.key)==="header");d==null||d.filter(fa=>(fa==null?void 0:fa.key)==="tableIndexColumn")[0];const z=d==null?void 0:d.filter(fa=>(fa==null?void 0:fa.key)==="childTree")[0];let F=!0;if((Za=(ca=(Wa=d==null?void 0:d.find(fa=>(fa==null?void 0:fa.key)==="filterAllType"))==null?void 0:Wa.value)==null?void 0:ca.find(fa=>(fa==null?void 0:fa.value)==="onPamButtonContents"))!=null&&Za.content){let fa=(ye=(Ua=(ka=d==null?void 0:d.find(wl=>(wl==null?void 0:wl.key)==="filterAllType"))==null?void 0:ka.value)==null?void 0:Ua.find(wl=>(wl==null?void 0:wl.value)==="onPamButtonContents"))==null?void 0:ye.content;fa=(Ca=fa==null?void 0:fa.split(":"))==null?void 0:Ca[1],fa=(ua=fa.slice(1,(fa==null?void 0:fa.length)-1))==null?void 0:ua.split(","),F=!!(fa!=null&&fa.find(wl=>wl==="操作"))}const N=d==null?void 0:d.find(fa=>(fa==null?void 0:fa.key)==="page"),ne=d==null?void 0:d.find(fa=>(fa==null?void 0:fa.key)==="rowButton"),oe=d==null?void 0:d.find(fa=>(fa==null?void 0:fa.key)==="extraButton"),K=d==null?void 0:d.filter(fa=>(fa==null?void 0:fa.key)==="tableContents"),Ne=d==null?void 0:d.filter(fa=>(fa==null?void 0:fa.key)==="bottomButton"),Te=d==null?void 0:d.filter(fa=>(fa==null?void 0:fa.key)==="tableIndex");ta.value=(Da=(Ea=d==null?void 0:d.filter(fa=>(fa==null?void 0:fa.key)==="tableToForm"))==null?void 0:Ea[0])==null?void 0:Da.contents,oa.value=(N==null?void 0:N.contents)??!0;let Ue=[];ar.value===""?Ue=T==null?void 0:T[0]:Ue=(T==null?void 0:T.find(fa=>(fa==null?void 0:fa.selectLabel)==="("+ar.value+")"))??(T==null?void 0:T.find(fa=>!(fa!=null&&fa.selectLabel)));let He=[];ar.value===""?He=Te==null?void 0:Te[0]:He=(Te==null?void 0:Te.find(fa=>(fa==null?void 0:fa.selectLabel)==="("+ar.value+")"))??(Te==null?void 0:Te.find(fa=>!(fa!=null&&fa.selectLabel)));let Ye=[],va=[];if(((A=Ue==null?void 0:Ue.contents)==null?void 0:A.length)>0){let fa=[],wl=Ue==null?void 0:Ue.contents;if(Array.isArray(wl==null?void 0:wl[0])&&((X=wl==null?void 0:wl[0])!=null&&X.every(Qa=>!(Qa!=null&&Qa.children)))&&(wl=wl==null?void 0:wl[0]),wl.some(Qa=>Array.isArray(Qa)&&(Qa==null?void 0:Qa.find(Ke=>Ke.children))))fa=(Re=me.getGradeColumns(wl,F))==null?void 0:Re[0],fa!=null&&fa.find(Qa=>(Qa==null?void 0:Qa.label)==="操作")||fa.push({label:"操作",prop:"operate",type:"operate"});else{let Qa=wl.some(Ke=>Array.isArray(Ke))?wl==null?void 0:wl[0]:wl;Qa!=null&&Qa.find(Ke=>(Ke==null?void 0:Ke.label)==="操作")||Qa.push({label:"操作",prop:"operate",type:"operate"}),Qa==null||Qa.forEach((Ke,nr)=>{var Or,Tr,Lr,Cr,ii,bi,ki,br,kn,Gn,xi,rn,Yn,Yt,Jt,Xt,Zt,Qt,es,as;if((Tr=(Or=Ge.value)==null?void 0:Or.split("/"))==null||Tr.forEach(tr=>{var mr,Tn,ls;tr!==""&&((ls=(Tn=(mr=tr==null?void 0:tr.split(k+"updateLoading"))==null?void 0:mr[0])==null?void 0:Tn.split(k+"loading"))==null||ls[0])}),Ke!=null&&Ke.methodContent){let tr=(ii=(Cr=(Lr=Ke==null?void 0:Ke.methodContent)==null?void 0:Lr.replace("@","%%#"))==null?void 0:Cr.split("%%#"))==null?void 0:ii[1];if(tr=tr==null?void 0:tr.slice(0,(tr==null?void 0:tr.length)-1),tr=me.contentTransArrayToAllNoExtra(tr??"",","),(bi=tr==null?void 0:tr.find(mr=>mr==null?void 0:mr.includes("@Button")))!=null&&bi.includes("Prop")&&((ki=tr==null?void 0:tr.find(mr=>mr==null?void 0:mr.includes("Type")))!=null&&ki.includes("Manual"))){let mr=(kn=(br=tr==null?void 0:tr.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:br.split(":"))==null?void 0:kn[1];mr=((rn=(xi=(Gn=mr==null?void 0:mr.replaceAll("[",""))==null?void 0:Gn.replaceAll("]",""))==null?void 0:xi.split(","))==null?void 0:rn[1])??"算法执行",Ye.push(mr)}else if((Yn=tr==null?void 0:tr.find(mr=>mr==null?void 0:mr.includes("@Button")))!=null&&Yn.includes("Row")&&((Yt=tr==null?void 0:tr.find(mr=>mr==null?void 0:mr.includes("Type")))!=null&&Yt.includes("Manual"))){let mr=(Xt=(Jt=tr==null?void 0:tr.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:Jt.split(":"))==null?void 0:Xt[1];mr=((es=(Qt=(Zt=mr==null?void 0:mr.replaceAll("[",""))==null?void 0:Zt.replaceAll("]",""))==null?void 0:Qt.split(","))==null?void 0:es[1])??"算法执行",va.push(mr)}}(as=ta.value)==null||as.find(tr=>(tr==null?void 0:tr.prop)===(Ke==null?void 0:Ke.prop)),fa.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"+nr,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)??nr,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)??nr===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})})}M.value=(ra=Ne==null?void 0:Ne[0])==null?void 0:ra.contents;const cn=me.getNewColumnChild(fa),Wt=Qa=>Array.isArray(Qa)?Qa.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)):Qa;Wt(cn),await Ko(cn),l0(Z.value,cn),te.value=cn,da.value=cn,n.value=(_e=te.value)==null?void 0:_e.map(Qa=>Qa==null?void 0:Qa.label);let un=(Na=(sa=me.getAllLeafNodes(te.value))==null?void 0:sa.filter(Qa=>(Qa==null?void 0:Qa.type)!=="operate"))==null?void 0:Na.map((Qa,Ke)=>({prop:(Qa==null?void 0:Qa.prop)??"a"+Ke,column:Qa.label}));Mr.value=un;let ln=[];ar.value===""?ln=K==null?void 0:K[0]:ln=(K==null?void 0:K.find(Qa=>(Qa==null?void 0:Qa.selectLabel)==="("+ar.value+")"))??(K==null?void 0:K.find(Qa=>!(Qa!=null&&Qa.selectLabel)));let ni=Array.isArray((il=ln==null?void 0:ln.contents)==null?void 0:il[0])&&((Ya=ln==null?void 0:ln.contents)!=null&&Ya[0].every(Qa=>Array.isArray(Qa)))?(ul=ln==null?void 0:ln.contents)==null?void 0:ul[0]:ln==null?void 0:ln.contents;He!=null&&He.contents&&((pl=He==null?void 0:He.contents)==null?void 0:pl.length)!==0&&(ni=(Pl=L.cloneDeep(ni))==null?void 0:Pl.map((Qa,Ke)=>{if(!Array.isArray(Qa)){let nr={};for(let Or in Qa)Or!=="id"&&Or!=="index"&&(nr[Or]=Qa[Or]);Qa=Object.values(nr)}return Qa}));const Bu=!!((Ga=te.value)!=null&&Ga.find(Qa=>Qa.prop==="index"));ni=pc(ni,He==null?void 0:He.contents,Bu);const yi=[];ni==null||ni.forEach((Qa,Ke)=>{var Or;let nr={};if(Array.isArray(Qa)){let Tr=[];Qa==null||Qa.filter(Lr=>!(Lr!=null&&Lr.id)).forEach((Lr,Cr)=>{var ii,bi,ki,br,kn,Gn;if((ii=un==null?void 0:un[Cr])!=null&&ii.prop&&!Array.isArray(Lr)){let xi={};xi[un[Cr].column]=Lr,Ma!=null&&Ma.value&&((bi=Ma==null?void 0:Ma.value)==null?void 0:bi.length)>0&&((ki=Ma==null?void 0:Ma.value)!=null&&ki.find(rn=>JSON.stringify(rn==null?void 0:rn[0])===JSON.stringify(xi)))&&(Tr=(br=Ma==null?void 0:Ma.value)==null?void 0:br.find(rn=>JSON.stringify(rn==null?void 0:rn[0])===JSON.stringify(xi))),Tr&&Tr.length>0?nr[un[Cr].prop]=Tr!=null&&Tr.find(rn=>{var Yn;return((Yn=Object.keys(rn))==null?void 0:Yn[0])===un[Cr].column})?(kn=Tr==null?void 0:Tr.find(rn=>{var Yn;return((Yn=Object.keys(rn))==null?void 0:Yn[0])===un[Cr].column}))==null?void 0:kn[un[Cr].column]:Lr:nr[un[Cr].prop]=Lr}else Array.isArray(Lr)&&((Gn=un[Cr])!=null&&Gn.prop?nr[un[Cr].prop]=Lr:nr.children=bt(Lr,un))})}else nr=Qa;if(Array.isArray(Qa)&&Qa.some(Tr=>Tr==null?void 0:Tr.id)){const Tr=(Or=Qa==null?void 0:Qa.find(Lr=>Lr.id))==null?void 0:Or.id;yi.push(Object.assign(nr,{id:io(Tr)}))}else nr.id?yi.push(nr):yi.push(Object.assign(nr,{id:Ke.toString()}))});try{const Qa=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ke=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),nr=Qa==null?void 0:Qa.tableId,Or=Qa==null?void 0:Qa.compIndex;if(nr&&Array.isArray(Ke)&&Ke.length>0&&String(nr)===String(u==null?void 0:u.parentTableId)&&String(Or)===String(u==null?void 0:u.index)){const Tr=new Set(yi.map(Cr=>String(Cr==null?void 0:Cr.id))),Lr=Ke.filter(Cr=>!Tr.has(String(Cr)));if(Lr.length>0){const Cr=Qa==null?void 0:Qa.pageKey,ii=Cr!=null&&Cr.startsWith("/")?Cr.substring(1):Cr;((v==null?void 0:v[Cr])||(v==null?void 0:v[ii])||[]).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(nr)&&Lr.includes(br==null?void 0:br.id)}).forEach(br=>{var kn;Tr.has(String(br==null?void 0:br.id))||(yi.push({id:br==null?void 0:br.id,...((kn=br==null?void 0:br.value)==null?void 0:kn.tableData)||{}}),Tr.add(String(br==null?void 0:br.id)))})}}}catch{}let gi=null;try{const Qa=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ke=JSON.parse(sessionStorage.getItem(Qa)||"null");Array.isArray(Ke)&&Ke.length>0&&(gi=new Set(Ke.map(nr=>String(nr))))}catch{}const Kt=Array.from(((vl=qe.value)==null?void 0:vl.values())||[]).filter(Qa=>!(!(Qa!=null&&Qa._isOCRRow&&(Qa==null?void 0:Qa._ocrTableId)===(u==null?void 0:u.index))||gi&&gi.has(String(Qa==null?void 0:Qa.id)))),Tu=(Ce.value||[]).map(Qa=>String(Qa==null?void 0:Qa.id)),Gt=oo(yi,Tu);if(Ce.value=Ft(Gt,z,te.value),ma.value=Gt,(Ha=ma.value)==null||Ha.forEach(Qa=>{var Ke;(Ke=qe.value)==null||Ke.set(Qa.id,Qa)}),gi&&gi.size>0)try{const Qa=new Set(Array.from(gi.values()));Ce.value=(Ce.value||[]).filter(Ke=>!Qa.has(String(Ke==null?void 0:Ke.id))),ma.value=(ma.value||[]).filter(Ke=>!Qa.has(String(Ke==null?void 0:Ke.id))),Qa.forEach(Ke=>{var nr,Or;try{(Or=(nr=qe.value)==null?void 0:nr.delete)==null||Or.call(nr,Ke)}catch{}})}catch{}const fo=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ct=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(fo&&Array.isArray(ct)&&ct.length>0&&String(fo==null?void 0:fo.compIndex)===String(u==null?void 0:u.index)){const Qa=new Set((ma.value||[]).map(Ke=>String(Ke==null?void 0:Ke.id)));ct.filter(Ke=>!Qa.has(String(Ke)))}if(Kt.length>0){const Qa=new Set((Ce.value||[]).map(nr=>nr==null?void 0:nr.id)),Ke=Kt.filter(nr=>!Qa.has(nr.id));Ke.length>0&&(Ce.value=[...Ce.value||[],...Ke],ma.value=[...ma.value||[],...Ke],Ke.forEach(nr=>{var Or;return(Or=qe.value)==null?void 0:Or.set(nr.id,nr)}))}}else te.value=[],se.value=[],Ce.value=[],ma.value=[],qe.value=new Map;if(va=[...new Set(va)],va=va==null?void 0:va.map(fa=>({label:fa,type:"methodButton"})),((sl=ne==null?void 0:ne.contents)==null?void 0:sl.length)>0?Sa.value=ne==null?void 0:ne.contents:Sa.value=[],Sa.value=[...Sa.value,...va],Ye=[...new Set(Ye)],Ye=Ye==null?void 0:Ye.map(fa=>({label:fa,type:"methodButton"})),((Xa=oe==null?void 0:oe.contents)==null?void 0:Xa.length)>0)if((Dl=(xl=(cl=d==null?void 0:d.find(fa=>(fa==null?void 0:fa.key)==="filterAllType"))==null?void 0:cl.value)==null?void 0:xl.find(fa=>(fa==null?void 0:fa.value)==="onButtonContents"))!=null&&Dl.content){let fa=(yl=($l=(wr=d==null?void 0:d.find(wl=>(wl==null?void 0:wl.key)==="filterAllType"))==null?void 0:wr.value)==null?void 0:$l.find(wl=>(wl==null?void 0:wl.value)==="onButtonContents"))==null?void 0:yl.content;if(fa=(Tl=fa==null?void 0:fa.split(":"))==null?void 0:Tl[1],fa=(Ql=fa.slice(1,(fa==null?void 0:fa.length)-1))==null?void 0:Ql.split(","),ya.value=(Bl=oe==null?void 0:oe.contents)==null?void 0:Bl.filter(wl=>fa==null?void 0:fa.find(cn=>cn===(wl==null?void 0:wl.label))),$e.value=(Jl=oe==null?void 0:oe.contents)==null?void 0:Jl.filter(wl=>fa==null?void 0:fa.find(cn=>cn===(wl==null?void 0:wl.label))),(or=oe==null?void 0:oe.contents)!=null&&or.some(wl=>(wl==null?void 0:wl.label)==="OCR识别")&&!((Kl=ya.value)!=null&&Kl.some(wl=>(wl==null?void 0:wl.label)==="OCR识别"))){const wl=(hr=oe==null?void 0:oe.contents)==null?void 0:hr.find(cn=>(cn==null?void 0:cn.label)==="OCR识别");ya.value=[...ya.value,wl],$e.value=[...$e.value,wl]}E.value=!!(fa!=null&&fa.find(wl=>wl==="搜索")),$.value=!!(fa!=null&&fa.find(wl=>wl==="块状显示"))}else ya.value=oe==null?void 0:oe.contents,$e.value=oe==null?void 0:oe.contents;else ya.value=[],$e.value=[];ya.value=[...ya.value,...Ye],$e.value=[...$e.value,...Ye],typeof Ge.value=="string"&&Ge.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((qr=ya.value)!=null&&qr.some(fa=>(fa==null?void 0:fa.label)==="OCR识别")||(ya.value=[...ya.value||[],{label:"OCR识别"}]),(vr=$e.value)!=null&&vr.some(fa=>(fa==null?void 0:fa.label)==="OCR识别")||($e.value=[...$e.value||[],{label:"OCR识别"}])):(ya.value=(ya.value||[]).filter(fa=>(fa==null?void 0:fa.label)!=="OCR识别"),$e.value=($e.value||[]).filter(fa=>(fa==null?void 0:fa.label)!=="OCR识别")),(dr=ya.value)!=null&&dr.some(fa=>(fa==null?void 0:fa.label)==="切换视图")||(ya.value=[...ya.value||[],{label:"切换视图"}]),(pr=$e.value)!=null&&pr.some(fa=>(fa==null?void 0:fa.label)==="切换视图")||($e.value=[...$e.value||[],{label:"切换视图"}]),Ze.value=((Ht=Ce==null?void 0:Ce.value)==null?void 0:Ht.length)??0,Rt(Ce.value),Yr.value=Ce.value,zl.value&&(te.value=(qt=(Ut=se.value)==null?void 0:Ut.filter(fa=>(fa==null?void 0:fa.label)!=="操作"))==null?void 0:qt.map(fa=>{var wl;return{...fa,type:"edit",optionUrl:fa!=null&&fa.formMenuSelect&&((wl=fa==null?void 0:fa.formMenuSelect)==null?void 0:wl.length)>0?{groupSelect:fa==null?void 0:fa.groupSelect,menuSelect:fa==null?void 0:fa.formMenuSelect,selectRelateType:"",type:fa==null?void 0:fa.formType}:null}}),st())};a.watch(()=>[u.itemData,ar.value,wn.value,gn.value,Ma==null?void 0:Ma.value],async()=>{var d,v,T,z,F,N;if((d=u==null?void 0:u.itemData)!=null&&d.find(ne=>(ne==null?void 0:ne.key)==="columnPath")&&!((v=H.value)!=null&&v.find(ne=>{var oe,K;return(ne==null?void 0:ne.key)===((K=(oe=u==null?void 0:u.itemData)==null?void 0:oe.find(Ne=>(Ne==null?void 0:Ne.key)==="columnPath"))==null?void 0:K.contents)}))){let ne=H.value,oe={key:(z=(T=u==null?void 0:u.itemData)==null?void 0:T.find(K=>(K==null?void 0:K.key)==="columnPath"))==null?void 0:z.contents,value:(N=(F=u==null?void 0:u.itemData)==null?void 0:F.find(K=>(K==null?void 0:K.key)==="columnUsingPath"))==null?void 0:N.contents};ne!=null&&ne.find(K=>(K==null?void 0:K.key)===(oe==null?void 0:oe.key))?ne=ne==null?void 0:ne.map(K=>((K==null?void 0:K.key)===(oe==null?void 0:oe.key)&&(K.value=oe.value),K)):ne.push(oe),Fe.setTableViewContents(ne)}await Pt(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.operatingForm,d=>{d!=null&&d.form&&(Li(d==null?void 0:d.form),ue.value=d==null?void 0:d.dialogTitle,ba.value=!0,U.value=!0)},{immediate:!0,deep:!0});const yu=()=>{var d;(d=V.value)!=null&&d.includes("read")&&(zl.value=!zl.value)},gu=()=>{gr.value=!gr.value};a.watch(()=>{var d;return(d=u==null?void 0:u.config)==null?void 0:d.viewport},d=>{var v;V.value=d,(d==null?void 0:d.length)===0?zl.value=!1:(d!=null&&d.includes("read")||(zl.value=!0),d!=null&&d.includes("edit")||(zl.value=!1)),D.value=((v=u==null?void 0:u.config)==null?void 0:v.showIndex)||zl.value},{immediate:!0}),a.watch(()=>zl.value,d=>{var v;d?(st("viewChange"),Fe.setCacheUpdatingData(null)):(ya.value=$e.value,te.value=da.value,P.value&&(Fe.setTableLoading(u==null?void 0:u.index),Se("change",P.value))),D.value=d||((v=u==null?void 0:u.config)==null?void 0:v.showIndex),ur.value=[]},{immediate:!0}),a.watch(()=>{var d;return(d=Un.value)==null?void 0:d.length},d=>{d===0&&(ie.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===ie.pageSize&&(ie.currentPage=Math.ceil(((T=Ce.value)==null?void 0:T.length)/ie.pageSize))},ku=async(d,v,T)=>{var F,N,ne,oe,K;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(z&&uo.includes(z)&&T!==void 0&&T!==null&&String(T).trim()!==""){const Ne=String(T).trim();if(await tt(Ne,d==null?void 0:d.id)){Ka.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ue=(F=Ce.value)==null?void 0:F.findIndex(Ye=>(Ye==null?void 0:Ye.id)===(d==null?void 0:d.id)),He=Ue!==-1?(ne=(N=Ce.value)==null?void 0:N[Ue])==null?void 0:ne[z]:void 0;z&&(d[z]=He??"");return}}if(zl.value){const Ne=d==null?void 0:d.id;Ne!=null&&(m.value.has(Ne)||m.value.set(Ne,L.cloneDeep(d)),c.value.add(Ne));const Te=(oe=Ce.value)==null?void 0:oe.findIndex(Ue=>(Ue==null?void 0:Ue.id)===(d==null?void 0:d.id));Te!==-1&&z&&(Ce.value[Te]={...Ce.value[Te],[z]:T}),po(T,d,v);return}po(T,d,v),ir.value=L.cloneDeep(d),Ia.value=d==null?void 0:d.id,Ze.value=(K=Ce.value)==null?void 0:K.length,ue.value=d!=null&&d._isTemp?"新增":"编辑",Ri(!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(z=>{if(typeof z=="string"&&z.includes("content_")){const F=z.split("_")[1];F&&(T.push(`content_${F}`),T.push(`struct_${F}`))}})),T.length===0&&(u!=null&&u.itemData)){const z=(v=(d=u.itemData)==null?void 0:d.find(F=>(F==null?void 0:F.key)==="contentTableId"))==null?void 0:v.contents;z&&(T.push(`content_${z}`),T.push(`struct_${z}`))}return T}catch(T){return console.error("获取 tableNames 失败:",T),[]}},wu=async(d,v,T)=>{var N,ne;if(!T||typeof T!="string"||T.trim()===""){const oe=(v==null?void 0:v.property)??(v==null?void 0:v.prop),K=`${d==null?void 0:d.id}:${oe}`;p.value.delete(K),y.value.set(K,!1);return}const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),F=`${d==null?void 0:d.id}:${z}`;y.value.set(F,!0);try{const oe=await xu();if(oe.length===0){console.warn("未找到同名表,跳过全局搜索"),p.value.delete(F),y.value.set(F,!1);return}const K=parseInt((N=Al.value)==null?void 0:N.plat_id);if(!K){console.warn("platId 无效,跳过全局搜索"),p.value.delete(F),y.value.set(F,!1);return}const Ne=await L.getAllTables({platId:K,tableNames:oe??[]}),Te=((ne=Ne==null?void 0:Ne.data)==null?void 0:ne.result)||[],Ue=[],He=[];for(let Ye=0;Ye<Te.length;Ye+=2)Ye+1<Te.length&&He.push([Te[Ye],Te[Ye+1]]);He.forEach(([Ye,va])=>{var Ua;if(!Array.isArray(Ye)||Ye.length===0||!Array.isArray(va)||va.length===0)return;const Fa=va[0];let Wa=((Ua=Fa==null?void 0:Fa.结构)==null?void 0:Ua.contents)??[];if(!Array.isArray(Wa)||Wa.length===0)return;let ca=L.cloneDeep(Wa);if(Array.isArray(ca==null?void 0:ca[0])&&(ca=me.getColumnChild(ca[0])),!Array.isArray(ca)||ca.length===0||!ca.some(ye=>(ye==null?void 0:ye.prop)===z))return;[...Ye].sort((ye,Ca)=>{const ua=Number((ye==null?void 0:ye.update_time)??0);return Number((Ca==null?void 0:Ca.update_time)??0)-ua}).slice(0,20).forEach(ye=>{const Ca=ye[z];if(Ca!=null){const ua=String(Ca);ua.toLowerCase().includes(T.toLowerCase())&&Ue.findIndex(Da=>{var A;return ye.id&&((A=Da.rowData)==null?void 0:A.id)===ye.id?!0:Da.label===ua})===-1&&Ue.push({label:ua,rowData:L.cloneDeep(ye),sourceTable:(Fa==null?void 0:Fa.source_table)||""})}})}),p.value.set(F,Ue)}catch(oe){console.error("全局搜索建议失败:",oe),p.value.delete(F)}finally{y.value.set(F,!1)}},_u=(d,v,T)=>{if(!zl.value)return;const z=(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 N=`${d==null?void 0:d.id}:${z}`;if(h.has(N)&&clearTimeout(h.get(N)),!T||T.trim()===""){p.value.delete(N),y.value.set(N,!1);return}const ne=setTimeout(()=>{wu(d,{prop:z,property:z},T),h.delete(N)},300);h.set(N,ne)};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 p.value.get(T)||[]}const Eu=(d,v,T)=>{var Te;if(!T||!T.rowData)return;const z=T.rowData,F=d==null?void 0:d.id,N=(v==null?void 0:v.property)??(v==null?void 0:v.prop),oe=(me.getAllLeafNodes(te.value)||[]).filter(Ue=>(Ue==null?void 0:Ue.type)!=="operate"&&(Ue==null?void 0:Ue.label)!=="操作"&&(Ue==null?void 0:Ue.prop)!=="operate");oe.forEach(Ue=>{const He=Ue==null?void 0:Ue.prop;He&&z[He]!==void 0&&(d[He]=z[He])});const K=(Te=Ce.value)==null?void 0:Te.findIndex(Ue=>(Ue==null?void 0:Ue.id)===F);K!==-1&&oe.forEach(Ue=>{const He=Ue==null?void 0:Ue.prop;He&&z[He]!==void 0&&(Ce.value[K][He]=z[He])}),F!=null&&(m.value.has(F)||m.value.set(F,L.cloneDeep(d)),c.value.add(F));const Ne=`${F}:${N}`;p.value.delete(Ne),y.value.set(Ne,!1),po(d[N],d,v)},Ur=d=>{var K,Ne,Te,Ue,He,Ye,va,Fa,Wa,ca,Za;const{row:v,column:T,item:z,slotData:F}=d;let N=v!=null&&v[T==null?void 0:T.prop]||(v==null?void 0:v[T==null?void 0:T.prop])===0?((Ne=(K=v==null?void 0:v[T==null?void 0:T.prop])==null?void 0:K[0])==null?void 0:Ne.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]):((Ue=(Te=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:Te[0])==null?void 0:Ue.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((Ye=(He=F==null?void 0:F[z==null?void 0:z.prop])==null?void 0:He[0])==null?void 0:Ye.contents)??(F==null?void 0:F[z==null?void 0:z.prop])??((Wa=(Fa=v==null?void 0:v[(va=z==null?void 0:z.child)==null?void 0:va.prop])==null?void 0:Fa[0])==null?void 0:Wa.contents)??(v==null?void 0:v[(ca=z==null?void 0:z.child)==null?void 0:ca.prop]),oe=Array.isArray(N)&&!(N!=null&&N.every(ka=>typeof ka=="string"||typeof ka=="number"))?"查看":N;if(oe=Array.isArray(oe)?oe.join(","):oe,(T==null?void 0:T.formType)==="Date")if(!oe||oe===""||oe===null||oe===void 0)oe="";else{const ka=Pn.dayjs(oe,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);oe=ka.isValid()?ka.format("YYYYMMDD"):oe??""}return Array.isArray(T==null?void 0:T.relatedPages)&&((Za=T==null?void 0:T.relatedPages)==null?void 0:Za.length)>0&&(oe="详情页"),oe},Cu=d=>{var Ne,Te,Ue,He,Ye,va,Fa,Wa,ca,Za;const{row:v,column:T,item:z,slotData:F}=d;let N=v!=null&&v[T==null?void 0:T.prop]?((Te=(Ne=v==null?void 0:v[T==null?void 0:T.prop])==null?void 0:Ne[0])==null?void 0:Te.contents)??(v==null?void 0:v[T==null?void 0:T.prop]):((He=(Ue=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:Ue[0])==null?void 0:He.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((va=(Ye=F==null?void 0:F[z==null?void 0:z.prop])==null?void 0:Ye[0])==null?void 0:va.contents)??(F==null?void 0:F[z==null?void 0:z.prop])??((ca=(Wa=v==null?void 0:v[(Fa=z==null?void 0:z.child)==null?void 0:Fa.prop])==null?void 0:Wa[0])==null?void 0:ca.contents)??(v==null?void 0:v[(Za=z==null?void 0:z.child)==null?void 0:Za.prop]);const oe=Array.isArray(N)&&!(N!=null&&N.every(ka=>typeof ka=="string"||typeof ka=="number")),K=Array.isArray(N)&&(N==null?void 0:N.find(ka=>ka==null?void 0:ka.url));return oe&&K},Du=d=>{var F,N;if(!(d!=null&&d.column))return!1;const v=Ge.value==="试验任务/任务管理",T=(u==null?void 0:u.compName)==="任务列表",z=((F=d==null?void 0:d.column)==null?void 0:F.label)==="任务状态"||((N=d==null?void 0:d.column)==null?void 0:N.prop)==="任务状态";return v&&T&&z},Nu=(d,v)=>d.find(T=>Object.values(T).some(z=>z===v));return a.watch(()=>ce.value,async d=>{if(d){la.setContentLoading(!0),await a.nextTick();const v=Nu(Ce.value,d==null?void 0:d.data);if(!v)return la.setContentLoading(!1);await Kn(d==null?void 0:d.data,null,v,{data:d==null?void 0:d.data}),la.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 z,F,N,ne,oe;if(换,String(T==null?void 0:T.compId)===String(u==null?void 0:u.index)&&(T!=null&&T.resId)&&((z=T==null?void 0:T.data)!=null&&z.id)){const K=(F=T==null?void 0:T.data)==null?void 0:F.id,Ne=T==null?void 0:T.resId;if(Ce.value=(N=Ce.value)==null?void 0:N.map(Te=>{if((Te==null?void 0:Te.id)===K){const Ue={...Te,id:Ne};return delete Ue._isOCRRow,delete Ue._ocrTableId,Ue}return Te}),(oe=(ne=qe.value)==null?void 0:ne.has)!=null&&oe.call(ne,K)){const Ue={...qe.value.get(K)||{},id:Ne};delete Ue._isOCRRow,delete Ue._ocrTableId,qe.value.delete(K),qe.value.set(Ne,Ue)}La(u==null?void 0:u.index,K,Ne)}}):String(d==null?void 0:d.compId)===String(u==null?void 0:u.index)&&(Ce.value=(v=Ce.value)==null?void 0:v.map(T=>{var z;if((T==null?void 0:T.id)===((z=d==null?void 0:d.data)==null?void 0:z.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 ca,Za,ka,Ua;const T=a.resolveComponent("svg-icon"),z=a.resolveComponent("el-popover"),F=a.resolveComponent("el-switch"),N=a.resolveComponent("el-checkbox"),ne=a.resolveComponent("el-radio"),oe=a.resolveComponent("el-radio-group"),K=a.resolveComponent("el-checkbox-group"),Ne=a.resolveComponent("el-button"),Te=a.resolveComponent("el-icon"),Ue=a.resolveComponent("el-progress"),He=a.resolveComponent("el-alert"),Ye=a.resolveComponent("el-table-column"),va=a.resolveComponent("el-table"),Fa=a.resolveComponent("el-upload"),Wa=a.resolveComponent("el-text");return a.openBlock(),a.createElementBlock("div",P0,[Pr.value?(a.openBlock(),a.createBlock(nl.ssTable,{id:"excel-table",pageObj:ie,showIndex:D.value,isTree:(ca=l.compItem)==null?void 0:ca.isTree,summaryInfo:G,columns:te.value,defaultSort:ae,isCardViewport:gr.value,checkedColumns:n.value,key:nn.value+te.value,tableData:Un.value,isEditViewport:zl.value,isShowPagination:oa.value,isShowEdit:!1,isShowDelete:!1,allowSelect:w.value,onDbClickRow:to,extraButton:ya.value,rowButton:Sa.value,cacheExtraButtons:$e.value,isClearSelection:((Za=ur.value)==null?void 0:Za.length)===0,onDoCurrentChange:bn,onDoSizeChange:Ai,onSortChange:Vo,onContentClick:Kn,onRowClick:so,onSelectChange:qo,onCellChange:ku,onCellInput:_u,onSelectSuggest:Eu,onChange:po,onPreview:Wn,onSubmitEditingTable:Qi,onHandleColEditChange:Ji,onHandleColTypeChange:Xi,onClickButton:$n,onAddNewRow:jr,bottomButton:M.value},a.createSlots({headerButton:a.withCtx(ye=>{var Ca,ua,Ea,Da;return[l.showHeader?(a.openBlock(),a.createBlock(bf,{key:0,id:"tableHeaderButton",pageLayout:l.pageLayout,lockingPage:a.unref(ge)===a.unref(Ge),filterValues:Xo.value,selectNums:(Ca=ur.value)==null?void 0:Ca.length,dataNums:(ua=Ce.value)==null?void 0:ua.length,compName:l.compName,isDevMode:l.isDevMode,buttons:ye.buttons,menuFilter:(Da=(Ea=l.compItem)==null?void 0:Ea.component)==null?void 0:Da.menuFilter,onButtonClick:v[1]||(v[1]=(A,X,Re)=>$n(A,X,{extra:Re})),columns:te.value,onFilter:Zo,onGetImportData:Po,level:l.level,filterShow:E.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var ye,Ca,ua,Ea;return[((ye=Ce.value)==null?void 0:ye.length)>0&&l.allowOperate&&$.value?(a.openBlock(),a.createElementBlock("div",U0,[(Ca=V.value)!=null&&Ca.includes("read")&&((ua=V.value)!=null&&ua.includes("edit"))&&((Ea=Sa.value)!=null&&Ea.some(Da=>(Da==null?void 0:Da.label)==="编辑"))&&!gr.value&&a.unref(ge)!==a.unref(Ge)?(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:ye,index:Ca})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ua=>bu(ye,Ca)},[a.createVNode(T,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,q0)]),operateCol:a.withCtx(()=>[a.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:pu},{reference:a.withCtx(()=>[a.createElementVNode("span",W0,[a.createVNode(T,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",K0,[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]=ye=>ao(ye))},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]=ye=>n.value=ye),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,ye=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ye.label},[a.createVNode(N,{value:ye.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:ye.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(ye.label),9,G0)]),_:2},1032,["value"]),a.createVNode(z,{"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 Ca;return[a.createElementVNode("div",Y0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ca=Object.keys(ye))==null?void 0:Ca.filter(ua=>{var Ea;return(Ea=j.value)==null?void 0:Ea.find(Da=>(Da==null?void 0:Da.value)===ua)}),ua=>{var Ea,Da;return a.openBlock(),a.createElementBlock("div",{key:ua},[O[ua]=="radio"?(a.openBlock(),a.createElementBlock("div",J0,[v[19]||(v[19]=a.createElementVNode("div",null,"固定:",-1)),a.createVNode(oe,{"model-value":ye==null?void 0:ye[ua],onChange:A=>Nn(A,ua,ye)},{default:a.withCtx(()=>{var A,X;return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((X=(A=j.value)==null?void 0:A.find(Re=>(Re==null?void 0:Re.value)===ua))==null?void 0:X.options,Re=>(a.openBlock(),a.createBlock(ne,{key:Re==null?void 0:Re.value,label:Re==null?void 0:Re.value,value:Re==null?void 0:Re.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(Re==null?void 0:Re.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):a.createCommentVNode("",!0),O[ua]=="switch"?(a.openBlock(),a.createBlock(F,{key:1,"model-value":ye==null?void 0:ye[ua],"active-text":(Da=(Ea=j.value)==null?void 0:Ea.find(A=>(A==null?void 0:A.value)===ua))==null?void 0:Da.label,onChange:A=>Nn(A,ua,ye)},null,8,["model-value","active-text","onChange"])):a.createCommentVNode("",!0)])}),128))])]}),_:2},1024),a.createElementVNode("span",X0,[a.createVNode(T,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(ye=>{var Ca,ua,Ea,Da,A,X,Re,ra,_e,sa,Na,il,Ya,ul,pl,Pl,Ga,vl,Ha,sl;return[((Ca=ye==null?void 0:ye.column)==null?void 0:Ca.label)==="证书附件"||((ua=ye==null?void 0:ye.column)==null?void 0:ua.prop)==="证书附件"?(a.openBlock(),a.createElementBlock("div",Z0,[a.createVNode(T,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Xa=>Jr(ye),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Cu(ye)?(a.openBlock(),a.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",Q0,a.toDisplayString(Ur(ye)),1)]),default:a.withCtx(()=>{var Xa,cl;return[a.createElementVNode("div",e3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((cl=ye==null?void 0:ye.row)==null?void 0:cl[(Xa=ye==null?void 0:ye.column)==null?void 0:Xa.prop],xl=>(a.openBlock(),a.createElementBlock("div",a3,[a.createElementVNode("div",{class:"prop-url",title:li(xl),onClick:Dl=>Yo(xl)},a.toDisplayString(li(xl)),9,l3),a.createElementVNode("div",{class:"prop-download",onClick:Dl=>pi(xl)}," 下载 ",8,r3)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[Du(ye)?(a.openBlock(),a.createBlock(Pu,{key:0,value:Ur(ye)},null,8,["value"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"table-cell-content",style:a.normalizeStyle({color:!Array.isArray(Ur(ye))&&((Da=(Ea=Ur(ye))==null?void 0:Ea.toString())!=null&&Da.includes(".txt")||(X=(A=Ur(ye))==null?void 0:A.toString())!=null&&X.includes(".cpt")||(ra=(Re=Ur(ye))==null?void 0:Re.toString())!=null&&ra.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ur(ye))&&((sa=(_e=Ur(ye))==null?void 0:_e.toString())!=null&&sa.includes(".txt")||(il=(Na=Ur(ye))==null?void 0:Na.toString())!=null&&il.includes(".cpt")||(ul=(Ya=Ur(ye))==null?void 0:Ya.toString())!=null&&ul.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ur(ye))&&((Pl=(pl=Ur(ye))==null?void 0:pl.toString())!=null&&Pl.includes(".txt")||(vl=(Ga=Ur(ye))==null?void 0:Ga.toString())!=null&&vl.includes(".cpt")||(sl=(Ha=Ur(ye))==null?void 0:Ha.toString())!=null&&sl.includes(".cyd"))?"pointer":"",marginLeft:(ye==null?void 0:ye.colIndex)===0?`${((ye==null?void 0:ye.level)??0)*20}px`:0}),onClick:Xa=>{var cl;return On(Ur(ye),((cl=ye==null?void 0:ye.column)==null?void 0:cl.relatedPages)??[])}},a.toDisplayString(Ur(ye)===0?"0":Ur(ye)),13,n3))],64))]}),_:2},[((ka=Sa.value)==null?void 0:ka.length)>0?{name:"actions",fn:a.withCtx(({item:ye,fIndex:Ca})=>[a.createVNode(z,{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",j0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Jo(Sa.value,ye),(ua,Ea)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:Ea,onClick:a.withModifiers(Da=>$n(ua==null?void 0:ua.label,ye,{extra:ua}),["stop"])},[a.createElementVNode("div",{style:a.normalizeStyle({color:ua==null?void 0:ua.textColor}),class:"extra-button-label"},a.toDisplayString(ua==null?void 0:ua.label),5)],8,H0))),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),zl.value?(a.openBlock(),a.createElementBlock("div",i3,[a.createVNode(Ne,{id:"themeBorderButton",onClick:Uo},{default:a.withCtx(()=>v[22]||(v[22]=[a.createTextVNode("取消")])),_:1,__:[22]}),a.createVNode(Ne,{class:"ok-button",id:"themeButton",onClick:zi},{default:a.withCtx(()=>v[23]||(v[23]=[a.createTextVNode("保存")])),_:1,__:[23]})])):a.createCommentVNode("",!0),a.createVNode(_r.ssDialog,{title:ue.value,visible:U.value,width:Ll.value,onBeforeDestroy:lo,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",o3,[a.createVNode(nl.ssForm,{ref_key:"formRef",ref:W,rowContents:$a.value,showOperator:!1,onChange:fu,isEnableWrap:!1,onFixChangeValue:Ii,onClickTrigger:ro,isEdit:Aa.value,onBlurChange:Wo,onCreate:eo,onTagChange:an},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[ba.value?(a.openBlock(),a.createElementBlock("div",t3,[a.createVNode(Ne,{onClick:v[4]||(v[4]=ye=>U.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>v[24]||(v[24]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[24]}),a.createVNode(Ne,{class:"ok-button",onClick:v[5]||(v[5]=ye=>Ri(!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(_r.ssDialog,{title:ue.value,visible:we.value,width:na.value,onBeforeDestroy:v[7]||(v[7]=ye=>we.value=!1)},{default:a.withCtx(()=>[a.createVNode(Af)]),footer:a.withCtx(()=>[a.createElementVNode("div",s3,[a.createVNode(Ne,{onClick:v[6]||(v[6]=ye=>we.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>v[26]||(v[26]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[26]}),a.createVNode(Ne,{class:"ok-button",onClick:Oi,id:"themeButton"},{default:a.withCtx(()=>v[27]||(v[27]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),Ta.value?(a.openBlock(),a.createBlock(nl.ssFilePreview,{key:2,fileDataList:le.value,onDestroy:Bn},null,8,["fileDataList"])):a.createCommentVNode("",!0),De.value?(a.openBlock(),a.createBlock(_r.ssDialog,{key:3,visible:De.value,onBeforeDestroy:uu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(Co.ThreeViewerHost,{files:Pa.value,threeData:ke.value},null,8,["files","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(_r.ssDialog,{title:"OCR扫描录入",visible:al.value,"close-on-click-modal":!1,onBeforeDestroy:ll,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",c3,[a.createElementVNode("div",u3,[a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:be.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:be.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:be.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)]),be.value===1?(a.openBlock(),a.createElementBlock("div",d3,[a.createVNode(Ne,{onClick:nt,class:"ocr-action-btn",disabled:ol.value,size:"default"},{default:a.withCtx(()=>v[33]||(v[33]=[a.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),a.createVNode(Ne,{onClick:Wl,class:"ocr-action-btn",disabled:ol.value,size:"default"},{default:a.withCtx(()=>v[34]||(v[34]=[a.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):a.createCommentVNode("",!0),be.value===1?(a.openBlock(),a.createElementBlock("div",p3,[a.createElementVNode("div",f3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ia.value,(ye,Ca)=>{var ua;return a.openBlock(),a.createElementBlock("div",{key:Ca,class:"ocr-file-item"},[a.createElementVNode("div",h3,[ye.raw&&((ua=ye.raw.type)!=null&&ua.startsWith("image/"))?(a.openBlock(),a.createElementBlock("img",{key:0,src:kl(ye),alt:"预览",class:"thumbnail-image"},null,8,v3)):(a.openBlock(),a.createElementBlock("div",m3,[a.createVNode(Te,{size:40},{default:a.withCtx(()=>[a.createVNode(a.unref(Ka.document_default))]),_:1})])),a.createElementVNode("div",{class:a.normalizeClass(["file-progress-ring",{uploading:rl(ye)==="uploading",processing:rl(ye)==="processing",completed:rl(ye)==="completed"||rl(ye)==="uploaded",failed:rl(ye)==="failed"}])},[(a.openBlock(),a.createElementBlock("svg",y3,[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:rl(ye)==="completed"||rl(ye)==="uploaded",uploading:rl(ye)==="uploading",processing:rl(ye)==="processing",failed:rl(ye)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:rl(ye)==="failed"?"#f56c6c":rl(ye)==="completed"||rl(ye)==="uploaded"?"#67c23a":"#409eff","stroke-width":rl(ye)==="completed"||rl(ye)==="uploaded"||rl(ye)==="failed"?3:2,"stroke-dasharray":lr(ye),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,g3)])),rl(ye)==="completed"||rl(ye)==="uploaded"?(a.openBlock(),a.createElementBlock("div",b3,[a.createVNode(Te,{class:"check-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ka.check_default))]),_:1})])):a.createCommentVNode("",!0),rl(ye)==="failed"?(a.openBlock(),a.createElementBlock("div",k3,[a.createVNode(Te,{class:"error-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ka.close_default))]),_:1})])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:"file-delete-btn",onClick:Ea=>vi(Ca)},[a.createVNode(Te,null,{default:a.withCtx(()=>[a.createVNode(a.unref(Ka.close_default))]),_:1})],8,x3)]),a.createElementVNode("div",w3,a.toDisplayString(ye.name||"文件名123"),1)])}),128))]),ia.value.length>0?(a.openBlock(),a.createElementBlock("div",_3,[a.createVNode(Ne,{onClick:xe,class:"ocr-start-recognize-btn",disabled:ol.value||ia.value.length===0,size:"default"},{default:a.withCtx(()=>v[36]||(v[36]=[a.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),be.value===1?(a.openBlock(),a.createElementBlock("div",S3,[a.createVNode(Ue,{percentage:de.value,"stroke-width":8},null,8,["percentage"])])):a.createCommentVNode("",!0),be.value===2?(a.openBlock(),a.createElementBlock("div",E3,[a.createElementVNode("div",C3,[a.createVNode(He,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",D3,[a.createVNode(va,{data:pa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(Ye,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ea.value,ye=>(a.openBlock(),a.createBlock(Ye,{key:ye.prop,prop:ye.prop,"min-width":ye.minWidth||230,"class-name":ye.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",N3,[a.createElementVNode("span",null,a.toDisplayString(ye.label),1)])]),default:a.withCtx(({row:Ca,$index:ua})=>{var Ea,Da,A;return[ye.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:el(Ca[ye.prop]),fontWeight:500})},a.toDisplayString(Ba(Ca[ye.prop])),5)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[_a.value!==ua?(a.openBlock(),a.createElementBlock("span",B3,a.toDisplayString(Ca[ye.prop]),1)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Xe(ye.prop)),{key:1,modelValue:Ca[ye.prop],"onUpdate:modelValue":X=>Ca[ye.prop]=X,size:"small",placeholder:"请输入"+ye.label,content:((Ea=Je(ye.prop))==null?void 0:Ea.contents)??((Da=Je(ye.prop))==null?void 0:Da.options)??[],optionUrl:(A=Je(ye.prop))==null?void 0:A.optionUrl,onChange:X=>aa(ua,ye.prop,X),onFocus:X=>tl.value=ye.prop,onBlur:v[8]||(v[8]=X=>tl.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),a.createVNode(Ye,{label:"编辑",width:"80",fixed:"right"},{default:a.withCtx(({$index:ye})=>[_a.value===ye?(a.openBlock(),a.createBlock(Te,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:a.withModifiers(Ca=>Ja(ye),["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(Ka.check_default))]),_:2},1032,["onClick"])):(a.openBlock(),a.createBlock(T,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:a.withModifiers(Ca=>Ja(ye),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0),be.value===3?(a.openBlock(),a.createElementBlock("div",T3,[a.createVNode(Te,{size:"32",class:"ocr-success-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ka.check_default))]),_:1}),v[37]||(v[37]=a.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):a.createCommentVNode("",!0)]),a.createVNode(Fa,{ref:"ocrUploadRef","file-list":ia.value,"onUpdate:fileList":v[9]||(v[9]=ye=>ia.value=ye),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":J,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:a.withCtx(()=>[be.value!==3?(a.openBlock(),a.createElementBlock("div",A3,[a.createVNode(Ne,{onClick:Hr,class:"ocr-start-recognize-btn",disabled:be.value===1||ol.value},{default:a.withCtx(()=>v[39]||(v[39]=[a.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),a.createVNode(Ne,{onClick:Er,class:"ocr-start-recognize-btn",disabled:ol.value},{default:a.withCtx(()=>v[40]||(v[40]=[a.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):a.createCommentVNode("",!0)]),_:1},8,["visible"]),a.createVNode(Yf,{visible:hi.value,onConfirm:it,onCancel:v[10]||(v[10]=ye=>hi.value=!1)},null,8,["visible"]),a.createVNode(wd,{visible:Oa.value,"onUpdate:visible":v[11]||(v[11]=ye=>Oa.value=ye),versions:Ra.value},null,8,["visible","versions"]),a.createVNode(sd,{visible:za.value,"onUpdate:visible":v[12]||(v[12]=ye=>za.value=ye),images:Ie.value,"default-image-name":El.value,"field-meta":_a.value!==null?((Ua=pa.value[_a.value])==null?void 0:Ua.__ocrFieldMeta)||{}:{},"focused-field-name":tl.value,onClose:v[13]||(v[13]=ye=>za.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),a.createVNode(Od,{visible:Ol.value,"onUpdate:visible":v[14]||(v[14]=ye=>Ol.value=ye),candidates:Gl.value,"name-prop":Fr.value,"mfr-prop":Ul.value,columns:te.value,onSubmit:Ar,onPreviewFile:sn},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),a.createVNode(jd,{visible:wa.value,"onUpdate:visible":v[15]||(v[15]=ye=>wa.value=ye),ocrPreviewData:pa.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=ye=>pa.value=ye),ocrSelectedFields:Va.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=ye=>Va.value=ye),ocrPreviewColumns:ea.value,onConfirm:Be,onFieldChange:v[18]||(v[18]=({rowIndex:ye,prop:Ca,value:ua})=>aa(ye,Ca,ua))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),a.createVNode(_r.ssDialog,{title:t.title,visible:t.show,width:t.width,onBeforeDestroy:x},{default:a.withCtx(()=>[a.createElementVNode("div",z3,[a.createVNode(nl.ssForm,{rowContents:t==null?void 0:t.contents,formRules:t==null?void 0:t.formRules,showOperator:!1,buttonValue:t.buttonValue,isEdit:Aa.value,isStartJustify:!1,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),a.createVNode(_r.ssDialog,{title:o.title,visible:o.show,width:o.width,alignCenter:!0,onBeforeDestroy:f},{header:a.withCtx(()=>[a.createVNode(Wa,{size:"small",type:"danger",style:{width:"100%"}},{default:a.withCtx(()=>v[41]||(v[41]=[a.createTextVNode("(选择【覆盖】,可能会影响到原数据的引用关系;选择【取消】将会放弃重复数据的导入。请谨慎操作!)")])),_:1,__:[41]})]),footer:a.withCtx(()=>[a.createElementVNode("div",M3,[a.createVNode(Wa,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:a.withCtx(()=>[a.createTextVNode("引用模块:"+a.toDisplayString(Mn.value||"暂无"),1)]),_:1}),a.createElementVNode("div",I3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o==null?void 0:o.buttonValue,ye=>(a.openBlock(),a.createBlock(Ne,{key:ye==null?void 0:ye.label,style:a.normalizeStyle({background:ye==null?void 0:ye.background,color:ye==null?void 0:ye.color}),onClick:Ca=>b(ye==null?void 0:ye.value)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(ye==null?void 0:ye.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:a.withCtx(()=>[a.createVNode(kf,{columns:o==null?void 0:o.columns,tableData:o==null?void 0:o.tableData},{content:a.withCtx(({row:ye,item:Ca,slotData:ua,scope:Ea,column:Da,columnProp:A,$index:X})=>[a.createTextVNode(a.toDisplayString((ye==null?void 0:ye[(Da==null?void 0:Da.prop)||(Da==null?void 0:Da.label)])||(ua==null?void 0:ua[Da==null?void 0:Da.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["title","visible","width"])])}}},Tc=er._export_sfc(L3,[["__scopeId","data-v-9e786e03"]]),$3={key:1,class:"static-form-body"},R3=["onClick"],V3={key:1},F3=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,i=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 ie=G==null?void 0:G.value;Array.isArray(ie)&&(ie=ie.map(fe=>fe==null?"":typeof fe=="object"?fe.label??fe.value??fe.name??JSON.stringify(fe):String(fe)).filter(Boolean).join(",")),ie!=null&&typeof ie=="object"&&(ie=ie.label??ie.value??ie.name??JSON.stringify(ie));const Se=G.isHideInForm?"":G.label??"",te=ie==null||ie===""?"-":String(ie),Z=Se==="使用状态";return{label:Se,value:te,isStatus:Z,tagType:Z?s(te):"",width:G.width??1,field:G}})}),m=a.ref(null),p=a.ref(null),h=k=>{if(Array.isArray(k)&&k.length>=3){const[g,$,R,G]=k;return G!==void 0?`rgba(${g}, ${$}, ${R}, ${G})`:`rgb(${g}, ${$}, ${R})`}if(typeof k=="string"){const g=k.trim();if(g.startsWith("[")&&g.endsWith("]")){const $=g.slice(1,-1).split(",").map(R=>Number(R.trim()));if($.length>=3&&$.every(R=>!Number.isNaN(R))){const[R,G,ie,Se]=$;return Se!==void 0?`rgba(${R}, ${G}, ${ie}, ${Se})`:`rgb(${R}, ${G}, ${ie})`}}return g}},y=a.computed(()=>{const k=Number(n==null?void 0:n.textSize),g=h(n==null?void 0:n.textColor),$={},R={},G={},ie={};return!Number.isNaN(k)&&k&&($.fontSize=`${k}px`,R.fontSize=`${k+1}px`,G.fontSize=`${k}px`,ie.fontSize=`${k}px`),g&&(R.color=g,G.color=g,ie.color=g),{item:$,label:R,value:G,empty:ie}}),u=a.ref(""),w=a.ref(""),D=a.ref(!1),V=async k=>{if(k){w.value&&(URL.revokeObjectURL(w.value),w.value="");try{const g=await L.platformDownloadFile({url:k}),$=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});w.value=URL.createObjectURL($)}catch{w.value=""}}};a.watch(()=>n==null?void 0:n.backGroundImage,k=>{k&&(u.value=k)},{immediate:!0}),a.watch(u,k=>{V(k)},{immediate:!0});const E=()=>{var k;(k=p.value)==null||k.click()},Y=async k=>{var R,G,ie;const g=k.target,$=(R=g==null?void 0:g.files)==null?void 0:R[0];if(!$){g.value="";return}D.value=!0;try{const Se=new FormData;Se.append("file",$);const te=await L.platformUploadFile(Se),Z=(ie=(G=te==null?void 0:te.data)==null?void 0:G.result)==null?void 0:ie.url;Z?(u.value=Z,i("update:backGroundImage",Z),V(Z),Ka.ElMessage.success("背景图片上传成功")):Ka.ElMessage.error("背景图片上传失败")}catch{Ka.ElMessage.error("背景图片上传失败")}finally{D.value=!1,g.value=""}},M=a.computed(()=>w.value?{backgroundImage:`url(${w.value})`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),O=k=>nl.getComponent(k),j=k=>{if(!k)return;const g=k.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},C=(k,g,$)=>{n.disabled||(m.value=g,a.nextTick(()=>{j($.currentTarget)}))},S=()=>{m.value=null},_=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 $=a.resolveComponent("el-tag");return a.openBlock(),a.createElementBlock("div",{class:"static-form-card",style:a.normalizeStyle(M.value),onClick:g[2]||(g[2]=R=>(n==null?void 0:n.backGround)==="Yes"&&E())},[(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=>E(),["stop"]))},[a.createElementVNode("input",{ref_key:"bgUploadRef",ref:p,type:"file",accept:"image/*",style:{display:"none"},onChange:Y},null,544),g[3]||(g[3]=a.createElementVNode("img",{src:nl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):a.createCommentVNode("",!0),c.value.length?(a.openBlock(),a.createElementBlock("div",$3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,(R,G)=>{var ie,Se,te,Z,fe,ae,se,De,Pe;return a.openBlock(),a.createElementBlock("div",{key:G,class:"static-form-item",style:a.normalizeStyle({..._(R),...y.value.item}),onClick:g[1]||(g[1]=a.withModifiers(()=>{},["stop"]))},[R.label&&!((ie=R==null?void 0:R.field)!=null&&ie.isHideInForm)?(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:ke=>{var B;return(B=R.field)!=null&&B.isNoClick?null:C(R,G,ke)}},[m.value===G&&R.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(O(((Se=R.field)==null?void 0:Se.type)??"Input")),{key:0,modelValue:R.field.value,"onUpdate:modelValue":ke=>R.field.value=ke,isEdit:!0,disabled:(te=R.field)==null?void 0:te.disabled,content:((Z=R.field)==null?void 0:Z.contents)??[],optionUrl:R.field,originalValue:(fe=R.field)==null?void 0:fe.value,config:(ae=R.field)==null?void 0:ae.config,configModel:((se=R.field)==null?void 0:se.prop)??((De=R.field)==null?void 0:De.name),selectedTagList:((Pe=R.field)==null?void 0:Pe.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($,{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",V3,a.toDisplayString(R.value??"-"),1))],64))],12,R3)],4)}),128))])):(a.openBlock(),a.createElementBlock("div",{key:2,class:"static-form-empty",style:a.normalizeStyle(y.value.empty)}," 暂无数据 ",4))],4)}}}),Ac=er._export_sfc(F3,[["__scopeId","data-v-01ad92e2"]]),P3={class:"form-content"},j3={title:"选择标签"},H3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},U3={class:"col-operate-wrap"},q3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},W3={__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,p.value=!1,h.value=[]},i=l;a.computed(()=>{var W;const ue=(W=We.value)==null?void 0:W.split("/");return(ue==null?void 0:ue.some(Me=>(Me==null?void 0:Me.includes("updateLoading"))||(Me==null?void 0:Me.includes("loading"))))?!1:De.value==="view"});const s=r,c=a.ref([]),m=a.ref(!1),p=a.ref(!1),h=a.ref([]),{getFileExtension:y}=Co.useThreeSystem(),u=a.ref(),w=a.ref(!1),D=a.ref(!1),V=L.useUnit(L.pinia),{chooseTitle:E}=L.storeToRefs(V),Y=a.ref([]),M=a.ref(),O=a.ref(!1),j=a.ref([]),C=dc(L.pinia),S=Bt(L.pinia),_=a.ref(!1),k=a.ref(),g=a.ref(),$=a.ref(),R=a.ref(),G=a.ref(),ie=L.useLoginState(L.pinia),{loginUserInfo:Se}=L.storeToRefs(ie),te=a.ref(),Z=a.ref(!0),fe=L.useModelComp(L.pinia),{tableViewContents:ae,itemData:se,isEdit:De,routeToChildPath:Pe,lockingPage:ke,homepageBackgroundTableId:B}=L.storeToRefs(fe),q=a.ref(null),re=a.ref(!1),Ae=a.ref(!1),Ee=L.useMenuState(),{activeMenuPath:We}=L.storeToRefs(Ee),da=me.useOriginalState(L.pinia),{originalPath:Ta}=L.storeToRefs(da),{compType:le,hasEditable:la}=Xs.useRole(),ve=()=>!la(i.config,{type:le.FORM});a.computed(()=>We.value==="设备管理/试验设备"&&i.compName==="设备概要");const Ge=async()=>{var W,Me,we;const ue=B==null?void 0:B.value,U=(W=Se==null?void 0:Se.value)==null?void 0:W.plat_id;if(!(!ue||!U))try{const na=await L.getAllTables({platId:parseInt(U),tableNames:[`content_${ue}`,`struct_${ue}`],user_unique_id:"0"}),ta=((we=(Me=na==null?void 0:na.data)==null?void 0:Me.result)==null?void 0:we[0])??[],Sa=String((i==null?void 0:i.index)??""),ba=ta==null?void 0:ta.find(Pa=>String(Pa==null?void 0:Pa.relatedForm_id)===Sa);ba!=null&&ba.backgroundImg_url&&(R.value=ba.backgroundImg_url)}catch(na){console.error("获取首页背景图片表数据失败:",na)}},Oe=a.ref([]),ce=a.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ze=async ue=>{Ae.value=ue,await he("disabled",null,ue,!0)},Fe=async ue=>{await he("operable",null,ue,!0)};a.watch(()=>We.value,async()=>{c.value=[],h.value=[]},{deep:!0,immediate:!0});const xa=()=>{a.nextTick(()=>{Q()})},Ma=ue=>{var U;c.value=(U=c.value)==null?void 0:U.map(W=>({...W,isFormColHidden:!(ue!=null&&ue.includes(W.label))}))};a.onUnmounted(()=>{q.value=null});const P=ue=>{s("clickTrigger",ue)},H=async ue=>{var U,W,Me,we,na,ta;if(ue===""){let Sa="";(U=c.value)==null||U.forEach($e=>{$e!=null&&$e.isMain&&(Sa=$e==null?void 0:$e.value)});let ba=await me.getItemData(Pe.value,sessionStorage.getItem("systemKey"),"");Sa=((ta=(na=(we=(Me=(W=ba==null?void 0:ba[0])==null?void 0:W.compData)==null?void 0:Me.find($e=>($e==null?void 0:$e.key)==="mainRouters"))==null?void 0:we.contents)==null?void 0:na[0])==null?void 0:ta.routerContent)+Ta.value+Sa;let ya=await me.getItemData(Sa,sessionStorage.getItem("systemKey"),"");O.value=!0,j.value=ya==null?void 0:ya.filter($e=>($e==null?void 0:$e.comp)!=="methodButton"),s("routeUrl",j.value)}},Q=()=>{var U;const ue=(U=q.value)==null?void 0:U.$el;ue&&Nl.Sortable.create(ue,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:W=>{const{oldIndex:Me,newIndex:we}=W;if(Me===we)return;const na=c.value.splice(Me,1)[0];c.value.splice(we,0,na)}})},he=async(ue,U,W,Me=!1)=>{try{fe.setRefreshCurStructure(!1)}catch{Ka.ElMessage.error("编辑处理失败")}},ge=async(ue,U)=>{await he()},ha=async(ue,U)=>{ue&&await he()},Qe=async(ue,U,W)=>{await he(U,W,ue,!1)},pe=(ue,U)=>{te.value===U?Z.value=!1:Z.value=!0,te.value=U==null?void 0:U.changeProp},Ce=async ue=>{var ta;R.value=ue;const U=i.itemData,W=U==null?void 0:U.find(Sa=>(Sa==null?void 0:Sa.key)==="backGroundImage");W?W.contents=ue:U==null||U.push({key:"backGroundImage",contents:ue}),s("change",{key:"backGroundImage",contents:ue});const Me=B==null?void 0:B.value,we=i==null?void 0:i.index,na=(ta=Se==null?void 0:Se.value)==null?void 0:ta.plat_id;if(!(!Me||!na||!we||!ue))try{await L.pageBatchAddApi({platId:parseInt(na),changeContents:[{tableName:`content_${Me}`,tableContents:[{backgroundImg_url:ue,relatedForm_id:String(we)}]}],user_unique_id:"0"})}catch(Sa){console.error("保存背景图片记录失败:",Sa),Ka.ElMessage.error("背景图片记录保存失败")}},ma=async ue=>{var W,Me,we,na,ta,Sa,ba,Pa,ya,$e,$a,fl,Sl,Xl,bl;let U=[];if((W=ue==null?void 0:ue.toString())!=null&&W.includes(".urdf")){if(ue.includes(",")){Ka.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[{url:ue,extension:y(ue)}],p.value=!0,m.value=!0;return}if((Me=ue==null?void 0:ue.toString())!=null&&Me.includes(".stl")||(we=ue==null?void 0:ue.toString())!=null&&we.includes(".STL")||(na=ue==null?void 0:ue.toString())!=null&&na.includes(".obj")||(ta=ue==null?void 0:ue.toString())!=null&&ta.includes(".mtl")){const qa=((Sa=ue==null?void 0:ue.toString())==null?void 0:Sa.split(",")).map(Rl=>({url:Rl,extension:y(Rl)}));h.value=qa,p.value=!1,m.value=!0;return}if((ba=ue==null?void 0:ue.toString())!=null&&ba.includes(".stl")||(Pa=ue==null?void 0:ue.toString())!=null&&Pa.includes(".STL")||(ya=ue==null?void 0:ue.toString())!=null&&ya.includes(".obj")||($e=ue==null?void 0:ue.toString())!=null&&$e.includes(".mtl")){let Vl,qa=[],Rl={};if(Array.isArray(ue)?Vl=ue:Vl=ue==null?void 0:ue.split(","),Vl==null||Vl.forEach(Il=>{Il.includes(".mtl")?qa.push(Il):Rl.blob=Rl.blob?Rl.blob+","+Il:Il}),(qa==null?void 0:qa.length)>0&&(Rl.mtlBlobs=qa),(fl=($a=Object.values(Rl))==null?void 0:$a[0])!=null&&fl.includes("http:"))U.push(Rl);else{const Il=new Blob([Rl.blob],{type:"application/octet-stream;charset=UTF-8"});let La=URL.createObjectURL(Il),al="";(Sl=ue==null?void 0:ue.split("/"))==null||Sl.forEach((ol,ia)=>{var ja;ia===((ja=ue==null?void 0:ue.split("/"))==null?void 0:ja.length)-1&&(al=ol)}),(Xl=Rl.blob)!=null&&Xl.includes(".stl")&&(al=(al==null?void 0:al.replaceAll(">",""))+".urdf"),M.value=[{name:al,blobUrl:La}],D.value=!0}}else{const Vl=Pi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),qa=await Ka.axios.get(ue,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Vl.close()}),Rl=new Blob([qa.data],{type:"application/octet-stream;charset=UTF-8"});let Il=URL.createObjectURL(Rl),La="";(bl=ue==null?void 0:ue.split("/"))==null||bl.forEach((al,ol)=>{var ia;ol===((ia=ue==null?void 0:ue.split("/"))==null?void 0:ia.length)-1&&(La=al)}),M.value=[{name:La,blobUrl:Il}],D.value=!0}(U==null?void 0:U.length)>0&&S.setBlobUrls(U)},qe=()=>{D.value=!1},Ia=ue=>{var na,ta,Sa,ba;const U=(ta=(na=nl.safeClone(i.itemData))==null?void 0:na.find(Pa=>(Pa==null?void 0:Pa.key)==="formContent"))==null?void 0:ta.contents,W=nl.safeClone(ue.content);let Me={};W&&((Sa=Object.values(W))==null?void 0:Sa.length)>0&&((ba=Object.values(W))==null||ba.forEach((Pa,ya)=>{Me[U[ya].key]=Pa}));const we={content:Me,index:i==null?void 0:i.index,buttonName:ue==null?void 0:ue.buttonName};s("change",we)};a.computed(()=>"http://222.92.178.198:62001");const Aa=async ue=>{var $a,fl,Sl,Xl,bl,Vl,qa,Rl,Il,La,al,ol,ia,ja,Oa,Ra;if(!ue)return;(fl=($a=i==null?void 0:i.itemData)==null?void 0:$a.find(be=>(be==null?void 0:be.key)==="parentFormPath"))==null||fl.contents;let U=ae.value;(U==null?void 0:U.length)>0&&(U=U==null?void 0:U.map(be=>{var Le,de,wa,pa;let ga=(Le=be==null?void 0:be.key)==null?void 0:Le.split("/");return(i==null?void 0:i.compName)===(ga==null?void 0:ga[0])&&(de=c.value)!=null&&de.find(ea=>(ea==null?void 0:ea.prop)===(ga==null?void 0:ga[1]))&&(be.value=(pa=(wa=c.value)==null?void 0:wa.find(ea=>(ea==null?void 0:ea.prop)===(ga==null?void 0:ga[1])))==null?void 0:pa.value),be}),fe.setTableViewContents(U));const W=nl.safeClone(i.itemData);let Me=W==null?void 0:W.map(be=>{var ga;return(be==null?void 0:be.key)==="formContent"&&((ga=be.contents)==null||ga.map((Le,de)=>{var wa,pa,ea,Je,Xe,dl,Ve,Va,_a,tl,za,Ie,El,Ol,Gl,Hl,Zl,Sr,Fl,fr,Fr;return Le.type=(pa=(wa=c.value)==null?void 0:wa.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:pa.type,Le.options=Le!=null&&Le.options?Le.options:((Xe=(Je=(ea=Le==null?void 0:Le.key)==null?void 0:ea.split("$"))==null?void 0:Je[1])==null?void 0:Xe.length)>0?(_a=(Va=Ru((Ve=(dl=Le==null?void 0:Le.key)==null?void 0:dl.split("$"))==null?void 0:Ve[1]))==null?void 0:Va.split(","))==null?void 0:_a.map(Ul=>({label:Ul,value:Ul})):[],(tl=Le==null?void 0:Le.key)!=null&&tl.includes("$")&&(Le.key=(Ie=(za=Le==null?void 0:Le.key)==null?void 0:za.split("$"))==null?void 0:Ie[0]),Le.signature=(Ol=(El=c.value)==null?void 0:El.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Ol.signature,Le.isLoginUser=(Hl=(Gl=c.value)==null?void 0:Gl.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Hl.isLoginUser,Le.value=(Zl=Object.values(ue))==null?void 0:Zl[de],Le.isFormColHidden=(Fl=(Sr=c.value)==null?void 0:Sr.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Fl.isFormColHidden,Le.isHideInForm=(Fr=(fr=c.value)==null?void 0:fr.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Fr.isHideInForm,Le})),be}),we=c.value,na=(Xl=(Sl=nl.safeClone(Me))==null?void 0:Sl.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:Xl.contents;if(we=we==null?void 0:we.map(be=>{var ga,Le;return(be==null?void 0:be.type)==="Select"&&((ga=be==null?void 0:be.allSelectionContents)==null?void 0:ga.length)>0&&(be.contactValue=ue),be.value=(Le=na==null?void 0:na.find((de,wa)=>((de==null?void 0:de.id)??wa)===(be==null?void 0:be.id)))==null?void 0:Le.value,be}),!Z.value){s("contentChange",{contents:Me,index:i.index});return}let ta="",Sa=(qa=(Vl=(bl=nl.safeClone(Me))==null?void 0:bl.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:Vl.contents)==null?void 0:qa.find((be,ga)=>{var Le,de,wa;return(be==null?void 0:be.label)===te.value||ga.toString()===((wa=(de=(Le=te.value)==null?void 0:Le.split("t"))==null?void 0:de[1])==null?void 0:wa.toString())}),ba=(Rl=Sa==null?void 0:Sa.optionUrl)==null?void 0:Rl.menuSelect,Pa=!0;if((al=(La=(Il=nl.safeClone(Me))==null?void 0:Il.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:La.contents)==null||al.forEach(be=>{var ga,Le,de,wa,pa,ea;Pa&&((de=(Le=(ga=be==null?void 0:be.optionUrl)==null?void 0:ga.groupSelect)==null?void 0:Le[1])!=null&&de.includes("["))&&(ta=(pa=(wa=be==null?void 0:be.optionUrl)==null?void 0:wa.groupSelect)==null?void 0:pa[1],JSON.stringify(ba)===JSON.stringify((ea=be==null?void 0:be.optionUrl)==null?void 0:ea.menuSelect)&&(Pa=!1))}),(ol=Sa==null?void 0:Sa.optionUrl)!=null&&ol.menuSelect&&Z.value){let be=await kt(Sa),ga,Le=(ia=Sa==null?void 0:Sa.optionUrl)==null?void 0:ia.menuSelect;if(be==null||be.forEach(de=>{var wa,pa,ea,Je,Xe,dl,Ve,Va,_a,tl;ta===((pa=(wa=Sa==null?void 0:Sa.optionUrl)==null?void 0:wa.groupSelect)==null?void 0:pa[1])&&((Xe=(Je=(ea=Sa==null?void 0:Sa.optionUrl)==null?void 0:ea.groupSelect)==null?void 0:Je[1])!=null&&Xe.includes("["))&&((tl=nl.safeClone(de))==null?void 0:tl[(_a=(Va=(Ve=(dl=Sa==null?void 0:Sa.optionUrl)==null?void 0:dl.groupSelect)==null?void 0:Ve[1])==null?void 0:Va.replaceAll("[",""))==null?void 0:_a.replaceAll("]","")])===(Sa==null?void 0:Sa.value)&&(ga=de)}),ga){let de=nl.safeClone(we);de=de==null?void 0:de.map(pa=>{var ea,Je,Xe,dl,Ve,Va,_a,tl,za,Ie,El;return(ga!=null&&ga[pa==null?void 0:pa.label]||ga!=null&&ga[(dl=(Xe=(Je=(ea=pa==null?void 0:pa.optionUrl)==null?void 0:ea.groupSelect)==null?void 0:Je[1])==null?void 0:Xe.replaceAll("[",""))==null?void 0:dl.replaceAll("]","")])&&((_a=(Va=(Ve=pa==null?void 0:pa.optionUrl)==null?void 0:Ve.groupSelect)==null?void 0:Va[1])!=null&&_a.includes("["))&&Le!=null&&Le.every(Ol=>{var Gl,Hl;return(Hl=(Gl=pa==null?void 0:pa.optionUrl)==null?void 0:Gl.menuSelect)==null?void 0:Hl.includes(Ol)})&&(pa.value=(ga==null?void 0:ga[pa==null?void 0:pa.label])||(ga==null?void 0:ga[(El=(Ie=(za=(tl=pa==null?void 0:pa.optionUrl)==null?void 0:tl.groupSelect)==null?void 0:za[1])==null?void 0:Ie.replaceAll("[",""))==null?void 0:El.replaceAll("]","")]),Array.isArray(pa.value)&&pa.value.every(Ol=>(Ol==null?void 0:Ol.url)&&(Ol==null?void 0:Ol.name))&&(pa.type="Upload")),pa}),de=de==null?void 0:de.map(pa=>{var ea,Je,Xe;return(ea=pa==null?void 0:pa.optionUrl)!=null&&ea.oldMenuSelect&&(pa.optionUrl.menuSelect=(Xe=(Je=nl.safeClone(pa))==null?void 0:Je.optionUrl)==null?void 0:Xe.oldMenuSelect),pa}),c.value=nl.safeClone(de);let wa=nl.safeClone(de);wa=wa==null?void 0:wa.map(pa=>{var ea,Je,Xe,dl,Ve,Va;return(Je=(ea=pa==null?void 0:pa.optionUrl)==null?void 0:ea.menuSelect)!=null&&Je.some(_a=>_a==null?void 0:_a.includes("["))&&(pa.optionUrl.oldMenuSelect=(dl=(Xe=nl.safeClone(pa))==null?void 0:Xe.optionUrl)==null?void 0:dl.menuSelect,pa.optionUrl.menuSelect=(Va=(Ve=pa==null?void 0:pa.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:Va.map(_a=>{var tl,za,Ie,El;if(_a!=null&&_a.includes("[")){let Ol=(za=(tl=_a==null?void 0:_a.replaceAll("[","").replaceAll("]",""))==null?void 0:tl.split(":"))==null?void 0:za[1];_a=(El=(Ie=nl.safeClone(de))==null?void 0:Ie.find(Gl=>(Gl==null?void 0:Gl.label)===Ol))==null?void 0:El.value}return _a})),pa}),c.value=wa}else c.value=we;Me=Me==null?void 0:Me.map(de=>{var wa;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(wa=de.contents)==null?void 0:wa.map(pa=>{var ea,Je,Xe,dl;return pa.value=((Je=(ea=c.value)==null?void 0:ea.find(Ve=>(Ve==null?void 0:Ve.label)===(pa==null?void 0:pa.key)))==null?void 0:Je.value)??(pa==null?void 0:pa.value),pa.type=((dl=(Xe=c.value)==null?void 0:Xe.find(Ve=>(Ve==null?void 0:Ve.prop)===(pa==null?void 0:pa.key)))==null?void 0:dl.type)??(pa==null?void 0:pa.type),pa})),de})}Z.value=!1,s("contentChange",{contents:Me,index:i.index});let ya=[],$e=[];if((Oa=nl.safeClone((ja=Me==null?void 0:Me.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:ja.contents))==null||Oa.forEach(be=>{var ga;Array.isArray(be==null?void 0:be.value)&&((ga=be==null?void 0:be.value)!=null&&ga.find(Le=>{var de;return(de=Le==null?void 0:Le.url)==null?void 0:de.includes(".obj")}))&&($e=be==null?void 0:be.value)}),($e==null?void 0:$e.length)>0){const be=(Ra=nl.safeClone($e))==null?void 0:Ra.filter(ga=>{var Le;return(Le=ga==null?void 0:ga.url)==null?void 0:Le.includes(".obj")});be==null||be.forEach(ga=>{var de,wa,pa,ea;const Le=(de=$e==null?void 0:$e.filter(Je=>{var Xe;return(Je==null?void 0:Je.name)===(ga==null?void 0:ga.name)&&((Xe=Je==null?void 0:Je.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:de.map(Je=>Je==null?void 0:Je.url);ya.push({objUrl:ga==null?void 0:ga.url,mtlUrls:((wa=$e==null?void 0:$e.filter(Je=>{var Xe;return(Je==null?void 0:Je.name)===(ga==null?void 0:ga.name)&&((Xe=Je==null?void 0:Je.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:wa.length)===1?(ea=(pa=$e==null?void 0:$e.filter(Je=>{var Xe;return(Je==null?void 0:Je.name)===(ga==null?void 0:ga.name)&&((Xe=Je==null?void 0:Je.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:pa[0])==null?void 0:ea.url:Le})}),S.setObjUrl(ya)}},Ze=(ue,U,W)=>{let Me="";const we=U==null?void 0:U.map(na=>{var ta;return(ta=na==null?void 0:na.value)==null?void 0:ta.pageData});return we==null||we.forEach(na=>{var ta;(na==null?void 0:na.name)===(ue==null?void 0:ue[0])&&((ta=na==null?void 0:na.compData)==null||ta.forEach(Sa=>{var ba;(Sa==null?void 0:Sa.key)==="formContent"&&((ba=Sa==null?void 0:Sa.contents)==null||ba.forEach(Pa=>{var ya;(Pa==null?void 0:Pa.prop)===(ue==null?void 0:ue[1])&&(Me=(Pa==null?void 0:Pa.value)===""?me.judgeContents((ya=nl.safeClone(Pa))==null?void 0:ya.optionUrl,W):Pa==null?void 0:Pa.value)}))}))}),Me},oa=(ue,U,W,Me)=>{var Sa,ba;let we="",na="";(Sa=nl.safeClone(U))==null||Sa.forEach((Pa,ya)=>{Pa!=null&&Pa.includes("[")?na=na+Ta.value+ue[ya]:na=na===""?na+Pa:na+"/"+Pa});let ta=(ba=Me[na])==null?void 0:ba.map(Pa=>{var ya;return(ya=Pa==null?void 0:Pa.value)==null?void 0:ya.pageData});return ta==null||ta.forEach(Pa=>{var ya;(Pa==null?void 0:Pa.name)===(W==null?void 0:W[0])&&((ya=Pa==null?void 0:Pa.compData)==null||ya.forEach($e=>{var $a;($e==null?void 0:$e.key)==="formContent"&&(($a=$e==null?void 0:$e.contents)==null||$a.forEach(fl=>{(fl==null?void 0:fl.prop)===(W==null?void 0:W[1])&&(we=fl==null?void 0:fl.value)}))}))}),we};return a.watch(()=>B==null?void 0:B.value,async()=>{await Ge()},{immediate:!0}),a.watch(()=>i.itemData,async()=>{var $a,fl,Sl,Xl,bl,Vl,qa,Rl,Il,La,al,ol,ia,ja,Oa,Ra,be,ga,Le,de,wa,pa,ea;const ue=($a=i.itemData)==null?void 0:$a.find(Je=>(Je==null?void 0:Je.key)==="formContent"),U=(fl=nl.safeClone(i.itemData))==null?void 0:fl.find(Je=>(Je==null?void 0:Je.key)==="formButton"),W=(Sl=nl.safeClone(i.itemData))==null?void 0:Sl.find(Je=>(Je==null?void 0:Je.key)==="formFlex"),Me=(Xl=nl.safeClone(i.itemData))==null?void 0:Xl.find(Je=>(Je==null?void 0:Je.key)==="formWrap"),we=(bl=nl.safeClone(i.itemData))==null?void 0:bl.find(Je=>(Je==null?void 0:Je.key)==="enableWrap"),na=(Vl=nl.safeClone(i.itemData))==null?void 0:Vl.find(Je=>(Je==null?void 0:Je.key)==="textSize"),ta=(qa=nl.safeClone(i.itemData))==null?void 0:qa.find(Je=>(Je==null?void 0:Je.key)==="textRGBA"),Sa=(Rl=nl.safeClone(i.itemData))==null?void 0:Rl.find(Je=>(Je==null?void 0:Je.key)==="backGround"),ba=(Il=nl.safeClone(i.itemData))==null?void 0:Il.find(Je=>(Je==null?void 0:Je.key)==="backGroundImage");(Me==null?void 0:Me.contents)==="纵向"?w.value=!1:w.value=!0;const Pa=Number(na==null?void 0:na.contents);k.value=Number.isNaN(Pa)?void 0:Pa,g.value=ta==null?void 0:ta.contents,$.value=Sa==null?void 0:Sa.contents,R.value=ba==null?void 0:ba.contents;const ya=we==null?void 0:we.contents;if(ya===void 0?_.value=ti.BLOCK:typeof ya=="boolean"?_.value=ya?ti.ORDINARY:ti.BLOCK:_.value=ya,G.value=typeof(W==null?void 0:W.contents)!="boolean"?!(!(W!=null&&W.contents)===""||((La=W==null?void 0:W.contents)==null?void 0:La.toUpperCase())==="VERTICAL"):W==null?void 0:W.contents,((al=ue==null?void 0:ue.contents)==null?void 0:al.length)>0&&Array.isArray(ue==null?void 0:ue.contents)){let Je=i.allMapContents;const Xe=(ia=(ol=nl.safeClone(ue))==null?void 0:ol.contents)==null?void 0:ia.map((Ie,El)=>{var Ar,yr,zr,Mr,ir,xn,Yr,nn,zn,wn,gn,on,ar;let Ol=(Ie==null?void 0:Ie.label)??(Ie==null?void 0:Ie.key)??"";Ie==null||Ie.type;let Gl=(Ie==null?void 0:Ie.options)??[];if((Ar=Ie==null?void 0:Ie.key)!=null&&Ar.includes("$")&&(Ol=(yr=nl.safeClone(Ie==null?void 0:Ie.key).split("$"))==null?void 0:yr[0],((Mr=(zr=nl.safeClone(Ie==null?void 0:Ie.key).split("$"))==null?void 0:zr[1])==null?void 0:Mr.length)>0)){const[ql,Al]=(xn=(ir=nl.safeClone(Ie==null?void 0:Ie.key).split("$"))==null?void 0:ir[1])==null?void 0:xn.split(/[()]/);(Yr=me.FormType.find(Ll=>(Ll==null?void 0:Ll.key)===ql))==null||Yr.value,((nn=Al==null?void 0:Al.split(","))==null?void 0:nn.length)>0&&(Gl=(zn=Al==null?void 0:Al.split(","))==null?void 0:zn.map(Ll=>({label:Ll,value:Ll})))}let Hl=Ie==null?void 0:Ie.options;((wn=Ie==null?void 0:Ie.optionUrl)==null?void 0:wn.selectRelateType)==="自定义绑定"&&(Hl=(on=(gn=Ie==null?void 0:Ie.optionUrl)==null?void 0:gn.defaultSelect)==null?void 0:on.map(ql=>({label:ql,value:ql})));let Zl=(Ie==null?void 0:Ie.menuPath)??[],Sr=(Ie==null?void 0:Ie.groups)??[],Fl=(Ie==null?void 0:Ie.columns)??[],fr=!1,Fr=(Ie==null?void 0:Ie.isFormColHidden)??!1,Ul="",rr=Ie!=null&&Ie.value?Ie.value:(Hl==null?void 0:Hl.length)>0?(ar=Hl==null?void 0:Hl[0])==null?void 0:ar.value:(Ie==null?void 0:Ie.value)??"",$r=!1,Br="Input";return((Hl==null?void 0:Hl.length)>0||(Zl==null?void 0:Zl.length)>0)&&(Br="Select"),(Array.isArray(Ul)&&(Ul!=null&&Ul.every(ql=>(ql==null?void 0:ql.name)&&(ql==null?void 0:ql.url)))||Array.isArray(rr)&&(rr!=null&&rr.every(ql=>(ql==null?void 0:ql.name)&&(ql==null?void 0:ql.url))))&&(Br="upload"),Ie!=null&&Ie.isMainUrl&&(Br="Url"),{label:Ol??"",name:Ol??"t"+El,prop:Ol??nl.safeClone(Ie==null?void 0:Ie.key),type:(Ie==null?void 0:Ie.type)??Br,value:(Ie==null?void 0:Ie.type)==="Date"&&rr===""?new Date:rr,id:(Ie==null?void 0:Ie.id)??El,contents:(Hl==null?void 0:Hl.length)>0?Hl:Gl??[],width:(Ie==null?void 0:Ie.width)??1,isLoginUser:fr,config:Ie==null?void 0:Ie.config,optionUrl:(Ie==null?void 0:Ie.optionUrl)??Ie,isFormColHidden:Fr,isHideInForm:(Ie==null?void 0:Ie.isHideInForm)??!1,signature:$r,isMain:Ie==null?void 0:Ie.isMain,required:(Ie==null?void 0:Ie.required)??!1,isMainUrl:Ie==null?void 0:Ie.isMainUrl,operable:(Ie==null?void 0:Ie.operable)??!1,disabled:(Ie==null?void 0:Ie.disabled)??!1,isSync:Ie==null?void 0:Ie.isSync,menus:Zl,groups:Sr,words:Fl,allSelectionContents:Ie==null?void 0:Ie.allContents,filterContent:Ie==null?void 0:Ie.filterContents,isNoClick:(Ie==null?void 0:Ie.isNoClick)??!1}}),dl=Xe==null?void 0:Xe.map(Ie=>Ie==null?void 0:Ie.value);let Ve="";dl==null||dl.forEach(Ie=>{Ie!==""&&Ie!==void 0&&(Ve=Ve===""?Ie:Ve+"/"+Ie)}),C.setSelectArray(dl),C.setSelectString(Ve);let Va=(ja=nl.safeClone(Xe))==null?void 0:ja.map(Ie=>(Ie!=null&&Ie.value&&me.IsJson(Ie==null?void 0:Ie.value)&&Array.isArray(JSON.parse(Ie==null?void 0:Ie.value))&&(Ie.value=JSON.parse(Ie.value)),Ie)),_a={};Va==null||Va.forEach(Ie=>{_a[Ie.label]=Ie==null?void 0:Ie.value}),Va=Va==null?void 0:Va.map(Ie=>{var El,Ol,Gl,Hl,Zl,Sr,Fl,fr,Fr;if((Ie==null?void 0:Ie.type)==="Select"&&((El=Ie==null?void 0:Ie.allSelectionContents)==null?void 0:El.length)>0&&(Ie.contactValue=_a),(Gl=(Ol=Ie==null?void 0:Ie.optionUrl)==null?void 0:Ol.menuSelect)!=null&&Gl.some(Ul=>Ul==null?void 0:Ul.includes("["))){let Ul="";Ie.optionUrl.oldMenuSelect=(Zl=(Hl=nl.safeClone(Ie))==null?void 0:Hl.optionUrl)==null?void 0:Zl.menuSelect,Ie.optionUrl.menuSelect=(Fl=(Sr=Ie==null?void 0:Ie.optionUrl)==null?void 0:Sr.menuSelect)==null?void 0:Fl.map(rr=>{var $r,Br,Rr,Ar,yr,zr;if(rr!=null&&rr.includes("[")){let Mr=(Br=($r=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:$r.split(":"))==null?void 0:Br[1];Ul=Ze((Rr=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:Rr.split(":"),Je==null?void 0:Je[We.value],Je),rr=((yr=(Ar=nl.safeClone(Va))==null?void 0:Ar.find(ir=>(ir==null?void 0:ir.label)===Mr))==null?void 0:yr.value)||Ze((zr=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:zr.split(":"),Je==null?void 0:Je[We.value],Je)}return rr}),Ul!==""&&Ie.value===""&&(Ie.value=oa(Ie.optionUrl.menuSelect,Ie.optionUrl.oldMenuSelect,(fr=Ie==null?void 0:Ie.optionUrl)==null?void 0:fr.groupSelect,Je),Array.isArray(Ie.value)&&((Fr=Ie.value)!=null&&Fr.every(rr=>rr==null?void 0:rr.url))&&(Ie.type="UPLOAD"))}return Ie}),c.value=Va,Ae.value=((Oa=c.value)==null?void 0:Oa.every(Ie=>Ie==null?void 0:Ie.disabled))||ke.value===We.value,re.value=(Ra=c.value)==null?void 0:Ra.every(Ie=>Ie==null?void 0:Ie.operable),Oe.value=(be=c.value)==null?void 0:be.map(Ie=>Ie==null?void 0:Ie.label);let tl=[],za=[];if((ga=nl.safeClone(c.value))==null||ga.forEach(Ie=>{var El;Array.isArray(Ie==null?void 0:Ie.value)&&((El=Ie==null?void 0:Ie.value)!=null&&El.find(Ol=>{var Gl;return(Gl=Ol==null?void 0:Ol.url)==null?void 0:Gl.includes(".obj")}))&&(za=Ie==null?void 0:Ie.value)}),(za==null?void 0:za.length)>0){const Ie=(Le=nl.safeClone(za))==null?void 0:Le.filter(El=>{var Ol;return(Ol=El==null?void 0:El.url)==null?void 0:Ol.includes(".obj")});Ie==null||Ie.forEach(El=>{var Gl,Hl,Zl,Sr;const Ol=(Gl=za==null?void 0:za.filter(Fl=>{var fr;return(Fl==null?void 0:Fl.name)===(El==null?void 0:El.name)&&((fr=Fl==null?void 0:Fl.url)==null?void 0:fr.includes(".mtl"))}))==null?void 0:Gl.map(Fl=>Fl==null?void 0:Fl.url);tl.push({objUrl:El==null?void 0:El.url,mtlUrls:((Hl=za==null?void 0:za.filter(Fl=>{var fr;return(Fl==null?void 0:Fl.name)===(El==null?void 0:El.name)&&((fr=Fl==null?void 0:Fl.url)==null?void 0:fr.includes(".mtl"))}))==null?void 0:Hl.length)===1?(Sr=(Zl=za==null?void 0:za.filter(Fl=>{var fr;return(Fl==null?void 0:Fl.name)===(El==null?void 0:El.name)&&((fr=Fl==null?void 0:Fl.url)==null?void 0:fr.includes(".mtl"))}))==null?void 0:Zl[0])==null?void 0:Sr.url:Ol})}),S.setObjUrl(tl)}(de=nl.safeClone(c.value))==null||de.forEach(Ie=>{var El,Ol,Gl,Hl,Zl,Sr,Fl,fr,Fr,Ul,rr,$r,Br;if((Ol=(El=Ie==null?void 0:Ie.value)==null?void 0:El.toString())!=null&&Ol.includes(".stl")||(Hl=(Gl=Ie==null?void 0:Ie.value)==null?void 0:Gl.toString())!=null&&Hl.includes(".STL")||(Sr=(Zl=Ie==null?void 0:Ie.value)==null?void 0:Zl.toString())!=null&&Sr.includes(".obj")||(fr=(Fl=Ie==null?void 0:Ie.value)==null?void 0:Fl.toString())!=null&&fr.includes(".mtl")||(Ul=(Fr=Ie==null?void 0:Ie.value)==null?void 0:Fr.toString())!=null&&Ul.includes(".urdf")){let Rr={},Ar=[],yr;Array.isArray(Ie==null?void 0:Ie.value)?yr=Ie==null?void 0:Ie.value:yr=(rr=Ie==null?void 0:Ie.value)==null?void 0:rr.split(","),yr==null||yr.forEach(zr=>{zr.includes(".mtl")?Ar.push(zr):Rr.blob=Rr.blob==="undefined"?zr:Rr.blob+","+zr}),(Ar==null?void 0:Ar.length)>0&&(Rr.mtlBlobs=Ar),(Br=($r=Object.values(Rr))==null?void 0:$r[0])!=null&&Br.includes("http:")}})}else c.value=[];let $e=ae.value;if(($e==null?void 0:$e.length)>0&&($e=$e==null?void 0:$e.map(Je=>{var dl,Ve,Va,_a;let Xe=(dl=Je==null?void 0:Je.key)==null?void 0:dl.split("/");return(i==null?void 0:i.compName)===(Xe==null?void 0:Xe[0])&&(Ve=c.value)!=null&&Ve.find(tl=>(tl==null?void 0:tl.prop)===(Xe==null?void 0:Xe[1]))&&(Je.value=(_a=(Va=c.value)==null?void 0:Va.find(tl=>(tl==null?void 0:tl.prop)===(Xe==null?void 0:Xe[1])))==null?void 0:_a.value),Je}),fe.setTableViewContents($e)),i!=null&&i.formRules)u.value=i==null?void 0:i.formRules;else{let Je={};(wa=nl.safeClone(c).value)==null||wa.forEach(Xe=>{((Xe==null?void 0:Xe.isMain)===!0||(Xe==null?void 0:Xe.required)===!0)&&(Je[(Xe==null?void 0:Xe.prop)??(Xe==null?void 0:Xe.name)]=[{required:!0,message:`${(Xe==null?void 0:Xe.label)||(Xe==null?void 0:Xe.prop)||(Xe==null?void 0:Xe.name)}不能为空`}])}),u.value=Je}if(((pa=U==null?void 0:U.contents)==null?void 0:pa.length)>0){const Je=[];(ea=U==null?void 0:U.contents)==null||ea.forEach((Xe,dl)=>{(Xe==null?void 0:Xe.label)!==""&&Je.push({label:(Xe==null?void 0:Xe.label)??"",id:(Xe==null?void 0:Xe.id)??dl,type:(Xe==null?void 0:Xe.type)??"",background:Xe==null?void 0:Xe.background})}),Y.value=Je}else Y.value=[]},{deep:!0,immediate:!0}),a.watch(()=>ke.value,ue=>{Ae.value=ue===We.value},{immediate:!0}),(ue,U)=>{var Sa;const W=a.resolveComponent("svg-icon"),Me=a.resolveComponent("el-switch"),we=a.resolveComponent("el-checkbox"),na=a.resolveComponent("el-popover"),ta=a.resolveComponent("el-checkbox-group");return a.openBlock(),a.createElementBlock("div",P3,[_.value===a.unref(ti).TEXT?(a.openBlock(),a.createBlock(Ac,{key:0,itemData:l.itemData,compName:l.compName,fields:c.value,textSize:k.value,textColor:g.value,backGround:$.value,backGroundImage:R.value,disabled:Ae.value||ve(),"onUpdate:backGroundImage":Ce},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled"])):_.value===a.unref(ti).BLOCK?(a.openBlock(),a.createBlock(Cf,{key:1,items:(Sa=c.value)==null?void 0:Sa.map(ba=>({label:ba!=null&&ba.isHideInForm?"":ba==null?void 0:ba.label,value:ba==null?void 0:ba.value,width:(ba==null?void 0:ba.width)??1,field:ba})),textSize:k.value,textColor:g.value,backGround:$.value,backGroundImage:R.value,disabled:Ae.value||ve(),"onUpdate:backGroundImage":Ce},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass({"form-shadow-box":_.value===a.unref(ti).ORDINARY})},[a.createVNode(nl.ssForm,{rowContents:c.value,formRules:u.value,buttonValue:Y.value,isRowFlex:!1,isEnableWrap:!0,textSize:k.value,textColor:g.value,backGround:$.value,backGroundImage:R.value,onOnButtonClick:Ia,onChange:Aa,formDisabled:Ae.value||ve(),formLabelsOperable:re.value,isButtonRow:w.value,onPreview:ma,onBlurChange:pe,onHandleColEditChange:ge,onHandleColTypeChange:ha,onRouteUrl:H,onClickTrigger:P,"onUpdate:backGroundImage":Ce},{operateCol:a.withCtx(({renderColumns:ba,formDisabled:Pa,formLabelsOperable:ya})=>[a.createVNode(na,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:xa},{reference:a.withCtx(()=>[a.createElementVNode("span",j3,[a.createVNode(W,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",H3,[U[1]||(U[1]=a.createElementVNode("div",{class:"group-title"},"表单操作",-1)),a.createVNode(Me,{"model-value":Pa,"active-text":"禁用","inactive-text":"",onChange:ze,style:{"margin-right":"8px"}},null,8,["model-value"]),a.createVNode(Me,{"model-value":ya,"active-text":"编辑所有标签","inactive-text":"",onChange:Fe},null,8,["model-value"]),U[2]||(U[2]=a.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),a.createVNode(ta,{modelValue:Oe.value,"onUpdate:modelValue":U[0]||(U[0]=$e=>Oe.value=$e),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:q,onChange:Ma},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ba,$e=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:$e.label},[a.createVNode(we,{value:$e.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString($e.label),1)]),_:2},1032,["value"]),a.createVNode(na,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(W,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var $a;return[a.createElementVNode("div",U3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(($a=Object.keys($e))==null?void 0:$a.filter(fl=>{var Sl;return(Sl=ce.value)==null?void 0:Sl.find(Xl=>(Xl==null?void 0:Xl.value)===fl)}),fl=>{var Sl,Xl;return a.openBlock(),a.createElementBlock("div",{key:fl},[a.createVNode(nl._sfc_main$1,{value:$e==null?void 0:$e[fl],"active-text":(Xl=(Sl=ce.value)==null?void 0:Sl.find(bl=>(bl==null?void 0:bl.value)===fl))==null?void 0:Xl.label,inactiveText:"",onChange:bl=>Qe(bl,fl,$e)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",q3,[a.createVNode(W,{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)),D.value?(a.openBlock(),a.createBlock(nl.ssFilePreview,{key:3,fileDataList:M.value,onDestroy:qe},null,8,["fileDataList"])):a.createCommentVNode("",!0),m.value?(a.openBlock(),a.createBlock(_r.ssDialog,{key:4,visible:m.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:a.withCtx(()=>[a.createVNode(Co.ThreeViewerHost,{files:h.value,onGetAnimationData:ue.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0)])}}},ws=er._export_sfc(W3,[["__scopeId","data-v-7bb009b3"]]),Oo=a.ref(0),zc=l=>{var r;return!l||(l==null?void 0:l.length)===0?[]:(r=L.cloneDeep(l))==null?void 0:r.map(i=>(Oo.value++,i={label:(i==null?void 0:i.label)??"",prop:(i==null?void 0:i.label)==="操作"?"operate":i==null?void 0:i.prop,width:i!=null&&i.width?parseInt(i.width):"",fixed:(i==null?void 0:i.fixed)??void 0,sortable:(i==null?void 0:i.sortable)??!1,align:(i==null?void 0:i.align)??"left",showOverflowTooltip:(i==null?void 0:i.showOverflowTooltip)??!0,isNotDrag:(i==null?void 0:i.isNotDrag)??!1,isEditCol:(i==null?void 0:i.isEditCol)??!1,isOperate:(i==null?void 0:i.isOperate)??!1,id:(i==null?void 0:i.id)??Oo.value,children:zc(i==null?void 0:i.children)},i))},K3=l=>{var n;return(n=L.cloneDeep(l))==null?void 0:n.map(i=>(Oo.value++,i={label:(i==null?void 0:i.label)??"",prop:(i==null?void 0:i.label)==="操作"?"operate":i==null?void 0:i.prop,width:i!=null&&i.width?parseInt(i.width):"",fixed:(i==null?void 0:i.fixed)??void 0,sortable:(i==null?void 0:i.sortable)??!1,align:(i==null?void 0:i.align)??"left",showOverflowTooltip:(i==null?void 0:i.showOverflowTooltip)??!0,isNotDrag:(i==null?void 0:i.isNotDrag)??!1,isEditCol:(i==null?void 0:i.isEditCol)??!1,isOperate:(i==null?void 0:i.isOperate)??!1,id:(i==null?void 0:i.id)??Oo.value,children:zc(i==null?void 0:i.children)},i))},Mc=(l,r)=>{var n;return l!=null&&l.find(i=>(i==null?void 0:i.id)===r)?(n=L.cloneDeep(l))==null?void 0:n.filter(s=>(s==null?void 0:s.id)!==r):(l=l==null?void 0:l.map(i=>(i.children=Mc(i==null?void 0:i.children,r),i)),l)},Ic=(l,r)=>{var n;return l!=null&&l.find(i=>(i==null?void 0:i.id)===(r==null?void 0:r.id))?(n=L.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(i=>(i.children=Ic(i==null?void 0:i.children,r),i)),l)},Oc=(l,r)=>{var n;return l!=null&&l.find(i=>{var s;return(i==null?void 0:i.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)})?(n=L.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(i=>(i.children=Oc(i==null?void 0:i.children,r),i)),l)},Lc=(l,r)=>{var n;return l!=null&&l.find(i=>(i==null?void 0:i.id)===(r==null?void 0:r.id))?(n=L.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(i=>(i.children=Lc(i==null?void 0:i.children,r),i)),l)},sr=[{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"}],G3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Y3=[{label:"新增",value:"add"}],Vn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Y3},{key:"background",label:"按钮背景色",type:"Color"}],Fn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:G3},{key:"textColor",label:"按钮颜色",type:"Color"}],J3={class:"table-header-child"},X3={class:"table-header-child-main"},Z3={class:"table-header-child-content"},Q3={class:"table-header-child-content-item"},e2={class:"fix-button"},a2={key:0},l2={class:"form-content"},r2={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(!1),c=a.ref(""),m=me.useTableComp(L.pinia),{tableIndex:p}=L.storeToRefs(m);a.ref(0);const h=a.ref(""),y=a.ref([]),u=a.ref([]),w=C=>{var _;s.value=!0;let S=[];sr==null||sr.forEach(k=>{let g=L.cloneDeep(p.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:C[k.key],id:p.value,contents:k==null?void 0:k.options})}),C!=null&&C.children&&((_=C==null?void 0:C.children)==null?void 0:_.length)>0&&S.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,y.value=S,u.value=S},D=C=>{i("fixChange",L.cloneDeep(C))},V=C=>{i("deleteChange",L.cloneDeep(C))},E=C=>{s.value=!0;let S=[];sr==null||sr.forEach(_=>{let k=L.cloneDeep(p.value)+1;m.setTableIndex(k),S.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:"",id:p.value,contents:_==null?void 0:_.options})}),c.value=C==null?void 0:C.id,y.value=S,u.value=S},Y=C=>{let S=L.cloneDeep(u.value);S=S==null?void 0:S.map(_=>(_.children||(_.value=C==null?void 0:C[_.name]),_)),u.value=S},M=()=>{var S,_;y.value=u.value;let C={};if(h.value!=="")C.id=h.value,(S=y.value)==null||S.forEach(k=>{const g=sr==null?void 0:sr.find($=>($==null?void 0:$.label)===(k==null?void 0:k.label));g?C[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(C.children=k.children)}),s.value=!1,i("fixChange",{contents:L.cloneDeep(C),id:c.value,type:"fix"});else{let k=L.cloneDeep(p.value)+1;m.setTableIndex(k),C.id="id"+p.value,(_=y.value)==null||_.forEach(g=>{const $=sr==null?void 0:sr.find(R=>(R==null?void 0:R.label)===(g==null?void 0:g.label));$?C[$.key]=g.value:g!=null&&g.children&&g.children.length>0&&(C.children=g.children)}),s.value=!1,i("fixChange",{contents:L.cloneDeep(C),id:c.value,type:"add"})}h.value="",y.value=[],u.value=[]},O=()=>{s.value=!1,h.value="",c.value="",y.value=[],u.value=[]},j=C=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{i("deleteChange",C),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(C,S)=>{const _=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",J3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(k,g)=>(a.openBlock(),a.createElementBlock("div",X3,[a.createElementVNode("div",Z3,[a.createElementVNode("div",Q3,a.toDisplayString(k.label),1),a.createElementVNode("div",e2,[a.createVNode(_,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>E(k)},null,8,["onClick"]),a.createVNode(_,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>w(k)},null,8,["onClick"]),a.createVNode(_,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>j(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(a.openBlock(),a.createElementBlock("div",a2,[a.createVNode($c,{tableChildContents:k==null?void 0:k.children,onDeleteChange:V,onFixChange:D},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(_r.ssDialog,{visible:s.value,onBeforeDestroy:O,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",l2,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:O,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:M},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},n2=er._export_sfc(r2,[["__scopeId","data-v-e0fef72d"]]),i2={class:"table-header-child"},o2={class:"table-header-child-main"},t2={class:"table-header-child-content"},s2={class:"table-header-child-content-item"},c2={class:"fix-button"},u2={key:0},d2={class:"form-content"},p2={class:"dialog-footer"},f2={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(!1),c=a.ref(""),m=me.useTableComp(L.pinia),{tableIndex:p}=L.storeToRefs(m),h=a.ref(""),y=a.ref([]),u=a.ref([]),w=C=>{i("fixChange",L.cloneDeep(C))},D=C=>{var _;s.value=!0;let S=[];sr==null||sr.forEach(k=>{let g=L.cloneDeep(p.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:C[k.key],id:p.value,contents:k==null?void 0:k.options})}),C!=null&&C.children&&((_=C==null?void 0:C.children)==null?void 0:_.length)>0&&S.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,y.value=S,u.value=S},V=C=>{s.value=!0;let S=[];sr==null||sr.forEach(_=>{let k=L.cloneDeep(p.value)+1;m.setTableIndex(k),S.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:"",id:p.value,contents:_==null?void 0:_.options})}),c.value=C==null?void 0:C.id,y.value=S,u.value=S},E=C=>{let S=L.cloneDeep(u.value);S=S==null?void 0:S.map(_=>(_.children||(_.value=C==null?void 0:C[_.name]),_)),u.value=S},Y=()=>{var S,_;y.value=u.value;let C={};if(h.value!=="")C.id=h.value,(S=y.value)==null||S.forEach(k=>{const g=sr==null?void 0:sr.find($=>($==null?void 0:$.label)===(k==null?void 0:k.label));g?C[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(C.children=k.children)}),s.value=!1,i("fixChange",{contents:L.cloneDeep(C),id:c.value,type:"fix"});else{let k=L.cloneDeep(p.value)+1;m.setTableIndex(k),C.id="idChild"+p.value,(_=y.value)==null||_.forEach(g=>{const $=sr==null?void 0:sr.find(R=>(R==null?void 0:R.label)===(g==null?void 0:g.label));$?C[$.key]=g.value:g!=null&&g.children&&g.children.length>0&&(C.children=g.children)}),s.value=!1,i("fixChange",{contents:L.cloneDeep(C),id:c.value,type:"add"})}h.value="",y.value=[],u.value=[]},M=()=>{s.value=!1,h.value="",c.value="",y.value=[],u.value=[]},O=C=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{i("deleteChange",C),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},j=C=>{i("deleteChange",C)};return(C,S)=>{const _=a.resolveComponent("svg-icon"),k=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",i2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(g,$)=>(a.openBlock(),a.createElementBlock("div",o2,[a.createElementVNode("div",t2,[a.createElementVNode("div",s2,a.toDisplayString(g.label),1),a.createElementVNode("div",c2,[a.createVNode(_,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>V(g)},null,8,["onClick"]),a.createVNode(_,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>D(g)},null,8,["onClick"]),a.createVNode(_,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>O(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(a.openBlock(),a.createElementBlock("div",u2,[a.createVNode(n2,{tableChildContents:g==null?void 0:g.children,onDeleteChange:j,onFixChange:w},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(_r.ssDialog,{visible:s.value,onBeforeDestroy:M,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",d2,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",p2,[a.createVNode(k,{onClick:M,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:Y,id:"themeButton"},{default:a.withCtx(()=>S[1]||(S[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},$c=er._export_sfc(f2,[["__scopeId","data-v-ebd68fa1"]]),h2={class:"table-operate-content"},v2={class:"table-operate-item"},m2={class:"operate-title"},y2={class:"operate-content"},g2={class:"fix-content"},b2={class:"fix-content-label"},k2={class:"fix-button"},x2={key:0},w2={class:"operate-title"},_2={class:"operate-content"},S2={class:"fix-content"},E2={class:"fix-content-label"},C2={class:"fix-button"},D2={class:"operate-title"},N2={class:"operate-content"},B2={class:"fix-content"},T2={class:"fix-content-label"},A2={class:"fix-button"},z2={class:"operate-title"},M2={class:"operate-content"},I2={class:"fix-content"},O2={class:"fix-content-label"},L2={class:"fix-button"},$2={class:"operate-content"},R2={style:{display:"flex","justify-content":"space-between"}},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={class:"form-content"},W2={class:"dialog-footer"},K2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref([]),c=a.ref(!1),m=a.ref(!1),p=a.ref([]),h=a.ref(!1),y=a.ref([]),u=a.ref(!1),w=a.ref([]),D=a.ref(""),V=a.ref(""),E=a.ref([]),Y=a.ref([]),M=a.ref([]),O=a.ref([]),j=a.ref(!1),C=a.ref([]),S=a.ref([]),_=a.ref(0),k=a.ref([]),g=a.ref([]),$=a.ref([]),R=()=>{j.value=!0;let P=[];Vn==null||Vn.forEach(H=>{_.value++,P.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:(H==null?void 0:H.key)==="background"?"var(--ssComponent-primary-color)":"",id:_.value,contents:H==null?void 0:H.options})}),C.value=P,S.value=P},G=()=>{var H,Q,he;m.value=!0;let P=[];(he=(Q=(H=me.FormContent)==null?void 0:H.find(ge=>(ge==null?void 0:ge.key)==="Input"))==null?void 0:Q.value)==null||he.forEach(ge=>{_.value++,P.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.name)||(ge==null?void 0:ge.label),type:ge.type,value:(ge==null?void 0:ge.label)==="类型"?"Input":"",id:_.value,contents:ge==null?void 0:ge.options})}),k.value=P,g.value=P},ie=P=>{P||(k.value=g.value)},Se=async P=>{var H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa;if((P==null?void 0:P.类型)!==((Q=(H=g.value)==null?void 0:H.find(Ze=>(Ze==null?void 0:Ze.label)==="类型"))==null?void 0:Q.value)){let Ze=[],oa=await((ha=(ge=(he=me.FormContent)==null?void 0:he.find(ue=>(ue==null?void 0:ue.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:ge.value)==null?void 0:ha.value)?await((qe=(ma=(Ce=me.FormContent)==null?void 0:Ce.find(ue=>(ue==null?void 0:ue.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:ma.value)==null?void 0:qe.value):(pe=(Qe=me.FormContent)==null?void 0:Qe.find(ue=>(ue==null?void 0:ue.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:pe.value;if(oa==null||oa.forEach(ue=>{_.value++,Ze.push({label:ue==null?void 0:ue.label,name:(ue==null?void 0:ue.name)||(ue==null?void 0:ue.label),type:ue.type,value:ue!=null&&ue.属性名?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):(P==null?void 0:P[ue.label])??"",id:_.value,contents:ue==null?void 0:ue.options,prop:(ue==null?void 0:ue.prop)||(ue==null?void 0:ue.name)||(ue==null?void 0:ue.label)})}),P!=null&&P.菜单选项&&((Ia=P==null?void 0:P.菜单选项)==null?void 0:Ia.length)>0){const ue=await me.menuToContentType(P==null?void 0:P.菜单选项);Ze=Ze==null?void 0:Ze.map(U=>((U==null?void 0:U.name)==="组信息选项"&&(U.contents=ue),U))}g.value=await me.selectToBase(L.cloneDeep(Ze)),k.value=await me.selectToBase(L.cloneDeep(Ze))}else{let Ze=L.cloneDeep(k.value);if(Ze=Ze==null?void 0:Ze.map(oa=>(oa.value=P==null?void 0:P[oa.name],oa)),P!=null&&P.菜单选项&&((Aa=P==null?void 0:P.菜单选项)==null?void 0:Aa.length)>0){const oa=await me.menuToContentType(P==null?void 0:P.菜单选项);Ze=Ze==null?void 0:Ze.map(ue=>((ue==null?void 0:ue.name)==="组信息选项"&&(ue.contents=oa),ue))}Ze=me.formToOptionsContents(Ze),g.value=await me.selectToBase(L.cloneDeep(Ze))}},te=async P=>{await Se(P),k.value=g.value},Z=(P,H)=>{if((H==null?void 0:H.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const Q=H==null?void 0:H.optionUrl;return(Q==null?void 0:Q.selectRelateType)||H[P.key]}if((H==null?void 0:H.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const Q=H==null?void 0:H.optionUrl;return(Q==null?void 0:Q.menuSelect)||H[P.key]}if((H==null?void 0:H.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const Q=H==null?void 0:H.optionUrl;return(Q==null?void 0:Q.groupSelect)||H[P.key]}if((H==null?void 0:H.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(H==null?void 0:H.value)||H[P.key];if((H==null?void 0:H.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const Q=H[P.key];return Qs(Q)?Q:P.default}return(P==null?void 0:P.label)==="类型"&&H[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!H[P.key]?!1:H[P.key]},fe=async P=>{var he,ge,ha,Qe,pe,Ce,ma,qe,Ia;m.value=!0;let H=[];const Q=await((ha=(ge=(he=me.FormContent)==null?void 0:he.find(Aa=>(Aa==null?void 0:Aa.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:ge.value)==null?void 0:ha.value)?await((qe=(ma=(Ce=me.FormContent)==null?void 0:Ce.find(Aa=>(Aa==null?void 0:Aa.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:ma.value)==null?void 0:qe.value):(pe=(Qe=me.FormContent)==null?void 0:Qe.find(Aa=>(Aa==null?void 0:Aa.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:pe.value;if(Q==null||Q.forEach(Aa=>{_.value++,H.push({label:Aa==null?void 0:Aa.label,name:(Aa==null?void 0:Aa.name)||(Aa==null?void 0:Aa.label),type:Aa.type,value:(Aa==null?void 0:Aa.label)==="属性名"?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):Z(Aa,P),id:_.value,contents:Aa==null?void 0:Aa.options})}),P!=null&&P.menuSelect&&((Ia=P==null?void 0:P.menuSelect)==null?void 0:Ia.length)>0){const Aa=await me.menuToContentType(P==null?void 0:P.menuSelect);H=H==null?void 0:H.map(Ze=>((Ze==null?void 0:Ze.name)==="组信息选项"&&(Ze.contents=Aa),Ze))}D.value=P==null?void 0:P.id,k.value=await me.selectToBase(me.formToOptionsContents(H)),g.value=await me.selectToBase(me.formToOptionsContents(H))},ae=P=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Q;$.value=(H=L.cloneDeep($.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(P==null?void 0:P.id)),i("change",(Q=L.cloneDeep(n.originalItemContents))==null?void 0:Q.map(he=>((he==null?void 0:he.key)==="tableToForm"&&(he.contents=$.value),he))),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},se=()=>{m.value=!1,k.value=[],D.value=""},De=async()=>{var he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa;k.value=g.value;let P={};D.value!==""?P.id=D.value:(_.value++,P.id="id"+_.value);let H=await((ha=(ge=(he=me.FormContent)==null?void 0:he.find(Ze=>{var oa,ue;return(Ze==null?void 0:Ze.key)===(((ue=(oa=k.value)==null?void 0:oa.find(U=>(U==null?void 0:U.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:ge.value)==null?void 0:ha.value)??((pe=(Qe=me.FormContent)==null?void 0:Qe.find(Ze=>{var oa,ue;return(Ze==null?void 0:Ze.key)===(((ue=(oa=k.value)==null?void 0:oa.find(U=>(U==null?void 0:U.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:pe.value);if((Ce=k.value)==null||Ce.forEach(Ze=>{const oa=H==null?void 0:H.find(ue=>(ue==null?void 0:ue.label)===(Ze==null?void 0:Ze.label));oa&&(P[oa.key]=Ze.value)}),P.name=P.label,(ma=$.value)!=null&&ma.find(Ze=>Ze.id===P.id))$.value=(qe=$.value)==null?void 0:qe.map(Ze=>(Ze.id===P.id&&(Ze=P),Ze));else{let Ze=L.cloneDeep($.value);$.value||($.value=[]),Ze.push(P),$.value=Ze}$.value=$.value.map(({id:Ze,...oa})=>oa),m.value=!1,D.value="";let Q=L.cloneDeep(n.originalItemContents);(Ia=L.cloneDeep(n.originalItemContents))!=null&&Ia.find(Ze=>(Ze==null?void 0:Ze.key)==="tableToForm")?Q=(Aa=L.cloneDeep(n.originalItemContents))==null?void 0:Aa.map(Ze=>((Ze==null?void 0:Ze.key)==="tableToForm"&&(Ze.contents=$.value),Ze)):Q.push({key:"tableToForm",contents:$.value}),i("change",Q)},Pe=P=>{j.value=!0;let H=[];Vn==null||Vn.forEach(Q=>{_.value++,H.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:P[Q.key],id:_.value,contents:Q==null?void 0:Q.options})}),D.value=P==null?void 0:P.id,C.value=H,S.value=H};a.watch(()=>u.value,()=>{var H,Q;let P=L.cloneDeep(n.originalItemContents);(H=L.cloneDeep(n.originalItemContents))!=null&&H.find(he=>(he==null?void 0:he.key)==="page")?P=(Q=L.cloneDeep(n.originalItemContents))==null?void 0:Q.map(he=>((he==null?void 0:he.key)==="page"&&(he.contents=u.value),he)):P.push({key:"page",contents:u.value}),i("change",P)},{deep:!0});const ke=P=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Q;Y.value=(H=L.cloneDeep(Y.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(P==null?void 0:P.id)),i("change",(Q=L.cloneDeep(n.originalItemContents))==null?void 0:Q.map(he=>((he==null?void 0:he.key)==="extraButton"&&(he.contents=Y.value),he))),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},B=()=>{var Q,he,ge,ha,Qe;C.value=S.value;let P={};if(D.value!==""?P.id=D.value:(_.value++,P.id="id"+_.value),(Q=C.value)==null||Q.forEach(pe=>{const Ce=Vn==null?void 0:Vn.find(ma=>(ma==null?void 0:ma.label)===(pe==null?void 0:pe.label));Ce?P[Ce.key]=pe.value:pe!=null&&pe.children&&pe.children.length>0&&(P.children=pe.children)}),(he=Y.value)!=null&&he.find(pe=>pe.id===P.id))Y.value=(ge=Y.value)==null?void 0:ge.map(pe=>(pe.id===P.id&&(pe=P),pe));else{let pe=L.cloneDeep(Y.value)??[];pe.push(P),Y.value=pe}j.value=!1,D.value="";let H=L.cloneDeep(n.originalItemContents);(ha=L.cloneDeep(n.originalItemContents))!=null&&ha.find(pe=>(pe==null?void 0:pe.key)==="extraButton")?H=(Qe=L.cloneDeep(n.originalItemContents))==null?void 0:Qe.map(pe=>((pe==null?void 0:pe.key)==="extraButton"&&(pe.contents=Y.value),pe)):H.push({key:"extraButton",contents:Y.value}),i("change",H)},q=P=>{let H=L.cloneDeep(S.value);H=H==null?void 0:H.map(Q=>(Q.children||(Q.value=P==null?void 0:P[Q.name]),Q)),S.value=H},re=()=>{j.value=!1,C.value=[],D.value=""},Ae=P=>{h.value=!0;let H=[];Fn==null||Fn.forEach(Q=>{_.value++,H.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:P[Q.key],id:_.value,contents:Q==null?void 0:Q.options})}),D.value=P==null?void 0:P.id,M.value=H,O.value=H},Ee=P=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Q;E.value=(H=L.cloneDeep(E.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(P==null?void 0:P.id)),i("change",(Q=L.cloneDeep(n.originalItemContents))==null?void 0:Q.map(he=>((he==null?void 0:he.key)==="rowButton"&&(he.contents=E.value),he))),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},We=()=>{c.value=!0;let P=[];sr==null||sr.forEach(H=>{_.value++,P.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:_.value,contents:H==null?void 0:H.options})}),y.value=P,w.value=P},da=()=>{h.value=!0;let P=[];Fn==null||Fn.forEach(H=>{_.value++,P.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:_.value,contents:H==null?void 0:H.options})}),M.value=P,O.value=P},Ta=P=>{let H=L.cloneDeep(O.value);H=H==null?void 0:H.map(Q=>(Q.children||(Q.value=P==null?void 0:P[Q.name]),Q)),O.value=H},le=()=>{var Q,he,ge,ha,Qe;M.value=O.value;let P={};if(D.value!==""?P.id=D.value:(_.value++,P.id="id"+_.value),(Q=M.value)==null||Q.forEach(pe=>{const Ce=Fn==null?void 0:Fn.find(ma=>(ma==null?void 0:ma.label)===(pe==null?void 0:pe.label));Ce?P[Ce.key]=pe.value:pe!=null&&pe.children&&pe.children.length>0&&(P.children=pe.children)}),(he=E.value)!=null&&he.find(pe=>pe.id===P.id))E.value=(ge=E.value)==null?void 0:ge.map(pe=>(pe.id===P.id&&(pe=P),pe));else{let pe=L.cloneDeep(E.value);pe.push(P),E.value=pe}h.value=!1,D.value="";let H=L.cloneDeep(n.originalItemContents);(ha=L.cloneDeep(n.originalItemContents))!=null&&ha.find(pe=>(pe==null?void 0:pe.key)==="rowButton")?H=(Qe=L.cloneDeep(n.originalItemContents))==null?void 0:Qe.map(pe=>((pe==null?void 0:pe.key)==="rowButton"&&(pe.contents=E.value),pe)):H.push({key:"rowButton",contents:E.value}),i("change",H)},la=()=>{h.value=!1,D.value="",O.value=[],M.value=[]},ve=P=>{c.value=!0;let H=[];sr==null||sr.forEach(Q=>{_.value++,H.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:"",id:_.value,contents:Q==null?void 0:Q.options})}),y.value=H,V.value=P==null?void 0:P.id,w.value=H},Ge=P=>{var H;p.value=Mc(L.cloneDeep(p.value),P==null?void 0:P.id),i("change",(H=L.cloneDeep(n.originalItemContents))==null?void 0:H.map(Q=>{var he;return(Q==null?void 0:Q.key)==="header"&&(Q.contents=(he=p.value)!=null&&he.some(ge=>ge==null?void 0:ge.children)?[p.value]:p.value),Q}))},Oe=P=>{var Q,he,ge;P.type==="fix"?P.id!==""?p.value=Oc(p.value,P):p.value=Ic(p.value,P==null?void 0:P.contents):p.value=Lc(p.value,P),p.value=(Q=p.value)!=null&&Q.some(ha=>ha==null?void 0:ha.children)?[p.value]:p.value,D.value="";let H=L.cloneDeep(n.originalItemContents);(he=L.cloneDeep(n.originalItemContents))!=null&&he.find(ha=>(ha==null?void 0:ha.key)==="header")?H=(ge=L.cloneDeep(n.originalItemContents))==null?void 0:ge.map(ha=>((ha==null?void 0:ha.key)==="header"&&(ha.contents=p.value),ha)):H.push({key:"header",contents:p.value}),i("change",H)},ce=P=>{var Q;c.value=!0;let H=[];sr==null||sr.forEach(he=>{_.value++,H.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:P[he.key],id:_.value,contents:he==null?void 0:he.options})}),P!=null&&P.children&&((Q=P==null?void 0:P.children)==null?void 0:Q.length)>0&&H.push({children:P==null?void 0:P.children,isFormColHidden:!0}),D.value=P==null?void 0:P.id,V.value="",y.value=H,w.value=H},ze=P=>{let H=L.cloneDeep(w.value);H=H==null?void 0:H.map(Q=>(Q.children||(Q.value=P==null?void 0:P[Q.name]),Q)),w.value=H},Fe=()=>{c.value=!1,D.value="",V.value="",w.value=[]},xa=()=>{var Q,he,ge,ha,Qe,pe;y.value=w.value;let P={};if(D.value!==""?P.id=D.value:(_.value++,P.id="id"+_.value),(Q=y.value)==null||Q.forEach(Ce=>{const ma=sr==null?void 0:sr.find(qe=>(qe==null?void 0:qe.label)===(Ce==null?void 0:Ce.label));ma?P[ma.key]=Ce.value:Ce!=null&&Ce.children&&Ce.children.length>0&&(P.children=Ce.children)}),(he=p.value)!=null&&he.find(Ce=>Ce.id===P.id))p.value=(ge=p.value)==null?void 0:ge.map(Ce=>(Ce.id===P.id&&(Ce=P),Ce));else{let Ce=L.cloneDeep(p.value)??[];V.value===""?Ce.push(P):Ce=Ce==null?void 0:Ce.map(ma=>(ma.id===V.value&&(ma.children||(ma.children=[]),ma.children.push(P)),ma)),p.value=Ce}p.value=(ha=p.value)!=null&&ha.some(Ce=>Ce==null?void 0:Ce.children)?[p.value]:p.value,c.value=!1,D.value="",V.value="";let H=L.cloneDeep(n.originalItemContents);(Qe=L.cloneDeep(n.originalItemContents))!=null&&Qe.find(Ce=>(Ce==null?void 0:Ce.key)==="header")?H=(pe=L.cloneDeep(n.originalItemContents))==null?void 0:pe.map(Ce=>((Ce==null?void 0:Ce.key)==="header"&&(Ce.contents=p.value),Ce)):H.push({key:"header",contents:p.value}),i("change",H)},Ma=P=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Q;p.value=(H=L.cloneDeep(p.value))==null?void 0:H.filter(he=>(he==null?void 0:he.id)!==(P==null?void 0:P.id)),i("change",(Q=L.cloneDeep(n.originalItemContents))==null?void 0:Q.map(he=>{var ge;return(he==null?void 0:he.key)==="header"&&(he.contents=(ge=p.value)!=null&&ge.some(ha=>ha==null?void 0:ha.children)?[p.value]:p.value),he})),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return a.watch(()=>n.originalItemContents,()=>{var P,H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa,Ze,oa,ue,U,W,Me;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(s.value=L.cloneDeep(n.originalItemContents),p.value=(H=(P=s.value)==null?void 0:P.find(we=>(we==null?void 0:we.key)==="header"))==null?void 0:H.contents,E.value=(he=(Q=s.value)==null?void 0:Q.find(we=>(we==null?void 0:we.key)==="rowButton"))==null?void 0:he.contents,Y.value=(ha=(ge=s.value)==null?void 0:ge.find(we=>(we==null?void 0:we.key)==="extraButton"))==null?void 0:ha.contents,u.value=(pe=(Qe=s.value)==null?void 0:Qe.find(we=>(we==null?void 0:we.key)==="page"))!=null&&pe.contents?!!((ma=(Ce=s.value)==null?void 0:Ce.find(we=>(we==null?void 0:we.key)==="page"))!=null&&ma.contents):!1,$.value=(Ia=(qe=s.value)==null?void 0:qe.find(we=>(we==null?void 0:we.key)==="tableToForm"))==null?void 0:Ia.contents,p.value=(Aa=p.value)==null?void 0:Aa.map((we,na)=>(Array.isArray(we)?we=K3(we):we={label:(we==null?void 0:we.label)??"",prop:(we==null?void 0:we.label)==="操作"?"operate":we==null?void 0:we.prop,width:we!=null&&we.width?parseInt(we.width):"",fixed:(we==null?void 0:we.fixed)??void 0,sortable:(we==null?void 0:we.sortable)??!1,align:(we==null?void 0:we.align)??"left",showOverflowTooltip:(we==null?void 0:we.showOverflowTooltip)??!0,isNotDrag:(we==null?void 0:we.isNotDrag)??!1,isEditCol:(we==null?void 0:we.isEditCol)??!1,isOperate:(we==null?void 0:we.isOperate)??!1,id:(we==null?void 0:we.id)??na,formMenuSelect:(we==null?void 0:we.formMenuSelect)??void 0,groupSelect:(we==null?void 0:we.groupSelect)??void 0},we)),p.value=(Ze=p.value)!=null&&Ze.every(we=>Array.isArray(we))?(oa=p.value)==null?void 0:oa[0]:p.value,E.value=(ue=E.value)==null?void 0:ue.map((we,na)=>we={label:(we==null?void 0:we.label)??"",type:(we==null?void 0:we.type)??"",textColor:(we==null?void 0:we.textColor)??"#000000",id:(we==null?void 0:we.id)??na}),Y.value=(U=Y.value)==null?void 0:U.map((we,na)=>we={label:(we==null?void 0:we.label)??"",type:(we==null?void 0:we.type)??"",background:(we==null?void 0:we.background)??"var(--ssComponent-primary-color)",id:(we==null?void 0:we.id)??na}),$.value)$.value=(Me=$.value)==null?void 0:Me.map(we=>{_.value++;let na=we;return na.id=_.value,na});else{let we=[];const na=(W=me.getColumnChild(L.cloneDeep(p.value)))==null?void 0:W.filter(ta=>(ta==null?void 0:ta.prop)!=="operate");na==null||na.forEach(ta=>{var Sa;_.value++,we.push({label:ta==null?void 0:ta.label,name:(ta==null?void 0:ta.prop)||(ta==null?void 0:ta.label),type:ta!=null&&ta.groupSelect?"Select":"Input",value:"",id:_.value,contents:ta==null?void 0:ta.options,menuSelect:ta==null?void 0:ta.formMenuSelect,groupSelect:(Sa=ta==null?void 0:ta.groupSelect)==null?void 0:Sa.split(":"),selectRelateType:"关联绑定列"})}),$.value=we}},{deep:!0,immediate:!0}),(P,H)=>{const Q=a.resolveComponent("svg-icon"),he=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",h2,[a.createElementVNode("div",v2,[a.createElementVNode("div",m2,[H[2]||(H[2]=a.createElementVNode("div",null,a.toDisplayString("表头"),-1)),a.createVNode(he,{class:"icon-content",onClick:We,id:"themeButton"},{icon:a.withCtx(()=>[a.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[1]||(H[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",y2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,(ge,ha)=>(a.openBlock(),a.createElementBlock("div",{key:ha},[a.createElementVNode("div",g2,[a.createElementVNode("div",b2,a.toDisplayString(ge==null?void 0:ge.label),1),a.createElementVNode("div",k2,[a.createVNode(Q,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ve(ge)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ce(ge)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>Ma(ge)},null,8,["onClick"])])]),ge!=null&&ge.children&&ge.children.length>0?(a.openBlock(),a.createElementBlock("div",x2,[a.createVNode($c,{tableChildContents:ge==null?void 0:ge.children,onDeleteChange:Ge,onFixChange:Oe},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),128))]),a.createElementVNode("div",w2,[H[4]||(H[4]=a.createElementVNode("div",null,a.toDisplayString("行内按钮"),-1)),a.createVNode(he,{class:"icon-content",id:"themeButton",onClick:da},{icon:a.withCtx(()=>[a.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[3]||(H[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",_2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.value,(ge,ha)=>(a.openBlock(),a.createElementBlock("div",{key:ha},[a.createElementVNode("div",S2,[a.createElementVNode("div",E2,a.toDisplayString(ge==null?void 0:ge.label),1),a.createElementVNode("div",C2,[a.createVNode(Q,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>Ae(ge)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>Ee(ge)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",D2,[H[6]||(H[6]=a.createElementVNode("div",null,a.toDisplayString("表外按钮"),-1)),a.createVNode(he,{class:"icon-content",id:"themeButton",onClick:R},{icon:a.withCtx(()=>[a.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[5]||(H[5]=a.createTextVNode(" 新增 "))]),_:1,__:[5]})]),a.createElementVNode("div",N2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Y.value,(ge,ha)=>(a.openBlock(),a.createElementBlock("div",{key:ha},[a.createElementVNode("div",B2,[a.createElementVNode("div",T2,a.toDisplayString(ge==null?void 0:ge.label),1),a.createElementVNode("div",A2,[a.createVNode(Q,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>Pe(ge)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ke(ge)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",z2,[H[8]||(H[8]=a.createElementVNode("div",null,a.toDisplayString("表格弹框字段设置"),-1)),a.createVNode(he,{class:"icon-content",id:"themeButton",onClick:G},{icon:a.withCtx(()=>[a.createVNode(Q,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[7]||(H[7]=a.createTextVNode(" 新增 "))]),_:1,__:[7]})]),a.createElementVNode("div",M2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList($.value,(ge,ha)=>(a.openBlock(),a.createElementBlock("div",{key:ha},[a.createElementVNode("div",I2,[a.createElementVNode("div",O2,a.toDisplayString(ge==null?void 0:ge.label),1),a.createElementVNode("div",L2,[a.createVNode(Q,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>fe(ge)},null,8,["onClick"]),a.createVNode(Q,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ae(ge)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("分页"))],-1)),a.createElementVNode("div",$2,[a.createElementVNode("div",R2,[H[9]||(H[9]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否分页"),-1)),a.createVNode(nl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":H[0]||(H[0]=ge=>u.value=ge)},null,8,["modelValue"])])])]),a.createVNode(_r.ssDialog,{visible:c.value,onBeforeDestroy:Fe,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",V2,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:ze},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",F2,[a.createVNode(he,{onClick:Fe,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>H[11]||(H[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(he,{class:"ok-button button",onClick:xa,id:"themeButton"},{default:a.withCtx(()=>H[12]||(H[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),a.createVNode(_r.ssDialog,{visible:h.value,onBeforeDestroy:la,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",P2,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:Ta},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",j2,[a.createVNode(he,{onClick:la,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>H[13]||(H[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(he,{class:"ok-button button",onClick:le,id:"themeButton"},{default:a.withCtx(()=>H[14]||(H[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),a.createVNode(_r.ssDialog,{visible:j.value,onBeforeDestroy:re,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",H2,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:q},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",U2,[a.createVNode(he,{onClick:re,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>H[15]||(H[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(he,{class:"ok-button button",onClick:B,id:"themeButton"},{default:a.withCtx(()=>H[16]||(H[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),a.createVNode(_r.ssDialog,{visible:m.value,onBeforeDestroy:se,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",q2,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:Se,onChangeVisible:ie,onBlurChange:te},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",W2,[a.createVNode(he,{onClick:se,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>H[17]||(H[17]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[17]}),a.createVNode(he,{class:"ok-button button",onClick:De,id:"themeButton"},{default:a.withCtx(()=>H[18]||(H[18]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},G2=er._export_sfc(K2,[["__scopeId","data-v-7a6b87b5"]]),Y2=L.useModelComp(L.pinia),{pageMapState:J2}=L.storeToRefs(Y2),X2=L.useMenuState(L.pinia),{activeMenuPath:Z2}=L.storeToRefs(X2),Q2=a.ref(24),eh=a.ref(6),ah=a.ref(10),lh=a.ref(70),rh=a.ref(.18),nh=a.ref(45),ih=(l,r,n,i)=>{var s,c,m,p,h,y,u,w,D,V,E,Y,M,O,j,C;return{x:((c=(s=l==null?void 0:l.value)==null?void 0:s.tableData)==null?void 0:c.x)||r%2*12,y:((p=(m=l==null?void 0:l.value)==null?void 0:m.tableData)==null?void 0:p.y)||r,w:((y=(h=l==null?void 0:l.value)==null?void 0:h.tableData)==null?void 0:y.w)||Q2.value,h:((w=(u=l==null?void 0:l.value)==null?void 0:u.tableData)==null?void 0:w.h)||n,minW:((V=(D=l==null?void 0:l.value)==null?void 0:D.tableData)==null?void 0:V.minW)||eh.value,minH:((Y=(E=l==null?void 0:l.value)==null?void 0:E.tableData)==null?void 0:Y.minH)||rh.value,maxH:((O=(M=l==null?void 0:l.value)==null?void 0:M.tableData)==null?void 0:O.maxH)||nh.value,i:((C=(j=l==null?void 0:l.value)==null?void 0:j.tableData)==null?void 0:C.i)||r,id:(l==null?void 0:l.id)||r+"",component:i}},oh=(l,r)=>{var i,s,c,m,p,h,y,u;let n=1;if(l!=null&&l.compData&&Array.isArray(l==null?void 0:l.compData))if(((i=l==null?void 0:l.comp)==null?void 0:i.toUpperCase())==="TABLE"){if(((m=(c=(s=l==null?void 0:l.compData)==null?void 0:s.find(D=>(D==null?void 0:D.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:m.length)===0)return 2}else((p=l==null?void 0:l.comp)==null?void 0:p.toUpperCase())==="FORM"&&(n=((u=(y=(h=l==null?void 0:l.compData)==null?void 0:h.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:y.contents)==null?void 0:u.length)/5);return n*2},Rc=(l,r,n)=>{var m,p;const i=(p=(m=J2.value)==null?void 0:m[Z2.value])==null?void 0:p.filter(h=>{var y;return((y=h==null?void 0:h.key)==null?void 0:y.type)==="gridLayout"}),s=i==null?void 0:i.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=oh(l);return l!=null&&l.children&&(l==null?void 0:l.children.length)>0&&(l.children=l.children.map((h,y)=>Rc(h,y))),{...ih(s,r,c,l)}},th=(l,r)=>{if((l==null?void 0:l.length)===0)return[];const n=L.cloneDeep(l);return Array.isArray(l)?n==null?void 0:n.map((i,s)=>Rc(i,s)):[]},sh=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}]}]}}),ch=(l,r)=>l==null?void 0:l.map(n=>{for(const i in r)if(i===(n==null?void 0:n.prop))return{...n,value:r[i]};return n}),uh=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,i=r,s=a.ref([]);a.watch(()=>n.compType,p=>{var u;const h=sh(n==null?void 0:n.optionItems),y=p?(u=h[p==null?void 0:p.toUpperCase()])==null?void 0:u[n==null?void 0:n.target]:[];s.value=y==null?void 0:y.map(w=>{for(const[D,V]of Object.entries((n==null?void 0:n.comp)||{}))if((w==null?void 0:w.prop)===D)return{...w,value:V};return w})},{immediate:!0});const c=p=>nl.getComponent(p),m=p=>{var h,y;(p==null?void 0:p.prop)==="layout"&&(p==null?void 0:p.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(D=>({...D,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(D=>({...D,disabled:!1}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!1}:u}),i("change",{target:n==null?void 0:n.target,styleConfigs:s.value,prop:p==null?void 0:p.prop})};return(p,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":D=>w.value=D,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:D=>m(w)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),dh=er._export_sfc(uh,[["__scopeId","data-v-6c233914"]]),ph=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,i=r,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=a.ref([]),m=O=>O==null?void 0:O.reduce((j,C)=>(j[C==null?void 0:C.prop]=C==null?void 0:C.rule,j),{}),p=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=(O,j,C)=>{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:O},{label:"按钮名称",value:"按钮名称",children:j}]},{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 _;return C&&(C==null?void 0:C.length)>0?_=[...S,...w(O,j,C)]:_=S,_},w=(O,j,C)=>{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 C?S==null?void 0:S.filter(_=>C==null?void 0:C.includes(_==null?void 0:_.prop)):S},D=(O,j)=>{var g,$,R,G,ie,Se,te,Z,fe;const C=((ie=(G=(R=($=(g=n==null?void 0:n.comp)==null?void 0:g.compData)==null?void 0:$.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:ie.map(ae=>({value:ae==null?void 0:ae.prop,label:ae.label})))||[],S=/button/i,_=((fe=(Z=(te=(Se=n==null?void 0:n.comp)==null?void 0:Se.compData)==null?void 0:te.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:fe.map(ae=>({value:ae==null?void 0:ae.label,label:ae.label})))||[],k=u(C,_,O);h.value=j?ch(k,j):k,O&&(O==null?void 0:O.length)>0&&c.value.push(...O==null?void 0:O.map(ae=>({prop:ae,rule:s})))};a.onMounted(()=>{D(null,n==null?void 0:n.extendItem)});const V=O=>{const j=O==null?void 0:O[y.value];if(y.value==="执行任务"){if(!(j!=null&&j.join("/")))return;const C=j==null?void 0:j.join("/");D(C==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:C==="进度设置/进度条"?["进度关键词"]:null,O)}},E=O=>{i("change",{target:n==null?void 0:n.target,extendConfigs:O})},Y=(O,j)=>{y.value=j==null?void 0:j.changeProp,V(O)},M=O=>{i("onButtonClick",O)};return(O,j)=>(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:p.value.formRules,buttonValue:p.value.buttonValue,onChange:E,onBlurChange:Y,onOnButtonClick:M},null,8,["rowContents","formRules","buttonValue"]))}}),fh=er._export_sfc(ph,[["__scopeId","data-v-7c660c1f"]]),hh={};function vh(l,r){return null}const mh=er._export_sfc(hh,[["render",vh]]),yh={class:"form-operate-content"},gh={class:"form-operate-item"},bh={class:"operate-title"},kh={class:"operate-content"},xh={class:"fix-content"},wh={class:"fix-button"},_h={class:"operate-title"},Sh={class:"operate-content"},Eh={class:"fix-content"},Ch={class:"fix-button"},Dh={style:{display:"flex","justify-content":"space-between"}},Nh={class:"form-content"},Bh={class:"dialog-footer"},Th={class:"form-content"},Ah={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(!1),c=a.ref([]),m=a.ref([]),p=a.ref(!1),h=a.ref([]),y=a.ref([]),u=a.ref(""),w=a.ref(!1),D=a.ref(0),V=a.ref([]),E=a.ref([]),Y=(Z,fe)=>{if((fe==null?void 0:fe.type)=="Select"&&(Z==null?void 0:Z.key)==="selectRelateType"){const ae=fe==null?void 0:fe.optionUrl;return(ae==null?void 0:ae.selectRelateType)||fe[Z.key]}if((fe==null?void 0:fe.type)=="Select"&&(Z==null?void 0:Z.key)==="menuSelect"){const ae=fe==null?void 0:fe.optionUrl;return(ae==null?void 0:ae.menuSelect)||fe[Z.key]}if((fe==null?void 0:fe.type)=="Select"&&(Z==null?void 0:Z.key)==="groupSelect"){const ae=fe==null?void 0:fe.optionUrl;return(ae==null?void 0:ae.groupSelect)||fe[Z.key]}if((fe==null?void 0:fe.type)=="Select"&&(Z==null?void 0:Z.key)==="originalContent")return(fe==null?void 0:fe.value)||fe[Z.key];if((fe==null?void 0:fe.type)=="Select"&&(Z==null?void 0:Z.key)==="multiple"){const ae=fe[Z.key];return Qs(ae)?ae:Z.default}return(Z==null?void 0:Z.label)==="类型"&&fe[Z.key]===""?"Input":(Z==null?void 0:Z.key)==="isFormColHidden"&&!fe[Z.key]?!1:fe[Z.key]},M=async Z=>{var se,De,Pe,ke,B,q;s.value=!0;let fe=[];const ae=await((Pe=(De=(se=me.FormContent)==null?void 0:se.find(re=>(re==null?void 0:re.key)===((Z==null?void 0:Z.type)===""?"Input":Z==null?void 0:Z.type)))==null?void 0:De.value)==null?void 0:Pe.value)??((B=(ke=me.FormContent)==null?void 0:ke.find(re=>(re==null?void 0:re.key)===((Z==null?void 0:Z.type)===""?"Input":Z==null?void 0:Z.type)))==null?void 0:B.value);if(ae==null||ae.forEach(re=>{D.value++,fe.push({label:re==null?void 0:re.label,name:re==null?void 0:re.label,type:re.type,prop:re==null?void 0:re.prop,value:Y(re,Z),id:D.value,contents:re==null?void 0:re.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 re=await me.menuToContentType(Z==null?void 0:Z.menuSelect);fe=fe==null?void 0:fe.map(Ae=>((Ae==null?void 0:Ae.name)==="组信息选项"&&(Ae.contents=re),Ae))}u.value=Z==null?void 0:Z.id,c.value=await me.selectToBase(me.formToOptionsContents(fe)),m.value=await me.selectToBase(me.formToOptionsContents(fe))},O=Z=>{var ae;p.value=!0;let fe=[];(ae=me.FormButton)==null||ae.forEach(se=>{D.value++,fe.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"&&Z[se.key]===""?"normal":Z[se.key],id:D.value,contents:se==null?void 0:se.options})}),V.value=fe,E.value=fe,u.value=Z==null?void 0:Z.id};a.watch(()=>w.value,()=>{var fe,ae;let Z=L.cloneDeep(n.originalItemContents);(fe=L.cloneDeep(n.originalItemContents))!=null&&fe.find(se=>(se==null?void 0:se.key)==="enableWrap")?Z=(ae=L.cloneDeep(n.originalItemContents))==null?void 0:ae.map(se=>((se==null?void 0:se.key)==="enableWrap"&&(se.contents=!w.value),se)):Z.push({key:"enableWrap",contents:!w.value}),i("change",Z)},{deep:!0});const j=()=>{var ae,se,De,Pe,ke;V.value=E.value;let Z={};if(u.value!==""?Z.id=u.value:(D.value++,Z.id="id"+D.value),(ae=V.value)==null||ae.forEach(B=>{var re;const q=(re=me.FormButton)==null?void 0:re.find(Ae=>(Ae==null?void 0:Ae.label)===(B==null?void 0:B.label));q&&(Z[q.key]=B.value)}),(se=h.value)!=null&&se.find(B=>B.id===Z.id))h.value=(De=h.value)==null?void 0:De.map(B=>(B.id===Z.id&&(B=Z),B));else{let B=L.cloneDeep(h.value);h.value||(h.value=[]),B.push(Z),h.value=B}p.value=!1,u.value="";let fe=L.cloneDeep(n.originalItemContents);(Pe=L.cloneDeep(n.originalItemContents))!=null&&Pe.find(B=>(B==null?void 0:B.key)==="formButton")?fe=(ke=L.cloneDeep(n.originalItemContents))==null?void 0:ke.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=h.value),B)):fe.push({key:"formButton",contents:h.value}),i("change",fe)},C=Z=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var fe,ae;y.value=(fe=L.cloneDeep(y.value))==null?void 0:fe.filter(se=>(se==null?void 0:se.id)!==(Z==null?void 0:Z.id)),i("change",(ae=L.cloneDeep(n.originalItemContents))==null?void 0:ae.map(se=>((se==null?void 0:se.key)==="formContent"&&(se.contents=y.value),se))),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=Z=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var fe,ae;h.value=(fe=L.cloneDeep(h.value))==null?void 0:fe.filter(se=>(se==null?void 0:se.id)!==(Z==null?void 0:Z.id)),i("change",(ae=L.cloneDeep(n.originalItemContents))==null?void 0:ae.map(se=>((se==null?void 0:se.key)==="formButton"&&(se.contents=h.value),se))),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_=()=>{var fe;p.value=!0;let Z=[];(fe=me.FormButton)==null||fe.forEach(ae=>{D.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:D.value,contents:ae==null?void 0:ae.options})}),V.value=Z,E.value=Z},k=()=>{var fe,ae,se;s.value=!0;let Z=[];(se=(ae=(fe=me.FormContent)==null?void 0:fe.find(De=>(De==null?void 0:De.key)==="Input"))==null?void 0:ae.value)==null||se.forEach(De=>{D.value++,Z.push({label:De==null?void 0:De.label,name:De==null?void 0:De.label,type:De.type,value:(De==null?void 0:De.label)==="类型"?"Input":"",id:D.value,contents:De==null?void 0:De.options})}),c.value=Z,m.value=Z},g=Z=>{let fe=L.cloneDeep(E.value);fe=fe==null?void 0:fe.map(ae=>(ae.value=Z==null?void 0:Z[ae.name],ae)),E.value=fe},$=Z=>{const fe=Z.find(De=>(De==null?void 0:De.name)==="类型");if((fe==null?void 0:fe.value)!="Select")return;const ae=Z.find(De=>(De==null?void 0:De.name)==="多选"),se=Z.find(De=>(De==null?void 0:De.name)==="初始值");ae!=null&&ae.value&&Do.isString(se.value)&&(se.value=[se.value]),!(ae!=null&&ae.value)&&!Do.isString(se.value)&&(se.value="")},R=async Z=>{var fe,ae,se,De,Pe,ke,B,q,re,Ae,Ee,We;if((Z==null?void 0:Z.类型)!==((ae=(fe=m.value)==null?void 0:fe.find(da=>(da==null?void 0:da.label)==="类型"))==null?void 0:ae.value)){let da=[];const Ta=await((Pe=(De=(se=me.FormContent)==null?void 0:se.find(le=>(le==null?void 0:le.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:De.value)==null?void 0:Pe.value)?await((Ae=(re=(q=me.FormContent)==null?void 0:q.find(le=>(le==null?void 0:le.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:re.value)==null?void 0:Ae.value):(B=(ke=me.FormContent)==null?void 0:ke.find(le=>(le==null?void 0:le.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:B.value;if(Ta==null||Ta.forEach(le=>{var ve,Ge;D.value++;const la=$u(le==null?void 0:le.default)?(Z==null?void 0:Z[le.label])??le.value??"":le==null?void 0:le.default;da.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:la,prop:le==null?void 0:le.prop,id:D.value,contents:le==null?void 0:le.options,width:((Ge=(ve=m.value)==null?void 0:ve[0])==null?void 0:Ge.width)??1})}),Z!=null&&Z.菜单选项&&((Ee=Z==null?void 0:Z.菜单选项)==null?void 0:Ee.length)>0){const le=await me.menuToContentType(Z==null?void 0:Z.菜单选项);da=da==null?void 0:da.map(la=>((la==null?void 0:la.name)==="组信息选项"&&(la.contents=le),la))}$(da),m.value=await me.selectToBase(L.cloneDeep(da)),c.value=await me.selectToBase(L.cloneDeep(da))}else{let da=L.cloneDeep(m.value);if(da=da==null?void 0:da.map(Ta=>(Ta.value=Z==null?void 0:Z[Ta.name],Ta)),Z!=null&&Z.菜单选项&&((We=Z==null?void 0:Z.菜单选项)==null?void 0:We.length)>0){const Ta=await me.menuToContentType(Z==null?void 0:Z.菜单选项);da=da==null?void 0:da.map(le=>((le==null?void 0:le.name)==="组信息选项"&&(le.contents=Ta),le))}da=me.formToOptionsContents(da),$(da),m.value=await me.selectToBase(L.cloneDeep(da))}},G=Z=>{Z||(c.value=m.value)},ie=async Z=>{await R(Z),c.value=m.value},Se=Nl.debounce(async()=>{var se,De,Pe,ke,B,q,re,Ae,Ee,We,da,Ta;c.value=m.value;let Z={};Z.width=((De=(se=c.value)==null?void 0:se[0])==null?void 0:De.width)??1,u.value!==""?Z.id=u.value:(D.value++,Z.id="id"+D.value);let fe=await((B=(ke=(Pe=me.FormContent)==null?void 0:Pe.find(le=>{var la,ve;return(le==null?void 0:le.key)===(((ve=(la=c.value)==null?void 0:la.find(Ge=>(Ge==null?void 0:Ge.label)==="类型"))==null?void 0:ve.value)??"label")}))==null?void 0:ke.value)==null?void 0:B.value)??((re=(q=me.FormContent)==null?void 0:q.find(le=>{var la,ve;return(le==null?void 0:le.key)===(((ve=(la=c.value)==null?void 0:la.find(Ge=>(Ge==null?void 0:Ge.label)==="类型"))==null?void 0:ve.value)??"label")}))==null?void 0:re.value);if((Ae=c.value)==null||Ae.forEach(le=>{const la=fe==null?void 0:fe.find(ve=>(ve==null?void 0:ve.label)===(le==null?void 0:le.label));la&&(Z[la.key]=le.value)}),Z.width=Z.width?Z.width:1,Z.key=Z==null?void 0:Z.label,Z.isFormColHidden=Z==null?void 0:Z.isFormColHidden,(Ee=y.value)!=null&&Ee.find(le=>le.id===Z.id))y.value=(We=y.value)==null?void 0:We.map(le=>(le.id===Z.id&&(le=Z),le));else{let le=L.cloneDeep(y.value);le.push(Z),y.value=le}y.value=y.value.map(({id:le,...la})=>la),s.value=!1,u.value="";let ae=L.cloneDeep(n.originalItemContents);(da=L.cloneDeep(n.originalItemContents))!=null&&da.find(le=>(le==null?void 0:le.key)==="formContent")?ae=(Ta=L.cloneDeep(n.originalItemContents))==null?void 0:Ta.map(le=>((le==null?void 0:le.key)==="formContent"&&(le.contents=y.value),le)):ae.push({key:"formContent",contents:y.value}),i("change",ae)},300),te=()=>{s.value=!1,p.value=!1,u.value="",m.value=[],E.value=[]};return a.watch(()=>n.originalItemContents,()=>{var fe,ae,se,De,Pe,ke;if(!n.originalItemContents||n.originalItemContents.length===0)return;const Z=L.cloneDeep(n.originalItemContents);y.value=((fe=Z==null?void 0:Z.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:fe.contents)??[],h.value=((ae=Z==null?void 0:Z.find(B=>(B==null?void 0:B.key)==="formButton"))==null?void 0:ae.contents)??[],w.value=(se=Z==null?void 0:Z.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&se.contents?!((De=Z==null?void 0:Z.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&De.contents):!0,y.value=(Pe=L.cloneDeep(y.value))==null?void 0:Pe.map((B,q)=>{var Ae;let re=B;return re.id=(B==null?void 0:B.id)??q,B!=null&&B.label||(B.label=(B==null?void 0:B.key)??(B==null?void 0:B.label)??""),B!=null&&B.type||(B.type=(B==null?void 0:B.type)??""),B.contents=((Ae=B==null?void 0:B.options)==null?void 0:Ae.length)===0?(B==null?void 0:B.contents)??"":B==null?void 0:B.options,re}),y.value=me.formToOptionsContents(y.value),h.value=(ke=h.value)==null?void 0:ke.map((B,q)=>B={label:(B==null?void 0:B.label)??"",type:(B==null?void 0:B.type)??"",background:(B==null?void 0:B.background)??"var(--ssComponent-primary-color)",id:q})},{deep:!0,immediate:!0}),(Z,fe)=>{const ae=a.resolveComponent("svg-icon"),se=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",yh,[a.createElementVNode("div",gh,[a.createElementVNode("div",bh,[fe[2]||(fe[2]=a.createElementVNode("div",null,a.toDisplayString("表单内容"),-1)),a.createVNode(se,{class:"icon-content",id:"themeButton",onClick:k},{icon:a.withCtx(()=>[a.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[fe[1]||(fe[1]=a.createElementVNode("div",null,a.toDisplayString("新增"),-1))]),_:1,__:[1]})]),a.createElementVNode("div",kh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,(De,Pe)=>(a.openBlock(),a.createElementBlock("div",{key:Pe},[a.createElementVNode("div",xh,[a.createElementVNode("div",null,a.toDisplayString(De.label),1),a.createElementVNode("div",wh,[a.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ke=>M(De)},null,8,["onClick"]),a.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ke=>C(De)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",_h,[fe[4]||(fe[4]=a.createElementVNode("div",null,a.toDisplayString("表单按钮"),-1)),a.createVNode(se,{class:"icon-content",id:"themeButton",onClick:_},{icon:a.withCtx(()=>[a.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[fe[3]||(fe[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",Sh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(De,Pe)=>(a.openBlock(),a.createElementBlock("div",{key:Pe},[a.createElementVNode("div",Eh,[a.createElementVNode("div",null,a.toDisplayString(De.label),1),a.createElementVNode("div",Ch,[a.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ke=>O(De)},null,8,["onClick"]),a.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ke=>S(De)},null,8,["onClick"])])])]))),128))]),fe[6]||(fe[6]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("表单布局"))],-1)),a.createElementVNode("div",Dh,[fe[5]||(fe[5]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否自动撑宽"),-1)),a.createVNode(nl._sfc_main$1,{modelValue:w.value,"onUpdate:modelValue":fe[0]||(fe[0]=De=>w.value=De)},null,8,["modelValue"])])]),a.createVNode(_r.ssDialog,{visible:s.value,onBeforeDestroy:te,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",Nh,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:R,onChangeVisible:G,onBlurChange:ie},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Bh,[a.createVNode(se,{onClick:te,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>fe[7]||(fe[7]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[7]}),a.createVNode(se,{class:"ok-button button",onClick:a.unref(Se),id:"themeButton"},{default:a.withCtx(()=>fe[8]||(fe[8]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),a.createVNode(_r.ssDialog,{visible:p.value,onBeforeDestroy:te,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",Th,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:te,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:j},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},_s=er._export_sfc(Ah,[["__scopeId","data-v-20850524"]]),zh={class:"step-module content"},Mh={class:"module-data"},Ih={class:"step-module layout"},Oh={class:"form-content"},Lh=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=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"}]),p=a.reactive({visible:!1,width:"40%",title:"步骤条"}),h=a.ref("create"),y=a.ref({}),u=a.ref([]),w=M=>{var O;y.value=M,i("change",(O=E())==null?void 0:O.compData)},D=(M,O)=>{var j,C;switch(M){case"create":(j=c.value)==null||j.forEach(S=>{S.value=""}),h.value="create",p.visible=!0;break;case"update":(C=c.value)==null||C.forEach(S=>{S.value=O[S==null?void 0:S.prop]}),h.value="update",p.visible=!0;break;case"delete":u.value.splice(O,1),h.value="delete";break}},V=M=>{var O,j,C;if((M==null?void 0:M.buttonName)==="确认"){const S=L.cloneDeep(M==null?void 0:M.content);switch(Object.keys(S).forEach(_=>{S[_]===""&&delete S[_]}),h.value){case"create":u.value.push({...S,index:((O=u.value)==null?void 0:O.length)+1});break;case"update":u.value=(j=u.value)==null?void 0:j.map(_=>_.index===(S==null?void 0:S.index)?{..._,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:_);break}i("change",(C=E())==null?void 0:C.compData),p.visible=!1}else p.visible=!1},E=()=>({comp:"Step",compData:[{key:"stepList",contents:u.value},{key:"stepConfig",contents:y.value}]}),Y=()=>{p.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,M=>{var O,j;M&&(y.value=((O=M==null?void 0:M.find(C=>C.key==="stepConfig"))==null?void 0:O.contents)??{},u.value=((j=M==null?void 0:M.find(C=>C.key==="stepList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,O)=>{const j=a.resolveComponent("svg-icon"),C=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",zh,[O[2]||(O[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(C,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=S=>D("create"))},{icon:a.withCtx(()=>[a.createVNode(j,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[O[1]||(O[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",Mh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(S,_)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:_},[a.createElementVNode("span",null,a.toDisplayString(S==null?void 0:S.title),1),a.createElementVNode("div",null,[a.createVNode(C,{type:"primary",size:"small",onClick:k=>D("update",{...S,index:_+1})},{default:a.withCtx(()=>O[3]||(O[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(C,{type:"danger",size:"small",onClick:k=>D("delete",_)},{default:a.withCtx(()=>O[4]||(O[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",Ih,[O[5]||(O[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(nl.ssForm,{rowContents:s.value,onChange:w},null,8,["rowContents"])])]),a.createVNode(_r.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:Y,width:p.width},{default:a.withCtx(()=>[a.createElementVNode("div",Oh,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:V},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),$h=er._export_sfc(Lh,[["__scopeId","data-v-7dbd17f2"]]),Rh={class:"step-module content"},Vh={class:"module-data"},Fh={class:"step-module layout"},Ph={class:"form-content"},jh=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref("create"),c=a.ref({}),m=a.ref([]),p=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=M=>{var O;c.value=M,i("change",(O=E())==null?void 0:O.compData)},D=(M,O)=>{var j,C;switch(M){case"create":(j=h.value)==null||j.forEach(S=>{S.value=""}),s.value="create",u.visible=!0;break;case"update":(C=h.value)==null||C.forEach(S=>{S.value=O[S==null?void 0:S.prop]}),s.value="update",u.visible=!0;break;case"delete":m.value.splice(O,1),s.value="delete";break}},V=M=>{var O,j,C,S;if((M==null?void 0:M.buttonName)==="确认"){const _=L.cloneDeep(M==null?void 0:M.content);switch(Object.keys(_).forEach(k=>{_[k]===""&&delete _[k]}),s.value){case"create":(j=m.value)==null||j.push({..._,index:((O=m.value)==null?void 0:O.length)+1});break;case"update":m.value=(C=m.value)==null?void 0:C.map(k=>k.index===(_==null?void 0:_.index)?{...k,content:_==null?void 0:_.content,timestamp:_==null?void 0:_.timestamp}:k);break}i("change",(S=E())==null?void 0:S.compData),u.visible=!1}else u.visible=!1},E=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:m.value},{key:"timeLineConfig",contents:c.value}]}),Y=()=>{u.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,M=>{var O,j;M&&(c.value=((O=M==null?void 0:M.find(C=>C.key==="timeLineConfig"))==null?void 0:O.contents)??{},m.value=((j=M==null?void 0:M.find(C=>C.key==="timeLineList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,O)=>{const j=a.resolveComponent("svg-icon"),C=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",Rh,[O[2]||(O[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(C,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=S=>D("create"))},{icon:a.withCtx(()=>[a.createVNode(j,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[O[1]||(O[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",Vh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(S,_)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:_},[a.createElementVNode("span",null,a.toDisplayString(S==null?void 0:S.content),1),a.createElementVNode("div",null,[a.createVNode(C,{type:"primary",size:"small",onClick:k=>D("update",{...S,index:_+1})},{default:a.withCtx(()=>O[3]||(O[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(C,{type:"danger",size:"small",onClick:k=>D("delete",_)},{default:a.withCtx(()=>O[4]||(O[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",Fh,[O[5]||(O[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(nl.ssForm,{rowContents:p.value,onChange:w},null,8,["rowContents"])])]),a.createVNode(_r.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:Y,width:u.width},{default:a.withCtx(()=>[a.createElementVNode("div",Ph,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:V},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hh=er._export_sfc(jh,[["__scopeId","data-v-39ffc861"]]),Uh={};function qh(l,r){return a.openBlock(),a.createElementBlock("div")}const Wh=er._export_sfc(Uh,[["render",qh]]),Kh={class:"extra-content"},Gh={key:0},Yh={key:1},Jh={class:"dialog-footer"},Xh={__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,i=a.ref(0),s=a.ref(),c=a.ref(),m=r,p=a.ref(!1),h=a.ref({}),y=a.ref({}),u=a.ref();a.watch(()=>[n.itemData],()=>{var S;const C=L.cloneDeep(n.itemData);s.value=(S=L.cloneDeep(C))==null?void 0:S.map(_=>{var k;if(_.key==="extra"){let g=[];(k=_.value)==null||k.forEach($=>{var R;g.push((R=Object.values($))==null?void 0:R[0])}),_.value=g}return _})},{deep:!0,immediate:!0});const w=(C,S,_,k)=>{var $;let g={};(($=C==null?void 0:C[0])==null?void 0:$.contents)==="详情"&&(p.value=!0,g[S]=C,c.value=C==null?void 0:C.filter(R=>(R==null?void 0:R.key)!=="tableContentName"),h.value=g,y.value=_,u.value=k.id)},D=C=>{var R,G,ie,Se;const S=(G=(R=Object.values(L.cloneDeep(h.value)))==null?void 0:R[0])==null?void 0:G.filter(te=>(te==null?void 0:te.key)==="tableContentName"),_=(Se=(ie=Object.values(L.cloneDeep(h.value)))==null?void 0:ie[0])==null?void 0:Se.filter(te=>(te==null?void 0:te.key)!=="tableContentName"),k=_==null?void 0:_.map((te,Z)=>{var fe;return Z===C.index&&(te==null?void 0:te.comp)==="Table"&&(te.compData=(fe=te.compData)==null?void 0:fe.map(ae=>{var se,De;return(ae==null?void 0:ae.key)==="tableContents"&&(ae.contents=(De=(se=C.content)==null?void 0:se.map(Pe=>{let ke={};for(let B in Pe)B!=="id"&&(ke[B]=Pe[B]);return ke}))==null?void 0:De.map(Pe=>Object.values(Pe))),ae})),te});k.unshift(S==null?void 0:S[0]);let g=L.cloneDeep(h.value),$={};for(let te in g)$[te]=k;h.value=$},V=()=>{p.value=!1,h.value={},y.value={},u.value=void 0,i.value++},E=C=>{var R,G,ie,Se;const S=(G=(R=Object.values(L.cloneDeep(h.value)))==null?void 0:R[0])==null?void 0:G.filter(te=>(te==null?void 0:te.key)==="tableContentName"),_=(Se=(ie=Object.values(L.cloneDeep(h.value)))==null?void 0:ie[0])==null?void 0:Se.filter(te=>(te==null?void 0:te.key)!=="tableContentName"),k=_==null?void 0:_.map((te,Z)=>(Z===C.index&&(te.compData=C.contents),te));k.unshift(S==null?void 0:S[0]);let g=L.cloneDeep(h.value),$={};for(let te in g)$[te]=k;h.value=$},Y=()=>{var S,_;let C={};for(let k in y.value)k===((S=Object.keys(h.value))==null?void 0:S[0])?C[k]=(_=Object.values(h.value))==null?void 0:_[0]:C[k]=y.value[k];m("change",{buttonName:"编辑",index:u.value,singleContent:C},"methodData"),p.value=!1,h.value={},y.value={},u.value=void 0},M=()=>{p.value=!1,h.value={},y.value={},u.value=void 0},O=C=>{m("change",C,"methodData")},j=C=>Ti(C);return(C,S)=>{const _=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",Kh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:i.value},[(k==null?void 0:k.key)==="extra"?(a.openBlock(),a.createElementBlock("div",Gh)):(a.openBlock(),a.createElementBlock("div",Yh,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(j(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:O},null,40,["itemData","childItemData","index"]))]))]))),128)),a.createVNode(_r.ssDialog,{visible:p.value,onBeforeDestroy:M},{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(j(k.comp)),{itemData:k==null?void 0:k.compData,onChange:D,childItemData:k==null?void 0:k.itemChildData,key:g,onContentChange:E,index:(k==null?void 0:k.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:a.withCtx(()=>[a.createElementVNode("div",Jh,[a.createVNode(_,{class:"cancel-button footer-button",onClick:V,id:"themeBorderButton"},{default:a.withCtx(()=>S[0]||(S[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(_,{class:"confirm-button footer-button",onClick:Y,id:"themeButton"},{default:a.withCtx(()=>S[1]||(S[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Zh=er._export_sfc(Xh,[["__scopeId","data-v-2d9c5ab2"]]),Qh={key:0,class:"method-content"},e4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(l){const r=a.ref([]),n=me.useOriginalState(L.pinia),{originalPath:i}=L.storeToRefs(n),s=l,c=a.ref(!1),m=a.ref(),p=me.useTableComp(L.pinia),{multipleTableConst:h}=L.storeToRefs(p),y=L.useModelComp(L.pinia),u=a.ref(!1),w=L.useMenuState(L.pinia),D=L.useLoginState(L.pinia),{itemData:V,isEdit:E,routeToChildPath:Y,tableViewContents:M,lockingPage:O,payloadTypes:j}=L.storeToRefs(y),{activeMenuPath:C,platform:S,childMenu:_}=L.storeToRefs(w),{loginUserInfo:k}=L.storeToRefs(D),g=a.ref(!1),$=async()=>{var ke,B;(ke=r.value)!=null&&ke.find(q=>(q==null?void 0:q.buttonName)==="保存")&&await ae((B=r.value)==null?void 0:B.find(q=>(q==null?void 0:q.buttonName)==="保存")),await me.onSaveBack()};a.watch(()=>V.value,async()=>{E.value==="view"&&!g.value&&await Pe(L.cloneDeep(s.itemData)),g.value=!1},{deep:!0});const R=()=>{c.value=!1,m.value=void 0},G=ke=>ke.map(B=>{const q={};for(const re in B){const Ae=B[re];if(re.includes(h.value)){const Ee=re.split(h.value);let We=q;Ee.forEach((da,Ta)=>{Ta===Ee.length-1?We[da]=Ae:(We[da]||(We[da]={}),We=We[da])})}else q[re]=Ae}return q}),ie=async(ke,B,q=[])=>{var Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma;let re=(Ae=L.cloneDeep(B))==null?void 0:Ae.filter(P=>(P==null?void 0:P.comp)!=="methodButton");if(ke!=null&&ke.includes("[")){let P=(le=(Ta=(da=(We=(Ee=L.cloneDeep(ke))==null?void 0:Ee.split("["))==null?void 0:We[1])==null?void 0:da.split("]"))==null?void 0:Ta[0])==null?void 0:le.split(":"),H="";if(P!=null&&P[0]){let Q=(la=re==null?void 0:re.find(he=>(he==null?void 0:he.name)===(P==null?void 0:P[0])))==null?void 0:la.compData;if(!Q){let he=(ve=ke==null?void 0:ke.split("["))==null?void 0:ve[0],ge=await me.getItemData(he,sessionStorage.getItem("systemKey"),"",!1,"","",q);Q=(Ge=ge==null?void 0:ge.find(ha=>(ha==null?void 0:ha.name)===(P==null?void 0:P[0])))==null?void 0:Ge.compData}Q==null||Q.forEach(he=>{var ge,ha,Qe,pe,Ce,ma;if((he==null?void 0:he.key)==="formContent")(ge=he==null?void 0:he.contents)==null||ge.forEach(qe=>{var Ia;(qe==null?void 0:qe.key)===(P==null?void 0:P[1])&&(Array.isArray(qe==null?void 0:qe.value)?H=qe==null?void 0:qe.value:H=(Ia=qe==null?void 0:qe.value)==null?void 0:Ia.toString())});else if((he==null?void 0:he.key)==="tableContents"){let qe=[],Ia=(ha=Q==null?void 0:Q.find(Ze=>(Ze==null?void 0:Ze.key)==="header"))==null?void 0:ha.contents,Aa=(P==null?void 0:P[1])??"";if(Ia!=null&&Ia.every(Ze=>Array.isArray(Ze))){let Ze=me.getColumnChild((Ce=Ia==null?void 0:Ia[0])==null?void 0:Ce.filter(oa=>(oa==null?void 0:oa.label)!=="操作"));(ma=he.contents)==null||ma.forEach(oa=>{let ue={};oa=oa==null?void 0:oa.filter(U=>!(U!=null&&U.id)),Ze==null||Ze.forEach((U,W)=>{let Me=oa[W];typeof oa[W]=="number"&&(Me=oa[W].toString()),(Aa===""||Aa===U.prop)&&(ue[U.prop]=Me)}),qe.push(ue)}),qe=G(qe)}else{let Ze=(Qe=Ia==null?void 0:Ia.map(oa=>oa==null?void 0:oa.label))==null?void 0:Qe.filter(oa=>oa!=="操作");(pe=he.contents)==null||pe.forEach(oa=>{let ue={};oa=oa==null?void 0:oa.filter(U=>!(U!=null&&U.id)),Ze==null||Ze.forEach((U,W)=>{let Me=oa[W];typeof oa[W]=="number"&&(Me=oa[W].toString()),(Aa===""||Aa===U)&&(ue[U]=Me)}),qe.push(ue)})}H=qe}})}return H}else if(ke!=null&&ke.includes("/")){let P={};return(Oe=L.cloneDeep(re))==null||Oe.forEach((H,Q)=>{var he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa,Ze,oa,ue,U,W,Me,we,na,ta;if((H==null?void 0:H.comp)==="Table"){let Sa=Array.isArray((ha=(ge=(he=H==null?void 0:H.compData)==null?void 0:he.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:ge.contents)==null?void 0:ha[0])?(ma=(Ce=(pe=(Qe=H==null?void 0:H.compData)==null?void 0:Qe.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:pe.contents)==null?void 0:Ce[0])==null?void 0:ma.some($e=>$e==null?void 0:$e.children):[],ba=(Aa=(Ia=(qe=H==null?void 0:H.compData)==null?void 0:qe.find($e=>($e==null?void 0:$e.key)==="tableContents"))==null?void 0:Ia.contents)==null?void 0:Aa.map($e=>($e!=null&&$e.find($a=>$a==null?void 0:$a.id)&&($e=$e.slice(1)),$e)),Pa=(W=(U=(ue=(oa=(Ze=H==null?void 0:H.compData)==null?void 0:Ze.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:oa.contents)==null?void 0:ue[0])==null?void 0:U[0])==null?void 0:W.label,ya=(we=(Me=H==null?void 0:H.compData)==null?void 0:Me.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:we.contents;if(Sa)(Sa==null?void 0:Sa.length)===0?P[H.name]=P!=null&&P[H.name]?P[H.name]:me.tableToForm(ba,ya):P[Pa]=me.tableToForm(ba,ya);else{const $e=[];ya=ya.slice(1,ya.length-1),ya==null||ya.forEach(($a,fl)=>{ba==null||ba.forEach(Sl=>{$e.push({key:$a.label+Sl[0],value:Sl[fl+1]})})}),P["form"+Q]=$e}}else{const Sa=(ta=(na=H.compData)==null?void 0:na.find(Pa=>(Pa==null?void 0:Pa.key)==="formContent"))==null?void 0:ta.contents;P!=null&&P.form||(P.form=[]);const ba=[];Sa==null||Sa.forEach(Pa=>{Pa.key!==""&&(Pa={key:(Pa==null?void 0:Pa.key)??(Pa==null?void 0:Pa.label),value:Pa==null?void 0:Pa.value},ba.push(Pa))}),P.form=[...ba,...L.cloneDeep(P==null?void 0:P.form)]}}),P}else{if(ke==="createInsofDataApi"){let P=(ce=L.cloneDeep(B))==null?void 0:ce[0];return P={comp:(ze=L.cloneDeep(P))==null?void 0:ze.comp,compData:(Fe=L.cloneDeep(P))==null?void 0:Fe.compData,name:(xa=L.cloneDeep(P))==null?void 0:xa.name,isShow:(Ma=L.cloneDeep(P))==null?void 0:Ma.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:C.value},value:{pageData:P}}}return ke}},Se=async(ke,B,q)=>{var Ee,We,da;let re=await me.getItemData(B,sessionStorage.getItem("systemKey"),""),Ae=re==null?void 0:re.find(Ta=>(Ta==null?void 0:Ta.name)===(q==null?void 0:q[0]));if(Ae){if((Ae==null?void 0:Ae.comp)==="Table"){let Ta={};for(let ze in L.cloneDeep(ke))L.cloneDeep(ke)[ze]!=="loginUser"?Ta[ze]=L.cloneDeep(ke)[ze]:Ta[ze]=((Ee=k.value)==null?void 0:Ee.account)||((We=k.value)==null?void 0:We.账号);let le=[],la=Ta;Array.isArray(ke)||(la=[Ta]),la==null||la.forEach(ze=>{le.push({[ze[q[1]]]:ze})});let ve=[],Ge=le==null?void 0:le.map(ze=>{var Fe;return(Fe=Object.keys(ze))==null?void 0:Fe[0]});re==null||re.forEach(ze=>{var Fe;(ze==null?void 0:ze.name)===(q==null?void 0:q[0])&&((Fe=ze==null?void 0:ze.compData)==null||Fe.forEach(xa=>{var Ma;(xa==null?void 0:xa.key)==="tableContents"&&((Ma=xa==null?void 0:xa.contents)==null||Ma.forEach(P=>{P!=null&&P.some(H=>Ge.includes(H))&&ve.push({[P.find(H=>H.id).id]:P.find(H=>Ge.includes(H))})}))}))});let Oe=ve==null?void 0:ve.map(ze=>{var Fe;return(Fe=Object.keys(ze))==null?void 0:Fe[0]}),ce=[];if(Oe==null||Oe.forEach(ze=>{var Ma;let Fe=(Ma=ve==null?void 0:ve.find(P=>{var H;return((H=Object.keys(P))==null?void 0:H[0].toString())===ze.toString()}))==null?void 0:Ma[ze],xa=le==null?void 0:le.find(P=>{var H;return((H=Object.keys(P))==null?void 0:H[0])===Fe});ce.push({id:parseInt(ze),value:{tableData:xa[Fe]}})}),(ce==null?void 0:ce.length)>0)return ce}else if((Ae==null?void 0:Ae.comp)==="Form"){let Ta=L.cloneDeep(Ae);Ta.compData=(da=Ta.compData)==null?void 0:da.map(ve=>{var Ge;return(ve==null?void 0:ve.key)==="formContent"&&(ve.contents=(Ge=ve.contents)==null?void 0:Ge.map(Oe=>((Oe==null?void 0:Oe.key)===(q==null?void 0:q[1])&&(Oe.value=(ke==null?void 0:ke[Oe==null?void 0:Oe.prop])||ke),Oe))),ve});let le={};for(let ve in Ta)ve!=="id"&&(le[ve]=Ta[ve]);let la=[];if(la.push({id:Ae==null?void 0:Ae.id,keyType:q==null?void 0:q[1],value:{pageData:le}}),(la==null?void 0:la.length)>0)return la}}},te=async(ke,B,q)=>{var Ee,We,da,Ta,le,la,ve,Ge,Oe,ce;let re=await me.getItemData(B,sessionStorage.getItem("systemKey"),""),Ae=re==null?void 0:re.find(ze=>(ze==null?void 0:ze.name)===(q==null?void 0:q[0]));if(Ae){if((Ae==null?void 0:Ae.comp)==="Table"){let ze={};for(let Fe in L.cloneDeep(ke))L.cloneDeep(ke)[Fe]!=="loginUser"?ze[Fe]=L.cloneDeep(ke)[Fe]:ze[Fe]=((Ee=k.value)==null?void 0:Ee.account)||((We=k.value)==null?void 0:We.账号);await Nr.createInsofDataApi({key:{type:"data",pageKey:B,tableId:Ae==null?void 0:Ae.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ze}})}else if((Ae==null?void 0:Ae.comp)==="Form"){let ze=L.cloneDeep(Ae),Fe=Object.keys(ke),xa="";(Ta=(da=L.cloneDeep(ze))==null?void 0:da.compData)==null||Ta.forEach(ge=>{var ha,Qe;(ge==null?void 0:ge.key)==="formContent"&&((Qe=(ha=L.cloneDeep(ge))==null?void 0:ha.contents)==null||Qe.forEach(pe=>{var Ce;Fe.includes(pe==null?void 0:pe.key)&&(pe==null?void 0:pe.value)===((Ce=k.value)==null?void 0:Ce.姓名)&&(xa=pe==null?void 0:pe.key)}))});let Ma=[];(le=Object.values(ke[xa]))==null||le.forEach(ge=>{ge!=null&&ge.includes("(")&&Ma.push(ge)}),Ma=[...new Set(Ma)];const P=Ma==null?void 0:Ma.map(async ge=>{var ma,qe,Ia,Aa,Ze,oa,ue,U,W,Me,we,na;let ha="";(oa=(Ze=(Aa=(Ia=(qe=(ma=L.cloneDeep(ge))==null?void 0:ma.split("("))==null?void 0:qe[1])==null?void 0:Ia.split(")"))==null?void 0:Aa[0])==null?void 0:Ze.split(":"))==null||oa.forEach(ta=>{ha=ha===""?ha+ta.replaceAll("'",""):ha+"/"+ta.replaceAll("'","")});let Qe=[];(na=(we=(Me=(W=(U=(ue=L.cloneDeep(ge))==null?void 0:ue.split("<"))==null?void 0:U[1])==null?void 0:W.split(">"))==null?void 0:Me[0])==null?void 0:we.split(":"))==null||na.forEach(ta=>{Qe.push(ta.replaceAll("'",""))});const pe=await me.getItemData(ha,sessionStorage.getItem("systemKey"),"");let Ce="";return pe==null||pe.forEach(ta=>{var Sa;ta.name===(Qe==null?void 0:Qe[0])&&((Sa=ta==null?void 0:ta.compData)==null||Sa.forEach(ba=>{var Pa;(ba==null?void 0:ba.key)==="formContent"&&((Pa=ba.contents)==null||Pa.forEach(ya=>{(ya==null?void 0:ya.key)===(Qe==null?void 0:Qe[1])&&(Ce=ya==null?void 0:ya.value)}))}))}),{[ge]:Ce}}),H=await Promise.all(P);ze.compData=(ve=(la=L.cloneDeep(ze))==null?void 0:la.compData)==null?void 0:ve.map(ge=>{var ha,Qe;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(Qe=(ha=L.cloneDeep(ge))==null?void 0:ha.contents)==null?void 0:Qe.map(pe=>{var Ce,ma,qe,Ia;return(Ce=ke[xa])!=null&&Ce[pe==null?void 0:pe.key]&&(ke[xa][pe==null?void 0:pe.key].includes("(")?pe.value=(ma=H==null?void 0:H.find(Aa=>{var Ze;return((Ze=Object.keys(Aa))==null?void 0:Ze[0])===ke[xa][pe==null?void 0:pe.key]}))==null?void 0:ma[ke[xa][pe==null?void 0:pe.key]]:pe.value=(Ia=(qe=L.cloneDeep(ke))==null?void 0:qe[xa])==null?void 0:Ia[pe==null?void 0:pe.key]),pe})),ge});const Q=await Nr.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let he="";((Ge=Q==null?void 0:Q.data)==null?void 0:Ge.type)==="success"&&((ce=(Oe=Q==null?void 0:Q.data)==null?void 0:Oe.result)==null||ce.forEach(ge=>{var ha,Qe;((Qe=(ha=ge==null?void 0:ge.value)==null?void 0:ha.pageData)==null?void 0:Qe.name)===(q==null?void 0:q[0])&&(he=ge.id)}),await Nr.updateInsofDataApi({id:he,value:{pageData:ze}}))}}},Z=(ke,B="",q={})=>{for(const[re,Ae]of Object.entries(ke)){const Ee=B?`${B}.${re}`:re;Ae!==null&&typeof Ae=="object"&&!Array.isArray(Ae)&&Object.prototype.toString.call(Ae)!=="[object Date]"?Z(Ae,Ee,q):q[Ee]=Ae}return q},fe=async(ke,B,q,re)=>{var We,da,Ta,le,la,ve,Ge,Oe,ce,ze,Fe,xa,Ma,P,H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia;let Ae=await me.getItemData(B,sessionStorage.getItem("systemKey"),""),Ee=Ae==null?void 0:Ae.find(Aa=>(Aa==null?void 0:Aa.name)===(q==null?void 0:q[0]));if(Ee){if(!(q!=null&&q[1])&&(Ee==null?void 0:Ee.comp)==="Table"){let Aa={},Ze=[],oa=(da=(We=Ee==null?void 0:Ee.compData)==null?void 0:We.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:da.contents;oa!=null&&oa.every(W=>Array.isArray(W))?Ze=(le=me.getColumnChild((Ta=oa==null?void 0:oa[0])==null?void 0:Ta.filter(W=>(W==null?void 0:W.label)!=="操作")))==null?void 0:le.map(W=>W==null?void 0:W.prop):Ze=oa==null?void 0:oa.map(W=>W==null?void 0:W.label);for(let W in L.cloneDeep(ke))if(L.cloneDeep(ke)[W]!=="loginUser"){let Me=Z(L.cloneDeep(ke)[W]),we={};for(let na in Me)if(Ze!=null&&Ze.find(ta=>ta===na))we[na]=Me[na];else if(Ze!=null&&Ze.find(ta=>(ta==null?void 0:ta.toUpperCase())===(na==null?void 0:na.toUpperCase()))){let ta=Ze==null?void 0:Ze.find(Sa=>(Sa==null?void 0:Sa.toUpperCase())===(na==null?void 0:na.toUpperCase()));we[ta]=Me[na]}Aa[W]=we}else Aa[W]=((la=k.value)==null?void 0:la.account)||((ve=k.value)==null?void 0:ve.账号);let ue=await Nr.getInsofDataApi({keyLikes:{tableId:Ee==null?void 0:Ee.id}});if(((Oe=(Ge=ue==null?void 0:ue.data)==null?void 0:Ge.result)==null?void 0:Oe.length)>0){let W=(ze=(ce=ue==null?void 0:ue.data)==null?void 0:ce.result)==null?void 0:ze.map(Me=>Me==null?void 0:Me.id);(W==null?void 0:W.length)>0&&await Nr.batchDeleteInsofDataApi({ids:W})}let U=[];if((Fe=Ee==null?void 0:Ee.compData)!=null&&Fe.find(W=>(W==null?void 0:W.key)==="pageColumn")&&((P=(Ma=(xa=Ee==null?void 0:Ee.compData)==null?void 0:xa.find(W=>(W==null?void 0:W.key)==="pageColumn"))==null?void 0:Ma.contents)!=null&&P.includes("["))){const W=await Nr.getInsofDataApi({id:Ee==null?void 0:Ee.tableId});let Me=((ge=(he=(Q=(H=W==null?void 0:W.data)==null?void 0:H.result)==null?void 0:Q[0])==null?void 0:he.key)==null?void 0:ge.pageKey)??"";(ha=Object.values(Aa))==null||ha.forEach(we=>{U.push({key:{type:"data",pageKey:Me,tableId:Ee==null?void 0:Ee.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:we}})})}else(Qe=Object.values(Aa))==null||Qe.forEach(W=>{U.push({key:{type:"data",pageKey:B,tableId:Ee==null?void 0:Ee.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:W}})});(U==null?void 0:U.length)>0&&await Nr.batchAddInsofDataApi({dataList:U})}else if(!(q!=null&&q[1])&&(Ee==null?void 0:Ee.comp)==="Form"){let Aa=L.cloneDeep(Ee);Aa.compData=(Ce=(pe=L.cloneDeep(Aa))==null?void 0:pe.compData)==null?void 0:Ce.map(ue=>{var U,W;return(ue==null?void 0:ue.key)==="formContent"&&(ue.contents=(W=(U=L.cloneDeep(ue))==null?void 0:U.contents)==null?void 0:W.map(Me=>{var we,na;return(we=L.cloneDeep(ke))!=null&&we[Me==null?void 0:Me.key]&&(Me.value=(na=L.cloneDeep(ke))==null?void 0:na[Me==null?void 0:Me.key]),Me})),ue});const Ze=await Nr.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let oa="";((ma=Ze==null?void 0:Ze.data)==null?void 0:ma.type)==="success"&&((Ia=(qe=Ze==null?void 0:Ze.data)==null?void 0:qe.result)==null||Ia.forEach(ue=>{var U,W;((W=(U=ue==null?void 0:ue.value)==null?void 0:U.pageData)==null?void 0:W.name)===(q==null?void 0:q[0])&&(oa=ue.id)}),await Nr.updateInsofDataApi({id:oa,value:{pageData:Aa}}))}}},ae=async ke=>{var B,q,re,Ae,Ee,We,da,Ta,le,la,ve,Ge,Oe,ce;w.setImportLoading(!0);try{if(ke.api){let ze=new WeakMap,Fe=await me.getItemData((_==null?void 0:_.value)===""?C.value:_==null?void 0:_.value,sessionStorage.getItem("systemKey"),"",!1,"","",ze),xa="";if(Fe=Fe==null?void 0:Fe.map(Qe=>{var pe,Ce,ma,qe,Ia,Aa,Ze,oa,ue,U,W,Me;if((Qe==null?void 0:Qe.comp)==="Form")Qe.compData=(pe=Qe.compData)==null?void 0:pe.map(we=>{var na;return(we==null?void 0:we.key)==="formContent"&&(we.contents=(na=we.contents)==null?void 0:na.map(ta=>{var Sa;if((ta==null?void 0:ta.value)===""&&(ta==null?void 0:ta.type)==="Select"){let ba=me.judgeContents((Sa=L.cloneDeep(ta))==null?void 0:Sa.optionUrl,ze);ta.value=ta.value||ba}return ta})),we});else if((Qe==null?void 0:Qe.comp)==="Table"&&(Ce=Qe.compData)!=null&&Ce.find(we=>(we==null?void 0:we.key)==="pageColumn")){let we=(qe=(ma=Qe.compData)==null?void 0:ma.find(ba=>(ba==null?void 0:ba.key)==="pageColumn"))==null?void 0:qe.contents,na=((Aa=(Ia=Qe.compData)==null?void 0:Ia.find(ba=>(ba==null?void 0:ba.key)==="pageGroup"))==null?void 0:Aa.contents)??"",ta=(ue=(oa=(Ze=we==null?void 0:we.split("["))==null?void 0:Ze[1])==null?void 0:oa.split("]"))==null?void 0:ue[0];xa=((U=we==null?void 0:we.split("["))==null?void 0:U[0])+((Me=(W=M.value)==null?void 0:W.find(ba=>(ba==null?void 0:ba.key)===ta))==null?void 0:Me.value)}return Qe}),!(xa===""||xa==="")){const Qe=await me.getItemData(xa,sessionStorage.getItem("systemKey"),"",!1,"","",ze);Fe=Fe==null?void 0:Fe.map(pe=>{var Ce,ma,qe,Ia,Aa,Ze,oa,ue,U,W,Me,we,na;if((pe==null?void 0:pe.comp)==="Table"&&(Ce=pe.compData)!=null&&Ce.find(ta=>(ta==null?void 0:ta.key)==="pageColumn")){let ta=(qe=(ma=pe.compData)==null?void 0:ma.find($e=>($e==null?void 0:$e.key)==="pageColumn"))==null?void 0:qe.contents,Sa=((Aa=(Ia=pe.compData)==null?void 0:Ia.find($e=>($e==null?void 0:$e.key)==="pageGroup"))==null?void 0:Aa.contents)??"",ba=(ue=(oa=(Ze=ta==null?void 0:ta.split("["))==null?void 0:Ze[1])==null?void 0:oa.split("]"))==null?void 0:ue[0],Pa=((U=ta==null?void 0:ta.split("["))==null?void 0:U[0])+((Me=(W=M.value)==null?void 0:W.find($e=>($e==null?void 0:$e.key)===ba))==null?void 0:Me.value),ya=(we=Qe==null?void 0:Qe.find($e=>($e==null?void 0:$e.name)===(Sa===""?s==null?void 0:s.compName:Sa)))==null?void 0:we.compData;pe.compData=(na=pe.compData)==null?void 0:na.map($e=>{var $a;return($e==null?void 0:$e.key)==="tableContents"&&($e.contents=($a=ya==null?void 0:ya.find(fl=>(fl==null?void 0:fl.key)==="tableContents"))==null?void 0:$a.contents),$e})}return pe})}let Ma={};if(((q=(B=ke==null?void 0:ke.extraValues)==null?void 0:B.input)==null?void 0:q.length)>0){const Qe=(Ae=(re=ke==null?void 0:ke.extraValues)==null?void 0:re.input)==null?void 0:Ae.map(async pe=>{var Ce;se!=null&&se.find(ma=>ma===pe)?Ma=await ie(pe,Fe):Ma[Object.keys(pe)[0]]=await ie((Ce=Object.values(pe))==null?void 0:Ce[0],Fe,ze)});await Promise.all(Qe)}else Ma=await ie("/",Fe);let P=!1;(We=(Ee=ke==null?void 0:ke.extraValues)==null?void 0:Ee.output)==null||We.forEach(Qe=>{var pe,Ce;(Ce=(pe=Object.values(Qe))==null?void 0:pe[0])!=null&&Ce.includes(".doc")&&(P=!0)});let H;if(P){const Qe=Pi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await Ka.axios.post(ke.api,Ma,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Qe.close()})}else H=await Ka.axios.post(ke.api,Ma,{headers:{"Content-Type":"application/json"}});let Q=(la=(le=(Ta=(da=L.cloneDeep(ke))==null?void 0:da.extraValues)==null?void 0:Ta.output)==null?void 0:le.map(Qe=>{var pe,Ce,ma,qe,Ia,Aa,Ze,oa,ue,U,W,Me,we,na,ta,Sa;if(!((Ce=(pe=Object.values(Qe))==null?void 0:pe[0])!=null&&Ce.includes(".doc"))){let ba=(U=(ue=(oa=(qe=L.cloneDeep((ma=Object.values(Qe))==null?void 0:ma[0]))==null?void 0:qe.split("["))==null?void 0:oa[((Ze=(Aa=L.cloneDeep((Ia=Object.values(Qe))==null?void 0:Ia[0]))==null?void 0:Aa.split("["))==null?void 0:Ze.length)-1])==null?void 0:ue.split("]"))==null?void 0:U[0],Pa=ba==null?void 0:ba.split(":"),ya=(we=L.cloneDeep((W=Object.values(Qe))==null?void 0:W[0]))==null?void 0:we.substring(0,L.cloneDeep((Me=Object.values(Qe))==null?void 0:Me[0]).lastIndexOf("["));if(ya=(ta=L.cloneDeep(ya))==null?void 0:ta.slice(0,((na=L.cloneDeep(ya))==null?void 0:na.length)-1),ya!=null&&ya.includes("[")){let $e="";if((Sa=me.contentTransArrayToAll(ya,"/"))==null||Sa.forEach($a=>{var fl,Sl,Xl,bl,Vl,qa,Rl;if(!($a!=null&&$a.includes("[")))$e=$e===""?$e+$a.replaceAll("/",""):$e+"/"+$a.replaceAll("/","");else{let Il=L.cloneDeep($a).slice(1,((fl=L.cloneDeep($a))==null?void 0:fl.length)-1),La=(qa=(Vl=(bl=(Xl=(Sl=L.cloneDeep(Il))==null?void 0:Sl.split("["))==null?void 0:Xl[1])==null?void 0:bl.split("]"))==null?void 0:Vl[0])==null?void 0:qa.split(":"),al="",ol=(Rl=Fe==null?void 0:Fe.find(ia=>(ia==null?void 0:ia.name)===(La==null?void 0:La[0])))==null?void 0:Rl.compData;ol==null||ol.forEach(ia=>{var ja;(ia==null?void 0:ia.key)==="formContent"&&((ja=ia==null?void 0:ia.contents)==null||ja.forEach(Oa=>{(Oa==null?void 0:Oa.key)===(La==null?void 0:La[1])&&(al=Oa==null?void 0:Oa.value)}))}),$e=$e===""?$e+al.replaceAll("/",""):$e+"/"+al.replaceAll("/","")}}),ya=$e,ya[(ya==null?void 0:ya.length)-1]!=="/")return ya}}}))==null?void 0:la.filter(Qe=>Qe);Q=[...new Set(L.cloneDeep(Q))];let he=Q==null?void 0:Q.map(async Qe=>{let pe=await me.getItemData(Qe,sessionStorage.getItem("systemKey"),"",!1,"","",ze);if((pe==null?void 0:pe.length)===0)return await me.getParentContents(Qe)});await Promise.all(he);let ge=[],ha=(Oe=(Ge=(ve=L.cloneDeep(ke))==null?void 0:ve.extraValues)==null?void 0:Ge.output)==null?void 0:Oe.map(async Qe=>{var oa,ue,U,W,Me,we,na,ta,Sa,ba,Pa,ya,$e,$a,fl,Sl,Xl,bl,Vl,qa,Rl,Il,La,al,ol,ia,ja,Oa,Ra,be,ga,Le,de,wa,pa,ea,Je,Xe,dl,Ve,Va,_a,tl,za,Ie,El,Ol,Gl,Hl,Zl,Sr,Fl,fr,Fr,Ul,rr,$r,Br,Rr,Ar,yr,zr,Mr,ir,xn,Yr,nn,zn,wn,gn;if((ue=(oa=Object.values(Qe))==null?void 0:oa[0])!=null&&ue.includes(".doc")){var pe=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=H.headers["content-disposition"],ma=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),qe=ma.exec(Ce),Ia=qe==null?void 0:qe[1],Aa=document.createElement("a"),Ze=window.URL.createObjectURL(pe);m.value=[{name:Ia,blobUrl:Ze}],c.value=!0}else{let on=(ba=(Sa=(ta=(W=L.cloneDeep((U=Object.values(Qe))==null?void 0:U[0]))==null?void 0:W.split("["))==null?void 0:ta[((na=(we=L.cloneDeep((Me=Object.values(Qe))==null?void 0:Me[0]))==null?void 0:we.split("["))==null?void 0:na.length)-1])==null?void 0:Sa.split("]"))==null?void 0:ba[0],ar=on==null?void 0:on.split(":"),ql=($e=L.cloneDeep((Pa=Object.values(Qe))==null?void 0:Pa[0]))==null?void 0:$e.substring(0,L.cloneDeep((ya=Object.values(Qe))==null?void 0:ya[0]).lastIndexOf("["));if(ql!=null&&ql.includes("[")?ql=(fl=L.cloneDeep(ql))==null?void 0:fl.slice(0,(($a=L.cloneDeep(ql))==null?void 0:$a.length)-1):ql===""&&(ql=C.value),ql=ql.replaceAll("<","[").replaceAll(">","]"),ql!=null&&ql.includes("[")){let Ll="";(Sl=me.contentTransArrayToAll(ql,"/"))==null||Sl.forEach((zl,gr)=>{var ur,jl,Vr,Pr,_n,tn,ei,Mn,ai,Sn,In;if(!(zl!=null&&zl.includes("[")))Ll=Ll===""?Ll+zl.replaceAll("/",""):Ll+"/"+zl.replaceAll("/","");else{let Hn="",an="";(ur=L.cloneDeep(zl))!=null&&ur.includes("]")?(Hn=L.cloneDeep(zl).slice(1,((jl=L.cloneDeep(zl))==null?void 0:jl.length)-1),an=(ei=(tn=(_n=(Pr=(Vr=L.cloneDeep(Hn))==null?void 0:Vr.split("["))==null?void 0:Pr[1])==null?void 0:_n.split("]"))==null?void 0:tn[0])==null?void 0:ei.split(":")):(Hn=L.cloneDeep(zl).slice(1,(Mn=L.cloneDeep(zl))==null?void 0:Mn.length),an=(ai=L.cloneDeep(Hn))==null?void 0:ai.split("/"));let On="",En=(Sn=Fe==null?void 0:Fe.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=me.contentTransArrayToAll(ql,"/"))==null?void 0:In.length)-1!==gr?Ll=Ll===""?Ll+On.replaceAll("/",""):Ll+"/"+On.replaceAll("/",""):Ll=Ll+i.value+On.replaceAll("/","")}}),(Xl=C.value)!=null&&Xl.includes(Ll)?ql=C.value:ql=Ll}let Al=L.cloneDeep((bl=Object.keys(Qe))==null?void 0:bl[0]);if(((Vl=H==null?void 0:H.data)==null?void 0:Vl.statusCode)===200||((qa=H==null?void 0:H.data)==null?void 0:qa.code)===200){if(((Il=(Rl=H==null?void 0:H.data)==null?void 0:Rl.data)!=null&&Il[Al]||(al=(La=H==null?void 0:H.data)==null?void 0:La.result)!=null&&al[Al])&&(ar==null?void 0:ar.length)===1)return await fe(((ia=(ol=H==null?void 0:H.data)==null?void 0:ol.data)==null?void 0:ia[Al])||((Oa=(ja=H==null?void 0:H.data)==null?void 0:ja.result)==null?void 0:Oa[Al]),L.cloneDeep(ql),ar,xa);if((be=(Ra=H==null?void 0:H.data)==null?void 0:Ra.data)!=null&&be[Al]||(Le=(ga=H==null?void 0:H.data)==null?void 0:ga.result)!=null&&Le[Al]){let Ll=await Se(((wa=(de=H==null?void 0:H.data)==null?void 0:de.data)==null?void 0:wa[Al])||((ea=(pa=H==null?void 0:H.data)==null?void 0:pa.result)==null?void 0:ea[Al]),L.cloneDeep(ql),ar);return Ll&&(ge=[...ge,...Ll]),Ll}else{if(!((Je=H==null?void 0:H.data)!=null&&Je.data)){let Ll=await me.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,"","",ze);Ll=Ll==null?void 0:Ll.map(gr=>{var ur;return(gr==null?void 0:gr.name)===(ar==null?void 0:ar[0])&&(gr.compData=(ur=gr.compData)==null?void 0:ur.map(jl=>{var Vr;return(jl==null?void 0:jl.key)==="formContent"&&(jl.contents=(Vr=jl.contents)==null?void 0:Vr.map(Pr=>{var _n,tn;return(Pr==null?void 0:Pr.key)===(ar==null?void 0:ar[1])&&(Pr.value=(tn=(_n=H==null?void 0:H.data)==null?void 0:_n.result)==null?void 0:tn[Al==null?void 0:Al.replaceAll(":","")]),Pr})),jl})),gr});let zl=[];(Xe=Ll==null?void 0:Ll.filter(gr=>(gr==null?void 0:gr.comp)==="Form"))==null||Xe.forEach(async gr=>{let ur={};for(let jl in gr)jl!=="id"&&(ur[jl]=gr[jl]);zl.push({id:gr==null?void 0:gr.id,value:{pageData:ur}})}),(zl==null?void 0:zl.length)>0&&await Nr.batchUpdateInsofDataApi({dataList:zl});return}if((ar==null?void 0:ar.length)===1){const Ll=(Va=(Ve=(dl=H==null?void 0:H.data)==null?void 0:dl.data)==null?void 0:Ve.path)==null?void 0:Va.path;let zl="";(El=(Ie=(za=(tl=(_a=Ll==null?void 0:Ll.split("("))==null?void 0:_a[1])==null?void 0:tl.split(")"))==null?void 0:za[0])==null?void 0:Ie.split(":"))==null||El.forEach(jl=>{var Vr,Pr;zl=zl===""?zl+((Vr=jl==null?void 0:jl.replaceAll("'",""))==null?void 0:Vr.trim()):zl+"/"+((Pr=jl==null?void 0:jl.replaceAll("'",""))==null?void 0:Pr.trim())});let gr=[(Sr=(Zl=(Hl=(Gl=(Ol=Ll==null?void 0:Ll.split("<"))==null?void 0:Ol[1])==null?void 0:Gl.split(">"))==null?void 0:Hl[0])==null?void 0:Zl.replaceAll("'",""))==null?void 0:Sr.trim()],ur;return(Fr=(fr=(Fl=H==null?void 0:H.data)==null?void 0:Fl.data)==null?void 0:fr.data)!=null&&Fr[ar==null?void 0:ar[0]]?ur=await fe(($r=(rr=(Ul=H==null?void 0:H.data)==null?void 0:Ul.data)==null?void 0:rr.data)==null?void 0:$r[ar==null?void 0:ar[0]],zl,ar,xa):ur=await te((Rr=(Br=H==null?void 0:H.data)==null?void 0:Br.data)==null?void 0:Rr.data,zl,gr,ze),ur}else{const Ll=(zr=(yr=(Ar=H==null?void 0:H.data)==null?void 0:Ar.data)==null?void 0:yr.path)==null?void 0:zr.path;let zl="";return(nn=(Yr=(xn=(ir=(Mr=Ll==null?void 0:Ll.split("("))==null?void 0:Mr[1])==null?void 0:ir.split(")"))==null?void 0:xn[0])==null?void 0:Yr.split(":"))==null||nn.forEach(ur=>{var jl,Vr;zl=zl===""?zl+((jl=ur==null?void 0:ur.replaceAll("'",""))==null?void 0:jl.trim()):zl+"/"+((Vr=ur==null?void 0:ur.replaceAll("'",""))==null?void 0:Vr.trim())}),await Se((gn=(wn=(zn=H==null?void 0:H.data)==null?void 0:zn.data)==null?void 0:wn.data)==null?void 0:gn[ar==null?void 0:ar[0]],zl,ar)}}}}});if(await Promise.all(ha),(ge==null?void 0:ge.length)>0){let Qe=[];ge==null||ge.forEach(ma=>{Qe!=null&&Qe.find(qe=>{var Ia,Aa,Ze,oa;return((Aa=(Ia=qe==null?void 0:qe.value)==null?void 0:Ia.pageData)==null?void 0:Aa.name)===((oa=(Ze=ma==null?void 0:ma.value)==null?void 0:Ze.pageData)==null?void 0:oa.name)})||Qe.push(ma)});let pe=[];Qe==null||Qe.forEach(ma=>{var Aa,Ze,oa,ue;let qe=L.cloneDeep(ma);qe.value.pageData.compData=(Aa=qe.value.pageData.compData)==null?void 0:Aa.map(U=>{var W;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(W=U.contents)==null?void 0:W.map(Me=>{var na,ta,Sa,ba;let we=(na=L.cloneDeep(ge))==null?void 0:na.find(Pa=>(Pa==null?void 0:Pa.keyType)===(Me==null?void 0:Me.key));if(we){let Pa=(ba=(Sa=(ta=we.value.pageData.compData)==null?void 0:ta.find(ya=>(ya==null?void 0:ya.key)==="formContent"))==null?void 0:Sa.contents)==null?void 0:ba.find(ya=>(ya==null?void 0:ya.key)===(Me==null?void 0:Me.key));Me.value=Pa==null?void 0:Pa.value}return Me})),U}),pe.push({id:qe==null?void 0:qe.id,value:qe==null?void 0:qe.value});let Ia=[];(ue=(oa=(Ze=qe==null?void 0:qe.value)==null?void 0:Ze.pageData)==null?void 0:oa.compData)==null||ue.forEach(U=>{var W;(U==null?void 0:U.key)==="formContent"&&((W=U==null?void 0:U.contents)==null||W.forEach(Me=>{var we,na,ta,Sa,ba,Pa;if((na=(we=Me==null?void 0:Me.optionUrl)==null?void 0:we.menuSelect)!=null&&na.find(ya=>ya==null?void 0:ya.includes("[")))if(Ia!=null&&Ia.find(ya=>{var $e,$a,fl;return(($e=ya==null?void 0:ya.key)==null?void 0:$e.join(","))===((fl=($a=Me==null?void 0:Me.optionUrl)==null?void 0:$a.menuSelect)==null?void 0:fl.join(","))})){let ya=(ta=Ia==null?void 0:Ia.find($e=>{var $a,fl,Sl;return(($a=$e==null?void 0:$e.key)==null?void 0:$a.join(","))===((Sl=(fl=Me==null?void 0:Me.optionUrl)==null?void 0:fl.menuSelect)==null?void 0:Sl.join(","))}))==null?void 0:ta.value;ya.push({key:Me==null?void 0:Me.prop,groups:(Sa=Me==null?void 0:Me.optionUrl)==null?void 0:Sa.groupSelect,value:Me==null?void 0:Me.value}),Ia=Ia==null?void 0:Ia.map($e=>{var $a,fl,Sl;return(($a=$e==null?void 0:$e.key)==null?void 0:$a.join(","))===((Sl=(fl=Me==null?void 0:Me.optionUrl)==null?void 0:fl.menuSelect)==null?void 0:Sl.join(","))&&($e.value=ya),$e})}else Ia.push({key:(ba=Me==null?void 0:Me.optionUrl)==null?void 0:ba.menuSelect,value:[{key:Me==null?void 0:Me.prop,groups:(Pa=Me==null?void 0:Me.optionUrl)==null?void 0:Pa.groupSelect,value:Me==null?void 0:Me.value}]})}))}),(Ia==null?void 0:Ia.length)>0&&(Ia=Ia==null?void 0:Ia.map(U=>{var Me;let W="";return(Me=U==null?void 0:U.key)==null||Me.forEach(we=>{var na;if(!(we!=null&&we.includes("[")))W=W===""?W+we:W+"/"+we;else{let ta="",Sa=(na=we==null?void 0:we.replaceAll("[","").replaceAll("]",""))==null?void 0:na.split(":");Fe==null||Fe.forEach(ba=>{var Pa;(ba==null?void 0:ba.name)===(Sa==null?void 0:Sa[0])&&((Pa=ba==null?void 0:ba.compData)==null||Pa.forEach(ya=>{var $e;(ya==null?void 0:ya.key)==="formContent"&&(($e=ya==null?void 0:ya.contents)==null||$e.forEach($a=>{($a==null?void 0:$a.prop)===(Sa==null?void 0:Sa[1])&&(ta=$a==null?void 0:$a.value)}))}))}),W=W+i.value+ta}}),U.key=W,U})),Ia==null||Ia.forEach(U=>{var na,ta,Sa;let W=(na=ze[U.key])==null?void 0:na.find(ba=>{var Pa,ya,$e,$a,fl,Sl,Xl;return((ya=(Pa=ba==null?void 0:ba.value)==null?void 0:Pa.pageData)==null?void 0:ya.name)===((fl=($a=($e=U==null?void 0:U.value)==null?void 0:$e[0])==null?void 0:$a.groups)==null?void 0:fl[0])&&((Xl=(Sl=ba==null?void 0:ba.value)==null?void 0:Sl.pageData)==null?void 0:Xl.name)!==void 0}),Me=W==null?void 0:W.id,we=(ta=W==null?void 0:W.value)==null?void 0:ta.pageData;we.compData=(Sa=we.compData)==null?void 0:Sa.map(ba=>{var Pa;return(ba==null?void 0:ba.key)==="formContent"&&(ba.contents=(Pa=ba.contents)==null?void 0:Pa.map(ya=>{var $a;let $e=($a=U.value)==null?void 0:$a.find(fl=>(fl==null?void 0:fl.key)===(ya==null?void 0:ya.prop));return $e&&(ya.value=$e.value),ya})),ba}),pe.push({id:Me,value:{pageData:we}})})});let Ce=(ce=L.cloneDeep(ge))==null?void 0:ce[0];(pe==null?void 0:pe.length)>0&&await Nr.batchUpdateInsofDataApi({dataList:pe})}y.setFreshContent(!0)}w.setImportLoading(!1)}catch{Ka.ElMessage.error("方法执行错误,请查看方法!"),w.setImportLoading(!1)}g.value=!0},se=["createInsofDataApi"],De=Nl.debounce(async ke=>{ae(ke)},100),Pe=async ke=>{var We,da,Ta;const B=L.cloneDeep(ke);let q,re=new WeakMap;ke!=null&&ke[0].path&&(q=await(B==null?void 0:B.map(async(le,la)=>{var Ma,P,H,Q,he,ge,ha,Qe,pe,Ce,ma,qe,Ia,Aa,Ze,oa;const Ge=(Ma=re[le==null?void 0:le.path])==null?void 0:Ma.filter(ue=>{var U;return((U=ue==null?void 0:ue.key)==null?void 0:U.type)==="data"});let Oe="";const ce=await me.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,re);Ge==null||Ge.forEach(ue=>{var U,W,Me,we,na;((W=(U=ue==null?void 0:ue.value)==null?void 0:U.tableData)==null?void 0:W.算法名称)===((Me=B==null?void 0:B[la])==null?void 0:Me.method)&&(Oe=(na=(we=ue==null?void 0:ue.value)==null?void 0:we.tableData)==null?void 0:na.算法体)});const ze=await me.getItemData(le==null?void 0:le.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,re);let Fe="",xa=(he=(Q=(H=(P=ze==null?void 0:ze[0])==null?void 0:P.compData)==null?void 0:H.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:Q.contents)==null?void 0:he.findIndex(ue=>(ue==null?void 0:ue.prop)==="算法体");return(ha=(ge=ze==null?void 0:ze[0])==null?void 0:ge.compData)==null||ha.forEach(ue=>{var U;(ue==null?void 0:ue.key)==="tableContents"&&((U=ue==null?void 0:ue.contents)==null||U.forEach(W=>{W!=null&&W.find(Me=>Me===(le==null?void 0:le.method))&&(Fe=W[xa])}))}),{buttonName:((Qe=B==null?void 0:B[la])==null?void 0:Qe.method)||((ma=(Ce=(pe=Ge==null?void 0:Ge[0])==null?void 0:pe.value)==null?void 0:Ce.tableData)==null?void 0:ma.算法名称),api:(Oe===""?(Aa=(Ia=(qe=Ge==null?void 0:Ge[0])==null?void 0:qe.value)==null?void 0:Ia.tableData)==null?void 0:Aa.算法体:Oe)||Fe,content:ce==null?void 0:ce.filter(ue=>ue.comp!=="methodButton"),extraContent:(Ze=L.cloneDeep(le.value))==null?void 0:Ze.slice(1),methodName:(le==null?void 0:le.path)??"",extraValues:(oa=B==null?void 0:B[la])==null?void 0:oa.data}})));const Ae=B==null?void 0:B.map(async le=>{var ze,Fe,xa,Ma,P,H;const la=(ze=resAll.data.result)==null?void 0:ze.filter(Q=>{var he,ge,ha;return((he=Q==null?void 0:Q.key)==null?void 0:he.parentTable)===""&&((ge=Q==null?void 0:Q.key)==null?void 0:ge.type)==="method"&&((ha=Q==null?void 0:Q.key)==null?void 0:ha.methodName)===Q.method}),ve=la==null?void 0:la[0],Ge=(Fe=resAll.data.result)==null?void 0:Fe.filter(Q=>{var he,ge;return((he=Q==null?void 0:Q.key)==null?void 0:he.type)==="methodData"&&((ge=Q==null?void 0:Q.key)==null?void 0:ge.tableId)===(ve==null?void 0:ve.id)}),Oe=await me.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,re),ce=Ge==null?void 0:Ge[0];return{buttonName:(xa=ve==null?void 0:ve.key)==null?void 0:xa.methodKey,api:(P=(Ma=ce==null?void 0:ce.value)==null?void 0:Ma.tableData)==null?void 0:P[0],content:Oe==null?void 0:Oe.filter(Q=>Q.comp!=="methodButton"),extraContent:(H=L.cloneDeep(le.value))==null?void 0:H.slice(1),methodName:(le==null?void 0:le.method)??""}}),Ee=(We=ke==null?void 0:ke[0])!=null&&We.path&&((da=ke==null?void 0:ke[0])==null?void 0:da.path)!==""?await Promise.all(q):await Promise.all(Ae);r.value=Ee==null?void 0:Ee.filter(le=>le==null?void 0:le.extraContent),(Ta=r.value)==null||Ta.forEach(le=>{var la;le.api===""&&((la=le.content)==null||la.forEach(ve=>{var Ge;ve.comp=="Table"&&y.setExtraContents(me.methodTableToContent(ve.compData,(Ge=le.extraContent)==null?void 0:Ge[0]))}))})};return a.watch(()=>s.itemData,async()=>{E.value=="view"&&!g.value&&await Pe(L.cloneDeep(s.itemData)),g.value=!1},{immediate:!0,deep:!0}),(ke,B)=>{var q,re,Ae;return a.unref(E)!=="edit"?(a.openBlock(),a.createElementBlock("div",Qh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((q=r.value)==null?void 0:q.filter(Ee=>(Ee==null?void 0:Ee.buttonName)!=="保存"),Ee=>{var We;return a.openBlock(),a.createElementBlock("div",null,[Ee.api!==""?(a.openBlock(),a.createBlock(a.unref(ns._sfc_main),{key:0,disabled:a.unref(O)===a.unref(C)&&!((We=Ee==null?void 0:Ee.buttonName)!=null&&We.includes("预览")),class:"calculator-content",modelValue:Ee.buttonName,onClickTrigger:da=>a.unref(De)(Ee),loading:u.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):a.createCommentVNode("",!0)])}),256)),a.createElementVNode("div",null,[a.unref(Y)!==""&&((Ae=a.unref(C))==null?void 0:Ae[((re=a.unref(C))==null?void 0:re.length)-1])!==a.unref(i)?(a.openBlock(),a.createBlock(a.unref(ns._sfc_main),{key:0,class:"calculator-content",onClickTrigger:$,modelValue:"保存"})):a.createCommentVNode("",!0)]),c.value?(a.openBlock(),a.createBlock(nl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:R},null,8,["fileDataList"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)}}},a4=er._export_sfc(e4,[["__scopeId","data-v-063aa9af"]]),l4={};function r4(l,r){return" 567 "}const n4=er._export_sfc(l4,[["render",r4]]),i4={class:"module content"},o4={class:"module data"},t4={class:"module layout"},s4={class:"form-content"},c4=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.reactive({visible:!1,width:"40%",title:"签名配置"}),c=a.ref("create"),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=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}]}),D=M=>{var O;y.value=L.cloneDeep(M),i("change",(O=w())==null?void 0:O.compData)},V=M=>{var O,j;if((M==null?void 0:M.buttonName)==="确认"){const C=L.cloneDeep(M==null?void 0:M.content);switch(c.value){case"create":u.value.push({...C,index:((O=u.value)==null?void 0:O.length)+1});break}i("change",(j=w())==null?void 0:j.compData),s.visible=!1}else s.visible=!1},E=(M,O)=>{var j,C;switch(M){case"create":(j=h.value)==null||j.forEach(S=>{S.value=""}),c.value="create",s.visible=!0;break;case"update":(C=h.value)==null||C.forEach(S=>{S.value=O[S==null?void 0:S.prop]}),c.value="update",s.visible=!0;break;case"delete":u.value.splice(O,1),c.value="delete";break}},Y=()=>{s.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,M=>{var O,j;M&&(y.value=((O=M==null?void 0:M.find(C=>C.key==="signConfig"))==null?void 0:O.contents)??{},u.value=((j=M==null?void 0:M.find(C=>C.key==="signTypeList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,O)=>{const j=a.resolveComponent("svg-icon"),C=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",i4,[O[2]||(O[2]=a.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),a.createVNode(C,{class:"module-icon",id:"themeButton",onClick:O[0]||(O[0]=S=>E("create"))},{icon:a.withCtx(()=>[a.createVNode(j,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[O[1]||(O[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",o4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(S,_)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:_},[a.createElementVNode("span",null,a.toDisplayString(S==null?void 0:S.label),1),a.createElementVNode("div",null,[a.createVNode(C,{type:"primary",size:"small",onClick:k=>E("update",{...S,index:_+1})},{default:a.withCtx(()=>O[3]||(O[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(C,{type:"danger",size:"small",onClick:k=>E("delete",_)},{default:a.withCtx(()=>O[4]||(O[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",t4,[a.createVNode(nl.ssForm,{rowContents:p.value,onChange:D},null,8,["rowContents"])])]),a.createVNode(_r.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:Y,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",s4,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:V},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),u4=er._export_sfc(c4,[["__scopeId","data-v-487e0536"]]),d4=a.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(0),c=a.computed(()=>{var w,D;return(w=n==null?void 0:n.stepConfig)!=null&&w.allowTrigger?s.value:(D=n==null?void 0:n.stepConfig)==null?void 0:D.active}),m=(w,D)=>{s.value=D-1,i("clickStep",w,D)};a.onMounted(()=>{var w;i("clickStep",(w=n==null?void 0:n.stepList)==null?void 0:w[0],0)});const p=w=>nl.getComponent(w),h=()=>{var D;const w=(D=n==null?void 0:n.stepList)==null?void 0:D.find((V,E)=>E+1===c.value);return console.log("findStep",w),w?w==null?void 0:w.children:[]},y=w=>{i("clickTrigger",w)},u=w=>{i("changeTrigger",w)};return(w,D)=>{var Y,M,O,j,C;const V=a.resolveComponent("el-step"),E=a.resolveComponent("el-steps");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(E,{direction:(Y=l.stepConfig)==null?void 0:Y.direction,active:c.value,"finish-status":"success",simple:(M=l.stepConfig)==null?void 0:M.simple,"align-center":((O=l.stepConfig)==null?void 0:O.alignCenter)??!0},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.stepList,(S,_)=>(a.openBlock(),a.createBlock(V,{key:_,class:"step-item",onClick:k=>m(S,_+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"]),(j=l.stepConfig)!=null&&j.allowTrigger&&((C=l.stepConfig)!=null&&C.active)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(h(),(S,_)=>(a.openBlock(),a.createElementBlock("div",{key:_,class:"step-cont-wrap"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(p(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($=>[a.renderSlot(w.$slots,g,a.mergeProps({ref_for:!0},$||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):a.createCommentVNode("",!0)],64)}}}),p4=er._export_sfc(d4,[["__scopeId","data-v-fdbd6832"]]),f4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(l,{emit:r}){const n=l,i=r,s=a.ref({}),c=a.ref([]),m=(p,h)=>{i("clickStep",p,h)};return a.watch(()=>n==null?void 0:n.itemData,p=>{var w,D,V,E;s.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let h=((w=p==null?void 0:p.find(Y=>(Y==null?void 0:Y.key)==="stepName"))==null?void 0:w.contents)??[],y=[];(V=(D=p==null?void 0:p.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:D.contents)==null||V.forEach(Y=>{y.push({label:Y==null?void 0:Y.label,prop:Y==null?void 0:Y.prop,name:Y==null?void 0:Y.prop,type:"text",disabled:!0})});let u=((E=p==null?void 0:p.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:E.contents)??[];h=h==null?void 0:h.map((Y,M)=>{let O=y==null?void 0:y.map(j=>{var C;return{...j,value:(C=u==null?void 0:u[M])==null?void 0:C[j==null?void 0:j.prop]}});return{title:Y,description:O}}),c.value=h},{immediate:!0,deep:!0}),(p,h)=>{const y=a.resolveComponent("svg-icon");return a.openBlock(),a.createBlock(p4,{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(nl.ssForm,{ref:"formRef",rowContents:u,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),h4=a.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(l){return(r,n)=>{const i=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(i,{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})}}}),v4=er._export_sfc(h4,[["__scopeId","data-v-4172a886"]]),m4={class:"line-content"},y4={class:"line-time"},g4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(l){const r=l,n=a.ref({}),i=a.ref([]);return a.watch(()=>r==null?void 0:r.itemData,s=>{var c,m;i.value=(c=s==null?void 0:s.find(p=>(p==null?void 0:p.key)==="timeLineList"))==null?void 0:c.contents,n.value=(m=s==null?void 0:s.find(p=>(p==null?void 0:p.key)==="timeLineConfig"))==null?void 0:m.contents},{immediate:!0}),(s,c)=>(a.openBlock(),a.createBlock(v4,{activities:i.value,timeLineConfig:n.value},{content:a.withCtx(({content:m,timestamp:p})=>[a.createElementVNode("span",m4,a.toDisplayString(m),1),a.createElementVNode("span",y4,a.toDisplayString(p),1)]),_:1},8,["activities","timeLineConfig"]))}}),b4=er._export_sfc(g4,[["__scopeId","data-v-b4d9deed"]]),k4={class:"tabs-content"},x4=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,i=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=D=>{i("change",D)},m=(D,V)=>{i("contentChange",D,V)},p=D=>{i("pageChange",D)},h=D=>{i("rowClick",D)},y=(D,V)=>{i("routeUrl",D,V)},u=D=>{i("clickTrigger",D)},w=(D,V)=>{i("clickMainKey",D,V)};return(D,V)=>{var E,Y;return a.openBlock(),a.createElementBlock("div",k4,[(E=s.value)!=null&&E.length?(a.openBlock(),a.createBlock(nl.ssTab,{tabsContents:s.value,key:(Y=s.value)==null?void 0:Y.length},{pane:a.withCtx(({tab:M,index:O})=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ki)(M==null?void 0:M.comp)),{related:M==null?void 0:M.relatedTables,compNames:n==null?void 0:n.compNames,compName:M==null?void 0:M.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:l.isDevMode,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:c,index:(M==null?void 0:M.id)??O,config:{showIndex:M==null?void 0:M.showIndex,allowMove:M==null?void 0:M.allowMove,viewport:M==null?void 0:M.viewport},onContentChange:m,onPageChange:p,onRowClick:h,onRouteUrl:y,parentTableId:M==null?void 0:M.tableId,allMapContents:l.allMapContents,children:M==null?void 0:M.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)])}}}),w4=er._export_sfc(x4,[["__scopeId","data-v-ded4e0d9"]]),_4={class:"type-select"},S4=["onClick"],E4={class:"list-icon"},C4={__name:"modelSelect",setup(l){const r=Qn(L.pinia),{itemData:n}=L.storeToRefs(r),i=s=>{const c=L.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",_4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(ou),(p,h)=>(a.openBlock(),a.createElementBlock("div",{class:"type-list",key:h},[a.createElementVNode("div",{class:"list-content",onClick:y=>i(p)},[a.createElementVNode("div",E4,[a.createVNode(m,{name:p.icon},null,8,["name"])]),a.createElementVNode("div",null,a.toDisplayString(p.name),1)],8,S4)]))),128))])}}},D4=er._export_sfc(C4,[["__scopeId","data-v-91799bf8"]]),N4={class:"fill-content"},B4={class:"operate-content"},T4={class:"collapse-title-content"},A4={class:"collapse-title-item"},z4={key:1},M4=["onClick"],I4={class:"icon-content"},O4={key:0,class:"edit-content"},L4=["onClick"],$4={class:"comp-child"},R4={__name:"modelFill",setup(l){const r=Qn(L.pinia),{itemData:n,originalData:i}=L.storeToRefs(r),s=a.ref([]);a.ref([]);const c=a.ref([]),m=a.ref([]),p=V=>{var Y;let E=(Y=L.cloneDeep(m.value))==null?void 0:Y.map((M,O)=>(V===O&&(M.content=!0),M));m.value=E},h=V=>{var Y;let E=(Y=L.cloneDeep(m.value))==null?void 0:Y.map((M,O)=>(V===O&&(M.content=!1),M));m.value=E,s.value=L.cloneDeep(n.value)},y=(V,E)=>{var j;let Y=(j=L.cloneDeep(m.value))==null?void 0:j.map((C,S)=>(V===S&&(C.content=!1),C));m.value=Y;const M=L.cloneDeep(n.value),O=M==null?void 0:M.filter((C,S)=>(S===V&&(C.name=E),C));r.setOriginalData(O),r.setItemData(O)};a.watch(()=>n.value,()=>{var V,E,Y;!n.value||((V=n.value)==null?void 0:V.length)===0?s.value=[]:s.value=(E=L.cloneDeep(n.value))==null?void 0:E.filter(M=>(M==null?void 0:M.comp)!=="methodButton"),c.value=s.value,m.value=(Y=L.cloneDeep(c.value))==null?void 0:Y.map((M,O)=>({id:O,content:!1}))},{deep:!0,immediate:!0});const u=V=>Ti(V),w=(V,E,Y)=>{var O,j;if(!V)return;let M=L.cloneDeep(n.value);M=(O=M==null?void 0:M.map((C,S)=>(S===Y&&(C.compData=V),C)))==null?void 0:O.filter(C=>(C==null?void 0:C.comp)!=="methodButton"),m.value=(j=L.cloneDeep(M))==null?void 0:j.map((C,S)=>({id:S,content:!1})),r.setOriginalData(M),r.setItemData(M)},D=V=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const E=L.cloneDeep(n.value),Y=E==null?void 0:E.filter((M,O)=>O!==V);r.setOriginalData(Y),r.setItemData(Y),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(V,E)=>{const Y=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",N4,[E[1]||(E[1]=a.createElementVNode("div",{class:"fill-operate"},a.toDisplayString("操作栏"),-1)),a.createElementVNode("div",B4,[a.createVNode(Zs.default,{class:"collapse-content",collapseContents:s.value},{title:a.withCtx(({item:M,index:O})=>{var j,C,S,_,k,g,$,R,G,ie;return[a.createElementVNode("div",T4,[a.createElementVNode("div",A4,[(C=(j=m.value)==null?void 0:j.find(Se=>Se.id===O))!=null&&C.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"collapse-title",style:a.normalizeStyle({marginRight:M.name&&M.name!==""?"8px":"0px"})},a.toDisplayString(M.name),5)),(_=(S=m.value)==null?void 0:S.find(Se=>Se.id===O))!=null&&_.content?(a.openBlock(),a.createElementBlock("div",z4,[a.createVNode(nl.ssInput,{modelValue:M.name,"onUpdate:modelValue":Se=>M.name=Se,onClick:E[0]||(E[0]=a.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):a.createCommentVNode("",!0),(g=(k=m.value)==null?void 0:k.find(Se=>Se.id===O))!=null&&g.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(Se=>p(O),["stop"]),class:"icon-content"},[a.createVNode(Y,{name:"Edit",style:{width:"16px",height:"16px"}})],8,M4))]),a.createElementVNode("div",I4,[(R=($=m.value)==null?void 0:$.find(Se=>Se.id===O))!=null&&R.content?(a.openBlock(),a.createElementBlock("div",O4,[a.createVNode(Y,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:a.withModifiers(Se=>h(O),["stop"])},null,8,["onClick"]),a.createVNode(Y,{name:"Save",onClick:a.withModifiers(Se=>y(O,M.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):a.createCommentVNode("",!0),(ie=(G=m.value)==null?void 0:G.find(Se=>Se.id===O))!=null&&ie.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,onClick:a.withModifiers(Se=>D(O),["stop"]),class:"icon-content"},[a.createVNode(Y,{name:"Delete",style:{width:"16px",height:"16px"}})],8,L4))])])]}),content:a.withCtx(({item:M,index:O})=>{var j,C;return[a.createElementVNode("div",$4,[a.createTextVNode(a.toDisplayString(u(M.comp+"Operate"))+" ",1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u(M.comp+"Operate")),{itemContents:M==null?void 0:M.compData,originalItemContents:(C=(j=c.value)==null?void 0:j.find((S,_)=>_===O))==null?void 0:C.compData,onChange:S=>w(S,M,O)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},V4=er._export_sfc(R4,[["__scopeId","data-v-a46a44b9"]]),F4={key:0,class:"show-content"},P4={style:{display:"flex"}},j4={__name:"modelShow",setup(l){const r=Qn(L.pinia),{itemData:n}=L.storeToRefs(r),i=a.ref([]);a.watch(()=>n.value,()=>{var c;!n.value||((c=n.value)==null?void 0:c.length)===0?i.value=[]:i.value=L.cloneDeep(n.value)},{deep:!0,immediate:!0});const s=c=>Ti(c);return(c,m)=>{var p;return((p=i.value)==null?void 0:p.length)>0?(a.openBlock(),a.createElementBlock("div",F4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,(h,y)=>(a.openBlock(),a.createElementBlock("div",{class:"item-content",key:y},[a.createElementVNode("div",P4,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)}}},H4=er._export_sfc(j4,[["__scopeId","data-v-3f3e863e"]]),U4={class:"tabs-header"},q4={class:"tabs-list"},W4={class:"tab-name"},K4={class:"tab-actions"},G4=["onClick"],Y4=["onClick"],J4=["onClick"],X4={class:"model-operate"},Z4={class:"model-select",style:{display:"unset"}},Q4={class:"existing-components"},e6={class:"component-list"},a6=["onClick"],l6={class:"component-info"},r6={class:"component-type"},n6={class:"component-name"},i6={class:"model-fill"},o6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref([]),c=a.ref(!1),m=a.ref(""),p=a.ref({title:""}),h=a.ref(-1),y=a.ref(!1),u=a.ref(-1),w=a.ref(new WeakMap),D=a.ref(null),V=Qn(L.pinia),{itemData:E}=L.storeToRefs(V),Y=()=>{m.value="新增标签页",p.value.title="",h.value=-1,c.value=!0},M=ke=>{m.value="修改标签页",p.value.title=s.value[ke].title,h.value=ke,c.value=!0},O=ke=>{const B=S(ke);w.value.delete(B),s.value.splice(ke,1),Pe()},j=()=>{if(p.value.title.trim()){if(h.value===-1){const ke={title:p.value.title,value:p.value.title,label:p.value.title,children:[],id:C()};s.value.push(ke)}else s.value[h.value].title=p.value.title,s.value[h.value].value=p.value.title,s.value[h.value].label=p.value.title;c.value=!1,Pe()}},C=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=ke=>{const B=s.value[ke];return B.id||(B.id=C()),B.id},_=ke=>{var re;u.value=ke;const B=S(ke);D.value=L.cloneDeep(E.value);let q=w.value.get(B);!q&&((re=s.value[ke].children)==null?void 0:re.length)>0&&(q=R(s.value[ke].children)),q?V.setItemData(L.cloneDeep(q)):V.setItemData([]),y.value=!0},k=a.computed(()=>{const ke=L.useModelComp(L.pinia),B=L.storeToRefs(ke).itemData.value;return console.log("可用组件数据",B),!B||!Array.isArray(B)?[]:B.filter(q=>{var re;if(q.comp==="Tabs"&&u.value>=0){const Ae=S(u.value);if((re=q.compData)==null?void 0:re.some(We=>{var da;return We.key==="stepList"&&((da=We.contents)==null?void 0:da.some(Ta=>Ta.id===Ae))}))return!1}return!0})}),g=ke=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ke]||ke,$=ke=>{var B;try{const q=L.cloneDeep(ke);q.id=Date.now()+Math.random(),q.comp==="Tabs"&&((B=q.compData)==null||B.forEach(Ae=>{Ae.key==="stepList"&&Ae.contents&&Ae.contents.forEach(Ee=>{Ee.id=C()})}));const re=L.cloneDeep(E.value);re.push(q),V.setItemData(re)}catch(q){console.error("添加组件失败:",q)}},R=ke=>ke.map(B=>{var q;switch(B.type){case"form":return{comp:"Form",name:B.value||"表单",compData:G(B.content)};case"table":return{comp:"Table",name:B.value||"表格",compData:ie(B.content)};default:return{comp:"Unknown",name:B.value||"",compData:((q=B.content)==null?void 0:q.originalData)||[]}}}),G=ke=>{if(!ke)return[];const B=[];return ke.rowContents&&B.push({key:"formContent",contents:ke.rowContents}),ke.buttonValue&&B.push({key:"formButton",contents:ke.buttonValue}),typeof ke.isEnableWrap<"u"&&B.push({key:"enableWrap",contents:ke.isEnableWrap}),B},ie=ke=>[],Se=()=>{if(u.value>=0&&u.value<s.value.length){const ke=S(u.value);w.value.set(ke,L.cloneDeep(E.value)),s.value[u.value].children=fe(E.value),console.log("保存后的数据",fe(E.value))}y.value=!1,u.value=-1,D.value=null,Pe()},te=()=>{D.value&&V.setItemData(L.cloneDeep(D.value)),y.value=!1,u.value=-1,D.value=null},Z=()=>{y.value&&te()},fe=ke=>{if(!Array.isArray(ke))throw new Error("sourceData must be an array");return ke.map((B,q)=>{if(!B||typeof B!="object")return B;const{comp:re,name:Ae,compData:Ee}=B;switch(re){case"Form":return{type:"form",content:ae(Ee||[]),value:"表单"};case"Table":return{type:"table",content:se(Ee||[]),value:"表格"};default:return{type:"xxx",content:De(Ee||[]),value:""}}})},ae=ke=>{const B={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},q={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ke.forEach((re,Ae)=>{if(!re||typeof re!="object"){console.warn(`Invalid config at index ${Ae}:`,re);return}const{key:Ee,contents:We}=re,da=q[Ee];if(!da){console.warn(`Unknown Form config key: ${Ee}`);return}Ee==="enableWrap"?B[da]=!!We:B[da]=Array.isArray(We)?We:[]}),B},se=ke=>{const B={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},q={header:"columns",tableContents:"tableData"};return ke.forEach((re,Ae)=>{if(!re||typeof re!="object"){console.warn(`Invalid config at index ${Ae}:`,re);return}const{key:Ee,contents:We}=re,da=q[Ee];if(!da){console.warn(`Unknown Table config key: ${Ee}`);return}B[da]=Array.isArray(We)?We:[]}),B},De=ke=>(console.log("Default conversion logic - to be implemented"),{originalData:ke,processed:!1,componentType:"unknown"}),Pe=()=>{const ke=[{key:"stepList",contents:s.value}];i("change",ke)};return a.watch(()=>n.itemContents,ke=>{if(ke&&ke.length>0){const B=ke.find(q=>q.key==="stepList");B&&B.contents&&(s.value=B.contents.map(q=>({title:q.title||"",value:q.value||q.title||"",label:q.label||q.title||"",children:q.children||[],id:q.id||C()})))}},{immediate:!0,deep:!0}),(ke,B)=>{const q=a.resolveComponent("svg-icon"),re=a.resolveComponent("el-input"),Ae=a.resolveComponent("el-form-item"),Ee=a.resolveComponent("el-form");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",U4,[B[6]||(B[6]=a.createElementVNode("h4",null,"标签页管理",-1)),a.createElementVNode("button",{onClick:Y},[a.createVNode(q,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),B[5]||(B[5]=a.createTextVNode(" 新增标签页 "))])]),a.createElementVNode("div",q4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(We,da)=>(a.openBlock(),a.createElementBlock("div",{class:"tab-item",key:da},[a.createElementVNode("span",W4,a.toDisplayString(We.title),1),a.createElementVNode("div",K4,[a.createElementVNode("button",{onClick:Ta=>M(da)},"修改标题",8,G4),a.createElementVNode("button",{onClick:Ta=>_(da)},"布局调整",8,Y4),a.createElementVNode("button",{onClick:Ta=>O(da)},"删除",8,J4)])]))),128))]),a.createVNode(_r.ssDialog,{modelValue:c.value,"onUpdate:modelValue":B[2]||(B[2]=We=>c.value=We),title:m.value,onBeforeDestroy:B[3]||(B[3]=We=>c.value=!1)},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:B[1]||(B[1]=We=>c.value=!1)},"取消"),a.createElementVNode("button",{type:"primary",onClick:j},"确定")]),default:a.withCtx(()=>[a.createVNode(Ee,{model:p.value,"label-width":"80px"},{default:a.withCtx(()=>[a.createVNode(Ae,{label:"标签名称",required:""},{default:a.withCtx(()=>[a.createVNode(re,{modelValue:p.value.title,"onUpdate:modelValue":B[0]||(B[0]=We=>p.value.title=We),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),a.createVNode(_r.ssDialog,{modelValue:y.value,"onUpdate:modelValue":B[4]||(B[4]=We=>y.value=We),title:"布局调整",fullScreen:"",onBeforeDestroy:Z},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:te},"取消"),a.createElementVNode("button",{onClick:Se},"确定")]),default:a.withCtx(()=>[a.createElementVNode("div",X4,[a.createElementVNode("div",Z4,[a.createVNode(D4),a.createElementVNode("div",Q4,[B[8]||(B[8]=a.createElementVNode("h5",null,"添加已有组件",-1)),a.createElementVNode("div",e6,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(k.value,We=>(a.openBlock(),a.createElementBlock("div",{key:We.id,class:"component-item",onClick:da=>$(We)},[a.createElementVNode("div",l6,[a.createElementVNode("span",r6,a.toDisplayString(g(We.comp)),1),a.createElementVNode("span",n6,a.toDisplayString(We.name),1)]),B[7]||(B[7]=a.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,a6))),128))])])]),(a.openBlock(),a.createElementBlock("div",{class:"model-show",key:ke.innerWidth},[a.createVNode(H4)])),a.createElementVNode("div",i6,[a.createVNode(V4)])])]),_:1},8,["modelValue"])])}}},t6=er._export_sfc(o6,[["__scopeId","data-v-9096ed0d"]]);function s6(){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 c6(l){return{type:"line",...l}}function u6(){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 d6(l){return{type:"bar",barWidth:"60%",...l}}function p6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function f6(l){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...l}}const jn={line:{initBaseoptions:s6,initSeries:c6},bar:{initBaseoptions:u6,initSeries:d6},pie:{initBaseoptions:p6,initSeries:f6}},Ss=L.useMenuState(L.pinia),Vc=(l,r)=>{var u;const n=[],i=[],{group:s,nameCol:c,valueCol:m}=r||{},p=l==null?void 0:l.find(w=>{const{name:D}=w;return D===s});if(!p)return{names:n,values:i};const h=(u=p==null?void 0:p.compData)==null?void 0:u.find(w=>{const{key:D}=w;return D==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(w=>{const D=w==null?void 0:w[0];let V=!1;Ka.isObject(D)&&(D!=null&&D.id)&&(V=!0);let E=c,Y=m;V&&(E=E+1,Y=Y+1);const M=w==null?void 0:w[E],O=w==null?void 0:w[Y];n.push(M),i.push(O)}),{names:n,values:i}},h6=async l=>{const{menu:r,mainKey:n,detailGroup:i,detailNameCol:s,detailValueCol:c,isSelfDetail:m}=l||{};let p=null;const h=sessionStorage.getItem("systemKey");if(m&&Ss.activeMenuPath&&(p=await me.getItemData(`${Ss.activeMenuPath}`,h,"")),!m){const y=r==null?void 0:r.join("/");p=await me.getItemData(`${y}^${n}`,h,"")}return Vc(p,{group:i,nameCol:s,valueCol:c})},v6=async l=>{const{menu:r,group:n,nameCol:i,valueCol:s}=l||{},c=r==null?void 0:r.join("/"),m=sessionStorage.getItem("systemKey"),p=await me.getItemData(c,m,"");return Vc(p,{group:n,nameCol:i,valueCol:s})},At=async(l,r)=>{const n={names:[],values:[]},{menu:i,group:s,nameCol:c,valueCol:m}=l||{};if(!i.length||!s)return n;const{mainKey:p,group:h,nameCol:y,valueCol:u,isSelfDetail:w}=r||{};return p&&h&&nl.isNumber(y)&&nl.isNumber(u)?await h6({menu:i,mainKey:p,detailGroup:h,detailNameCol:y,detailValueCol:u,isSelfDetail:w}):nl.isNumber(c)&&nl.isNumber(m)?await v6({menu:i,group:s,nameCol:c,valueCol:m}):n},m6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:i,title:s}=l||{},c=jn==null?void 0:jn[i];if(!c)return;const{initBaseoptions:m,initSeries:p}=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=p({data:u});return h.series.push(w),h},y6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:i,title:s}=l||{},c=jn==null?void 0:jn[i];if(!c)return;const{initBaseoptions:m,initSeries:p}=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=p({data:u});return h.series.push(w),h},g6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:i,title:s}=l||{},c=jn==null?void 0:jn[i];if(!c)return;const{initBaseoptions:m,initSeries:p}=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 V=0;V<y.length;V++){const E=y[V],Y=u[V];w.push({name:E,value:Y})}const D=p({data:w});return h.series.push(D),h},b6=async(l=[])=>{var m,p,h;const r=((m=l==null?void 0:l.find(y=>y.key==="chartBaseConfig"))==null?void 0:m.contents)??{},n=((p=l==null?void 0:l.find(y=>y.key==="chartDataConfig"))==null?void 0:p.contents)??{},i=((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 m6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:i})),s==="bar"&&(c=await y6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:i})),s==="pie"&&(c=await g6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:i})),c},k6=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 b6(s)});const i=a.computed(()=>(r==null?void 0:r.height)||"300px");return(s,c)=>(a.openBlock(),a.createElementBlock("div",{class:"eCharts",style:a.normalizeStyle({height:i.value})},[a.createVNode(Iu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),x6=er._export_sfc(k6,[["__scopeId","data-v-d4c081e8"]]),w6={class:"chart-module layout"},_6={class:"chart-module content"},S6={class:"chart-module content"},E6={class:"form-content"},C6={class:"dialog-footer"},D6={class:"form-content"},N6={class:"dialog-footer"},B6={class:"form-content"},T6={class:"dialog-footer"},A6=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=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:""}],p=a.ref({}),h=()=>{var Oe;c.value=m(),(Oe=c.value)==null||Oe.forEach(ce=>{var Fe;const ze=ce==null?void 0:ce.prop;ce.value=(Fe=p==null?void 0:p.value)==null?void 0:Fe[ze]}),s.visible=!0},y=Oe=>{p.value=Oe},u=()=>{var Oe;s.visible=!1,i("change",(Oe=ve())==null?void 0:Oe.compData)},w=a.reactive({visible:!1,width:"840",title:"数据配置"}),D=a.ref([]),V=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],E=a.ref({}),Y=()=>{const Oe=D.value,ce=L.cloneDeep(Oe);return ce==null||ce.forEach(ze=>{var xa;const Fe=ze==null?void 0:ze.prop;ze.value=(xa=E.value)==null?void 0:xa[Fe]}),ce},M=Oe=>{var ze;E.value=Oe;const ce=Y();D.value=ce,i("change",(ze=ve())==null?void 0:ze.compData)},O=async()=>{const Oe=await me.getMenusContent(),ce=Y();ce==null||ce.forEach(ze=>{(ze==null?void 0:ze.prop)==="menu"&&(ze.contents=Oe)}),D.value=ce,w.visible=!0,await We(E.value.menu),await le(E.value.group)},j=a.reactive({visible:!1,width:"840",title:"详情页配置"}),C=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:[]}],_=a.ref({}),k=()=>{const Oe=C.value,ce=L.cloneDeep(Oe);return ce==null||ce.forEach(ze=>{var xa;const Fe=ze==null?void 0:ze.prop;ze.value=(xa=_.value)==null?void 0:xa[Fe]}),ce},g=Oe=>{var ze;_.value=Oe;const ce=k();C.value=ce,i("change",(ze=ve())==null?void 0:ze.compData)},$=async()=>{await Z();const Oe=L.cloneDeep(R.value),ce=k();ce==null||ce.forEach(ze=>{var xa;const Fe=ze==null?void 0:ze.prop;ze.value=(xa=_==null?void 0:_.value)==null?void 0:xa[Fe],Fe==="mainKey"&&(ze.contents=Oe)}),C.value=ce,j.visible=!0},R=a.ref([]),G=a.ref([]),ie=a.ref({}),Se=a.ref({}),te=()=>{const{compData:Oe}=re.value||{},ce=Oe==null?void 0:Oe.find(Q=>{const{key:he}=Q;return he==="header"}),ze=(ce==null?void 0:ce.contents)||[],Fe=ze==null?void 0:ze.filter((Q,he)=>{const{label:ge}=Q;return ge!=="操作"}),xa=Fe==null?void 0:Fe.findIndex((Q,he)=>{const{isMainKey:ge}=Q;return ge});if(xa<0)return[];const Ma=Oe==null?void 0:Oe.find(Q=>{const{key:he}=Q;return he==="tableContents"}),P=(Ma==null?void 0:Ma.contents)||[];return P==null?void 0:P.map(Q=>{const he=Q==null?void 0:Q[0];let ge=xa;Ka.isObject(he)&&(he!=null&&he.id)&&(ge=ge+1);const ha=Q==null?void 0:Q[ge];return{label:ha,value:ha}})},Z=async()=>{const Oe=await te();R.value=Oe},fe=async Oe=>{const ce=sessionStorage.getItem("systemKey");return await me.getItemData(Oe,ce,"")},ae=async Oe=>{const ce=Oe;G.value=ce==null?void 0:ce.map(ze=>{const{name:Fe}=ze;return ie.value[Fe]=ze,{label:Fe,value:Fe}})},se=Oe=>{const{comp:ce,compData:ze}=Se.value||{};if(ce==="Table"){let Fe=k();Fe=Fe.filter(xa=>{const{prop:Ma}=xa;return Ma!=="formItems"}),da(Fe,ze),C.value=Fe}},De=async()=>{var ze,Fe;const Oe=(ze=_==null?void 0:_.value)==null?void 0:ze.mainKey,ce=(Fe=E==null?void 0:E.value)==null?void 0:Fe.menu;if(Oe){const Ma=`${ce==null?void 0:ce.join("/")}^${Oe}`,P=await fe(Ma);await ae(P);const H=k();H==null||H.forEach(Q=>{(Q==null?void 0:Q.prop)==="group"&&(Q.contents=G.value)}),C.value=H}};a.watch(()=>{var Oe;return(Oe=_==null?void 0:_.value)==null?void 0:Oe.mainKey},async(Oe,ce)=>{Oe!=ce&&Oe&&await De()});const Pe=async Oe=>{const ce=ie.value[Oe];Se.value=ce,await se()};a.watch(()=>{var Oe;return(Oe=_==null?void 0:_.value)==null?void 0:Oe.group},async(Oe,ce)=>{Oe!=ce&&Oe&&Pe(Oe)});const ke=async()=>{var ce;await De();const Oe=(ce=_.value)==null?void 0:ce.group;await Pe(Oe)},B=a.ref([]),q=a.ref({}),re=a.ref({}),Ae=async Oe=>{const ce=Oe==null?void 0:Oe.join("/"),ze=sessionStorage.getItem("systemKey");return await me.getItemData(ce,ze,"")},Ee=async Oe=>{const ce=await Ae(Oe);B.value=ce==null?void 0:ce.map(ze=>{const{name:Fe}=ze;return q.value[Fe]=ze,{label:Fe,value:Fe}})},We=async(Oe,ce)=>{await Ee(Oe);const ze=Y();ze==null||ze.forEach(Fe=>{(Fe==null?void 0:Fe.prop)==="group"&&(Fe.contents=B.value)}),D.value=ze};a.watch(()=>{var Oe;return(Oe=E==null?void 0:E.value)==null?void 0:Oe.menu},async(Oe,ce)=>{const ze=Oe==null?void 0:Oe.join("/"),Fe=ce==null?void 0:ce.join("/");ze!=Fe&&await We(Oe)});const da=(Oe,ce)=>{const ze=ce==null?void 0:ce.find(P=>{const{key:H}=P;return H==="header"}),Fe=(ze==null?void 0:ze.contents)||[],xa=Fe==null?void 0:Fe.filter((P,H)=>{const{label:Q}=P;return Q!=="操作"}),Ma=xa==null?void 0:xa.map((P,H)=>{const{label:Q}=P;return{label:Q,value:H}});Oe==null||Oe.forEach(P=>{const H=P==null?void 0:P.prop;(H==="nameCol"||H==="valueCol")&&(P.contents=Ma)})},Ta=Oe=>{const{comp:ce,compData:ze}=re.value||{};if(ce==="Table"){E.value.formItems=[];let Fe=Y();Fe=Fe.filter(xa=>{const{prop:Ma}=xa;return Ma!=="formItems"}),da(Fe,ze),D.value=Fe}},le=async Oe=>{const ce=q.value[Oe];re.value=ce,await Ta()};a.watch(()=>{var Oe;return(Oe=E==null?void 0:E.value)==null?void 0:Oe.group},async(Oe,ce)=>{Oe!=ce&&le(Oe)});const la=async()=>{var ze,Fe;const Oe=(ze=E.value)==null?void 0:ze.menu;await We(Oe);const ce=(Fe=E.value)==null?void 0:Fe.group;await le(ce)},ve=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:p.value},{key:"chartDataConfig",contents:E.value},{key:"chartDetailConfig",contents:_.value}]}),Ge=()=>{s.visible=!1,w.visible=!1,j.visible=!1};return a.onMounted(async()=>{var ce,ze,Fe;D.value=V(),C.value=S();const Oe=n==null?void 0:n.itemContents;p.value=((ce=Oe==null?void 0:Oe.find(xa=>xa.key==="chartBaseConfig"))==null?void 0:ce.contents)??{},E.value=((ze=Oe==null?void 0:Oe.find(xa=>xa.key==="chartDataConfig"))==null?void 0:ze.contents)??{},await la(),_.value=((Fe=Oe==null?void 0:Oe.find(xa=>xa.key==="chartDetailConfig"))==null?void 0:Fe.contents)??{},await ke()}),(Oe,ce)=>{const ze=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",w6,[ce[4]||(ce[4]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createVNode(ze,{id:"themeButton",onClick:ce[0]||(ce[0]=Fe=>h())},{default:a.withCtx(()=>ce[3]||(ce[3]=[a.createTextVNode(" 修改 ")])),_:1,__:[3]})]),a.createElementVNode("div",_6,[ce[6]||(ce[6]=a.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),a.createVNode(ze,{id:"themeButton",onClick:ce[1]||(ce[1]=Fe=>O())},{default:a.withCtx(()=>ce[5]||(ce[5]=[a.createTextVNode(" 修改 ")])),_:1,__:[5]})]),a.createElementVNode("div",S6,[ce[8]||(ce[8]=a.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),a.createVNode(ze,{id:"themeButton",onClick:ce[2]||(ce[2]=Fe=>$())},{default:a.withCtx(()=>ce[7]||(ce[7]=[a.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),a.createVNode(_r.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:Ge,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",E6,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",C6,[a.createVNode(ze,{class:"cancel-button button",onClick:Ge,id:"themeBorderButton"},{default:a.withCtx(()=>ce[9]||(ce[9]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[9]}),a.createVNode(ze,{class:"ok-button button",onClick:u,id:"themeButton"},{default:a.withCtx(()=>ce[10]||(ce[10]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),a.createVNode(_r.ssDialog,{visible:w.visible,title:w.title,onBeforeDestroy:Ge,width:w.width},{default:a.withCtx(()=>[a.createElementVNode("div",D6,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",N6,[a.createVNode(ze,{class:"cancel-button button",onClick:Ge,id:"themeBorderButton"},{default:a.withCtx(()=>ce[11]||(ce[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(ze,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:a.withCtx(()=>ce[12]||(ce[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),a.createVNode(_r.ssDialog,{visible:j.visible,title:j.title,onBeforeDestroy:Ge,width:j.width},{default:a.withCtx(()=>[a.createElementVNode("div",B6,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",T6,[a.createVNode(ze,{class:"cancel-button button",onClick:Ge,id:"themeBorderButton"},{default:a.withCtx(()=>ce[13]||(ce[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(ze,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:a.withCtx(()=>ce[14]||(ce[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),z6=er._export_sfc(A6,[["__scopeId","data-v-fe119645"]]),M6={class:"layout"},I6=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,i=l;a.onMounted(async()=>{});const s=a.computed(()=>L.cloneDeep(i==null?void 0:i.itemData)||[]),c=a.computed(()=>{var u;const y=(u=s==null?void 0:s.value)==null?void 0:u.find(w=>{const{key:D}=w;return D==="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:D}=w;return D==="children"});return y==null?void 0:y.contents}),p=a.computed(()=>{let y=L.cloneDeep(m.value)||[];const u=y.length;let w=0;const D=[];if(y=y.map(V=>{const E=V.span;return E?(V.span=Number(E),w=w+V.span):D.push(V),V}),w<24){const V=Math.floor((24-w)/u);D.forEach(E=>{E.span=V})}return y}),h=y=>{n("rowClick",y)};return(y,u)=>{var V;const w=a.resolveComponent("el-col"),D=a.resolveComponent("el-row");return a.openBlock(),a.createElementBlock("div",M6,[a.createVNode(D,{style:a.normalizeStyle({height:(V=c.value)==null?void 0:V.height})},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,(E,Y)=>(a.openBlock(),a.createBlock(w,{span:E==null?void 0:E.span},{default:a.withCtx(()=>{var M;return[a.unref(Bi)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ki)(E.comp)),{key:a.unref(Zn),compName:E.name,index:(E==null?void 0:E.id)??Y,height:(M=c.value)==null?void 0:M.height,itemData:E==null?void 0:E.compData,childItemData:E==null?void 0:E.itemChildData,onChange:a.unref(zo),onContentChange:a.unref(Mo),onPageChange:a.unref(Io),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):a.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),O6=er._export_sfc(I6,[["__scopeId","data-v-ab9a36ed"]]),L6={class:"layout-operate"},$6={class:"layout-module"},R6={class:"collapse-title-item"},V6={class:"collapse-title"},F6={class:"icon-content"},P6=["onClick"],j6={class:"comp-child"},H6=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,i=r;a.onMounted(()=>{Y()});const s=a.ref({}),c=a.ref({}),m=a.ref([]),p=_=>[{label:"高度",prop:"height",type:"input",value:_==null?void 0:_.height}],h=_=>{c.value=_,i("change",S(),!0)},y=a.ref([]),u=a.ref([]),w=_=>[{label:"占比",prop:"span",type:"input",value:_==null?void 0:_.span}],D=a.computed(()=>{const _=n==null?void 0:n.itemContents;return L.cloneDeep(_)}),V=a.computed(()=>{const _=D==null?void 0:D.value,k=_==null?void 0:_.find(g=>{const{key:$}=g;return $==="baseConfig"});return k==null?void 0:k.contents}),E=a.computed(()=>{const _=D==null?void 0:D.value,k=_==null?void 0:_.find(g=>{const{key:$}=g;return $==="children"});return k==null?void 0:k.contents}),Y=()=>{var _;s.value=D.value||{},y.value=(E==null?void 0:E.value)||[],m.value=p(),m.value=(_=m.value)==null?void 0:_.map(k=>{var $;const{prop:g}=k;return k.value=($=V.value)==null?void 0:$[g],k})};a.watch(()=>{var _;return(_=E==null?void 0:E.value)==null?void 0:_.length},()=>{var _;y.value=(E==null?void 0:E.value)||[],u.value=(_=E.value)==null?void 0:_.map(k=>w(k))},{immediate:!0});const M=(_,k)=>{const g=L.cloneDeep(E==null?void 0:E.value);g[k].span=_.span,y.value=g,i("change",S(),!0)},O=_=>Ti(_),j=(_,k,g)=>{if(!_)return;const $=L.cloneDeep(E==null?void 0:E.value);$[g]&&($[g].compData=_,y.value=$,i("change",S(),!0))},C=_=>{fn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let k=L.cloneDeep(E==null?void 0:E.value);k=k==null?void 0:k.filter((g,$)=>_!==$),y.value=k,i("change",S(),!0),Ka.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:y==null?void 0:y.value}]});return(_,k)=>{const g=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",L6,[a.createElementVNode("div",$6,[k[1]||(k[1]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createElementVNode("div",null,[a.createVNode(nl.ssForm,{rowContents:m.value,isEnableWrap:!0,onChange:k[0]||(k[0]=$=>h($))},null,8,["rowContents"])])]),a.createVNode(Zs.default,{class:"collapse-content",collapseContents:E.value},{title:a.withCtx(({item:$,index:R})=>[a.createElementVNode("div",R6,[a.createElementVNode("div",V6,a.toDisplayString($.name),1),a.createElementVNode("div",F6,[a.createElementVNode("div",{onClick:a.withModifiers(G=>C(R),["stop"]),class:"icon-content"},[a.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,P6)])])]),content:a.withCtx(({item:$,index:R})=>[a.createElementVNode("div",j6,[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(nl.ssForm,{rowContents:u.value[R],key:R,isEnableWrap:!0,onChange:G=>M(G,R)},null,8,["rowContents","onChange"]))]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(O($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:$.compData,onChange:G=>j(G,$,R)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),U6=er._export_sfc(H6,[["__scopeId","data-v-ba05456e"]]),q6=typeof window<"u";var Es;q6&&((Es=window==null?void 0:window.navigator)!=null&&Es.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function dn(l){return l==null}function Fc(){}const W6=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(W6)));function K6(){const l=new Map;return{on(r,n){const i=l.get(r);i!=null&&i.add(n)||l.set(r,new Set([n]))},off(r,n){const i=l.get(r);i&&i.delete(n)},clear(r){const n=l.get(r);n&&n.clear()},clearAll(){l.clear()},emit(r,...n){const i=l.get(r);i&&i.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 i=0,s;return function(...c){const m=Date.now(),p=m-i;clearTimeout(s),p>=r?(i=m,n(...c)):s=setTimeout(()=>{i=Date.now(),n(...c)},Math.max(0,r-p))}}function G6(l,r=100){if(typeof l!="function")return Fc;const n=(...s)=>{l(...s)};if(r<=0)return Pc(n);let i;return function(...s){clearTimeout(i),i=setTimeout(()=>{n(...s)},r)}}function Pc(l){if(typeof l!="function")return l;let r=!1,n,i;return function(...s){return n=s,r||(r=!0,i=Promise.resolve().then(()=>(r=!1,i=void 0,l(...n)))),i}}const Hi=new Set,jc=new WeakMap;function Y6(){Hi.forEach(l=>{l(...jc.get(l))}),Hi.clear()}function Xr(l,...r){if(typeof l!="function")return l;jc.set(l,r),!Hi.has(l)&&(Hi.add(l),Hi.size===1&&Promise.resolve().then(Y6))}const Hc=Symbol("LAYOUT_KEY"),Uc=Symbol("EMITTER_KEY");function J6(l){let r=0,n;for(let i=0,s=l.length;i<s;i++)n=l[i].y+l[i].h,n>r&&(r=n);return r}function Et(l){const r=Array(l.length);for(let n=0,i=l.length;n<i;n++)r[n]=X6(l[n]);return r}function X6(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 Si(l,r,n){const i=Kc(l),s=Gc(l),c=Array(l.length);for(let m=0,p=s.length;m<p;m++){let h=s[m];h.static||(h=Z6(i,h,r,n),i.push(h)),c[l.findIndex(y=>y.i===h.i)]=h,h.moved=!1}return c}function Z6(l,r,n,i){if(n)for(;r.y>0&&!Ui(l,r);)r.y--;else if(i){const c=i[r.i].y;for(;r.y>c&&!Ui(l,r);)r.y--}let s;for(;s=Ui(l,r);)r.y=s.y+s.h;return r}function Q6(l,r){const n=Kc(l);for(let i=0,s=l.length;i<s;i++){const c=l[i];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(;Ui(n,c);)c.y++}return l}function Ds(l,r){for(let n=0,i=l.length;n<i;n++)if(l[n].i===r)return l[n]}function Ui(l,r){for(let n=0,i=l.length;n<i;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,i,s=!1,c=!1){if(r.static)return l;const m=r.x,p=r.y,h=i&&r.y>i;typeof n=="number"&&(r.x=n),typeof i=="number"&&(r.y=i),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=p,r.moved=!1,l;for(let w=0,D=u.length;w<D;w++){const V=u[w];V.moved||r.y>V.y&&r.y-V.y>V.h/4||(V.static?l=Ns(l,V,r,s):l=Ns(l,r,V,s))}return l}function Ns(l,r,n,i){if(i){const s={x:n.x,y:n.y,w:n.w,h:n.h};if(s.y=Math.max(r.y-n.h,0),!Ui(l,s))return Ct(l,n,void 0,s.y,!1)}return Ct(l,n,void 0,n.y+1,!1)}function e1(l,r,n,i){const s="translate3d("+r+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:i+"px",position:"absolute"}}function a1(l,r,n,i){const s="translate3d("+r*-1+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:i+"px",position:"absolute"}}function l1(l,r,n,i){return{top:l+"px",left:r+"px",width:n+"px",height:i+"px",position:"absolute"}}function r1(l,r,n,i){return{top:l+"px",right:r+"px",width:n+"px",height:i+"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 n1(l,r){r=r||"Layout";const n=["x","y","w","h"],i=[];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 p=0;p<n.length;p++)if(typeof m[n[p]]!="number")throw new Error("VueGridLayout: "+r+"["+s+"]."+n[p]+" 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(i.indexOf(m.i)>=0)throw new Error("VueGridLayout: "+r+"["+s+"].i must be unique!");if(i.push(m.i),m.static!==void 0&&typeof m.static!="boolean")throw new Error("VueGridLayout: "+r+"["+s+"].static must be a boolean!")}}function i1(l,r="vgl"){const n=()=>`${r}-${l}`;return{b:n,be:i=>`${n()}__${i}`,bm:i=>`${n()}--${i}`,bem:(i,s)=>`${n()}__${i}--${s}`}}function Bs(l){return o1(l)}function o1(l){var r;const n=((r=l.target)==null?void 0:r.offsetParent)||document.body,i=l.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),s=l.clientX+n.scrollLeft-i.left,c=l.clientY+n.scrollTop-i.top;return{x:s,y:c}}function Ts(l,r,n,i){return s1(l)?{deltaX:n-l,deltaY:i-r,lastX:l,lastY:r,x:n,y:i}:{deltaX:0,deltaY:0,lastX:n,lastY:i,x:n,y:i}}function s1(l){return typeof l=="number"&&!Number.isNaN(l)}function c1(l,r){const n=Jc(l);let i=n[0];for(let s=1,c=n.length;s<c;s++){const m=n[s];r>l[m]&&(i=m)}return i}function Yc(l,r){if(!r[l])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+l+" is missing!");return r[l]}function u1(l,r,n,i,s,c,m){if(r[i])return Et(r[i]);let p=l;const h=Jc(n),y=h.slice(h.indexOf(i));for(let u=0,w=y.length;u<w;u++){const D=y[u];if(r[D]){p=r[D];break}}return p=Et(p||[]),Si(Q6(p,{cols:c}),m)}function Jc(l){return Object.keys(l).sort((r,n)=>l[r]-l[n])}let d1="auto";function p1(){return typeof document<"u"}function As(){return p1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):d1}var Fi={exports:{}},f1=Fi.exports,zs;function h1(){return zs||(zs=1,function(l,r){(function(n,i){l.exports=i()})(f1,function(){function n(t,o){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(t);o&&(b=b.filter(function(x){return Object.getOwnPropertyDescriptor(t,x).enumerable})),f.push.apply(f,b)}return f}function i(t){for(var o=1;o<arguments.length;o++){var f=arguments[o]!=null?arguments[o]:{};o%2?n(Object(f),!0).forEach(function(b){h(t,b,f[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(b){Object.defineProperty(t,b,Object.getOwnPropertyDescriptor(f,b))})}return t}function s(t){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},s(t)}function c(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function m(t,o){for(var f=0;f<o.length;f++){var b=o[f];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(t,Y(b.key),b)}}function p(t,o,f){return o&&m(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,o,f){return(o=Y(o))in t?Object.defineProperty(t,o,{value:f,enumerable:!0,configurable:!0,writable:!0}):t[o]=f,t}function y(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&w(t,o)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},u(t)}function w(t,o){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,b){return f.__proto__=b,f},w(t,o)}function D(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function V(t){var o=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 f,b=u(t);if(o){var x=u(this).constructor;f=Reflect.construct(b,arguments,x)}else f=b.apply(this,arguments);return function(I,J){if(J&&(typeof J=="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(I)}(this,f)}}function E(){return E=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,o,f){var b=function(I,J){for(;!Object.prototype.hasOwnProperty.call(I,J)&&(I=u(I))!==null;);return I}(t,o);if(b){var x=Object.getOwnPropertyDescriptor(b,o);return x.get?x.get.call(arguments.length<3?t:f):x.value}},E.apply(this,arguments)}function Y(t){var o=function(f,b){if(typeof f!="object"||f===null)return f;var x=f[Symbol.toPrimitive];if(x!==void 0){var I=x.call(f,b);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(t,"string");return typeof o=="symbol"?o:o+""}var M=function(t){return!(!t||!t.Window)&&t instanceof t.Window},O=void 0,j=void 0;function C(t){O=t;var o=t.document.createTextNode("");o.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(o)===o&&(t=t.wrap(t)),j=t}function S(t){return M(t)?t:(t.ownerDocument||t).defaultView||j.window}typeof window<"u"&&window&&C(window);var _=function(t){return!!t&&s(t)==="object"},k=function(t){return typeof t=="function"},g={window:function(t){return t===j||M(t)},docFrag:function(t){return _(t)&&t.nodeType===11},object:_,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 o=S(t)||j;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?t instanceof Element||t instanceof o.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return _(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return _(t)&&t.length!==void 0&&k(t.splice)}};function $(t){var o=t.interaction;if(o.prepared.name==="drag"){var f=o.prepared.axis;f==="x"?(o.coords.cur.page.y=o.coords.start.page.y,o.coords.cur.client.y=o.coords.start.client.y,o.coords.velocity.client.y=0,o.coords.velocity.page.y=0):f==="y"&&(o.coords.cur.page.x=o.coords.start.page.x,o.coords.cur.client.x=o.coords.start.client.x,o.coords.velocity.client.x=0,o.coords.velocity.page.x=0)}}function R(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="drag"){var b=f.prepared.axis;if(b==="x"||b==="y"){var x=b==="x"?"y":"x";o.page[x]=f.coords.start.page[x],o.client[x]=f.coords.start.client[x],o.delta[x]=0}}}var G={id:"actions/drag",install:function(t){var o=t.actions,f=t.Interactable,b=t.defaults;f.prototype.draggable=G.draggable,o.map.drag=G,o.methodDict.drag="draggable",b.actions.drag=G.defaults},listeners:{"interactions:before-action-move":$,"interactions:action-resume":$,"interactions:action-move":R,"auto-start:check":function(t){var o=t.interaction,f=t.interactable,b=t.buttons,x=f.options.drag;if(x&&x.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(b&f.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:x.lockAxis==="start"?x.startAxis:x.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:$,move:R,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},ie=G,Se={init:function(t){var o=t;Se.document=o.document,Se.DocumentFragment=o.DocumentFragment||te,Se.SVGElement=o.SVGElement||te,Se.SVGSVGElement=o.SVGSVGElement||te,Se.SVGElementInstance=o.SVGElementInstance||te,Se.Element=o.Element||te,Se.HTMLElement=o.HTMLElement||Se.Element,Se.Event=o.Event,Se.Touch=o.Touch||te,Se.PointerEvent=o.PointerEvent||o.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function te(){}var Z=Se,fe={init:function(t){var o=Z.Element,f=t.navigator||{};fe.supportsTouch="ontouchstart"in t||g.func(t.DocumentTouch)&&Z.document instanceof t.DocumentTouch,fe.supportsPointerEvent=f.pointerEnabled!==!1&&!!Z.PointerEvent,fe.isIOS=/iP(hone|od|ad)/.test(f.platform),fe.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),fe.isIe9=/MSIE 9/.test(f.userAgent),fe.isOperaMobile=f.appName==="Opera"&&fe.supportsTouch&&/Presto/.test(f.userAgent),fe.prefixedMatchesSelector="matches"in o.prototype?"matches":"webkitMatchesSelector"in o.prototype?"webkitMatchesSelector":"mozMatchesSelector"in o.prototype?"mozMatchesSelector":"oMatchesSelector"in o.prototype?"oMatchesSelector":"msMatchesSelector",fe.pEventTypes=fe.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,fe.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=fe;function se(t,o){if(t.contains)return t.contains(o);for(;o;){if(o===t)return!0;o=o.parentNode}return!1}function De(t,o){for(;g.element(t);){if(ke(t,o))return t;t=Pe(t)}return null}function Pe(t){var o=t.parentNode;if(g.docFrag(o)){for(;(o=o.host)&&g.docFrag(o););return o}return o}function ke(t,o){return j!==O&&(o=o.replace(/\/deep\//g," ")),t[ae.prefixedMatchesSelector](o)}var B=function(t){return t.parentNode||t.host};function q(t,o){for(var f,b=[],x=t;(f=B(x))&&x!==o&&f!==x.ownerDocument;)b.unshift(x),x=f;return b}function re(t,o,f){for(;g.element(t);){if(ke(t,o))return!0;if((t=Pe(t))===f)return ke(t,o)}return!1}function Ae(t){return t.correspondingUseElement||t}function Ee(t){var o=t instanceof Z.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return o&&{left:o.left,right:o.right,top:o.top,bottom:o.bottom,width:o.width||o.right-o.left,height:o.height||o.bottom-o.top}}function We(t){var o,f=Ee(t);if(!ae.isIOS7&&f){var b={x:(o=(o=S(t))||j).scrollX||o.document.documentElement.scrollLeft,y:o.scrollY||o.document.documentElement.scrollTop};f.left+=b.x,f.right+=b.x,f.top+=b.y,f.bottom+=b.y}return f}function da(t){for(var o=[];t;)o.push(t),t=Pe(t);return o}function Ta(t){return!!g.string(t)&&(Z.document.querySelector(t),!0)}function le(t,o){for(var f in o)t[f]=o[f];return t}function la(t,o,f){return t==="parent"?Pe(f):t==="self"?o.getRect(f):De(f,t)}function ve(t,o,f,b){var x=t;return g.string(x)?x=la(x,o,f):g.func(x)&&(x=x.apply(void 0,b)),g.element(x)&&(x=We(x)),x}function Ge(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Oe(t){return!t||"x"in t&&"y"in t||((t=le({},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 ce(t,o,f){t.left&&(o.left+=f.x),t.right&&(o.right+=f.x),t.top&&(o.top+=f.y),t.bottom&&(o.bottom+=f.y),o.width=o.right-o.left,o.height=o.bottom-o.top}function ze(t,o,f){var b=f&&t.options[f];return Ge(ve(b&&b.origin||t.options.origin,t,o,[t&&o]))||{x:0,y:0}}function Fe(t,o){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(xe){return!0},b=arguments.length>3?arguments[3]:void 0;if(b=b||{},g.string(t)&&t.search(" ")!==-1&&(t=xa(t)),g.array(t))return t.forEach(function(xe){return Fe(xe,o,f,b)}),b;if(g.object(t)&&(o=t,t=""),g.func(o)&&f(t))b[t]=b[t]||[],b[t].push(o);else if(g.array(o))for(var x=0,I=o;x<I.length;x++){var J=I[x];Fe(t,J,f,b)}else if(g.object(o))for(var ee in o)Fe(xa(ee).map(function(xe){return"".concat(t).concat(xe)}),o[ee],f,b);return b}function xa(t){return t.trim().split(/ +/)}var Ma=function(t,o){return Math.sqrt(t*t+o*o)},P=["webkit","moz"];function H(t,o){t.__set||(t.__set={});var f=function(x){if(P.some(function(I){return x.indexOf(I)===0}))return 1;typeof t[x]!="function"&&x!=="__set"&&Object.defineProperty(t,x,{get:function(){return x in t.__set?t.__set[x]:t.__set[x]=o[x]},set:function(I){t.__set[x]=I},configurable:!0})};for(var b in o)f(b);return t}function Q(t,o){t.page=t.page||{},t.page.x=o.page.x,t.page.y=o.page.y,t.client=t.client||{},t.client.x=o.client.x,t.client.y=o.client.y,t.timeStamp=o.timeStamp}function he(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function ge(t){return t instanceof Z.Event||t instanceof Z.Touch}function ha(t,o,f){return t=t||"page",(f=f||{}).x=o[t+"X"],f.y=o[t+"Y"],f}function Qe(t,o){return o=o||{x:0,y:0},ae.isOperaMobile&&ge(t)?(ha("screen",t,o),o.x+=window.scrollX,o.y+=window.scrollY):ha("page",t,o),o}function pe(t){return g.number(t.pointerId)?t.pointerId:t.identifier}function Ce(t,o,f){var b=o.length>1?qe(o):o[0];Qe(b,t.page),function(x,I){I=I||{},ae.isOperaMobile&&ge(x)?ha("screen",x,I):ha("client",x,I)}(b,t.client),t.timeStamp=f}function ma(t){var o=[];return g.array(t)?(o[0]=t[0],o[1]=t[1]):t.type==="touchend"?t.touches.length===1?(o[0]=t.touches[0],o[1]=t.changedTouches[0]):t.touches.length===0&&(o[0]=t.changedTouches[0],o[1]=t.changedTouches[1]):(o[0]=t.touches[0],o[1]=t.touches[1]),o}function qe(t){for(var o={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<t.length;f++){var b=t[f];for(var x in o)o[x]+=b[x]}for(var I in o)o[I]/=t.length;return o}function Ia(t){if(!t.length)return null;var o=ma(t),f=Math.min(o[0].pageX,o[1].pageX),b=Math.min(o[0].pageY,o[1].pageY),x=Math.max(o[0].pageX,o[1].pageX),I=Math.max(o[0].pageY,o[1].pageY);return{x:f,y:b,left:f,top:b,right:x,bottom:I,width:x-f,height:I-b}}function Aa(t,o){var f=o+"X",b=o+"Y",x=ma(t),I=x[0][f]-x[1][f],J=x[0][b]-x[1][b];return Ma(I,J)}function Ze(t,o){var f=o+"X",b=o+"Y",x=ma(t),I=x[1][f]-x[0][f],J=x[1][b]-x[0][b];return 180*Math.atan2(J,I)/Math.PI}function oa(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 ue(t){var o=g.func(t.composedPath)?t.composedPath():t.path;return[Ae(o?o[0]:t.target),Ae(t.currentTarget)]}var U=function(){function t(o){c(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=o}return p(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(U.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var W=function(t,o){for(var f=0;f<o.length;f++){var b=o[f];t.push(b)}return t},Me=function(t){return W([],t)},we=function(t,o){for(var f=0;f<t.length;f++)if(o(t[f],f,t))return f;return-1},na=function(t,o){return t[we(t,o)]},ta=function(t){y(f,t);var o=V(f);function f(b,x,I){var J;c(this,f),(J=o.call(this,x._interaction)).dropzone=void 0,J.dragEvent=void 0,J.relatedTarget=void 0,J.draggable=void 0,J.propagationStopped=!1,J.immediatePropagationStopped=!1;var ee=I==="dragleave"?b.prev:b.cur,xe=ee.element,je=ee.dropzone;return J.type=I,J.target=xe,J.currentTarget=xe,J.dropzone=je,J.dragEvent=x,J.relatedTarget=x.target,J.draggable=x.interactable,J.timeStamp=x.timeStamp,J}return p(f,[{key:"reject",value:function(){var b=this,x=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&x.cur.dropzone===this.dropzone&&x.cur.element===this.target)if(x.prev.dropzone=this.dropzone,x.prev.element=this.target,x.rejected=!0,x.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var I=x.activeDrops,J=we(I,function(xe){var je=xe.dropzone,Be=xe.element;return je===b.dropzone&&Be===b.target});x.activeDrops.splice(J,1);var ee=new f(x,this.dragEvent,"dropdeactivate");ee.dropzone=this.dropzone,ee.target=this.target,this.dropzone.fire(ee)}else this.dropzone.fire(new f(x,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(U);function Sa(t,o){for(var f=0,b=t.slice();f<b.length;f++){var x=b[f],I=x.dropzone,J=x.element;o.dropzone=I,o.target=J,I.fire(o),o.propagationStopped=o.immediatePropagationStopped=!1}}function ba(t,o){for(var f=function(I,J){for(var ee=[],xe=0,je=I.interactables.list;xe<je.length;xe++){var Be=je[xe];if(Be.options.drop.enabled){var aa=Be.options.drop.accept;if(!(g.element(aa)&&aa!==J||g.string(aa)&&!ke(J,aa)||g.func(aa)&&!aa({dropzone:Be,draggableElement:J})))for(var Ba=0,el=Be.getAllElements();Ba<el.length;Ba++){var Ja=el[Ba];Ja!==J&&ee.push({dropzone:Be,element:Ja,rect:Be.getRect(Ja)})}}}return ee}(t,o),b=0;b<f.length;b++){var x=f[b];x.rect=x.dropzone.getRect(x.element)}return f}function Pa(t,o,f){for(var b=t.dropState,x=t.interactable,I=t.element,J=[],ee=0,xe=b.activeDrops;ee<xe.length;ee++){var je=xe[ee],Be=je.dropzone,aa=je.element,Ba=je.rect,el=Be.dropCheck(o,f,x,I,aa,Ba);J.push(el?aa:null)}var Ja=function(ll){for(var kl,rl,Cl,Ml=[],lr=0;lr<ll.length;lr++){var _l=ll[lr],Wl=ll[kl];if(_l&&lr!==kl)if(Wl){var Hr=B(_l),Er=B(Wl);if(Hr!==_l.ownerDocument)if(Er!==_l.ownerDocument)if(Hr!==Er){Ml=Ml.length?Ml:q(Wl);var Jr=void 0;if(Wl instanceof Z.HTMLElement&&_l instanceof Z.SVGElement&&!(_l instanceof Z.SVGSVGElement)){if(_l===Er)continue;Jr=_l.ownerSVGElement}else Jr=_l;for(var sn=q(Jr,Wl.ownerDocument),vn=0;sn[vn]&&sn[vn]===Ml[vn];)vn++;var vi=[sn[vn-1],sn[vn],Ml[vn]];if(vi[0])for(var $n=vi[0].lastChild;$n;){if($n===vi[1]){kl=lr,Ml=sn;break}if($n===vi[2])break;$n=$n.previousSibling}}else Cl=Wl,(parseInt(S(rl=_l).getComputedStyle(rl).zIndex,10)||0)>=(parseInt(S(Cl).getComputedStyle(Cl).zIndex,10)||0)&&(kl=lr);else kl=lr}else kl=lr}return kl}(J);return b.activeDrops[Ja]||null}function ya(t,o,f){var b=t.dropState,x={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(x.activate=new ta(b,f,"dropactivate"),x.activate.target=null,x.activate.dropzone=null),f.type==="dragend"&&(x.deactivate=new ta(b,f,"dropdeactivate"),x.deactivate.target=null,x.deactivate.dropzone=null),b.rejected||(b.cur.element!==b.prev.element&&(b.prev.dropzone&&(x.leave=new ta(b,f,"dragleave"),f.dragLeave=x.leave.target=b.prev.element,f.prevDropzone=x.leave.dropzone=b.prev.dropzone),b.cur.dropzone&&(x.enter=new ta(b,f,"dragenter"),f.dragEnter=b.cur.element,f.dropzone=b.cur.dropzone)),f.type==="dragend"&&b.cur.dropzone&&(x.drop=new ta(b,f,"drop"),f.dropzone=b.cur.dropzone,f.relatedTarget=b.cur.element),f.type==="dragmove"&&b.cur.dropzone&&(x.move=new ta(b,f,"dropmove"),f.dropzone=b.cur.dropzone)),x}function $e(t,o){var f=t.dropState,b=f.activeDrops,x=f.cur,I=f.prev;o.leave&&I.dropzone.fire(o.leave),o.enter&&x.dropzone.fire(o.enter),o.move&&x.dropzone.fire(o.move),o.drop&&x.dropzone.fire(o.drop),o.deactivate&&Sa(b,o.deactivate),f.prev.dropzone=x.dropzone,f.prev.element=x.element}function $a(t,o){var f=t.interaction,b=t.iEvent,x=t.event;if(b.type==="dragmove"||b.type==="dragend"){var I=f.dropState;o.dynamicDrop&&(I.activeDrops=ba(o,f.element));var J=b,ee=Pa(f,J,x);I.rejected=I.rejected&&!!ee&&ee.dropzone===I.cur.dropzone&&ee.element===I.cur.element,I.cur.dropzone=ee&&ee.dropzone,I.cur.element=ee&&ee.element,I.events=ya(f,0,J)}}var fl={id:"actions/drop",install:function(t){var o=t.actions,f=t.interactStatic,b=t.Interactable,x=t.defaults;t.usePlugin(ie),b.prototype.dropzone=function(I){return function(J,ee){if(g.object(ee)){if(J.options.drop.enabled=ee.enabled!==!1,ee.listeners){var xe=Fe(ee.listeners),je=Object.keys(xe).reduce(function(aa,Ba){return aa[/^(enter|leave)/.test(Ba)?"drag".concat(Ba):/^(activate|deactivate|move)/.test(Ba)?"drop".concat(Ba):Ba]=xe[Ba],aa},{}),Be=J.options.drop.listeners;Be&&J.off(Be),J.on(je),J.options.drop.listeners=je}return g.func(ee.ondrop)&&J.on("drop",ee.ondrop),g.func(ee.ondropactivate)&&J.on("dropactivate",ee.ondropactivate),g.func(ee.ondropdeactivate)&&J.on("dropdeactivate",ee.ondropdeactivate),g.func(ee.ondragenter)&&J.on("dragenter",ee.ondragenter),g.func(ee.ondragleave)&&J.on("dragleave",ee.ondragleave),g.func(ee.ondropmove)&&J.on("dropmove",ee.ondropmove),/^(pointer|center)$/.test(ee.overlap)?J.options.drop.overlap=ee.overlap:g.number(ee.overlap)&&(J.options.drop.overlap=Math.max(Math.min(1,ee.overlap),0)),"accept"in ee&&(J.options.drop.accept=ee.accept),"checker"in ee&&(J.options.drop.checker=ee.checker),J}return g.bool(ee)?(J.options.drop.enabled=ee,J):J.options.drop}(this,I)},b.prototype.dropCheck=function(I,J,ee,xe,je,Be){return function(aa,Ba,el,Ja,ll,kl,rl){var Cl=!1;if(!(rl=rl||aa.getRect(kl)))return!!aa.options.drop.checker&&aa.options.drop.checker(Ba,el,Cl,aa,kl,Ja,ll);var Ml=aa.options.drop.overlap;if(Ml==="pointer"){var lr=ze(Ja,ll,"drag"),_l=Qe(Ba);_l.x+=lr.x,_l.y+=lr.y;var Wl=_l.x>rl.left&&_l.x<rl.right,Hr=_l.y>rl.top&&_l.y<rl.bottom;Cl=Wl&&Hr}var Er=Ja.getRect(ll);if(Er&&Ml==="center"){var Jr=Er.left+Er.width/2,sn=Er.top+Er.height/2;Cl=Jr>=rl.left&&Jr<=rl.right&&sn>=rl.top&&sn<=rl.bottom}return Er&&g.number(Ml)&&(Cl=Math.max(0,Math.min(rl.right,Er.right)-Math.max(rl.left,Er.left))*Math.max(0,Math.min(rl.bottom,Er.bottom)-Math.max(rl.top,Er.top))/(Er.width*Er.height)>=Ml),aa.options.drop.checker&&(Cl=aa.options.drop.checker(Ba,el,Cl,aa,kl,Ja,ll)),Cl}(this,I,J,ee,xe,je,Be)},f.dynamicDrop=function(I){return g.bool(I)?(t.dynamicDrop=I,f):t.dynamicDrop},le(o.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),o.methodDict.drop="dropzone",t.dynamicDrop=!1,x.actions.drop=fl.defaults},listeners:{"interactions:before-action-start":function(t){var o=t.interaction;o.prepared.name==="drag"&&(o.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,o){var f=t.interaction,b=(t.event,t.iEvent);if(f.prepared.name==="drag"){var x=f.dropState;x.activeDrops=[],x.events={},x.activeDrops=ba(o,f.element),x.events=ya(f,0,b),x.events.activate&&(Sa(x.activeDrops,x.events.activate),o.fire("actions/drop:start",{interaction:f,dragEvent:b}))}},"interactions:action-move":$a,"interactions:after-action-move":function(t,o){var f=t.interaction,b=t.iEvent;if(f.prepared.name==="drag"){var x=f.dropState;$e(f,x.events),o.fire("actions/drop:move",{interaction:f,dragEvent:b}),x.events={}}},"interactions:action-end":function(t,o){if(t.interaction.prepared.name==="drag"){var f=t.interaction,b=t.iEvent;$a(t,o),$e(f,f.dropState.events),o.fire("actions/drop:end",{interaction:f,dragEvent:b})}},"interactions:stop":function(t){var o=t.interaction;if(o.prepared.name==="drag"){var f=o.dropState;f&&(f.activeDrops=null,f.events=null,f.cur.dropzone=null,f.cur.element=null,f.prev.dropzone=null,f.prev.element=null,f.rejected=!1)}}},getActiveDrops:ba,getDrop:Pa,getDropEvents:ya,fireDropEvents:$e,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Sl=fl;function Xl(t){var o=t.interaction,f=t.iEvent,b=t.phase;if(o.prepared.name==="gesture"){var x=o.pointers.map(function(je){return je.pointer}),I=b==="start",J=b==="end",ee=o.interactable.options.deltaSource;if(f.touches=[x[0],x[1]],I)f.distance=Aa(x,ee),f.box=Ia(x),f.scale=1,f.ds=0,f.angle=Ze(x,ee),f.da=0,o.gesture.startDistance=f.distance,o.gesture.startAngle=f.angle;else if(J||o.pointers.length<2){var xe=o.prevEvent;f.distance=xe.distance,f.box=xe.box,f.scale=xe.scale,f.ds=0,f.angle=xe.angle,f.da=0}else f.distance=Aa(x,ee),f.box=Ia(x),f.scale=f.distance/o.gesture.startDistance,f.angle=Ze(x,ee),f.ds=f.scale-o.gesture.scale,f.da=f.angle-o.gesture.angle;o.gesture.distance=f.distance,o.gesture.angle=f.angle,g.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(o.gesture.scale=f.scale)}}var bl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var o=t.actions,f=t.Interactable,b=t.defaults;f.prototype.gesturable=function(x){return g.object(x)?(this.options.gesture.enabled=x.enabled!==!1,this.setPerAction("gesture",x),this.setOnEvents("gesture",x),this):g.bool(x)?(this.options.gesture.enabled=x,this):this.options.gesture},o.map.gesture=bl,o.methodDict.gesture="gesturable",b.actions.gesture=bl.defaults},listeners:{"interactions:action-start":Xl,"interactions:action-move":Xl,"interactions:action-end":Xl,"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 o=t.interactable.options.gesture;if(o&&o.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Vl=bl;function qa(t,o,f,b,x,I,J){if(!o)return!1;if(o===!0){var ee=g.number(I.width)?I.width:I.right-I.left,xe=g.number(I.height)?I.height:I.bottom-I.top;if(J=Math.min(J,Math.abs((t==="left"||t==="right"?ee:xe)/2)),ee<0&&(t==="left"?t="right":t==="right"&&(t="left")),xe<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var je=ee>=0?I.left:I.right;return f.x<je+J}if(t==="top"){var Be=xe>=0?I.top:I.bottom;return f.y<Be+J}if(t==="right")return f.x>(ee>=0?I.right:I.left)-J;if(t==="bottom")return f.y>(xe>=0?I.bottom:I.top)-J}return!!g.element(b)&&(g.element(o)?o===b:re(b,o,x))}function Rl(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var b=o;f.interactable.options.resize.square?(f.resizeAxes==="y"?b.delta.x=b.delta.y:b.delta.y=b.delta.x,b.axes="xy"):(b.axes=f.resizeAxes,f.resizeAxes==="x"?b.delta.y=0:f.resizeAxes==="y"&&(b.delta.x=0))}}var Il,La,al={id:"actions/resize",before:["actions/drag"],install:function(t){var o=t.actions,f=t.browser,b=t.Interactable,x=t.defaults;al.cursors=function(I){return I.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"}}(f),al.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,b.prototype.resizable=function(I){return function(J,ee,xe){return g.object(ee)?(J.options.resize.enabled=ee.enabled!==!1,J.setPerAction("resize",ee),J.setOnEvents("resize",ee),g.string(ee.axis)&&/^x$|^y$|^xy$/.test(ee.axis)?J.options.resize.axis=ee.axis:ee.axis===null&&(J.options.resize.axis=xe.defaults.actions.resize.axis),g.bool(ee.preserveAspectRatio)?J.options.resize.preserveAspectRatio=ee.preserveAspectRatio:g.bool(ee.square)&&(J.options.resize.square=ee.square),J):g.bool(ee)?(J.options.resize.enabled=ee,J):J.options.resize}(this,I,t)},o.map.resize=al,o.methodDict.resize="resizable",x.actions.resize=al.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(o){var f=o.iEvent,b=o.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var x=f,I=b.rect;b._rects={start:le({},I),corrected:le({},I),previous:le({},I),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},x.edges=b.prepared.edges,x.rect=b._rects.corrected,x.deltaRect=b._rects.delta}})(t),Rl(t)},"interactions:action-move":function(t){(function(o){var f=o.iEvent,b=o.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var x=f,I=b.interactable.options.resize.invert,J=I==="reposition"||I==="negate",ee=b.rect,xe=b._rects,je=xe.start,Be=xe.corrected,aa=xe.delta,Ba=xe.previous;if(le(Ba,Be),J){if(le(Be,ee),I==="reposition"){if(Be.top>Be.bottom){var el=Be.top;Be.top=Be.bottom,Be.bottom=el}if(Be.left>Be.right){var Ja=Be.left;Be.left=Be.right,Be.right=Ja}}}else Be.top=Math.min(ee.top,je.bottom),Be.bottom=Math.max(ee.bottom,je.top),Be.left=Math.min(ee.left,je.right),Be.right=Math.max(ee.right,je.left);for(var ll in Be.width=Be.right-Be.left,Be.height=Be.bottom-Be.top,Be)aa[ll]=Be[ll]-Ba[ll];x.edges=b.prepared.edges,x.rect=Be,x.deltaRect=aa}})(t),Rl(t)},"interactions:action-end":function(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var b=o;b.edges=f.prepared.edges,b.rect=f._rects.corrected,b.deltaRect=f._rects.delta}},"auto-start:check":function(t){var o=t.interaction,f=t.interactable,b=t.element,x=t.rect,I=t.buttons;if(x){var J=le({},o.coords.cur.page),ee=f.options.resize;if(ee&&ee.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(I&ee.mouseButtons)!=0)){if(g.object(ee.edges)){var xe={left:!1,right:!1,top:!1,bottom:!1};for(var je in xe)xe[je]=qa(je,ee.edges[je],J,o._latestPointer.eventTarget,b,x,ee.margin||al.defaultMargin);xe.left=xe.left&&!xe.right,xe.top=xe.top&&!xe.bottom,(xe.left||xe.right||xe.top||xe.bottom)&&(t.action={name:"resize",edges:xe})}else{var Be=ee.axis!=="y"&&J.x>x.right-al.defaultMargin,aa=ee.axis!=="x"&&J.y>x.bottom-al.defaultMargin;(Be||aa)&&(t.action={name:"resize",axes:(Be?"x":"")+(aa?"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 o=t.edges,f=t.axis,b=t.name,x=al.cursors,I=null;if(f)I=x[b+f];else if(o){for(var J="",ee=0,xe=["top","bottom","left","right"];ee<xe.length;ee++){var je=xe[ee];o[je]&&(J+=je)}I=x[J]}return I},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},ol=al,ia={id:"actions",install:function(t){t.usePlugin(Vl),t.usePlugin(ol),t.usePlugin(ie),t.usePlugin(Sl)}},ja=0,Oa={request:function(t){return Il(t)},cancel:function(t){return La(t)},init:function(t){if(Il=t.requestAnimationFrame,La=t.cancelAnimationFrame,!Il)for(var o=["ms","moz","webkit","o"],f=0;f<o.length;f++){var b=o[f];Il=t["".concat(b,"RequestAnimationFrame")],La=t["".concat(b,"CancelAnimationFrame")]||t["".concat(b,"CancelRequestAnimationFrame")]}Il=Il&&Il.bind(t),La=La&&La.bind(t),Il||(Il=function(x){var I=Date.now(),J=Math.max(0,16-(I-ja)),ee=t.setTimeout(function(){x(I+J)},J);return ja=I+J,ee},La=function(x){return clearTimeout(x)})}},Ra={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){Ra.isScrolling=!0,Oa.cancel(Ra.i),t.autoScroll=Ra,Ra.interaction=t,Ra.prevTime=Ra.now(),Ra.i=Oa.request(Ra.scroll)},stop:function(){Ra.isScrolling=!1,Ra.interaction&&(Ra.interaction.autoScroll=null),Oa.cancel(Ra.i)},scroll:function(){var t=Ra.interaction,o=t.interactable,f=t.element,b=t.prepared.name,x=o.options[b].autoScroll,I=be(x.container,o,f),J=Ra.now(),ee=(J-Ra.prevTime)/1e3,xe=x.speed*ee;if(xe>=1){var je={x:Ra.x*xe,y:Ra.y*xe};if(je.x||je.y){var Be=ga(I);g.window(I)?I.scrollBy(je.x,je.y):I&&(I.scrollLeft+=je.x,I.scrollTop+=je.y);var aa=ga(I),Ba={x:aa.x-Be.x,y:aa.y-Be.y};(Ba.x||Ba.y)&&o.fire({type:"autoscroll",target:f,interactable:o,delta:Ba,interaction:t,container:I})}Ra.prevTime=J}Ra.isScrolling&&(Oa.cancel(Ra.i),Ra.i=Oa.request(Ra.scroll))},check:function(t,o){var f;return(f=t.options[o].autoScroll)==null?void 0:f.enabled},onInteractionMove:function(t){var o=t.interaction,f=t.pointer;if(o.interacting()&&Ra.check(o.interactable,o.prepared.name))if(o.simulation)Ra.x=Ra.y=0;else{var b,x,I,J,ee=o.interactable,xe=o.element,je=o.prepared.name,Be=ee.options[je].autoScroll,aa=be(Be.container,ee,xe);if(g.window(aa))J=f.clientX<Ra.margin,b=f.clientY<Ra.margin,x=f.clientX>aa.innerWidth-Ra.margin,I=f.clientY>aa.innerHeight-Ra.margin;else{var Ba=Ee(aa);J=f.clientX<Ba.left+Ra.margin,b=f.clientY<Ba.top+Ra.margin,x=f.clientX>Ba.right-Ra.margin,I=f.clientY>Ba.bottom-Ra.margin}Ra.x=x?1:J?-1:0,Ra.y=I?1:b?-1:0,Ra.isScrolling||(Ra.margin=Be.margin,Ra.speed=Be.speed,Ra.start(o))}}};function be(t,o,f){return(g.string(t)?la(t,o,f):t)||S(f)}function ga(t){return g.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Le={id:"auto-scroll",install:function(t){var o=t.defaults,f=t.actions;t.autoScroll=Ra,Ra.now=function(){return t.now()},f.phaselessTypes.autoscroll=!0,o.perAction.autoScroll=Ra.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,Ra.stop(),Ra.interaction&&(Ra.interaction=null)},"interactions:stop":Ra.stop,"interactions:action-move":function(t){return Ra.onInteractionMove(t)}}},de=Le;function wa(t,o){var f=!1;return function(){return f||(j.console.warn(o),f=!0),t.apply(this,arguments)}}function pa(t,o){return t.name=o.name,t.axis=o.axis,t.edges=o.edges,t}function ea(t){return g.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Je(t){return g.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Xe={id:"auto-start/interactableMethods",install:function(t){var o=t.Interactable;o.prototype.getAction=function(f,b,x,I){var J=function(ee,xe,je,Be,aa){var Ba=ee.getRect(Be),el=xe.buttons||{0:1,1:4,3:8,4:16}[xe.button],Ja={action:null,interactable:ee,interaction:je,element:Be,rect:Ba,buttons:el};return aa.fire("auto-start:check",Ja),Ja.action}(this,b,x,I,t);return this.options.actionChecker?this.options.actionChecker(f,b,J,this,I,x):J},o.prototype.ignoreFrom=wa(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),o.prototype.allowFrom=wa(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),o.prototype.actionChecker=Je,o.prototype.styleCursor=ea}};function dl(t,o,f,b,x){return o.testIgnoreAllow(o.options[t.name],f,b)&&o.options[t.name].enabled&&tl(o,f,t,x)?t:null}function Ve(t,o,f,b,x,I,J){for(var ee=0,xe=b.length;ee<xe;ee++){var je=b[ee],Be=x[ee],aa=je.getAction(o,f,t,Be);if(aa){var Ba=dl(aa,je,Be,I,J);if(Ba)return{action:Ba,interactable:je,element:Be}}}return{action:null,interactable:null,element:null}}function Va(t,o,f,b,x){var I=[],J=[],ee=b;function xe(Be){I.push(Be),J.push(ee)}for(;g.element(ee);){I=[],J=[],x.interactables.forEachMatch(ee,xe);var je=Ve(t,o,f,I,J,b,x);if(je.action&&!je.interactable.options[je.action.name].manualStart)return je;ee=Pe(ee)}return{action:null,interactable:null,element:null}}function _a(t,o,f){var b=o.action,x=o.interactable,I=o.element;b=b||{name:null},t.interactable=x,t.element=I,pa(t.prepared,b),t.rect=x&&b.name?x.getRect(I):null,El(t,f),f.fire("autoStart:prepared",{interaction:t})}function tl(t,o,f,b){var x=t.options,I=x[f.name].max,J=x[f.name].maxPerElement,ee=b.autoStart.maxInteractions,xe=0,je=0,Be=0;if(!(I&&J&&ee))return!1;for(var aa=0,Ba=b.interactions.list;aa<Ba.length;aa++){var el=Ba[aa],Ja=el.prepared.name;if(el.interacting()&&(++xe>=ee||el.interactable===t&&((je+=Ja===f.name?1:0)>=I||el.element===o&&(Be++,Ja===f.name&&Be>=J))))return!1}return ee>0}function za(t,o){return g.number(t)?(o.autoStart.maxInteractions=t,this):o.autoStart.maxInteractions}function Ie(t,o,f){var b=f.autoStart.cursorElement;b&&b!==t&&(b.style.cursor=""),t.ownerDocument.documentElement.style.cursor=o,t.style.cursor=o,f.autoStart.cursorElement=o?t:null}function El(t,o){var f=t.interactable,b=t.element,x=t.prepared;if(t.pointerType==="mouse"&&f&&f.options.styleCursor){var I="";if(x.name){var J=f.options[x.name].cursorChecker;I=g.func(J)?J(x,f,b,t._interacting):o.actions.map[x.name].getCursor(x)}Ie(t.element,I||"",o)}else o.autoStart.cursorElement&&Ie(o.autoStart.cursorElement,"",o)}var Ol={id:"auto-start/base",before:["actions"],install:function(t){var o=t.interactStatic,f=t.defaults;t.usePlugin(Xe),f.base.actionChecker=null,f.base.styleCursor=!0,le(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),o.maxInteractions=function(b){return za(b,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:tl,cursorElement:null}},listeners:{"interactions:down":function(t,o){var f=t.interaction,b=t.pointer,x=t.event,I=t.eventTarget;f.interacting()||_a(f,Va(f,b,x,I,o),o)},"interactions:move":function(t,o){(function(f,b){var x=f.interaction,I=f.pointer,J=f.event,ee=f.eventTarget;x.pointerType!=="mouse"||x.pointerIsDown||x.interacting()||_a(x,Va(x,I,J,ee,b),b)})(t,o),function(f,b){var x=f.interaction;if(x.pointerIsDown&&!x.interacting()&&x.pointerWasMoved&&x.prepared.name){b.fire("autoStart:before-start",f);var I=x.interactable,J=x.prepared.name;J&&I&&(I.options[J].manualStart||!tl(I,x.element,x.prepared,b)?x.stop():(x.start(x.prepared,I,x.element),El(x,b)))}}(t,o)},"interactions:stop":function(t,o){var f=t.interaction,b=f.interactable;b&&b.options.styleCursor&&Ie(f.element,"",o)}},maxInteractions:za,withinInteractionLimit:tl,validateAction:dl},Gl=Ol,Hl={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,o){var f=t.interaction,b=t.eventTarget,x=t.dx,I=t.dy;if(f.prepared.name==="drag"){var J=Math.abs(x),ee=Math.abs(I),xe=f.interactable.options.drag,je=xe.startAxis,Be=J>ee?"x":J<ee?"y":"xy";if(f.prepared.axis=xe.lockAxis==="start"?Be[0]:xe.lockAxis,Be!=="xy"&&je!=="xy"&&je!==Be){f.prepared.name=null;for(var aa=b,Ba=function(Ja){if(Ja!==f.interactable){var ll=f.interactable.options.drag;if(!ll.manualStart&&Ja.testIgnoreAllow(ll,aa,b)){var kl=Ja.getAction(f.downPointer,f.downEvent,f,aa);if(kl&&kl.name==="drag"&&function(rl,Cl){if(!Cl)return!1;var Ml=Cl.options.drag.startAxis;return rl==="xy"||Ml==="xy"||Ml===rl}(Be,Ja)&&Gl.validateAction(kl,Ja,aa,b,o))return Ja}}};g.element(aa);){var el=o.interactables.forEachMatch(aa,Ba);if(el){f.prepared.name="drag",f.interactable=el,f.element=aa;break}aa=Pe(aa)}}}}}};function Zl(t){var o=t.prepared&&t.prepared.name;if(!o)return null;var f=t.interactable.options;return f[o].hold||f[o].delay}var Sr={id:"auto-start/hold",install:function(t){var o=t.defaults;t.usePlugin(Gl),o.perAction.hold=0,o.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var o=t.interaction,f=Zl(o);f>0&&(o.autoStartHoldTimer=setTimeout(function(){o.start(o.prepared,o.interactable,o.element)},f))},"interactions:move":function(t){var o=t.interaction,f=t.duplicate;o.autoStartHoldTimer&&o.pointerWasMoved&&!f&&(clearTimeout(o.autoStartHoldTimer),o.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var o=t.interaction;Zl(o)>0&&(o.prepared.name=null)}},getHoldDuration:Zl},Fl=Sr,fr={id:"auto-start",install:function(t){t.usePlugin(Gl),t.usePlugin(Fl),t.usePlugin(Hl)}},Fr=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 Ul(t){var o=t.interaction,f=t.event;o.interactable&&o.interactable.checkAndPreventDefault(f)}var rr={id:"core/interactablePreventDefault",install:function(t){var o=t.Interactable;o.prototype.preventDefault=Fr,o.prototype.checkAndPreventDefault=function(f){return function(b,x,I){var J=b.options.preventDefault;if(J!=="never")if(J!=="always"){if(x.events.supportsPassive&&/^touch(start|move)$/.test(I.type)){var ee=S(I.target).document,xe=x.getDocOptions(ee);if(!xe||!xe.events||xe.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(I.type)||g.element(I.target)&&ke(I.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||I.preventDefault()}else I.preventDefault()}(this,t,f)},t.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var b=0,x=t.interactions.list;b<x.length;b++){var I=x[b];if(I.element&&(I.element===f.target||se(I.element,f.target)))return void I.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(t,o){return t["interactions:".concat(o)]=Ul,t},{})};function $r(t,o){if(o.phaselessTypes[t])return!0;for(var f in o.map)if(t.indexOf(f)===0&&t.substr(f.length)in o.phases)return!0;return!1}function Br(t){var o={};for(var f in t){var b=t[f];g.plainObject(b)?o[f]=Br(b):g.array(b)?o[f]=Me(b):o[f]=b}return o}var Rr=function(){function t(o){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=o,this.result=Ar(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return p(t,[{key:"start",value:function(o,f){var b,x,I=o.phase,J=this.interaction,ee=function(je){var Be=je.interactable.options[je.prepared.name],aa=Be.modifiers;return aa&&aa.length?aa:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ba){var el=Be[Ba];return el&&el.enabled&&{options:el,methods:el._methods}}).filter(function(Ba){return!!Ba})}(J);this.prepareStates(ee),this.startEdges=le({},J.edges),this.edges=le({},this.startEdges),this.startOffset=(b=J.rect,x=f,b?{left:x.x-b.left,top:x.y-b.top,right:b.right-x.x,bottom:b.bottom-x.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var xe=this.fillArg({phase:I,pageCoords:f,preEnd:!1});return this.result=Ar(),this.startAll(xe),this.result=this.setAll(xe)}},{key:"fillArg",value:function(o){var f=this.interaction;return o.interaction=f,o.interactable=f.interactable,o.element=f.element,o.rect||(o.rect=f.rect),o.edges||(o.edges=this.startEdges),o.startOffset=this.startOffset,o}},{key:"startAll",value:function(o){for(var f=0,b=this.states;f<b.length;f++){var x=b[f];x.methods.start&&(o.state=x,x.methods.start(o))}}},{key:"setAll",value:function(o){var f=o.phase,b=o.preEnd,x=o.skipModifiers,I=o.rect,J=o.edges;o.coords=le({},o.pageCoords),o.rect=le({},I),o.edges=le({},J);for(var ee=x?this.states.slice(x):this.states,xe=Ar(o.coords,o.rect),je=0;je<ee.length;je++){var Be,aa=ee[je],Ba=aa.options,el=le({},o.coords),Ja=null;(Be=aa.methods)!=null&&Be.set&&this.shouldDo(Ba,b,f)&&(o.state=aa,Ja=aa.methods.set(o),ce(o.edges,o.rect,{x:o.coords.x-el.x,y:o.coords.y-el.y})),xe.eventProps.push(Ja)}le(this.edges,o.edges),xe.delta.x=o.coords.x-o.pageCoords.x,xe.delta.y=o.coords.y-o.pageCoords.y,xe.rectDelta.left=o.rect.left-I.left,xe.rectDelta.right=o.rect.right-I.right,xe.rectDelta.top=o.rect.top-I.top,xe.rectDelta.bottom=o.rect.bottom-I.bottom;var ll=this.result.coords,kl=this.result.rect;if(ll&&kl){var rl=xe.rect.left!==kl.left||xe.rect.right!==kl.right||xe.rect.top!==kl.top||xe.rect.bottom!==kl.bottom;xe.changed=rl||ll.x!==xe.coords.x||ll.y!==xe.coords.y}return xe}},{key:"applyToInteraction",value:function(o){var f=this.interaction,b=o.phase,x=f.coords.cur,I=f.coords.start,J=this.result,ee=this.startDelta,xe=J.delta;b==="start"&&le(this.startDelta,J.delta);for(var je=0,Be=[[I,ee],[x,xe]];je<Be.length;je++){var aa=Be[je],Ba=aa[0],el=aa[1];Ba.page.x+=el.x,Ba.page.y+=el.y,Ba.client.x+=el.x,Ba.client.y+=el.y}var Ja=this.result.rectDelta,ll=o.rect||f.rect;ll.left+=Ja.left,ll.right+=Ja.right,ll.top+=Ja.top,ll.bottom+=Ja.bottom,ll.width=ll.right-ll.left,ll.height=ll.bottom-ll.top}},{key:"setAndApply",value:function(o){var f=this.interaction,b=o.phase,x=o.preEnd,I=o.skipModifiers,J=this.setAll(this.fillArg({preEnd:x,phase:b,pageCoords:o.modifiedCoords||f.coords.cur.page}));if(this.result=J,!J.changed&&(!I||I<this.states.length)&&f.interacting())return!1;if(o.modifiedCoords){var ee=f.coords.cur.page,xe={x:o.modifiedCoords.x-ee.x,y:o.modifiedCoords.y-ee.y};J.coords.x+=xe.x,J.coords.y+=xe.y,J.delta.x+=xe.x,J.delta.y+=xe.y}this.applyToInteraction(o)}},{key:"beforeEnd",value:function(o){var f=o.interaction,b=o.event,x=this.states;if(x&&x.length){for(var I=!1,J=0;J<x.length;J++){var ee=x[J];o.state=ee;var xe=ee.options,je=ee.methods,Be=je.beforeEnd&&je.beforeEnd(o);if(Be)return this.endResult=Be,!1;I=I||!I&&this.shouldDo(xe,!0,o.phase,!0)}I&&f.move({event:b,preEnd:!0})}}},{key:"stop",value:function(o){var f=o.interaction;if(this.states&&this.states.length){var b=le({states:this.states,interactable:f.interactable,element:f.element,rect:null},o);this.fillArg(b);for(var x=0,I=this.states;x<I.length;x++){var J=I[x];b.state=J,J.methods.stop&&J.methods.stop(b)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(o){this.states=[];for(var f=0;f<o.length;f++){var b=o[f],x=b.options,I=b.methods,J=b.name;this.states.push({options:x,methods:I,index:f,name:J})}return this.states}},{key:"restoreInteractionCoords",value:function(o){var f=o.interaction,b=f.coords,x=f.rect,I=f.modification;if(I.result){for(var J=I.startDelta,ee=I.result,xe=ee.delta,je=ee.rectDelta,Be=0,aa=[[b.start,J],[b.cur,xe]];Be<aa.length;Be++){var Ba=aa[Be],el=Ba[0],Ja=Ba[1];el.page.x-=Ja.x,el.page.y-=Ja.y,el.client.x-=Ja.x,el.client.y-=Ja.y}x.left-=je.left,x.right-=je.right,x.top-=je.top,x.bottom-=je.bottom}}},{key:"shouldDo",value:function(o,f,b,x){return!(!o||o.enabled===!1||x&&!o.endOnly||o.endOnly&&!f||b==="start"&&!o.setStart)}},{key:"copyFrom",value:function(o){this.startOffset=o.startOffset,this.startDelta=o.startDelta,this.startEdges=o.startEdges,this.edges=o.edges,this.states=o.states.map(function(f){return Br(f)}),this.result=Ar(le({},o.result.coords),le({},o.result.rect))}},{key:"destroy",value:function(){for(var o in this)this[o]=null}}]),t}();function Ar(t,o){return{rect:o,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function yr(t,o){var f=t.defaults,b={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},x=function(I){var J=I||{};for(var ee in J.enabled=J.enabled!==!1,f)ee in J||(J[ee]=f[ee]);var xe={options:J,methods:b,name:o,enable:function(){return J.enabled=!0,xe},disable:function(){return J.enabled=!1,xe}};return xe};return o&&typeof o=="string"&&(x._defaults=f,x._methods=b),x}function zr(t){var o=t.iEvent,f=t.interaction.modification.result;f&&(o.modifiers=f.eventProps)}var Mr={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var o=t.interaction;o.modification=new Rr(o)},"interactions:before-action-start":function(t){var o=t.interaction,f=t.interaction.modification;f.start(t,o.coords.start.page),o.edges=f.edges,f.applyToInteraction(t)},"interactions:before-action-move":function(t){var o=t.interaction,f=o.modification,b=f.setAndApply(t);return o.edges=f.edges,b},"interactions:before-action-end":function(t){var o=t.interaction,f=o.modification,b=f.beforeEnd(t);return o.edges=f.startEdges,b},"interactions:action-start":zr,"interactions:action-move":zr,"interactions:action-end":zr,"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)}}},ir=Mr,xn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Yr=function(t){y(f,t);var o=V(f);function f(b,x,I,J,ee,xe,je){var Be;c(this,f),(Be=o.call(this,b)).relatedTarget=null,Be.screenX=void 0,Be.screenY=void 0,Be.button=void 0,Be.buttons=void 0,Be.ctrlKey=void 0,Be.shiftKey=void 0,Be.altKey=void 0,Be.metaKey=void 0,Be.page=void 0,Be.client=void 0,Be.delta=void 0,Be.rect=void 0,Be.x0=void 0,Be.y0=void 0,Be.t0=void 0,Be.dt=void 0,Be.duration=void 0,Be.clientX0=void 0,Be.clientY0=void 0,Be.velocity=void 0,Be.speed=void 0,Be.swipe=void 0,Be.axes=void 0,Be.preEnd=void 0,ee=ee||b.element;var aa=b.interactable,Ba=(aa&&aa.options||xn).deltaSource,el=ze(aa,ee,I),Ja=J==="start",ll=J==="end",kl=Ja?D(Be):b.prevEvent,rl=Ja?b.coords.start:ll?{page:kl.page,client:kl.client,timeStamp:b.coords.cur.timeStamp}:b.coords.cur;return Be.page=le({},rl.page),Be.client=le({},rl.client),Be.rect=le({},b.rect),Be.timeStamp=rl.timeStamp,ll||(Be.page.x-=el.x,Be.page.y-=el.y,Be.client.x-=el.x,Be.client.y-=el.y),Be.ctrlKey=x.ctrlKey,Be.altKey=x.altKey,Be.shiftKey=x.shiftKey,Be.metaKey=x.metaKey,Be.button=x.button,Be.buttons=x.buttons,Be.target=ee,Be.currentTarget=ee,Be.preEnd=xe,Be.type=je||I+(J||""),Be.interactable=aa,Be.t0=Ja?b.pointers[b.pointers.length-1].downTime:kl.t0,Be.x0=b.coords.start.page.x-el.x,Be.y0=b.coords.start.page.y-el.y,Be.clientX0=b.coords.start.client.x-el.x,Be.clientY0=b.coords.start.client.y-el.y,Be.delta=Ja||ll?{x:0,y:0}:{x:Be[Ba].x-kl[Ba].x,y:Be[Ba].y-kl[Ba].y},Be.dt=b.coords.delta.timeStamp,Be.duration=Be.timeStamp-Be.t0,Be.velocity=le({},b.coords.velocity[Ba]),Be.speed=Ma(Be.velocity.x,Be.velocity.y),Be.swipe=ll||J==="inertiastart"?Be.getSwipe():null,Be}return p(f,[{key:"getSwipe",value:function(){var b=this._interaction;if(b.prevEvent.speed<600||this.timeStamp-b.prevEvent.timeStamp>150)return null;var x=180*Math.atan2(b.prevEvent.velocityY,b.prevEvent.velocityX)/Math.PI;x<0&&(x+=360);var I=112.5<=x&&x<247.5,J=202.5<=x&&x<337.5;return{up:J,down:!J&&22.5<=x&&x<157.5,left:I,right:!I&&(292.5<=x||x<67.5),angle:x,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}}]),f}(U);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=p(function t(o,f,b,x,I){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=o,this.pointer=f,this.event=b,this.downTime=x,this.downTarget=I}),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,on=function(){function t(o){var f=this,b=o.pointerType,x=o.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=wa(function(Be){this.move(Be)},"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=x,this.pointerType=b;var I=this;this._proxy={};var J=function(Be){Object.defineProperty(f._proxy,Be,{get:function(){return I[Be]}})};for(var ee in zn)J(ee);var xe=function(Be){Object.defineProperty(f._proxy,Be,{value:function(){return I[Be].apply(I,arguments)}})};for(var je in wn)xe(je);this._scopeFire("interactions:new",{interaction:this})}return p(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(o,f,b){var x=this.updatePointer(o,f,b,!0),I=this.pointers[x];this._scopeFire("interactions:down",{pointer:o,event:f,eventTarget:b,pointerIndex:x,pointerInfo:I,type:"down",interaction:this})}},{key:"start",value:function(o,f,b){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(o.name==="gesture"?2:1)||!f.options[o.name].enabled)&&(pa(this.prepared,o),this.interactable=f,this.element=b,this.rect=f.getRect(b),this.edges=this.prepared.edges?le({},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(o,f,b){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(o,f,b,!1);var x,I,J=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&&(x=this.coords.cur.client.x-this.coords.start.client.x,I=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ma(x,I)>this.pointerMoveTolerance);var ee,xe,je,Be=this.getPointerIndex(o),aa={pointer:o,pointerIndex:Be,pointerInfo:this.pointers[Be],event:f,type:"move",eventTarget:b,dx:x,dy:I,duplicate:J,interaction:this};J||(ee=this.coords.velocity,xe=this.coords.delta,je=Math.max(xe.timeStamp/1e3,.001),ee.page.x=xe.page.x/je,ee.page.y=xe.page.y/je,ee.client.x=xe.client.x/je,ee.client.y=xe.client.y/je,ee.timeStamp=je),this._scopeFire("interactions:move",aa),J||this.simulation||(this.interacting()&&(aa.type=null,this.move(aa)),this.pointerWasMoved&&Q(this.coords.prev,this.coords.cur))}},{key:"move",value:function(o){o&&o.event||he(this.coords.delta),(o=le({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},o||{})).phase="move",this._doPhase(o)}},{key:"pointerUp",value:function(o,f,b,x){var I=this.getPointerIndex(o);I===-1&&(I=this.updatePointer(o,f,b,!1));var J=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(J),{pointer:o,pointerIndex:I,pointerInfo:this.pointers[I],event:f,eventTarget:b,type:J,curEventTarget:x,interaction:this}),this.simulation||this.end(f),this.removePointer(o,f)}},{key:"documentBlur",value:function(o){this.end(o),this._scopeFire("interactions:blur",{event:o,type:"blur",interaction:this})}},{key:"end",value:function(o){var f;this._ending=!0,o=o||this._latestPointer.event,this.interacting()&&(f=this._doPhase({event:o,interaction:this,phase:"end"})),this._ending=!1,f===!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(o){var f=pe(o);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:we(this.pointers,function(b){return b.id===f})}},{key:"getPointerInfo",value:function(o){return this.pointers[this.getPointerIndex(o)]}},{key:"updatePointer",value:function(o,f,b,x){var I,J,ee,xe=pe(o),je=this.getPointerIndex(o),Be=this.pointers[je];return x=x!==!1&&(x||/(down|start)$/i.test(f.type)),Be?Be.pointer=o:(Be=new nn(xe,o,f,null,null),je=this.pointers.length,this.pointers.push(Be)),Ce(this.coords.cur,this.pointers.map(function(aa){return aa.pointer}),this._now()),I=this.coords.delta,J=this.coords.prev,ee=this.coords.cur,I.page.x=ee.page.x-J.page.x,I.page.y=ee.page.y-J.page.y,I.client.x=ee.client.x-J.client.x,I.client.y=ee.client.y-J.client.y,I.timeStamp=ee.timeStamp-J.timeStamp,x&&(this.pointerIsDown=!0,Be.downTime=this.coords.cur.timeStamp,Be.downTarget=b,H(this.downPointer,o),this.interacting()||(Q(this.coords.start,this.coords.cur),Q(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(o,f,b),this._scopeFire("interactions:update-pointer",{pointer:o,event:f,eventTarget:b,down:x,pointerInfo:Be,pointerIndex:je,interaction:this}),je}},{key:"removePointer",value:function(o,f){var b=this.getPointerIndex(o);if(b!==-1){var x=this.pointers[b];this._scopeFire("interactions:remove-pointer",{pointer:o,event:f,eventTarget:null,pointerIndex:b,pointerInfo:x,interaction:this}),this.pointers.splice(b,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(o,f,b){this._latestPointer.pointer=o,this._latestPointer.event=f,this._latestPointer.eventTarget=b}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(o,f,b,x){return new Yr(this,o,this.prepared.name,f,this.element,b,x)}},{key:"_fireEvent",value:function(o){var f;(f=this.interactable)==null||f.fire(o),(!this.prevEvent||o.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=o)}},{key:"_doPhase",value:function(o){var f=o.event,b=o.phase,x=o.preEnd,I=o.type,J=this.rect;if(J&&b==="move"&&(ce(this.edges,J,this.coords.delta[this.interactable.options.deltaSource]),J.width=J.right-J.left,J.height=J.bottom-J.top),this._scopeFire("interactions:before-action-".concat(b),o)===!1)return!1;var ee=o.iEvent=this._createPreparedEvent(f,b,x,I);return this._scopeFire("interactions:action-".concat(b),o),b==="start"&&(this.prevEvent=ee),this._fireEvent(ee),this._scopeFire("interactions:after-action-".concat(b),o),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function ar(t){ql(t.interaction)}function ql(t){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(t))return!1;var o=t.offset.pending;return Ll(t.coords.cur,o),Ll(t.coords.delta,o),ce(t.edges,t.rect,o),o.x=0,o.y=0,!0}function Al(t){var o=t.x,f=t.y;this.offset.pending.x+=o,this.offset.pending.y+=f,this.offset.total.x+=o,this.offset.total.y+=f}function Ll(t,o){var f=t.page,b=t.client,x=o.x,I=o.y;f.x+=x,f.y+=I,b.x+=x,b.y+=I}wn.offsetBy="";var zl={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Al},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(o){o.pointerIsDown&&(Ll(o.coords.cur,o.offset.total),o.offset.pending.x=0,o.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":ar,"interactions:before-action-move":ar,"interactions:before-action-end":function(t){var o=t.interaction;if(ql(o))return o.move({offset:!0}),o.end(),!1},"interactions:stop":function(t){var o=t.interaction;o.offset.total.x=0,o.offset.total.y=0,o.offset.pending.x=0,o.offset.pending.y=0}}},gr=zl,ur=function(){function t(o){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=o}return p(t,[{key:"start",value:function(o){var f=this.interaction,b=jl(f);if(!b||!b.enabled)return!1;var x=f.coords.velocity.client,I=Ma(x.x,x.y),J=this.modification||(this.modification=new Rr(f));if(J.copyFrom(f.modification),this.t0=f._now(),this.allowResume=b.allowResume,this.v0=I,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=J.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&I>b.minSpeed&&I>b.endSpeed)this.startInertia();else{if(J.result=J.setAll(this.modifierArg),!J.result.changed)return!1;this.startSmoothEnd()}return f.modification.result.rect=null,f.offsetBy(this.targetOffset),f._doPhase({interaction:f,event:o,phase:"inertiastart"}),f.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),f.modification.result.rect=null,this.active=!0,f.simulation=this,!0}},{key:"startInertia",value:function(){var o=this,f=this.interaction.coords.velocity.client,b=jl(this.interaction),x=b.resistance,I=-Math.log(b.endSpeed/this.v0)/x;this.targetOffset={x:(f.x-I)/x,y:(f.y-I)/x},this.te=I,this.lambda_v0=x/this.v0,this.one_ve_v0=1-b.endSpeed/this.v0;var J=this.modification,ee=this.modifierArg;ee.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},J.result=J.setAll(ee),J.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+J.result.delta.x,y:this.targetOffset.y+J.result.delta.y}),this.onNextFrame(function(){return o.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var o=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 o.smoothEndTick()})}},{key:"onNextFrame",value:function(o){var f=this;this.timeout=Oa.request(function(){f.active&&o()})}},{key:"inertiaTick",value:function(){var o,f,b,x,I,J,ee,xe=this,je=this.interaction,Be=jl(je).resistance,aa=(je._now()-this.t0)/1e3;if(aa<this.te){var Ba,el=1-(Math.exp(-Be*aa)-this.lambda_v0)/this.one_ve_v0;this.isModified?(o=0,f=0,b=this.targetOffset.x,x=this.targetOffset.y,I=this.modifiedOffset.x,J=this.modifiedOffset.y,Ba={x:Pr(ee=el,o,b,I),y:Pr(ee,f,x,J)}):Ba={x:this.targetOffset.x*el,y:this.targetOffset.y*el};var Ja={x:Ba.x-this.currentOffset.x,y:Ba.y-this.currentOffset.y};this.currentOffset.x+=Ja.x,this.currentOffset.y+=Ja.y,je.offsetBy(Ja),je.move(),this.onNextFrame(function(){return xe.inertiaTick()})}else je.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var o=this,f=this.interaction,b=f._now()-this.t0,x=jl(f).smoothEndDuration;if(b<x){var I={x:_n(b,0,this.targetOffset.x,x),y:_n(b,0,this.targetOffset.y,x)},J={x:I.x-this.currentOffset.x,y:I.y-this.currentOffset.y};this.currentOffset.x+=J.x,this.currentOffset.y+=J.y,f.offsetBy(J),f.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return o.smoothEndTick()})}else f.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(o){var f=o.pointer,b=o.event,x=o.eventTarget,I=this.interaction;I.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),I.updatePointer(f,b,x,!0),I._doPhase({interaction:I,event:b,phase:"resume"}),Q(I.coords.prev,I.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,Oa.cancel(this.timeout)}}]),t}();function jl(t){var o=t.interactable,f=t.prepared;return o&&o.options&&f.name&&o.options[f.name].inertia}var Vr={id:"inertia",before:["modifiers","actions"],install:function(t){var o=t.defaults;t.usePlugin(gr),t.usePlugin(ir),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,o.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var o=t.interaction;o.inertia=new ur(o)},"interactions:before-action-end":function(t){var o=t.interaction,f=t.event;return(!o._interacting||o.simulation||!o.inertia.start(f))&&null},"interactions:down":function(t){var o=t.interaction,f=t.eventTarget,b=o.inertia;if(b.active)for(var x=f;g.element(x);){if(x===o.element){b.resume(t);break}x=Pe(x)}},"interactions:stop":function(t){var o=t.interaction.inertia;o.active&&o.stop()},"interactions:before-action-resume":function(t){var o=t.interaction.modification;o.stop(t),o.start(t,t.interaction.coords.cur.page),o.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":zr,"interactions:action-inertiastart":zr,"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,o,f,b){var x=1-t;return x*x*o+2*x*t*f+t*t*b}function _n(t,o,f,b){return-f*(t/=b)*(t-2)+o}var tn=Vr;function ei(t,o){for(var f=0;f<o.length;f++){var b=o[f];if(t.immediatePropagationStopped)break;b(t)}}var Mn=function(){function t(o){c(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=le({},o||{})}return p(t,[{key:"fire",value:function(o){var f,b=this.global;(f=this.types[o.type])&&ei(o,f),!o.propagationStopped&&b&&(f=b[o.type])&&ei(o,f)}},{key:"on",value:function(o,f){var b=Fe(o,f);for(o in b)this.types[o]=W(this.types[o]||[],b[o])}},{key:"off",value:function(o,f){var b=Fe(o,f);for(o in b){var x=this.types[o];if(x&&x.length)for(var I=0,J=b[o];I<J.length;I++){var ee=J[I],xe=x.indexOf(ee);xe!==-1&&x.splice(xe,1)}}}},{key:"getRect",value:function(o){return null}}]),t}(),ai=function(){function t(o){c(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=o,H(this,o)}return p(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,o){return t===o||(typeof t=="boolean"?!!o.capture===t&&!o.passive:!!t.capture==!!o.capture&&!!t.passive==!!o.passive)}var Hn={id:"events",install:function(t){var o,f=[],b={},x=[],I={add:J,remove:ee,addDelegate:function(Be,aa,Ba,el,Ja){var ll=Sn(Ja);if(!b[Ba]){b[Ba]=[];for(var kl=0;kl<x.length;kl++){var rl=x[kl];J(rl,Ba,xe),J(rl,Ba,je,!0)}}var Cl=b[Ba],Ml=na(Cl,function(lr){return lr.selector===Be&&lr.context===aa});Ml||(Ml={selector:Be,context:aa,listeners:[]},Cl.push(Ml)),Ml.listeners.push({func:el,options:ll})},removeDelegate:function(Be,aa,Ba,el,Ja){var ll,kl=Sn(Ja),rl=b[Ba],Cl=!1;if(rl)for(ll=rl.length-1;ll>=0;ll--){var Ml=rl[ll];if(Ml.selector===Be&&Ml.context===aa){for(var lr=Ml.listeners,_l=lr.length-1;_l>=0;_l--){var Wl=lr[_l];if(Wl.func===el&&In(Wl.options,kl)){lr.splice(_l,1),lr.length||(rl.splice(ll,1),ee(aa,Ba,xe),ee(aa,Ba,je,!0)),Cl=!0;break}}if(Cl)break}}},delegateListener:xe,delegateUseCapture:je,delegatedEvents:b,documents:x,targets:f,supportsOptions:!1,supportsPassive:!1};function J(Be,aa,Ba,el){if(Be.addEventListener){var Ja=Sn(el),ll=na(f,function(kl){return kl.eventTarget===Be});ll||(ll={eventTarget:Be,events:{}},f.push(ll)),ll.events[aa]||(ll.events[aa]=[]),na(ll.events[aa],function(kl){return kl.func===Ba&&In(kl.options,Ja)})||(Be.addEventListener(aa,Ba,I.supportsOptions?Ja:Ja.capture),ll.events[aa].push({func:Ba,options:Ja}))}}function ee(Be,aa,Ba,el){if(Be.addEventListener&&Be.removeEventListener){var Ja=we(f,function(Hr){return Hr.eventTarget===Be}),ll=f[Ja];if(ll&&ll.events)if(aa!=="all"){var kl=!1,rl=ll.events[aa];if(rl){if(Ba==="all"){for(var Cl=rl.length-1;Cl>=0;Cl--){var Ml=rl[Cl];ee(Be,aa,Ml.func,Ml.options)}return}for(var lr=Sn(el),_l=0;_l<rl.length;_l++){var Wl=rl[_l];if(Wl.func===Ba&&In(Wl.options,lr)){Be.removeEventListener(aa,Ba,I.supportsOptions?lr:lr.capture),rl.splice(_l,1),rl.length===0&&(delete ll.events[aa],kl=!0);break}}}kl&&!Object.keys(ll.events).length&&f.splice(Ja,1)}else for(aa in ll.events)ll.events.hasOwnProperty(aa)&&ee(Be,aa,"all")}}function xe(Be,aa){for(var Ba=Sn(aa),el=new ai(Be),Ja=b[Be.type],ll=ue(Be)[0],kl=ll;g.element(kl);){for(var rl=0;rl<Ja.length;rl++){var Cl=Ja[rl],Ml=Cl.selector,lr=Cl.context;if(ke(kl,Ml)&&se(lr,ll)&&se(lr,kl)){var _l=Cl.listeners;el.currentTarget=kl;for(var Wl=0;Wl<_l.length;Wl++){var Hr=_l[Wl];In(Hr.options,Ba)&&Hr.func(el)}}}kl=Pe(kl)}}function je(Be){return xe(Be,!0)}return(o=t.document)==null||o.createElement("div").addEventListener("test",null,{get capture(){return I.supportsOptions=!0},get passive(){return I.supportsPassive=!0}}),t.events=I,I}},an={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var o=0,f=an.methodOrder;o<f.length;o++){var b=f[o],x=an[b](t);if(x)return x}return null},simulationResume:function(t){var o=t.pointerType,f=t.eventType,b=t.eventTarget,x=t.scope;if(!/down|start/i.test(f))return null;for(var I=0,J=x.interactions.list;I<J.length;I++){var ee=J[I],xe=b;if(ee.simulation&&ee.simulation.allowResume&&ee.pointerType===o)for(;xe;){if(xe===ee.element)return ee;xe=Pe(xe)}}return null},mouseOrPen:function(t){var o,f=t.pointerId,b=t.pointerType,x=t.eventType,I=t.scope;if(b!=="mouse"&&b!=="pen")return null;for(var J=0,ee=I.interactions.list;J<ee.length;J++){var xe=ee[J];if(xe.pointerType===b){if(xe.simulation&&!On(xe,f))continue;if(xe.interacting())return xe;o||(o=xe)}}if(o)return o;for(var je=0,Be=I.interactions.list;je<Be.length;je++){var aa=Be[je];if(!(aa.pointerType!==b||/down/i.test(x)&&aa.simulation))return aa}return null},hasPointer:function(t){for(var o=t.pointerId,f=0,b=t.scope.interactions.list;f<b.length;f++){var x=b[f];if(On(x,o))return x}return null},idle:function(t){for(var o=t.pointerType,f=0,b=t.scope.interactions.list;f<b.length;f++){var x=b[f];if(x.pointers.length===1){var I=x.interactable;if(I&&(!I.options.gesture||!I.options.gesture.enabled))continue}else if(x.pointers.length>=2)continue;if(!x.interacting()&&o===x.pointerType)return x}return null}};function On(t,o){return t.pointers.some(function(f){return f.id===o})}var En=an,Gr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Un(t,o){return function(f){var b=o.interactions.list,x=oa(f),I=ue(f),J=I[0],ee=I[1],xe=[];if(/^touch/.test(f.type)){o.prevTouchTime=o.now();for(var je=0,Be=f.changedTouches;je<Be.length;je++){var aa=Be[je],Ba={pointer:aa,pointerId:pe(aa),pointerType:x,eventType:f.type,eventTarget:J,curEventTarget:ee,scope:o},el=bn(Ba);xe.push([Ba.pointer,Ba.eventTarget,Ba.curEventTarget,el])}}else{var Ja=!1;if(!ae.supportsPointerEvent&&/mouse/.test(f.type)){for(var ll=0;ll<b.length&&!Ja;ll++)Ja=b[ll].pointerType!=="mouse"&&b[ll].pointerIsDown;Ja=Ja||o.now()-o.prevTouchTime<500||f.timeStamp===0}if(!Ja){var kl={pointer:f,pointerId:pe(f),pointerType:x,eventType:f.type,curEventTarget:ee,eventTarget:J,scope:o},rl=bn(kl);xe.push([kl.pointer,kl.eventTarget,kl.curEventTarget,rl])}}for(var Cl=0;Cl<xe.length;Cl++){var Ml=xe[Cl],lr=Ml[0],_l=Ml[1],Wl=Ml[2];Ml[3][t](lr,f,_l,Wl)}}}function bn(t){var o=t.pointerType,f=t.scope,b={interaction:En.search(t),searchDetails:t};return f.fire("interactions:find",b),b.interaction||f.interactions.new({pointerType:o})}function Ai(t,o){var f=t.doc,b=t.scope,x=t.options,I=b.interactions.docEvents,J=b.events,ee=J[o];for(var xe in b.browser.isIOS&&!x.events&&(x.events={passive:!1}),J.delegatedEvents)ee(f,xe,J.delegateListener),ee(f,xe,J.delegateUseCapture,!0);for(var je=x&&x.events,Be=0;Be<I.length;Be++){var aa=I[Be];ee(f,aa.type,aa.listener,je)}}var Vo={id:"core/interactions",install:function(t){for(var o={},f=0;f<Gr.length;f++){var b=Gr[f];o[b]=Un(b,t)}var x,I=ae.pEventTypes;function J(){for(var ee=0,xe=t.interactions.list;ee<xe.length;ee++){var je=xe[ee];if(je.pointerIsDown&&je.pointerType==="touch"&&!je._interacting)for(var Be=function(){var el=Ba[aa];t.documents.some(function(Ja){return se(Ja.doc,el.downTarget)})||je.removePointer(el.pointer,el.event)},aa=0,Ba=je.pointers;aa<Ba.length;aa++)Be()}}(x=Z.PointerEvent?[{type:I.down,listener:J},{type:I.down,listener:o.pointerDown},{type:I.move,listener:o.pointerMove},{type:I.up,listener:o.pointerUp},{type:I.cancel,listener:o.pointerUp}]:[{type:"mousedown",listener:o.pointerDown},{type:"mousemove",listener:o.pointerMove},{type:"mouseup",listener:o.pointerUp},{type:"touchstart",listener:J},{type:"touchstart",listener:o.pointerDown},{type:"touchmove",listener:o.pointerMove},{type:"touchend",listener:o.pointerUp},{type:"touchcancel",listener:o.pointerUp}]).push({type:"blur",listener:function(ee){for(var xe=0,je=t.interactions.list;xe<je.length;xe++)je[xe].documentBlur(ee)}}),t.prevTouchTime=0,t.Interaction=function(ee){y(je,ee);var xe=V(je);function je(){return c(this,je),xe.apply(this,arguments)}return p(je,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(Be){t.interactions.pointerMoveTolerance=Be}},{key:"_now",value:function(){return t.now()}}]),je}(on),t.interactions={list:[],new:function(ee){ee.scopeFire=function(je,Be){return t.fire(je,Be)};var xe=new t.Interaction(ee);return t.interactions.list.push(xe),xe},listeners:o,docEvents:x,pointerMoveTolerance:1},t.usePlugin(rr)},listeners:{"scope:add-document":function(t){return Ai(t,"add")},"scope:remove-document":function(t){return Ai(t,"remove")},"interactable:unset":function(t,o){for(var f=t.interactable,b=o.interactions.list.length-1;b>=0;b--){var x=o.interactions.list[b];x.interactable===f&&(x.stop(),o.fire("interactions:destroy",{interaction:x}),x.destroy(),o.interactions.list.length>2&&o.interactions.list.splice(b,1))}}},onDocSignal:Ai,doOnInteractions:Un,methodNames:Gr},Fo=Vo,Cn=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Cn||{}),Po=function(){function t(o,f,b,x){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=f.actions,this.target=o,this._context=f.context||b,this._win=S(Ta(o)?this._context:o),this._doc=this._win.document,this._scopeEvents=x,this.set(f)}return p(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(o,f){return g.func(f.onstart)&&this.on("".concat(o,"start"),f.onstart),g.func(f.onmove)&&this.on("".concat(o,"move"),f.onmove),g.func(f.onend)&&this.on("".concat(o,"end"),f.onend),g.func(f.oninertiastart)&&this.on("".concat(o,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(o,f,b){var x,I=this,J=(x=this._actions.map[o])==null?void 0:x.filterEventType,ee=function(xe){return(J==null||J(xe))&&$r(xe,I._actions)};(g.array(f)||g.object(f))&&this._onOff(Cn.Off,o,f,void 0,ee),(g.array(b)||g.object(b))&&this._onOff(Cn.On,o,b,void 0,ee)}},{key:"setPerAction",value:function(o,f){var b=this._defaults;for(var x in f){var I=x,J=this.options[o],ee=f[I];I==="listeners"&&this.updatePerActionListeners(o,J.listeners,ee),g.array(ee)?J[I]=Me(ee):g.plainObject(ee)?(J[I]=le(J[I]||{},Br(ee)),g.object(b.perAction[I])&&"enabled"in b.perAction[I]&&(J[I].enabled=ee.enabled!==!1)):g.bool(ee)&&g.object(b.perAction[I])?J[I].enabled=ee:J[I]=ee}}},{key:"getRect",value:function(o){return o=o||(g.element(this.target)?this.target:null),g.string(this.target)&&(o=o||this._context.querySelector(this.target)),We(o)}},{key:"rectChecker",value:function(o){var f=this;return g.func(o)?(this.getRect=function(b){var x=le({},o.apply(f,b));return"width"in x||(x.width=x.right-x.left,x.height=x.bottom-x.top),x},this):o===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(o,f){if(Ta(f)||g.object(f)){for(var b in this.options[o]=f,this._actions.map)this.options[b][o]=f;return this}return this.options[o]}},{key:"origin",value:function(o){return this._backCompatOption("origin",o)}},{key:"deltaSource",value:function(o){return o==="page"||o==="client"?(this.options.deltaSource=o,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var o=this.target;return g.string(o)?Array.from(this._context.querySelectorAll(o)):g.func(o)&&o.getAllElements?o.getAllElements():g.element(o)?[o]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(o){return this._context===o.ownerDocument||se(this._context,o)}},{key:"testIgnoreAllow",value:function(o,f,b){return!this.testIgnore(o.ignoreFrom,f,b)&&this.testAllow(o.allowFrom,f,b)}},{key:"testAllow",value:function(o,f,b){return!o||!!g.element(b)&&(g.string(o)?re(b,o,f):!!g.element(o)&&se(o,b))}},{key:"testIgnore",value:function(o,f,b){return!(!o||!g.element(b))&&(g.string(o)?re(b,o,f):!!g.element(o)&&se(o,b))}},{key:"fire",value:function(o){return this.events.fire(o),this}},{key:"_onOff",value:function(o,f,b,x,I){g.object(f)&&!g.array(f)&&(x=b,b=null);var J=Fe(f,b,I);for(var ee in J){ee==="wheel"&&(ee=ae.wheelEvent);for(var xe=0,je=J[ee];xe<je.length;xe++){var Be=je[xe];$r(ee,this._actions)?this.events[o===Cn.On?"on":"off"](ee,Be):g.string(this.target)?this._scopeEvents[o===Cn.On?"addDelegate":"removeDelegate"](this.target,this._context,ee,Be,x):this._scopeEvents[o===Cn.On?"add":"remove"](this.target,ee,Be,x)}}return this}},{key:"on",value:function(o,f,b){return this._onOff(Cn.On,o,f,b)}},{key:"off",value:function(o,f,b){return this._onOff(Cn.Off,o,f,b)}},{key:"set",value:function(o){var f=this._defaults;for(var b in g.object(o)||(o={}),this.options=Br(f.base),this._actions.methodDict){var x=b,I=this._actions.methodDict[x];this.options[x]={},this.setPerAction(x,le(le({},f.perAction),f.actions[x])),this[I](o[x])}for(var J in o)J!=="getRect"?g.func(this[J])&&this[J](o[J]):this.rectChecker(o.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var o in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[o],b=f.length-1;b>=0;b--){var x=f[b],I=x.selector,J=x.context,ee=x.listeners;I===this.target&&J===this._context&&f.splice(b,1);for(var xe=ee.length-1;xe>=0;xe--)this._scopeEvents.removeDelegate(this.target,this._context,o,ee[xe][0],ee[xe][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),jo=function(){function t(o){var f=this;c(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=o,o.addListeners({"interactable:unset":function(b){var x=b.interactable,I=x.target,J=g.string(I)?f.selectorMap[I]:I[f.scope.id],ee=we(J,function(xe){return xe===x});J.splice(ee,1)}})}return p(t,[{key:"new",value:function(o,f){f=le(f||{},{actions:this.scope.actions});var b=new this.scope.Interactable(o,f,this.scope.document,this.scope.events);return this.scope.addDocument(b._doc),this.list.push(b),g.string(o)?(this.selectorMap[o]||(this.selectorMap[o]=[]),this.selectorMap[o].push(b)):(b.target[this.scope.id]||Object.defineProperty(o,this.scope.id,{value:[],configurable:!0}),o[this.scope.id].push(b)),this.scope.fire("interactable:new",{target:o,options:f,interactable:b,win:this.scope._win}),b}},{key:"getExisting",value:function(o,f){var b=f&&f.context||this.scope.document,x=g.string(o),I=x?this.selectorMap[o]:o[this.scope.id];if(I)return na(I,function(J){return J._context===b&&(x||J.inContext(o))})}},{key:"forEachMatch",value:function(o,f){for(var b=0,x=this.list;b<x.length;b++){var I=x[b],J=void 0;if((g.string(I.target)?g.element(o)&&ke(o,I.target):o===I.target)&&I.inContext(o)&&(J=f(I)),J!==void 0)return J}}}]),t}(),Yi=function(){function t(){var o=this;c(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ae,this.defaults=Br(xn),this.Eventable=Mn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(b){var x=function I(J,ee){var xe=b.interactables.getExisting(J,ee);return xe||((xe=b.interactables.new(J,ee)).events.global=I.globalEvents),xe};return x.getPointerAverage=qe,x.getTouchBBox=Ia,x.getTouchDistance=Aa,x.getTouchAngle=Ze,x.getElementRect=We,x.getElementClientRect=Ee,x.matchesSelector=ke,x.closest=De,x.globalEvents={},x.version="1.10.27",x.scope=b,x.use=function(I,J){return this.scope.usePlugin(I,J),this},x.isSet=function(I,J){return!!this.scope.interactables.get(I,J&&J.context)},x.on=wa(function(I,J,ee){if(g.string(I)&&I.search(" ")!==-1&&(I=I.trim().split(/ +/)),g.array(I)){for(var xe=0,je=I;xe<je.length;xe++){var Be=je[xe];this.on(Be,J,ee)}return this}if(g.object(I)){for(var aa in I)this.on(aa,I[aa],J);return this}return $r(I,this.scope.actions)?this.globalEvents[I]?this.globalEvents[I].push(J):this.globalEvents[I]=[J]:this.scope.events.add(this.scope.document,I,J,{options:ee}),this},"The interact.on() method is being deprecated"),x.off=wa(function(I,J,ee){if(g.string(I)&&I.search(" ")!==-1&&(I=I.trim().split(/ +/)),g.array(I)){for(var xe=0,je=I;xe<je.length;xe++){var Be=je[xe];this.off(Be,J,ee)}return this}if(g.object(I)){for(var aa in I)this.off(aa,I[aa],J);return this}var Ba;return $r(I,this.scope.actions)?I in this.globalEvents&&(Ba=this.globalEvents[I].indexOf(J))!==-1&&this.globalEvents[I].splice(Ba,1):this.scope.events.remove(this.scope.document,I,J,ee),this},"The interact.off() method is being deprecated"),x.debug=function(){return this.scope},x.supportsTouch=function(){return ae.supportsTouch},x.supportsPointerEvent=function(){return ae.supportsPointerEvent},x.stop=function(){for(var I=0,J=this.scope.interactions.list;I<J.length;I++)J[I].stop();return this},x.pointerMoveTolerance=function(I){return g.number(I)?(this.scope.interactions.pointerMoveTolerance=I,this):this.scope.interactions.pointerMoveTolerance},x.addDocument=function(I,J){this.scope.addDocument(I,J)},x.removeDocument=function(I){this.scope.removeDocument(I)},x}(this),this.InteractEvent=Yr,this.Interactable=void 0,this.interactables=new jo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(b){return o.removeDocument(b.target)};var f=this;this.Interactable=function(b){y(I,b);var x=V(I);function I(){return c(this,I),x.apply(this,arguments)}return p(I,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(J){return E(u(I.prototype),"set",this).call(this,J),f.fire("interactable:set",{options:J,interactable:this}),this}},{key:"unset",value:function(){E(u(I.prototype),"unset",this).call(this);var J=f.interactables.list.indexOf(this);J<0||(f.interactables.list.splice(J,1),f.fire("interactable:unset",{interactable:this}))}}]),I}(Po)}return p(t,[{key:"addListeners",value:function(o,f){this.listenerMaps.push({id:f,map:o})}},{key:"fire",value:function(o,f){for(var b=0,x=this.listenerMaps;b<x.length;b++){var I=x[b].map[o];if(I&&I(f,this,o)===!1)return!1}}},{key:"init",value:function(o){return this.isInitialized?this:function(f,b){return f.isInitialized=!0,g.window(b)&&C(b),Z.init(b),ae.init(b),Oa.init(b),f.window=b,f.document=b.document,f.usePlugin(Fo),f.usePlugin(Hn),f}(this,o)}},{key:"pluginIsInstalled",value:function(o){var f=o.id;return f?!!this._plugins.map[f]:this._plugins.list.indexOf(o)!==-1}},{key:"usePlugin",value:function(o,f){if(!this.isInitialized)return this;if(this.pluginIsInstalled(o))return this;if(o.id&&(this._plugins.map[o.id]=o),this._plugins.list.push(o),o.install&&o.install(this,f),o.listeners&&o.before){for(var b=0,x=this.listenerMaps.length,I=o.before.reduce(function(ee,xe){return ee[xe]=!0,ee[Ji(xe)]=!0,ee},{});b<x;b++){var J=this.listenerMaps[b].id;if(J&&(I[J]||I[Ji(J)]))break}this.listenerMaps.splice(b,0,{id:o.id,map:o.listeners})}else o.listeners&&this.listenerMaps.push({id:o.id,map:o.listeners});return this}},{key:"addDocument",value:function(o,f){if(this.getDocIndex(o)!==-1)return!1;var b=S(o);f=f?le({},f):{},this.documents.push({doc:o,options:f}),this.events.documents.push(o),o!==this.document&&this.events.add(b,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:o,window:b,scope:this,options:f})}},{key:"removeDocument",value:function(o){var f=this.getDocIndex(o),b=S(o),x=this.documents[f].options;this.events.remove(b,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:o,window:b,scope:this,options:x})}},{key:"getDocIndex",value:function(o){for(var f=0;f<this.documents.length;f++)if(this.documents[f].doc===o)return f;return-1}},{key:"getDocOptions",value:function(o){var f=this.getDocIndex(o);return f===-1?null:this.documents[f].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Ji(t){return t&&t.replace(/\/.*$/,"")}var Xi=new Yi,jr=Xi.interactStatic,Ho=typeof globalThis<"u"?globalThis:window;Xi.init(Ho);var zi=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var o=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(b){var x=b[0],I=b[1];return x in t||I in t}),f=function(b,x){for(var I=t.range,J=t.limits,ee=J===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:J,xe=t.offset,je=xe===void 0?{x:0,y:0}:xe,Be={range:I,grid:t,x:null,y:null},aa=0;aa<o.length;aa++){var Ba=o[aa],el=Ba[0],Ja=Ba[1],ll=Math.round((b-je.x)/t[el]),kl=Math.round((x-je.y)/t[Ja]);Be[el]=Math.max(ee.left,Math.min(ee.right,ll*t[el]+je.x)),Be[Ja]=Math.max(ee.top,Math.min(ee.bottom,kl*t[Ja]+je.y))}return Be};return f.grid=t,f.coordFields=o,f}}),Uo={id:"snappers",install:function(t){var o=t.interactStatic;o.snappers=le(o.snappers||{},zi),o.createSnapGrid=o.snappers.grid}},Mi=Uo,Zi={start:function(t){var o=t.state,f=t.rect,b=t.edges,x=t.pageCoords,I=o.options,J=I.ratio,ee=I.enabled,xe=o.options,je=xe.equalDelta,Be=xe.modifiers;J==="preserve"&&(J=f.width/f.height),o.startCoords=le({},x),o.startRect=le({},f),o.ratio=J,o.equalDelta=je;var aa=o.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(o.xIsPrimaryAxis=!(!b.left&&!b.right),o.equalDelta){var Ba=(aa.left?1:-1)*(aa.top?1:-1);o.edgeSign={x:Ba,y:Ba}}else o.edgeSign={x:aa.left?-1:1,y:aa.top?-1:1};if(ee!==!1&&le(b,aa),Be!=null&&Be.length){var el=new Rr(t.interaction);el.copyFrom(t.interaction.modification),el.prepareStates(Be),o.subModification=el,el.startAll(i({},t))}},set:function(t){var o=t.state,f=t.rect,b=t.coords,x=o.linkedEdges,I=le({},b),J=o.equalDelta?Qi:qo;if(le(t.edges,x),J(o,o.xIsPrimaryAxis,b,f),!o.subModification)return null;var ee=le({},f);ce(x,ee,{x:b.x-I.x,y:b.y-I.y});var xe=o.subModification.setAll(i(i({},t),{},{rect:ee,edges:x,pageCoords:b,prevCoords:b,prevRect:ee})),je=xe.delta;return xe.changed&&(J(o,Math.abs(je.x)>Math.abs(je.y),xe.coords,xe.rect),le(b,xe.coords)),xe.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Qi(t,o,f){var b=t.startCoords,x=t.edgeSign;o?f.y=b.y+(f.x-b.x)*x.y:f.x=b.x+(f.y-b.y)*x.x}function qo(t,o,f,b){var x=t.startRect,I=t.startCoords,J=t.ratio,ee=t.edgeSign;if(o){var xe=b.width/J;f.y=I.y+(xe-x.height)*ee.y}else{var je=b.height*J;f.x=I.x+(je-x.width)*ee.x}}var Wo=yr(Zi,"aspectRatio"),eo=function(){};eo._defaults={};var Dn=eo;function Nn(t,o,f){return g.func(t)?ve(t,o.interactable,o.element,[f.x,f.y,o]):ve(t,o.interactable,o.element)}var qn={start:function(t){var o=t.rect,f=t.startOffset,b=t.state,x=t.interaction,I=t.pageCoords,J=b.options,ee=J.elementRect,xe=le({left:0,top:0,right:0,bottom:0},J.offset||{});if(o&&ee){var je=Nn(J.restriction,x,I);if(je){var Be=je.right-je.left-o.width,aa=je.bottom-je.top-o.height;Be<0&&(xe.left+=Be,xe.right+=Be),aa<0&&(xe.top+=aa,xe.bottom+=aa)}xe.left+=f.left-o.width*ee.left,xe.top+=f.top-o.height*ee.top,xe.right+=f.right-o.width*(1-ee.right),xe.bottom+=f.bottom-o.height*(1-ee.bottom)}b.offset=xe},set:function(t){var o=t.coords,f=t.interaction,b=t.state,x=b.options,I=b.offset,J=Nn(x.restriction,f,o);if(J){var ee=function(xe){return!xe||"left"in xe&&"top"in xe||((xe=le({},xe)).left=xe.x||0,xe.top=xe.y||0,xe.right=xe.right||xe.left+xe.width,xe.bottom=xe.bottom||xe.top+xe.height),xe}(J);o.x=Math.max(Math.min(ee.right-I.right,o.x),ee.left+I.left),o.y=Math.max(Math.min(ee.bottom-I.bottom,o.y),ee.top+I.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ko=yr(qn,"restrict"),ao={top:1/0,left:1/0,bottom:-1/0,right:-1/0},lo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function ro(t,o){for(var f=0,b=["top","left","bottom","right"];f<b.length;f++){var x=b[f];x in t||(t[x]=o[x])}return t}var Wn={noInner:ao,noOuter:lo,start:function(t){var o,f=t.interaction,b=t.startOffset,x=t.state,I=x.options;I&&(o=Ge(Nn(I.offset,f,f.coords.start.page))),o=o||{x:0,y:0},x.offset={top:o.y+b.top,left:o.x+b.left,bottom:o.y-b.bottom,right:o.x-b.right}},set:function(t){var o=t.coords,f=t.edges,b=t.interaction,x=t.state,I=x.offset,J=x.options;if(f){var ee=le({},o),xe=Nn(J.inner,b,ee)||{},je=Nn(J.outer,b,ee)||{};ro(xe,ao),ro(je,lo),f.top?o.y=Math.min(Math.max(je.top+I.top,ee.y),xe.top+I.top):f.bottom&&(o.y=Math.max(Math.min(je.bottom+I.bottom,ee.y),xe.bottom+I.bottom)),f.left?o.x=Math.min(Math.max(je.left+I.left,ee.x),xe.left+I.left):f.right&&(o.x=Math.max(Math.min(je.right+I.right,ee.x),xe.right+I.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},li=yr(Wn,"restrictEdges"),no=le({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},qn.defaults),io=yr({start:qn.start,set:qn.set,defaults:no},"restrictRect"),ri={width:-1/0,height:-1/0},Go={width:1/0,height:1/0},oo=yr({start:function(t){return Wn.start(t)},set:function(t){var o=t.interaction,f=t.state,b=t.rect,x=t.edges,I=f.options;if(x){var J=Oe(Nn(I.min,o,t.coords))||ri,ee=Oe(Nn(I.max,o,t.coords))||Go;f.options={endOnly:I.endOnly,inner:le({},Wn.noInner),outer:le({},Wn.noOuter)},x.top?(f.options.inner.top=b.bottom-J.height,f.options.outer.top=b.bottom-ee.height):x.bottom&&(f.options.inner.bottom=b.top+J.height,f.options.outer.bottom=b.top+ee.height),x.left?(f.options.inner.left=b.right-J.width,f.options.outer.left=b.right-ee.width):x.right&&(f.options.inner.right=b.left+J.width,f.options.outer.right=b.left+ee.width),Wn.set(t),f.options=I}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ln={start:function(t){var o,f=t.interaction,b=t.interactable,x=t.element,I=t.rect,J=t.state,ee=t.startOffset,xe=J.options,je=xe.offsetWithOrigin?function(Ba){var el=Ba.interaction.element,Ja=Ge(ve(Ba.state.options.origin,null,null,[el])),ll=Ja||ze(Ba.interactable,el,Ba.interaction.prepared.name);return ll}(t):{x:0,y:0};if(xe.offset==="startCoords")o={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var Be=ve(xe.offset,b,x,[f]);(o=Ge(Be)||{x:0,y:0}).x+=je.x,o.y+=je.y}var aa=xe.relativePoints;J.offsets=I&&aa&&aa.length?aa.map(function(Ba,el){return{index:el,relativePoint:Ba,x:ee.left-I.width*Ba.x+o.x,y:ee.top-I.height*Ba.y+o.y}}):[{index:0,relativePoint:null,x:o.x,y:o.y}]},set:function(t){var o=t.interaction,f=t.coords,b=t.state,x=b.options,I=b.offsets,J=ze(o.interactable,o.element,o.prepared.name),ee=le({},f),xe=[];x.offsetWithOrigin||(ee.x-=J.x,ee.y-=J.y);for(var je=0,Be=I;je<Be.length;je++)for(var aa=Be[je],Ba=ee.x-aa.x,el=ee.y-aa.y,Ja=0,ll=x.targets.length;Ja<ll;Ja++){var kl=x.targets[Ja],rl=void 0;(rl=g.func(kl)?kl(Ba,el,o._proxy,aa,Ja):kl)&&xe.push({x:(g.number(rl.x)?rl.x:Ba)+aa.x,y:(g.number(rl.y)?rl.y:el)+aa.y,range:g.number(rl.range)?rl.range:x.range,source:kl,index:Ja,offset:aa})}for(var Cl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ml=0;Ml<xe.length;Ml++){var lr=xe[Ml],_l=lr.range,Wl=lr.x-ee.x,Hr=lr.y-ee.y,Er=Ma(Wl,Hr),Jr=Er<=_l;_l===1/0&&Cl.inRange&&Cl.range!==1/0&&(Jr=!1),Cl.target&&!(Jr?Cl.inRange&&_l!==1/0?Er/_l<Cl.distance/Cl.range:_l===1/0&&Cl.range!==1/0||Er<Cl.distance:!Cl.inRange&&Er<Cl.distance)||(Cl.target=lr,Cl.distance=Er,Cl.range=_l,Cl.inRange=Jr,Cl.delta.x=Wl,Cl.delta.y=Hr)}return Cl.inRange&&(f.x=Cl.target.x,f.y=Cl.target.y),b.closest=Cl,Cl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Yo=yr(Ln,"snap"),pi={start:function(t){var o=t.state,f=t.edges,b=o.options;if(!f)return null;t.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:b.offset||"self",origin:{x:0,y:0},range:b.range}},o.targetFields=o.targetFields||[["width","height"],["x","y"]],Ln.start(t),o.offsets=t.state.offsets,t.state=o},set:function(t){var o=t.interaction,f=t.state,b=t.coords,x=f.options,I=f.offsets,J={x:b.x-I[0].x,y:b.y-I[0].y};f.options=le({},x),f.options.targets=[];for(var ee=0,xe=x.targets||[];ee<xe.length;ee++){var je=xe[ee],Be=void 0;if(Be=g.func(je)?je(J.x,J.y,o):je){for(var aa=0,Ba=f.targetFields;aa<Ba.length;aa++){var el=Ba[aa],Ja=el[0],ll=el[1];if(Ja in Be||ll in Be){Be.x=Be[Ja],Be.y=Be[ll];break}}f.options.targets.push(Be)}}var kl=Ln.set(t);return f.options=x,kl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Jo=yr(pi,"snapSize"),Ii={aspectRatio:Wo,restrictEdges:li,restrict:Ko,restrictRect:io,restrictSize:oo,snapEdges:yr({start:function(t){var o=t.edges;return o?(t.state.targetFields=t.state.targetFields||[[o.left?"left":"right",o.top?"top":"bottom"]],pi.start(t)):null},set:pi.set,defaults:le(Br(pi.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Yo,snapSize:Jo,spring:Dn,avoid:Dn,transform:Dn,rubberband:Dn},Xo={id:"modifiers",install:function(t){var o=t.interactStatic;for(var f in t.usePlugin(ir),t.usePlugin(Mi),o.modifiers=Ii,Ii){var b=Ii[f],x=b._defaults,I=b._methods;x._methods=I,t.defaults.perAction[f]=x}}},Zo=Xo,to=function(t){y(f,t);var o=V(f);function f(b,x,I,J,ee,xe){var je;if(c(this,f),H(D(je=o.call(this,ee)),I),I!==x&&H(D(je),x),je.timeStamp=xe,je.originalEvent=I,je.type=b,je.pointerId=pe(x),je.pointerType=oa(x),je.target=J,je.currentTarget=null,b==="tap"){var Be=ee.getPointerIndex(x);je.dt=je.timeStamp-ee.pointers[Be].downTime;var aa=je.timeStamp-ee.tapTime;je.double=!!ee.prevTap&&ee.prevTap.type!=="doubletap"&&ee.prevTap.target===je.target&&aa<500}else b==="doubletap"&&(je.dt=x.timeStamp-ee.tapTime,je.double=!0);return je}return p(f,[{key:"_subtractOrigin",value:function(b){var x=b.x,I=b.y;return this.pageX-=x,this.pageY-=I,this.clientX-=x,this.clientY-=I,this}},{key:"_addOrigin",value:function(b){var x=b.x,I=b.y;return this.pageX+=x,this.pageY+=I,this.clientX+=x,this.clientY+=I,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(U),Kn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Kn,t.defaults.actions.pointerEvents=Kn.defaults,le(t.actions.phaselessTypes,Kn.types)},listeners:{"interactions:new":function(t){var o=t.interaction;o.prevTap=null,o.tapTime=0},"interactions:update-pointer":function(t){var o=t.down,f=t.pointerInfo;!o&&f.hold||(f.hold={duration:1/0,timeout:null})},"interactions:move":function(t,o){var f=t.interaction,b=t.pointer,x=t.event,I=t.eventTarget;t.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Oi(t),Bn({interaction:f,pointer:b,event:x,eventTarget:I,type:"move"},o))},"interactions:down":function(t,o){(function(f,b){for(var x=f.interaction,I=f.pointer,J=f.event,ee=f.eventTarget,xe=f.pointerIndex,je=x.pointers[xe].hold,Be=da(ee),aa={interaction:x,pointer:I,event:J,eventTarget:ee,type:"hold",targets:[],path:Be,node:null},Ba=0;Ba<Be.length;Ba++){var el=Be[Ba];aa.node=el,b.fire("pointerEvents:collect-targets",aa)}if(aa.targets.length){for(var Ja=1/0,ll=0,kl=aa.targets;ll<kl.length;ll++){var rl=kl[ll].eventable.options.holdDuration;rl<Ja&&(Ja=rl)}je.duration=Ja,je.timeout=setTimeout(function(){Bn({interaction:x,eventTarget:ee,pointer:I,event:J,type:"hold"},b)},Ja)}})(t,o),Bn(t,o)},"interactions:up":function(t,o){Oi(t),Bn(t,o),function(f,b){var x=f.interaction,I=f.pointer,J=f.event,ee=f.eventTarget;x.pointerWasMoved||Bn({interaction:x,eventTarget:ee,pointer:I,event:J,type:"tap"},b)}(t,o)},"interactions:cancel":function(t,o){Oi(t),Bn(t,o)}},PointerEvent:to,fire:Bn,collectEventTargets:so,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,o){var f=t.interaction,b=t.pointer,x=t.event,I=t.eventTarget,J=t.type,ee=t.targets,xe=ee===void 0?so(t,o):ee,je=new to(J,b,x,I,f,o.now());o.fire("pointerEvents:new",{pointerEvent:je});for(var Be={interaction:f,pointer:b,event:x,eventTarget:I,targets:xe,type:J,pointerEvent:je},aa=0;aa<xe.length;aa++){var Ba=xe[aa];for(var el in Ba.props||{})je[el]=Ba.props[el];var Ja=ze(Ba.eventable,Ba.node);if(je._subtractOrigin(Ja),je.eventable=Ba.eventable,je.currentTarget=Ba.node,Ba.eventable.fire(je),je._addOrigin(Ja),je.immediatePropagationStopped||je.propagationStopped&&aa+1<xe.length&&xe[aa+1].node!==je.currentTarget)break}if(o.fire("pointerEvents:fired",Be),J==="tap"){var ll=je.double?Bn({interaction:f,pointer:b,event:x,eventTarget:I,type:"doubletap"},o):je;f.prevTap=ll,f.tapTime=ll.timeStamp}return je}function so(t,o){var f=t.interaction,b=t.pointer,x=t.event,I=t.eventTarget,J=t.type,ee=f.getPointerIndex(b),xe=f.pointers[ee];if(J==="tap"&&(f.pointerWasMoved||!xe||xe.downTarget!==I))return[];for(var je=da(I),Be={interaction:f,pointer:b,event:x,eventTarget:I,type:J,path:je,targets:[],node:null},aa=0;aa<je.length;aa++){var Ba=je[aa];Be.node=Ba,o.fire("pointerEvents:collect-targets",Be)}return J==="hold"&&(Be.targets=Be.targets.filter(function(el){var Ja,ll;return el.eventable.options.holdDuration===((Ja=f.pointers[ee])==null||(ll=Ja.hold)==null?void 0:ll.duration)})),Be.targets}function Oi(t){var o=t.interaction,f=t.pointerIndex,b=o.pointers[f].hold;b&&b.timeout&&(clearTimeout(b.timeout),b.timeout=null)}var Qo=Object.freeze({__proto__:null,default:Kn});function fi(t){var o=t.interaction;o.holdIntervalHandle&&(clearInterval(o.holdIntervalHandle),o.holdIntervalHandle=null)}var et={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Kn);var o=t.pointerEvents;o.defaults.holdRepeatInterval=0,o.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,o){return t["pointerEvents:".concat(o)]=fi,t},{"pointerEvents:new":function(t){var o=t.pointerEvent;o.type==="hold"&&(o.count=(o.count||0)+1)},"pointerEvents:fired":function(t,o){var f=t.interaction,b=t.pointerEvent,x=t.eventTarget,I=t.targets;if(b.type==="hold"&&I.length){var J=I[0].eventable.options.holdRepeatInterval;J<=0||(f.holdIntervalHandle=setTimeout(function(){o.pointerEvents.fire({interaction:f,eventTarget:x,type:"hold",pointer:b,event:b},o)},J))}}})},at=et,lt={id:"pointer-events/interactableTargets",install:function(t){var o=t.Interactable;o.prototype.pointerEvents=function(b){return le(this.events.options,b),this};var f=o.prototype._backCompatOption;o.prototype._backCompatOption=function(b,x){var I=f.call(this,b,x);return I===this&&(this.events.options[b]=x),I}},listeners:{"pointerEvents:collect-targets":function(t,o){var f=t.targets,b=t.node,x=t.type,I=t.eventTarget;o.interactables.forEachMatch(b,function(J){var ee=J.events,xe=ee.options;ee.types[x]&&ee.types[x].length&&J.testIgnoreAllow(xe,b,I)&&f.push({node:b,eventable:ee,props:{interactable:J}})})},"interactable:new":function(t){var o=t.interactable;o.events.getRect=function(f){return o.getRect(f)}},"interactable:set":function(t,o){var f=t.interactable,b=t.options;le(f.events.options,o.pointerEvents.defaults),le(f.events.options,b.pointerEvents||{})}}},rt=lt,co={id:"pointer-events",install:function(t){t.usePlugin(Qo),t.usePlugin(at),t.usePlugin(rt)}},hi=co,nt={id:"reflow",install:function(t){var o=t.Interactable;t.actions.phases.reflow=!0,o.prototype.reflow=function(f){return function(b,x,I){for(var J=b.getAllElements(),ee=I.window.Promise,xe=ee?[]:null,je=function(){var aa=J[Be],Ba=b.getRect(aa);if(!Ba)return 1;var el,Ja=na(I.interactions.list,function(rl){return rl.interacting()&&rl.interactable===b&&rl.element===aa&&rl.prepared.name===x.name});if(Ja)Ja.move(),xe&&(el=Ja._reflowPromise||new ee(function(rl){Ja._reflowResolve=rl}));else{var ll=Oe(Ba),kl=function(rl){return{coords:rl,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:ll.x,y:ll.y},client:{x:ll.x,y:ll.y},timeStamp:I.now()});el=function(rl,Cl,Ml,lr,_l){var Wl=rl.interactions.new({pointerType:"reflow"}),Hr={interaction:Wl,event:_l,pointer:_l,eventTarget:Ml,phase:"reflow"};Wl.interactable=Cl,Wl.element=Ml,Wl.prevEvent=_l,Wl.updatePointer(_l,_l,Ml,!0),he(Wl.coords.delta),pa(Wl.prepared,lr),Wl._doPhase(Hr);var Er=rl.window,Jr=Er.Promise,sn=Jr?new Jr(function(vn){Wl._reflowResolve=vn}):void 0;return Wl._reflowPromise=sn,Wl.start(lr,Cl,Ml),Wl._interacting?(Wl.move(Hr),Wl.end(_l)):(Wl.stop(),Wl._reflowResolve()),Wl.removePointer(_l,_l),sn}(I,b,aa,x,kl)}xe&&xe.push(el)},Be=0;Be<J.length&&!je();Be++);return xe&&ee.all(xe).then(function(){return b})}(this,f,t)}},listeners:{"interactions:stop":function(t,o){var f=t.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(b,x){b.splice(b.indexOf(x),1)}(o.interactions.list,f))}}},it=nt;if(jr.use(rr),jr.use(gr),jr.use(hi),jr.use(tn),jr.use(Zo),jr.use(fr),jr.use(ia),jr.use(de),jr.use(it),jr.default=jr,s(l)==="object"&&l)try{l.exports=jr}catch{}return jr.default=jr,jr})}(Fi,Fi.exports)),Fi.exports}var v1=h1();const Ms=Pn.getDefaultExportFromCjs(v1),Lo=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 i=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 p=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,D=NaN,V=NaN,E=NaN,Y=-1,M=-1,O=-1,j=-1,C=i.x,S=i.y,_=i.w,k=i.h;const g=a.ref(),$=a.reactive({i:a.toRef(i,"i"),state:h,wrapper:g,calcXY:ve});function R(ge){Fe(ge)}function G(){xa()}function ie(ge){dn(i.isDraggable)&&(h.draggable=ge)}function Se(ge){dn(i.isResizable)&&(h.resizable=ge)}function te(ge){dn(i.isBounded)&&(h.bounded=ge)}function Z(ge){h.transformScale=ge}function fe(ge){h.rowHeight=ge}function ae(ge){h.maxRows=ge}function se(){h.rtl=As()==="rtl",xa()}function De(ge){h.cols=Math.floor(ge)}c.increaseItem($),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,dn(i.isDraggable)?h.draggable=c.isDraggable:h.draggable=i.isDraggable,dn(i.isResizable)?h.resizable=c.isResizable:h.resizable=i.isResizable,dn(i.isBounded)?h.bounded=c.isBounded:h.bounded=i.isBounded,h.transformScale=c.transformScale,h.useCssTransforms=c.useCssTransforms,h.useStyleCursor=c.useStyleCursor,a.watchEffect(()=>{C=i.x,S=i.y,k=i.h,_=i.w,Xr(We)}),m.on("updateWidth",R),m.on("compact",G),m.on("setDraggable",ie),m.on("setResizable",Se),m.on("setBounded",te),m.on("setTransformScale",Z),m.on("setRowHeight",fe),m.on("setMaxRows",ae),m.on("directionchange",se),m.on("setColNum",De)}),a.onBeforeUnmount(()=>{m.off("updateWidth",R),m.off("compact",G),m.off("setDraggable",ie),m.off("setResizable",Se),m.off("setBounded",te),m.off("setTransformScale",Z),m.off("setRowHeight",fe),m.off("setMaxRows",ae),m.off("directionchange",se),m.off("setColNum",De),p.value&&(p.value.unset(),p.value=null),c.decreaseItem($)}),r({state:h,wrapper:g});const Pe=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ke=a.computed(()=>h.resizable&&!i.static),B=a.computed(()=>c.isMirrored?!h.rtl:h.rtl),q=a.computed(()=>(h.draggable||h.resizable)&&!i.static),re=i1("item"),Ae=a.computed(()=>({[re.b()]:!0,[re.bm("resizable")]:ke.value,[re.bm("static")]:i.static,[re.bm("resizing")]:h.isResizing,[re.bm("dragging")]:h.isDragging,[re.bm("transform")]:h.useCssTransforms,[re.bm("rtl")]:B.value,[re.bm("no-touch")]:Pe&&q.value})),Ee=a.computed(()=>[re.be("resizer"),B.value&&re.bem("resizer","rtl")].filter(Boolean));a.watch(()=>i.isDraggable,ge=>{h.draggable=ge}),a.watch(()=>i.static,()=>{Xr(H),Xr(he)}),a.watch(()=>h.draggable,()=>{Xr(H)}),a.watch(()=>i.isResizable,ge=>{h.resizable=ge}),a.watch(()=>i.isBounded,ge=>{h.bounded=ge}),a.watch(()=>h.resizable,()=>{Xr(he)}),a.watch(()=>h.rowHeight,()=>{Xr(We),Xr(da)}),a.watch([()=>h.cols,()=>h.containerWidth],()=>{Xr(he),Xr(We),Xr(da)}),a.watch([()=>i.minH,()=>i.maxH,()=>i.minW,()=>i.maxW],()=>{Xr(he)}),a.watch(B,()=>{Xr(he),Xr(We)}),a.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const ge=c.margin;!ge||ge[0]===h.margin[0]&&ge[1]===h.margin[1]||(h.margin=ge.map(Number),Xr(We),Xr(da))});function We(){i.x+i.w>h.cols?(C=0,_=i.w>h.cols?h.cols:i.w):(C=i.x,_=i.w);const ge=la(C,S,_,k);h.isDragging&&(ge.top=h.dragging.top,B.value?ge.right=h.dragging.left:ge.left=h.dragging.left),h.isResizing&&(ge.width=h.resizing.width,ge.height=h.resizing.height);let ha;h.useCssTransforms?B.value?ha=a1(ge.top,ge.right,ge.width,ge.height):ha=e1(ge.top,ge.left,ge.width,ge.height):B.value?ha=r1(ge.top,ge.right,ge.width,ge.height):ha=l1(ge.top,ge.left,ge.width,ge.height),h.style=ha}function da(){const ge={};for(const ha of["width","height"]){const Qe=h.style[ha].match(/^(\d+)px$/);if(!Qe)return;ge[ha]=Qe[1]}s("container-resized",i.i,i.h,i.w,ge.height,ge.width)}function Ta(ge){if(i.static)return;const ha=ge.type;if(ha==="resizestart"&&h.isResizing||ha!=="resizestart"&&!h.isResizing)return;const Qe=Bs(ge);if(dn(Qe))return;const{x:pe,y:Ce}=Qe,ma={width:0,height:0};let qe;switch(ha){case"resizestart":{he(),Y=_,M=k,qe=la(C,S,_,k),ma.width=qe.width,ma.height=qe.height,h.resizing=ma,h.isResizing=!0;break}case"resizemove":{!ge.edges.right&&!ge.edges.left&&(V=pe),!ge.edges.top&&!ge.edges.bottom&&(E=Ce);const Ia=Ts(V,E,pe,Ce);B.value?ma.width=h.resizing.width-Ia.deltaX/h.transformScale:ma.width=h.resizing.width+Ia.deltaX/h.transformScale,ma.height=h.resizing.height+Ia.deltaY/h.transformScale,h.resizing=ma;break}case"resizeend":{qe=la(C,S,_,k),ma.width=qe.width,ma.height=qe.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}qe=ze(ma.height,ma.width),qe.w<i.minW&&(qe.w=i.minW),qe.w>i.maxW&&(qe.w=i.maxW),qe.h<i.minH&&(qe.h=i.minH),qe.h>i.maxH&&(qe.h=i.maxH),qe.h<1&&(qe.h=1),qe.w<1&&(qe.w=1),V=pe,E=Ce,(_!==qe.w||k!==qe.h)&&s("resize",i.i,qe.h,qe.w,ma.height,ma.width),ge.type==="resizeend"&&(Y!==_||M!==k)&&s("resized",i.i,qe.h,qe.w,ma.height,ma.width),m.emit("resizeEvent",ge.type,i.i,C,S,qe.h,qe.w)}function le(ge){if(i.static||h.isResizing)return;const ha=ge.type;if(ha==="dragstart"&&h.isDragging||ha!=="dragstart"&&!h.isDragging)return;const Qe=Bs(ge);if(dn(Qe))return;const{x:pe,y:Ce}=Qe,ma=ge.target;if(!ma.offsetParent)return;const qe={top:0,left:0};switch(ha){case"dragstart":{O=C,j=S;const Aa=ma.offsetParent.getBoundingClientRect(),Ze=ma.getBoundingClientRect(),oa=Ze.left/h.transformScale,ue=Aa.left/h.transformScale,U=Ze.right/h.transformScale,W=Aa.right/h.transformScale,Me=Ze.top/h.transformScale,we=Aa.top/h.transformScale;B.value?qe.left=(U-W)*-1:qe.left=oa-ue,qe.top=Me-we,h.dragging=qe,h.isDragging=!0;break}case"dragmove":{const Aa=Ts(w,D,pe,Ce);if(B.value?qe.left=h.dragging.left-Aa.deltaX/h.transformScale:qe.left=h.dragging.left+Aa.deltaX/h.transformScale,qe.top=h.dragging.top+Aa.deltaY/h.transformScale,h.bounded){const Ze=ma.offsetParent.clientHeight-Oe(i.h,h.rowHeight,h.margin[1]);qe.top=ce(qe.top,0,Ze);const oa=Ge(),ue=h.containerWidth-Oe(i.w,oa,h.margin[0]);qe.left=ce(qe.left,0,ue)}h.dragging=qe;break}case"dragend":{const Aa=ma.offsetParent.getBoundingClientRect(),Ze=ma.getBoundingClientRect(),oa=Ze.left/h.transformScale,ue=Aa.left/h.transformScale,U=Ze.right/h.transformScale,W=Aa.right/h.transformScale,Me=Ze.top/h.transformScale,we=Aa.top/h.transformScale;B.value?qe.left=(U-W)*-1:qe.left=oa-ue,qe.top=Me-we,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let Ia;B.value,Ia=ve(qe.top,qe.left),w=pe,D=Ce,(C!==Ia.x||S!==Ia.y)&&s("move",i.i,Ia.x,Ia.y),ge.type==="dragend"&&(O!==C||j!==S)&&s("moved",i.i,Ia.x,Ia.y),m.emit("dragEvent",ge.type,i.i,Ia.x,Ia.y,k,_)}function la(ge,ha,Qe,pe){const Ce=Ge();let ma;return B.value?ma={right:Math.round(Ce*ge+(ge+1)*h.margin[0]),top:Math.round(h.rowHeight*ha+(ha+1)*h.margin[1]),width:Qe===1/0?Qe:Math.round(Ce*Qe+Math.max(0,Qe-1)*h.margin[0]),height:pe===1/0?pe:Math.round(h.rowHeight*pe+Math.max(0,pe-1)*h.margin[1])}:ma={left:Math.round(Ce*ge+(ge+1)*h.margin[0]),top:Math.round(h.rowHeight*ha+(ha+1)*h.margin[1]),width:Qe===1/0?Qe:Math.round(Ce*Qe+Math.max(0,Qe-1)*h.margin[0]),height:pe===1/0?pe:Math.round(h.rowHeight*pe+Math.max(0,pe-1)*h.margin[1])},ma}function ve(ge,ha){const Qe=Ge();let pe=Math.round((ha-h.margin[0])/(Qe+h.margin[0])),Ce=Math.round((ge-h.margin[1])/(h.rowHeight+h.margin[1]));return pe=Math.max(Math.min(pe,h.cols-_),0),Ce=Math.max(Math.min(Ce,h.maxRows-k),0),{x:pe,y:Ce}}function Ge(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function Oe(ge,ha,Qe){return Number.isFinite(ge)?Math.round(ha*ge+Math.max(0,ge-1)*Qe):ge}function ce(ge,ha,Qe){return Math.max(Math.min(ge,Qe),ha)}function ze(ge,ha,Qe=!1){const pe=Ge();let Ce=Math.round((ha+h.margin[0])/(pe+h.margin[0])),ma=0;return Qe?ma=Math.ceil((ge+h.margin[1])/(h.rowHeight+h.margin[1])):ma=Math.round((ge+h.margin[1])/(h.rowHeight+h.margin[1])),Ce=Math.max(Math.min(Ce,h.cols-C),0),ma=Math.max(Math.min(ma,h.maxRows-S),0),{w:Ce,h:ma}}function Fe(ge,ha){h.containerWidth=ge}function xa(){We()}function Ma(){!p.value&&g.value&&(p.value=Ms(g.value),h.useStyleCursor||p.value.styleCursor(!1))}const P=Cs(le);function H(){if(Ma(),!!p.value)if(h.draggable&&!i.static){const ge={ignoreFrom:i.dragIgnoreFrom,allowFrom:i.dragAllowFrom,...i.dragOption};p.value.draggable(ge),y||(y=!0,p.value.on("dragstart dragmove dragend",ha=>{ha.type==="dragmove"?P(ha):le(ha)}))}else p.value.draggable({enabled:!1})}const Q=Cs(Ta);function he(){if(Ma(),!!p.value)if(h.resizable&&!i.static){const ge=la(0,0,i.maxW,i.maxH),ha=la(0,0,i.minW,i.minH),Qe={edges:{left:B.value?`.${Ee.value[0]}`:!1,right:B.value?!1:`.${Ee.value[0]}`,bottom:`.${Ee.value[0]}`,top:!1},ignoreFrom:i.resizeIgnoreFrom,restrictSize:{min:{height:ha.height*h.transformScale,width:ha.width*h.transformScale},max:{height:ge.height*h.transformScale,width:ge.width*h.transformScale}},...i.resizeOption};i.preserveAspectRatio&&(Qe.modifiers=[Ms.modifiers.aspectRatio({ratio:"preserve"})]),p.value.resizable(Qe),u||(u=!0,p.value.on("resizestart resizemove resizeend",pe=>{pe.type==="resizemove"?Q(pe):Ta(pe)}))}else p.value.resizable({enabled:!1})}return(ge,ha)=>(a.openBlock(),a.createElementBlock("section",{ref_key:"wrapper",ref:g,class:a.normalizeClass(Ae.value),style:a.normalizeStyle(h.style)},[a.renderSlot(ge.$slots,"default"),ke.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(Ee.value)},null,2)):a.createCommentVNode("",!0)],6))}}),di=typeof window<"u";var Is;di&&(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 m1=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(m1)));const y1=di&&("ontouchstart"in window||b1()>0),g1=y1?"pointerdown":"click";function b1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function k1(l,r,n=window.Event){const{type:i,bubbles:s=!1,cancelable:c=!1,...m}=r;if(!Os(i)||i==="")return!1;let p;return Os(n)?p=new n(i,{bubbles:s,cancelable:c}):(p=document.createEvent("HTMLEvents"),p.initEvent(i,s,c)),Object.assign(p,m),l.dispatchEvent(p)}const x1="clickoutside",w1=new Set;di&&document.addEventListener(g1,l=>{const r=l.target,n=l.composedPath&&l.composedPath();w1.forEach(i=>{i!==r&&(n?!n.includes(i):!i.contains(r))&&(!i.__transferElement||i.__transferElement!==r&&!i.__transferElement.contains(r))&&k1(i,{type:x1})})},!0);const _1=[["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 So;if(di){for(const l of _1)if(l[1]in document){So=l;break}}a.computed(()=>!1);const S1=new Set,E1=new WeakMap;if(di&&So){const l=So[2],r=So[4];document.addEventListener(r,()=>{if(S1.forEach(n=>{n.value=!1}),document[l]){const n=E1.get(document[l]);n&&(n.value=!0)}},!1)}const Xc=new Map;Xc.set("x",0);Xc.set("y",0);var ci=[],C1=function(){return ci.some(function(l){return l.activeTargets.length>0})},D1=function(){return ci.some(function(l){return l.skippedTargets.length>0})},$s="ResizeObserver loop completed with undelivered notifications.",N1=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)},Gi;(function(l){l.BORDER_BOX="border-box",l.CONTENT_BOX="content-box",l.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Gi||(Gi={}));var ui=function(l){return Object.freeze(l)},B1=function(){function l(r,n){this.inlineSize=r,this.blockSize=n,ui(this)}return l}(),Zc=function(){function l(r,n,i,s){return this.x=r,this.y=n,this.width=i,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ui(this)}return l.prototype.toJSON=function(){var r=this,n=r.x,i=r.y,s=r.top,c=r.right,m=r.bottom,p=r.left,h=r.width,y=r.height;return{x:n,y:i,top:s,right:c,bottom:m,left:p,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,i=r.height;return!n&&!i}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)},T1=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},qi=typeof window<"u"?window:{},ko=new WeakMap,Vs=/auto|scroll/,A1=/^tb|vertical/,z1=/msie|trident/i.test(qi.navigator&&qi.navigator.userAgent),An=function(l){return parseFloat(l||"0")},Di=function(l,r,n){return l===void 0&&(l=0),r===void 0&&(r=0),n===void 0&&(n=!1),new B1((n?r:l)||0,(n?l:r)||0)},Fs=ui({devicePixelContentBoxSize:Di(),borderBoxSize:Di(),contentBoxSize:Di(),contentRect:new Zc(0,0,0,0)}),eu=function(l,r){if(r===void 0&&(r=!1),ko.has(l)&&!r)return ko.get(l);if(Qc(l))return ko.set(l,Fs),Fs;var n=getComputedStyle(l),i=zt(l)&&l.ownerSVGElement&&l.getBBox(),s=!z1&&n.boxSizing==="border-box",c=A1.test(n.writingMode||""),m=!i&&Vs.test(n.overflowY||""),p=!i&&Vs.test(n.overflowX||""),h=i?0:An(n.paddingTop),y=i?0:An(n.paddingRight),u=i?0:An(n.paddingBottom),w=i?0:An(n.paddingLeft),D=i?0:An(n.borderTopWidth),V=i?0:An(n.borderRightWidth),E=i?0:An(n.borderBottomWidth),Y=i?0:An(n.borderLeftWidth),M=w+y,O=h+u,j=Y+V,C=D+E,S=p?l.offsetHeight-C-l.clientHeight:0,_=m?l.offsetWidth-j-l.clientWidth:0,k=s?M+j:0,g=s?O+C:0,$=i?i.width:An(n.width)-k-_,R=i?i.height:An(n.height)-g-S,G=$+M+_+j,ie=R+O+S+C,Se=ui({devicePixelContentBoxSize:Di(Math.round($*devicePixelRatio),Math.round(R*devicePixelRatio),c),borderBoxSize:Di(G,ie,c),contentBoxSize:Di($,R,c),contentRect:new Zc(w,h,$,R)});return ko.set(l,Se),Se},au=function(l,r,n){var i=eu(l,n),s=i.borderBoxSize,c=i.contentBoxSize,m=i.devicePixelContentBoxSize;switch(r){case Gi.DEVICE_PIXEL_CONTENT_BOX:return m;case Gi.BORDER_BOX:return s;default:return c}},M1=function(){function l(r){var n=eu(r);this.target=r,this.contentRect=n.contentRect,this.borderBoxSize=ui([n.borderBoxSize]),this.contentBoxSize=ui([n.contentBoxSize]),this.devicePixelContentBoxSize=ui([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},I1=function(){var l=1/0,r=[];ci.forEach(function(c){if(c.activeTargets.length!==0){var m=[];c.activeTargets.forEach(function(p){var h=new M1(p.target),y=lu(p.target);m.push(h),p.lastReportedSize=au(p.target,p.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,i=r;n<i.length;n++){var s=i[n];s()}return l},Ps=function(l){ci.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))})})},O1=function(){var l=0;for(Ps(l);C1();)l=I1(),Ps(l);return D1()&&N1(),l>0},ft,ru=[],L1=function(){return ru.splice(0).forEach(function(l){return l()})},$1=function(l){if(!ft){var r=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return L1()}).observe(n,i),ft=function(){n.textContent="".concat(r?r--:r++)}}ru.push(l),ft()},R1=function(l){$1(function(){requestAnimationFrame(l)})},Eo=0,V1=function(){return!!Eo},F1=250,P1={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,j1=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=F1),!ht){ht=!0;var i=Hs(r);R1(function(){var s=!1;try{s=O1()}finally{if(ht=!1,r=i-Hs(),!V1())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,P1)};document.body?n():qi.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 qi.addEventListener(n,r.listener,!0)}))},l.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),js.forEach(function(n){return qi.removeEventListener(n,r.listener,!0)}),this.stopped=!0)},l}(),Dt=new j1,Us=function(l){!Eo&&l>0&&Dt.start(),Eo+=l,!Eo&&Dt.stop()},H1=function(l){return!zt(l)&&!T1(l)&&getComputedStyle(l).display==="inline"},U1=function(){function l(r,n){this.target=r,this.observedBox=n||Gi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return l.prototype.isActive=function(){var r=au(this.target,this.observedBox,!0);return H1(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},l}(),q1=function(){function l(r,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=n}return l}(),xo=new WeakMap,qs=function(l,r){for(var n=0;n<l.length;n+=1)if(l[n].target===r)return n;return-1},wo=function(){function l(){}return l.connect=function(r,n){var i=new q1(r,n);xo.set(r,i)},l.observe=function(r,n,i){var s=xo.get(r),c=s.observationTargets.length===0;qs(s.observationTargets,n)<0&&(c&&ci.push(s),s.observationTargets.push(new U1(n,i&&i.box)),Us(1),Dt.schedule())},l.unobserve=function(r,n){var i=xo.get(r),s=qs(i.observationTargets,n),c=i.observationTargets.length===1;s>=0&&(c&&ci.splice(ci.indexOf(i),1),i.observationTargets.splice(s,1),Us(-1))},l.disconnect=function(r){var n=this,i=xo.get(r);i.observationTargets.slice().forEach(function(s){return n.unobserve(r,s.target)}),i.activeTargets.splice(0,i.activeTargets.length)},l}(),W1=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.");wo.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");wo.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");wo.unobserve(this,r)},l.prototype.disconnect=function(){wo.disconnect(this)},l.toString=function(){return"function ResizeObserver () { [polyfill code] }"},l}();const $o=new WeakMap;function K1(l){var r;for(let n=0,i=l.length;n<i;++n){const s=l[n],c=$o.get(s.target);if(typeof c=="function"){const{inlineSize:m,blockSize:p}=((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:p??y}))}}}const nu=new(di&&window.ResizeObserver||W1)(K1);function Ws(l,r){$o.set(l,r),nu.observe(l)}function Ks(l){$o.has(l)&&(nu.unobserve(l),$o.delete(l))}function G1(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}),i=()=>{n(),r()};return a.getCurrentScope()&&a.onScopeDispose(i),{observeResize:Ws,unobserveResize:Ks,unobserve:i}}const Y1=a.ref(!1);a.computed(()=>Y1.value);const Gs="__theme_style__",vt="__theme_observer__",Ys=a.reactive(new Map),Js=new Map;a.watch(Ys,()=>{if(!di)return;Js.clear();const l=document.head.querySelector(`#${Gs}`);l&&document.head.removeChild(l);const r=document.createElement("style");let n=`.${vt} { width: 1px }`,i=1;for(const[s,[c,m]]of Ys.entries())n+=` html.${c} .${vt}, .${m} .${vt} { width: ${++i}px }`,Js.set(i,s);r.textContent=n,r.id=Gs,document.head.appendChild(r)});const iu=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 i=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,p=a.ref(i.layout),h=a.ref(),{observeResize:y,unobserveResize:u}=G1(),w=K6();w.on("resizeEvent",D),w.on("dragEvent",V),a.onBeforeMount(()=>{s("layout-before-mount",p.value)}),a.onMounted(()=>{s("layout-mounted",p.value),a.nextTick(()=>{n1(p.value),c.originalLayout=p.value,a.nextTick(()=>{R(),h.value&&y(h.value,G6(C,16)),Si(p.value,i.verticalCompact),s("layout-updated",p.value),j(),C()})})}),a.onBeforeUnmount(()=>{w.clearAll(),h.value&&u(h.value)});function D(ie,Se,te,Z,fe,ae){g(ie,Se,te,Z,fe,ae)}function V(ie,Se,te,Z,fe,ae){k(ie,Se,te,Z,fe,ae)}a.watch(()=>c.width,(ie,Se)=>{a.nextTick(()=>{w.emit("updateWidth",ie),Se===-1&&a.nextTick(()=>{s("layout-ready",p.value)}),j()})}),a.watch(()=>[i.layout,i.layout.length],()=>{p.value=i.layout,O()}),a.watch(()=>i.colNum,ie=>{w.emit("setColNum",ie)}),a.watch(()=>i.rowHeight,ie=>{w.emit("setRowHeight",ie)}),a.watch(()=>i.isDraggable,ie=>{w.emit("setDraggable",ie)}),a.watch(()=>i.isResizable,ie=>{w.emit("setResizable",ie)}),a.watch(()=>i.isBounded,ie=>{w.emit("setBounded",ie)}),a.watch(()=>i.transformScale,ie=>{w.emit("setTransformScale",ie)}),a.watch(()=>i.responsive,ie=>{ie||(s("update:layout",c.originalLayout),w.emit("setColNum",i.colNum)),C()}),a.watch(()=>i.maxRows,ie=>{w.emit("setMaxRows",ie)}),a.watch([()=>i.margin,()=>i.margin[1]],j),a.provide(Hc,a.reactive({...a.toRefs(i),...a.toRefs(c),increaseItem:E,decreaseItem:Y})),a.provide(Uc,w),r({state:c,getItem:M,resizeEvent:g,dragEvent:k,layoutUpdate:O});function E(ie){m.set(ie.i,ie)}function Y(ie){m.delete(ie.i)}function M(ie){return m.get(ie)}function O(){if(!dn(p.value)&&!dn(c.originalLayout)){if(p.value.length!==c.originalLayout.length){const ie=G(p.value,c.originalLayout);if(ie.length>0)if(p.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(ie);else{const Se=new Set(ie.map(te=>te.i));c.originalLayout=c.originalLayout.filter(te=>!Se.has(te.i))}c.lastLayoutLength=p.value.length,R()}Si(p.value,i.verticalCompact),w.emit("updateWidth",c.width),j(),s("layout-updated",p.value)}}function j(){c.mergedStyle={height:S()}}function C(){h.value&&(c.width=h.value.offsetWidth),w.emit("resizeEvent")}function S(){if(!i.autoSize)return;const ie=parseFloat(i.margin[1]);return J6(p.value)*(i.rowHeight+ie)+ie+"px"}let _;function k(ie,Se,te,Z,fe,ae){let se=Ds(p.value,Se);dn(se)&&(se={h:0,w:0,x:0,y:0,i:""}),ie==="dragstart"&&!i.verticalCompact&&(_=p.value.reduce((De,{i:Pe,x:ke,y:B})=>({...De,[Pe]:{x:ke,y:B}}),{})),ie==="dragmove"||ie==="dragstart"?(c.placeholder.i=Se,c.placeholder.x=se.x,c.placeholder.y=se.y,c.placeholder.w=ae,c.placeholder.h=fe,a.nextTick(()=>{c.isDragging=!0}),w.emit("updateWidth",c.width)):a.nextTick(()=>{c.isDragging=!1}),p.value=Ct(p.value,se,te,Z,!0,i.preventCollision),i.restoreOnDrag?(se.static=!0,Si(p.value,i.verticalCompact,_),se.static=!1):Si(p.value,i.verticalCompact),w.emit("compact"),j(),ie==="dragend"&&(_=void 0,s("layout-updated",p.value))}function g(ie,Se,te,Z,fe,ae){let se=Ds(p.value,Se);dn(se)&&(se={h:0,w:0,x:0,y:0,i:""});let De;if(i.preventCollision){const Pe=Wc(p.value,{...se,w:ae,h:fe}).filter(ke=>ke.i!==se.i);if(De=Pe.length>0,De){let ke=1/0,B=1/0;Pe.forEach(q=>{q.x>se.x&&(ke=Math.min(ke,q.x)),q.y>se.y&&(B=Math.min(B,q.y))}),Number.isFinite(ke)&&(se.w=ke-se.x),Number.isFinite(B)&&(se.h=B-se.y)}}De||(se.w=ae,se.h=fe),ie==="resizestart"||ie==="resizemove"?(c.placeholder.i=Se,c.placeholder.x=te,c.placeholder.y=Z,c.placeholder.w=se.w,c.placeholder.h=se.h,a.nextTick(()=>{c.isDragging=!0}),w.emit("updateWidth",c.width)):ie&&a.nextTick(()=>{c.isDragging=!1}),i.responsive&&$(),Si(p.value,i.verticalCompact),w.emit("compact"),j(),ie==="resizeend"&&s("layout-updated",p.value)}function $(){const ie=c1(i.breakpoints,c.width);if(ie===c.lastBreakpoint)return;const Se=Yc(ie,i.cols);!dn(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=Et(p.value));const te=u1(c.originalLayout,c.layouts,i.breakpoints,ie,c.lastBreakpoint,Se,i.verticalCompact);c.layouts[ie]=te,c.lastBreakpoint!==ie&&s("breakpoint-changed",ie,te),p.value=te,s("update:layout",te),c.lastBreakpoint=ie,w.emit("setColNum",Se)}function R(){c.layouts=Object.assign({},i.responsiveLayouts)}function G(ie,Se){const te=new Set(Se.map(se=>se.i)),Z=new Set(ie.map(se=>se.i)),fe=ie.filter(se=>!te.has(se.i)),ae=Se.filter(se=>!Z.has(se.i));return fe.concat(ae)}return(ie,Se)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:a.normalizeStyle(c.mergedStyle)},[ie.$slots.default?a.renderSlot(ie.$slots,"default",{key:0}):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(p.value,te=>(a.openBlock(),a.createBlock(Lo,a.mergeProps({key:te.i,ref_for:!0},te),{default:a.withCtx(()=>[a.renderSlot(ie.$slots,"item",{item:te})]),_:2},1040))),128)),a.withDirectives(a.createVNode(Lo,{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 J1={key:0,class:"item-view-group"},X1={key:0,class:"item-view-group"},Z1=a.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(l,{emit:r}){const n=L.useModelComp(L.pinia),{isEdit:i}=L.storeToRefs(n),s=Qn(L.pinia),c=r,m=l,p=a.ref(""),h=a.computed(()=>m==null?void 0:m.children),y=a.computed(()=>{var j,C,S,_;return((j=m==null?void 0:m.children)==null?void 0:j.length)>0&&((C=m==null?void 0:m.children)!=null&&C.every(k=>k==null?void 0:k.layout))?(_=(S=m==null?void 0:m.children)==null?void 0:S[0])==null?void 0:_.layout:"vertical"}),u=j=>{p.value=j,c("radioChange",j)},w=a.computed(()=>{var j,C;return((C=(j=m==null?void 0:m.children)==null?void 0:j[0])==null?void 0:C.isGridLayout)||!1}),D=a.ref((m==null?void 0:m.level)+1),V=a.computed(()=>{if(!(m!=null&&m.children)||!Array.isArray(m.children)||m.children.length<2)return!1;const j=m.children.some(S=>(S==null?void 0:S.name)==="测量系统配置表"&&(S==null?void 0:S.comp)==="ParentItem"),C=m.children.some(S=>(S==null?void 0:S.name)==="测量系统传递表"&&(S==null?void 0:S.comp)==="ParentItem");return j&&C}),E=a.computed(()=>{var C,S,_,k,g,$;let j=(C=m==null?void 0:m.children)==null?void 0:C.filter(R=>R==null?void 0:R.choice);if(s.setSelectTab((S=j==null?void 0:j[0])==null?void 0:S.choiceName),(p==null?void 0:p.value)!=="")return(_=m==null?void 0:m.children)==null?void 0:_.filter(R=>!(R!=null&&R.choiceName)||(R==null?void 0:R.choiceName)===(p==null?void 0:p.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==null?void 0:m.children)==null?void 0:$.filter(G=>!(G!=null&&G.choiceName)||(G==null?void 0:G.choiceName)===R)}}),Y=j=>{const C=(j==null?void 0:j.menuFilter)||[];return Array.isArray(C)&&(C==null?void 0:C.some(S=>{const _=typeof S=="string"?S:JSON.stringify(S);return _==null?void 0:_.includes("HideGroup=Yes")}))};a.watch(()=>m==null?void 0:m.children,()=>{V.value},{deep:!0});const M=j=>{c("rowClick",j)},O=(j,C)=>{c("routeUrl",j,C)};return(j,C)=>w.value?(a.openBlock(),a.createBlock(a.unref(iu),{key:0,layout:h.value,"onUpdate:layout":C[0]||(C[0]=S=>h.value=S),"is-draggable":a.unref(i)==="edit","is-resizable":a.unref(i)==="edit","col-num":24,margin:[8,16]},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(S,_)=>(a.openBlock(),a.createBlock(a.unref(Lo),{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,$,R,G,ie,Se,te,Z,fe,ae,se,De,Pe;return[a.createElementVNode("div",{style:a.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:_===((k=m==null?void 0:m.children)==null?void 0:k.length)-1?"0px":"24px"})},[(($=(g=S==null?void 0:S.component)==null?void 0:g.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((R=S==null?void 0:S.component)!=null&&R.name)?(a.openBlock(),a.createElementBlock("div",J1,[a.createElementVNode("div",{class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.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(Ki)((ie=S==null?void 0:S.component)==null?void 0:ie.comp)),{pageLayout:y.value,config:{showIndex:(Se=a.unref(cr)[_])==null?void 0:Se.showIndex,allowMove:(te=a.unref(cr)[_])==null?void 0:te.allowMove,viewport:(Z=a.unref(cr)[_])==null?void 0:Z.viewport,status:(fe=a.unref(cr)[_])==null?void 0:fe.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:(se=S==null?void 0:S.component)==null?void 0:se.itemChildData,key:a.unref(Zn),cacheNewData:a.unref(_c),onChange:a.unref(zo),index:(S==null?void 0:S.id)??_,onContentChange:a.unref(Mo),onPageChange:a.unref(Io),parentTableId:(De=S==null?void 0:S.component)==null?void 0:De.tableId,allMapContents:a.unref(wt),children:(Pe=S==null?void 0:S.component)==null?void 0:Pe.children,level:D.value,onRowClick:M,onRouteUrl:O,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(E.value,(S,_)=>{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(_)===((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",X1,[Y(S)?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"12px":"0px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},a.toDisplayString(S.name),5))])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ki)(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(zo),index:(S==null?void 0:S.id)??_,onContentChange:a.unref(Mo),onPageChange:a.unref(Io),parentTableId:S==null?void 0:S.tableId,allMapContents:a.unref(wt),children:S==null?void 0:S.children,level:D.value,onRowClick:M,onRouteUrl:O,onRadioChange:u},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Q1=er._export_sfc(Z1,[["__scopeId","data-v-bafbdd45"]]),ev={class:"radio-group-container"},av=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(),c=Qn(L.pinia),{selectTab:m}=L.storeToRefs(c);a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=m.value},{immediate:!0,deep:!0});const p=h=>{s.value=h,i("radioChange",s.value)};return(h,y)=>(a.openBlock(),a.createElementBlock("div",ev,[a.createVNode(nl.ssRadio,{modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=u=>s.value=u),content:n==null?void 0:n.itemData,onChange:p},null,8,["modelValue","content"])]))}}),lv=er._export_sfc(av,[["__scopeId","data-v-ed48c2f8"]]),ou=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"}]),rv={TABLE:Tc,FORM:ws,STATICFORM:Ac,TABLEOPERATE:G2,TABLESTYLE:dh,TABLEEXTEND:fh,TABLEINTERACTION:mh,FORMOPERATE:_s,FOLD:Wh,CALCULATOR:Zh,METHODBUTTON:a4,AVATARUPLOAD:rs.ssAvatar,SIGNATURE:rs.ssSignature,FORMTOP:ws,STEP:f4,STEPOPERATE:$h,TIMELINE:b4,TIMELINEOPERATE:Hh,FORMTOPOPERATE:_s,SIGNATUREOPERATE:u4,AVATARUPLOADOPERATE:n4,TABS:w4,TABSOPERATE:t6,CHART:x6,CHARTOPERATE:z6,LAYOUT:O6,LAYOUTOPERATE:U6,PARENTITEM:Q1,RADIO:lv};function Ti(l){return rv[l==null?void 0:l.toUpperCase()]||null}exports.De=iu;exports.activeStepInfo=Ei;exports.addContents=Wi;exports.addVisibleDialog=Tt;exports.affixItems=S0;exports.allMapContents=wt;exports.analyzeMenu=rc;exports.cacheNewData=_c;exports.clickMainKey=Cc;exports.clickSavePage=_0;exports.clickStep=Nc;exports.clickTrigger=Ec;exports.compId=Zn;exports.compNames=Sc;exports.compShow=Bi;exports.existLayouts=z0;exports.fixChangeValue=Nt;exports.generateLayouts=th;exports.getComponent=Ti;exports.getComponents=Ki;exports.getPageConstruct=Jd;exports.getPageData=Kr;exports.getSliceContLength=R0;exports.gridRowHeight=lh;exports.gridRowHeightHmPg=ah;exports.isStepLayout=Bc;exports.onBack=x0;exports.onButtonChange=N0;exports.onChange=zo;exports.onClick=w0;exports.onClickStep=M0;exports.onContentChange=Mo;exports.onExtendTaskEnd=A0;exports.onOk=B0;exports.onPageBack=O0;exports.onPageChange=Io;exports.onSelectFixContent=k0;exports.renderShowItems=xc;exports.showItems=cr;exports.sliceTableLength=wc;exports.slotContent=ou;exports.ssTable=Tc;exports.st=Lo;exports.stepItems=V0;exports.tabChange=I0;exports.toolBar=T0;exports.useFormComp=Bt;exports.useModelLoader=_f;exports.verifyButton=L0;