ss-component-new 1.3.421 → 1.3.424

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 (84) hide show
  1. package/dist/{MTLLoader-BJ1r0nij.cjs → MTLLoader-C1qSZuWT.cjs} +1 -1
  2. package/dist/{MTLLoader-1LCfWDIN.js → MTLLoader-DBXJU4gy.js} +1 -1
  3. package/dist/{OrbitControls-BI1MijP-.cjs → OrbitControls-BFwyCnTH.cjs} +1 -1
  4. package/dist/{OrbitControls-DmwRVj4H.js → OrbitControls-BK6rha_f.js} +1 -1
  5. package/dist/{URDFLoader-zXHnUuDb.js → URDFLoader-B4rOIDHb.js} +2 -2
  6. package/dist/{URDFLoader-DbITJ-FE.cjs → URDFLoader-CTaB1j6-.cjs} +1 -1
  7. package/dist/{animationData-CxG7Qmzl.js → animationData-Bfdz_yNt.js} +2 -2
  8. package/dist/{animationData-CNXbKt_k.cjs → animationData-DugoMERO.cjs} +1 -1
  9. package/dist/{array-Ctuf3DOG.js → array-BPirA4Cc.js} +5 -5
  10. package/dist/{array-DwjaSl70.cjs → array-D4Rx9WHR.cjs} +1 -1
  11. package/dist/{iconfont-ZM4Mv0Mj.cjs → iconfont-B8J8hnDJ.cjs} +1 -1
  12. package/dist/{iconfont-B7bT4X1w.js → iconfont-C4b-8B6C.js} +2 -2
  13. package/dist/{index-DN1FQ4lC.cjs → index-A9g99oCn.cjs} +1 -1
  14. package/dist/{index-Cmw1O7M3.cjs → index-B3D67GZq.cjs} +1 -1
  15. package/dist/{index-B3JW2M3W.cjs → index-B8RqhWoJ.cjs} +1 -1
  16. package/dist/{index-CxEgTjYQ.js → index-BB-4fswu.js} +1 -1
  17. package/dist/{index-mJFCoPsK.js → index-BK6-AVLE.js} +1 -1
  18. package/dist/{index-BfETnuY2.cjs → index-BMAjqhNr.cjs} +13 -13
  19. package/dist/{index-D2iC0RdT.js → index-BWtc895B.js} +81 -75
  20. package/dist/{index-reJmxzkK.cjs → index-Bn4g3hXz.cjs} +20 -20
  21. package/dist/{index-Bo8c-hpl.js → index-BnIQk5T3.js} +1 -1
  22. package/dist/{index-D9T-hj7J.js → index-BosTIy2F.js} +2 -2
  23. package/dist/{index-fGwDUF0a.cjs → index-Bu5lDLj_.cjs} +1 -1
  24. package/dist/{index-BOB41C4i.js → index-BzTL89_A.js} +7 -7
  25. package/dist/{index-DpNuo8iO.cjs → index-C1jFiukZ.cjs} +1 -1
  26. package/dist/index-C5Pf4k8t.cjs +2 -0
  27. package/dist/{index-Bd9GpNbZ.cjs → index-C772JVG0.cjs} +1 -1
  28. package/dist/{index-tdECjK2J.js → index-C9aMOwfq.js} +5 -5
  29. package/dist/{index-XaM10GFH.js → index-CPLGtgqY.js} +2161 -2158
  30. package/dist/{index-MPNdMwkX.cjs → index-CVWmCMHh.cjs} +1 -1
  31. package/dist/{index-BGOXytSm.js → index-CdsqSTRI.js} +1 -1
  32. package/dist/{index-C2UiLe43.js → index-ChNfRlIP.js} +6 -6
  33. package/dist/{index-CrXDGlUY.js → index-CjSJE_W_.js} +3 -3
  34. package/dist/{index-Bo4dSR3m.cjs → index-CnsDmHXo.cjs} +1 -1
  35. package/dist/{index-DshXKN2f.js → index-D38qJHp0.js} +1 -1
  36. package/dist/{index-CItyXwKR.js → index-DJsef_j_.js} +4 -4
  37. package/dist/index-DKh4EyHV.cjs +1 -0
  38. package/dist/{index-Cdsro90y.cjs → index-DOcUitv0.cjs} +1 -1
  39. package/dist/{index-BNQrzEfh.js → index-DOhwoePd.js} +1167 -1166
  40. package/dist/{index-KUIk6_-7.cjs → index-DPYpdz4-.cjs} +1 -1
  41. package/dist/{index-BxwNVYrj.js → index-DPooN16T.js} +1 -1
  42. package/dist/{index-4VkWVb4x.js → index-DX6ztcs4.js} +1 -1
  43. package/dist/{index-F7ilz1xi.cjs → index-D_zk9En4.cjs} +1 -1
  44. package/dist/{index-zpFkli-r.cjs → index-DaiB_qqV.cjs} +1 -1
  45. package/dist/{index-D3Ik6E9u.cjs → index-DgpEgbFi.cjs} +1 -1
  46. package/dist/{index-C9cUuEAp.cjs → index-DhD0tnVr.cjs} +1 -1
  47. package/dist/{index-BVFUG_jG.js → index-DlXwTcJ9.js} +1 -1
  48. package/dist/index-GSbBamu4.js +23403 -0
  49. package/dist/{index-DcuqAO7V.js → index-L3ZBKT8o.js} +3 -3
  50. package/dist/{index-ND4SQdF3.js → index-TDwSq2BF.js} +1 -1
  51. package/dist/{index-Bsq8-oqc.cjs → index-eE62vN8n.cjs} +1 -1
  52. package/dist/{index-BdndCl1P.js → index-ss_5hS2p.js} +1 -1
  53. package/dist/{index-DloRcfY8.cjs → index-wnEIPRYs.cjs} +1 -1
  54. package/dist/index-zg0q697-.cjs +26 -0
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DMzXQmLy.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Bk-thOPD.cjs} +1 -1
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BhSYtqu1.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-EOt2_XRY.js} +1 -1
  57. package/dist/{main-D6vPtVzF.cjs → main-CE-zxQmp.cjs} +1 -1
  58. package/dist/{main-B_egGqbG.js → main-DPoBb_O1.js} +3 -3
  59. package/dist/ss-component.cjs +1 -1
  60. package/dist/ss-component.css +2 -2
  61. package/dist/ss-component.js +10 -10
  62. package/dist/ss-component2.cjs +1 -1
  63. package/dist/ss-component2.js +10 -10
  64. package/dist/{threeModel-Cjo7-QZS.cjs → threeModel-CiR7lpoR.cjs} +1 -1
  65. package/dist/{threeModel-BSyYeQZu.js → threeModel-Cj67vfAN.js} +5 -5
  66. package/dist/{threePreview-vl6uhbHM.cjs → threePreview-CbKggw3I.cjs} +1 -1
  67. package/dist/{threePreview-C6KQqoXZ.js → threePreview-GizvH53S.js} +3 -3
  68. package/dist/{threeSceneView-BSdMrsfM.js → threeSceneView-2wRxUPkw.js} +10 -10
  69. package/dist/{threeSceneView-DmFm6Q-S.cjs → threeSceneView-DWuPWq3V.cjs} +1 -1
  70. package/dist/{threeSceneViewForCPMPIP-CQP66XwY.cjs → threeSceneViewForCPMPIP-BzbKluFb.cjs} +1 -1
  71. package/dist/{threeSceneViewForCPMPIP-Da0YmvCt.js → threeSceneViewForCPMPIP-DxkeanTl.js} +7 -7
  72. package/dist/{threeTrackPathView-BvmhaG0W.js → threeTrackPathView-DSHB2LWA.js} +3 -3
  73. package/dist/{threeTrackPathView-BjwtoU5M.cjs → threeTrackPathView-ZqSjOtFS.cjs} +1 -1
  74. package/dist/{threeViewerHost-BKNIqrfT.js → threeViewerHost-BAksiU_r.js} +2 -2
  75. package/dist/{threeViewerHost-lhCLFuMH.cjs → threeViewerHost-Bi3OIwqG.cjs} +1 -1
  76. package/dist/{urdfTree-CUyckHTO.js → urdfTree-DEWAJ5kl.js} +27 -27
  77. package/dist/{urdfTree-DD12pYQE.cjs → urdfTree-DnkBJIj6.cjs} +1 -1
  78. package/dist/{workpieceTreePanel-mmroz89S.cjs → workpieceTreePanel-DzpjPYZ9.cjs} +1 -1
  79. package/dist/{workpieceTreePanel-BLUYvcFc.js → workpieceTreePanel-XOSlhouq.js} +4 -4
  80. package/package.json +1 -1
  81. package/dist/index-2VatFDli.js +0 -23246
  82. package/dist/index-DE_58kwC.cjs +0 -26
  83. package/dist/index-DwSzah5b.cjs +0 -2
  84. package/dist/index-RoXicHV9.cjs +0 -1
@@ -0,0 +1,26 @@
1
+ "use strict";var Iu=Object.defineProperty;var Ou=(a,l,n)=>l in a?Iu(a,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[l]=n;var sn=(a,l,n)=>Ou(a,typeof l!="symbol"?l+"":l,n);const e=require("vue"),Ja=require("./request-Dl8yi2iS.cjs"),M=require("./index-ClvA5-wg.cjs"),dl=require("./index-BMAjqhNr.cjs"),te=require("./index-Bn4g3hXz.cjs"),ir=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Vl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Bk-thOPD.cjs"),Mr=require("./index-BOkUwKV5.cjs"),No=require("./threeViewerHost-Bi3OIwqG.cjs"),Fr=require("./index-DmwxzDGW.cjs"),ts=require("./index-B8RqhWoJ.cjs"),ec=require("./index-DhD0tnVr.cjs");;/* empty css */const Ao=require("./isString-CGrvcmBw.cjs"),ss=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),ac=require("./index-BVaHwt5f.cjs"),Lu=require("./index-CnsDmHXo.cjs"),Vn=require("./MTLLoader-C1qSZuWT.cjs"),Ru=require("./URDFLoader-CTaB1j6-.cjs");var $u="[object Boolean]";function lc(a){return a===!0||a===!1||Ja.isObjectLike(a)&&Ja.baseGetTag(a)==$u}function Vu(a){return a===void 0}const Fu=a=>a.match(/\((.*)\)/)[1],Pu={__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(a){const l=a,n=e.ref(null),r=e.ref(!1),i=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{r.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>i.value,()=>{e.nextTick(()=>{var s,h;(h=(s=n.value)==null?void 0:s.updatePopper)==null||h.call(s)})},{deep:!0,immediate:!0}),(s,h)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:r.value,"onUpdate:visible":h[0]||(h[0]=d=>r.value=d),trigger:l.trigger,title:l==null?void 0:l.title,placement:l==null?void 0:l.placement,width:l==null?void 0:l.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:i})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},ju=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,n=e.computed(()=>{var d,m,g,u,C,I;const r=l.value??"";let i=(d=l==null?void 0:l.columnContent)==null?void 0:d.filter;if(i=(m=te.analyzeSplitToContent(i,","))==null?void 0:m.map(k=>((k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),k)),i=i==null?void 0:i.find(k=>(k==null?void 0:k[0])==="("),(i==null?void 0:i[0])==="("&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=i==null?void 0:i.split("||"),!i)return{backgroundColor:void 0,color:void 0};let s=(u=(g=l==null?void 0:l.columnContent)==null?void 0:g.options)==null?void 0:u.findIndex(k=>(k==null?void 0:k.value)===r);s=i==null?void 0:i[s],s=te.analyzeSplitToContent(s,","),s=s==null?void 0:s.map(k=>((k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),k));let h=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextBackRGBA"));h?h=te.rgbaToColor((C=h==null?void 0:h.split("="))==null?void 0:C[1]):h=void 0;let c=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextRGBA"));return c?c=te.rgbaToColor((I=c==null?void 0:c.split("="))==null?void 0:I[1]):c=void 0,{backgroundColor:h,color:c}});return(r,i)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(n.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),Hu=ir._export_sfc(ju,[["__scopeId","data-v-3290070b"]]);function Uu(a,l,n,r={}){if(!a||!l||!n||n.length!==4)return;const i=a.getContext("2d");if(!i)return;const{color:s="rgba(255, 235, 59, 0.3)",strokeWidth:h=2,fillOpacity:c=.2}=r,d=a.getBoundingClientRect(),m=l.getBoundingClientRect(),g=l.naturalWidth,u=l.naturalHeight,C=m.width/g,I=m.height/u,k=Math.min(C,I),G=g*k,z=u*k,j=(d.width-G)/2,L=(d.height-z)/2,_=n.map(([w,b])=>{const E=j+w*G,F=L+b*z;return{x:E,y:F}});i.clearRect(0,0,a.width,a.height),i.beginPath(),i.moveTo(_[0].x,_[0].y);for(let w=1;w<_.length;w++)i.lineTo(_[w].x,_[w].y);i.closePath();const x=s.replace(/[\d.]+\)$/,`${c})`);i.fillStyle=x,i.fill(),i.strokeStyle=s.replace(/[\d.]+\)$/,"1)"),i.lineWidth=h,i.stroke()}function Ci(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function cs(a,l){if(!a||!l)return null;const n=a[l];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const qu={key:0,class:"ocr-img-preview-root"},Wu={class:"ocr-img-preview-window"},Ku={key:0,class:"img-preview-body"},Gu={class:"img-preview-header"},Yu={class:"img-header-left"},Ju={class:"img-name"},Xu={key:0,class:"img-header-right"},Zu={class:"img-index"},Qu={key:0,class:"img-thumb-list"},ed=["onClick"],ad={key:1,class:"thumb-placeholder"},ld={class:"thumb-name"},rd={class:"img-preview-container"},nd={key:0,class:"img-placeholder"},id={key:2,class:"img-placeholder"},od={key:0},td={key:1},sd={key:1,class:"img-placeholder"},cd=e.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(a,{emit:l}){const n=a,r=l,i=e.computed({get:()=>n.visible,set:B=>r("update:visible",B)});let s=!1,h="",c=0,d=0,m=0,g=0,u=0,C=0,I=null;const k=B=>{var U,be;const se=(be=(U=B==null?void 0:B.target)==null?void 0:U.closest)==null?void 0:be.call(U,".ocr-img-preview-window");return se||document.querySelector(".ocr-img-preview-window")},G=B=>{if(!B||B==="none")return{tx:0,ty:0};let se=B.match(/matrix\(([^)]+)\)/);if(se){const U=se[1].split(",").map(be=>Number(be.trim()));return{tx:(U==null?void 0:U[4])||0,ty:(U==null?void 0:U[5])||0}}if(se=B.match(/matrix3d\(([^)]+)\)/),se){const U=se[1].split(",").map(be=>Number(be.trim()));return{tx:(U==null?void 0:U[12])||0,ty:(U==null?void 0:U[13])||0}}return se=B.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),se?{tx:Number(se[1])||0,ty:Number(se[2])||0}:{tx:0,ty:0}},z=(B,se,U)=>{B.style.transform=`translate(${se}px, ${U}px)`},j=B=>{const se=k(B);if(!se)return;s=!0,I=se,h="move",c=B.clientX,d=B.clientY;const U=window.getComputedStyle(se),{tx:be,ty:Me}=G(U.transform);u=be,C=Me,document.addEventListener("mousemove",_),document.addEventListener("mouseup",x)},L=(B,se)=>{const U=k(B);if(!U)return;s=!0,I=U,h=se,c=B.clientX,d=B.clientY;const be=U.getBoundingClientRect();m=be.width,g=be.height;const Me=window.getComputedStyle(U),{tx:Ve,ty:aa}=G(Me.transform);u=Ve,C=aa,document.addEventListener("mousemove",_),document.addEventListener("mouseup",x)},_=B=>{if(!s||!I)return;const se=B.clientX-c,U=B.clientY-d,be=360,Me=420;let Ve=m,aa=g,Ea=u,ne=C;if(h==="move"){Ea=u+se,ne=C+U,z(I,Ea,ne);return}if(h.includes("right")&&(Ve=Math.max(be,m+se)),h.includes("bottom")&&(aa=Math.max(Me,g+U)),h.includes("left")){const ta=m-se;ta<be?(Ve=be,Ea=u+(m-be)):(Ve=ta,Ea=u+se)}if(h.includes("top")){const ta=g-U;ta<Me?(aa=Me,ne=C+(g-Me)):(aa=ta,ne=C+U)}I.style.width=`${Ve}px`,I.style.height=`${aa}px`,z(I,Ea,ne)},x=()=>{s=!1,h="",I=null,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",x)},w=e.ref([]),b=e.ref(!1);e.watch(()=>n.images,async B=>{if(!Array.isArray(B)||B.length===0){w.value=[];return}b.value=!0;const se=[];for(const U of B)if(U.url&&!U.url.startsWith("blob:")&&!U.url.startsWith("http"))try{const be=await Vl.downloadFile(U.url),Me=URL.createObjectURL(be);se.push({...U,blobUrl:Me})}catch(be){console.error(`Failed to load image for preview: ${U.url}`,be),se.push({...U,blobUrl:""})}else se.push({...U,blobUrl:U.url});w.value=se,b.value=!1},{deep:!0,immediate:!0});const E=e.ref(0),F=e.ref(null),$=e.ref(null),le=e.computed(()=>w.value[E.value]||null),Q=()=>{if(!w.value.length){E.value=0;return}if(n.defaultImageName){const B=w.value.findIndex(se=>(se==null?void 0:se.name)===n.defaultImageName);E.value=B>=0?B:0}else E.value=0},me=B=>{if(!w.value.length)return;const se=Math.max(0,Math.min(B,w.value.length-1));E.value=se},de=()=>me(E.value-1),A=()=>me(E.value+1),ee=B=>{if(!B)return;const se=w.value.findIndex(U=>(U==null?void 0:U.name)===B);se>=0&&(E.value=se)},X=()=>{if(!$.value)return;const B=$.value.parentElement;if(!B)return;const se=B.getBoundingClientRect();$.value.width=se.width,$.value.height=se.height},re=()=>{var be,Me;if(!$.value||!F.value||!n.focusedFieldName){$.value&&Ci($.value);return}const B=(be=F.value.$el)==null?void 0:be.querySelector("img");if(!B)return;if(!B.complete||B.naturalWidth===0){B.onload=()=>{e.nextTick(()=>{re()})};return}const se=((Me=le.value)==null?void 0:Me.name)||"",U=cs(n.fieldMeta,n.focusedFieldName);if(!U){Ci($.value);return}if(U.imageName!==se){Ci($.value);return}X(),Uu($.value,B,U.bboxNorm)},fe=()=>{e.nextTick(()=>{X(),re()})};e.watch(()=>n.focusedFieldName,()=>{if(!i.value)return;const B=cs(n.fieldMeta,n.focusedFieldName);B!=null&&B.imageName&&ee(B.imageName),e.nextTick(()=>{re()})}),e.watch(()=>{var B;return(B=le.value)==null?void 0:B.name},()=>{i.value&&e.nextTick(()=>{$.value&&Ci($.value),re()})}),e.watch(()=>n.visible,B=>{B?(Q(),e.nextTick(()=>{X(),re()})):$.value&&Ci($.value)}),e.watch(()=>n.defaultImageName,()=>{i.value&&Q()});let $e=null;e.onMounted(()=>{var B;typeof ResizeObserver<"u"&&($e=new ResizeObserver(()=>{X(),e.nextTick(()=>{re()})}),(B=$.value)!=null&&B.parentElement&&$e.observe($.value.parentElement))}),e.onUnmounted(()=>{$e&&($e.disconnect(),$e=null),document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",x)});const ue=()=>{$.value&&Ci($.value),r("update:visible",!1),r("close")};return(B,se)=>{var aa,Ea;const U=e.resolveComponent("el-button"),be=e.resolveComponent("el-image"),Me=e.resolveComponent("Loading"),Ve=e.resolveComponent("el-icon");return i.value?(e.openBlock(),e.createElementBlock("div",qu,[se[12]||(se[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",Wu,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(j,["stop"])},[se[8]||(se[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ue},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:se[0]||(se[0]=e.withModifiers(ne=>L(ne,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:se[1]||(se[1]=e.withModifiers(ne=>L(ne,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:se[2]||(se[2]=e.withModifiers(ne=>L(ne,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:se[3]||(se[3]=e.withModifiers(ne=>L(ne,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:se[4]||(se[4]=e.withModifiers(ne=>L(ne,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:se[5]||(se[5]=e.withModifiers(ne=>L(ne,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:se[6]||(se[6]=e.withModifiers(ne=>L(ne,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:se[7]||(se[7]=e.withModifiers(ne=>L(ne,"bottom-right"),["stop"]))},null,32),le.value?(e.openBlock(),e.createElementBlock("div",Ku,[e.createElementVNode("div",Gu,[e.createElementVNode("div",Yu,[e.createElementVNode("span",Ju,e.toDisplayString(le.value.name?le.value.name+(le.value.url&&le.value.url.lastIndexOf(".")!==-1?le.value.url.substring(le.value.url.lastIndexOf(".")):""):""),1)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Xu,[e.createVNode(U,{size:"small",disabled:E.value===0,onClick:de},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",Zu,e.toDisplayString(E.value+1)+" / "+e.toDisplayString(w.value.length),1),e.createVNode(U,{size:"small",disabled:E.value===w.value.length-1,onClick:A},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Qu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ne,ta)=>(e.openBlock(),e.createElementBlock("div",{key:(ne.name||"")+"-"+ta,class:e.normalizeClass(["img-thumb-item",{active:ta===E.value}]),onClick:ce=>me(ta)},[ne!=null&&ne.blobUrl?(e.openBlock(),e.createBlock(be,{key:0,src:ne.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ne.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",ad,"加载失败")),e.createElementVNode("div",ld,e.toDisplayString(ne.name||"-"),1)],10,ed))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",rd,[b.value?(e.openBlock(),e.createElementBlock("div",nd,[e.createVNode(Ve,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Me)]),_:1}),se[11]||(se[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(aa=le.value)!=null&&aa.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(be,{ref_key:"imageRef",ref:F,src:le.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[le.value.blobUrl],onLoad:fe},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:$,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",id,[(Ea=le.value)!=null&&Ea.url?(e.openBlock(),e.createElementBlock("span",od,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",td,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",sd,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),ud=ir._export_sfc(cd,[["__scopeId","data-v-48a4ecb1"]]),dd={class:"cert-preview-body"},pd={key:0,class:"pdf-preview-container"},fd={class:"thumbs"},hd=["onClick"],vd={class:"thumb-img"},md=["src"],yd={key:1,class:"thumb-loading"},gd={class:"thumb-title"},bd={class:"viewer"},kd={key:0,class:"viewer-img-wrap"},xd=["src"],wd={key:1,class:"viewer-loading"},_d=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(""),s=e.ref(""),h=e.computed(()=>(n.versions||[]).find(k=>String(k.versionId)===String(i.value))),c=e.ref({}),d=e.ref(""),m=e.ref("证书附件.pdf"),g=()=>{try{Object.values(c.value||{}).forEach(k=>{k&&URL.revokeObjectURL(k)}),d.value&&URL.revokeObjectURL(d.value)}catch{}c.value={},d.value=""},u=async k=>{if(!k||k.fileType==="pdf")return;const G=Array.isArray(k.images)?k.images:[];for(const z of G){const j=z==null?void 0:z.url;if(!(!j||c.value[j]))try{const L=await M.platformDownloadFile({url:j}),_=URL.createObjectURL(L.data);c.value={...c.value,[j]:_}}catch{}}},C=async k=>{var z;if(!k||k.fileType!=="pdf"){d.value="";return}const G=k.sourceUrl||"";if(!G){d.value="";return}if(d.value){try{URL.revokeObjectURL(d.value)}catch{}d.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:G,versionId:k==null?void 0:k.versionId,certNo:k==null?void 0:k.certNo});const j=await M.platformDownloadFile({url:G});console.log("[CertificatePreview] PDF响应:",{url:G,status:j==null?void 0:j.status,size:(z=j==null?void 0:j.data)==null?void 0:z.size});const L=URL.createObjectURL(j.data);d.value=L;const _=k.certNo?String(k.certNo):"";m.value=_?`${_}.pdf`:"证书附件.pdf"}catch(j){console.error("[CertificatePreview] PDF加载失败:",{url:G,error:j}),d.value=""}};e.watch(()=>n.visible,async k=>{var z;if(!k){g();return}const G=(z=n.versions)==null?void 0:z[0];i.value=(G==null?void 0:G.versionId)||"",await u(G),await C(G)},{immediate:!0}),e.watch(()=>i.value,async()=>{var G,z;const k=h.value;if(!k){s.value="",d.value="";return}if(k.fileType==="pdf"){s.value="",await C(k);return}d.value="",s.value=((z=(G=k.images)==null?void 0:G[0])==null?void 0:z.url)||"",await u(k)},{immediate:!0});const I=()=>{r("update:visible",!1),g()};return e.onBeforeUnmount(()=>{g()}),(k,G)=>{const z=e.resolveComponent("el-empty"),j=e.resolveComponent("el-tab-pane"),L=e.resolveComponent("el-tabs"),_=e.resolveComponent("el-button"),x=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(x,{"model-value":k.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:I},{footer:e.withCtx(()=>[e.createVNode(_,{id:"themeBorderButton",onClick:I},{default:e.withCtx(()=>G[1]||(G[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[k.versions&&k.versions.length>0?(e.openBlock(),e.createBlock(L,{key:0,modelValue:i.value,"onUpdate:modelValue":G[0]||(G[0]=w=>i.value=w),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.versions,w=>(e.openBlock(),e.createBlock(j,{key:w.versionId,name:w.versionId,label:w.label},{default:e.withCtx(()=>[e.createElementVNode("div",dd,[w.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",pd,[d.value?(e.openBlock(),e.createBlock(dl.SsFilePreview,{key:1,fileName:m.value,blobUrl:d.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(z,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",fd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.images||[],b=>(e.openBlock(),e.createElementBlock("div",{key:b.url,class:e.normalizeClass(["thumb",{active:b.url===s.value}]),onClick:E=>s.value=b.url},[e.createElementVNode("div",vd,[c.value[b.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[b.url]},null,8,md)):(e.openBlock(),e.createElementBlock("div",yd,"加载中"))]),e.createElementVNode("div",gd,e.toDisplayString(b.name),1)],10,hd))),128))]),e.createElementVNode("div",bd,[s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[s.value]?(e.openBlock(),e.createElementBlock("div",kd,[e.createElementVNode("img",{class:"viewer-img",src:c.value[s.value]},null,8,xd)])):(e.openBlock(),e.createElementBlock("div",wd,"加载中"))],64)):(e.openBlock(),e.createBlock(z,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(z,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),Sd=ir._export_sfc(_d,[["__scopeId","data-v-220703c0"]]),Ed={class:"ocr-candidate-wrap"},Cd={class:"ocr-candidate-left"},Dd={key:1},Td={key:0},Bd={key:1},Nd={key:2},Ad={key:3},zd={key:0,class:"ocr-candidate-right"},Md={class:"ocr-candidate-actions"},Id={key:1},Od={class:"dialog-footer"},Ld={__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(a,{emit:l}){const n=(E=[])=>{const F=[],$=le=>{(le||[]).forEach(Q=>{if(!Q)return;const me=Q.children||Q.childrens||Q.columns;Array.isArray(me)&&me.length>0?$(me):F.push(Q)})};return $(E),F},r=a,i=l,s=e.computed(()=>{var E;return((E=C.value)==null?void 0:E.allowAdd)!==!1}),h=e.computed(()=>{var E;return((E=C.value)==null?void 0:E.allowReplace)!==!1}),c=E=>{if(!E)return[];if(Array.isArray(E))return E;if(typeof E=="string")try{const F=JSON.parse(E);return Array.isArray(F)?F:[]}catch{return[]}return[]},d=E=>{i("preview-file",E)},m=e.ref([]),g=e.ref(0),u=e.ref("");e.watch(()=>r.candidates,E=>{var F,$;m.value=(E||[]).map(le=>({...le,...(le==null?void 0:le.ocrRow)||{},selectedTargetId:(le==null?void 0:le.selectedTargetId)||"",__decision:le==null?void 0:le.__decision})),g.value=0,u.value=(($=(F=m.value)==null?void 0:F[0])==null?void 0:$.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>r.visible,E=>{var F,$;E&&(g.value=0,u.value=(($=(F=m.value)==null?void 0:F[0])==null?void 0:$.selectedTargetId)||"")});const C=e.computed(()=>{var F;const E=Number(g.value||0);return((F=m.value||[])==null?void 0:F[E])||null}),I=e.computed(()=>(n(r.columns||[])||[]).filter($=>$&&$.prop).filter($=>$.type!=="operate"&&$.label!=="操作"&&$.prop!=="operate")),k=e.computed(()=>I.value.filter(E=>E.label!=="证书附件"&&E.prop!=="证书附件")),G=E=>{if(!E)return;const F=(m.value||[]).findIndex($=>($==null?void 0:$.idx)===(E==null?void 0:E.idx));F>-1&&(g.value=F,u.value=(E==null?void 0:E.selectedTargetId)||"")},z=E=>{if(!E){u.value="";return}u.value=String((E==null?void 0:E.id)??"")},j=(E,F="")=>{const $=Number(g.value||0),le=m.value||[],Q=le[$];Q&&(Q.__decision=E,Q.selectedTargetId=F,u.value=F,m.value=[...le])},L=()=>j("skip",""),_=()=>j("add",""),x=()=>{if(!u.value){Ja.ElMessage.warning("请先选择要替换的目标记录");return}j("replace",u.value)},w=()=>{i("update:visible",!1)},b=()=>{const E=m.value||[];if(E.find($=>($==null?void 0:$.__decision)==="replace"&&!($!=null&&$.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}i("submit",E),i("update:visible",!1)};return(E,F)=>{const $=e.resolveComponent("el-table-column"),le=e.resolveComponent("svg-icon"),Q=e.resolveComponent("el-table"),me=e.resolveComponent("el-button"),de=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(Mr.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:w},{default:e.withCtx(()=>{var A,ee;return[e.createElementVNode("div",Ed,[e.createElementVNode("div",Cd,[F[0]||(F[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(Q,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:G},{default:e.withCtx(()=>[e.createVNode($,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,X=>(e.openBlock(),e.createBlock($,{key:X.prop,label:X.label,prop:X.prop,"min-width":X.minWidth||160},{default:e.withCtx(({row:re})=>[X.label==="证书附件"||X.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(re==null?void 0:re[X.prop]).length>0?(e.openBlock(),e.createBlock(le,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(fe=>d({row:re,prop:X.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Dd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((re==null?void 0:re[X.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode($,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:X})=>[e.createTextVNode(e.toDisplayString(((X==null?void 0:X.candidates)||[]).length),1)]),_:1}),e.createVNode($,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:X})=>[(X==null?void 0:X.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Td,"替换")):(X==null?void 0:X.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Bd,"新增")):(X==null?void 0:X.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Nd,"跳过")):(e.openBlock(),e.createElementBlock("span",Ad,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",zd,[F[4]||(F[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Md,[e.createVNode(me,{id:"themeBorderButton",onClick:L},{default:e.withCtx(()=>F[1]||(F[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(me,{id:"themeBorderButton",onClick:_,disabled:!s.value},{default:e.withCtx(()=>F[2]||(F[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(me,{class:"ok-button",id:"themeButton",onClick:x,disabled:!h.value||!u.value},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((A=C.value)==null?void 0:A.candidates)||[]).length===0?(e.openBlock(),e.createBlock(de,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(Q,{data:((ee=C.value)==null?void 0:ee.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:z,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode($,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,X=>(e.openBlock(),e.createBlock($,{key:X.prop,label:X.label,prop:X.prop,"min-width":X.minWidth||160},{default:e.withCtx(({row:re})=>[X.label==="证书附件"||X.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(re==null?void 0:re[X.prop]).length>0?(e.openBlock(),e.createBlock(le,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(fe=>d({row:re,prop:X.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Id,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((re==null?void 0:re[X.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",Od,[e.createVNode(me,{id:"themeBorderButton",onClick:w},{default:e.withCtx(()=>F[5]||(F[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(me,{class:"ok-button",id:"themeButton",onClick:b},{default:e.withCtx(()=>F[6]||(F[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Rd=ir._export_sfc(Ld,[["__scopeId","data-v-89e0489c"]]),$d={class:"ocr-preview-content"},Vd={class:"ocr-preview-tip"},Fd={class:"ocr-preview-table"},Pd={style:{display:"flex","align-items":"center",gap:"8px"}},jd={class:"dialog-footer"},Hd={__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(a,{emit:l}){const n=a,r=l,i=e.ref([]),s=e.ref([]),h=e.ref([]);e.watch(()=>n.visible,I=>{I&&(i.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),s.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),h.value=[...n.ocrSelectedFields])});const c=(I,k)=>{const G=[...h.value];if(k)G.includes(I)||G.push(I);else{const z=G.indexOf(I);z>-1&&G.splice(z,1)}h.value=G,r("update:ocrSelectedFields",G)},d=(I,k,G)=>{r("fieldChange",{rowIndex:I,prop:k,value:G})},m=()=>{r("update:ocrPreviewData",i.value),r("confirm",i.value),r("update:visible",!1)},g=()=>{r("update:visible",!1)},u=I=>typeof I!="number"?"-":`${(I*100).toFixed(1)}%`,C=I=>typeof I!="number"?"#606266":I>=.9?"#67c23a":I>=.7?"#e6a23c":"#f56c6c";return(I,k)=>{const G=e.resolveComponent("el-alert"),z=e.resolveComponent("el-table-column"),j=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-input"),_=e.resolveComponent("el-table"),x=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Mr.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:g,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",$d,[e.createElementVNode("div",Vd,[e.createVNode(G,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Fd,[e.createVNode(_,{data:i.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(z,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createBlock(z,{key:w.prop,prop:w.prop,"min-width":w.minWidth||230,"class-name":w.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",Pd,[w.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j,{key:0,"model-value":h.value.includes(w.prop),onChange:b=>c(w.prop,b),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(w.label),1)])]),default:e.withCtx(({row:b,$index:E})=>[w.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:C(b[w.prop]),fontWeight:500})},e.toDisplayString(u(b[w.prop])),5)):(e.openBlock(),e.createBlock(L,{key:1,modelValue:b[w.prop],"onUpdate:modelValue":F=>b[w.prop]=F,size:"small",placeholder:"请输入"+w.label,onChange:F=>d(E,w.prop,F)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",jd,[e.createVNode(x,{onClick:g,id:"themeBorderButton"},{default:e.withCtx(()=>k[1]||(k[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(x,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>k[2]||(k[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Ud=ir._export_sfc(Hd,[["__scopeId","data-v-df66eb1f"]]),di=a=>{var r;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let n=(r=te.analyzeSplitToContent(l,","))==null?void 0:r.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)),vn(i)));return n=n==null?void 0:n.join(","),n};function rc(a){return Ja.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function qd(a){return Ja.axios.get(a,{responseType:"blob"})}let rr="$R",Wd="http://222.92.178.198:55002/AIRobot",ht=["Form","BarChart","FormText","FormBlock"];const nc=a=>{var n,r;let l=(r=te.analyzeSplitToContent(a,"@"))==null?void 0:r[((n=te.analyzeSplitToContent(a,"@"))==null?void 0:n.length)-1];return!!(ht!=null&&ht.some(i=>l==null?void 0:l.includes(i)))},Kd=async(a,l,n,r)=>{var s,h,c,d,m,g,u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me,de,A,ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta;let i=a;if(nc(i==null?void 0:i[0])){let ce=ep(i),ca=(s=ce==null?void 0:ce.filter)==null?void 0:s.join(","),we=[];(h=ce==null?void 0:ce.hideContents)==null||h.forEach(Ke=>{if(Ke){const fa=Ke;fa&&we.push(`(HideGroup=Yes, prop=${fa})`)}});let ge=(c=ce==null?void 0:ce.formContents)==null?void 0:c.filter(Ke=>{var fa;return(fa=Ke==null?void 0:Ke.filters)==null?void 0:fa.includes("@ShowHide=Hide")});(ge==null?void 0:ge.length)>0&&(ge==null||ge.forEach(Ke=>{if(Ke){const fa=Ke==null?void 0:Ke.prop;fa&&we.push(`(Hide=Yes, prop=${fa})`)}}));let he=(r==null?void 0:r.menuFilter)??[];return Array.isArray(he)||(he=he?[he]:[]),he=[...he,...we],{key:"Form",name:ce==null?void 0:ce.groupName,value:ce==null?void 0:ce.formContents,contents:Array.isArray((d=ce==null?void 0:ce.contents)==null?void 0:d[0])&&((g=(m=ce==null?void 0:ce.contents)==null?void 0:m[0])!=null&&g.every(Ke=>Array.isArray(Ke)))?[(C=(u=ce==null?void 0:ce.contents)==null?void 0:u[0])==null?void 0:C[n]]:[ce==null?void 0:ce.contents],filter:"("+ca+")",menuFilter:he,groupFilter:ce==null?void 0:ce.groupFilters}}else if(((I=i==null?void 0:i[0])==null?void 0:I[0])!=="&"){let ce=tc(i,r),ca="";(k=ce==null?void 0:ce.tableFilter)!=null&&k.includes(rr)?ce.tableFilter=(G=ce==null?void 0:ce.tableFilter)==null?void 0:G.replace(rr,""):ca=(L=(j=(z=ce==null?void 0:ce.tableFilter)==null?void 0:z.replace("(",rr))==null?void 0:j.split(rr))==null?void 0:L[0];let we=[];ce!=null&&ce.tableFilter&&((_=te.analyzeSplitToContent(ce==null?void 0:ce.tableFilter,","))==null||_.forEach(he=>{he!=null&&he.includes("@ShowHide=Hide")&&we.push("HideGroup=Yes")}));let ge=(r==null?void 0:r.menuFilter)??[];return Array.isArray(ge)||(ge=ge?[ge]:[]),ge=[...ge,...we],{key:"Table",name:ce==null?void 0:ce.groupName,tableColumns:ce==null?void 0:ce.tableColumns,assistColumn:ce==null?void 0:ce.columns,tableContents:l===1?ce==null?void 0:ce.tableContents:(w=(x=ce==null?void 0:ce.tableContents)==null?void 0:x[n])!=null&&w.every(he=>Array.isArray(he))?(b=ce==null?void 0:ce.tableContents)==null?void 0:b[n]:[(E=ce==null?void 0:ce.tableContents)==null?void 0:E[n]],filter:ce==null?void 0:ce.tableFilter,menuFilter:ge,quotePage:ca!==""?((le=($=(F=ca==null?void 0:ca.replace("*",rr))==null?void 0:F.split(rr))==null?void 0:$[0])==null?void 0:le.replaceAll(":","/"))??"":void 0,quoteGroup:ca!==""?((re=(X=(ee=(A=(de=(me=(Q=ca==null?void 0:ca.replace("*",rr))==null?void 0:Q.split(rr))==null?void 0:me[1])==null?void 0:de.replace("{",rr))==null?void 0:A.split(rr))==null?void 0:ee[0])==null?void 0:X.split(":"))==null?void 0:re.filter(he=>he!==""))??[]:[],relatedQuotes:ce==null?void 0:ce.relatedQuotes,fatherSyncContents:ce==null?void 0:ce.fatherSyncContents,sonSyncContents:ce==null?void 0:ce.sonSyncContents,calculatorFilters:(ce==null?void 0:ce.calculatorFilters)??[]}}else{let ce=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],ca=i==null?void 0:i[0];ca=ca==null?void 0:ca.slice(1,ca==null?void 0:ca.length),ca=te.analyzeSplitToContent(ca,":"),ca=ca==null?void 0:ca[(ca==null?void 0:ca.length)-1];let we=[];we.push("1");let ge=ca==null?void 0:ca.replace("(",rr);ge=(fe=ge==null?void 0:ge.split(rr))==null?void 0:fe[0],we.push(ge);let he=ca==null?void 0:ca.replace("(",rr);if(he=($e=he==null?void 0:he.split(rr))==null?void 0:$e[1],he=(B=(ue=he==null?void 0:he.replace(")",rr))==null?void 0:ue.split(rr))==null?void 0:B[0],(U=(se=he==null?void 0:he.replace(",",rr))==null?void 0:se.split(rr))==null||U.forEach(Ke=>{we.push(Ke)}),we.push(""),we.push(""),(be=we==null?void 0:we[2])!=null&&be.includes(".xlsx")||(Me=we==null?void 0:we[2])!=null&&Me.includes(".xls"))try{let Ke=Wd+"/"+(we==null?void 0:we[2]),fa=await qd(Ke),qa=`生成js函数名称为${we==null?void 0:we[1]}的函数,规则为:`+(we==null?void 0:we[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((fa==null?void 0:fa.status)===200){let V=fa==null?void 0:fa.data;const H=new FormData;H.append("file",V,we==null?void 0:we[2]),H.append("query",qa);let Z=await rc(H);Z=(Ea=(aa=(Ve=Z==null?void 0:Z.data)==null?void 0:Ve.data)==null?void 0:aa.response)==null?void 0:Ea.replace("generateResult",we==null?void 0:we[1]),we[we.length-2]=Z,we[we.length-1]=[{name:(ta=(ne=we==null?void 0:we[2])==null?void 0:ne.split("."))==null?void 0:ta[0],url:Ke}]}}catch{}return we=[we],{key:"Method",name:[],tableContents:we,tableColumns:ce}}},Gd=(a,l)=>{var r,i,s,h,c,d,m,g,u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me,de,A,ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we;let n=(i=(r=te.analyzeSplitToContent(a,"="))==null?void 0:r.filter(ge=>ge!=="="))==null?void 0:i.map(ge=>((ge==null?void 0:ge[(ge==null?void 0:ge.length)-1])==="="&&(ge=ge==null?void 0:ge.slice(0,(ge==null?void 0:ge.length)-1)),ge));if(nc(n==null?void 0:n[1])){let ge=Qd(n),he=(c=(h=(s=ge==null?void 0:ge.filter)==null?void 0:s.replace("@",rr))==null?void 0:h.split(rr))==null?void 0:c[0],Ke=(g=(m=(d=ge==null?void 0:ge.filter)==null?void 0:d.replace("(",rr))==null?void 0:m.split(rr))==null?void 0:g[1],fa=(I=(C=(u=ge==null?void 0:ge.filter)==null?void 0:u.replace("(",rr))==null?void 0:C.split(rr))==null?void 0:I[0];fa="@"+((k=fa==null?void 0:fa.split("@"))==null?void 0:k[1]),Ke=Ke==null?void 0:Ke.slice(0,(Ke==null?void 0:Ke.length)-1),Ke=(z=(G=te.analyzeSplitToContent(Ke,","))==null?void 0:G.map(V=>(V=fa+V,V)))==null?void 0:z.join("");let qa=he+"("+Ke+")";return{key:"Form",name:ge==null?void 0:ge.group,filter:qa,formPage:((_=(L=(j=he==null?void 0:he.replace("*",rr))==null?void 0:j.split(rr))==null?void 0:L[0])==null?void 0:_.replaceAll(":","/"))??"",formGroup:((le=($=(F=(E=(b=(w=(x=he==null?void 0:he.replace("*",rr))==null?void 0:x.split(rr))==null?void 0:w[1])==null?void 0:b.replace("{",rr))==null?void 0:E.split(rr))==null?void 0:F[0])==null?void 0:$.split(":"))==null?void 0:le.filter(V=>V!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let ge=n==null?void 0:n.filter((Z,ve)=>ve!==0);ge=ge==null?void 0:ge.join("");let he=tc(n,l,ge),Ke="";(Q=he==null?void 0:he.tableFilter)!=null&&Q.includes(rr)?he.tableFilter=(me=he==null?void 0:he.tableFilter)==null?void 0:me.replace(rr,""):Ke=(ee=(A=(de=he==null?void 0:he.tableFilter)==null?void 0:de.replace("(",rr))==null?void 0:A.split(rr))==null?void 0:ee[0];let fa=(fe=(re=(X=he==null?void 0:he.tableFilter)==null?void 0:X.replace("(",rr))==null?void 0:re.split(rr))==null?void 0:fe[0];fa=[{menus:(ue=($e=fa==null?void 0:fa.split("*"))==null?void 0:$e[0])==null?void 0:ue.replaceAll(":","/"),groups:((se=(B=fa==null?void 0:fa.split("*"))==null?void 0:B[1])==null?void 0:se.split(":"))??[]}];let qa=(Me=(be=(U=he==null?void 0:he.tableFilter)==null?void 0:U.replace("(",rr))==null?void 0:be.split(rr))==null?void 0:Me[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));let V=[];he!=null&&he.tableFilter&&((Ve=te.analyzeSplitToContent(he==null?void 0:he.tableFilter,","))==null||Ve.forEach(Z=>{Z!=null&&Z.includes("@ShowHide=Hide")&&V.push("HideGroup=Yes")}));let H=(l==null?void 0:l.menuFilter)??[];return Array.isArray(H)||(H=H?[H]:[]),H=[...H,...V],{key:"Table",name:he==null?void 0:he.groupName,filter:he==null?void 0:he.tableFilter,tableColumns:he==null?void 0:he.tableColumns,quotePage:Ke!==""?((ne=(Ea=(aa=Ke==null?void 0:Ke.replace("*",rr))==null?void 0:aa.split(rr))==null?void 0:Ea[0])==null?void 0:ne.replaceAll(":","/"))??"":void 0,quoteGroup:Ke!==""?((we=(ca=(ce=(ta=Ke==null?void 0:Ke.replace("*",rr))==null?void 0:ta.split(rr))==null?void 0:ce[1])==null?void 0:ca.split(":"))==null?void 0:we.filter(Z=>Z!==""))??[]:[],menuFilter:H,relatedQuotes:fa,fatherSyncContents:(he==null?void 0:he.fatherSyncContents)??[],sonSyncContents:(he==null?void 0:he.sonSyncContents)??[],calculatorFilters:(he==null?void 0:he.calculatorFilters)??[]}}},Yd=async(a,l)=>{let n=[],r=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(i,s)=>{let h=[];i=i==null?void 0:i.map(async c=>{var d,m;if(h.push(c),((d=te.analyzeSplitToContent(a,"="))==null?void 0:d.length)<=2){if(((m=te.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const g=await Kd(te.analyzeSplitToContent(a,"="),r,s,c);h.push(g)}}else h.push(Gd(a,c))}),await Promise.all(i),n.push(h)}),await Promise.all(l),n};let Wi="/",Jd="$",En="$R";const ic=a=>{var n,r,i;let l="";if((a==null?void 0:a.length)>1){let s=a==null?void 0:a.filter((h,c)=>c!==0);s=s==null?void 0:s.join(""),s=te.analyzerSplitToWord(s,")"),(s==null?void 0:s.length)!==1?(s==null?void 0:s[(s==null?void 0:s.length)-1])===")"?s=s==null?void 0:s.join(""):s=(n=s==null?void 0:s.filter((h,c)=>c!==(s==null?void 0:s.length)-1))==null?void 0:n.join(""):s=s==null?void 0:s[0],l="("+s,((i=a==null?void 0:a[0])==null?void 0:i[((r=a==null?void 0:a[0])==null?void 0:r.length)-2])==="@"&&(l="@"+l)}return{filter:l}},oc=(a,l=[])=>{let n=(a==null?void 0:a.map(s=>{var h,c;return(c=s==null?void 0:s.key)==null?void 0:c.slice(1,(h=s==null?void 0:s.key)==null?void 0:h.length)}))??[],r=[];n==null||n.forEach(s=>{var h,c,d,m,g,u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me;if(s===""&&(s="算法库:通用算法"),s!=null&&s.includes(Jd)){let de="",A=!0,ee=te.analyzerSplitToWord(s,"(");(ee==null?void 0:ee.length)>1&&(de="("+((h=te.analyzerSplitToWord(ee==null?void 0:ee[1],")"))==null?void 0:h[0]),((d=ee==null?void 0:ee[0])==null?void 0:d[((c=ee==null?void 0:ee[0])==null?void 0:c.length)-2])==="@"&&(de="@"+de));let X=s;X=X==null?void 0:X.replace(de,""),de=vn(de),de=(m=te.analyzeSplitToContent(de,","))==null?void 0:m.map(se=>((se==null?void 0:se[(se==null?void 0:se.length)-1])===","&&(se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1)),se)),de!=null&&de.includes("@ShowHide=Hide")&&(A=!1);let re=(g=X==null?void 0:X.replace("$",En))==null?void 0:g.split(En),fe=re==null?void 0:re[1],$e=re==null?void 0:re[0];$e!=null&&$e.includes("[")&&($e=(C=(u=$e==null?void 0:$e.replace("[",En))==null?void 0:u.split(En))==null?void 0:C[0],fe=fe+":["+((G=(k=(I=re==null?void 0:re[0])==null?void 0:I.replace("[",En))==null?void 0:k.split(En))==null?void 0:G[1])),$e=(j=(z=$e==null?void 0:$e.replaceAll(":","/"))==null?void 0:z.replaceAll("{",""))==null?void 0:j.replaceAll("}",""),($e==null?void 0:$e[($e==null?void 0:$e.length)-1])!=="/"&&($e=$e+"/"),fe=((L=$e==null?void 0:$e.split("/"))==null?void 0:L[0])+":"+fe;let B="";if(!(fe!=null&&fe.includes("[")))B=fe==null?void 0:fe.replaceAll(":","/"),r==null||r.push({path:B,isShow:A,filter:de,fatherPath:$e});else{let se=(x=(_=fe==null?void 0:fe.replace("[",En))==null?void 0:_.split(En))==null?void 0:x[1];se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1),se=(w=te.analyzeSplitToContent(se,","))==null?void 0:w.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)),se==null||se.forEach(U=>{var be,Me;B=((Me=(be=fe==null?void 0:fe.replace("[",En))==null?void 0:be.split(En))==null?void 0:Me[0])+U,B=B==null?void 0:B.replaceAll(":","/"),r==null||r.push({path:B,isShow:A,filter:de,fatherPath:$e})})}}else{let de="",A=!0,ee=te.analyzerSplitToWord(s,"(");(ee==null?void 0:ee.length)>1&&(de=(b=ic(ee))==null?void 0:b.filter);let X=s;if(X=X==null?void 0:X.replace(de,""),(de==null?void 0:de[0])==="("){de=de==null?void 0:de.slice(1,(de==null?void 0:de.length)-1);let fe=[];(E=te.analyzeSplitToContent(de,","))==null||E.forEach($e=>{($e==null?void 0:$e[($e==null?void 0:$e.length)-1])===","&&($e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1)),($e==null?void 0:$e[0])==="("&&($e=$e==null?void 0:$e.slice(1,($e==null?void 0:$e.length)-1)),($e==null?void 0:$e[0])!=="@"&&($e="@"+$e),fe.push(vn($e))}),de=fe==null?void 0:fe.join(",")}else de=vn(de);de=(F=te.analyzeSplitToContent(de,","))==null?void 0:F.map(fe=>((fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])===","&&(fe=fe==null?void 0:fe.slice(0,(fe==null?void 0:fe.length)-1)),fe)),de!=null&&de.includes("@ShowHide=Hide")&&(A=!1),(X==null?void 0:X[(X==null?void 0:X.length)-1])==="}"&&(X=X+":"),X=($=X==null?void 0:X.replaceAll("{",""))==null?void 0:$.replaceAll("}","");let re="";if(X!=null&&X.includes("[")){let fe=(le=X==null?void 0:X.replace("[",En))==null?void 0:le.split(En),$e=fe==null?void 0:fe[1];$e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1),(me=(Q=te.analyzeSplitToContent($e,","))==null?void 0:Q.map(ue=>((ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])===","&&(ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1)),ue)))==null||me.forEach(ue=>{re=(fe==null?void 0:fe[0])+ue,re=re==null?void 0:re.replaceAll(":","/"),r==null||r.push({path:re,isShow:A,filter:de})})}else re=X==null?void 0:X.replaceAll(":","/"),r==null||r.push({path:re,isShow:A,filter:de})}});let i=M.cloneDeep(r);return(l==null?void 0:l.length)>0&&(i=l),i=i==null?void 0:i.filter(s=>{var h,c,d,m;return!(s!=null&&s.fatherPath)&&((c=(h=s==null?void 0:s.path)==null?void 0:h.split(Wi))==null?void 0:c.length)>1&&((m=(d=s==null?void 0:s.path)==null?void 0:d.split(Wi))==null?void 0:m[1])===""}),i=i==null?void 0:i.map(s=>{var h;return s.path=(h=s.path)==null?void 0:h.replace(Wi,""),s.path}),(i==null?void 0:i.length)>0&&(r=r==null?void 0:r.map(s=>{var c,d,m,g,u,C,I;let h=i==null?void 0:i.find(k=>{var G;return(G=s==null?void 0:s.path)==null?void 0:G.includes(k)});return!(s!=null&&s.fatherPath)&&h&&!((c=s==null?void 0:s.path)!=null&&c.includes(Wi))&&!(i!=null&&i.find(k=>(s==null?void 0:s.path)===k))&&(s.path=h+Wi+((I=(m=(d=s==null?void 0:s.path)==null?void 0:d.split(h))==null?void 0:m[1])==null?void 0:I.slice(1,(C=(u=(g=s==null?void 0:s.path)==null?void 0:g.split(h))==null?void 0:u[1])==null?void 0:C.length))),s})),r},Xd=(a,l)=>oc([{key:a}],l),Zd=async(a,l)=>{const n=[],r=Xd(a==null?void 0:a.key,l);return r&&(r==null?void 0:r.length)>0&&(r==null||r.forEach(s=>{n.push([{key:"path",value:s==null?void 0:s.path,parentPath:(s==null?void 0:s.parentPath)??"",isShow:s==null?void 0:s.isShow,menuFilter:s==null?void 0:s.filter}])})),await Yd(a==null?void 0:a.value,n)};let yl="$R",Gi="[Any]";const Qd=a=>{var h,c;let l={},r=a==null?void 0:a[0];(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":"),l.group=r;let i=a==null?void 0:a[1],s;return i!=null&&i.includes("{")?s=(c=(h=i==null?void 0:i.replaceAll("{",""))==null?void 0:h.replaceAll("}",""))==null?void 0:c.replaceAll(Gi,""):s=i==null?void 0:i.replaceAll(Gi,""),(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),l.filter=s,l},ep=a=>{var C,I,k,G,z,j;let l=[],n=[],r=[],i=[],s=[],h=[],c="",d=a==null?void 0:a[0];(d==null?void 0:d[0])==="*"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length));let m=te.analyzeSplitToContent(d,":");(C=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])!=="{"&&(L==null?void 0:L[0])!=="["))==null||C.forEach(L=>{var x,w,b;(L==null?void 0:L[(L==null?void 0:L.length)-1])===":"&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1));let _=te.analyzerSplitToWord(L,"(");if((_==null?void 0:_.length)>1){c=(x=ic(_))==null?void 0:x.filter;let E=L==null?void 0:L.replace(c,"");if(r.push(E),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let F=[];(w=te.analyzeSplitToContent(c,","))==null||w.forEach($=>{($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),($==null?void 0:$[0])==="("&&($=$==null?void 0:$.slice(1,($==null?void 0:$.length)-1)),($==null?void 0:$[0])!=="@"&&($="@"+$),F.push(vn($))}),c=F==null?void 0:F.join(",")}else c=vn(c);c=(b=te.analyzeSplitToContent(c,","))==null?void 0:b.map(F=>((F==null?void 0:F[(F==null?void 0:F.length)-1])===","&&(F=F==null?void 0:F.slice(0,(F==null?void 0:F.length)-1)),F)),c!=null&&c.includes("@ShowHide=Hide")&&h.push(E),i=[...i,...c]}else r.push(_==null?void 0:_[0])});let g=(I=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="{"))==null?void 0:I[0],u=(k=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="["))==null?void 0:k[0];return l=Ai(u??""),l!=null&&l.every(L=>Array.isArray(L))&&(l=[l]),(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)),s=(G=te.analyzeSplitToContent(g,"@"))==null?void 0:G[1],s="@"+s,g=g==null?void 0:g.replace(s,""),s=vn(s),s=(z=te.analyzeSplitToContent(s,","))==null?void 0:z.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),(g==null?void 0:g[0])==="{"&&(g=g==null?void 0:g.slice(1,(g==null?void 0:g.length)-1)),g=(j=te.analyzeSplitToContent(g,","))==null?void 0:j.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),g==null||g.forEach((L,_)=>{var re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa,V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua;let x=[],w=[],b=[],E="",F="",$=!1,le,Q=[],me=[],de=[],A="Input",ee=[],X=[];if(L!=null&&L.includes("==")){le=(re=L==null?void 0:L.split("=="))==null?void 0:re[0];let Ta=(fe=L==null?void 0:L.split("=="))==null?void 0:fe[1],Ce="";(($e=te.analyzeSplitToContent(Ta,"$"))==null?void 0:$e.length)>1&&((ue=te.analyzeSplitToContent(Ta,"$"))==null?void 0:ue[0])!=="$"?(Ce=(B=te.analyzeSplitToContent(Ta,"$"))==null?void 0:B[0],Ce=Ce==null?void 0:Ce.slice(0,(Ce==null?void 0:Ce.length)-1)):((se=te.analyzeSplitToContent(Ta,"}"))==null?void 0:se.length)>1&&(Ce=(U=te.analyzeSplitToContent(Ta,"}"))==null?void 0:U[1]);let ma=Ta==null?void 0:Ta.replace(Ce,"");if((Ce==null?void 0:Ce[0])==="("&&(Ce=Ce==null?void 0:Ce.slice(1,(Ce==null?void 0:Ce.length)-1)),(be=te.analyzeSplitToContent(Ce,","))==null||be.forEach(Je=>{var J;(Je==null?void 0:Je[0])!=="@"&&(Je="@"+Je),(Je==null?void 0:Je[(Je==null?void 0:Je.length)-1])===","&&(Je=Je==null?void 0:Je.slice(0,(Je==null?void 0:Je.length)-1));let W=vn(Je);(J=te.analyzeSplitToContent(W,","))==null||J.forEach(je=>{(je==null?void 0:je[(je==null?void 0:je.length)-1])===","&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)),x.push(je)})}),(ma==null?void 0:ma[0])==="$"&&(ma=ma==null?void 0:ma.slice(1,ma==null?void 0:ma.length)),ma!=null&&ma.includes("&")){let Je=ma;if((ma==null?void 0:ma[0])==="("){let J=(Me=te.analyzeSplitToContent(ma,"&"))==null?void 0:Me.map(je=>((je==null?void 0:je[(je==null?void 0:je.length)-1])==="&"&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)),je));Je=J==null?void 0:J[1],J=J==null?void 0:J[0],(J==null?void 0:J[0])!=="@"&&(J="@"+J),E=vn(J)}(Je==null?void 0:Je[0])==="&"&&(Je=Je==null?void 0:Je.slice(1,Je==null?void 0:Je.length)),F=(aa=(Ve=Je==null?void 0:Je.replace("(",yl))==null?void 0:Ve.split(yl))==null?void 0:aa[0],b=(ne=(Ea=Je==null?void 0:Je.replace("(",yl))==null?void 0:Ea.split(yl))==null?void 0:ne[1],b=[b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)],A="Input"}else{let Je=(ta=ma==null?void 0:ma.replace("*",yl))==null?void 0:ta.split(yl);Q=(ce=Je==null?void 0:Je[0])==null?void 0:ce.split(":"),me=(we=(ca=te.analyzeSplitToContent(Je==null?void 0:Je[1],":"))==null?void 0:ca.filter((W,J)=>{var je,We;return J!==((We=(je=Je==null?void 0:Je[1])==null?void 0:je.split(":"))==null?void 0:We.length)-1}))==null?void 0:we.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)),de=(he=(ge=te.analyzeSplitToContent(Je==null?void 0:Je[1],":"))==null?void 0:ge.filter((W,J)=>{var je,We;return J===((We=(je=Je==null?void 0:Je[1])==null?void 0:je.split(":"))==null?void 0:We.length)-1}))==null?void 0:he[0],de=(fa=(Ke=de==null?void 0:de.replaceAll("{",""))==null?void 0:Ke.replaceAll("}",""))==null?void 0:fa.split(":"),A="Select"}}else if(((qa=te.analyzeSplitToContent(L,"="))==null?void 0:qa.length)>1)if(A="Select",le=(H=(V=L==null?void 0:L.replace("=",yl))==null?void 0:V.split(yl))==null?void 0:H[0],!(L!=null&&L.includes("If")))ee=(ve=(Z=L==null?void 0:L.replace("=",yl))==null?void 0:Z.split(yl))==null?void 0:ve[1],ee=ee==null?void 0:ee.split("||");else{let Ta=(pa=(pe=L==null?void 0:L.replace("=",yl))==null?void 0:pe.split(yl))==null?void 0:pa[1];X=(ia=te.analyzeSplitToContent(Ta,")"))==null?void 0:ia.filter(Ce=>!(Ce!=null&&Ce.includes("If"))),X=X==null?void 0:X.map(Ce=>((Ce==null?void 0:Ce[0])==="("&&(Ce=Ce==null?void 0:Ce.slice(1,(Ce==null?void 0:Ce.length)-1)),Ce=Ce==null?void 0:Ce.split("||"),Ce)),w=(He=te.analyzeSplitToContent(Ta,")"))==null?void 0:He.filter(Ce=>Ce==null?void 0:Ce.includes("If")),w=w==null?void 0:w.map(Ce=>((Ce==null?void 0:Ce[0])==="|"&&(Ce=Ce==null?void 0:Ce.slice(2,Ce==null?void 0:Ce.length)),(Ce==null?void 0:Ce[0])==="("&&(Ce=Ce==null?void 0:Ce.slice(1,(Ce==null?void 0:Ce.length)-1)),(Ce==null?void 0:Ce[0])!=="@"&&(Ce="@"+Ce),Ce))}else if(((_a=te.analyzeSplitToContent(L,"@"))==null?void 0:_a.length)>1){le=(Ae=te.analyzeSplitToContent(L,"@"))==null?void 0:Ae[0],(le==null?void 0:le[(le==null?void 0:le.length)-1])==="@"&&(le=le==null?void 0:le.slice(0,(le==null?void 0:le.length)-1));let Ta="@"+((ha=te.analyzeSplitToContent(L,"@"))==null?void 0:ha[1]);Ta=vn(Ta),x=(La=te.analyzeSplitToContent(Ta,","))==null?void 0:La.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)),x!=null&&x.find(Ce=>Ce==null?void 0:Ce.includes("@Type"))&&(A=(ua=(Aa=x==null?void 0:x.find(Ce=>Ce==null?void 0:Ce.includes("@Type")))==null?void 0:Aa.split("="))==null?void 0:ua[1])}else le=L;x!=null&&x.includes("@ShowHide=Hide")&&($=!0),n.push({prop:le,label:le,value:"",menuPath:Q,groups:me,columns:de,type:A,options:ee,allContents:X,filters:x,width:g==null?void 0:g.length,isFormColHidden:$,filterContents:w,functionName:F,functionRelatedWords:b,calculatorFilter:E})}),{groupName:r,groupFilters:i,formContents:n,contents:l,filter:s,hideContents:h}},Ai=a=>{var r,i;if(!a||typeof a!="string")return[];let l=[],n=a.slice(1,(a==null?void 0:a.length)-1);if((n==null?void 0:n[0])!=="[")(r=te.analyzeSplitToContent(n,","))==null||r.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),l.push(s??"")}),(n==null?void 0:n[(n==null?void 0:n.length)-1])===","&&l.push("");else{let s=[];(i=te.analyzeSplitToContent(n,","))==null||i.forEach(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)),s.push(Ai(h))}),l=s}return l},xt=(a,l)=>{var j,L,_,x,w,b,E,F,$,le,Q,me,de,A,ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa,V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W,J,je,We,Sa,sa,Va;let n,r=[],i=[],s=[],h=[],c=[],d=[],m=[],g="Input",u,C="",I="",k="",G=[],z="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(n=(j=a==null?void 0:a.split("=="))==null?void 0:j[0],u=(L=a==null?void 0:a.split("=="))==null?void 0:L[0],g="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((w=(x=(_=a==null?void 0:a.replace("=",yl))==null?void 0:_.split(yl))==null?void 0:x[1])!=null&&w.includes("If")))if(n=te.analyzeSplitToContent(a,"@"),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=(E=(b=n==null?void 0:n.replace("=",yl))==null?void 0:b.split(yl))==null?void 0:E[0],n!=null&&n.includes("&")&&(n=($=(F=n==null?void 0:n.replace("&",yl))==null?void 0:F.split(yl))==null?void 0:$[0]),u=n,((le=te.analyzeSplitToContent(a,"@"))==null?void 0:le.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Re=(Q=te.analyzeSplitToContent(a,"@"))==null?void 0:Q[1];if((Re==null?void 0:Re[0])!=="@"&&(Re="@"+Re),Re=vn(Re),I=Re,I!=null&&I.includes("@Type")){let Oe=te.analyzeSplitToContent(I,",");Oe=Oe==null?void 0:Oe.map(Le=>((Le==null?void 0:Le[(Le==null?void 0:Le.length)-1])===","&&(Le=Le==null?void 0:Le.slice(0,(Le==null?void 0:Le.length)-1)),Le)),Oe=(me=Oe==null?void 0:Oe.filter(Le=>Le==null?void 0:Le.includes("@Type")))==null?void 0:me[0],g=(de=Oe==null?void 0:Oe.split("="))==null?void 0:de[1],g==="File"&&(g="Upload")}else g="Input"}}else if(a!=null&&a.includes("||")){let Re=[];r=(X=(ee=(A=te.analyzeSplitToContent(a,"="))==null?void 0:A[1])==null?void 0:ee.split("||"))==null?void 0:X.map(Le=>{var ze,ul,Cl,Ml;let Be=Le;if(Be!=null&&Be.includes("@")){let Rl="@"+((ul=(ze=Be==null?void 0:Be.replace("@",yl))==null?void 0:ze.split(yl))==null?void 0:ul[1]);Be=(Ml=(Cl=Be==null?void 0:Be.replace("@",yl))==null?void 0:Cl.split(yl))==null?void 0:Ml[0],Rl=di(Rl),Re.push(Rl)}return{label:Be==null?void 0:Be.replaceAll("'",""),value:Be==null?void 0:Be.replaceAll("'","")}}),(Re==null?void 0:Re.length)>0&&(I="("+(Re==null?void 0:Re.join("||"))+")");let Oe=(re=te.analyzeSplitToContent(a,"="))==null?void 0:re[0];if(Oe!=null&&Oe.includes("@")){(Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1])==="="&&(Oe=Oe==null?void 0:Oe.slice(0,(Oe==null?void 0:Oe.length)-1));let Le=(fe=te.analyzeSplitToContent(Oe,"@"))==null?void 0:fe[1];Le="@"+Le,Le=di(Le),I=I===""?Le:Le+","+I}}else g="Input",C=(B=(ue=($e=a==null?void 0:a.replace("=",yl))==null?void 0:$e.split(yl))==null?void 0:ue[1])==null?void 0:B.replaceAll("'","");else if((U=(se=te.analyzeSplitToContent(a,"="))==null?void 0:se[1])!=null&&U.includes("||")){let Re=(be=te.analyzeSplitToContent(a,"="))==null?void 0:be[0];if((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!=null&&Re.includes("@")){let ze=(Me=te.analyzeSplitToContent(Re,"@"))==null?void 0:Me[1];ze="@"+ze,I=di(ze),n=(ne=(Ve=te.analyzeSplitToContent(Re,"@"))==null?void 0:Ve[0])==null?void 0:ne.slice(0,((Ea=(aa=te.analyzeSplitToContent(Re,"@"))==null?void 0:aa[0])==null?void 0:Ea.length)-1),u=(we=(ta=te.analyzeSplitToContent(Re,"@"))==null?void 0:ta[0])==null?void 0:we.slice(0,((ca=(ce=te.analyzeSplitToContent(Re,"@"))==null?void 0:ce[0])==null?void 0:ca.length)-1)}else n=Re,u=Re;let Oe=(ge=te.analyzeSplitToContent(a,"="))==null?void 0:ge[1];Oe=te.analyzeSplitToContent(Oe,")");let Le=Oe==null?void 0:Oe.filter(ze=>!(ze!=null&&ze.includes("If")));Le==null||Le.forEach(ze=>{(ze==null?void 0:ze[0])==="("&&(ze=ze==null?void 0:ze.slice(1,(ze==null?void 0:ze.length)-1)),i==null||i.push(ze==null?void 0:ze.split("||"))});let Be=Oe==null?void 0:Oe.filter(ze=>ze==null?void 0:ze.includes("If"));Be=Be==null?void 0:Be.map(ze=>((ze==null?void 0:ze[0])==="|"&&(ze==null?void 0:ze[1])==="|"&&(ze=ze==null?void 0:ze.slice(2,ze==null?void 0:ze.length)),(ze==null?void 0:ze[0])==="("&&(ze=ze==null?void 0:ze.slice(1,(ze==null?void 0:ze.length)-1)),(ze==null?void 0:ze[0])!=="@"&&(ze="@"+ze),ze)),s=Be}else{let Re=a==null?void 0:a.split("=="),Oe=(he=Re==null?void 0:Re.filter(Le=>(Le==null?void 0:Le.includes("$"))&&(Le==null?void 0:Le[0])!=="{"))==null?void 0:he[0];if(Oe&&!(Oe!=null&&Oe.includes("&"))){let Le=(fa=te.analyzeSplitToContent(Oe,")"))==null?void 0:fa[((Ke=te.analyzeSplitToContent(Oe,")"))==null?void 0:Ke.length)-1],Be=(qa=Le==null?void 0:Le.replace("*",yl))==null?void 0:qa.split(yl),ze=(Be==null?void 0:Be[0])===""?l==null?void 0:l.value:Be==null?void 0:Be[0];(ze==null?void 0:ze[0])==="("&&(ze=(V=te.analyzeSplitToContent(ze,")"))==null?void 0:V[1]),ze=(Z=(H=ze==null?void 0:ze.replaceAll("{",""))==null?void 0:H.replaceAll("}",""))==null?void 0:Z.replaceAll(Gi,""),(ze==null?void 0:ze[0])==="$"&&(ze=(ve=ze==null?void 0:ze.slice(1,ze==null?void 0:ze.length))==null?void 0:ve.replaceAll(":","/")),h=ze==null?void 0:ze.split("/");let ul=(pa=(pe=Be==null?void 0:Be[1])==null?void 0:pe.replace("{",yl))==null?void 0:pa.split(yl),Cl=ul==null?void 0:ul[0];(Cl==null?void 0:Cl[(Cl==null?void 0:Cl.length)-1])===":"&&(Cl=Cl==null?void 0:Cl.slice(0,(Cl==null?void 0:Cl.length)-1)),c=Cl==null?void 0:Cl.split(":"),d=(Ae=(_a=(He=(ia=ul==null?void 0:ul[1])==null?void 0:ia.replace("}",yl))==null?void 0:He.split(yl))==null?void 0:_a[0])==null?void 0:Ae.split(":");let Ml="";((ha=te.analyzeSplitToContent(Oe,")"))==null?void 0:ha.length)>1&&(Ml=(La=te.analyzeSplitToContent(Oe,")"))==null?void 0:La[0]),Ml&&Ml!==""&&((Ml==null?void 0:Ml[0])!=="@"&&(Ml="@"+Ml),I=di(Ml))}if(Re!=null&&Re.some(Le=>Le==null?void 0:Le.includes("&"))){let Le=(Aa=Re==null?void 0:Re.filter(ul=>ul==null?void 0:ul.includes("&")))==null?void 0:Aa[0];Le=(ua=te.analyzeSplitToContent(Le,"&"))==null?void 0:ua.map(ul=>((ul==null?void 0:ul[(ul==null?void 0:ul.length)-1])==="&"&&(ul=ul==null?void 0:ul.slice(0,(ul==null?void 0:ul.length)-1)),ul)),k=(ma=(Ce=(Ta=Le==null?void 0:Le[1])==null?void 0:Ta.replace("(",yl))==null?void 0:Ce.split(yl))==null?void 0:ma[0];let Be=(Je=te.analyzeSplitToContent(Le==null?void 0:Le[1],")"))==null?void 0:Je[0];Be=(J=(W=Be==null?void 0:Be.replace("(",yl))==null?void 0:W.split(yl))==null?void 0:J[1],Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1),(Be==null?void 0:Be[0])==="{"&&(Be=Be==null?void 0:Be.slice(1,Be==null?void 0:Be.length)),(Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])==="}"&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),G=Be==null?void 0:Be.split(",");let ze=Le==null?void 0:Le[0];ze&&ze!==""&&((ze==null?void 0:ze[0])!=="@"&&(ze="@"+ze),z=di(ze))}else if(!Oe&&((je=Re==null?void 0:Re.filter(Le=>(Le==null?void 0:Le[0])==="{"))==null?void 0:je.length)>0){let Le=Re==null?void 0:Re[(Re==null?void 0:Re.length)-1];Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=te.analyzeSplitToContent(Le,","),Le=Le==null?void 0:Le.map(Be=>((Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])===","&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),Be)),Le=Le==null?void 0:Le.map(Be=>{var ze,ul,Cl,Ml;if(Be=Be==null?void 0:Be.replaceAll("$",""),Be!=null&&Be.includes("{")){let Rl="";Be=Be==null?void 0:Be.replaceAll("{","");let Al=Be==null?void 0:Be.split("}");Rl=((ul=(ze=Al==null?void 0:Al[0])==null?void 0:ze.split(":"))==null?void 0:ul[0])+":"+(Al==null?void 0:Al[1]),Be=Rl,Be=Be+":"}if(Be!=null&&Be.includes(Gi)){let Rl="",Al=Be==null?void 0:Be.split(Gi);Rl=((Ml=(Cl=Al==null?void 0:Al[0])==null?void 0:Cl.split(":"))==null?void 0:Ml[0])+":"+(Al==null?void 0:Al[1]),Be=Rl,Be=Be+":"}return Be=Be==null?void 0:Be.replaceAll(":","/"),Be}),m=Le}else!((We=Re==null?void 0:Re[1])!=null&&We.includes("$"))&&((Sa=Re==null?void 0:Re[1])==null?void 0:Sa[0])!=="("&&d.push(Re==null?void 0:Re[1])}else n=(sa=a==null?void 0:a.split("&"))==null?void 0:sa[0],u=(Va=a==null?void 0:a.split("&"))==null?void 0:Va[0];return(r==null?void 0:r.length)===0&&(i==null?void 0:i.length)===0&&(h==null?void 0:h.length)===0&&g==="Select"&&(g="Input"),{label:n,prop:u,options:r,allContents:i,filterContents:s,menus:h,groups:c,words:d,align:"center",formType:g,filter:I,functionName:k,functionRelatedWords:G,calculatorFilter:z,relatedPages:m,value:C}},zo=(a,l)=>{var r,i,s,h,c,d,m,g,u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me,de,A,ee,X;let n=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((h=(s=(i=(r=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:r.replace(":",yl))==null?void 0:i.split(yl))==null?void 0:s[0])!=null&&h.includes(","))){let re=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),fe=(c=re==null?void 0:re.replace(":",yl))==null?void 0:c.split(yl);if(((d=te.analyzeSplitToContent(fe==null?void 0:fe[1],"="))==null?void 0:d.length)===1){let $e=fe==null?void 0:fe[0],ue=[];(u=te.analyzeSplitToContent((g=fe==null?void 0:fe[1])==null?void 0:g.slice(1,((m=fe==null?void 0:fe[1])==null?void 0:m.length)-1),","))==null||u.forEach(B=>{var se,U;((se=te.analyzeSplitToContent(B,"="))==null?void 0:se.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)),ue=[...ue,...zo(B,l)]):((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)),ue.push((U=zo(B,l))==null?void 0:U[0]))}),n==null||n.push({label:$e,prop:$e,children:ue,align:"center"})}else{let $e=[];if(((C=te.analyzeSplitToContent(re,"="))==null?void 0:C.length)>=2){let B=(I=te.analyzeSplitToContent(re,"="))==null?void 0:I[1],se=(k=te.analyzeSplitToContent(B,"/"))==null?void 0:k.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));$e=se==null?void 0:se.map(U=>(U=Ai(U),U))}let ue=(x=(_=(L=(j=(z=(G=re==null?void 0:re.replace("{",yl))==null?void 0:G.split(yl))==null?void 0:z[1])==null?void 0:j.replace("}",yl))==null?void 0:L.split(yl))==null?void 0:_[0])==null?void 0:x.split(",");ue==null||ue.forEach((B,se)=>{($e==null?void 0:$e.length)>0&&se===0?n==null||n.push({label:B,prop:B,align:"center",formType:"Select",relatedContents:$e==null?void 0:$e.map(U=>{let be={};return ue==null||ue.forEach((Me,Ve)=>{be[Me]=U==null?void 0:U[Ve]}),be}),options:$e==null?void 0:$e.map(U=>({label:U==null?void 0:U[0],value:U==null?void 0:U[0]})),mainKey:!0}):n==null||n.push({label:B,prop:B,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((w=te.analyzeSplitToContent(a,"="))==null?void 0:w.length)===2&&((E=(b=te.analyzeSplitToContent(a,"="))==null?void 0:b[1])==null?void 0:E[0])==="["){let re=[];if(((F=te.analyzeSplitToContent(a,"="))==null?void 0:F.length)>=2){let $e=($=te.analyzeSplitToContent(a,"="))==null?void 0:$[1],ue=(Q=(le=te.analyzeSplitToContent($e,"|"))==null?void 0:le.filter(B=>B!=="|"))==null?void 0:Q.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));re=ue==null?void 0:ue.map(B=>(B=Ai(B),B))}let fe=(de=(me=a==null?void 0:a.replace("}",yl))==null?void 0:me.split(yl))==null?void 0:de[0];fe=(A=fe==null?void 0:fe.slice(1,fe==null?void 0:fe.length))==null?void 0:A.split(","),fe==null||fe.forEach(($e,ue)=>{(re==null?void 0:re.length)>0&&ue===0?n==null||n.push({label:$e,prop:$e,align:"center",formType:"Select",relatedContents:re==null?void 0:re.map(B=>{let se={};return fe==null||fe.forEach((U,be)=>{se[U]=B==null?void 0:B[be]}),se}),options:re==null?void 0:re.map(B=>({label:B==null?void 0:B[0],value:B==null?void 0:B[0]})),mainKey:!0}):n==null||n.push({label:$e,prop:$e,align:"center"})})}else(ee=te.analyzeSplitToContent(a,","))==null||ee.forEach(re=>{var fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa,V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W;if((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==null?void 0:re[0])==="{"){let J=te.analyzeSplitToContent(re,"="),je=J==null?void 0:J[(J==null?void 0:J.length)-1],We=[],Sa=[],sa=[],Va="",Re="",Oe=[],Le=[],Be=(fe=je==null?void 0:je.replace("*",yl))==null?void 0:fe.split(yl),ze=(Be==null?void 0:Be[0])===""?l==null?void 0:l.value:Be==null?void 0:Be[0];ze=te.analyzeSplitToContent(ze,")");let ul="";if((ze==null?void 0:ze.length)>1&&(($e=ze==null?void 0:ze[0])==null?void 0:$e[0])!=="&"&&(ul=ze==null?void 0:ze[0],(ul==null?void 0:ul[0])!=="@"&&(ul="@"+ul),Re=ul??""),ze=(ue=ze==null?void 0:ze.filter(Qa=>(Qa==null?void 0:Qa[0])==="$"))==null?void 0:ue[0],((B=te.analyzeSplitToContent(ze,"}"))==null?void 0:B.length)>1&&((U=(se=te.analyzeSplitToContent(ze,"}"))==null?void 0:se[1])==null?void 0:U[0])==="("&&(ul=(be=te.analyzeSplitToContent(ze,"}"))==null?void 0:be[1],(ul==null?void 0:ul[0])!=="@"&&(ul="@"+ul),Re!==""&&(Re=Re+","),Re=Re+ul),(Me=ze==null?void 0:ze.slice(1,(ze==null?void 0:ze.length)-1))!=null&&Me.includes("$")||(ze=(Ve=te.analyzeSplitToContent(ze,"}"))==null?void 0:Ve[0]),(ze==null?void 0:ze[0])==="$"&&(ze=(aa=ze==null?void 0:ze.replace("{",""))==null?void 0:aa.replace("}",":"),ze=(Ea=ze==null?void 0:ze.slice(1,ze==null?void 0:ze.length))==null?void 0:Ea.replaceAll(":","/")),ze!=null&&ze.includes("$")){let Qa=(ne=ze==null?void 0:ze.split("$"))==null?void 0:ne[0];Qa=(ta=Qa==null?void 0:Qa.split("/"))==null?void 0:ta[0],ze=Qa+"/"+((ce=ze==null?void 0:ze.split("$"))==null?void 0:ce[1])+"/"}We=(ze==null?void 0:ze.split("/"))??[];let Cl=(we=(ca=Be==null?void 0:Be[1])==null?void 0:ca.replace("{",yl))==null?void 0:we.split(yl);if((Ke=(he=(ge=Be==null?void 0:Be[1])==null?void 0:ge.split("(@"))==null?void 0:he[0])!=null&&Ke.includes("&&")||(V=(qa=(fa=Be==null?void 0:Be[1])==null?void 0:fa.split("@"))==null?void 0:qa[0])!=null&&V.includes("&&")){let Qa=(H=Be==null?void 0:Be[1])!=null&&H.includes("(@")?(pe=(ve=(Z=Be==null?void 0:Be[1])==null?void 0:Z.split("(@"))==null?void 0:ve[0])==null?void 0:pe.split("&&"):(He=(ia=(pa=Be==null?void 0:Be[1])==null?void 0:pa.split("@"))==null?void 0:ia[0])==null?void 0:He.split("&&");Oe=Qa==null?void 0:Qa.map(Ua=>{var ql,Il;return(Ua==null?void 0:Ua[0])==="*"&&(Ua=Ua==null?void 0:Ua.slice(1,Ua==null?void 0:Ua.length)),Ua=(Il=(ql=Ua==null?void 0:Ua.replace("{",yl))==null?void 0:ql.split(yl))==null?void 0:Il[0],(Ua==null?void 0:Ua[(Ua==null?void 0:Ua.length)-1])===":"&&(Ua=Ua==null?void 0:Ua.slice(0,(Ua==null?void 0:Ua.length)-1)),Ua=Ua==null?void 0:Ua.split(":"),Ua});let Ul=[];Qa==null||Qa.forEach((Ua,ql)=>{var Il,lr;(Ua==null?void 0:Ua[0])==="*"&&(Ua=Ua==null?void 0:Ua.slice(1,Ua==null?void 0:Ua.length)),Ua=(lr=(Il=Ua==null?void 0:Ua.replace("{",yl))==null?void 0:Il.split(yl))==null?void 0:lr[1],(Ua==null?void 0:Ua[(Ua==null?void 0:Ua.length)-1])==="}"&&(Ua=Ua==null?void 0:Ua.slice(0,(Ua==null?void 0:Ua.length)-1)),Ua=Ua==null?void 0:Ua.split(","),Ul.push(ql===0?(Ua==null?void 0:Ua.length)-1:Ua==null?void 0:Ua.length),Le=[...Le,...Ua]}),Ul=(_a=te.prefixSum(Ul))==null?void 0:_a.map(Ua=>Ua==null?void 0:Ua.total),Oe=Oe==null?void 0:Oe.map((Ua,ql)=>({number:Ul==null?void 0:Ul[ql],contents:Ua}))}let Ml=Cl==null?void 0:Cl[0];(Ml==null?void 0:Ml[(Ml==null?void 0:Ml.length)-1])===":"&&(Ml=Ml==null?void 0:Ml.slice(0,(Ml==null?void 0:Ml.length)-1)),Sa=(Ml==null?void 0:Ml.split(":"))??[],sa=((Aa=(La=(ha=(Ae=Cl==null?void 0:Cl[1])==null?void 0:Ae.replace("}",yl))==null?void 0:ha.split(yl))==null?void 0:La[0])==null?void 0:Aa.split(","))??[];let Rl=(Ta=J==null?void 0:J[0])==null?void 0:Ta.slice(1,((ua=J==null?void 0:J[0])==null?void 0:ua.length)-2);Re&&Re!==""&&(Va=di(Re));let Al=(Ce=te.analyzeSplitToContent(Va,","))==null?void 0:Ce.map(Qa=>((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)),er=[];Al!=null&&Al.find(Qa=>Qa==null?void 0:Qa.includes("@MainParam"))&&(Al=Al==null?void 0:Al.find(Qa=>Qa==null?void 0:Qa.includes("@MainParam")),Al=(Je=(ma=Al==null?void 0:Al.replace("=",yl))==null?void 0:ma.split(yl))==null?void 0:Je[1],Al=Al==null?void 0:Al.slice(1,(Al==null?void 0:Al.length)-1),er=te.analyzeSplitToContent(Al,",")),(W=Rl==null?void 0:Rl.split(","))==null||W.forEach((Qa,Ul)=>{var Ua,ql,Il,lr,_l;((Ua=te.analyzeSplitToContent(Qa,"@"))==null?void 0:Ua.length)>1&&(Qa=(ql=te.analyzeSplitToContent(Qa,"@"))==null?void 0:ql[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))),n.push({label:Qa,prop:Qa,align:"center",menus:We,groups:(Oe==null?void 0:Oe.length)===0?Sa:(Il=Oe==null?void 0:Oe.find(xr=>(xr==null?void 0:xr.number)>=Ul))==null?void 0:Il.contents,words:(Le==null?void 0:Le.length)===0?(lr=sa==null?void 0:sa[Ul])==null?void 0:lr.split(":"):(_l=Le==null?void 0:Le[Ul])==null?void 0:_l.split(":"),formType:(We==null?void 0:We.length)>0?"Select":"Input",mainKey:!!(Ul===0||er!=null&&er.find(xr=>xr===Qa)),filter:Va,isMainPath:(Oe==null?void 0:Oe.findIndex(xr=>(xr==null?void 0:xr.number)>=Ul))===0})})}else n.push({label:re,prop:re,align:"center"})});else{let re=(X=te.analyzeSplitToContent(a,","))==null?void 0:X.map(fe=>((fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])===","&&(fe=fe==null?void 0:fe.slice(0,(fe==null?void 0:fe.length)-1)),fe));re==null||re.forEach(fe=>{n.push(xt(fe,l))})}return n},ap=(a,l)=>{var h,c,d,m,g;let n=a;if(!a)return;let r="";((h=te.analyzeSplitToContent(a,"}"))==null?void 0:h.length)>1&&(n=(c=te.analyzeSplitToContent(a,"}"))==null?void 0:c[0],r=(d=te.analyzeSplitToContent(a,"}"))==null?void 0:d[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let i=[],s=[];return i.push({label:"排序",prop:"sort"}),i.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=te.analyzeSplitToContent(n,","))==null||m.forEach(u=>{var C;(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==null?void 0:u[0])==="{"?(C=zo(u,l))==null||C.forEach(I=>{i.push(I)}):i.push(xt(u,l))}),i!=null&&i.some(u=>{var C;return(C=u==null?void 0:u.prop)==null?void 0:C.includes("@")})&&(i=i==null?void 0:i.filter(u=>{var C;return!((C=u==null?void 0:u.prop)!=null&&C.includes("@"))})),r!==""&&((r==null?void 0:r[0])=="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),(g=te.analyzeSplitToContent(r,","))==null||g.forEach(u=>{var C;(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==null?void 0:u[0])==="{"?(C=zo(u,l))==null||C.forEach(I=>{s.push(I)}):s.push(xt(u,l))})),{columns:i,secondColumns:s}},vn=a=>{var l,n,r,i,s;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let h=(n=(l=a==null?void 0:a.replace("(",yl))==null?void 0:l.split(yl))==null?void 0:n[1],c=(i=(r=a==null?void 0:a.replace("(",yl))==null?void 0:r.split(yl))==null?void 0:i[0];return h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h=(s=te.analyzeSplitToContent(h,","))==null?void 0:s.map(d=>((d==null?void 0:d[(d==null?void 0:d.length)-1])===","&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1)),c+d)),h=h==null?void 0:h.join(","),a!=null&&a.includes("@Quote")&&(h!=null&&h.includes("@QuoteType")||(h=h===""?h+"@QuoteType=Manual":h+",@QuoteType=Manual"),h!=null&&h.includes("@QuoteSonSync")||(h=h===""?h+"@QuoteSonSync=No":h+",@QuoteSonSync=No"),h!=null&&h.includes("@QuoteFatherSync")||(h=h===""?h+"@QuoteFatherSync=Yes":h+",@QuoteFatherSync=Yes")),h}},us=a=>{let l=a==null?void 0:a.map(n=>{var r,i;return{menus:n==null?void 0:n.menus,content:((r=n==null?void 0:n.menus)==null?void 0:r.join("/"))+yl+((i=n==null?void 0:n.groups)==null?void 0:i.join("/"))}});return l=l==null?void 0:l.filter(n=>{var r;return(n==null?void 0:n.menus)&&((r=n==null?void 0:n.menus)==null?void 0:r.length)>0}),l=l==null?void 0:l.map(n=>n==null?void 0:n.content),l=[...new Set(l)],l=l==null?void 0:l.map(n=>{var r,i;return{menus:(r=n==null?void 0:n.split(yl))==null?void 0:r[0],groups:((i=n==null?void 0:n.split(yl))==null?void 0:i[1])??[]}}),l},ds=a=>{var n;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(n=te.analyzeSplitToContent(l,","))==null?void 0:n.map(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),(r==null?void 0:r[1])==="("&&(r=vn(r)),r)),l==null?void 0:l.join(",")},tc=(a,l,n="")=>{var _,x,w,b,E,F,$,le,Q,me,de,A,ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa,V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je;let r=[],i=[],s=[],h="",c="",d="",m=[],g=[],u=[],C=[],I="";if(((_=a==null?void 0:a[0])==null?void 0:_[0])!=="*"&&((x=a==null?void 0:a[0])==null?void 0:x[0])!=="$"&&!((w=a==null?void 0:a[0])!=null&&w.includes("$")))return;((b=a==null?void 0:a[0])==null?void 0:b[0])!=="*"&&((E=a==null?void 0:a[0])==null?void 0:E[0])!=="$"&&(h=(F=te.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:F[0],(h==null?void 0:h[0])!=="@"&&(h="@"+h),h=di(h),d=($=te.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:$[1],(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=d==null?void 0:d.replaceAll(":","/"));let G=te.analyzeSplitToContent(a==null?void 0:a[0],":");if(r=(le=G==null?void 0:G.filter(W=>(W==null?void 0:W[0])!=="{"&&(W==null?void 0:W[0])!=="["))==null?void 0:le.join(""),c=(Q=a==null?void 0:a[0])==null?void 0:Q.replace(r,""),(r==null?void 0:r[0])==="("&&(r=""),I=(me=G==null?void 0:G.filter(W=>(W==null?void 0:W[0])!=="["))==null?void 0:me.join(""),I=(de=a==null?void 0:a[0])==null?void 0:de.replace(I,""),c=c==null?void 0:c.replace(I,""),(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(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)),((A=te.analyzeSplitToContent(c,"@"))==null?void 0:A.length)>1&&(h=(ee=te.analyzeSplitToContent(c,"@"))==null?void 0:ee[1],(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="@"+h,h=vn(h),c=(X=te.analyzeSplitToContent(c,"@"))==null?void 0:X[0],c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),((re=te.analyzeSplitToContent(r,"@"))==null?void 0:re.length)>1){h!==""&&(h=h+",");let W=(fe=te.analyzeSplitToContent(r,"@"))==null?void 0:fe[1];W="@"+W,W=vn(W),h=h+W,r=($e=te.analyzeSplitToContent(r,"@"))==null?void 0:$e[0]}if((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=r===""?[]:r==null?void 0:r.split(":"),(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)),n!==""){let W=(ue=te.analyzeSplitToContent(n,")"))==null?void 0:ue[0],J=te.analyzeSplitToContent(n,")");J=J==null?void 0:J.filter((sa,Va)=>Va!==(J==null?void 0:J.length)-1),J=J==null?void 0:J.join("");let je=(B=te.analyzeSplitToContent(n,"@"))==null?void 0:B[1];d=(U=(se=te.analyzeSplitToContent(n,"@"))==null?void 0:se[0])==null?void 0:U.replace(J,""),(d==null?void 0:d[(d==null?void 0:d.length)-1])==="@"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1));let We="";We=te.analyzeSplitToContent(n,")"),We=We==null?void 0:We.filter((sa,Va)=>Va!==0&&Va!==(We==null?void 0:We.length)-1),(We==null?void 0:We.length)>0&&((be=te.chunkArray(We))==null||be.forEach(sa=>{var Be,ze,ul,Cl,Ml;let Va="",Re=[],Oe="";Oe="@"+(sa==null?void 0:sa[0]),Oe=vn(Oe);let Le=sa==null?void 0:sa[1];Le=Le==null?void 0:Le.slice(1,Le==null?void 0:Le.length),Va=(ze=(Be=Le==null?void 0:Le.replace("(",yl))==null?void 0:Be.split(yl))==null?void 0:ze[0],Le=(Cl=(ul=Le==null?void 0:Le.replace("(",yl))==null?void 0:ul.split(yl))==null?void 0:Cl[1],Le=Le==null?void 0:Le.slice(0,(Le==null?void 0:Le.length)-1),Re=(Ml=te.analyzeSplitToContent(Le,","))==null?void 0:Ml.map(Rl=>((Rl==null?void 0:Rl[(Rl==null?void 0:Rl.length)-1])===","&&(Rl=Rl==null?void 0:Rl.slice(0,(Rl==null?void 0:Rl.length)-1)),Rl)),m.push({functionName:Va,functionRelatedWords:Re,calculatorFilter:Oe})})),W=ds(W),je=ds(je);let Sa=W??"";if(Sa!==""&&(Sa=Sa+","),Sa=Sa+je,(Sa==null?void 0:Sa[(Sa==null?void 0:Sa.length)-1])===","&&(Sa=Sa==null?void 0:Sa.slice(0,(Sa==null?void 0:Sa.length)-1)),Sa!==""&&h!==""&&(h=h+","),h=h+Sa,(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=(Me=te.analyzeSplitToContent(d,":"))==null?void 0:Me.filter((sa,Va)=>{var Re;return!((sa==null?void 0:sa[0])==="{"&&Va===((Re=te.analyzeSplitToContent(d,":"))==null?void 0:Re.length)-1)}),d=d==null?void 0:d.join(""),(d==null?void 0:d[(d==null?void 0:d.length)-1])===":"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),h!=null&&h.includes("@Sync")||(h=h===""?h+"@Sync=(Yes,Yes)":h+",@Sync=(Yes,Yes)"),d!=null&&d.includes("$")){let sa=(aa=(Ve=d==null?void 0:d.replace("*",yl))==null?void 0:Ve.split(yl))==null?void 0:aa[1],Va=(ne=(Ea=d==null?void 0:d.replace("*",yl))==null?void 0:Ea.split(yl))==null?void 0:ne[0];Va=Va==null?void 0:Va.split("$"),Va=((ce=(ta=Va==null?void 0:Va[0])==null?void 0:ta.split(":"))==null?void 0:ce[0])+":"+(Va==null?void 0:Va[1])+":",d=Va+"*"+sa}else d=(ca=d==null?void 0:d.replaceAll("{",""))==null?void 0:ca.replaceAll("}","")}h!==""&&h&&(h="("+h+")"),h=d+h,((we=te.analyzeSplitToContent(c,"}"))==null?void 0:we.length)>1&&(c=(ge=te.analyzeSplitToContent(c,"}"))==null?void 0:ge.filter(W=>(W==null?void 0:W[0])!=="@"),c=c==null?void 0:c.join(""));let z=ap(c,l);s=c===""?[]:(z==null?void 0:z.columns)??[],C=te.getColumnChild(s);let j=te.getColumnChild(s);s!=null&&s.some(W=>{var J;return Array.isArray(W==null?void 0:W.children)&&((J=W==null?void 0:W.children)==null?void 0:J.length)>0})&&(s=[s]),i=I?Ai(I):[],!(i!=null&&i.every(W=>Array.isArray(W)))&&(i==null?void 0:i.length)>0&&(i=[i]),(i==null?void 0:i.length)>0&&(Array.isArray(i==null?void 0:i[0])&&((he=i==null?void 0:i[0])!=null&&he.every(W=>Array.isArray(W)))?i=i==null?void 0:i.map((W,J)=>(W=W.map((je,We)=>(je.unshift("{}"),je.unshift((We+1).toString()),je)),W)):i=i==null?void 0:i.map((W,J)=>(W.unshift("{}"),W.unshift((J+1).toString()),W))),z!=null&&z.secondColumns&&((Ke=z==null?void 0:z.secondColumns)==null?void 0:Ke.length)>0&&((i==null?void 0:i.length)>0?i=i==null?void 0:i.map((W,J)=>{var je,We;return Array.isArray(W==null?void 0:W[0])?W=W==null?void 0:W.map((Sa,sa)=>{var Va,Re;return Sa.unshift((Re=(Va=z==null?void 0:z.secondColumns)==null?void 0:Va[sa])==null?void 0:Re.prop),Sa}):W.unshift((We=(je=z==null?void 0:z.secondColumns)==null?void 0:je[J])==null?void 0:We.prop),W}):i=(fa=z==null?void 0:z.secondColumns)==null?void 0:fa.map((W,J)=>(W=[W==null?void 0:W.label],W.push(J),W)),s.unshift({label:"",prop:"disabled",sortable:!1})),C=C==null?void 0:C.map(W=>{var J,je;return{menus:W==null?void 0:W.menus,content:((J=W==null?void 0:W.menus)==null?void 0:J.join("/"))+yl+((je=W==null?void 0:W.groups)==null?void 0:je.join("/"))}});let L=[];if(((V=(qa=h==null?void 0:h.replace("(",yl))==null?void 0:qa.split(yl))==null?void 0:V[0])!==""&&(L=(Z=(H=h==null?void 0:h.replace("(",yl))==null?void 0:H.split(yl))==null?void 0:Z[0],L=[L],L=L==null?void 0:L.map(W=>{var je,We,Sa;let J=W==null?void 0:W.split("*");return{menus:(je=J==null?void 0:J[0])==null?void 0:je.split(":"),content:((We=J==null?void 0:J[0])==null?void 0:We.replaceAll(":","/"))+yl+((Sa=J==null?void 0:J[1])==null?void 0:Sa.replaceAll(":","/"))}}),C=[...C,...L]),C=C==null?void 0:C.filter(W=>{var J;return(W==null?void 0:W.menus)&&((J=W==null?void 0:W.menus)==null?void 0:J.length)>0}),C=C==null?void 0:C.map(W=>W==null?void 0:W.content),C=[...new Set(C)],C=C==null?void 0:C.map(W=>{var J,je;return{menus:(J=W==null?void 0:W.split(yl))==null?void 0:J[0],groups:((je=W==null?void 0:W.split(yl))==null?void 0:je[1])??[]}}),g=j==null?void 0:j.filter(W=>{var J;return(W==null?void 0:W.filter)&&((J=W==null?void 0:W.filter)==null?void 0:J.includes("@Sync"))}),(g==null?void 0:g.length)>0&&(g=g==null?void 0:g.filter(W=>{var J,je,We,Sa;return(Sa=(We=(je=(J=te.analyzeSplitToContent(W==null?void 0:W.filter,","))==null?void 0:J.find(sa=>sa==null?void 0:sa.includes("@Sync")))==null?void 0:je.split(","))==null?void 0:We[0])==null?void 0:Sa.includes("Yes")}),g=us(g)),u=j==null?void 0:j.filter(W=>{var J;return(W==null?void 0:W.filter)&&((J=W==null?void 0:W.filter)==null?void 0:J.includes("@Sync"))}),(u==null?void 0:u.length)>0&&(u=u==null?void 0:u.filter(W=>{var J,je,We,Sa;return(Sa=(We=(je=(J=te.analyzeSplitToContent(W==null?void 0:W.filter,","))==null?void 0:J.find(sa=>sa==null?void 0:sa.includes("@Sync")))==null?void 0:je.split(","))==null?void 0:We[1])==null?void 0:Sa.includes("Yes")}),u=us(u)),h!==""&&(h!=null&&h.includes("@Sync"))&&(h==null?void 0:h[0])!=="("){let W=(ve=h==null?void 0:h.replace("(",yl))==null?void 0:ve.split(yl),J=W==null?void 0:W[1];if(J=J==null?void 0:J.slice(0,(J==null?void 0:J.length)-1),J=te.analyzeSplitToContent(J,","),(ia=(pa=(pe=J==null?void 0:J.find(je=>je==null?void 0:je.includes("@Sync")))==null?void 0:pe.split(","))==null?void 0:pa[0])!=null&&ia.includes("Yes")){let je=W==null?void 0:W[0];je=[{menus:(_a=(He=je==null?void 0:je.split("*"))==null?void 0:He[0])==null?void 0:_a.replaceAll(":","/"),groups:((ha=(Ae=je==null?void 0:je.split("*"))==null?void 0:Ae[1])==null?void 0:ha.split(":"))??[]}],g=[...g,...je]}if((ua=(Aa=(La=J==null?void 0:J.find(je=>je==null?void 0:je.includes("@Sync")))==null?void 0:La.split(","))==null?void 0:Aa[1])!=null&&ua.includes("Yes")){let je=W==null?void 0:W[0];je=[{menus:(Ce=(Ta=je==null?void 0:je.split("*"))==null?void 0:Ta[0])==null?void 0:Ce.replaceAll(":","/"),groups:((Je=(ma=je==null?void 0:je.split("*"))==null?void 0:ma[1])==null?void 0:Je.split(":"))??[]}],u=[...u,...je]}}return{groupName:r,tableColumns:s,tableFilter:h,tableContents:i,columns:(z==null?void 0:z.secondColumns)??[],relatedQuotes:C,fatherSyncContents:g,sonSyncContents:u,calculatorFilters:m}},sc=(a,l)=>(a=a==null?void 0:a.map((n,r)=>{var i,s,h,c;if(Array.isArray(n))n=n==null?void 0:n.map(d=>{var m,g,u,C;return d!=null&&d.isMainPath||(((m=d==null?void 0:d.children)==null?void 0:m.length)>0?d.children=sc(d.children,l):((g=d==null?void 0:d.menus)==null?void 0:g.length)>0&&!((u=n==null?void 0:n[0])!=null&&u.isMainPath)&&(d.menus=(C=d.menus)==null?void 0:C.map((I,k)=>{var G,z;return((G=d.menus)==null?void 0:G.length)-1===k&&I===""&&(l==null?void 0:l.parentContent)+"/"!==((z=d.menus)==null?void 0:z.join("/"))&&(I=l==null?void 0:l.value),d}),d.bindMenus=d.menus)),d});else{if(r===0&&((i=n.menus)==null?void 0:i.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((s=n.menus)==null?void 0:s.length)>0&&!((h=a==null?void 0:a[0])!=null&&h.isMainPath)&&(n.menus=(c=n.menus)==null?void 0:c.map((d,m)=>{var g,u;return((g=n.menus)==null?void 0:g.length)-1===m&&d===""&&(l==null?void 0:l.parentContent)+"/"!==((u=n.menus)==null?void 0:u.join("/"))&&(d=l==null?void 0:l.value),d}),n.bindMenus=n.menus)}return n}),a),lp=(a,l)=>(a=a==null?void 0:a.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=sc(n.contents,l)),n)),a),wt=(a,l)=>{let n=a;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(r=>(r=wt(r,l),r)):n=n==null?void 0:n.map(r=>{var i,s;return r!=null&&r.children&&((i=r==null?void 0:r.children)==null?void 0:i.length)>0?r.children=wt(r==null?void 0:r.children,l):r!=null&&r.words&&((s=r==null?void 0:r.words)==null?void 0:s.length)>0&&(l!=null&&l.find(h=>{var c,d,m,g;return((g=(c=r==null?void 0:r.prop)==null?void 0:c.split("."))==null?void 0:g[((m=(d=r==null?void 0:r.prop)==null?void 0:d.split("."))==null?void 0:m.length)-1])===h}))&&(r.mainKey=!0),r}),n};let Sr="$R";const rp=M.useUnit(M.pinia),{selectTitle:fn}=M.storeToRefs(rp),np=M.useMenuState(M.pinia),{localFiles:ip}=M.storeToRefs(np),op=M.useLoginState(M.pinia),{loginUserInfo:vt}=M.storeToRefs(op),Cn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@ShowHide",value:"onShowHide",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:"@MainParam",value:"onMainTagContents",order:3},{key:"@Button",value:"onButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixColumn",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 ui=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(ui||{});const tp=async a=>{var n,r,i,s,h,c,d,m,g,u,C,I,k,G,z,j,L;let l=te.analyzeSplitToContent((a==null?void 0:a.filter)??"",")");if((l==null?void 0:l.length)>1){let _=l==null?void 0:l[0];_=_==null?void 0:_.slice(1,(_==null?void 0:_.length)-1),_=(r=(n=_==null?void 0:_.replace("(",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1],_="("+((i=_==null?void 0:_.replaceAll("{",""))==null?void 0:i.replaceAll("}",""));let x=te.calculatorAndToOr(_),w=Object.keys(x==null?void 0:x[0]);if(_=x,((s=w==null?void 0:w[0])==null?void 0:s[0])==="$"){let b=(c=w==null?void 0:w[0])==null?void 0:c.slice(1,((h=w==null?void 0:w[0])==null?void 0:h.length)-1),E=(m=(d=b==null?void 0:b.split("*"))==null?void 0:d[0])==null?void 0:m.replaceAll(".","/"),F=(C=(u=(g=b==null?void 0:b.split("*"))==null?void 0:g[1])==null?void 0:u.split("."))==null?void 0:C[0],$=await Gr(E,!1);$=(I=$==null?void 0:$.filter(A=>(A==null?void 0:A.name)===F))==null?void 0:I[0];let le=(G=(k=$==null?void 0:$.compData)==null?void 0:k.find(A=>(A==null?void 0:A.key)==="tableContents"))==null?void 0:G.contents;_=_==null?void 0:_.map(A=>{var X,re;let ee={};for(let fe in A)if((fe==null?void 0:fe[0])==="$"){let $e=(re=fe==null?void 0:fe.split("."))==null?void 0:re[((X=fe==null?void 0:fe.split("."))==null?void 0:X.length)-1];ee[$e]=A==null?void 0:A[fe]}else ee[fe]=A==null?void 0:A[fe];return ee});let Q=(j=(z=$==null?void 0:$.compData)==null?void 0:z.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:j.contents;Q=(L=te.getEqualChild(Q))==null?void 0:L.filter(A=>(A==null?void 0:A.label)!=="操作");let de=te.tableToForm(le,Q);if(_==null||_.forEach(A=>{var ee,X,re,fe,$e;for(let ue in A)(A==null?void 0:A[ue])==="LoginUser"&&(A[ue]=((ee=vt.value)==null?void 0:ee.姓名)||((X=vt.value)==null?void 0:X.account)||((re=vt.value)==null?void 0:re.账号)),!((fe=de==null?void 0:de[0])!=null&&fe.find(B=>{var se;return(B==null?void 0:B.key)===ue||((se=B==null?void 0:B.key)==null?void 0:se.includes(ue))}))&&!(de!=null&&de.find(B=>{var se;return(B==null?void 0:B.key)===ue||((se=B==null?void 0:B.key)==null?void 0:se.includes(ue))}))||((($e=A[ue])==null?void 0:$e[0])!=="!"?de=de==null?void 0:de.filter(B=>{var se,U;return((se=B==null?void 0:B.find(be=>{var Me;return(be==null?void 0:be.key)===ue||((Me=be==null?void 0:be.key)==null?void 0:Me.includes(ue))}))==null?void 0:se.value)===A[ue]||Array.isArray(A==null?void 0:A[ue])&&((U=A==null?void 0:A[ue])==null?void 0:U.find(be=>{var Me;return((Me=B==null?void 0:B.find(Ve=>{var aa;return(Ve==null?void 0:Ve.key)===ue||((aa=Ve==null?void 0:Ve.key)==null?void 0:aa.includes(ue))}))==null?void 0:Me.value)===be}))}):de=de==null?void 0:de.filter(B=>{var se;return((se=B==null?void 0:B.find(U=>{var be;return(U==null?void 0:U.key)===ue||((be=U==null?void 0:U.key)==null?void 0:be.includes(ue))}))==null?void 0:se.value)!==A[ue]}))}),(de==null?void 0:de.length)===0){let A=a==null?void 0:a.contents;return A.push({key:"hideContents",contents:!0}),A}}}return a==null?void 0:a.contents},sp=a=>{var l,n,r,i,s;if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let h=a==null?void 0:a.contents,c=a==null?void 0:a.filter;(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(l=te.analyzeSplitToContent(c,","))==null?void 0:l.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m)),c=c==null?void 0:c[1],(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(n=te.analyzeSplitToContent(c,","))==null?void 0:n.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m));let d=(s=(i=(r=ip.value)==null?void 0:r.filter(m=>{var g;return(m==null?void 0:m.path)===((g=a==null?void 0:a.groupName)==null?void 0:g[0])}))==null?void 0:i[0])==null?void 0:s.children;return d=(d==null?void 0:d.filter(m=>c==null?void 0:c.find(g=>g===(m==null?void 0:m.name))))??[],(c==null?void 0:c.length)>0&&(d==null?void 0:d.length)===0&&(c==null||c.forEach(m=>{d.push({url:"file:///"+(m==null?void 0:m.replaceAll("\\","/"))})})),h.push({key:"backGround",contents:d}),h}return a==null?void 0:a.contents},cp=a=>{const l=uc(a==null?void 0:a.filter);return l?dc(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},up=a=>{const l=uc(a==null?void 0:a.filter);return l?dc(a==null?void 0:a.contents,{size:l}):a==null?void 0:a.contents},dp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const n=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(n)?a==null?void 0:a.filter:n}),l}return a==null?void 0:a.contents},pp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;return l.push({key:"textRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},fp=a=>{var n;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(r=>{var i;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(i=r.contents)==null?void 0:i.slice(0,parseInt(a==null?void 0:a.filter))),r})},hp=async a=>{var l,n,r,i,s,h,c,d,m,g,u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me,de,A;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(X=>((X==null?void 0:X.key)==="tableContents"&&(X.contents=te.shuffle(X.contents)),X));if((a==null?void 0:a.filter)==="Auto"){let ee=(r=(n=a==null?void 0:a.contents)==null?void 0:n.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:r.contents;Array.isArray(ee==null?void 0:ee[0])&&(ee=ee==null?void 0:ee[0]),ee=te.getColumnChild(ee);let X=ee==null?void 0:ee.filter(be=>(be==null?void 0:be.filter)&&(be==null?void 0:be.filter)!==""),re=new Map,fe=[];X==null||X.forEach(be=>{var Me,Ve;re.get((Me=be==null?void 0:be.menus)==null?void 0:Me.join("/"))||(re.set((Ve=be==null?void 0:be.menus)==null?void 0:Ve.join("/"),be),fe.push(be))});let $e=(s=(i=fn==null?void 0:fn.value)==null?void 0:i.find(be=>(be==null?void 0:be.condition)==="child"))==null?void 0:s.value,ue=fe==null?void 0:fe.map(be=>{var Me,Ve,aa;return be=(Me=be==null?void 0:be.menus)==null?void 0:Me.join("/"),(be==null?void 0:be[(be==null?void 0:be.length)-1])==="/"&&((aa=(Ve=fn==null?void 0:fn.value)==null?void 0:Ve.find(Ea=>(Ea==null?void 0:Ea.condition)==="child"))==null?void 0:aa.parentContent)+"/"!==be?be=be+$e:(be==null?void 0:be[(be==null?void 0:be.length)-1])==="/"&&(be=be==null?void 0:be.slice(0,(be==null?void 0:be.length)-1)),be}),B=fe==null?void 0:fe.map(be=>be==null?void 0:be.groups),se=ue==null?void 0:ue.map(async be=>{let Me=await Gr(be,!1);return{path:be,contents:Me}});se=await Promise.all(se);let U=se==null?void 0:se.map((be,Me)=>{var aa,Ea,ne,ta,ce,ca,we;let Ve=(aa=be==null?void 0:be.contents)==null?void 0:aa.filter(ge=>{var he,Ke;return(ge==null?void 0:ge.name)===((Ke=B==null?void 0:B[Me])==null?void 0:Ke[((he=B==null?void 0:B[Me])==null?void 0:he.length)-1])});return Ve=(ta=(ne=(Ea=Ve==null?void 0:Ve[0])==null?void 0:Ea.compData)==null?void 0:ne.find(ge=>(ge==null?void 0:ge.key)==="tableContents"))==null?void 0:ta.contents,(be==null?void 0:be.path)===((ca=(ce=fn==null?void 0:fn.value)==null?void 0:ce.find(ge=>(ge==null?void 0:ge.condition)==="child"))==null?void 0:ca.parentContent)&&(Ve=((we=Ve==null?void 0:Ve.map(ge=>{for(let he in ge)if(ge[he]===$e)return ge}))==null?void 0:we.filter(ge=>ge))??[]),Ve??[]});if(U=U==null?void 0:U.map(be=>(be=be==null?void 0:be.map(Me=>{var aa;let Ve={};for(let Ea in Me)if(X!=null&&X.find(ne=>{var ta,ce;return((ce=(ta=ne==null?void 0:ne.words)==null?void 0:ta[0])==null?void 0:ce.replaceAll("'",""))===Ea})){let ne=(aa=X==null?void 0:X.find(ta=>{var ce,ca;return((ca=(ce=ta==null?void 0:ta.words)==null?void 0:ce[0])==null?void 0:ca.replaceAll("'",""))===Ea}))==null?void 0:aa.prop;Ve[ne]=Me==null?void 0:Me[Ea]}return Ve}),be)),U=te.cartesianProduct(U),Array.isArray(U==null?void 0:U[0])&&(U=U==null?void 0:U[0]),(U==null?void 0:U.length)>0&&((u=(c=(h=X==null?void 0:X[0])==null?void 0:h.menus)==null?void 0:c.join("/"))==null?void 0:u[((g=(m=(d=X==null?void 0:X[0])==null?void 0:d.menus)==null?void 0:m.join("/"))==null?void 0:g.length)-1])==="/")return(C=a==null?void 0:a.contents)==null?void 0:C.map(Me=>{var Ve;return(Me==null?void 0:Me.key)==="tableContents"&&(U==null?void 0:U.length)>0&&(Me.contents=((Ve=Me.contents)==null?void 0:Ve.length)>0?Me.contents:U),Me})}if((a==null?void 0:a.filter)==="Manual"){let ee=[],X=[],re=(k=(I=a==null?void 0:a.contents)==null?void 0:I.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:k.contents;(re==null?void 0:re[(re==null?void 0:re.length)-1])===")"?re=(z=(G=re==null?void 0:re.replace("(",Sr))==null?void 0:G.split(Sr))==null?void 0:z[0]:re="",re!==""&&(ee=((L=(j=re==null?void 0:re.split("*"))==null?void 0:j[0])==null?void 0:L.split(":"))??[],X=((E=(b=(w=(x=(_=re==null?void 0:re.split("*"))==null?void 0:_[1])==null?void 0:x.replace("{",Sr))==null?void 0:w.split(Sr))==null?void 0:b[0])==null?void 0:E.split(":"))??[]);let fe=($=(F=a==null?void 0:a.contents)==null?void 0:F.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:$.contents;fe=(Q=(le=fe==null?void 0:fe.replace("(",Sr))==null?void 0:le.split(Sr))==null?void 0:Q[1],fe=fe==null?void 0:fe.slice(0,(fe==null?void 0:fe.length)-1);let $e=(me=a==null?void 0:a.contents)==null?void 0:me.map(B=>{var se,U,be,Me,Ve,aa,Ea,ne,ta;return(B==null?void 0:B.key)==="header"&&((se=B==null?void 0:B.contents)!=null&&se.every(ce=>(ce==null?void 0:ce.mainKey)!==!0)&&Array.isArray(B==null?void 0:B.contents)&&!Array.isArray((U=B==null?void 0:B.contents)==null?void 0:U[0])?B.contents=(be=B==null?void 0:B.contents)==null?void 0:be.map((ce,ca)=>{var we,ge,he;return ce!=null&&ce.isMainPath||(ca===0?(ce.mainKey=!0,ce.formType="Select",ce.bindMenus=ee,ce.groups=((we=ce.groups)==null?void 0:we.length)===0?X:ce.groups,ce.words=((ge=ce.words)==null?void 0:ge.length)===0?[ce==null?void 0:ce.prop]:ce.words,ce.filter=fe,(!(ce!=null&&ce.menus)||((he=ce==null?void 0:ce.menus)==null?void 0:he.length)===0)&&(ce.menus=ee)):(ce.mainKey=!1,ce.bindMenus=ee)),ce}):Array.isArray((Me=B==null?void 0:B.contents)==null?void 0:Me[0])&&((Ea=(aa=(Ve=B==null?void 0:B.contents)==null?void 0:Ve[0])==null?void 0:aa.filter(()=>(ee==null?void 0:ee.length)>0))==null?void 0:Ea.length)>0&&(B.contents[0]=(ta=(ne=B==null?void 0:B.contents)==null?void 0:ne[0])==null?void 0:ta.map((ce,ca)=>{var we,ge,he;return ce!=null&&ce.isMainPath||(ca===0?(ce.mainKey=!0,ce.formType="Select",ce.bindMenus=ee,ce.groups=((we=ce.groups)==null?void 0:we.length)===0?X:ce.groups,ce.words=((ge=ce.words)==null?void 0:ge.length)===0?[ce==null?void 0:ce.prop]:ce.words,ce.filter=fe,(!(ce!=null&&ce.menus)||Array.isArray(ce==null?void 0:ce.menus)&&((he=ce==null?void 0:ce.menus)==null?void 0:he.length)===0)&&(ee==null?void 0:ee.length)>0&&(ce.menus=ee)):(ce.mainKey=!1,ce.bindMenus=ee)),ce}))),B}),ue=(de=$e==null?void 0:$e.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:de.contents;if(Array.isArray(ue==null?void 0:ue[0])&&(ue=ue==null?void 0:ue[0]),ue=te.getColumnChild(ue),ue!=null&&ue.some(B=>{var se,U;return((U=B==null?void 0:B.menus)==null?void 0:U[((se=B==null?void 0:B.menus)==null?void 0:se.length)-1])===""})){let B=(A=fn==null?void 0:fn.value)==null?void 0:A.find(se=>(se==null?void 0:se.condition)==="child");$e=lp($e,B)}return $e}if((a==null?void 0:a.filter)==="Chart"){let ee=a==null?void 0:a.contents;return ee.push({key:"newType",contents:"Chart"}),ee}if((a==null?void 0:a.filter)==="Carousel"){let ee=a==null?void 0:a.contents;return ee.push({key:"newType",contents:"Carousel"}),ee}return a==null?void 0:a.contents},vp=a=>{if((a==null?void 0:a.filter)==="Ordin"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:1}),l}if((a==null?void 0:a.filter)==="Block"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:2}),l}if((a==null?void 0:a.filter)==="Text"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:3}),l}if((a==null?void 0:a.filter)==="Bar"||(a==null?void 0:a.filter)==="Pie"||(a==null?void 0:a.filter)==="Line"||(a==null?void 0:a.filter)==="Histogram"||(a==null?void 0:a.filter)==="Scatter"){let l=a==null?void 0:a.contents;return l.push({key:"ChartType",contents:{type:a==null?void 0:a.filter,title:""}}),l}return a==null?void 0:a.contents},mp=a=>{var r,i,s,h,c,d,m,g,u,C,I,k;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((i=(r=l==null?void 0:l.replace(":",Sr))==null?void 0:r.split(Sr))==null?void 0:i[1])),l=(s=l==null?void 0:l.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(c=(h=l==null?void 0:l.split("="))==null?void 0:h[1])!=null&&c.includes("$")){(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let G=(d=l==null?void 0:l.split("="))==null?void 0:d[0],z=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(g=z==null?void 0:z.slice(1,z==null?void 0:z.length))!=null&&g.includes("$")&&(z=(I=(C=(u=fn==null?void 0:fn.value)==null?void 0:u.filter(j=>(j==null?void 0:j.condition)==="child"))==null?void 0:C[0])==null?void 0:I.value),l=G+"="+z}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let n=te.calculatorAndToOr(l);if((n==null?void 0:n.length)>0){let G=[];return n==null||n.forEach(j=>{let L={};for(let _ in j){let x=_;x!=null&&x.includes("[")||(L[x]=j[_])}G.push(L)}),(k=a==null?void 0:a.contents)==null?void 0:k.map(j=>{var _,x,w;let L=(x=(_=a==null?void 0:a.contents)==null?void 0:_.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:x.contents;if(L=(w=te.getEqualChild(L))==null?void 0:w.filter(b=>(b==null?void 0:b.label)!=="操作"),(j==null?void 0:j.key)==="tableContents"){let E=te.tableToForm(j==null?void 0:j.contents,L);G==null||G.forEach(F=>{var $,le;for(let Q in F)!(($=E==null?void 0:E[0])!=null&&$.find(me=>{var de;return(me==null?void 0:me.key)===Q||((de=me==null?void 0:me.key)==null?void 0:de.includes(Q))}))&&!(E!=null&&E.find(me=>{var de;return(me==null?void 0:me.key)===Q||((de=me==null?void 0:me.key)==null?void 0:de.includes(Q))}))||(((le=F[Q])==null?void 0:le[0])!=="!"?E=E==null?void 0:E.filter(me=>{var de,A;return((de=me==null?void 0:me.find(ee=>{var X;return(ee==null?void 0:ee.key)===Q||((X=ee==null?void 0:ee.key)==null?void 0:X.includes(Q))}))==null?void 0:de.value)===F[Q]||Array.isArray(F==null?void 0:F[Q])&&((A=F==null?void 0:F[Q])==null?void 0:A.find(ee=>{var X;return((X=me==null?void 0:me.find(re=>{var fe;return(re==null?void 0:re.key)===Q||((fe=re==null?void 0:re.key)==null?void 0:fe.includes(Q))}))==null?void 0:X.value)===ee}))}):E=E==null?void 0:E.filter(me=>{var de;return((de=me==null?void 0:me.find(A=>{var ee;return(A==null?void 0:A.key)===Q||((ee=A==null?void 0:A.key)==null?void 0:ee.includes(Q))}))==null?void 0:de.value)!==F[Q]}))}),(E==null?void 0:E.length)===0?j.contents=[]:j.contents=E==null?void 0:E.map(F=>{let $={};return F==null||F.forEach(le=>{$[le==null?void 0:le.key]=le==null?void 0:le.value}),$})}return j})}return a==null?void 0:a.contents},yp=a=>a==null?void 0:a.contents,gp=a=>a==null?void 0:a.contents,bp=a=>{var l,n,r,i;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let s=(r=(n=a==null?void 0:a.filter)==null?void 0:n.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:r.split(",");return(i=a==null?void 0:a.contents)==null?void 0:i.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=wt(c.contents,s)),c))}return a==null?void 0:a.contents},kp=a=>{var n,r,i,s,h;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(r=(n=l==null?void 0:l.replace("(",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1];c=c==null?void 0:c.slice(0,(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.slice(1,(c==null?void 0:c.length)-1)),c=(i=te.analyzeSplitToContent(c,","))==null?void 0:i.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));let d=c==null?void 0:c[0];(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1));let m=(c==null?void 0:c[1])??"Up",g=(s=a==null?void 0:a.contents)==null?void 0:s.map(u=>{var C,I;if(m==="Up"){if((u==null?void 0:u.key)==="extraButton"){let k=(C=d==null?void 0:d.split(","))==null?void 0:C.map(G=>({label:G,prop:G}));u.contents=[...k??[],...u.contents]}}else if(m==="Line"&&(u==null?void 0:u.key)==="rowButton"){let k=(I=d==null?void 0:d.split(","))==null?void 0:I.map(G=>({label:G,prop:G}));u.contents=[...k??[],...u.contents]}return u});if(m==="Bottom"||m==="Down"){let u=(h=d==null?void 0:d.split(","))==null?void 0:h.map(C=>({label:C,prop:C}));g.push({key:"bottomButton",contents:u})}return g}return a==null?void 0:a.contents},xp=a=>a==null?void 0:a.contents,wp=a=>{var n;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(n=a==null?void 0:a.contents)==null?void 0:n.map(i=>{var s;return(i==null?void 0:i.key)==="rowButton"&&(i.contents=(s=l==null?void 0:l.split(","))==null?void 0:s.map(h=>({label:h,prop:h}))),i}):a==null?void 0:a.contents},_p=a=>{var n;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let r=a==null?void 0:a.contents,i=(n=l==null?void 0:l.split(","))==null?void 0:n.map(s=>({label:s,prop:s}));return r.push({key:"bottomButton",contents:i}),r}return a==null?void 0:a.contents},Sp=a=>{if((a==null?void 0:a.filter)==="Read"){let l=a==null?void 0:a.contents;return l=l==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(r=n.contents)==null?void 0:r.map(i=>(i.isNoClick=!0,i))),n}),l!=null&&l.find(n=>(n==null?void 0:n.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(n=>(n==null?void 0:n.key)!=="extraButton"&&(n==null?void 0:n.key)!=="rowButton")),l}return a==null?void 0:a.contents},Ep=a=>{var l;if(a!=null&&a.filter){const n=parseInt(a==null?void 0:a.filter);return!n||Number.isNaN(n)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var s;return(i==null?void 0:i.key)==="formContent"&&(i.contents=(s=i.contents)==null?void 0:s.map(h=>(h.width=n,h))),i})}return a==null?void 0:a.contents},Cp=a=>{var l,n,r,i;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const s=parseInt(a==null?void 0:a.filter);return!s||Number.isNaN(s)?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(c=>{var d;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(d=c.contents)==null?void 0:d.map(m=>(m.width=s,m))),c})}if(((r=a==null?void 0:a.filter)==null?void 0:r[0])==="["){let s=Ai(a==null?void 0:a.filter),h=Array.isArray(s)?s.map(d=>parseInt(d)).filter(d=>!!d&&!Number.isNaN(d)):[];return h.length?(i=a==null?void 0:a.contents)==null?void 0:i.map(d=>{if((d==null?void 0:d.key)==="formContent"){const m=d.contents??[];d.contents=m.map((g,u)=>{const C=u+1;let I=0,k=0;for(let z=0;z<h.length;z++){if(k+=h[z],C<=k){I=z;break}z===h.length-1&&(I=h.length-1)}const G=h[I]||h[h.length-1]||1;return g.width=G,g})}return d}):a==null?void 0:a.contents}return a==null?void 0:a.contents},Dp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.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(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var s,h,c;return(i==null?void 0:i.key)==="header"&&(Array.isArray((s=i==null?void 0:i.contents)==null?void 0:s[0])?i.contents[0]=(c=i.contents[0])==null?void 0:c.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d)):i.contents=(h=i.contents)==null?void 0:h.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d))),i})}return a==null?void 0:a.contents},Tp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.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 r=s=>(n!=null&&n.find(h=>h===(s==null?void 0:s.prop))&&(s.required=!0),s!=null&&s.children&&Array.isArray(s.children)&&(s.children=s.children.map(h=>r(h))),s);return(l=a==null?void 0:a.contents)==null?void 0:l.map(s=>{var h,c,d;return(s==null?void 0:s.key)==="header"&&(Array.isArray((h=s==null?void 0:s.contents)==null?void 0:h[0])?s.contents[0]=(d=s.contents[0])==null?void 0:d.map(m=>r(m)):s.contents=(c=s.contents)==null?void 0:c.map(m=>r(m))),s})}return a==null?void 0:a.contents},Bp=async a=>{var r,i,s,h,c,d,m,g,u,C,I,k,G,z,j,L,_;const l=M.useUnit(M.pinia),{chooseTitle:n}=M.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let x=await Gr(((i=(r=n==null?void 0:n.value)==null?void 0:r[0])==null?void 0:i.parentContent)??((h=(s=n==null?void 0:n.value)==null?void 0:s[0])==null?void 0:h.relatedContent),!1),w=(d=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:d.value;(g=(m=x==null?void 0:x[0])==null?void 0:m.compData)!=null&&g.find($=>($==null?void 0:$.key)==="header")?x=(u=x==null?void 0:x[0])==null?void 0:u.compData:x=(I=(C=x==null?void 0:x.filter($=>{var le;return(le=$==null?void 0:$.compData)==null?void 0:le.find(Q=>(Q==null?void 0:Q.key)==="header")}))==null?void 0:C[0])==null?void 0:I.compData;let b=(k=x==null?void 0:x.find($=>($==null?void 0:$.key)==="header"))==null?void 0:k.contents;Array.isArray(b==null?void 0:b[0])&&(b=b==null?void 0:b[0]),b=((G=b==null?void 0:b.find($=>$==null?void 0:$.isMainKey))==null?void 0:G.prop)??((z=b==null?void 0:b[0])==null?void 0:z.prop);let E=(L=(j=x==null?void 0:x.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:j.contents)==null?void 0:L.find($=>($==null?void 0:$[b])===w);return(_=a==null?void 0:a.contents)==null?void 0:_.map($=>{var le;return($==null?void 0:$.key)==="formContent"&&($.contents=(le=$.contents)==null?void 0:le.map(Q=>(Q.value=E==null?void 0:E[Q==null?void 0:Q.prop],Q))),$})}return a==null?void 0:a.contents},Np=a=>{var l,n,r,i,s;if((l=a==null?void 0:a.extra)!=null&&l.row){let h=a==null?void 0:a.filter;if(h!=null&&h.includes("*")&&(h="({"+((r=(n=h==null?void 0:h.replace("{",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1])),h=(i=h==null?void 0:h.replaceAll("{",""))==null?void 0:i.replaceAll("}",""),(h==null?void 0:h[0])!=="("&&(h="("+h+")"),h.slice(1,(h==null?void 0:h.length)-1)==="undefined")return a==null?void 0:a.contents;let c=te.calculatorAndToOr(h),d=c==null?void 0:c[0],m=(s=a==null?void 0:a.extra)==null?void 0:s.row,g=[];for(let u in d)(d==null?void 0:d[u])===(m==null?void 0:m[u])?g.push(!0):g.push(!1);return g!=null&&g.every(u=>u===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Ap=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"tab",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},zp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"choice",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Mp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"fixType",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Ip=a=>{var l;if(a!=null&&a.filter){let n=a==null?void 0:a.contents,r=a==null?void 0:a.filter;return(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=(l=te.analyzeSplitToContent(r,","))==null?void 0:l.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)),n.push({key:"stepName",contents:r}),n}return a==null?void 0:a.contents},Op=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},cc={onNumSlice:fp,onRandomContents:hp,onConditionContents:mp,onFatherPaceContents:yp,onPaceContents:gp,onMainTagContents:bp,onButtonContents:kp,onPamButtonContents:xp,onRowButtonContents:wp,onRelated:Bp,onRowNum:Cp,onFixRow:Dp,onReqItem:Tp,onBottomButtonContents:_p,onConditionContent:Np,onTabs:Ap,onSinChoice:zp,onTextSize:dp,onTextRGBA:pp,onPosition:cp,onSize:up,onShowType:Mp,onStepName:Ip,onStep:Op,onInterfaceTypeContents:vp,onBackGround:sp,onMaxColumn:Ep,onEditRead:Sp,onShowHide:tp},Lp=async(a,l,n="")=>{var h,c,d,m,g,u,C,I,k,G,z,j;let r="";if(((h=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:h.contents)!==""&&(r=(c=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:c.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(m=(d=r==null?void 0:r.replace("(",Sr))==null?void 0:d.split(Sr))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(g=te.analyzeSplitToContent(r,","))==null?void 0:g.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L!=null&&L.includes("(")||(L=L==null?void 0:L.replaceAll(":","=")),L)),s=a;for(let L in i){let _,x="";_=(I=(C=(u=i==null?void 0:i[L])==null?void 0:u.replace("=",Sr))==null?void 0:C.split(Sr))==null?void 0:I[0],x=(z=(G=(k=i==null?void 0:i[L])==null?void 0:k.replace("=",Sr))==null?void 0:G.split(Sr))==null?void 0:z[1];let w=(j=Cn==null?void 0:Cn.find(b=>(b==null?void 0:b.key)===_))==null?void 0:j.value;if(w){const b=cc[w];s=await b({contents:s,filter:x,extra:l,groupName:n})}}return s},Po=async(a,l,n="")=>{var c,d,m,g,u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le;let r="";if(((c=a==null?void 0:a.find(Q=>(Q==null?void 0:Q.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(d=a==null?void 0:a.find(Q=>(Q==null?void 0:Q.key)==="filter"))==null?void 0:d.contents),r===""||!r)return a;(r==null?void 0:r[0])===","&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(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=(g=(m=r==null?void 0:r.replace("(",Sr))==null?void 0:m.split(Sr))==null?void 0:g[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(u=te.analyzeSplitToContent(r,","))==null?void 0:u.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!=null&&Q.includes("(")||(Q=Q==null?void 0:Q.replaceAll(":","=")),Q)),s=a,h=new Map;i==null||i.forEach(Q=>{var de,A,ee;let me=(de=Q==null?void 0:Q.split("="))==null?void 0:de[0];if(me==="@MainParam"&&h.get(me)){let X=h.get(me);X=X==null?void 0:X.slice(0,(X==null?void 0:X.length)-1);let re=(ee=(A=Q==null?void 0:Q.replace("{",Sr))==null?void 0:A.split(Sr))==null?void 0:ee[1];re=X+","+re,h.set(me,re)}else me==="@Button"&&h.get(me)?h.set(Q,Q):h.set(me,Q)}),i=Array.from(h.values()),i=i==null?void 0:i.sort((Q,me)=>{var de,A;return((de=Cn==null?void 0:Cn.find(ee=>me==null?void 0:me.includes(ee==null?void 0:ee.key)))==null?void 0:de.order)-((A=Cn==null?void 0:Cn.find(ee=>Q==null?void 0:Q.includes(ee==null?void 0:ee.key)))==null?void 0:A.order)});for(let Q in i){let me,de="";(C=i==null?void 0:i[Q])!=null&&C.includes("(")&&((I=i==null?void 0:i[Q])!=null&&I.includes("@If"))?(me=(z=(G=(k=i==null?void 0:i[Q])==null?void 0:k.replace("(",Sr))==null?void 0:G.split(Sr))==null?void 0:z[0],de="("+((_=(L=(j=i==null?void 0:i[Q])==null?void 0:j.replace("(",Sr))==null?void 0:L.split(Sr))==null?void 0:_[1])):(me=(b=(w=(x=i==null?void 0:i[Q])==null?void 0:x.replace("=",Sr))==null?void 0:w.split(Sr))==null?void 0:b[0],de=($=(F=(E=i==null?void 0:i[Q])==null?void 0:E.replace("=",Sr))==null?void 0:F.split(Sr))==null?void 0:$[1]);let A=(le=Cn==null?void 0:Cn.find(ee=>(ee==null?void 0:ee.key)===me))==null?void 0:le.value;if(A){const ee=cc[A];s=await ee({contents:s,filter:de,extra:l,groupName:n})}}return s},uc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const n=l.slice(1,-1).split(",").map(r=>Number(r.trim()));return n.length<2||n.some(r=>Number.isNaN(r))?null:[n[0],n[1]]},dc=(a,l)=>{var G,z,j,L,_;const n=Array.isArray(a)?a:[],r=n.find(x=>(x==null?void 0:x.key)==="formContent"),i=Array.isArray(r==null?void 0:r.contents)?r.contents:[],s=((G=n.find(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"))==null?void 0:G.contents)??{},h=(i==null?void 0:i[0])??{};let c=((z=l==null?void 0:l.position)==null?void 0:z[0])??(s==null?void 0:s._positionStartRow)??(h==null?void 0:h._positionStartRow),d=((j=l==null?void 0:l.position)==null?void 0:j[1])??(s==null?void 0:s._positionRowSpan)??(h==null?void 0:h._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!d||Number.isNaN(d)||d<1)&&(d=1);let m=((L=l==null?void 0:l.size)==null?void 0:L[0])??(s==null?void 0:s._sizeStart)??(h==null?void 0:h._sizeStart),g=((_=l==null?void 0:l.size)==null?void 0:_[1])??(s==null?void 0:s._sizeEnd)??(h==null?void 0:h._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(g===void 0||Number.isNaN(g))&&(g=1),m=Math.max(0,Math.min(1,m)),g=Math.max(0,Math.min(1,g)),g<=m&&(m=0,g=1);const u=g-m,C=Math.max(1,Math.round(1/u));let I=n.map(x=>{if((x==null?void 0:x.key)!=="formContent")return x;const w=Array.isArray(x==null?void 0:x.contents)?x.contents:[];return{...x,contents:w.map(b=>({...b,width:C,_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:g}))}});const k={_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:g};return I.some(x=>(x==null?void 0:x.key)==="_gridLayoutMeta")?I=I.map(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"?{...x,contents:k}:x):I.push({key:"_gridLayoutMeta",contents:k}),I};let go="$R";const Rp=M.useUnit(M.pinia),{selectTitle:$p}=M.storeToRefs(Rp);let Vp=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Fp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Pp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],jp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ps=async(a,l,n=!0)=>{let r=[],i=a==null?void 0:a.map(async s=>{var u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me,de,A,ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa,V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W,J,je,We,Sa,sa,Va,Re,Oe,Le,Be,ze,ul,Cl,Ml,Rl,Al,er,Qa,Ul,Ua,ql,Il,lr,_l,xr,Ra,nl,va,za,da,Ha,Dl,Te,na,ja,Ee,Ma,Ya,vl,wl;let h=(k=(I=(C=(u=s==null?void 0:s.contents)==null?void 0:u.find(Ie=>{var ba;return(ba=Ie==null?void 0:Ie.key)==null?void 0:ba.includes("struct")}))==null?void 0:C.value)==null?void 0:I[0])==null?void 0:k.类型,c=Object.values(s==null?void 0:s.name);c=c==null?void 0:c.reverse();let d=(G=s==null?void 0:s.contents)==null?void 0:G.map(Ie=>Ie==null?void 0:Ie.key),m={comp:h,isShow:s==null?void 0:s.is_show,name:c==null?void 0:c[0],id:s==null?void 0:s.object_id,order_no:s==null?void 0:s.order_no,relatedTables:d,menuFilter:(z=s==null?void 0:s.filter)==null?void 0:z.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:(j=s==null?void 0:s.filter)==null?void 0:j.fatherSyncs,relatedQuotes:(L=s==null?void 0:s.filter)==null?void 0:L.quotes,sonSyncContents:(_=s==null?void 0:s.filter)==null?void 0:_.sonSyncs,nameContents:(x=M.cloneDeep(c))==null?void 0:x.reverse(),isHidden:!1,calculatorFilters:($=(F=(E=(b=(w=s==null?void 0:s.contents)==null?void 0:w.find(Ie=>{var ba;return(ba=Ie==null?void 0:Ie.key)==null?void 0:ba.includes("struct")}))==null?void 0:b.value)==null?void 0:E[0])==null?void 0:F.算法)==null?void 0:$.contents};for(let Ie in c)parseInt(Ie)>=1&&(m[`name${parseInt(Ie)-1}`]=c[Ie]);let g=Array.isArray((le=s==null?void 0:s.filter)==null?void 0:le.menuFilter)?(Q=s==null?void 0:s.filter)==null?void 0:Q.menuFilter:[];if(((me=g==null?void 0:g.filter(Ie=>Ie==null?void 0:Ie.includes("@If")))==null?void 0:me.length)>0){let Ie=g==null?void 0:g.filter(Fe=>Fe==null?void 0:Fe.includes("@If"));Ie=Ie==null?void 0:Ie[0],Ie=(A=(de=Ie==null?void 0:Ie.replace("(",go))==null?void 0:de.split(go))==null?void 0:A[1],Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1),Ie!=null&&Ie.includes("*")&&(Ie=(X=(ee=Ie==null?void 0:Ie.replace("{",go))==null?void 0:ee.split(go))==null?void 0:X[1],Ie=Ie==null?void 0:Ie.replace("}","")),Ie=te.calculatorAndToOr(Ie);let ba=(l==null?void 0:l.originPath)??"";(ba==null?void 0:ba[(ba==null?void 0:ba.length)-1])==="/"&&(ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1));let oa=await Gr(ba,!1),wa=(re=oa==null?void 0:oa.filter(Fe=>(Fe==null?void 0:Fe.comp)==="Table"))==null?void 0:re[0];wa=($e=(fe=wa==null?void 0:wa.compData)==null?void 0:fe.find(Fe=>(Fe==null?void 0:Fe.key)==="tableContents"))==null?void 0:$e.contents;let ga=(B=(ue=$p.value)==null?void 0:ue.find(Fe=>(Fe==null?void 0:Fe.condition)==="child"))==null?void 0:B.value;wa=(se=wa==null?void 0:wa.map(Fe=>{for(let gl in Fe)if((Fe==null?void 0:Fe[gl])===ga)return Fe}))==null?void 0:se.filter(Fe=>Fe),wa=wa==null?void 0:wa[0],Ie=Ie==null?void 0:Ie[0];let ol=[];for(let Fe in Ie){let gl="";Ja.isObject(wa)&&(gl=(be=(U=Object.keys(wa))==null?void 0:U.filter(Ne=>Ne==null?void 0:Ne.includes("."+Fe)))==null?void 0:be[0]),gl!==""&&(wa!=null&&wa[gl])&&(Ie==null?void 0:Ie[Fe])===(wa==null?void 0:wa[gl])||wa!=null&&wa[Fe]&&(Ie==null?void 0:Ie[Fe])===(wa==null?void 0:wa[Fe])?ol.push(!0):ol.push(!1)}if(ol!=null&&ol.some(Fe=>Fe===!1)&&((Ve=l==null?void 0:l.originPath)==null?void 0:Ve[((Me=l==null?void 0:l.originPath)==null?void 0:Me.length)-1])!=="/")return}if(h==="Table"||h==="Method"){!n&&((aa=m==null?void 0:m.fatherSyncContents)==null?void 0:aa.length)>0;let Ie=((Ea=s==null?void 0:s.contents)==null?void 0:Ea.find(Ca=>{var sl;return(sl=Ca==null?void 0:Ca.key)==null?void 0:sl.includes("content")}))||[],ba=[];m.comp="Table",Ie.value=(ne=Ie==null?void 0:Ie.value)==null?void 0:ne.sort((Ca,sl)=>parseInt(Ca==null?void 0:Ca.id)-parseInt(sl==null?void 0:sl.id)),Ie.value=(ta=Ie==null?void 0:Ie.value)==null?void 0:ta.map(Ca=>{let sl={};for(let Za in Ca)JSON.stringify(Ca==null?void 0:Ca[Za])==="{}"?sl[Za]="":sl[Za]=Ca==null?void 0:Ca[Za];return sl}),ba.push({key:"tableContents",contents:Ie==null?void 0:Ie.value});let oa=(he=(ge=(we=(ca=(ce=s==null?void 0:s.contents)==null?void 0:ce.find(Ca=>{var sl;return(sl=Ca==null?void 0:Ca.key)==null?void 0:sl.includes("struct")}))==null?void 0:ca.value)==null?void 0:we[0])==null?void 0:ge.结构)==null?void 0:he.contents;Array.isArray(oa==null?void 0:oa[0])?oa[0]=(Ke=oa==null?void 0:oa[0])==null?void 0:Ke.filter(Ca=>(Ca==null?void 0:Ca.prop)!=="sort"&&(Ca==null?void 0:Ca.prop)!=="relatedId"):oa=oa==null?void 0:oa.filter(Ca=>(Ca==null?void 0:Ca.prop)!=="sort"&&(Ca==null?void 0:Ca.prop)!=="relatedId"),ba.push({key:"header",contents:oa}),ba.push({key:"filter",contents:(Z=(H=(V=(qa=(fa=s==null?void 0:s.contents)==null?void 0:fa.find(Ca=>{var sl;return(sl=Ca==null?void 0:Ca.key)==null?void 0:sl.includes("struct")}))==null?void 0:qa.value)==null?void 0:V[0])==null?void 0:H.引用)==null?void 0:Z.contents});let wa=Vp,ga=M.cloneDeep(Fp);h==="Method"&&ga.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(oa==null?void 0:oa[0])&&((ve=oa==null?void 0:oa[0])==null?void 0:ve.prop)==="disabled"&&(wa=Pp,ga=jp);const ol=["推力","真空","压力","温度","流量"],Fe=m.name;Fe&&ol.includes(Fe)&&(wa=[...wa],wa.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let gl=[];if(!Array.isArray(oa==null?void 0:oa[0])&&(oa!=null&&oa.some(Ca=>{var sl;return(Ca==null?void 0:Ca.calculatorFilter)&&((sl=Ca==null?void 0:Ca.calculatorFilter)==null?void 0:sl.includes("Manual"))}))){let Ca=(pe=oa==null?void 0:oa.map(sl=>sl==null?void 0:sl.calculatorFilter))==null?void 0:pe.filter(sl=>sl&&(sl==null?void 0:sl.includes("Manual")));Ca==null||Ca.forEach(sl=>{var bl;let Za=te.analyzeSplitToContent(sl,",");if(Za=Za==null?void 0:Za.map(Ia=>((Ia==null?void 0:Ia[(Ia==null?void 0:Ia.length)-1])===","&&(Ia=Ia==null?void 0:Ia.slice(0,(Ia==null?void 0:Ia.length)-1)),Ia)),Za!=null&&Za.find(Ia=>(Ia==null?void 0:Ia.includes("Extent"))&&(Ia==null?void 0:Ia.includes("Row")))&&(Za!=null&&Za.find(Ia=>(Ia==null?void 0:Ia.includes("Button"))&&(Ia==null?void 0:Ia.includes(","))))){let Ia=Za==null?void 0:Za.find($l=>$l==null?void 0:$l.includes("@FunctionButton"));Ia=(bl=Ia==null?void 0:Ia.split("="))==null?void 0:bl[1],Ia=Ia==null?void 0:Ia.slice(1,(Ia==null?void 0:Ia.length)-1),Ia=Ia==null?void 0:Ia.split(","),Ia=Ia==null?void 0:Ia[(Ia==null?void 0:Ia.length)-1],gl.push(Ia)}}),gl=[...new Set(gl)],gl=gl==null?void 0:gl.map(sl=>({label:sl,prop:sl,type:"methodButton"}))}else if(Array.isArray(oa==null?void 0:oa[0])&&((pa=te.getColumnChild(oa==null?void 0:oa[0]))!=null&&pa.some(Ca=>{var sl;return(Ca==null?void 0:Ca.calculatorFilter)&&((sl=Ca==null?void 0:Ca.calculatorFilter)==null?void 0:sl.includes("Manual"))}))){let Ca=(He=(ia=te.getColumnChild(oa==null?void 0:oa[0]))==null?void 0:ia.map(sl=>sl==null?void 0:sl.calculatorFilter))==null?void 0:He.filter(sl=>sl&&(sl==null?void 0:sl.includes("Manual")));Ca==null||Ca.forEach(sl=>{var bl;let Za=te.analyzeSplitToContent(sl,",");if(Za=Za==null?void 0:Za.map(Ia=>((Ia==null?void 0:Ia[(Ia==null?void 0:Ia.length)-1])===","&&(Ia=Ia==null?void 0:Ia.slice(0,(Ia==null?void 0:Ia.length)-1)),Ia)),Za!=null&&Za.find(Ia=>(Ia==null?void 0:Ia.includes("Extent"))&&(Ia==null?void 0:Ia.includes("Row")))&&(Za!=null&&Za.find(Ia=>(Ia==null?void 0:Ia.includes("Button"))&&(Ia==null?void 0:Ia.includes(","))))){let Ia=Za==null?void 0:Za.find($l=>$l==null?void 0:$l.includes("@FunctionButton"));Ia=(bl=Ia==null?void 0:Ia.split("="))==null?void 0:bl[1],Ia=Ia==null?void 0:Ia.slice(1,(Ia==null?void 0:Ia.length)-1),Ia=Ia==null?void 0:Ia.split(","),Ia=Ia==null?void 0:Ia[(Ia==null?void 0:Ia.length)-1],gl.push(Ia)}}),gl=[...new Set(gl)],gl=gl==null?void 0:gl.map(sl=>({label:sl,prop:sl,type:"methodButton"}))}if(ba.push({key:"extraButton",contents:wa}),ba.push({key:"rowButton",contents:[...ga,...gl]}),m.compData=await Po(ba,l,m==null?void 0:m.nameContents),(_a=m.compData)!=null&&_a.find(Ca=>(Ca==null?void 0:Ca.key)==="tab")&&(m.tab=(ha=(Ae=m.compData)==null?void 0:Ae.find(Ca=>(Ca==null?void 0:Ca.key)==="tab"))==null?void 0:ha.contents),(La=m.compData)!=null&&La.find(Ca=>(Ca==null?void 0:Ca.key)==="step")&&(m.step=(ua=(Aa=m.compData)==null?void 0:Aa.find(Ca=>(Ca==null?void 0:Ca.key)==="step"))==null?void 0:ua.contents),(Ta=m.compData)!=null&&Ta.find(Ca=>(Ca==null?void 0:Ca.key)==="choice")&&(m.choice=(ma=(Ce=m.compData)==null?void 0:Ce.find(Ca=>(Ca==null?void 0:Ca.key)==="choice"))==null?void 0:ma.contents),(Je=m.compData)!=null&&Je.find(Ca=>(Ca==null?void 0:Ca.key)==="hideContents")&&(m.isHidden=((J=(W=m.compData)==null?void 0:W.find(Ca=>(Ca==null?void 0:Ca.key)==="hideContents"))==null?void 0:J.contents)??!1),(je=m.compData)!=null&&je.find(Ca=>(Ca==null?void 0:Ca.key)==="newType")){let Ca=(Sa=(We=m.compData)==null?void 0:We.find(sl=>(sl==null?void 0:sl.key)==="newType"))==null?void 0:Sa.contents;m.comp=Ca,m.compData=(sa=m.compData)==null?void 0:sa.filter(sl=>(sl==null?void 0:sl.key)!=="newType")}let Ne="",Kl=(Va=m==null?void 0:m.compData)==null?void 0:Va.filter(Ca=>(Ca==null?void 0:Ca.key)==="fixType");if((Kl==null?void 0:Kl.length)>0&&n&&(Ne=(Re=Kl==null?void 0:Kl[0])==null?void 0:Re.contents,m.comp=Ne),((Oe=m==null?void 0:m.calculatorFilters)==null?void 0:Oe.length)>0){let Ca=[],sl=[],Za=[];(Le=m==null?void 0:m.calculatorFilters)==null||Le.forEach(bl=>{var Ia,$l,br;(Ia=bl==null?void 0:bl.calculatorFilter)!=null&&Ia.includes("Up")&&Ca.push({label:bl==null?void 0:bl.functionName,prop:bl==null?void 0:bl.functionName,type:"methodButton"}),($l=bl==null?void 0:bl.calculatorFilter)!=null&&$l.includes("Line")&&sl.push({label:bl==null?void 0:bl.functionName,prop:bl==null?void 0:bl.functionName,type:"methodButton"}),(br=bl==null?void 0:bl.calculatorFilter)!=null&&br.includes("Down")&&Za.push({label:bl==null?void 0:bl.functionName,prop:bl==null?void 0:bl.functionName,type:"methodButton"})}),m.compData=(Be=m.compData)==null?void 0:Be.map(bl=>((bl==null?void 0:bl.key)==="extraButton"&&(bl.contents=[...Ca??[],...bl.contents]),(bl==null?void 0:bl.key)==="rowButton"&&(bl.contents=[...sl??[],...bl.contents]),(bl==null?void 0:bl.key)==="bottomButton"&&(bl.contents=[...Za??[],...bl.contents]),bl)),(Za==null?void 0:Za.length)>0&&!((ul=(ze=m.compData)==null?void 0:ze.find(bl=>(bl==null?void 0:bl.key)==="bottomButton"))!=null&&ul.contents)&&m.compData.push({key:"bottomButton",contents:Za})}}else if(h==="Form"){let Ie=[],ba=(Rl=(Ml=(Cl=s==null?void 0:s.contents)==null?void 0:Cl.find(Fe=>{var gl;return(gl=Fe==null?void 0:Fe.key)==null?void 0:gl.includes("content")}))==null?void 0:Ml.value)==null?void 0:Rl[0],oa=[],wa=Array.isArray((Al=s==null?void 0:s.filter)==null?void 0:Al.menuFilter)?(er=s==null?void 0:s.filter)==null?void 0:er.menuFilter:[];wa==null||wa.forEach(Fe=>{if(Fe!=null&&Fe.includes("@Param(Hide=Yes, prop=")||Fe!=null&&Fe.includes("(Hide=Yes, prop=")){const gl=Fe==null?void 0:Fe.match(/prop=([^,)]+)/);gl!=null&&gl[1]&&oa.push(gl==null?void 0:gl[1])}});let ga=(Il=(ql=(Ua=(Ul=(Qa=s==null?void 0:s.contents)==null?void 0:Qa.find(Fe=>{var gl;return(gl=Fe==null?void 0:Fe.key)==null?void 0:gl.includes("struct")}))==null?void 0:Ul.value)==null?void 0:Ua[0])==null?void 0:ql.结构)==null?void 0:Il.contents,ol=(lr=ga==null?void 0:ga.map(Fe=>(Fe.value=ba==null?void 0:ba[Fe==null?void 0:Fe.prop],Fe)))==null?void 0:lr.filter(Fe=>(Fe==null?void 0:Fe.prop)!=="sort"&&(Fe==null?void 0:Fe.prop)!=="relatedId");ol=ol==null?void 0:ol.map(Fe=>(oa!=null&&oa.includes(Fe==null?void 0:Fe.prop)&&(Fe.isHideInForm=!0),Fe)),Ie.push({key:"filter",contents:(va=(nl=(Ra=(xr=(_l=s==null?void 0:s.contents)==null?void 0:_l.find(Fe=>{var gl;return(gl=Fe==null?void 0:Fe.key)==null?void 0:gl.includes("struct")}))==null?void 0:xr.value)==null?void 0:Ra[0])==null?void 0:nl.引用)==null?void 0:va.contents}),Ie.push({key:"formContent",contents:ol}),Ie.push({key:"paramHideProps",contents:oa}),m.compData=await Lp(Ie,l,m==null?void 0:m.nameContents),(za=m.compData)!=null&&za.find(Fe=>(Fe==null?void 0:Fe.key)==="tab")&&(m.tab=(Ha=(da=m.compData)==null?void 0:da.find(Fe=>(Fe==null?void 0:Fe.key)==="tab"))==null?void 0:Ha.contents),(Dl=m.compData)!=null&&Dl.find(Fe=>(Fe==null?void 0:Fe.key)==="step")&&(m.step=(na=(Te=m.compData)==null?void 0:Te.find(Fe=>(Fe==null?void 0:Fe.key)==="step"))==null?void 0:na.contents),(ja=m.compData)!=null&&ja.find(Fe=>(Fe==null?void 0:Fe.key)==="choice")&&(m.choice=(Ma=(Ee=m.compData)==null?void 0:Ee.find(Fe=>(Fe==null?void 0:Fe.key)==="choice"))==null?void 0:Ma.contents),(Ya=m.compData)!=null&&Ya.find(Fe=>(Fe==null?void 0:Fe.key)==="hideContents")&&(m.isHidden=((wl=(vl=m.compData)==null?void 0:vl.find(Fe=>(Fe==null?void 0:Fe.key)==="hideContents"))==null?void 0:wl.contents)??!1)}return m});return r=await Promise.all(i),r=r==null?void 0:r.filter(s=>!(s!=null&&s.isHidden)),r},Hp=M.useLoginState(M.pinia),{loginUserInfo:jn}=M.storeToRefs(Hp),Up=M.useUnit(M.pinia),{selectTitle:qp}=M.storeToRefs(Up),Wp=async(a,l="Manual",n=[])=>{var h;let r=a,i=(h=r==null?void 0:r.filter(c=>{var d;return(c==null?void 0:c.functionName)&&(l==="Manual"&&((d=c==null?void 0:c.calculatorFilter)==null?void 0:d.includes(l))||l!=="Manual")}))==null?void 0:h.map(c=>({prop:c==null?void 0:c.prop,label:c==null?void 0:c.label,methods:c==null?void 0:c.calculatorFilter,functionName:c==null?void 0:c.functionName,functionRelatedWords:c==null?void 0:c.functionRelatedWords})),s=r==null?void 0:r.map(async c=>{let d=i==null?void 0:i.filter(m=>(m==null?void 0:m.prop)===(c==null?void 0:c.prop));return c=await pc(c,d,r,l,r,n),c});return s=await Promise.all(s),s},_t=async(a,l,n="Manual",r=[],i=[])=>{var m;let s=a,h;Array.isArray(l==null?void 0:l[0])?h=te.getColumnChild(l==null?void 0:l[0]):h=l;let c=(m=h==null?void 0:h.filter(g=>{var u;return(g==null?void 0:g.calculatorFilter)&&((u=g==null?void 0:g.calculatorFilter)==null?void 0:u.includes(n))||(g==null?void 0:g.calculatorFilter)===""&&(g==null?void 0:g.functionName)}))==null?void 0:m.map(g=>({prop:g==null?void 0:g.prop,label:g==null?void 0:g.label,methods:g==null?void 0:g.calculatorFilter,functionName:g==null?void 0:g.functionName,functionRelatedWords:g==null?void 0:g.functionRelatedWords}));(i==null?void 0:i.length)>0&&(c=[...i==null?void 0:i.map(u=>({prop:"",label:"",methods:u==null?void 0:u.calculatorFilter,functionName:u==null?void 0:u.functionName,functionRelatedWords:u==null?void 0:u.functionRelatedWords})),...c]);let d=s==null?void 0:s.map(async g=>(g=await pc(g,c,h,n,s,r),g));return d=await Promise.all(d),d},Kp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,s;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=te.getValueToObjectValue(l,te.getColumnContents(i))),n==null||n.forEach(h=>{var c;if(l!=null&&l[h]){let d=l==null?void 0:l[h];s=s?d?Vl.isEqual(d.toString(),s.toString()):void 0:d}else{let d=(c=i==null?void 0:i.find(g=>(g==null?void 0:g.label)===h))==null?void 0:c.prop,m=(l==null?void 0:l[d])??0;s=s?m?Vl.isEqual(m.toString(),s.toString()):void 0:m}}),l[r]=s===void 0?void 0:s?1:0,l},Ar=a=>{const[l,n,r]=M.cloneDeep(a).split(":").map(Number);let i=+a;return!a||!(a!=null&&a.includes(":"))?i:(l??0)*3600+(n??0)*60+(r??0)},Yn=a=>{const l=s=>s.toString().padStart(2,"0"),n=Math.floor(a/3600),r=Math.floor(a%3600/60),i=a%60;return`${l(n)}:${l(r)}:${parseInt(l(i))}`},Gp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=te.getValueToObjectValue(l,te.getColumnContents(i))),n==null||n.forEach(d=>{var m,g,u,C,I,k,G,z,j;if(l!=null&&l[d]){if(s==="Row")if(!((g=((m=l==null?void 0:l[d])==null?void 0:m.toString())??"")!=null&&g.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let L=+(l==null?void 0:l[d]);c=c+L}else c=Ar(c.toString())+Ar((C=l==null?void 0:l[d])==null?void 0:C.toString()),c=Yn(c)}else if(s==="Row"){let L=(I=i==null?void 0:i.find(_=>(_==null?void 0:_.label)===d))==null?void 0:I.prop;if(!((G=Number.isNaN(l==null?void 0:l[L])?"":(k=l==null?void 0:l[L])==null?void 0:k.toString())!=null&&G.includes(":"))&&!((z=c==null?void 0:c.toString())!=null&&z.includes(":"))){let _=+((l==null?void 0:l[L])??0);c=c+_}else c=Ar(c==null?void 0:c.toString())+Ar((j=(l==null?void 0:l[L])??0)==null?void 0:j.toString()),c=Yn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let g=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=i==null?void 0:i.find(I=>(I==null?void 0:I.label)===m))==null?void 0:C.prop])});d=[...d,...g]}),c=d.reduce((m,g)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(g)||(C=+g),u+C},0)}return l[r]=c,l},Yp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=te.getValueToObjectValue(l,te.getColumnContents(i))),n==null||n.forEach(d=>{var m,g,u,C,I,k,G;if(l!=null&&l[d]){if(s==="Row")if(!((g=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let z=+(l==null?void 0:l[d]);c=c===0?c+z:c-z}else c=c===0?Ar(c.toString())+Ar(l==null?void 0:l[d].toString()):Ar(c.toString())-Ar(l==null?void 0:l[d].toString()),c=Yn(c)}else if(s==="Row"){let z=(C=i==null?void 0:i.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[z])?"":(I=l==null?void 0:l[z])==null?void 0:I.toString())!=null&&k.includes(":"))&&!((G=c==null?void 0:c.toString())!=null&&G.includes(":"))){let j=+((l==null?void 0:l[z])??0);c=c===0?c+j:c-j}else c=c===0?Ar(c.toString())+Ar(((l==null?void 0:l[z])??0).toString()):Ar(c.toString())-Ar(((l==null?void 0:l[z])??0).toString()),c=Yn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let g=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=i==null?void 0:i.find(I=>(I==null?void 0:I.label)===m))==null?void 0:C.prop])});d=[...d,...g]}),c=d.reduce((m,g)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(g)||(C=+g),u-C},0)}return l[r]=c,l},Jp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=te.getValueToObjectValue(l,te.getColumnContents(i))),n==null||n.forEach(d=>{var m,g,u,C,I,k,G;if(l!=null&&l[d]){if(s==="Row")if(!((g=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let z=+(l==null?void 0:l[d]);c=c===0?c+z:c*z}else c=c===0?Ar(c.toString())+Ar(l==null?void 0:l[d].toString()):Ar(c.toString())*Ar(l==null?void 0:l[d].toString()),c=Yn(c)}else if(s==="Row"){let z=(C=i==null?void 0:i.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!(l!=null&&l[z]))c=void 0;else if(!((k=Number.isNaN(l==null?void 0:l[z])?"":(I=l==null?void 0:l[z])==null?void 0:I.toString())!=null&&k.includes(":"))&&!((G=c==null?void 0:c.toString())!=null&&G.includes(":"))){let j=+((l==null?void 0:l[z])??0);c=c===0?c+j:c*j}else c=c===0?Ar(c.toString())+Ar(((l==null?void 0:l[z])??0).toString()):Ar(c.toString())*Ar(((l==null?void 0:l[z])??0).toString()),c=Yn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let g=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=i==null?void 0:i.find(I=>(I==null?void 0:I.label)===m))==null?void 0:C.prop])});d=[...d,...g]}),c=d.reduce((m,g)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(g)||(C=+g),u*C},0)}return l[r]=c,l},Xp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=te.getValueToObjectValue(l,te.getColumnContents(i))),n==null||n.forEach(d=>{var m,g,u,C,I,k,G;if(l!=null&&l[d]){if(s==="Row")if(!((g=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let z=+(l==null?void 0:l[d]);c=c===0?c+z:c/z}else c=c===0?Ar(c.toString())+Ar(l==null?void 0:l[d].toString()):Ar(c.toString())/Ar(l==null?void 0:l[d].toString()),c=Yn(c)}else if(s==="Row"){let z=(C=i==null?void 0:i.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[z])?"":(I=l==null?void 0:l[z])==null?void 0:I.toString())!=null&&k.includes(":"))&&!((G=c==null?void 0:c.toString())!=null&&G.includes(":"))){let j=+((l==null?void 0:l[z])??0);c=c===0?c+j:c/j}else c=c===0?Ar(c.toString())+Ar(((l==null?void 0:l[z])??0).toString()):Ar(c.toString())/Ar(((l==null?void 0:l[z])??0).toString()),c=Yn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let g=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=i==null?void 0:i.find(I=>(I==null?void 0:I.label)===m))==null?void 0:C.prop])});d=[...d,...g]}),c=d.reduce((m,g)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(g)||(C=+g),u/C},0)}return l[r]=c.toFixed(2),l},Zp=async a=>{var s,h,c,d,m,g,u,C,I,k,G;let l=(s=a==null?void 0:a.valueString)==null?void 0:s[0],n=(h=a==null?void 0:a.contents)==null?void 0:h.calculatorFilter,r=0,i=a==null?void 0:a.contents;if(l!=null&&l.includes("$")&&!(l!=null&&l.includes("{"))){(l==null?void 0:l[0])==="$"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length));let z=(d=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:d.replaceAll(":","/"),j=await Gr(z,!1),L=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(j=(g=j==null?void 0:j.filter(_=>(_==null?void 0:_.name)===L))==null?void 0:g[0],n!==""){let _=j.compData;_=_==null?void 0:_.filter(x=>(x==null?void 0:x.key)!=="filter"),_.push({key:"filter",contents:"("+n+")"}),_=await Po(_,{}),r=(C=(u=_==null?void 0:_.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:C.length}else r=(G=(k=(I=j==null?void 0:j.compData)==null?void 0:I.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:G.length}return i.value=r,i},Qp=async a=>{var r,i;let l=a==null?void 0:a.valueString;l=l==null?void 0:l[0];let n={};if((l==null?void 0:l[0])==="{"){l=l==null?void 0:l.slice(1,l.length-1),l=(r=te.analyzeSplitToContent(l,","))==null?void 0:r.map(c=>((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)),c));let s=l==null?void 0:l.map(async c=>{var u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me;let d=(C=(u=c==null?void 0:c.replace("=","$R"))==null?void 0:u.split("$R"))==null?void 0:C[0],m=(k=(I=c==null?void 0:c.replace("=","$R"))==null?void 0:I.split("$R"))==null?void 0:k[1],g="";if(m==="LoginUser")g=((G=jn.value)==null?void 0:G.姓名)||((z=jn.value)==null?void 0:z.account)||((j=jn.value)==null?void 0:j.账号);else if((m==null?void 0:m[0])==="$"){let de=(L=m==null?void 0:m.split("*"))==null?void 0:L[0],A=(_=m==null?void 0:m.split("*"))==null?void 0:_[1],ee=A;if((de==null?void 0:de[0])==="$"&&(de=de==null?void 0:de.slice(1,de==null?void 0:de.length)),de!=null&&de.includes("$")){let re=(x=de==null?void 0:de.split("$"))==null?void 0:x[0],fe=(w=de==null?void 0:de.split("$"))==null?void 0:w[1],$e=(b=re==null?void 0:re.split(":"))==null?void 0:b[0],ue=($=(F=(E=qp.value)==null?void 0:E.filter(B=>(B==null?void 0:B.condition)==="child"))==null?void 0:F[0])==null?void 0:$.value;fe=fe==null?void 0:fe.replaceAll(":","/"),de=$e+"/"+fe+"/"+ue}else de=de==null?void 0:de.replaceAll(":","/");A=A==null?void 0:A.split(":"),A=A==null?void 0:A.find((re,fe)=>fe===(A==null?void 0:A.length)-2),ee=ee==null?void 0:ee.split(":"),ee=ee==null?void 0:ee.find((re,fe)=>fe===(ee==null?void 0:ee.length)-1),(ee==null?void 0:ee[0])==="{"&&(ee=ee==null?void 0:ee.slice(1,(ee==null?void 0:ee.length)-1));let X=await Gr(de,!1);X=X==null?void 0:X.find(re=>(re==null?void 0:re.name)===A),X=(Q=(le=X==null?void 0:X.compData)==null?void 0:le.find(re=>(re==null?void 0:re.key)==="tableContents"))==null?void 0:Q.contents,g=(me=X==null?void 0:X[0])==null?void 0:me[ee]}else g=m;n[d]=g});await Promise.all(s);let h=(i=a==null?void 0:a.valueString)==null?void 0:i[1];n.menuPathContent=h}return n},bo={Sum:Gp,Substract:Yp,Multiple:Jp,Divide:Xp,Compare:Kp,VecDimCount:Zp,Approval:Qp},pc=async(a,l,n,r="Auto",i,s=[])=>{var g,u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me,de,A;let h=a,c=[],d=await M.getPageDataApi({platId:parseInt((g=jn==null?void 0:jn.value)==null?void 0:g.plat_id),pageName:"menu"});d=(I=(C=(u=d==null?void 0:d.data)==null?void 0:u.result)==null?void 0:C.filter(ee=>(ee==null?void 0:ee.property_name)===""))==null?void 0:I[0];let m=[];if(d!=null&&d.object_name){d=d==null?void 0:d.object_name;let ee=await M.getPageDataApi({platId:parseInt((k=jn==null?void 0:jn.value)==null?void 0:k.plat_id),pageName:d});ee=(_=(L=(j=(z=(G=ee==null?void 0:ee.data)==null?void 0:G.result)==null?void 0:z[0])==null?void 0:j.contents)==null?void 0:L.find(X=>{var re;return(re=X==null?void 0:X.key)==null?void 0:re.includes("content")}))==null?void 0:_.value,c=(x=ee==null?void 0:ee.map(X=>({functionName:X==null?void 0:X.函数名称,functionContent:X==null?void 0:X.输出值})))==null?void 0:x.filter(X=>(X==null?void 0:X.functionContent)!==""),c==null||c.forEach(X=>{m.push(X.functionName),bo[X.functionName]=new Function("return "+X.functionContent)()})}if((l==null?void 0:l.length)===0)return h;for(let ee in l){let X=(w=l==null?void 0:l[ee])==null?void 0:w.functionName;const re=bo==null?void 0:bo[X];let fe=(b=l==null?void 0:l[ee])==null?void 0:b.methods;if(fe=te.analyzeSplitToContent(fe,","),(E=fe==null?void 0:fe.find($e=>$e==null?void 0:$e.includes("@Type")))!=null&&E.includes(r)||r==="Auto"||(fe==null?void 0:fe.length)===0){let $e=((le=($=(F=fe==null?void 0:fe.find(ue=>ue==null?void 0:ue.includes("@Extent")))==null?void 0:F.replace(":","="))==null?void 0:$.split("="))==null?void 0:le[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(ue=>ue===X)){let ue="";try{let se=(Q=l==null?void 0:l[ee])==null?void 0:Q.functionRelatedWords,U=(s==null?void 0:s.length)>0?s==null?void 0:s.map(Me=>{var Ve;return Me==null?void 0:Me[(Ve=l==null?void 0:l[ee])==null?void 0:Ve.prop]}):["0"];U=U==null?void 0:U.map(Me=>Me==null?void 0:Me.slice((Me==null?void 0:Me.length)-5,Me==null?void 0:Me.length)),U=U==null?void 0:U.map(Me=>te.isNumber(parseInt(Me))&&parseInt(Me)?parseInt(Me):0);let be=Math.max(...U);se=se==null?void 0:se.map(Me=>{if(Me!=null&&Me.includes("'"))return Me==null?void 0:Me.replaceAll("'","");if(Me!=null&&Me.includes("@"))return be+1;{let Ve=Object.keys(h);return Me=(h==null?void 0:h[Me])??(h==null?void 0:h[Ve==null?void 0:Ve.find(aa=>aa==null?void 0:aa.includes("."+Me))]),Me}}),ue=re(...se)}catch(se){Ja.ElMessage.warning("关联数据出现错误,"+se.message)}let B=(me=l==null?void 0:l[ee])==null?void 0:me.prop;h[B]=ue}else h=await re({contents:h,valueString:(de=l==null?void 0:l[ee])==null?void 0:de.functionRelatedWords,prop:(A=l==null?void 0:l[ee])==null?void 0:A.prop,headers:n,typeString:$e,allContents:i})}}return h},ef=M.useLoginState(M.pinia),{loginUserInfo:hn}=M.storeToRefs(ef),af=M.useMenuState(M.pinia),{activeMenuPath:fs,currentMenuPath:ko}=M.storeToRefs(af),fc=M.useUnit(M.pinia);let hs="$R";const{selectTitle:Bi}=M.storeToRefs(fc),hc=async(a,l)=>{var h,c,d,m,g,u,C,I,k,G,z,j,L;let n=fs.value,r="",i=((h=Bi==null?void 0:Bi.value)==null?void 0:h.find(_=>(_==null?void 0:_.condition)==="child"&&!(_!=null&&_.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(n=l?n:(c=a==null?void 0:a[0])==null?void 0:c.object_name,r=(d=a==null?void 0:a[0])==null?void 0:d.father_name);let s=[];if(r!==""){let _=r;(_==null?void 0:_[(_==null?void 0:_.length)-1])==="/"&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1));let x=await Gr(_,!1);x=(m=x==null?void 0:x[0])==null?void 0:m.compData;let w=(g=x==null?void 0:x.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:g.contents;w=((u=w==null?void 0:w.find(E=>E==null?void 0:E.isMainKey))==null?void 0:u.prop)??((C=w==null?void 0:w[0])==null?void 0:C.prop);let b=(k=(I=x==null?void 0:x.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:I.contents)==null?void 0:k.map(E=>({label:E==null?void 0:E[w],value:E==null?void 0:E[w]}));s=(G=r==null?void 0:r.split("/"))==null?void 0:G.map(E=>(E===""?i?(i.isShow=!0,E=i):E={value:E,condition:"child",options:b,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:E={condition:"parent",value:E.trim(),isShow:!0},E))}if(n!==""){let _=(z=n==null?void 0:n.split("/"))==null?void 0:z.map(x=>(x={condition:"normal",value:x.trim(),isShow:!0},x));((j=_==null?void 0:_[0])==null?void 0:j.value)===((L=s==null?void 0:s[0])==null?void 0:L.value)&&(_=_==null?void 0:_.filter((x,w)=>w!==0)),s=[...s??[],..._??[]]}r===""&&i&&((i==null?void 0:i.parentContent)!==fs.value&&(i.isShow=!1),(i==null?void 0:i.value)!==""&&s.push(i)),fc.setSelectTitle(s)},lf=async a=>{var s,h,c,d,m,g,u,C,I;let l=await M.getPageDataApi({platId:parseInt((s=hn==null?void 0:hn.value)==null?void 0:s.plat_id),pageName:"menu"}),n=(h=l==null?void 0:l.data)==null?void 0:h.result,r=(g=(m=(d=(c=a==null?void 0:a.filter(k=>(k==null?void 0:k.comp)==="Table"))==null?void 0:c[0])==null?void 0:d.compData)==null?void 0:m.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:g.contents;r=(I=(C=(u=r==null?void 0:r.replace("(",hs))==null?void 0:u.split(hs))==null?void 0:C[0])==null?void 0:I.replaceAll(":","/");let i=n==null?void 0:n.filter(k=>{var G;return(k==null?void 0:k.object_name)===ko.value+"/"||((G=ko.value)==null?void 0:G.includes(r))&&r+"/"===(k==null?void 0:k.object_name)||r===(k==null?void 0:k.object_name)});return(i==null?void 0:i.length)>0&&(a=a==null?void 0:a.map(k=>{var G;return(k==null?void 0:k.comp)==="Table"&&(k.compData=(G=k==null?void 0:k.compData)==null?void 0:G.map(z=>{var j,L,_;return(z==null?void 0:z.key)==="header"&&(Array.isArray((j=z.contents)==null?void 0:j[0])?z.contents[0]=(_=z.contents[0])==null?void 0:_.map((x,w)=>{var b;return w===0&&(x.isExistChild=!0,((b=ko.value)!=null&&b.includes(r)||r)&&(x.fatherPath=r)),x}):z.contents=(L=z.contents)==null?void 0:L.map((x,w)=>{var b;return w===0&&(x.isExistChild=!0,((b=ko.value)!=null&&b.includes(r)||r)&&(x.fatherPath=r)),x})),z})),k})),a},Gr=async(a,l,n={})=>{var h,c,d,m,g,u,C,I,k,G,z,j;let r=await M.getPageDataApi({platId:parseInt((h=hn==null?void 0:hn.value)==null?void 0:h.plat_id),pageName:a}),i=(c=r==null?void 0:r.data)==null?void 0:c.result;if((i==null?void 0:i.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==a){let L=await M.getPageDataApi({platId:parseInt((d=hn==null?void 0:hn.value)==null?void 0:d.plat_id),pageName:n==null?void 0:n.originPath});if(((g=(m=L==null?void 0:L.data)==null?void 0:m.result)==null?void 0:g.length)>0){let _=await ps((u=L==null?void 0:L.data)==null?void 0:u.result,n,!1);_=_==null?void 0:_.map(async b=>{var $,le,Q,me,de,A,ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa;let E=[],F=($=Object.keys(b))==null?void 0:$.filter(V=>(V==null?void 0:V.includes("name"))&&V!=="nameContents");for(let V in b)F!=null&&F.find(H=>H===V)&&E.push(b==null?void 0:b[V]);if(E=E.reverse(),(b==null?void 0:b.comp)==="Table"){let V=(me=(Q=(le=b==null?void 0:b.compData)==null?void 0:le.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:Q.contents)==null?void 0:me.map(Z=>{let ve={};for(let pe in Z)pe!=="id"&&pe!=="create_time"&&pe!=="update_time"&&pe!=="sort"&&pe!=="create_user_id"&&pe!=="update_user_id"&&pe!=="department_id"&&pe!=="relatedId"&&(ve[pe]=Z==null?void 0:Z[pe]);return Z=Object.values(ve),Z}),H=(A=(de=b==null?void 0:b.compData)==null?void 0:de.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:A.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"}),(ee=H[0])!=null&&ee.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(H[0]=(X=H[0])==null?void 0:X.filter(Z=>(Z==null?void 0:Z.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(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(H=H==null?void 0:H.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(Z=>{var ve;return(Z==null?void 0:Z.calculatorFilter)&&((ve=Z==null?void 0:Z.calculatorFilter)==null?void 0:ve.includes("Auto"))})&&(V=await _t(V,H,"Auto"),V=V==null?void 0:V.map(Z=>Object.values(Z))),b!=null&&b.fatherSyncContents){Array.isArray((re=b==null?void 0:b.fatherSyncContents)==null?void 0:re[0])&&(b.fatherSyncContents=(fe=b==null?void 0:b.fatherSyncContents)==null?void 0:fe[0]);let Z=($e=Bi.value)==null?void 0:$e.find(ve=>(ve==null?void 0:ve.condition)==="child");b.fatherSyncContents=(ue=b==null?void 0:b.fatherSyncContents)==null?void 0:ue.map(ve=>{var pe,pa,ia,He,_a,Ae;return((pa=ve==null?void 0:ve.menus)==null?void 0:pa[((pe=ve==null?void 0:ve.menus)==null?void 0:pe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(Z==null?void 0:Z.value):((He=ve==null?void 0:ve.menus)==null?void 0:He[((ia=ve==null?void 0:ve.menus)==null?void 0:ia.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Ae=ve.menus)==null?void 0:Ae.slice(0,((_a=ve.menus)==null?void 0:_a.length)-1)),ve})}if(b!=null&&b.sonSyncContents){Array.isArray((B=b==null?void 0:b.sonSyncContents)==null?void 0:B[0])&&(b.sonSyncContents=(se=b==null?void 0:b.sonSyncContents)==null?void 0:se[0]);let Z=(U=Bi.value)==null?void 0:U.find(ve=>(ve==null?void 0:ve.condition)==="child");b.sonSyncContents=(be=b==null?void 0:b.sonSyncContents)==null?void 0:be.map(ve=>{var pe,pa,ia,He,_a,Ae;return((pa=ve==null?void 0:ve.menus)==null?void 0:pa[((pe=ve==null?void 0:ve.menus)==null?void 0:pe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(Z==null?void 0:Z.value):((He=ve==null?void 0:ve.menus)==null?void 0:He[((ia=ve==null?void 0:ve.menus)==null?void 0:ia.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Ae=ve.menus)==null?void 0:Ae.slice(0,((_a=ve.menus)==null?void 0:_a.length)-1)),ve})}if(b!=null&&b.relatedQuotes){Array.isArray((Me=b==null?void 0:b.relatedQuotes)==null?void 0:Me[0])&&(b.relatedQuotes=(Ve=b==null?void 0:b.relatedQuotes)==null?void 0:Ve[0]);let Z=(aa=Bi.value)==null?void 0:aa.find(ve=>(ve==null?void 0:ve.condition)==="child");b.relatedQuotes=(Ea=b==null?void 0:b.relatedQuotes)==null?void 0:Ea.map(ve=>{var pe,pa,ia,He,_a,Ae;return((pa=ve==null?void 0:ve.menus)==null?void 0:pa[((pe=ve==null?void 0:ve.menus)==null?void 0:pe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(Z==null?void 0:Z.value):((He=ve==null?void 0:ve.menus)==null?void 0:He[((ia=ve==null?void 0:ve.menus)==null?void 0:ia.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Ae=ve.menus)==null?void 0:Ae.slice(0,((_a=ve.menus)==null?void 0:_a.length)-1)),ve})}b={filter:(ta=(ne=b==null?void 0:b.compData)==null?void 0:ne.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:ta.contents,key:b==null?void 0:b.comp,name:E,tableColumns:H,tableContents:V,menuFilter:b==null?void 0:b.menuFilter,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents,calculatorFilters:b==null?void 0:b.calculatorFilters}}else{let V=(we=(ca=(ce=b==null?void 0:b.compData)==null?void 0:ce.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:ca.contents)==null?void 0:we.map(Z=>(Z==null?void 0:Z.value)??"");V=[V];let H=(Ke=(he=(ge=b==null?void 0:b.compData)==null?void 0:ge.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:he.contents)==null?void 0:Ke.map(Z=>(Z.value="",Z));b={contents:V,filter:(qa=(fa=b==null?void 0:b.compData)==null?void 0:fa.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:qa.contents,key:b==null?void 0:b.comp,name:E,value:H,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents,calculatorFilters:b==null?void 0:b.calculatorFilters}}return b.isShow=!1,b}),_=await Promise.all(_);let x=[{key:"menuPath",contents:[{path:a,fatherPath:(k=(I=(C=L==null?void 0:L.data)==null?void 0:C.result)==null?void 0:I[0])==null?void 0:k.father_name,isShow:!1}]},{key:a,contents:_}];await M.createPlatFormDataApi({platId:parseInt((G=hn==null?void 0:hn.value)==null?void 0:G.plat_id),changeData:x});let w=await M.getPageDataApi({platId:parseInt((z=hn==null?void 0:hn.value)==null?void 0:z.plat_id),pageName:a});i=(j=w==null?void 0:w.data)==null?void 0:j.result}}l&&await hc(i,!!(n!=null&&n.originPath));let s=await ps(i,n);return l&&(s=await lf(s)),s==null?void 0:s.filter(L=>L)},vs=async a=>{var r,i,s,h,c,d,m,g,u,C,I;let l=(r=a==null?void 0:a.menus)==null?void 0:r.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((s=(i=a.value)==null?void 0:i.split(" "))==null?void 0:s[0]));let n=await Gr(l,!1);if(n=(h=n==null?void 0:n.filter(k=>{var G,z;return(k==null?void 0:k.name)===((z=a==null?void 0:a.groups)==null?void 0:z[((G=a==null?void 0:a.groups)==null?void 0:G.length)-1])}))==null?void 0:h[0],(d=(c=n==null?void 0:n.compData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="tableContents"))!=null&&d.contents){n=(g=(m=n==null?void 0:n.compData)==null?void 0:m.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:g.contents;let k=((u=a==null?void 0:a.words)==null?void 0:u[0])??(a==null?void 0:a.prop);return n=n==null?void 0:n.filter(G=>{var z,j,L,_;return(G==null?void 0:G[a!=null&&a.endChildMenu?k:(z=a==null?void 0:a.words)==null?void 0:z[0]])===(a!=null&&a.relatedWords&&((j=a==null?void 0:a.relatedWords)==null?void 0:j.length)>0?(_=(L=a.value)==null?void 0:L.split(" "))==null?void 0:_[0]:a.value)}),n==null?void 0:n[0]}else{let k=(I=(C=n==null?void 0:n.compData)==null?void 0:C.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:I.contents,G={};return k==null||k.forEach(z=>{G[z.prop]=z.value}),G}},rf={key:0,class:"extra-button-content"},nf={class:"table-operator-wrap"},of={key:0,class:"extra-button-filter"},tf={key:1,class:"extra-header"},sf=["onClick"],cf={class:"table-op-text"},uf={class:"table-op-text"},df={class:"drop-menu",style:{width:"120px"}},pf=["onClick"],ff={key:0},hf={key:1},vf=["onClick"],mf={class:"table-op-text"},yf={key:1,class:"extra-button-content tabs-button-wrapper"},gf={class:"table-operator-wrap"},bf={class:"extra-button-filter"},kf={key:0,class:"extra-header"},xf={class:"table-op-action"},wf={class:"table-op-text"},_f={class:"drop-menu",style:{width:"120px"}},Sf={key:0},Ef={key:1},Cf=["onClick"],Df={class:"table-op-text"},Tf={__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(a,{emit:l}){const n=l,r=a,i=()=>{const F=(r==null?void 0:r.menuFilter)||[];return Array.isArray(F)&&(F==null?void 0:F.some($=>{const le=typeof $=="string"?$:JSON.stringify($);return le==null?void 0:le.includes("HideGroup=Yes")}))},s=e.ref(""),h=e.ref(!1),c=e.ref(!1),d=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),g=[{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(F,$){return F.map(le=>{const Q={...le};return $.forEach(me=>{delete Q[me]}),Q})}function C(F){if(!F||F.t!=="n")return(F==null?void 0:F.v)??"";const $=F.v;if(F.z){const le=String(F.z).toLowerCase(),Q=["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 A of Q)if(le.includes(A))return I($);const me=/[ymdhms]/.test(le),de=/^[0#\.\,\s]+$/.test(le.replace(/[\\\/\-:]/g,""));if(me&&!de)return I($)}if($>=1&&$<=73050){if($<5e3)return $;if($>=5e3&&$<4e4){const le=Math.floor(($-25569)/365.25)+1970;return le>=1970&&le<=2e3&&F.z&&/[ymd]/.test(String(F.z).toLowerCase())?I($):$}if($>=4e4)return I($)}return $}function I(F){if(typeof F!="number")return F;try{const $=new Date((F-25569)*86400*1e3);if(isNaN($.getTime()))return F;const le=$.getFullYear(),Q=String($.getMonth()+1).padStart(2,"0"),me=String($.getDate()).padStart(2,"0");return`${le}-${Q}-${me}`}catch{return F}}const k=F=>{const $=F.raw;if(!$)return;const le=new FileReader;le.onload=Q=>{try{const me=new Uint8Array(Q.target.result),de=te.readSync(me,{type:"array"}),A=de.SheetNames[0],ee=de.Sheets[A],re=te.utils.decode_range(ee["!ref"]).e.c+1,fe=new Array(re).fill(""),$e=[];for(const be in ee){if(be[0]==="!")continue;const{r:Me,c:Ve}=te.utils.decode_cell(be),aa=ee[be];let Ea=C(aa);if((Ea==null||Ea==="")&&(Ea=""),Me===0)fe[Ve]=Ea;else{if(!$e[Me-1]){$e[Me-1]={};for(let ne=0;ne<re;ne++)$e[Me-1][`col_${ne}`]=""}$e[Me-1][`col_${Ve}`]=Ea}}for(let be=0;be<re;be++)fe[be]===void 0&&(fe[be]="");const ue=[];for(let be=0;be<fe.length;be++)(!fe[be]||fe[be].toString().trim()==="")&&ue.push(be);let B,se;(ue==null?void 0:ue.length)>0?(Ja.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),B=fe.filter((be,Me)=>!ue.includes(Me)),se=u($e,ue==null?void 0:ue.map(be=>`col_${be}`))):(B=fe,se=$e);const U=$e==null?void 0:$e[0];if(!(U!=null&&U.hasOwnProperty("col_0")))return Ja.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",B,se)}catch(me){throw Ja.ElMessage.error(me.message),new Error(me.message)}},le.readAsArrayBuffer($)},G=F=>{var le;const $=(le=d.value)==null?void 0:le.reduce((Q,me,de)=>(de===0?Q[me.label]=F:Q[me.label]=me==null?void 0:me.value,Q),{});n("filter",$,F,!0)},z=(F,$={})=>{n("buttonClick",F,"",$)},j=F=>{var $,le;d.value=(le=($=te.getColumnChild(M.cloneDeep(F)))==null?void 0:$.filter(Q=>(Q==null?void 0:Q.label)!==""&&(Q==null?void 0:Q.label)!=="操作"))==null?void 0:le.map(Q=>({label:(Q==null?void 0:Q.label)??"",value:"",name:(Q==null?void 0:Q.prop)??"",isFormColHidden:Q==null?void 0:Q.isTableColHidden,width:2,prop:(Q==null?void 0:Q.prop)??""}))},L=e.ref(!1),_=F=>{var $;if((F==null?void 0:F.buttonName)==="确认"&&(n("filter",F==null?void 0:F.content),L.value=(F==null?void 0:F.content)&&Object.values(F==null?void 0:F.content).length>0),(F==null?void 0:F.buttonName)==="清空"){const le=M.cloneDeep(F==null?void 0:F.content);for(const Q in le)le[Q]="";d.value=($=d.value)==null?void 0:$.map(Q=>({...Q,value:""})),n("filter",le),L.value=!1}h.value=!1},x=()=>{h.value=!h.value,c.value=!0},w=()=>{var $,le;d.value=($=d.value)==null?void 0:$.map(Q=>({...Q,value:""}));const F=(le=d.value)==null?void 0:le.reduce((Q,me)=>(Q[me.label]=me.value,Q),{});n("filter",F)},b=e.ref(null);let E;return E=F=>{var me;if(!h.value)return;const $=(me=b==null?void 0:b.value)==null?void 0:me.$el,le=$==null?void 0:$.contains(F.target);let Q=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(de=>{de.contains(F.target)&&(Q=!0)}),!le&&!Q&&(h.value=!1)},e.onMounted(()=>{document.addEventListener("click",E),j(r.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",E)}),e.watch(()=>r.columns,()=>{j(r.columns)},{deep:!0,immediate:!0}),(F,$)=>{var ee,X,re,fe,$e,ue,B,se;const le=e.resolveComponent("el-icon"),Q=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-input"),de=e.resolveComponent("el-upload"),A=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",rf,[i()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(r==null?void 0:r.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((r==null?void 0:r.level)-1)*12+"px",fontWeight:600-((r==null?void 0:r.level)-1)*100>=400?600-((r==null?void 0:r.level)-1)*100:400,fontSize:17-(r==null?void 0:r.level)>=14?17-(r==null?void 0:r.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",nf,[r!=null&&r.filterShow?(e.openBlock(),e.createElementBlock("div",of,[e.createVNode(Pu,{trigger:"contextmenu",ref_key:"popOverRef",ref:b,title:"",width:800,placement:"bottom-start",isVisible:h.value,"onUpdate:isVisible":$[4]||($[4]=U=>h.value=U)},{reference:e.withCtx(()=>{var U,be,Me,Ve;return[e.createVNode(me,{modelValue:s.value,"onUpdate:modelValue":$[0]||($[0]=aa=>s.value=aa),style:{"min-width":"80px"},placeholder:L.value?(Me=(be=(U=a.filterValues)==null?void 0:U.filter(aa=>aa))==null?void 0:be.slice(0,3))==null?void 0:Me.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:G,disabled:((Ve=d.value)==null?void 0:Ve.length)===0},{suffix:e.withCtx(()=>{var aa,Ea;return[!s.value&&((Ea=(aa=a.filterValues)==null?void 0:aa.filter(ne=>ne))!=null&&Ea.join("/"))?(e.openBlock(),e.createBlock(le,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Q,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-content-value",onKeydown:$[1]||($[1]=e.withModifiers(()=>{},["stop"])),onKeyup:$[2]||($[2]=e.withModifiers(()=>{},["stop"])),onKeypress:$[3]||($[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:d.value,buttonValue:m.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:m.value,isStartJustify:!1,onOnButtonClick:_},null,8,["rowContents","buttonValue"]))],32)):e.createCommentVNode("",!0)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((ee=a.buttons)==null?void 0:ee.length)>0?(e.openBlock(),e.createElementBlock("div",tf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((X=a.buttons)==null?void 0:X.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,be)=>{var Me;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:be},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(de,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var Ve;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:aa=>z(U==null?void 0:U.label)},[e.createVNode(Q,{class:"table-op-icon",name:(Ve=g==null?void 0:g.find(aa=>(aa==null?void 0:aa.label)===(U==null?void 0:U.label)))==null?void 0:Ve.icon},null,8,["name"]),e.createElementVNode("span",cf,e.toDisplayString(U==null?void 0:U.label),1)],10,sf)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(dl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var Ve;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(Q,{class:"table-op-icon",name:(Ve=g==null?void 0:g.find(aa=>(aa==null?void 0:aa.label)===(U==null?void 0:U.label)))==null?void 0:Ve.icon},null,8,["name"]),e.createElementVNode("span",uf,e.toDisplayString(U==null?void 0:U.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",df,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,Ve=>{var aa,Ea;return e.openBlock(),e.createElementBlock("div",{key:Ve==null?void 0:Ve.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ne=>!a.lockingPage&&z(Ve==null?void 0:Ve.label)},[e.createTextVNode(e.toDisplayString(Ve==null?void 0:Ve.label),1),(aa=Ve==null?void 0:Ve.label)!=null&&aa.includes("选中")?(e.openBlock(),e.createElementBlock("span",ff,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ea=Ve==null?void 0:Ve.label)!=null&&Ea.includes("全部")?(e.openBlock(),e.createElementBlock("span",hf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,pf)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Ve=>!a.lockingPage&&z(U==null?void 0:U.label,U)},[e.createVNode(Q,{class:"table-op-icon",name:((Me=g==null?void 0:g.find(Ve=>(Ve==null?void 0:Ve.label)===(U==null?void 0:U.label)))==null?void 0:Me.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",mf,e.toDisplayString(U==null?void 0:U.label),1)],10,vf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",yf,[e.createElementVNode("div",gf,[e.createElementVNode("div",bf,[e.createVNode(me,{modelValue:s.value,"onUpdate:modelValue":$[5]||($[5]=U=>s.value=U),style:{"min-width":"80px"},placeholder:L.value?($e=(fe=(re=a.filterValues)==null?void 0:re.filter(U=>U))==null?void 0:fe.slice(0,3))==null?void 0:$e.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:G,disabled:((ue=d.value)==null?void 0:ue.length)===0},{suffix:e.withCtx(()=>{var U,be;return[!s.value&&((be=(U=a.filterValues)==null?void 0:U.filter(Me=>Me))!=null&&be.join("/"))?(e.openBlock(),e.createBlock(le,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Q,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((B=a.buttons)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",kf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=a.buttons)==null?void 0:se.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,be)=>{var Me;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:be},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(de,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var Ve;return[e.createElementVNode("div",xf,[e.createVNode(Q,{class:"table-op-icon",name:(Ve=g==null?void 0:g.find(aa=>(aa==null?void 0:aa.label)===(U==null?void 0:U.label)))==null?void 0:Ve.icon},null,8,["name"]),e.createElementVNode("span",wf,e.toDisplayString(U==null?void 0:U.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(dl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(A,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var Ve;return[e.createVNode(Q,{class:"table-op-icon",name:(Ve=g==null?void 0:g.find(aa=>(aa==null?void 0:aa.label)===(U==null?void 0:U.label)))==null?void 0:Ve.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(U==null?void 0:U.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",_f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,Ve=>(e.openBlock(),e.createBlock(A,{key:Ve==null?void 0:Ve.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:aa=>z(Ve==null?void 0:Ve.label)},{default:e.withCtx(()=>{var aa,Ea;return[e.createTextVNode(e.toDisplayString(Ve==null?void 0:Ve.label),1),(aa=Ve==null?void 0:Ve.label)!=null&&aa.includes("选中")?(e.openBlock(),e.createElementBlock("span",Sf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ea=Ve==null?void 0:Ve.label)!=null&&Ea.includes("全部")?(e.openBlock(),e.createElementBlock("span",Ef,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:Ve=>!a.lockingPage&&z(U==null?void 0:U.label,U)},[e.createVNode(Q,{class:"table-op-icon",name:(Me=g==null?void 0:g.find(Ve=>(Ve==null?void 0:Ve.label)===(U==null?void 0:U.label)))==null?void 0:Me.icon},null,8,["name"]),e.createElementVNode("span",Df,e.toDisplayString(U==null?void 0:U.label),1)],10,Cf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},Bf=ir._export_sfc(Tf,[["__scopeId","data-v-44a17652"]]),Nf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,n)=>{const r=e.resolveComponent("el-table-column"),i=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(i,{data:a.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,s=>{var h;return e.openBlock(),e.createBlock(r,{key:s==null?void 0:s.prop,label:s==null?void 0:s.label,prop:s==null?void 0:s.prop,fixed:(s==null?void 0:s.prop)==="operate"?"right":s==null?void 0:s.fixed,align:(s==null?void 0:s.align)??"left","show-overflow-tooltip":(s==null?void 0:s.showOverflowTooltip)??!0,width:s==null?void 0:s.width,"min-width":(s==null?void 0:s.minWidth)||((s==null?void 0:s.prop)==="operate"?80:(((h=s==null?void 0:s.label)==null?void 0:h.length)*2||4)*27)},{default:e.withCtx(c=>[e.renderSlot(l.$slots,"content",{row:c.row,column:c.column,$index:c.$index,scope:c}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,(d,m)=>(e.openBlock(),e.createBlock(dl._sfc_main$2,{key:m,column:d,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(g,u)=>({name:u,fn:e.withCtx(({row:C,slotData:I,item:k,column:G})=>[e.renderSlot(l.$slots,u,e.mergeProps({ref_for:!0},I??C,{item:k??d,slotData:I??C,row:C,column:G,columnProp:d}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class Af extends Vl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,n,r,i){const s=this,h=new Vl.FileLoader(s.manager);h.setPath(s.path),h.setResponseType("arraybuffer"),h.setRequestHeader(s.requestHeader),h.setWithCredentials(s.withCredentials),h.load(l,function(c){try{n(s.parse(c))}catch(d){i?i(d):console.error(d),s.manager.itemError(l)}},r,i)}_getDataView(l,n,r,i){switch(r){case"F":return i===8?l.getFloat64(n,this.littleEndian):l.getFloat32(n,this.littleEndian);case"I":return i===1?l.getInt8(n):i===2?l.getInt16(n,this.littleEndian):l.getInt32(n,this.littleEndian);case"U":return i===1?l.getUint8(n):i===2?l.getUint16(n,this.littleEndian):l.getUint32(n,this.littleEndian)}}parse(l){function n(I,k){const G=I.length,z=new Uint8Array(k);let j=0,L=0,_,x,w;do if(_=I[j++],_<32){if(_++,L+_>k)throw new Error("Output buffer is not large enough");if(j+_>G)throw new Error("Invalid compressed data");do z[L++]=I[j++];while(--_)}else{if(x=_>>5,w=L-((_&31)<<8)-1,j>=G)throw new Error("Invalid compressed data");if(x===7&&(x+=I[j++],j>=G))throw new Error("Invalid compressed data");if(w-=I[j++],L+x+2>k)throw new Error("Output buffer is not large enough");if(w<0)throw new Error("Invalid compressed data");if(w>=L)throw new Error("Invalid compressed data");do z[L++]=z[w++];while(--x+2)}while(j<G);return z}function r(I){const k={},G=new Uint8Array(I);let z="",j="",L=0,_=!1;const x=G.length;for(;L<x&&_===!1;){const F=String.fromCharCode(G[L++]);F===`
2
+ `||F==="\r"?(j.trim().toLowerCase().startsWith("data")&&(_=!0),j=""):j+=F,z+=F}const w=z.search(/[\r\n]DATA\s(\S*)\s/i),b=/[\r\n]DATA\s(\S*)\s/i.exec(z.slice(w-1));if(k.data=b[1],k.headerLen=b[0].length+w,k.str=z.slice(0,k.headerLen),k.str=k.str.replace(/#.*/gi,""),k.version=/^VERSION (.*)/im.exec(k.str),k.fields=/^FIELDS (.*)/im.exec(k.str),k.size=/^SIZE (.*)/im.exec(k.str),k.type=/^TYPE (.*)/im.exec(k.str),k.count=/^COUNT (.*)/im.exec(k.str),k.width=/^WIDTH (.*)/im.exec(k.str),k.height=/^HEIGHT (.*)/im.exec(k.str),k.viewpoint=/^VIEWPOINT (.*)/im.exec(k.str),k.points=/^POINTS (.*)/im.exec(k.str),k.version!==null&&(k.version=parseFloat(k.version[1])),k.fields=k.fields!==null?k.fields[1].split(" "):[],k.type!==null&&(k.type=k.type[1].split(" ")),k.width!==null&&(k.width=parseInt(k.width[1])),k.height!==null&&(k.height=parseInt(k.height[1])),k.viewpoint!==null&&(k.viewpoint=k.viewpoint[1]),k.points!==null&&(k.points=parseInt(k.points[1],10)),k.points===null&&(k.points=k.width*k.height),k.size!==null&&(k.size=k.size[1].split(" ").map(function(F){return parseInt(F,10)})),k.count!==null)k.count=k.count[1].split(" ").map(function(F){return parseInt(F,10)});else{k.count=[];for(let F=0,$=k.fields.length;F<$;F++)k.count.push(1)}k.offset={};let E=0;for(let F=0,$=k.fields.length;F<$;F++)k.data==="ascii"?k.offset[k.fields[F]]=F:(k.offset[k.fields[F]]=E,E+=k.size[F]*k.count[F]);return k.rowSize=E,k}const i=r(l),s=[],h=[],c=[],d=[],m=[],g=new Vl.Color;if(i.data==="ascii"){const I=i.offset,z=new TextDecoder().decode(l).slice(i.headerLen).split(`
3
+ `);for(let j=0,L=z.length;j<L;j++){if(z[j]==="")continue;const _=z[j].split(" ");if(I.x!==void 0&&(s.push(parseFloat(_[I.x])),s.push(parseFloat(_[I.y])),s.push(parseFloat(_[I.z]))),I.rgb!==void 0){const x=i.fields.findIndex(Q=>Q==="rgb"),w=i.type[x],b=parseFloat(_[I.rgb]);let E=b;if(w==="F"){const Q=new Float32Array(1);Q[0]=b,E=new Int32Array(Q.buffer)[0]}const F=(E>>16&255)/255,$=(E>>8&255)/255,le=(E>>0&255)/255;g.setRGB(F,$,le,Vl.SRGBColorSpace),c.push(g.r,g.g,g.b)}I.normal_x!==void 0&&(h.push(parseFloat(_[I.normal_x])),h.push(parseFloat(_[I.normal_y])),h.push(parseFloat(_[I.normal_z]))),I.intensity!==void 0&&d.push(parseFloat(_[I.intensity])),I.label!==void 0&&m.push(parseInt(_[I.label]))}}if(i.data==="binary_compressed"){const I=new Uint32Array(l.slice(i.headerLen,i.headerLen+8)),k=I[0],G=I[1],z=n(new Uint8Array(l,i.headerLen+8,k),G),j=new DataView(z.buffer),L=i.offset;for(let _=0;_<i.points;_++){if(L.x!==void 0){const x=i.fields.indexOf("x"),w=i.fields.indexOf("y"),b=i.fields.indexOf("z");s.push(this._getDataView(j,i.points*L.x+i.size[x]*_,i.type[x],i.size[x])),s.push(this._getDataView(j,i.points*L.y+i.size[w]*_,i.type[w],i.size[w])),s.push(this._getDataView(j,i.points*L.z+i.size[b]*_,i.type[b],i.size[b]))}if(L.rgb!==void 0){const x=i.fields.indexOf("rgb"),w=j.getUint8(i.points*L.rgb+i.size[x]*_+2)/255,b=j.getUint8(i.points*L.rgb+i.size[x]*_+1)/255,E=j.getUint8(i.points*L.rgb+i.size[x]*_+0)/255;g.setRGB(w,b,E,Vl.SRGBColorSpace),c.push(g.r,g.g,g.b)}if(L.normal_x!==void 0){const x=i.fields.indexOf("normal_x"),w=i.fields.indexOf("normal_y"),b=i.fields.indexOf("normal_z");h.push(this._getDataView(j,i.points*L.normal_x+i.size[x]*_,i.type[x],i.size[x])),h.push(this._getDataView(j,i.points*L.normal_y+i.size[w]*_,i.type[w],i.size[w])),h.push(this._getDataView(j,i.points*L.normal_z+i.size[b]*_,i.type[b],i.size[b]))}if(L.intensity!==void 0){const x=i.fields.indexOf("intensity");d.push(this._getDataView(j,i.points*L.intensity+i.size[x]*_,i.type[x],i.size[x]))}if(L.label!==void 0){const x=i.fields.indexOf("label");m.push(j.getInt32(i.points*L.label+i.size[x]*_,this.littleEndian))}}}if(i.data==="binary"){const I=new DataView(l,i.headerLen),k=i.offset;for(let G=0,z=0;G<i.points;G++,z+=i.rowSize){if(k.x!==void 0){const j=i.fields.indexOf("x"),L=i.fields.indexOf("y"),_=i.fields.indexOf("z");s.push(this._getDataView(I,z+k.x,i.type[j],i.size[j])),s.push(this._getDataView(I,z+k.y,i.type[L],i.size[L])),s.push(this._getDataView(I,z+k.z,i.type[_],i.size[_]))}if(k.rgb!==void 0){const j=I.getUint8(z+k.rgb+2)/255,L=I.getUint8(z+k.rgb+1)/255,_=I.getUint8(z+k.rgb+0)/255;g.setRGB(j,L,_,Vl.SRGBColorSpace),c.push(g.r,g.g,g.b)}if(k.normal_x!==void 0){const j=i.fields.indexOf("normal_x"),L=i.fields.indexOf("normal_y"),_=i.fields.indexOf("normal_z");h.push(this._getDataView(I,z+k.normal_x,i.type[j],i.size[j])),h.push(this._getDataView(I,z+k.normal_y,i.type[L],i.size[L])),h.push(this._getDataView(I,z+k.normal_z,i.type[_],i.size[_]))}if(k.intensity!==void 0){const j=i.fields.indexOf("intensity");d.push(this._getDataView(I,z+k.intensity,i.type[j],i.size[j]))}k.label!==void 0&&m.push(I.getInt32(z+k.label,this.littleEndian))}}const u=new Vl.BufferGeometry;s.length>0&&u.setAttribute("position",new Vl.Float32BufferAttribute(s,3)),h.length>0&&u.setAttribute("normal",new Vl.Float32BufferAttribute(h,3)),c.length>0&&u.setAttribute("color",new Vl.Float32BufferAttribute(c,3)),d.length>0&&u.setAttribute("intensity",new Vl.Float32BufferAttribute(d,1)),m.length>0&&u.setAttribute("label",new Vl.Int32BufferAttribute(m,1)),u.computeBoundingSphere();const C=new Vl.PointsMaterial({size:.005});return c.length>0&&(C.vertexColors=!0),new Vl.Points(u,C)}}const zf=M.useModelComp(M.pinia),{systemPath:ms}=M.storeToRefs(zf),xo=e.ref(),ys=new WeakMap;function Mf(a,l,n,r,i){const s=async C=>{try{const I=await M.platformDownloadFile({url:C});if(I.status!==200)throw new Error(`下载失败: ${I.status}`);return I.data}catch(I){throw console.error("addModelFromUrl失败:",I),I}},h=C=>new Promise((I,k)=>{const G=new FileReader;G.onload=z=>{try{const j=z.target.result,_=new Vn.MTLLoader().parse(j);_.preload(),I(_)}catch(j){k(j)}},G.onerror=()=>{k(new Error("MTL文件读取失败"))},G.readAsText(C)}),c=async C=>{const I={materials:{},create:function(k){return this.materials[k]?this.materials[k]:(console.warn(`Material '${k}' not found, using default material`),new Vl.MeshPhongMaterial({color:8947848,side:Vl.DoubleSide}))},getAsArray:function(){const k=[];for(const G in this.materials)k.push(this.materials[G]);return k},preload:function(){for(const k in this.materials)this.materials[k].map&&(this.materials[k].map.needsUpdate=!0)}};for(const k of C){const G=await h(k);Object.assign(I.materials,G.materials)}return I.preload(),I},d=async(C,I=[])=>new Promise((k,G)=>{const z=new FileReader;z.onload=async j=>{try{const L=j.target.result;let _=null;I&&I.length>0&&(I.length===1?_=await h(I[0]):_=await c(I));const x=new Vn.OBJLoader;_&&x.setMaterials(_);const w=x.parse(L);_||w.traverse(b=>{b.isMesh&&(b.material=new Vl.MeshPhongMaterial({color:8947848,side:Vl.DoubleSide}))}),k(w)}catch(L){G(L)}},z.onerror=()=>{G(new Error("OBJ文件读取失败"))},z.readAsText(C)}),m=async C=>{var I;try{n.value=!0;const{scene:k}=a();if(!k)throw new Error("Scene not initialized");i();const G=[];for(let z=0;z<C.length;z++){const j=C[z];r.value=`正在加载模型 ${z+1}/${C.length}...`;const L=await s(j.objUrl),_=((I=j.objUrl)==null?void 0:I.split("/").pop())||`model_${z}.obj`,x=new File([L],_,{type:L.type});let w=[];if(j.mtlUrls){const E=Array.isArray(j.mtlUrls)?j.mtlUrls:[j.mtlUrls];for(let F=0;F<E.length;F++){const $=E[F],le=await s($),Q=($==null?void 0:$.split("/").pop())||`material_${z}_${F}.mtl`,me=new File([le],Q,{type:le.type});w.push(me)}}const b=await d(x,w);k.add(b),l.value.push(b),G.push(b)}return n.value=!1,G}catch(k){throw console.error("加载模型失败:",k),n.value=!1,k}},g=async(C,I,k=[],G=[])=>{let z;const j=C.toLowerCase();switch(j){case".txt":case".cpt":case".obj":const L=await I.text();if(j===".txt"||j===".cpt"){const ne=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,ce=[...L.matchAll(ne)].map(ge=>({x:parseFloat(ge[1]),y:parseFloat(ge[2]),z:parseFloat(ge[3])})),ca=new Vl.BufferGeometry,we=ce.flatMap(ge=>[ge.x,ge.y,ge.z]);if(ca.setAttribute("position",new Vl.Float32BufferAttribute(we,3)),j===".txt"){const ge=new Vl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});z=new Vl.Points(ca,ge)}else if(j===".cpt"){const ge=new Vl.LineBasicMaterial({color:"#5B5C99",linewidth:100});z=new Vl.Line(ca,ge)}}else if(j===".obj"){const ne=new Vn.OBJLoader;if(k&&k.length>0){const ta=new Vn.MTLLoader;for(const ce of k){const ca=await ce.text(),we=ta.parse(ca);we.preload(),ne.setMaterials(we);break}}z=ne.parse(L),(!k||k.length===0)&&z.traverse(ta=>{ta.isMesh&&(ta.material=new Vl.MeshPhongMaterial({color:"#B3B3D4"})),ta instanceof Vl.Mesh&&(ta.material.side=Vl.DoubleSide)})}break;case".stl":const _=await I.arrayBuffer(),w=new Vn.STLLoader().parse(_),b=new Vl.MeshPhongMaterial({color:"#B3B3D4",side:Vl.DoubleSide});z=new Vl.Mesh(w,b);break;case".nc":const E=["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"],F={"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)"},$=new Vl.Group,le=E.map(ne=>new Promise((ta,ce)=>{new Vn.STLLoader().load(ms.value===""?`/model/${ne}`:`${ms.value}\\${ne}`,we=>{const ge=new Vl.MeshPhongMaterial({color:F[ne]||"#B3B3D4",side:Vl.DoubleSide}),he=new Vl.Mesh(we,ge);ta(he)},void 0,ce)}));try{(await Promise.all(le)).forEach(ta=>$.add(ta)),z=$}catch(ne){throw console.error("加载NC文件对应的STL文件失败:",ne),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const Q=new Af,me=new Vl.Group;try{const ne=await Ja.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ta=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"}),ce=await Ja.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ca=new Blob([ce.data],{type:"application/octet-stream;charset=UTF-8"}),we=await new Promise((he,Ke)=>{const fa=URL.createObjectURL(ta);Q.load(fa,qa=>{const V=new Float32Array(qa.geometry.attributes.position.count*3);for(let H=0;H<qa.geometry.attributes.position.count;H++)V[H*3]=1,V[H*3+1]=0,V[H*3+2]=0;qa.geometry.setAttribute("color",new Vl.BufferAttribute(V,3)),qa.material.vertexColors=!0,qa.scale.set(.3,.3,.3),URL.revokeObjectURL(fa),he(qa)},void 0,Ke)}),ge=await new Promise((he,Ke)=>{const fa=URL.createObjectURL(ca);Q.load(fa,qa=>{const V=new Float32Array(qa.geometry.attributes.position.count*3);for(let H=0;H<qa.geometry.attributes.position.count;H++)V[H*3]=0,V[H*3+1]=1,V[H*3+2]=0;qa.geometry.setAttribute("color",new Vl.BufferAttribute(V,3)),qa.material.vertexColors=!0,qa.scale.set(.3,.3,.3),URL.revokeObjectURL(fa),he(qa)},void 0,Ke)});me.add(we),me.add(ge),z=me}catch(ne){throw console.error("PCD文件加载失败:",ne),new Error("无法加载PCD文件")}break;case".urdf":const de=URL.createObjectURL(I),A=new Ru.URDFLoader,ee="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",X={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},re=new WeakMap,fe=new WeakMap,$e=new WeakMap,ue=async ne=>{if(re.has(ne))return console.log(`从缓存加载: ${ne}`),re.get(ne);try{const ta=await Ja.axios.get(`${ee}/${ne}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),ce=new Blob([ta.data],{type:"application/octet-stream;charset=UTF-8"});return X.enableCache&&re.set(ne,ce),ce}catch(ta){throw console.error(`加载文件失败: ${ne}`,ta),new Error(`无法加载文件: ${ne}`)}},B=(ne="default")=>{if(fe.has(ne))return fe.get(ne);const ta=new Vl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Vl.FrontSide});return fe.set(ne,ta),ta},se=ne=>{try{ne.isBufferGeometry&&ne.mergeVertices&&ne.mergeVertices(),ne.computeVertexNormals&&ne.computeVertexNormals(),ne.computeBoundingSphere&&ne.computeBoundingSphere(),ne.deleteAttribute&&ne.deleteAttribute("uv2")}catch(ta){console.warn("几何体优化失败,使用原始几何体:",ta)}return ne},U=async(ne,ta,ce)=>{const ca=`stl_${ta}`;if($e.has(ca)){const Ke=$e.get(ca);return new Vl.Mesh(Ke,B())}const we=await ne.arrayBuffer();let he=new Vn.STLLoader(ce).parse(we);return he=se(he),$e.set(ca,he),new Vl.Mesh(he,B())},be=async(ne,ta,ce)=>{const ca=`obj_${ta}`;if(re.has(ca))return re.get(ca).clone();const we=await ne.text(),ge=new Vn.OBJLoader(ce),he=ta.replace(".obj",".mtl");try{const qa=await(await ue(he)).text(),H=new Vn.MTLLoader(ce).parse(qa);H.preload(),ge.setMaterials(H)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${he}`)}const Ke=ge.parse(we);return Ke.traverse(fa=>{fa.isMesh&&(fa.geometry=se(fa.geometry),fa.castShadow=!0,fa.receiveShadow=!0,fa.renderOrder=1)}),re.set(ca,Ke),Ke},Me=(ne,ta)=>{const ce=new Vl.LOD;if(ce.addLevel(ne,0),ne.geometry){const ca=ne.geometry.clone(),we=new Vl.Mesh(ca,ne.material);ce.addLevel(we,50)}return ce};let Ve=0,aa=0;const Ea=[];A.loadMeshCb=async(ne,ta,ce,ca,we)=>{const ge=ne.split("/").pop(),he=ce||(()=>{});Ve++;const Ke=new Promise(async(fa,qa)=>{try{const V=await ue(ge);if(!V||V.size===0)throw new Error(`文件为空: ${ge}`);const H=ge.split(".").pop().toLowerCase();let Z;switch(H){case"stl":Z=await U(V,ge,ta);break;case"obj":Z=await be(V,ge,ta);break;default:throw new Error(`不支持的文件格式: ${H}`)}X.enableLOD&&Z.isMesh&&(Z=Me(Z,ge)),he(Z),aa++,ca&&ca({loaded:aa,total:Ve,progress:aa/Ve}),fa(Z)}catch(V){console.error(`mesh文件加载失败: ${ge}`,V);const H=new Vl.Group;he(H),fa(H);const Z=new Vl.BoxGeometry(.1,.1,.1),ve=new Vl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Vl.Mesh(Z,ve)}});Ea.push(Ke)};try{if(!de){xo.value=void 0;break}if(z=await A.loadAsync(de),console.log(`URDF文件加载完成,等待${Ve}个mesh文件加载...`),Ea.length>0)try{await Promise.allSettled(Ea),console.log(`所有mesh文件处理完成,成功加载: ${aa}/${Ve}`)}catch(ce){console.warn("部分mesh文件加载失败,但继续显示模型",ce)}z.traverse(ce=>{ce.isMesh&&(ce.castShadow=!0,ce.receiveShadow=!0,ce.renderOrder=1,ce.material&&(ce.material.needsUpdate=!0))}),console.time("计算包围盒");const ne=new Vl.Box3;ne.expandByObject(z);const ta=`urdf_${Date.now()}`;z.userData.boundingBox=ne.clone(),z.userData.modelId=ta,ys.set(ta,{box:ne.clone(),center:ne.getCenter(new Vl.Vector3),size:ne.getSize(new Vl.Vector3),maxSize:Math.max(...ne.getSize(new Vl.Vector3).toArray())}),xo.value=z,console.log("URDF模型加载完成并优化")}catch(ne){console.error("URDF加载失败:",ne),xo.value=void 0}finally{de&&URL.revokeObjectURL(de)}break;default:throw new Error(`不支持的文件格式: ${C}`)}return z};return{addModelsFromUrls:m,loadModelByDefaultPath:async C=>{console.log(C);try{n.value=!0,r.value="正在加载模型...";const{scene:I}=a();if(!I)throw new Error("Scene not initialized");i(),await new Promise(G=>setTimeout(G,100));const k=[];for(let G=0;G<C.length;G++){const z=C[G],j=await g(z.suffix,z.blob,z.mtlBlobs||[],z.meshFiles||[]);j&&(I.add(j),l.value.push(j),k.push(j))}return n.value=!1,r.value="",k}catch(I){throw console.error("加载模型失败:",I),n.value=!1,r.value="",I}},urdfModel:xo,modelBoundingBoxes:ys}}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>',(a=>{var l=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var r,i,s,h,c,d=function(u,C){C.parentNode.insertBefore(u,C)};if(l&&!a.__iconfont__svg__cssinject__){a.__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(u){console&&console.log(u)}}r=function(){var u,C=document.createElement("div");C.innerHTML=a._iconfont_svg_string_4827314,(C=C.getElementsByTagName("svg")[0])&&(C.setAttribute("aria-hidden","true"),C.style.position="absolute",C.style.width=0,C.style.height=0,C.style.overflow="hidden",C=C,(u=document.body).firstChild?d(C,u.firstChild):u.appendChild(C))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),r()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(s=r,h=a.document,c=!1,g(),h.onreadystatechange=function(){h.readyState=="complete"&&(h.onreadystatechange=null,m())})}function m(){c||(c=!0,s())}function g(){try{h.documentElement.doScroll("left")}catch{return void setTimeout(g,50)}m()}})(window);const If=["onClick"],Of=e.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},backgroundUrl:{default:""}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(null),s=e.ref(null),h=e.computed(()=>{const x=Number(n==null?void 0:n.textSize),w=te.rgbaToColor(n==null?void 0:n.textColor),b={},E={};return!Number.isNaN(x)&&x&&(b.fontSize=`${x}px`,E.fontSize=`${x}px`),w&&(b.color=w,E.color=w),{label:b,value:E}}),c=e.ref(""),d=e.ref(""),m=e.ref(!1),g=async x=>{if(x){d.value&&(URL.revokeObjectURL(d.value),d.value="");try{const w=await M.platformDownloadFile({url:x}),b=new Blob([w==null?void 0:w.data],{type:(w==null?void 0:w.headers["content-type"])||"image/*"});d.value=URL.createObjectURL(b)}catch{d.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,x=>{x&&(c.value=x)},{immediate:!0}),e.watch(c,x=>{g(x)},{immediate:!0});const u=()=>{var x;(x=s.value)==null||x.click()},C=async x=>{var E,F,$;const w=x.target,b=(E=w==null?void 0:w.files)==null?void 0:E[0];if(!b){w.value="";return}m.value=!0;try{const le=new FormData;le.append("file",b);const Q=await M.platformUploadFile(le),me=($=(F=Q==null?void 0:Q.data)==null?void 0:F.result)==null?void 0:$.url;me?(c.value=me,r("update:backGroundImage",me),g(me),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{m.value=!1,w.value=""}},I=e.computed(()=>{var x;return d.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(x=n==null?void 0:n.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),k=x=>dl.getComponent(x),G=x=>{if(!x)return;const w=x.querySelector("input, textarea, .el-input__inner");w&&typeof w.focus=="function"&&w.focus()},z=(x,w,b)=>{n.disabled||x.field&&(i.value=w,e.nextTick(()=>{G(b.currentTarget)}))},j=()=>{i.value=null},L=x=>{var b;const w=((b=x==null?void 0:x.field)==null?void 0:b.value)??(x==null?void 0:x.value);return w==null||w===""?"-":w},_=x=>{const w=x!=null&&x.width&&x.width>0?x.width:1,E=`calc((100% - ${(w-1)*16}px) / ${w})`;return{flex:`0 0 ${E}`,maxWidth:E,minWidth:"140px",boxSizing:"border-box"}};return(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(I.value),onClick:w[2]||(w[2]=b=>(n==null?void 0:n.backGround)&&u())},[n!=null&&n.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:w[0]||(w[0]=e.withModifiers(b=>u(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:s,type:"file",accept:"image/*",style:{display:"none"},onChange:C},null,544),w[3]||(w[3]=e.createElementVNode("img",{src:dl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.items,(b,E)=>{var F,$,le,Q,me,de,A,ee;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:E,style:e.normalizeStyle(_(b)),onClick:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle(h.value.label)},e.toDisplayString(b==null?void 0:b.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(h.value.value),onClick:X=>{var re;return(re=b.field)!=null&&re.isNoClick?null:z(b,E,X)}},[i.value===E&&b.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k(((F=b.field)==null?void 0:F.type)??"Input")),{key:0,modelValue:b.field.value,"onUpdate:modelValue":X=>b.field.value=X,isEdit:!0,disabled:($=b.field)==null?void 0:$.disabled,content:((le=b.field)==null?void 0:le.contents)??[],optionUrl:b.field,originalValue:(Q=b.field)==null?void 0:Q.value,config:(me=b.field)==null?void 0:me.config,configModel:((de=b.field)==null?void 0:de.prop)??((A=b.field)==null?void 0:A.name),selectedTagList:((ee=b.field)==null?void 0:ee.selectValue)??[],onBlur:j,onBlurChange:j},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(L(b)),1)],64))],12,If)],4)}),128))],4))}}),Lf=ir._export_sfc(Of,[["__scopeId","data-v-af63fc22"]]),vc=M.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),Rf={class:"calculator-content"},$f={class:"calculator-child"},Vf={class:"calculator-child"},Ff=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),n=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(r,i)=>(e.openBlock(),e.createElementBlock("div",Rf,[e.createElementVNode("div",$f,[e.createVNode(dl.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",Vf,[e.createVNode(dl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Pf=ir._export_sfc(Ff,[["__scopeId","data-v-73db0fe7"]]),St=(a,l)=>{let n=a,r=l;return Array.isArray(n)&&(n=n==null?void 0:n.map((i,s)=>{if(Array.isArray(i)){let h={};return i=i==null?void 0:i.forEach((c,d)=>{var m;(m=r==null?void 0:r[d])!=null&&m.prop?h[r[d].prop]=c:Array.isArray(c)&&(h.children=St(c,r))}),Object.assign(h,{id:s})}else return i})),n},mc=(a,l,n)=>{let r=a,i=l;return r=r==null?void 0:r.map((s,h)=>{var c,d;return!Array.isArray(s)||!((c=i==null?void 0:i[h])!=null&&c.label)&&!n||(s.unshift(((d=i==null?void 0:i[h])==null?void 0:d.label)??""),s.some(m=>Array.isArray(m))&&(s=s==null?void 0:s.map(m=>{var g;return Array.isArray(m)&&(m=mc(m,(g=i==null?void 0:i[h])==null?void 0:g.children,n)),m}))),s}),r},jf=(a,l,n)=>{if(l==="")return a==null?void 0:a.filter(r=>(r==null?void 0:r.id)!==n);{const r=l.split("-");return Hf(a,r,n)}},Hf=(a,l,n)=>{let r=a,i=l;return(i==null?void 0:i.length)===0?r=r==null?void 0:r.filter(s=>s.id!==n):r=r==null?void 0:r.map(s=>(s.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),s=yc(s,i,n)),s)),r},yc=(a,l,n)=>{var s,h;let r=a,i=l;return(i==null?void 0:i.length)===0?r.children=(s=r.children)==null?void 0:s.filter(c=>c.id!==n):r.children=(h=r.children)==null?void 0:h.map(c=>(c.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),c=yc(c,i,n)),c)),r},Uf=(a,l,n)=>{if(l==="")return n;{const r=l.split("-");return qf(a,r,n)}},qf=(a,l,n)=>{let r=a,i=l;return(i==null?void 0:i.length)===0?r=n:r=r==null?void 0:r.map(s=>(s.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),s=gc(s,i,n)),s)),r},gc=(a,l,n)=>{var s;let r=a,i=l;return(i==null?void 0:i.length)===0?r.children=n:r.children=(s=r.children)==null?void 0:s.map(h=>(h.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),h=gc(h,i,n)),h)),r};class Wf{constructor(l={}){sn(this,"url");sn(this,"heartbeatInterval");sn(this,"socket",null);sn(this,"isConnected",!1);sn(this,"heartTimer",null);sn(this,"canvas",null);sn(this,"ctx",null);sn(this,"mainCamCutMode",0);sn(this,"pMainShowStartX",0);sn(this,"pMainShowStartY",0);sn(this,"onLog");sn(this,"onDevCount");sn(this,"onResolution");sn(this,"onCameraStatus");sn(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,n,r){var h;(h=this.canvas)!=null&&h.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const i=document.createElement("canvas");i.style.border="solid 1px #A0A0A0",i.id="MainCamCanvas",i.width=n,i.height=r;const s=i.getContext("2d");if(!s)throw new Error("无法获取 CanvasRenderingContext2D");l.appendChild(i),this.canvas=i,this.ctx=s}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((l,n)=>{const r=new WebSocket(this.url);r.binaryType="arraybuffer",r.onopen=()=>{this.socket=r,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},r.onerror=i=>{this.isConnected=!1,this.log("socket.onerror"),n(i)},r.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},r.onmessage=i=>{this.handleMessage(i)}})}destroy(){var l;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,(l=this.canvas)!=null&&l.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(l=0){this.sendBytes(new Uint8Array([119,136,81,l]))}chooseResolution(l){if(!Array.isArray(l)||l.length===0)return null;const n=l.find(i=>i.width===2592&&i.height===1944);return n||[...l].sort((i,s)=>s.width*s.height-i.width*i.height)[0]||null}openCamera(l=0,n=1280,r=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const i=new Uint8Array(12);i[0]=119,i[1]=136,i[2]=1,i[3]=l,i[4]=this.canvas.width>>8&255,i[5]=this.canvas.width&255,i[6]=this.canvas.height>>8&255,i[7]=this.canvas.height&255,i[8]=n>>8&255,i[9]=n&255,i[10]=r>>8&255,i[11]=r&255,this.sendBytes(i)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const i=new Uint8Array(12);i[0]=119,i[1]=136,i[2]=16,i[3]=0,i[4]=0,i[5]=0,i[6]=0,i[7]=0,i[8]=1,i[9]=0,i[10]=0,i[11]=0,this.sendBytes(i)}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(l){var n;(n=this.onLog)==null||n.call(this,l)}sendBytes(l){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(l.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(l){var i,s,h,c,d,m;const n=new Uint8Array(l.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 r=n[2];if(r===80){const g=n[3],u=n.length-4,C=new Uint8Array(u);for(let G=0;G<u;G++)C[G]=n[4+G];const k=decodeURIComponent(this.byteToString(C)).split("|");(i=this.onDevCount)==null||i.call(this,g,k);return}if(r===81){const g=n[3]||0,u=[];for(let C=0;C<g;C++){const I=(n[4+C*4+0]||0)*256+(n[4+C*4+1]||0),k=(n[4+C*4+2]||0)*256+(n[4+C*4+3]||0);u.push({width:I,height:k,text:`${I}*${k}`})}(s=this.onResolution)==null||s.call(this,g,u);return}if(r===1){n[3]===1&&((h=this.onCameraStatus)==null||h.call(this,"opened")),n[3]===3&&((c=this.onCameraStatus)==null||c.call(this,"closed"));return}if(r===16){if(n[3]===1){const u=n[4]*256+n[5],C=n[6]*65536+n[7]*256+n[8];let I="";if(u>0){const z=new Uint8Array(u);for(let j=0;j<u;j++)z[j]=n[9+j];I=decodeURIComponent(this.byteToString(z))}const k=new Uint8Array(C);for(let z=0;z<C;z++)k[z]=n[9+u+z];const G=this.uint8ArrayToString(k);(d=this.onPhoto)==null||d.call(this,{flag:0,imgPath:I,base64:G})}n[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(r===204){if(!this.canvas||!this.ctx)return;const g=n[3]*256+n[4],u=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 C=this.ctx.createImageData(g,u);let I=11;for(let k=0;k<C.data.length;k+=4)C.data[k+0]=n[I],C.data[k+1]=n[I+1],C.data[k+2]=n[I+2],C.data[k+3]=255,I+=3;this.ctx.putImageData(C,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}byteToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}}const Kf={style:{display:"flex",gap:"16px",height:"100%"}},Gf={key:0,style:{color:"var(--el-text-color-secondary)"}},Yf={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},Jf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Xf={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"}},Zf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},Qf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},e0=["src","onClick"],a0=["onClick"],l0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},r0={class:"dialog-footer"},n0=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(null),s=e.ref(!1),h=e.ref([]),c=e.ref(""),d=e.ref(!1),m=e.ref([]),g=new Wf({url:"ws://127.0.0.1:22225"});function u($,le){var X;const Q=$.split(","),me=((X=Q[0].match(/:(.*?);/))==null?void 0:X[1])??"image/jpeg",de=atob(Q[1]);let A=de.length;const ee=new Uint8Array(A);for(;A--;)ee[A]=de.charCodeAt(A);return new File([ee],le,{type:me})}function C(){g.onLog=$=>{console.log("[GPY]",$)},g.onDevCount=($,le)=>{if(c.value+=`设备数量=${$},设备=${le.join(",")}
4
+ `,$>0){c.value+=`检测到设备,正在获取分辨率...
5
+ `;try{g.getResolution(0)}catch(Q){c.value+=`获取分辨率失败:${(Q==null?void 0:Q.message)??Q}
6
+ `}}else c.value+=`未检测到高拍仪设备!
7
+ `},g.onResolution=($,le)=>{if($<=0||!Array.isArray(le)||le.length===0){c.value+=`未获取到可用分辨率,回退使用 1280*720 打开...
8
+ `;try{g.openCamera(0,1280,720)}catch(me){c.value+=`打开摄像头失败:${(me==null?void 0:me.message)??me}
9
+ `}return}const Q=g.chooseResolution(le);if(!Q){c.value+=`分辨率选择失败,回退使用 1280*720 打开...
10
+ `;try{g.openCamera(0,1280,720)}catch(me){c.value+=`打开摄像头失败:${(me==null?void 0:me.message)??me}
11
+ `}return}c.value+=`获取分辨率 ${Q.text}成功,打开摄像头...
12
+ `;try{g.closeCamera(),setTimeout(()=>{try{g.openCamera(0,Q.width,Q.height)}catch(me){c.value+=`打开摄像头失败:${(me==null?void 0:me.message)??me}
13
+ `}},100)}catch{try{g.openCamera(0,Q.width,Q.height)}catch(me){c.value+=`打开摄像头失败:${(me==null?void 0:me.message)??me}
14
+ `}}},g.onCameraStatus=$=>{$==="opened"?(s.value=!0,c.value+=`摄像头已打开
15
+ `):(s.value=!1,c.value+=`摄像头已关闭
16
+ `)},g.onPhoto=$=>{if($.flag===0&&$.base64){const le=`data:image/jpeg;base64,${$.base64}`,Q=u(le,`gpy-capture-${Date.now()}.jpg`);h.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:le,file:Q}),c.value+=`拍照完成,已接收图片(当前 ${h.value.length} 张)
17
+ `}else c.value+=`拍照失败 flag=${$.flag}
18
+ `}}const I=async()=>{if(await e.nextTick(),!i.value)return;k(),C();const $=i.value.getBoundingClientRect();g.init(i.value,Math.floor($.width),Math.floor($.height)),c.value+=`正在连接设备服务...
19
+ `,await g.connect(),c.value+=`正在获取设备数量...
20
+ `,g.getDevCount()},k=()=>{try{g.destroy()}catch($){console.error($)}s.value=!1,h.value=[],c.value="",d.value=!1,m.value=[]};e.watch(()=>n.visible,$=>{$?I():k()});const G=()=>{try{g.bestSize()}catch($){console.error($)}},z=()=>{try{g.rotateLeft()}catch($){console.error($)}},j=()=>{try{g.rotateRight()}catch($){console.error($)}},L=()=>{try{g.focus()}catch($){console.error($)}},_=()=>{c.value+=`正在拍照...
21
+ `;try{g.photo()}catch($){c.value+=`拍照调用失败:${($==null?void 0:$.message)??$}
22
+ `}},x=()=>{h.value.length>0?r("confirm",h.value.map($=>$.file)):r("confirm",[])},w=$=>{$<0||$>=h.value.length||(h.value.splice($,1),c.value+=`已删除一张图片(剩余 ${h.value.length} 张)
23
+ `)},b=$=>{if(!$)return;const le=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:le,blobUrl:$}],d.value=!0},E=()=>{d.value=!1},F=()=>{k(),r("cancel")};return($,le)=>{const Q=e.resolveComponent("el-input"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Mr.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:F,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Kf,[e.createElementVNode("div",{ref_key:"cameraBox",ref:i,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)"}},[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Gf,"初始化摄像头..."))],512),e.createElementVNode("div",Yf,[e.createElementVNode("div",Jf,[le[0]||(le[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",Xf,[h.value.length===0?(e.openBlock(),e.createElementBlock("div",Zf,"暂无图片")):(e.openBlock(),e.createElementBlock("div",Qf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(de,A)=>(e.openBlock(),e.createElementBlock("div",{key:de.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:de.url,onClick:ee=>b(de.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,e0),e.createElementVNode("div",{onClick:ee=>w(A),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,a0)]))),128))]))],512)]),e.createElementVNode("div",l0,[le[1]||(le[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(Q,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",r0,[e.createVNode(me,{onClick:G,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>le[2]||(le[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(me,{onClick:z,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>le[3]||(le[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(me,{onClick:j,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>le[4]||(le[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(me,{onClick:L,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>le[5]||(le[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(me,{onClick:_,disabled:!s.value,id:"themeButton"},{default:e.withCtx(()=>le[6]||(le[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),le[9]||(le[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(me,{onClick:x,disabled:h.value.length===0,id:"themeButton"},{default:e.withCtx(()=>le[7]||(le[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(me,{onClick:F,id:"themeBorderButton"},{default:e.withCtx(()=>le[8]||(le[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),d.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:E},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),i0=ir._export_sfc(n0,[["__scopeId","data-v-24a2050a"]]),gs=M.useMenuState(M.pinia),o0=async a=>{var s,h,c,d,m,g;let l=a==null?void 0:a.导入文件,n=a==null?void 0:a.函数参数,r=(s=l==null?void 0:l[0])==null?void 0:s.url,i="";if(!(r!=null&&r.includes("http"))||!(r!=null&&r.includes("https"))){gs.setContentLoading(!0);const u=await M.platformDownloadFile({url:r});let C=u==null?void 0:u.data;const I=new FormData;I.append("file",C,((h=l==null?void 0:l[0])==null?void 0:h.name)+"."+((c=r==null?void 0:r.split("."))==null?void 0:c[1])),I.append("query",n);let k=await rc(I);k=(g=(m=(d=k==null?void 0:k.data)==null?void 0:d.data)==null?void 0:m.response)==null?void 0:g.replace("generateResult",a==null?void 0:a.函数名称),i=k,gs.setContentLoading(!1)}return i},Mt=M.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),t0=M.useModelComp(M.pinia),{extraContents:kv}=M.storeToRefs(t0),s0=M.useLoginState(M.pinia),{extraUrl:pi}=M.storeToRefs(s0);let bc=pi.value===""||!pi.value?"http://139.196.154.85:20015":pi.value;e.watch(()=>pi.value,()=>{bc=pi.value===""||!pi.value?"http://139.196.154.85:20015":pi.value},{deep:!0,immediate:!0});const Mo={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},bs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:bc+"/api/public/paddleOCR"};class c0{constructor(l){sn(this,"config");this.config={...bs,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const n=this.config.maxSize*1024*1024;return l.size<=n}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=Ja.Local.get(Ja.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,n){return{title:n,form:{OCR图片文件:l}}}async recognize(l,n){const r=this.getAuthorizationToken(),i=this.buildOCRRequest(l,n),s=this.config.apiUrl||bs.apiUrl||"";return(await Ja.axios.post(s,i,{headers:{"Content-Type":"application/json",Authorization:r}})).data}getFieldAliases(l){return Mo[l]?Mo[l]:[l]}extractTableHeaders(l){const n=[],r=new Set,i=h=>{const c=h==null?void 0:h.label;return!(!c||c==="操作"||c===this.config.columnName||(h==null?void 0:h.type)==="operate"||(h==null?void 0:h.prop)==="operate")},s=h=>{(h||[]).forEach(c=>{if(!c)return;const d=(c==null?void 0:c.children)||(c==null?void 0:c.child)||(c==null?void 0:c.columns);if(Array.isArray(d)&&d.length>0){s(d);return}if(i(c)){const m=c.label;if(!r.has(m)){r.add(m);const g=this.getFieldAliases(m);n.push(g)}}})};return s(l||[]),n}}function kc(a){return new c0(a)}kc();const Et=async(a,l)=>{var h,c,d,m,g,u,C,I,k,G,z,j,L,_,x,w,b;let n=(c=(h=M.cloneDeep(a))==null?void 0:h.optionUrl)==null?void 0:c.menuSelect,r=[];n==null||n.forEach(E=>{});let i="",s=await te.menuToParent(n);if(s==null||s.forEach(E=>{var F,$,le,Q;(E==null?void 0:E.name)===(((Q=(le=($=(F=M.cloneDeep(a))==null?void 0:F.optionUrl)==null?void 0:$.groupSelect)==null?void 0:le[0])==null?void 0:Q.replaceAll("'",""))??"")&&(i=E==null?void 0:E.id)}),l){i=l;const E=await Fr.getInsofDataApi({id:i}),F=(u=(g=(m=(d=E==null?void 0:E.data)==null?void 0:d.result)==null?void 0:m[0])==null?void 0:g.key)==null?void 0:u.pageKey;s=await te.getItemData(F,sessionStorage.getItem("systemKey"),"")}if(i!==""){let E;l?E=(C=s==null?void 0:s.find(le=>(le==null?void 0:le.id)===l))==null?void 0:C.compData:E=(I=s==null?void 0:s.find(le=>{var Q,me,de,A;return(le==null?void 0:le.name)===(((me=(Q=a==null?void 0:a.groupSelect)==null?void 0:Q.split(":"))==null?void 0:me[0])||((A=(de=a==null?void 0:a.optionUrl)==null?void 0:de.groupSelect)==null?void 0:A[0]))}))==null?void 0:I.compData;let F=(G=(k=E==null?void 0:E.find(le=>(le==null?void 0:le.key)==="header"))==null?void 0:k.contents)==null?void 0:G.map(le=>le==null?void 0:le.label);(j=(z=E==null?void 0:E.find(le=>(le==null?void 0:le.key)==="header"))==null?void 0:z.contents)!=null&&j.every(le=>Array.isArray(le))&&(F=(x=te.getColumnChild((_=(L=E==null?void 0:E.find(le=>(le==null?void 0:le.key)==="header"))==null?void 0:L.contents)==null?void 0:_[0]))==null?void 0:x.map(le=>le==null?void 0:le.prop));let $=(b=(w=E==null?void 0:E.find(le=>(le==null?void 0:le.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:b.map(le=>{if(Array.isArray(le))le=le==null?void 0:le.filter(Q=>!(Q!=null&&Q.id));else{let Q={};for(let me in le)me!=="id"&&(Q[me]=le==null?void 0:le[me]);le=Q}return le});$==null||$.forEach(le=>{Array.isArray(le)?r.push(te.getValueToObjectValue(le,F)):r.push(le)})}return r},u0=M.useMenuState(M.pinia),{activeMenuPath:xv}=M.storeToRefs(u0),d0=M.useUnit(M.pinia),{chooseTitle:wv}=M.storeToRefs(d0),p0="col-operate",xc=a=>`${p0}-${a}`,f0=(a,l)=>{const n=new Map;a.forEach(i=>{const{prop:s}=i;n.set(s,i)});const r=i=>{Array.isArray(i)&&i.forEach(s=>{const{prop:h}=s||{},c=n.get(h);h0(c,s),Array.isArray(s==null?void 0:s.children)&&s.children.length>0&&r(s.children)})};return r(l),l},h0=(a,l)=>(a&&(l.sortable=a==null?void 0:a.sortable,l.filterable=a==null?void 0:a.filterable,l.showSummary=a==null?void 0:a.showSummary,l.operable=a==null?void 0:a.operable,l.fixed=a==null?void 0:a.fixed),l),v0=(a,l)=>{const{sortable:n=!1,filterable:r=!1,showSummary:i=!1,operable:s=!1,fixed:h=!1}=l||{};return{prop:a,sortable:n,filterable:r,showSummary:i,operable:s,fixed:h}},m0=async a=>{var s,h;if(!a)return;const l=xc(a),n=await Fr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),r=(s=n==null?void 0:n.data)==null?void 0:s.code,i=(h=n==null?void 0:n.data)==null?void 0:h.result;if(r==200)return i==null?void 0:i[0]},y0=async a=>{if(a)return[]},g0=async(a,l)=>{if(!a||!l)return;const n=xc(a);return await Fr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:l}})},b0=async(a,l)=>!a||!l?void 0:await Fr.updateInsofDataApi({id:a,value:{columns:l}}),ks=async(a,l)=>{const n=sessionStorage.getItem("systemKey");if(!a||!l||!n)return;const r=await m0(a);return r?await b0(r==null?void 0:r.id,l):await g0(a,l)};var Do={exports:{}},k0=Do.exports,xs;function x0(){return xs||(xs=1,function(a,l){(function(n,r){r()})(k0,function(){function n(m,g){return typeof g>"u"?g={autoBom:!1}:typeof g!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),g={autoBom:!g}),g.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(m.type)?new Blob(["\uFEFF",m],{type:m.type}):m}function r(m,g,u){var C=new XMLHttpRequest;C.open("GET",m),C.responseType="blob",C.onload=function(){d(C.response,g,u)},C.onerror=function(){console.error("could not download file")},C.send()}function i(m){var g=new XMLHttpRequest;g.open("HEAD",m,!1);try{g.send()}catch{}return 200<=g.status&&299>=g.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var g=document.createEvent("MouseEvents");g.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(g)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof M.commonjsGlobal=="object"&&M.commonjsGlobal.global===M.commonjsGlobal?M.commonjsGlobal:void 0,c=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),d=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(m,g,u){var C=h.URL||h.webkitURL,I=document.createElement("a");g=g||m.name||"download",I.download=g,I.rel="noopener",typeof m=="string"?(I.href=m,I.origin===location.origin?s(I):i(I.href)?r(m,g,u):s(I,I.target="_blank")):(I.href=C.createObjectURL(m),setTimeout(function(){C.revokeObjectURL(I.href)},4e4),setTimeout(function(){s(I)},0))}:"msSaveOrOpenBlob"in navigator?function(m,g,u){if(g=g||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(n(m,u),g);else if(i(m))r(m,g,u);else{var C=document.createElement("a");C.href=m,C.target="_blank",setTimeout(function(){s(C)})}}:function(m,g,u,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof m=="string")return r(m,g,u);var I=m.type==="application/octet-stream",k=/constructor/i.test(h.HTMLElement)||h.safari,G=/CriOS\/[\d]+/.test(navigator.userAgent);if((G||I&&k||c)&&typeof FileReader<"u"){var z=new FileReader;z.onloadend=function(){var _=z.result;_=G?_:_.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=_:location=_,C=null},z.readAsDataURL(m)}else{var j=h.URL||h.webkitURL,L=j.createObjectURL(m);C?C.location=L:location.href=L,C=null,setTimeout(function(){j.revokeObjectURL(L)},4e4)}});h.saveAs=d.saveAs=d,a.exports=d})}(Do)),Do.exports}x0();const Xn=M.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(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a},setSelectTab(a){this.selectTab=a}}}),w0=M.useLoginState(M.pinia),{loginUserInfo:mt}=M.storeToRefs(w0),_0=async a=>{var r,i,s;let l=await M.getAllTables({platId:parseInt((r=mt==null?void 0:mt.value)==null?void 0:r.plat_id),tableNames:[a]});return l=(s=(i=l==null?void 0:l.data)==null?void 0:i.result)==null?void 0:s[0],await hc(l,!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:l}]}]},S0=M.useLoginState(),{loginUserInfo:fl}=M.storeToRefs(S0);let wo="$R";const $r=M.useModelComp(M.pinia),wc=e.ref(!1),{itemData:E0,itemGridData:ci,curStructureCompIds:ws,isSubmitCurStructure:C0,routeToChildPath:D0,pageMapState:Ct,itemExtendData:_o,refreshTable:_s,refreshCurrentPageInform:T0}=M.storeToRefs($r),jo=Xn(M.pinia),qr=M.useMenuState(M.pinia),fr=e.shallowRef([]),{asideMenus:B0,activeTopMenuPath:N0,activeMenuPath:El,platform:_v,buttonTriggerType:A0,currentMenuPath:mn}=M.storeToRefs(qr),_n=M.useUnit(M.pinia),{selectTitle:Gn,chooseTitle:Io}=M.storeToRefs(_n);e.ref();const zi=e.ref(!0),Jn=e.ref(0),Dt=e.ref([]);e.ref(!1);const It=e.ref(!1),Zi=e.ref(),_c=e.ref(),Sc=e.ref(),z0=()=>{$r.setItemGridData([]),$r.setIsEdit("edit"),$r.setSubmitCurStructure(El.value!=="/平台管理/菜单管理")},M0=()=>{$r.setIsEdit("view"),$r.setRefreshCurStructure(!0)},I0=async a=>{var i;let l=Gn.value,n=l==null?void 0:l.findIndex(s=>(s==null?void 0:s.value)===(a==null?void 0:a.value)),r=l==null?void 0:l.filter((s,h)=>h<=n);_n.setSelectTitle(dl.safeClone(r)),r=(i=r==null?void 0:r.map(s=>s==null?void 0:s.value))==null?void 0:i.join("/"),qr.setActiveMenuPath(null),qr.setActiveMenuPath(r)},yt=async(a,l,n,r="contentConfig")=>{var i;try{if(!Array.isArray(a))return;let s,h;l==="create"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(g=>(g==null?void 0:g.key)!=="tableContents")}}}})},h=Fr.batchAddInsofDataApi):l==="update"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{id:d==null?void 0:d.id,value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(g=>(g==null?void 0:g.key)!=="tableContents")}}}})},h=Fr.batchUpdateInsofDataApi):l==="delete"&&(s={ids:a},h=Fr.batchDeleteInsofDataApi);const c=await h(s);if(((i=c==null?void 0:c.data)==null?void 0:i.code)===200)return c.data.result;throw Ja.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Ja.ElMessage.error("保存响应失败")}},Ss=async(a,l,n,r)=>{var i,s,h,c,d,m,g,u,C,I,k;try{const G=(s=(i=a==null?void 0:a.results)==null?void 0:i.filter(w=>!(w!=null&&w.id)||typeof(w==null?void 0:w.id)=="string"))==null?void 0:s.map(w=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:n},value:{tableData:w}})),z=(c=(h=a==null?void 0:a.results)==null?void 0:h.filter(w=>(w==null?void 0:w.id)&&typeof(w==null?void 0:w.id)=="number"))==null?void 0:c.map(w=>({id:w==null?void 0:w.id,value:{tableData:w}})),j=JSON.parse(JSON.stringify(a)),L=(d=j==null?void 0:j.results)==null?void 0:d.map(w=>w.id);let _;n?_=(u=(g=(m=Ct.value)==null?void 0:m[El.value])==null?void 0:g.filter(w=>{var b,E,F;return((b=w==null?void 0:w.key)==null?void 0:b.type)===l&&((F=(E=w==null?void 0:w.key)==null?void 0:E.relatedInfo)==null?void 0:F.target)===r}))==null?void 0:u.map(w=>w==null?void 0:w.id):_=(k=(I=(C=Ct.value)==null?void 0:C[El.value])==null?void 0:I.filter(w=>{var b;return((b=w==null?void 0:w.key)==null?void 0:b.type)===l}))==null?void 0:k.map(w=>w==null?void 0:w.id);const x=_==null?void 0:_.filter(w=>!(L!=null&&L.includes(w))&&typeof w=="number");(G==null?void 0:G.length)>0&&await Fr.batchAddInsofDataApi({dataList:G}),(z==null?void 0:z.length)>0&&await Fr.batchUpdateInsofDataApi({dataList:z}),(x==null?void 0:x.length)>0&&await Fr.batchDeleteInsofDataApi({ids:x})}catch(G){throw new Error(G)}},O0=async a=>{var m,g,u,C,I,k,G,z,j,L;qr.setContentLoading(!0);const l=JSON.parse(JSON.stringify(E0.value));if(!C0.value)return qr.setCacheStructures({key:A0.value,data:l}),Ja.ElMessage.success("已暂存");const n=l==null?void 0:l.map(_=>_.id),r=n.filter(_=>{var x;return!((x=ws.value)!=null&&x.includes(_))}),i=(m=ws.value)==null?void 0:m.filter(_=>!n.includes(_)),s=[...r,...i].filter(_=>typeof _!==null&&typeof _<"u"),h=l==null?void 0:l.filter(_=>!_.id),c=l==null?void 0:l.filter(_=>_.id);let d=[];if(s&&(s==null?void 0:s.length)>0&&d.push(yt(s,"delete",a)),h&&(h==null?void 0:h.length)>0&&d.push(yt(h,"create",a)),c&&(c==null?void 0:c.length)>0&&d.push(yt(c,"update",a)),ci.value&&((g=ci.value)!=null&&g.isDelete&&((C=(u=ci.value)==null?void 0:u.results)==null?void 0:C.length)>0&&((k=(I=ci.value)==null?void 0:I.results)!=null&&k.every(_=>typeof _=="number"))?await Fr.batchDeleteInsofDataApi({ids:(G=ci.value)==null?void 0:G.results}):(console.log("itemGridData.value",ci.value),d.push(await Ss(ci.value,"gridLayout")))),_o.value)for(const _ in _o.value)d.push(await Ss((z=_o.value)==null?void 0:z[_],"extend",{target:_,compId:(L=(j=_o.value)==null?void 0:j[_])==null?void 0:L.compId},_));await Promise.all(d).then(()=>{Ja.ElMessage.success("保存成功"),$r.setRefreshCurStructure(!0)}).catch(_=>{Ja.ElMessage.success(_)}),qr.setContentLoading(!1)},Qi=a=>Mi(a),L0=e.computed(()=>{var a;return(a=fr.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Ec=e.computed(()=>{var a;return(a=fr.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),Cc=e.ref(0),Dc=e.ref(null),R0="ocr_committed_temp_ids_v1",$0=(a,l)=>`${R0}:${String(a??"")}:${String(l??"")}`,V0=(a,l,n)=>{try{const r=$0(a,l),i=sessionStorage.getItem(r),s=i?JSON.parse(i):[],h=Array.isArray(s)?s:[],c=Array.from(new Set([...h,...n||[]].map(d=>String(d)))).slice(-200);sessionStorage.setItem(r,JSON.stringify(c))}catch{}},Oo=async(a,l="data",n)=>{var i,s,h,c,d,m,g,u,C,I,k,G,z,j,L,_,x,w,b,E,F,$,le,Q,me,de,A,ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa,V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W,J,je,We,Sa,sa,Va,Re,Oe,Le,Be,ze,ul,Cl,Ml,Rl,Al,er,Qa,Ul,Ua,ql,Il,lr,_l,xr;let r=((h=(s=(i=Gn.value)==null?void 0:i.filter(Ra=>(Ra==null?void 0:Ra.condition)==="child"))==null?void 0:s[0])==null?void 0:h.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let Ra=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(nl=>{let va={};for(let za in nl)Array.isArray(nl==null?void 0:nl[za])?va[za]=JSON.stringify(nl==null?void 0:nl[za]):va[za]=nl==null?void 0:nl[za];return va});if(Ra!=null&&Ra.every(nl=>nl==null?void 0:nl.menuPathContent)){let nl=(d=Ra==null?void 0:Ra[0])==null?void 0:d.menuPathContent;Ra=Ra==null?void 0:Ra.map(na=>(na.id="0",na==null||delete na.menuPathContent,na)),(nl==null?void 0:nl[0])==="$"&&(nl=nl==null?void 0:nl.slice(1,nl==null?void 0:nl.length));let va=(m=te.analyzeSplitToContent(nl,"*"))==null?void 0:m[0],za=(g=te.analyzeSplitToContent(nl,"*"))==null?void 0:g[1];va=va==null?void 0:va.slice(0,(va==null?void 0:va.length)-1),va=(u=te.analyzeSplitToContent(va,":"))==null?void 0:u.map(na=>{var ja,Ee,Ma,Ya,vl;if((na==null?void 0:na[(na==null?void 0:na.length)-1])===":"&&(na=na==null?void 0:na.slice(0,(na==null?void 0:na.length)-1)),(na==null?void 0:na[0])==="{"){na=na==null?void 0:na.slice(1,(na==null?void 0:na.length)-1),(na==null?void 0:na[0])==="*"&&(na=na==null?void 0:na.slice(1,na==null?void 0:na.length));let wl=na==null?void 0:na.split(":"),Ie=wl==null?void 0:wl[0],ba=wl==null?void 0:wl[1];ba=ba==null?void 0:ba.slice(1,(ba==null?void 0:ba.length)-1);let oa=(ja=fr.value)==null?void 0:ja.filter(wa=>(wa==null?void 0:wa.name)===Ie);oa=oa==null?void 0:oa[0],oa=(vl=(Ya=(Ma=(Ee=oa==null?void 0:oa.compData)==null?void 0:Ee.find(wa=>(wa==null?void 0:wa.key)==="tableContents"))==null?void 0:Ma.contents)==null?void 0:Ya[0])==null?void 0:vl[ba],na=oa}return na}),va=va==null?void 0:va.join("/");let da=await M.getPageDataApi({platId:parseInt((C=fl==null?void 0:fl.value)==null?void 0:C.plat_id),pageName:"menu"});da=(I=da==null?void 0:da.data)==null?void 0:I.result,da=da==null?void 0:da.find(na=>(na==null?void 0:na.object_name)===va&&(na==null?void 0:na.property_name)===za);let Ha=(da==null?void 0:da.object_id)??"";if(Ha===""){Ja.ElMessage.warning("添加页面数据不存在");return}let Dl=[{tableName:"content_"+Ha,tableContents:Ra}];await M.pageBatchAddApi({platId:parseInt((k=fl==null?void 0:fl.value)==null?void 0:k.plat_id),changeContents:Dl});let Te=[];Dl==null||Dl.forEach(na=>{var ja;(ja=na==null?void 0:na.tableContents)==null||ja.forEach(Ee=>{Te.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ee),request_result:"{}",is_delete:!1,request_table:na==null?void 0:na.tableName,request_type:"add"})})}),await M.pageBatchAddApi({platId:parseInt((G=fl==null?void 0:fl.value)==null?void 0:G.plat_id),changeContents:[{tableName:"log",tableContents:Te}]})}else{let nl=await M.quoteApi({platId:parseInt((z=fl==null?void 0:fl.value)==null?void 0:z.plat_id),type:"fatherSyncs",related:[{menus:r!==""?El.value+"/"+r:El.value,groups:a==null?void 0:a.name}]});nl=(j=nl==null?void 0:nl.data)==null?void 0:j.result,nl=nl==null?void 0:nl.filter(Te=>{var na,ja;return!((Te==null?void 0:Te.fatherPath)!==""&&((ja=(na=Te==null?void 0:Te.quote)==null?void 0:na[0])==null?void 0:ja.menus)===(El==null?void 0:El.value))});let va=nl==null?void 0:nl.map(Te=>{var Ma,Ya;let na={},ja=Ra==null?void 0:Ra[0],Ee;return Array.isArray((Ma=Te==null?void 0:Te.struct)==null?void 0:Ma[0])?Ee=te.getColumnChild((Ya=Te==null?void 0:Te.struct)==null?void 0:Ya[0]):Ee=Te==null?void 0:Te.struct,Ee=Ee==null?void 0:Ee.filter(vl=>(vl==null?void 0:vl.prop)!=="relatedId"),Ee==null||Ee.forEach(vl=>{var wl,Ie;na[vl.prop]=((wl=vl==null?void 0:vl.words)!=null&&wl[0]?(ja==null?void 0:ja[(Ie=vl==null?void 0:vl.words)==null?void 0:Ie[0]])??(ja==null?void 0:ja[vl==null?void 0:vl.prop]):ja==null?void 0:ja[vl==null?void 0:vl.prop])??""}),na.id="1",na.relatedId=`[${na.id}]`,delete na.sort,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[na]}}),za=[{tableName:(L=a==null?void 0:a.relatedContents)==null?void 0:L.find(Te=>Te==null?void 0:Te.includes("content")),tableContents:Ra}];za=[...za,...va];let da=await M.quoteApi({platId:parseInt((_=fl==null?void 0:fl.value)==null?void 0:_.plat_id),type:"sonSyncs",related:[{menus:r!==""?El.value+"/"+r:El.value,groups:a==null?void 0:a.name}]});da=(w=(x=da==null?void 0:da.data)==null?void 0:x.result)==null?void 0:w.filter(Te=>!(za!=null&&za.find(na=>(na==null?void 0:na.tableName)==="content_"+(Te==null?void 0:Te.id)))),da=da==null?void 0:da.filter(Te=>{var na,ja;return!((Te==null?void 0:Te.fatherPath)!==""&&((ja=(na=Te==null?void 0:Te.quote)==null?void 0:na[0])==null?void 0:ja.menus)===(El==null?void 0:El.value))});let Ha=da==null?void 0:da.map(Te=>{var Ma,Ya,vl,wl,Ie,ba,oa;let na={},ja=Ra==null?void 0:Ra[0],Ee;return Array.isArray((Ma=Te==null?void 0:Te.struct)==null?void 0:Ma[0])?Ee=te.getColumnChild((Ya=Te==null?void 0:Te.struct)==null?void 0:Ya[0]):Ee=Te==null?void 0:Te.struct,Ee=Ee==null?void 0:Ee.filter(wa=>(wa==null?void 0:wa.prop)!=="relatedId"),((wl=(vl=Ee==null?void 0:Ee[0])==null?void 0:vl.words)!=null&&wl[0]?ja!=null&&ja[(ba=(Ie=Ee==null?void 0:Ee[0])==null?void 0:Ie.words)==null?void 0:ba[0]]:ja!=null&&ja[(oa=Ee==null?void 0:Ee[0])==null?void 0:oa.prop])?(Ee==null||Ee.forEach(wa=>{var ga,ol;na[wa.prop]=((ga=wa==null?void 0:wa.words)!=null&&ga[0]?(ja==null?void 0:ja[(ol=wa==null?void 0:wa.words)==null?void 0:ol[0]])??(ja==null?void 0:ja[wa==null?void 0:wa.prop]):ja==null?void 0:ja[wa==null?void 0:wa.prop])??""}),na.id="1",na.relatedId=`[${na.id}]`,delete na.sort):na=void 0,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[na]}});Ha=Ha==null?void 0:Ha.filter(Te=>{var na;return!((na=Te==null?void 0:Te.tableContents)!=null&&na.every(ja=>ja===void 0))}),za=[...za,...Ha],await M.pageBatchAddApi({platId:parseInt((b=fl==null?void 0:fl.value)==null?void 0:b.plat_id),changeContents:za});let Dl=[];za==null||za.forEach(Te=>{var na;(na=Te==null?void 0:Te.tableContents)==null||na.forEach(ja=>{Dl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ja),request_result:"{}",is_delete:!1,request_table:Te==null?void 0:Te.tableName,request_type:"add"})})}),await M.pageBatchAddApi({platId:parseInt((E=fl==null?void 0:fl.value)==null?void 0:E.plat_id),changeContents:[{tableName:"log",tableContents:Dl}]})}}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const Ra=((a==null?void 0:a.ocrRows)||[]).map(da=>da==null?void 0:da.id).filter(da=>da!=null),nl=((a==null?void 0:a.ocrRows)||[]).map(da=>{const Ha={...da};return delete Ha._isOCRRow,delete Ha._ocrTableId,Object.keys(Ha).forEach(Dl=>{/(^|\.)证书附件$/.test(Dl)&&Array.isArray(Ha[Dl])&&(Ha[Dl]=JSON.stringify(Ha[Dl].map(Te=>({url:(Te==null?void 0:Te.url)||"",name:(Te==null?void 0:Te.name)||(Te==null?void 0:Te.fileName)||"",fileName:(Te==null?void 0:Te.fileName)||(Te==null?void 0:Te.name)||""})).filter(Te=>Te.url||Te.name)))}),Ha});let va=[{tableName:(F=a==null?void 0:a.relatedContents)==null?void 0:F.find(da=>da==null?void 0:da.includes("content")),tableContents:nl}];await M.pageBatchAddApi({platId:parseInt(($=fl==null?void 0:fl.value)==null?void 0:$.plat_id),changeContents:va});let za=[];va==null||va.forEach(da=>{var Ha;(Ha=da==null?void 0:da.tableContents)==null||Ha.forEach(Dl=>{za.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Dl),request_result:"{}",is_delete:!1,request_table:da==null?void 0:da.tableName,request_type:"ocrBatchAdd"})})}),await M.pageBatchAddApi({platId:parseInt((le=fl==null?void 0:fl.value)==null?void 0:le.plat_id),changeContents:[{tableName:"log",tableContents:za}]}),V0(a==null?void 0:a.parentTableId,a==null?void 0:a.index,Ra)}if((a==null?void 0:a.buttonName)==="编辑"){const nl=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(Ee=>{const Ma={...Ee};return delete Ma._isOCRRow,delete Ma._ocrTableId,delete Ma._isTemp,delete Ma.tableEditType,delete Ma.index,Ma});let va=nl==null?void 0:nl.map(Ee=>{let Ma={};for(let Ya in Ee)Array.isArray(Ee==null?void 0:Ee[Ya])?Ma[Ya]=JSON.stringify(Ee==null?void 0:Ee[Ya]):Ma[Ya]=Ee==null?void 0:Ee[Ya];return Ma}),za=await M.quoteApi({platId:parseInt((Q=fl==null?void 0:fl.value)==null?void 0:Q.plat_id),type:"fatherSyncs",related:[{menus:r!==""?El.value+"/"+r:El.value,groups:a==null?void 0:a.name}]});za=(me=za==null?void 0:za.data)==null?void 0:me.result,za=za==null?void 0:za.filter(Ee=>{var Ma,Ya;return!((Ee==null?void 0:Ee.fatherPath)!==""&&((Ya=(Ma=Ee==null?void 0:Ee.quote)==null?void 0:Ma[0])==null?void 0:Ya.menus)===(El==null?void 0:El.value))});let da=(de=va==null?void 0:va[0])==null?void 0:de.id,Ha=[{tableName:(A=a==null?void 0:a.relatedContents)==null?void 0:A.find(Ee=>Ee==null?void 0:Ee.includes("content")),tableContents:va}],Dl=(ee=za==null?void 0:za.map(Ee=>{var Ya,vl,wl,Ie,ba;let Ma=(Ya=Ee==null?void 0:Ee.contents)==null?void 0:Ya.filter(oa=>{var wa,ga;return JSON.stringify(oa==null?void 0:oa.relatedId)!=="{}"&&(oa==null?void 0:oa.relatedId)!==""&&(oa!=null&&oa.relatedId)?(wa=oa==null?void 0:oa.relatedId)==null?void 0:wa.includes(parseInt(da)):(oa==null?void 0:oa.sort)===((ga=va==null?void 0:va[0])==null?void 0:ga.sort)});if((Ma==null?void 0:Ma.length)>0){let oa=va==null?void 0:va[0];oa={...oa,id:(vl=Ma==null?void 0:Ma[0])==null?void 0:vl.id};let wa={},ga=oa,ol;return Array.isArray((wl=Ee==null?void 0:Ee.struct)==null?void 0:wl[0])?ol=te.getColumnChild((Ie=Ee==null?void 0:Ee.struct)==null?void 0:Ie[0]):ol=Ee==null?void 0:Ee.struct,ol=ol==null?void 0:ol.filter(Fe=>(Fe==null?void 0:Fe.prop)!=="relatedId"),ol==null||ol.forEach(Fe=>{var gl,Ne;wa[Fe.prop]=((gl=Fe==null?void 0:Fe.words)!=null&&gl[0]?(ga==null?void 0:ga[(Ne=Fe==null?void 0:Fe.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Fe==null?void 0:Fe.prop]):ga==null?void 0:ga[Fe==null?void 0:Fe.prop])??""}),wa.id=(ba=Ma==null?void 0:Ma[0])==null?void 0:ba.id,delete wa.sort,delete wa.relatedId,{tableName:"content_"+(Ee==null?void 0:Ee.id),tableContents:[wa]}}else return}))==null?void 0:ee.filter(Ee=>Ee);Ha=[...Ha,...Dl];let Te=await M.quoteApi({platId:parseInt((X=fl==null?void 0:fl.value)==null?void 0:X.plat_id),type:"sonSyncs",related:[{menus:r!==""?El.value+"/"+r:El.value,groups:a==null?void 0:a.name}]});Te=(fe=(re=Te==null?void 0:Te.data)==null?void 0:re.result)==null?void 0:fe.filter(Ee=>!(Ha!=null&&Ha.find(Ma=>(Ma==null?void 0:Ma.tableName)==="content_"+(Ee==null?void 0:Ee.id)))),Te=Te==null?void 0:Te.filter(Ee=>{var Ma,Ya;return!((Ee==null?void 0:Ee.fatherPath)!==""&&((Ya=(Ma=Ee==null?void 0:Ee.quote)==null?void 0:Ma[0])==null?void 0:Ya.menus)===(El==null?void 0:El.value))});let na=($e=Te==null?void 0:Te.map(Ee=>{var Ya,vl,wl,Ie,ba;let Ma=(Ya=Ee==null?void 0:Ee.contents)==null?void 0:Ya.filter(oa=>{var wa,ga,ol;return JSON.stringify(oa==null?void 0:oa.relatedId)!=="{}"&&(oa==null?void 0:oa.relatedId)!==""&&(oa!=null&&oa.relatedId)?(wa=oa==null?void 0:oa.relatedId)==null?void 0:wa.includes(parseInt(da)):(oa==null?void 0:oa.sort)===((ga=va==null?void 0:va[0])==null?void 0:ga.sort)||(oa==null?void 0:oa.sort)===(parseInt(((ol=va==null?void 0:va[0])==null?void 0:ol.sort)??"0")+1).toString()});if((Ma==null?void 0:Ma.length)>0){let oa=va==null?void 0:va[0];oa={...oa,id:(vl=Ma==null?void 0:Ma[0])==null?void 0:vl.id};let wa={},ga=oa,ol;return Array.isArray((wl=Ee==null?void 0:Ee.struct)==null?void 0:wl[0])?ol=te.getColumnChild((Ie=Ee==null?void 0:Ee.struct)==null?void 0:Ie[0]):ol=Ee==null?void 0:Ee.struct,ol=ol==null?void 0:ol.filter(Fe=>(Fe==null?void 0:Fe.prop)!=="relatedId"),ol==null||ol.forEach(Fe=>{var gl,Ne,Kl,Ca;((gl=Fe==null?void 0:Fe.words)!=null&&gl[0]?(ga==null?void 0:ga[(Ne=Fe==null?void 0:Fe.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Fe==null?void 0:Fe.prop]):ga!=null&&ga[Fe==null?void 0:Fe.prop])&&(wa[Fe.prop]=((Kl=Fe==null?void 0:Fe.words)!=null&&Kl[0]?(ga==null?void 0:ga[(Ca=Fe==null?void 0:Fe.words)==null?void 0:Ca[0]])??(ga==null?void 0:ga[Fe==null?void 0:Fe.prop]):ga==null?void 0:ga[Fe==null?void 0:Fe.prop])??"")}),wa.id=(ba=Ma==null?void 0:Ma[0])==null?void 0:ba.id,delete wa.sort,delete wa.relatedId,{tableName:"content_"+(Ee==null?void 0:Ee.id),tableContents:[wa]}}else return}))==null?void 0:$e.filter(Ee=>Ee);Ha=[...Ha,...na],await M.pageBatchUpdateApi({platId:parseInt((ue=fl==null?void 0:fl.value)==null?void 0:ue.plat_id),changeContents:Ha});let ja=[];Ha==null||Ha.forEach(Ee=>{var Ma;(Ma=Ee==null?void 0:Ee.tableContents)==null||Ma.forEach(Ya=>{ja.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Ya),request_result:"{}",is_delete:!1,request_table:Ee==null?void 0:Ee.tableName,request_type:"update"})})}),await M.pageBatchAddApi({platId:parseInt((B=fl==null?void 0:fl.value)==null?void 0:B.plat_id),changeContents:[{tableName:"log",tableContents:ja}]})}if((a==null?void 0:a.buttonName)==="删除"){let Ra=[{tableName:(se=a==null?void 0:a.relatedContents)==null?void 0:se.find(Te=>Te==null?void 0:Te.includes("content")),tableContents:a==null?void 0:a.fixContent}],nl=await M.quoteApi({platId:parseInt((U=fl==null?void 0:fl.value)==null?void 0:U.plat_id),type:"fatherSyncs",related:[{menus:r!==""?El.value+"/"+r:El.value,groups:a==null?void 0:a.name}]});nl=(be=nl==null?void 0:nl.data)==null?void 0:be.result,nl=nl==null?void 0:nl.filter(Te=>{var na,ja;return!((Te==null?void 0:Te.fatherPath)!==""&&((ja=(na=Te==null?void 0:Te.quote)==null?void 0:na[0])==null?void 0:ja.menus)===(El==null?void 0:El.value))});let va=(Ve=(Me=a==null?void 0:a.fixContent)==null?void 0:Me[0])==null?void 0:Ve.id,za=(aa=nl==null?void 0:nl.map(Te=>{var ja,Ee,Ma,Ya,vl,wl;let na=(ja=Te==null?void 0:Te.contents)==null?void 0:ja.filter(Ie=>{var ba,oa,wa;return JSON.stringify(Ie==null?void 0:Ie.relatedId)!=="{}"&&(Ie==null?void 0:Ie.relatedId)!==""&&(Ie!=null&&Ie.relatedId)?(ba=Ie==null?void 0:Ie.relatedId)==null?void 0:ba.includes(parseInt(va)):(Ie==null?void 0:Ie.sort)===((wa=(oa=a==null?void 0:a.fixContent)==null?void 0:oa[0])==null?void 0:wa.sort)});if((na==null?void 0:na.length)>0){let Ie=(Ee=a==null?void 0:a.fixContent)==null?void 0:Ee[0];Ie={...Ie,id:(Ma=na==null?void 0:na[0])==null?void 0:Ma.id};let ba={},oa=Ie,wa;return Array.isArray((Ya=Te==null?void 0:Te.struct)==null?void 0:Ya[0])?wa=te.getColumnChild((vl=Te==null?void 0:Te.struct)==null?void 0:vl[0]):wa=Te==null?void 0:Te.struct,wa=wa==null?void 0:wa.filter(ga=>(ga==null?void 0:ga.prop)!=="relatedId"),wa==null||wa.forEach(ga=>{var ol,Fe;ba[ga.prop]=((ol=ga==null?void 0:ga.words)!=null&&ol[0]?(oa==null?void 0:oa[(Fe=ga==null?void 0:ga.words)==null?void 0:Fe[0]])??(oa==null?void 0:oa[ga==null?void 0:ga.prop]):oa==null?void 0:oa[ga==null?void 0:ga.prop])??""}),ba.id=(wl=na==null?void 0:na[0])==null?void 0:wl.id,delete ba.sort,delete ba.relatedId,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[ba]}}else return}))==null?void 0:aa.filter(Te=>Te);Ra=[...Ra,...za];let da=await M.quoteApi({platId:parseInt((Ea=fl==null?void 0:fl.value)==null?void 0:Ea.plat_id),type:"sonSyncs",related:[{menus:r!==""?El.value+"/"+r:El.value,groups:a==null?void 0:a.name}]});da=(ta=(ne=da==null?void 0:da.data)==null?void 0:ne.result)==null?void 0:ta.filter(Te=>!(Ra!=null&&Ra.find(na=>(na==null?void 0:na.tableName)==="content_"+(Te==null?void 0:Te.id)))),da=da==null?void 0:da.filter(Te=>{var na,ja;return!((Te==null?void 0:Te.fatherPath)!==""&&((ja=(na=Te==null?void 0:Te.quote)==null?void 0:na[0])==null?void 0:ja.menus)===(El==null?void 0:El.value))});let Ha=(ce=da==null?void 0:da.map(Te=>{var ja,Ee,Ma,Ya,vl,wl;let na=(ja=Te==null?void 0:Te.contents)==null?void 0:ja.filter(Ie=>{var ba,oa,wa;return JSON.stringify(Ie==null?void 0:Ie.relatedId)!=="{}"&&(Ie==null?void 0:Ie.relatedId)!==""&&(Ie!=null&&Ie.relatedId)?(ba=Ie==null?void 0:Ie.relatedId)==null?void 0:ba.includes(parseInt(va)):(Ie==null?void 0:Ie.sort)===((wa=(oa=a==null?void 0:a.fixContent)==null?void 0:oa[0])==null?void 0:wa.sort)});if((na==null?void 0:na.length)>0){let Ie=(Ee=a==null?void 0:a.fixContent)==null?void 0:Ee[0];Ie={...Ie,id:(Ma=na==null?void 0:na[0])==null?void 0:Ma.id};let ba={},oa=Ie,wa;return Array.isArray((Ya=Te==null?void 0:Te.struct)==null?void 0:Ya[0])?wa=te.getColumnChild((vl=Te==null?void 0:Te.struct)==null?void 0:vl[0]):wa=Te==null?void 0:Te.struct,wa=wa==null?void 0:wa.filter(ga=>(ga==null?void 0:ga.prop)!=="relatedId"),wa==null||wa.forEach(ga=>{var ol,Fe;ba[ga.prop]=((ol=ga==null?void 0:ga.words)!=null&&ol[0]?(oa==null?void 0:oa[(Fe=ga==null?void 0:ga.words)==null?void 0:Fe[0]])??(oa==null?void 0:oa[ga==null?void 0:ga.prop]):oa==null?void 0:oa[ga==null?void 0:ga.prop])??""}),ba.id=(wl=na==null?void 0:na[0])==null?void 0:wl.id,delete ba.sort,delete ba.relatedId,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[ba]}}else return}))==null?void 0:ce.filter(Te=>Te);Ra=[...Ra,...Ha],await M.pageBatchDeleteApi({platId:parseInt((ca=fl==null?void 0:fl.value)==null?void 0:ca.plat_id),changeContents:Ra});let Dl=[];Ra==null||Ra.forEach(Te=>{var na;(na=Te==null?void 0:Te.tableContents)==null||na.forEach(ja=>{Dl.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(ja),request_result:"{}",is_delete:!1,request_table:Te==null?void 0:Te.tableName,request_type:"delete"})})}),await M.pageBatchAddApi({platId:parseInt((we=fl==null?void 0:fl.value)==null?void 0:we.plat_id),changeContents:[{tableName:"log",tableContents:Dl}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let Ra=await M.getPageDataApi({platId:parseInt((ge=fl==null?void 0:fl.value)==null?void 0:ge.plat_id),pageName:"menu"});if(Ra=(he=Ra==null?void 0:Ra.data)==null?void 0:he.result,Ra!=null&&Ra.find(nl=>(nl==null?void 0:nl.father_name)===El.value+"/")){Sc.value=a,_c.value=Ra==null?void 0:Ra.filter(za=>(za==null?void 0:za.father_name)===El.value+"/");let nl=(fa=(Ke=a==null?void 0:a.columns)==null?void 0:Ke.find(za=>za==null?void 0:za.mainKey))==null?void 0:fa.prop,va=(V=(qa=a==null?void 0:a.fixContent)==null?void 0:qa[0])==null?void 0:V[nl];It.value=!0,Zi.value=[{prop:nl,label:nl,name:nl,value:va}]}else{let nl=(H=a==null?void 0:a.fixContent)==null?void 0:H.map(da=>{let Ha={};for(let Dl in da)Array.isArray(da==null?void 0:da[Dl])?Ha[Dl]=JSON.stringify(da==null?void 0:da[Dl]):Ha[Dl]=da==null?void 0:da[Dl];return Ha.relatedId="",Ha}),va=[{tableName:(Z=a==null?void 0:a.relatedContents)==null?void 0:Z.find(da=>da==null?void 0:da.includes("content")),tableContents:nl}];await M.pageBatchAddApi({platId:parseInt((ve=fl==null?void 0:fl.value)==null?void 0:ve.plat_id),changeContents:va});let za=[];va==null||va.forEach(da=>{var Ha;(Ha=da==null?void 0:da.tableContents)==null||Ha.forEach(Dl=>{za.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Dl),request_result:"{}",is_delete:!1,request_table:da==null?void 0:da.tableName,request_type:"copyAdd"})})}),await M.pageBatchAddApi({platId:parseInt((pe=fl==null?void 0:fl.value)==null?void 0:pe.plat_id),changeContents:[{tableName:"log",tableContents:za}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let Ra=((He=(ia=(pa=a==null?void 0:a.columns)==null?void 0:pa.map(Ee=>Ee==null?void 0:Ee.filter))==null?void 0:ia.filter(Ee=>Ee!==""))==null?void 0:He[0])??"";Ra=te.analyzeSplitToContent(Ra,","),Ra=(Ra==null?void 0:Ra.find(Ee=>Ee==null?void 0:Ee.includes("@Filter")))??"";let nl=(_a=a==null?void 0:a.fixContent)==null?void 0:_a.map(Ee=>{let Ma={};for(let Ya in Ee)Array.isArray(Ee==null?void 0:Ee[Ya])?Ma[Ya]=JSON.stringify(Ee==null?void 0:Ee[Ya]):Ma[Ya]=Ee==null?void 0:Ee[Ya];return Ma}),va=await M.quoteApi({platId:parseInt((Ae=fl==null?void 0:fl.value)==null?void 0:Ae.plat_id),type:"fatherSyncs",related:[{menus:r!==""?El.value+"/"+r:El.value,groups:a==null?void 0:a.name}]});va=(ha=va==null?void 0:va.data)==null?void 0:ha.result,va=va==null?void 0:va.filter(Ee=>{var Ma,Ya;return!((Ee==null?void 0:Ee.fatherPath)!==""&&((Ya=(Ma=Ee==null?void 0:Ee.quote)==null?void 0:Ma[0])==null?void 0:Ya.menus)===(El==null?void 0:El.value))});let za=(Aa=(La=a==null?void 0:a.columns)==null?void 0:La[0])==null?void 0:Aa.prop,da=(ua=nl==null?void 0:nl[0])==null?void 0:ua[za],Ha=[{tableName:(Ta=a==null?void 0:a.relatedContents)==null?void 0:Ta.find(Ee=>Ee==null?void 0:Ee.includes("content")),tableContents:nl}],Dl=(Ce=va==null?void 0:va.map(Ee=>{var Ya,vl,wl,Ie,ba;let Ma=(Ya=Ee==null?void 0:Ee.contents)==null?void 0:Ya.filter(oa=>{var wa;return(wa=Object.values(oa))==null?void 0:wa.find(ga=>ga===da)});if((Ma==null?void 0:Ma.length)>0){let oa=nl==null?void 0:nl[0];oa={...oa,id:(vl=Ma==null?void 0:Ma[0])==null?void 0:vl.id};let wa={},ga=oa,ol;return Array.isArray((wl=Ee==null?void 0:Ee.struct)==null?void 0:wl[0])?ol=te.getColumnChild((Ie=Ee==null?void 0:Ee.struct)==null?void 0:Ie[0]):ol=Ee==null?void 0:Ee.struct,ol=ol==null?void 0:ol.filter(Fe=>(Fe==null?void 0:Fe.prop)!=="relatedId"),ol==null||ol.forEach(Fe=>{var gl,Ne;wa[Fe.prop]=((gl=Fe==null?void 0:Fe.words)!=null&&gl[0]?(ga==null?void 0:ga[(Ne=Fe==null?void 0:Fe.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Fe==null?void 0:Fe.prop]):ga==null?void 0:ga[Fe==null?void 0:Fe.prop])??""}),wa.id=(ba=Ma==null?void 0:Ma[0])==null?void 0:ba.id,delete wa.sort,{tableName:"content_"+(Ee==null?void 0:Ee.id),tableContents:[wa]}}else return}))==null?void 0:Ce.filter(Ee=>Ee);Ha=[...Ha,...Dl];let Te=await M.quoteApi({platId:parseInt((ma=fl==null?void 0:fl.value)==null?void 0:ma.plat_id),type:"sonSyncs",related:[{menus:r!==""?El.value+"/"+r:El.value,groups:a==null?void 0:a.name}]});if(Te=(W=(Je=Te==null?void 0:Te.data)==null?void 0:Je.result)==null?void 0:W.filter(Ee=>!(Ha!=null&&Ha.find(Ma=>(Ma==null?void 0:Ma.tableName)==="content_"+(Ee==null?void 0:Ee.id)))),Te=Te==null?void 0:Te.filter(Ee=>{var Ma,Ya;return!((Ee==null?void 0:Ee.fatherPath)!==""&&((Ya=(Ma=Ee==null?void 0:Ee.quote)==null?void 0:Ma[0])==null?void 0:Ya.menus)===(El==null?void 0:El.value))}),Ra&&Ra!==""){(Ra==null?void 0:Ra[(Ra==null?void 0:Ra.length)-1])===","&&(Ra=Ra==null?void 0:Ra.slice(0,(Ra==null?void 0:Ra.length)-1)),Ra=(je=(J=Ra==null?void 0:Ra.replace("(",wo))==null?void 0:J.split(wo))==null?void 0:je[1],Ra=Ra==null?void 0:Ra.slice(0,(Ra==null?void 0:Ra.length)-1),(Ra==null?void 0:Ra[0])==="*"&&(Ra="{"+((Sa=(We=Ra==null?void 0:Ra.replace("{",wo))==null?void 0:We.split(wo))==null?void 0:Sa[1])),Ra=(sa=Ra==null?void 0:Ra.replaceAll("{",""))==null?void 0:sa.replaceAll("}","");let Ee=te.calculatorAndToOr(Ra);Ee=Ee==null?void 0:Ee[0];let Ma;if((Va=Object.values(Ee))!=null&&Va.some(Ya=>(Ya==null?void 0:Ya[0])==="*")){let Ya=(Oe=(Re=Gn.value)==null?void 0:Re.find(vl=>(vl==null?void 0:vl.condition)==="child"))!=null&&Oe.value?(mn==null?void 0:mn.value)+"/"+((Be=(Le=Gn.value)==null?void 0:Le.find(vl=>(vl==null?void 0:vl.condition)==="child"))==null?void 0:Be.value):mn==null?void 0:mn.value;Ma=await Gr(Ya,!1)}for(let Ya in Ee)if(((ze=Ee==null?void 0:Ee[Ya])==null?void 0:ze[0])==="*"){let vl=(Rl=(Ml=(Cl=Ee[Ya])==null?void 0:Cl.slice(1,(ul=Ee[Ya])==null?void 0:ul.length))==null?void 0:Ml.split(":"))==null?void 0:Rl[0],wl=(er=(Al=Ee[Ya])==null?void 0:Al.split(":"))==null?void 0:er[1],Ie=(Qa=Ma==null?void 0:Ma.filter(ba=>(ba==null?void 0:ba.name)===vl))==null?void 0:Qa[0];Ie=(Ua=(Ul=Ie==null?void 0:Ie.compData)==null?void 0:Ul.find(ba=>(ba==null?void 0:ba.key)==="tableContents"))==null?void 0:Ua.contents,Ie=(ql=Ie==null?void 0:Ie[0])==null?void 0:ql[wl],Ee[Ya]=Ie}Ra=((Il=Object.values(Ee))==null?void 0:Il[0])??""}let na=(lr=Te==null?void 0:Te.map(Ee=>{var Ya,vl,wl,Ie,ba;let Ma=(Ya=Ee==null?void 0:Ee.contents)==null?void 0:Ya.filter(oa=>{var wa;return(wa=Object.values(oa))==null?void 0:wa.find(ga=>ga===(Ra===""?da:Ra))});if((Ma==null?void 0:Ma.length)>0){let oa=nl==null?void 0:nl[0];oa={...oa,id:(vl=Ma==null?void 0:Ma[0])==null?void 0:vl.id};let wa={},ga=oa,ol;return Array.isArray((wl=Ee==null?void 0:Ee.struct)==null?void 0:wl[0])?ol=te.getColumnChild((Ie=Ee==null?void 0:Ee.struct)==null?void 0:Ie[0]):ol=Ee==null?void 0:Ee.struct,ol=ol==null?void 0:ol.filter(Fe=>(Fe==null?void 0:Fe.prop)!=="relatedId"),ol==null||ol.forEach(Fe=>{var Ne,Kl,Ca,sl;let gl=(Ne=a==null?void 0:a.columns)==null?void 0:Ne.find(Za=>{var bl,Ia,$l;return((Ia=(bl=Za==null?void 0:Za.words)==null?void 0:bl[0])==null?void 0:Ia.replaceAll("'",""))===(Fe==null?void 0:Fe.prop)&&(($l=Za==null?void 0:Za.functionRelatedWords)==null?void 0:$l.length)>0});gl=(Kl=gl==null?void 0:gl.prop)==null?void 0:Kl.replaceAll("'",""),wa[Fe.prop]=((Ca=Fe==null?void 0:Fe.words)!=null&&Ca[0]?(ga==null?void 0:ga[(sl=Fe==null?void 0:Fe.words)==null?void 0:sl[0]])??(ga==null?void 0:ga[Fe==null?void 0:Fe.prop])??(ga==null?void 0:ga[gl]):(ga==null?void 0:ga[Fe==null?void 0:Fe.prop])??(ga==null?void 0:ga[gl]))??void 0}),wa.id=(ba=Ma==null?void 0:Ma[0])==null?void 0:ba.id,delete wa.sort,{tableName:"content_"+(Ee==null?void 0:Ee.id),tableContents:[wa]}}else return}))==null?void 0:lr.filter(Ee=>Ee);Ha=[...Ha,...na],await M.pageBatchUpdateApi({platId:parseInt((_l=fl==null?void 0:fl.value)==null?void 0:_l.plat_id),changeContents:Ha});let ja=[];Ha==null||Ha.forEach(Ee=>{var Ma;(Ma=Ee==null?void 0:Ee.tableContents)==null||Ma.forEach(Ya=>{ja.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ya),request_result:"{}",is_delete:!1,request_table:Ee==null?void 0:Ee.tableName,request_type:"method"})})}),await M.pageBatchAddApi({platId:parseInt((xr=fl==null?void 0:fl.value)==null?void 0:xr.plat_id),changeContents:[{tableName:"log",tableContents:ja}]})}$r.setRefreshCurStructure(!0),$r.setRefreshCurrentPageInform(T0.value++),await Bt(a)},Tt=async(a,l,n)=>{var i;let r=a==null?void 0:a.find(s=>(s==null?void 0:s.id)===l);if(r){let s=(i=r.compData)==null?void 0:i.map(h=>{var c;if((h==null?void 0:h.key)==="tableContents"){let d={...h,contents:n};return d.contents=(c=(d==null?void 0:d.contents)??[])==null?void 0:c.map(m=>{let g={};for(let u in m)JSON.stringify(m==null?void 0:m[u])==="{}"?g[u]="":g[u]=m==null?void 0:m[u];return g}),d}return h});return r.compData=await Po(s,{}),a=a==null?void 0:a.map(h=>((h==null?void 0:h.id)===(r==null?void 0:r.id)&&(h=r),h)),a}else{let s=a==null?void 0:a.filter(c=>{var d;return(c==null?void 0:c.children)&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0||(c==null?void 0:c.comp)==="Tabs"}),h=s==null?void 0:s.map(async c=>{var d;return c!=null&&c.children&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0?c.children=await Tt(c==null?void 0:c.children,l,n):c.compData=await Tt(c==null?void 0:c.compData,l,n),c});return s=await Promise.all(h),s}},Bt=async a=>{var s,h,c,d,m,g,u;let l=(s=a==null?void 0:a.relatedContents)==null?void 0:s.filter(C=>C==null?void 0:C.includes("content_"));if(!l)return;let n=await M.getAllTables({platId:parseInt((h=fl==null?void 0:fl.value)==null?void 0:h.plat_id),tableNames:l??[]});if(n=(d=(c=n==null?void 0:n.data)==null?void 0:c.result)==null?void 0:d[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(C=>{C==null||delete C.source_table;const I={};for(let k in C){const G=C==null?void 0:C[k],z=G&&Object.prototype.toString.call(G)==="[object Object]"&&Object.keys(G).length===0,j=Array.isArray(G)&&G.length===0;G==null||G==="{}"||z||j?I[k]="":I[k]=G}return I});let r=(g=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:g[1],i=await Tt(fr.value,r,n);fr.value=(u=fr.value)==null?void 0:u.map(C=>{var I,k;return(I=i==null?void 0:i[0])!=null&&I.tabInform&&((k=i==null?void 0:i[0])==null?void 0:k.tabInform)===(C==null?void 0:C.tabInform)?C=i==null?void 0:i[0]:(C!=null&&C.name?(C==null?void 0:C.name)===(i==null?void 0:i.name):(C==null?void 0:C.id)===(i==null?void 0:i.id))&&(C=i),C})},F0=a=>{let l=Zi.value;Zi.value=l==null?void 0:l.map(n=>(n.value=a==null?void 0:a[n==null?void 0:n.prop],n))},P0=async()=>{var C,I,k,G,z,j,L,_,x,w;let a=Sc.value,l=_c.value,n=(I=(C=a==null?void 0:a.columns)==null?void 0:C.find(b=>b==null?void 0:b.mainKey))==null?void 0:I.prop,r=(G=(k=Zi.value)==null?void 0:k[0])==null?void 0:G.value,i=(z=a==null?void 0:a.fixContent)==null?void 0:z.map(b=>{var F;let E={};for(let $ in b)Array.isArray(b==null?void 0:b[$])?E[$]=JSON.stringify(b==null?void 0:b[$]):E[$]=b==null?void 0:b[$];return(F=a==null?void 0:a.columns)==null||F.forEach($=>{($==null?void 0:$.formType)==="Upload"&&(E==null?void 0:E[$==null?void 0:$.prop])===""&&(E[$==null?void 0:$.prop]="{}")}),E[n]=r,E}),s=[{tableName:(j=a==null?void 0:a.relatedContents)==null?void 0:j.find(b=>b==null?void 0:b.includes("content")),tableContents:i}];await M.pageBatchAddApi({platId:parseInt((L=fl==null?void 0:fl.value)==null?void 0:L.plat_id),changeContents:s}),l=l==null?void 0:l.filter(b=>{var E,F,$;return($=b==null?void 0:b.object_name)==null?void 0:$.includes((F=(E=a==null?void 0:a.fixContent)==null?void 0:E[0])==null?void 0:F[n])});let h=[],c=new Map;l==null||l.forEach(b=>{h.push(`content_${b==null?void 0:b.object_id}`),h.push(`struct_${b==null?void 0:b.object_id}`),c.set(b==null?void 0:b.object_id,b)});let d=await M.getAllTables({platId:parseInt((_=fl==null?void 0:fl.value)==null?void 0:_.plat_id),tableNames:h??[]});d=(x=d==null?void 0:d.data)==null?void 0:x.result;let m=[],g=[];d=te.chunk(d,2),d==null||d.forEach(b=>{var $,le,Q,me,de,A,ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea,ne;let E=c.get((me=(Q=(le=($=b==null?void 0:b[1])==null?void 0:$[0])==null?void 0:le.source_table)==null?void 0:Q.split("_"))==null?void 0:me[1]),F=(ee=(A=(de=E==null?void 0:E.object_name)==null?void 0:de.split("/"))==null?void 0:A.filter((ta,ce)=>{var ca,we;return((we=(ca=E==null?void 0:E.object_name)==null?void 0:ca.split("/"))==null?void 0:we.length)-1!==ce}))==null?void 0:ee.join("/");if(F=F+"/"+r,g!=null&&g.find(ta=>(ta==null?void 0:ta.path)===F)||g.push({fatherPath:E==null?void 0:E.father_name,isShow:E==null?void 0:E.is_show,path:F}),((re=(X=b==null?void 0:b[1])==null?void 0:X[0])==null?void 0:re.类型)==="Table"){let ta=((ue=($e=(fe=b==null?void 0:b[1])==null?void 0:fe[0])==null?void 0:$e.结构)==null?void 0:ue.contents)??[],ce=dl.safeClone(ta);Array.isArray(ce==null?void 0:ce[0])&&(ce=te.getColumnChild(ce==null?void 0:ce[0]));let ca=[];if(((B=b==null?void 0:b[0])==null?void 0:B.length)>0&&(ca=(se=b==null?void 0:b[0])==null?void 0:se.map(we=>ce==null?void 0:ce.map(he=>(he=(we==null?void 0:we[he==null?void 0:he.prop])??"",he)))),m!=null&&m.find(we=>(we==null?void 0:we.key)===F)){let we=(U=m==null?void 0:m.find(he=>(he==null?void 0:he.key)===F))==null?void 0:U.contents;we.push({isShow:E==null?void 0:E.is_show,filter:((Ve=(Me=(be=b==null?void 0:b[1])==null?void 0:be[0])==null?void 0:Me.引用)==null?void 0:Ve.contents)??"",key:"Table",name:Object.values(E==null?void 0:E.name),tableColumns:ta,tableContents:ca});let ge=m==null?void 0:m.findIndex(he=>(he==null?void 0:he.key)===F);m[ge].contents=we}else m.push({key:F,contents:[{isShow:E==null?void 0:E.is_show,filter:((ne=(Ea=(aa=b==null?void 0:b[1])==null?void 0:aa[0])==null?void 0:Ea.引用)==null?void 0:ne.contents)??"",key:"Table",name:Object.values(E==null?void 0:E.name),tableColumns:ta,tableContents:ca}]})}});let u=[];u.push({key:"menuPath",contents:g}),u=[...u,...m],await M.createPlatFormDataApi({platId:parseInt((w=fl==null?void 0:fl.value)==null?void 0:w.plat_id),changeData:u}),It.value=!1,$r.setRefreshTable(!0)},Lo=async(a,l)=>{},Ro=async a=>{fr.value=await te.getDeepDiffItems(a),$r.setItemData(fr.value),$r.setOriginalData(fr.value)};e.ref();const j0=e.ref(null),H0=()=>{var a,l;console.log("倒计时结束时"),M.ElMessageBox.alert(`超时未提交,【${(l=(a=El.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Tc=e.ref([]),U0=e.computed(()=>{var a,l;return(l=(a=Ct.value)==null?void 0:a[El.value])==null?void 0:l.filter(n=>{var r;return((r=n==null?void 0:n.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[N0.value],()=>{_n.setSelectTitle([]),_n.setChooseTitle([])},{deep:!0});e.watch(()=>Io.value,async(a,l)=>{var r,i,s,h,c,d;let n=(r=Io.value)==null?void 0:r.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==mn.value);if((n==null?void 0:n.length)>0){qr.setContentLoading(!0);let m=((i=n==null?void 0:n[0])==null?void 0:i.relatedContent)??(El==null?void 0:El.value),g=m+"/"+((s=n==null?void 0:n[0])==null?void 0:s.value),u=!!((h=n==null?void 0:n[0])!=null&&h.parentContent),C=await Gr(g,u,{originPath:m});C=(c=C==null?void 0:C.filter(G=>G))==null?void 0:c.map(G=>(G.isShow=!0,G)),console.log(C,"loadingContents");let I=await te.getDeepDiffItems(C),k=I==null?void 0:I.filter(G=>G==null?void 0:G.choice);jo.setSelectTab((d=k==null?void 0:k[0])==null?void 0:d.choiceName),I=I==null?void 0:I.filter(G=>{var z;return!(G!=null&&G.choiceName)||(G==null?void 0:G.choiceName)===((z=k==null?void 0:k[0])==null?void 0:z.choiceName)}),fr.value=I,qr.setContentLoading(!1)}});const q0=(a,l)=>{setTimeout(async()=>{var c,d,m;let n=(c=Io.value)==null?void 0:c.filter(g=>(g==null?void 0:g.condition)==="child"&&(g==null?void 0:g.value)!==""&&(g==null?void 0:g.parentContent)!==mn.value),r=El==null?void 0:El.value,i=El==null?void 0:El.value;(n==null?void 0:n.length)>0&&(i=((d=n==null?void 0:n[0])==null?void 0:d.relatedContent)??(El==null?void 0:El.value),r=i+"/"+((m=n==null?void 0:n[0])==null?void 0:m.value));let s=await Gr(r,!1,{originPath:i});s=s==null?void 0:s.map(g=>(g.isShow=!0,g));let h=await te.getDeepDiffItems(s);fr.value=h==null?void 0:h.filter(g=>!(g!=null&&g.step)||(g==null?void 0:g.step)===(a==null?void 0:a.title))},10)},W0=a=>{setTimeout(async()=>{var h,c,d;let l=(h=Io.value)==null?void 0:h.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==mn.value),n=El==null?void 0:El.value,r=El==null?void 0:El.value;(l==null?void 0:l.length)>0&&(r=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(El==null?void 0:El.value),n=r+"/"+((d=l==null?void 0:l[0])==null?void 0:d.value));let i=await Gr(n,!1,{originPath:r});i=i==null?void 0:i.map(m=>(m.isShow=!0,m)),jo.setSelectTab(a);let s=await te.getDeepDiffItems(i);fr.value=s==null?void 0:s.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>B0.value,a=>{a!=null&&a.length||(fr.value=[])},{immediate:!0});e.watch(()=>[El.value],async a=>{var s,h,c,d;if(!El.value)return;if(El.value==="/"){fr.value=[];return}qr.setCurrentMenuPath(El.value),$r.setLockingPage(""),fr.value=[];let l=e.getCurrentInstance();(s=l==null?void 0:l.scope)==null||s.stop(),l=null,zi.value=!1,qr.setContentLoading(!0),wc.value=!0;let n=a==null?void 0:a[0],r=n,i=(h=Gn.value)==null?void 0:h.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==El.value&&!(m!=null&&m.relatedContent));if((i==null?void 0:i.length)>0&&(n=n+"/"+((c=i==null?void 0:i[0])==null?void 0:c.value)),n==="系统管理/日志管理")fr.value=await _0("log");else{let m=await Gr(n,!0,{originPath:r});m=m==null?void 0:m.map(C=>(C.isShow=!0,C));let g=await te.getDeepDiffItems(m),u=g==null?void 0:g.filter(C=>C==null?void 0:C.choice);jo.setSelectTab((d=u==null?void 0:u[0])==null?void 0:d.choiceName),fr.value=g==null?void 0:g.filter(C=>{var I;return!(C!=null&&C.choiceName)||(C==null?void 0:C.choiceName)===((I=u==null?void 0:u[0])==null?void 0:I.choiceName)})}qr.setContentLoading(!1),$r.setExtraContents([]),_n.setSelectIndex(""),_n.setSelectMenu(""),$r.setItemData(fr.value),$r.setOriginalData(fr.value),$r.setRefreshTable(!1),e.nextTick(()=>{Jn.value=Jn.value++,zi.value=!0})},{immediate:!0});e.watch(()=>[_s.value],async()=>{var a,l,n,r;if(_s.value){fr.value=[];let i=e.getCurrentInstance();(a=i==null?void 0:i.scope)==null||a.stop(),i=null,zi.value=!1,qr.setContentLoading(!0),wc.value=!0;let s=mn==null?void 0:mn.value,h=s,c=(l=Gn.value)==null?void 0:l.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==(mn==null?void 0:mn.value));(c==null?void 0:c.length)>0&&(s=s+"/"+((n=c==null?void 0:c[0])==null?void 0:n.value));let d=await Gr(s,!0,{originPath:h});d=d==null?void 0:d.map(u=>(u.isShow=!0,u));let m=await te.getDeepDiffItems(d),g=m==null?void 0:m.filter(u=>u==null?void 0:u.choice);if(jo.setSelectTab((r=g==null?void 0:g[0])==null?void 0:r.choiceName),fr.value=m==null?void 0:m.filter(u=>{var C;return!(u!=null&&u.choiceName)||(u==null?void 0:u.choiceName)===((C=g==null?void 0:g[0])==null?void 0:C.choiceName)}),qr.setContentLoading(!1),$r.setExtraContents([]),_n.setSelectIndex(""),_n.setSelectMenu(""),$r.setItemData(fr.value),$r.setOriginalData(fr.value),$r.setRefreshTable(!1),(c==null?void 0:c.length)>0){let u=[...Gn.value,...c];_n.setSelectTitle(u)}e.nextTick(()=>{Jn.value=Jn.value++,zi.value=!0})}},{immediate:!0,deep:!0});const K0=async()=>{qr.setLinkMenuInfo(null),qr.setActiveMenuPath(D0.value),fr.value=null,$r.setRouteToChildPath(""),qr.setChildMenu("")},G0=a=>new RegExp("button","i").test(a),Y0=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Bc=a=>{if(Y0(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&qr.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Nc=async(a,l,n)=>{var C,I,k,G,z,j,L,_,x,w,b,E;let r="",i="";for(let F in l)(l==null?void 0:l[F])===a&&(i=F);n==null||n.forEach(F=>{(F==null?void 0:F.prop)===i&&(r=F==null?void 0:F.fatherPath)});let s=r===""?El.value:r;r!==""&&qr.setCurrentMenuPath(s),qr.setCurrentMenuPath(s+"/"+a),qr.setContentLoading(!0),fr.value=await Gr(s+"/"+a,!0,{originPath:s+"/",row:l});let h=await Gr(s,!1),c=(C=h==null?void 0:h.filter(F=>(F==null?void 0:F.comp)==="Table"))==null?void 0:C[0],d=((z=(G=(k=(I=c==null?void 0:c.compData)==null?void 0:I.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:k.contents)==null?void 0:G[0])==null?void 0:z.prop)??((w=(x=(_=(L=(j=c==null?void 0:c.compData)==null?void 0:j.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:L.contents)==null?void 0:_[0])==null?void 0:x[0])==null?void 0:w.prop),m=(E=(b=c==null?void 0:c.compData)==null?void 0:b.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:E.contents;m=m==null?void 0:m.map(F=>({label:F==null?void 0:F[d],value:F==null?void 0:F[d]}));let g=Gn.value,u={value:a,condition:"child",options:m,relatedContent:s,isShow:!0};g=g==null?void 0:g.filter(F=>(F==null?void 0:F.condition)!=="child"),g.push(u),_n.setSelectTitle(g),_n.setChooseTitle([u]),qr.setContentLoading(!1),$r.setExtraContents([]),_n.setSelectIndex(""),_n.setSelectMenu(""),$r.setItemData(fr.value),$r.setOriginalData(fr.value)},J0=a=>{Cc.value=a},Ti=e.reactive({index:0,comp:null}),X0=e.computed(()=>{var a;return(a=fr.value)==null?void 0:a.map((l,n)=>({id:l.id,name:l.name,status:Z0(l,n)}))}),Ac=(a,l)=>{var d,m,g,u,C;const n=l?a:a-2,r=(d=fr.value)==null?void 0:d[n],i=(g=(m=r==null?void 0:r.compData)==null?void 0:m.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:g.contents,s=i==null?void 0:i.findIndex(I=>(I==null?void 0:I.isMainKey)&&(I==null?void 0:I.label)!=="操作"),h=s===-1?0:s,c=(C=(u=r==null?void 0:r.compData)==null?void 0:u.find(I=>(I==null?void 0:I.key)==="tableContents"))==null?void 0:C.contents;return{valid:c==null?void 0:c.every(I=>I==null?void 0:I[h+1]),length:(c==null?void 0:c.length)||0}},Z0=(a,l)=>{var r;let n="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:i,length:s}=Ac(l,!0);Ti.index===l?n="process":s===0?n="wait":n=i?"success":"error"}return n},zc=a=>{var n,r,i,s,h;const l=a+1;if(l>1&&((i=(r=(n=fr.value)==null?void 0:n[a])==null?void 0:r.comp)==null?void 0:i.toUpperCase())==="TABLE"){const{valid:c}=Ac(l);c?(Ti.index=l,Ti.comp=(s=fr.value)==null?void 0:s[a]):Ja.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Ti.index=l,Ti.comp=(h=fr.value)==null?void 0:h[a]},Mc=e.computed(()=>{var a,l;return(l=(a=Ec.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Mc.value,a=>{a&&zc(0)},{immediate:!0});const Q0={class:"table-content"},e3={class:"menu-config-wrap"},a3=["onClick"],l3={key:0,class:"viewport-wrap"},r3=["onClick"],n3={title:"选择显示列信息"},i3={key:0,class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},o3=["title"],t3={class:"col-operate-wrap"},s3={key:0,class:"col-operate-radio-wrapper"},c3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},u3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},d3={class:"pop-view"},p3={class:"pop-wrapper"},f3={class:"file-list-pop"},h3=["title","onClick"],v3=["onClick"],m3=["onClick"],y3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},g3={class:"form-content"},b3={key:0,class:"dialog-footer"},k3={class:"dialog-footer"},x3={class:"ocr-dialog-content"},w3={class:"ocr-steps"},_3={key:0,class:"ocr-action-buttons"},S3={key:1,class:"ocr-preview-area"},E3={class:"ocr-file-grid"},C3={class:"file-thumbnail"},D3=["src"],T3={key:1,class:"thumbnail-placeholder"},B3={class:"progress-svg",viewBox:"0 0 36 36"},N3=["stroke","stroke-width","stroke-dasharray"],A3={key:0,class:"progress-icon"},z3={key:1,class:"progress-icon"},M3=["onClick"],I3={class:"file-name"},O3={key:0,class:"ocr-recognize-button"},L3={key:2,class:"ocr-progress-section"},R3={key:3,class:"ocr-confirm-area"},$3={class:"ocr-preview-tip"},V3={class:"ocr-preview-table"},F3={style:{display:"flex","align-items":"center",gap:"8px"}},P3={key:0},j3={key:4,class:"ocr-success-area"},H3={key:0,class:"ocr-dialog-footer"},U3={class:"form-content"},q3={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},W3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},K3={style:{display:"flex"}},Es="ss-ocr-upload-history",G3="ss-ocr-cert-history-v1",Y3={__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},calculator:{type:Array,default:()=>[]},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(a,{emit:l}){var Wt;const n=e.ref([]),r=Mt(M.pinia),i=e.ref(null),s=e.ref(new Set),h=e.ref(new Map),c=e.ref(!1),d=e.ref(new Map),m=new Map,g=e.ref(new Map),u=a,C=e.ref((u==null?void 0:u.allowSelect)??!0),I=e.ref(((Wt=u==null?void 0:u.config)==null?void 0:Wt.showIndex)??!0),k=e.ref(),G=e.ref(!0),z=e.ref(!1),j=e.ref([]),L={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},_=e.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"}]}]),x=te.useOriginalState(M.pinia);let w="$R";const{originalPath:b}=M.storeToRefs(x),E=b.value,F=e.computed(()=>{var v;const p=(v=te.getAllLeafNodes(A.value)||[])==null?void 0:v.filter(N=>(N==null?void 0:N.type)!=="operate"&&(N==null?void 0:N.label)!=="操作"&&(N==null?void 0:N.prop)!=="operate");return p.length>0?p.every(N=>!!(N!=null&&N.sortable)):!1});e.computed(()=>{var v;return(v=A.value)==null?void 0:v.every(N=>N==null?void 0:N.filterable)}),e.computed(()=>{var v;return(v=A.value)==null?void 0:v.every(N=>N==null?void 0:N.operable)});const $=e.ref(!0),le=e.ref([]),Q=e.reactive({column:{},status:!1,text:"合计"}),me=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),de=l,A=e.ref([]),ee=e.ref([]),X=e.ref([]),re=e.reactive({prop:"",order:null}),fe=e.ref([]),$e=e.ref(!1),ue=e.ref(!1),B=e.ref(null),{isUseBackdrop:se,initTrackFileType:U,getFileExtension:be,setData:Me,getFileInfo:Ve,getFilesInfo:aa}=No.useThreeSystem(),Ea=e.ref([]),ne=e.ref(!1),ta=e.ref(),ce=M.useMenuState(),{importLoading:ca,activeMenuPath:we,contentLoading:ge,linkMenuInfo:he}=M.storeToRefs(ce),Ke=te.useTableComp(M.pinia),fa=M.useModelComp(M.pinia),qa=Xn(M.pinia),{extraContents:V,cacheUpdatingData:H,tableViewContents:Z,tableLoading:ve,pageMapState:pe,lockingPage:pa}=M.storeToRefs(fa),{selectTab:ia}=M.storeToRefs(qa),{compType:He,hasEditable:_a}=ec.useRole(),Ae=e.ref([]),ha=e.ref([]),La=e.ref(new Map);e.ref(!1);const Aa=e.ref("");e.ref();const ua=e.ref(!0),Ta=e.ref(0),Ce=e.ref(!0),ma=e.ref(""),Je=e.ref(!1),W=e.ref(null);e.ref([]);const J=e.ref({label:"查看三维模型"}),je=e.ref(!1),We=e.ref(),Sa=e.ref([]),sa=e.ref([]),Va=e.ref(!1),Re=e.ref([]),Oe=e.ref([]),Le=e.ref([]),Be=e.ref([]),ze=e.ref([]),ul=()=>{try{const p=localStorage.getItem(Es),v=p?JSON.parse(p):[];ze.value=Array.isArray(v)?v:[]}catch{ze.value=[]}},Cl=()=>{try{localStorage.setItem(Es,JSON.stringify(ze.value||[]))}catch{}},Ml=p=>{var oe,ie,q;if(!p)return;const v=p.url||((oe=p==null?void 0:p.uploadResult)==null?void 0:oe.url)||"",N=p.name||((ie=p==null?void 0:p.uploadResult)==null?void 0:ie.name)||((q=p==null?void 0:p.uploadResult)==null?void 0:q.fileName)||"";if(!v&&!N)return;const O={name:N,url:v,ts:Date.now()},P=String(O.name||"").trim().toLowerCase(),T=(ze.value||[]).findIndex(xe=>String((xe==null?void 0:xe.name)||"").trim().toLowerCase()===P);T>-1&&ze.value.splice(T,1),ze.value.unshift(O),ze.value.length>20&&(ze.value=ze.value.slice(0,20)),Cl()};ul();const Rl=(p,v)=>`${G3}:${String(p??"")}:${String(v??"")}`,Al=(p,v)=>{try{const N=sessionStorage.getItem(Rl(p,v)),O=N?JSON.parse(N):[];return Array.isArray(O)?O:[]}catch{return[]}},er=(p,v,N)=>{try{sessionStorage.setItem(Rl(p,v),JSON.stringify(Array.isArray(N)?N:[]))}catch{}},Qa=(p,v,N)=>{if(!v)return;const O=Al(p,v),P=[N,...O||[]].filter(Boolean).slice(0,1);return er(p,v,P),P},Ul=(p,v,N)=>{if(!v||!N)return;const O=Rl(p,v),P=Rl(p,N);try{const T=sessionStorage.getItem(O);if(!T)return;const oe=(()=>{try{const xe=JSON.parse(T);return Array.isArray(xe)?xe:[]}catch{return[]}})(),ie=Al(p,N),q=[...oe,...ie||[]].filter(Boolean).sort((xe,Se)=>Number((Se==null?void 0:Se.ts)||0)-Number((xe==null?void 0:xe.ts)||0)).slice(0,1);sessionStorage.setItem(P,JSON.stringify(q)),sessionStorage.removeItem(O)}catch{}},Ua=e.ref(!1),ql=e.ref(!1),Il=e.ref([]),lr=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const _l=e.ref(!1),xr=e.ref([]),Ra=e.ref(1),nl=e.ref(new Map),va=e.ref(new Map),za=e.ref(0),da=e.ref(!1),Ha=e.ref([]),Dl=e.ref([]),Te=p=>{var v;try{const N=(v=te.getAllLeafNodes(A.value)||[])==null?void 0:v.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate");return(N==null?void 0:N.find(O=>(O==null?void 0:O.prop)===p||(O==null?void 0:O.label)===p))||null}catch{return null}},na=p=>{const v=Te(p),N=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return dl.getComponent(N)||dl.getComponent("Input")},ja=e.ref([]),Ee=e.ref(null),Ma=e.ref([]),Ya=e.ref(null),vl=e.ref(""),wl=e.ref(!1),Ie=e.ref([]),ba=e.ref(""),oa=e.ref(!1),wa=e.ref([]),ga=e.ref([]),ol=e.ref([]),Fe=e.ref(null),gl=e.ref([]),Ne=e.ref("");e.computed(()=>{var p;try{const v=(p=te.getAllLeafNodes(A.value)||[])==null?void 0:p.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),N=new Map;return v==null||v.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&N.set(O.label,O.prop)}),N.get("编号")||""}catch{return""}});const Kl=e.computed(()=>{var p;try{const v=(p=te.getAllLeafNodes(A.value)||[])==null?void 0:p.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),N=new Map;return v==null||v.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&N.set(O.label,O.prop)}),N.get("名称")||""}catch{return""}}),Ca=e.computed(()=>{var p;try{const v=(p=te.getAllLeafNodes(A.value)||[])==null?void 0:p.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),N=new Map;return v==null||v.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&N.set(O.label,O.prop)}),N.get("制造厂")||""}catch{return""}}),sl=()=>{oa.value=!1,wa.value=[],ga.value=[],ol.value=[],Fe.value=null,gl.value=[],Ne.value=""},Za=p=>p==null?!1:typeof p=="string"?p.trim()!=="":Array.isArray(p)?p.length>0:!0,bl=(p,v)=>{const N=(p==null?void 0:p.ocrRow)||{};for(const P of Object.keys(N))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Za(N[P])&&(v[P]=N[P]);const O=ha.value.find(P=>P.id===v.id);if(O)for(const P of Object.keys(N))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Za(N[P])&&(O[P]=N[P]);La.value&&La.value.set(v.id,v),Qa(u==null?void 0:u.index,v.id,p==null?void 0:p.versionItem),ga.value=[...ga.value||[],JSON.parse(JSON.stringify(v))]},Ia=async(p,v=null)=>{var N,O,P,T,oe,ie,q;try{const xe=(N=te.getAllLeafNodes(A.value)||[])==null?void 0:N.filter(ka=>(ka==null?void 0:ka.type)!=="operate"&&(ka==null?void 0:ka.label)!=="操作"&&(ka==null?void 0:ka.prop)!=="operate"),Se=new Map;xe==null||xe.forEach(ka=>{ka!=null&&ka.label&&(ka!=null&&ka.prop)&&Se.set(ka.label,ka.prop)});const Ge=Se.get("系统编号")||Se.get("编号");if(!Ge){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const qe=v||Fe.value;if((Array.isArray(qe==null?void 0:qe.result)?qe.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ka=0;ka<p.length;ka++){const Ba=p[ka],$a=Ba[Ge];if(!$a){console.warn(`第 ${ka+1} 条匹配行缺少系统编号,跳过`);continue}const Ze=`设备管理/试验设备/${$a}`,rl=await M.getPageDataApi({platId:parseInt((O=xl.value)==null?void 0:O.plat_id),pageName:Ze});if(!((P=rl==null?void 0:rl.data)!=null&&P.result)||!Array.isArray(rl.data.result)){console.warn(`未找到详情页数据: ${Ze}`);continue}const xa=rl.data.result.find(ea=>(ea==null?void 0:ea.property_name)==="校检记录");if(!xa){console.warn(`详情页 ${Ze} 中未找到校检记录表`);continue}const il=(T=xa.contents)==null?void 0:T.find(ea=>(ea==null?void 0:ea.key)&&ea.key.startsWith("content_"));if(!il||!il.key){console.warn("校检记录表中未找到 content item");continue}const ye=il.key,Fa=Array.isArray(il.value)?il.value:[];if(Fa.length>=5){const De=[...Fa].sort((Qe,Na)=>{const tl=Number((Qe==null?void 0:Qe.create_time)||0),Wa=Number((Na==null?void 0:Na.create_time)||0);return tl-Wa})[0];De!=null&&De.id&&await M.pageBatchDeleteApi({platId:parseInt((oe=xl.value)==null?void 0:oe.plat_id),changeContents:[{tableName:ye,tableContents:[{id:De.id}]}]})}const ya=(ie=xe==null?void 0:xe.find(ea=>(ea==null?void 0:ea.label)==="证书附件"))==null?void 0:ie.prop,Ka=String(Date.now()),Oa={id:Ka},D=Fa[0]||{},K=new Date().toISOString().split("T")[0];if(Object.keys(D||{}).forEach(ea=>{if(ea!=="id"){if(ea==="证书附件"){Oa[ea]="";return}if(ea==="校检日期"||ea==="检校日期"){Oa[ea]=Ba[ea]||Ba.校检日期||Ba.检校日期||K;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(ea)){Oa[ea]=Ba[ea]??"";return}Oa[ea]=Ba[ea]??""}}),ya&&Ba[ya]){const ea=Ba[ya];if(Array.isArray(ea)&&ea.length>0)Oa.证书附件=JSON.stringify(ea.map(De=>({url:(De==null?void 0:De.url)||"",name:(De==null?void 0:De.name)||(De==null?void 0:De.fileName)||"",fileName:(De==null?void 0:De.fileName)||(De==null?void 0:De.name)||""})).filter(De=>De.url||De.name));else if(typeof ea=="string")try{const De=JSON.parse(ea);Oa.证书附件=ea}catch{Oa.证书附件=JSON.stringify([{url:ea,name:ea,fileName:ea}])}}console.log(ye,"tableName","inspectionRecordRow",Oa),await M.pageBatchAddApi({platId:parseInt((q=xl.value)==null?void 0:q.plat_id),changeContents:[{tableName:ye,tableContents:[Oa]}]});const Pe=xa==null?void 0:xa.object_id;if(Pe&&Ka){const ea=ya&&Ba[ya]?Ba[ya]:null;let De=[],Qe="",Na=!1;if(Array.isArray(ea)&&ea.length>0){De=ea.map(ml=>({name:(ml==null?void 0:ml.name)||(ml==null?void 0:ml.fileName)||"",url:(ml==null?void 0:ml.url)||""})).filter(ml=>ml.url||ml.name);const Wa=ea[0];Qe=(Wa==null?void 0:Wa.url)||"";const kl=(Wa==null?void 0:Wa.name)||(Wa==null?void 0:Wa.fileName)||"";Na=String(kl).toLowerCase().endsWith(".pdf")||String(Qe).toLowerCase().endsWith(".pdf")}else if(typeof ea=="string")try{const Wa=JSON.parse(ea);Array.isArray(Wa)?(De=Wa.map(kl=>({name:(kl==null?void 0:kl.name)||(kl==null?void 0:kl.fileName)||"",url:(kl==null?void 0:kl.url)||""})).filter(kl=>kl.url||kl.name),De.length>0&&(Qe=De[0].url||"",Na=String(De[0].name).toLowerCase().endsWith(".pdf")||String(Qe).toLowerCase().endsWith(".pdf"))):(Qe=ea,Na=String(ea).toLowerCase().endsWith(".pdf"))}catch{Qe=ea,Na=String(ea).toLowerCase().endsWith(".pdf")}const tl={ts:Date.now(),versionId:String(Date.now())+"_"+String(ka),label:new Date().toLocaleString(),certType:Ba.证书类型||"",certNo:Ba.证书编号||"",fileType:Na?"pdf":"image",sourceUrl:Na?Qe:"",images:De};Qa(Pe,Ka,tl)}}}catch(xe){console.error("向校检记录表插入OCR识别结果失败:",xe),Ja.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},$l=p=>{const v=Array.isArray(p)?p:wa.value||[];if(v.length===0){sl();return}if(v.find(T=>(T==null?void 0:T.__decision)==="replace"&&!(T!=null&&T.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(T=>{var ie;const oe=T==null?void 0:T.__decision;if(!(!oe||oe==="skip")){if(oe==="add"){Qa(u==null?void 0:u.index,(ie=T==null?void 0:T.ocrRow)==null?void 0:ie.id,T==null?void 0:T.versionItem),ol.value=[...ol.value||[],T.ocrRow];return}if(oe==="replace"){const q=T==null?void 0:T.selectedTargetId,xe=(Ae.value||[]).find(Se=>String(Se==null?void 0:Se.id)===String(q));if(!xe)return;bl(T,xe)}}}),(ga.value||[]).length>0&&(Ae.value=[...Ae.value||[]]),(ol.value||[]).length>0&&(Ae.value=[...Ae.value||[],...ol.value||[]],ha.value=[...ha.value||[],...ol.value||[]],(ol.value||[]).forEach(T=>{var oe,ie;return(ie=(oe=La.value)==null?void 0:oe.set)==null?void 0:ie.call(oe,T.id,T)})),Ur.value=Ae.value;const O=ga.value||[],P=ol.value||[];if(O.length>0&&(de("change",{buttonName:"编辑",singleContent:O,content:Ae.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:A.value,name:u==null?void 0:u.compName}),Ia(O)),P.length>0){const T=Fe.value;de("change",{buttonName:"OCR批量新增",content:Ae.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:A.value,ocrRows:P,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(T==null?void 0:T.result)?T.result:[]).map(oe=>(Array.isArray(oe==null?void 0:oe.图片信息)?oe.图片信息:[]).map(ie=>({url:(ie==null?void 0:ie.url)||"",name:(ie==null?void 0:ie.name)||"",fileName:(ie==null?void 0:ie.name)||""})).filter(ie=>ie.url)),ocrResult:T,matchedCount:(O||[]).length,newCount:(P||[]).length})}Ja.ElMessage.success("已提交候选处理结果"),sl()},br=kc(),yn=e.computed(()=>br.getConfig()),_r=e.ref(),Pl=e.ref(),cn=vc(M.pinia),Ur=e.ref(),Wr=e.ref(0),Yr=M.useUnit(M.pinia),{selectIndex:Zr,selectMenu:Kr,selectTitle:or}=M.storeToRefs(Yr),{selectString:sr}=M.storeToRefs(cn),Qr=M.useLoginState(M.pinia),{loginUserInfo:xl}=M.storeToRefs(Qr),hr=e.ref(720),Yl=e.ref(!1),Tr=e.ref(!1),Xl=e.ref([]),wr=e.ref(),Pr=e.ref(!0),Er=e.ref(!0);e.ref([]);const un=e.inject("contentRef");e.provide("contentRef",un),e.provide("getSuggestListForCell",Bu),e.provide("getSuggestLoadingForCell",(p,v)=>{const N=`${p==null?void 0:p.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return g.value.get(N)||!1}),e.watch(()=>{var p;return(p=Ae.value)==null?void 0:p.length},p=>{me.total=p}),e.watch(()=>Z.value,async()=>{var v,N,O,P,T,oe,ie,q,xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze;if(((v=Z.value)==null?void 0:v.length)===0||!((N=u==null?void 0:u.itemData)!=null&&N.find(rl=>(rl==null?void 0:rl.key)==="columnPath"))||!((O=u==null?void 0:u.itemData)!=null&&O.find(rl=>(rl==null?void 0:rl.key)==="pageColumn")))return;let p=(xe=(q=(ie=(oe=(T=(P=u==null?void 0:u.itemData)==null?void 0:P.find(rl=>(rl==null?void 0:rl.key)==="pageColumn"))==null?void 0:T.contents)==null?void 0:oe.split("["))==null?void 0:ie[1])==null?void 0:q.split("]"))==null?void 0:xe[0];((Xe=(qe=(Ge=(Se=u==null?void 0:u.itemData)==null?void 0:Se.find(rl=>(rl==null?void 0:rl.key)==="pageColumn"))==null?void 0:Ge.contents)==null?void 0:qe.split("["))==null?void 0:Xe[0])+((Ba=(ka=Z.value)==null?void 0:ka.find(rl=>(rl==null?void 0:rl.key)===p))==null?void 0:Ba.value),(Ze=($a=u==null?void 0:u.itemData)==null?void 0:$a.find(rl=>(rl==null?void 0:rl.key)==="pageGroup"))==null||Ze.contents,qt(compData,u.allMapContents)},{deep:!0});const en=p=>{var N,O,P,T,oe;const v=(O=(N=A.value)==null?void 0:N.filter(ie=>ie==null?void 0:ie.mainKey))==null?void 0:O.map(ie=>ie==null?void 0:ie.prop);if(v.length===0){const ie=(P=A.value)==null?void 0:P.map(q=>q==null?void 0:q.prop);return(T=ie==null?void 0:ie.map(q=>p==null?void 0:p[q]))==null?void 0:T.join("|")}return(oe=v==null?void 0:v.map(ie=>p==null?void 0:p[ie]))==null?void 0:oe.join("|")},Zn=p=>{var ie,q,xe,Se,Ge;const v=(q=(ie=A.value)==null?void 0:ie.filter(qe=>qe==null?void 0:qe.required))==null?void 0:q.map(qe=>qe==null?void 0:qe.prop),N=[];if(p==null||p.forEach(qe=>{v==null||v.forEach(Xe=>{const ka=qe[Xe];(ka==null||ka==="")&&(N.includes(Xe)||N.push(Xe))})}),N.length>0)return Ja.ElMessage.warning(`请填写必填项:${N.join("、")}`);const O=new Map,P=new Map;(xe=Ae.value)==null||xe.forEach(qe=>{const Xe=en(qe);O.set(Xe,qe)}),p==null||p.forEach(qe=>{const Xe=en(qe);P.set(Xe,qe)});const T=p==null?void 0:p.filter(qe=>O.has(en(qe))),oe=(Se=Ae.value)==null?void 0:Se.filter(qe=>P.has(en(qe)));return(T==null?void 0:T.length)>0&&(y.columns=(Ge=A.value)==null?void 0:Ge.filter(qe=>(qe==null?void 0:qe.label)!=="操作"),y.existRows=oe,y.tableData=T,y.show=!0),y.newRows=p==null?void 0:p.filter(qe=>{const Xe=en(qe);return!O.has(Xe)}),y.newRows},Hn=e.ref(""),Tn=e.ref(null),On=async()=>{var p,v,N,O,P,T;try{const oe=await M.quoteApi({related:[{menus:we.value,groups:u==null?void 0:u.compName}],platId:parseInt((p=xl.value)==null?void 0:p.plat_id)});if(((v=oe==null?void 0:oe.data)==null?void 0:v.code)===200){Tn.value=(N=oe==null?void 0:oe.data)==null?void 0:N.result;const ie=(O=A.value)==null?void 0:O.map(Se=>(Se==null?void 0:Se.prop)||(Se==null?void 0:Se.label)),q=Un(ie,(P=oe==null?void 0:oe.data)==null?void 0:P.result),xe=q==null?void 0:q.flatMap(Se=>Se==null?void 0:Se.quote);(xe==null?void 0:xe.length)>0&&(Hn.value=(T=xe==null?void 0:xe.map(Se=>Se==null?void 0:Se.menus))==null?void 0:T.join("、"))}}catch(oe){throw new Error(oe)}};function Un(p,v){var N;return(N=v.filter(O=>O.struct&&Array.isArray(O.struct)?O.struct.some(P=>P.words&&Array.isArray(P.words)?P.words.some(T=>p.includes(T)):!1):!1))==null?void 0:N.map(O=>{const P={...O};return P.struct&&Array.isArray(P.struct)&&(P.struct=P.struct.filter(T=>T.words&&Array.isArray(T.words)?T.words.some(oe=>p.includes(oe)):!1)),P})}const gn=async(p,v)=>{var N,O;try{Tn.value||await On();const P=v==null?void 0:v.map(oe=>{const ie=Object.keys(oe),q={};return ie.forEach((xe,Se)=>{q[p[Se]]=oe[xe]}),q}),T=Zn(P);if(!T||(T==null?void 0:T.length)===0)return;y.show||await R(T)}catch(P){throw Ja.ElMessage.error("数据导入处理失败"),await M.pageBatchAddApi({platId:parseInt((N=xl==null?void 0:xl.value)==null?void 0:N.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(P),is_delete:!1,request_table:(O=u==null?void 0:u.related)==null?void 0:O.find(T=>T==null?void 0:T.includes("content")),request_type:"error"}]}]}),new Error(P)}},Ln=async p=>{var T,oe,ie,q,xe,Se,Ge;let v=X.value;v!=null&&v.find(qe=>(p==null?void 0:p.key)===(qe==null?void 0:qe.key))&&(v=v==null?void 0:v.filter(qe=>(p==null?void 0:p.key)!==(qe==null?void 0:qe.key))),v.push({key:p==null?void 0:p.key,value:[(oe=p==null?void 0:p.value)==null?void 0:oe[((T=p==null?void 0:p.value)==null?void 0:T.length)-1]]});let N=Be.value;N=N==null?void 0:N.map(qe=>{var Xe,ka;return(qe==null?void 0:qe.type)==="Select"&&(p==null?void 0:p.key)===(qe==null?void 0:qe.prop)&&Array.isArray(qe.value)&&(Xe=qe.value)!=null&&Xe.every(Ba=>typeof Ba=="string")&&(qe.selectValue=(ka=v==null?void 0:v.find(Ba=>(Ba==null?void 0:Ba.key)===(qe==null?void 0:qe.prop)))==null?void 0:ka.value),qe});let O=(q=(ie=N==null?void 0:N.find(qe=>(qe==null?void 0:qe.prop)===(p==null?void 0:p.key)))==null?void 0:ie.optionUrl)==null?void 0:q.menuId,P=N==null?void 0:N.find(qe=>(qe==null?void 0:qe.prop)===(p==null?void 0:p.key));if(O){let qe=await Et(P==null?void 0:P.optionUrl,O),Xe,ka=le.value,Ba=(Ge=(Se=(xe=Be.value)==null?void 0:xe.find($a=>{var Ze;return(Ze=P==null?void 0:P.optionUrl)==null?void 0:Ze.menuId}))==null?void 0:Se.selectValue)==null?void 0:Ge[0];if(qe==null||qe.forEach($a=>{var Ze,rl,xa,il,ye,Fa,ya,Ka,Oa,D;if(O){let K=(rl=(Ze=Be.value)==null?void 0:Ze.find(ea=>{var De,Qe;return((De=P==null?void 0:P.optionUrl)==null?void 0:De.menuId)===((Qe=ea==null?void 0:ea.optionUrl)==null?void 0:Qe.menuId)}))==null?void 0:rl.prop,Pe=(il=(xa=N==null?void 0:N.find(ea=>(ea==null?void 0:ea.prop)===K))==null?void 0:xa.selectValue)==null?void 0:il[0];K!=null&&K.includes("·")&&(K=(ye=K==null?void 0:K.split("·"))==null?void 0:ye[0],Pe=(Oa=(Ka=(ya=p==null?void 0:p.value)==null?void 0:ya[((Fa=p==null?void 0:p.value)==null?void 0:Fa.length)-1])==null?void 0:Ka.split(" "))==null?void 0:Oa[0]),ka!=null&&ka.find(ea=>(ea==null?void 0:ea.value)===Ba)?Xe=(D=ka==null?void 0:ka.find(ea=>(ea==null?void 0:ea.value)===Ba))==null?void 0:D.objectValue:$a[K]===Pe&&(Xe=$a)}}),Xe){let $a=N;$a=$a==null?void 0:$a.map(Ze=>{var rl,xa,il,ye,Fa,ya;return O&&(Xe!=null&&Xe[Ze==null?void 0:Ze.prop])&&ma.value==="新增"&&(Ze==null?void 0:Ze.prop)!==(P==null?void 0:P.prop)?Ze.value=(Xe==null?void 0:Xe[Ze==null?void 0:Ze.prop])||(Xe==null?void 0:Xe[(ye=(il=(xa=(rl=Ze==null?void 0:Ze.optionUrl)==null?void 0:rl.groupSelect)==null?void 0:xa[1])==null?void 0:il.replaceAll("[",""))==null?void 0:ye.replaceAll("]","")]):Ze.value=(ya=(Fa=Be.value)==null?void 0:Fa.find(Ka=>(Ka==null?void 0:Ka.prop)===(Ze==null?void 0:Ze.prop)))==null?void 0:ya.value,Ze}),Be.value=$a}}X.value=v},Qn=async(p,v)=>{var N,O,P,T,oe;if((N=p==null?void 0:p.toString())!=null&&N.includes(".txt")||(O=p==null?void 0:p.toString())!=null&&O.includes(".cpt")||(P=p==null?void 0:p.toString())!=null&&P.includes(".cyd")){const ie=await Ja.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}}),q=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});let xe=URL.createObjectURL(q);ta.value=[{name:(oe=p==null?void 0:p.split("/"))==null?void 0:oe[((T=p==null?void 0:p.split("/"))==null?void 0:T.length)-1],blobUrl:xe}],ne.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&de("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{Er.value=!1;let p=Wr.value;Wr.value=p+1});const Jr=e.reactive({prop:"",order:null}),ei=e.computed(()=>{const p=(Ae.value??[]).slice(),v=Jr.prop||re.prop,N=Jr.order||re.order;if(!v||!N)return p;const O=N==="ascending",P=oe=>{if(v)return oe&&Object.prototype.hasOwnProperty.call(oe,v)?oe[v]:v.includes(".")?v.split(".").reduce((ie,q)=>ie==null?ie:ie[q],oe):oe==null?void 0:oe[v]},T=oe=>{if(oe==null)return{ok:!1,value:NaN};if(typeof oe=="number")return{ok:Number.isFinite(oe),value:oe};const ie=String(oe).trim();if(ie==="")return{ok:!1,value:NaN};const q=ie.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(q))return{ok:!1,value:NaN};const xe=Number(q);return{ok:Number.isFinite(xe),value:xe}};return p.sort((oe,ie)=>{const q=P(oe),xe=P(ie);if(q==null&&xe==null)return 0;if(q==null)return O?-1:1;if(xe==null)return O?1:-1;const Se=T(q),Ge=T(xe);if(Se.ok&&Ge.ok)return O?Se.value-Ge.value:Ge.value-Se.value;const qe=ye=>{if(ye==null)return{ok:!1,value:NaN};const Fa=String(ye).trim();if(Fa==="")return{ok:!1,value:NaN};const ya=Fa.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ya)return{ok:!1,value:NaN};const Ka=ya[1]?-1:1,Oa=Number(ya[2]),D=Number(ya[3]),K=Number(ya[4]);return[Oa,D,K].some(Pe=>Number.isNaN(Pe))?{ok:!1,value:NaN}:D>=60||K>=60?{ok:!1,value:NaN}:{ok:!0,value:Ka*(Oa*3600+D*60+K)}},Xe=qe(q),ka=qe(xe);if(Xe.ok&&ka.ok)return O?Xe.value-ka.value:ka.value-Xe.value;const Ba=new Date(q).getTime(),$a=new Date(xe).getTime(),Ze=!Number.isNaN(Ba),rl=!Number.isNaN($a);if(Ze&&rl)return O?Ba-$a:$a-Ba;const xa=String(q),il=String(xe);return O?xa.localeCompare(il):il.localeCompare(xa)})}),Sn=e.computed(()=>{var N;const p=(me.currentPage-1)*me.pageSize,v=p+me.pageSize;return de("getSliceContLength",me),(N=ei.value)==null?void 0:N.slice(p,v)}),Ii=p=>{me.currentPage=p,de("getSliceContLength",me)},Ho=p=>{var O;me.pageSize=p;const v=((O=Ae.value)==null?void 0:O.length)??0,N=p>0?Math.ceil(v/p):1;me.currentPage>N&&(me.currentPage=N||1,Ja.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),de("getSliceContLength",me)},Uo=({prop:p,order:v})=>{Jr.prop=p,Jr.order=v,me.currentPage=1};function An(p){const v=[];function N(O,P=""){O.forEach(T=>{T.children&&T.children.length>0?N(T.children,T.prop):v.push(T.prop)})}return N(p),v}const qo=(p,v)=>{var ie,q,xe,Se;let N=(q=(ie=A.value)==null?void 0:ie.map(Ge=>Ge==null?void 0:Ge.prop))==null?void 0:q.filter(Ge=>Ge!=="operate");((xe=A.value)==null?void 0:xe.some(Ge=>{var qe;return((qe=Ge==null?void 0:Ge.children)==null?void 0:qe.length)>0}))&&(N=An((Se=A.value)==null?void 0:Se.filter(Ge=>(Ge==null?void 0:Ge.prop)!=="operate")));let P;if(P=(p==null?void 0:p.length)===(N==null?void 0:N.length)?p:p.slice(0,N==null?void 0:N.length),!(P==null?void 0:P.every(Ge=>N==null?void 0:N.find(qe=>Ge===qe))))return Ja.ElMessage.error("导入的数据表头不匹配");gn(P,v)},Wo=(p,v)=>{var P;const N=p==null?void 0:p.filter(T=>T!=="序号"),O=v==null?void 0:v.map(T=>{const oe=Object.entries(T);return oe.shift(),Object.fromEntries(oe)});fa.setRefreshCurStructure(!1),((P=A.value)==null?void 0:P.length)===0||qo(N,O)},Ko=(p,v,N,O)=>{const P=[],T=[],oe=xe=>Object.keys(xe).length;for(const xe in p)if(p[xe]!==void 0){const Se=p[xe],Ge=[];for(const[qe,Xe]of Object.entries(Se))Ge.push(Xe),T.length<oe(Se)&&T.push(qe);P.push(Ge)}P.unshift(T);const ie=te.utils.aoa_to_sheet(P),q=te.utils.book_new();te.utils.book_append_sheet(q,ie,O),te.writeFileSync(q,`${v}.xlsx`),Xl.value=[]},Oi=async(p,v,N,O=!1,P)=>{try{fa.setRefreshCurStructure(!1)}catch(T){Ja.ElMessage.error(T)}},ao=async(p,v)=>{await Oi()},nn=async(p,v)=>{await Oi("columnType",v,p,!1)},Go=async({newRow:p,targetIndex:v})=>{var P;if(!_a(u.config,{type:He.TABLE}))return;const O=(me.currentPage-1)*me.pageSize+(v??0);p._isTemp=!0;try{(p.sort===void 0||p.sort===null||String(p.sort).trim()==="")&&(p.sort=ii(O,Ae.value||[]))}catch{}Ae.value.splice(O,0,p),await e.nextTick(),h.value.has(p.id)||h.value.set(p.id,M.cloneDeep(p)),Ae.value=(P=Ae.value)==null?void 0:P.map(T=>({...T,tableEditType:(T==null?void 0:T.id)===p.id?"edit":(T==null?void 0:T.tableEditType)??"text"})),s.value.add(p.id),Yl.value=!0},Yo=(p,v,N,O=[])=>(!Array.isArray(v)||v.length===0||v.forEach(P=>{const T=P==null?void 0:P.prop;if(!T)return;let oe=p==null?void 0:p[T];if(oe==null||String(oe).trim()==="")return;oe=String(oe);const ie=new Set([...(Array.isArray(N)?N:[]).filter(Se=>(Se==null?void 0:Se.id)!==(p==null?void 0:p.id)).map(Se=>Se==null?void 0:Se[T]).filter(Se=>Se!=null).map(Se=>String(Se)),...(Array.isArray(O)?O:[]).map(Se=>Se==null?void 0:Se[T]).filter(Se=>Se!=null).map(Se=>String(Se))]);if(!ie.has(oe))return;let q=1,xe="";for(;xe=`${oe}(${q})`,!!ie.has(xe);)q++;p[T]=xe}),p),Li=async()=>{var P,T,oe,ie,q,xe,Se,Ge;const p=Array.from(s.value||[]);if(p.length===0)return;const v=(T=te.getColumnChild((P=M.cloneDeep(A.value))==null?void 0:P.filter(qe=>(qe==null?void 0:qe.label)!=="操作")))==null?void 0:T.filter(qe=>(qe==null?void 0:qe.required)===!0);if((v==null?void 0:v.length)>0)for(let qe=0;qe<p.length;qe++){const Xe=p[qe],ka=(oe=Ae.value)==null?void 0:oe.find(Ba=>(Ba==null?void 0:Ba.id)===Xe);if(ka)for(let Ba=0;Ba<v.length;Ba++){const $a=v[Ba],Ze=$a==null?void 0:$a.prop,rl=($a==null?void 0:$a.label)??Ze,xa=ka==null?void 0:ka[Ze];if(xa===""||xa===null||xa===void 0||Array.isArray(xa)&&xa.length===0){Ja.ElMessage.error(`${rl}不能为空`);let ye={};ye.id=ka==null?void 0:ka.id;const Fa={fixContent:[ye],buttonName:"修改",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:A.value};de("change",Fa);return}}}const N=[],O=[];if(p.forEach(qe=>{var rl;const Xe=(rl=Ae.value)==null?void 0:rl.find(xa=>(xa==null?void 0:xa.id)===qe);if(!Xe)return;if(Xe!=null&&Xe._isTemp){const il=(te.getAllLeafNodes(A.value)||[]).filter(D=>(D==null?void 0:D.mainKey)===!0||(D==null?void 0:D.isMainKey)===!0),ye=Ae.value.findIndex(D=>(D==null?void 0:D.id)===qe),Fa=ye>=0?ye+1:Ae.value.length+1;Yo(Xe,il,Ae.value,N);const ya={id:Fa.toString()};(Xe==null?void 0:Xe.sort)!==void 0&&(Xe==null?void 0:Xe.sort)!==null&&String(Xe.sort).trim()!==""?ya.sort=String(Xe.sort):ya.sort=ii(ye>=0?ye:Ae.value.length-1,Ae.value||[]),(te.getAllLeafNodes(A.value)||[]).filter(D=>(D==null?void 0:D.type)!=="operate"&&(D==null?void 0:D.label)!=="操作"&&(D==null?void 0:D.prop)!=="operate").forEach(D=>{const K=D==null?void 0:D.prop;if(K){const Pe=Xe[K];Pe!==void 0?ya[K]=Pe??"":ya[K]=""}}),N.push(ya);return}const Ba=(te.getAllLeafNodes(A.value)||[]).filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),$a=new Set(Ba.map(xa=>xa==null?void 0:xa.prop).filter(Boolean)),Ze={};for(const xa of $a)Object.prototype.hasOwnProperty.call(Xe,xa)&&(Ze[xa]=Xe[xa]);O.push({id:Xe.id,value:{tableData:Ze}})}),fa.setTableLoading(u==null?void 0:u.index),O.length>0){const qe=O.map(ka=>{const Ba={id:ka.id,...ka.value.tableData};return delete Ba._isOCRRow,delete Ba._ocrTableId,delete Ba._isTemp,delete Ba.tableEditType,delete Ba.index,Ba}),Xe=[{tableName:((ie=u==null?void 0:u.related)==null?void 0:ie.find(ka=>ka==null?void 0:ka.includes("content")))??"content_"+(u==null?void 0:u.index),tableContents:qe}];try{await M.pageBatchUpdateApi({platId:parseInt((q=xl.value)==null?void 0:q.plat_id),changeContents:Xe})}catch(ka){Ja.ElMessage.error(((Se=(xe=ka==null?void 0:ka.response)==null?void 0:xe.data)==null?void 0:Se.message)||(ka==null?void 0:ka.message)||"保存失败"),fa.setTableLoading(!1);return}}if(N.length>0){const qe={fixContent:N,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:A.value};de("change",qe)}Ja.ElMessage.success("保存成功"),s.value.clear(),h.value.clear(),Ae.value=(Ge=Ae.value)==null?void 0:Ge.map(qe=>({...qe,tableEditType:"text"})),Yl.value=!1,fa.setRefreshCurStructure(!0)},Jo=()=>{var v;const p=Array.from(s.value||[]);if(p.length===0){Yl.value=!1;return}p.forEach(N=>{var T,oe;const O=h.value.get(N),P=(T=Ae.value)==null?void 0:T.find(ie=>(ie==null?void 0:ie.id)===N);if(P!=null&&P._isTemp){Ae.value=Ae.value.filter(ie=>(ie==null?void 0:ie.id)!==P.id);return}if(O){const ie=(oe=Ae.value)==null?void 0:oe.findIndex(q=>(q==null?void 0:q.id)===N);ie!==-1&&(Ae.value[ie]={...Ae.value[ie],...O})}}),s.value.clear(),h.value.clear(),Ae.value=(v=Ae.value)==null?void 0:v.map(N=>({...N,tableEditType:"text"})),Yl.value=!1},Ri=e.ref(!1),lo=async p=>{var P,T,oe,ie;if(!Yl.value||p!=null&&p.isComposing||(p==null?void 0:p.key)!=="Enter")return;const v=p==null?void 0:p.target;if(((T=(P=v==null?void 0:v.tagName)==null?void 0:P.toLowerCase)==null?void 0:T.call(P))==="textarea")return;const O=document.getElementById("excel-table");O&&!O.contains(v)||((oe=v==null?void 0:v.blur)==null||oe.call(v),(ie=p.preventDefault)==null||ie.call(p),await e.nextTick(),await ro())},ro=async()=>{if(H.value){Yl.value=!1;return}if(!Ri.value){Ri.value=!0;try{Array.from(s.value||[]).length>0?await Li():Yl.value=!1}finally{Promise.resolve().then(()=>{Ri.value=!1})}}},Xo=p=>{Xl.value=p},no=(p,v)=>{wr.value===v?Pr.value=!1:Pr.value=!0,wr.value=v==null?void 0:v.changeProp},mi=p=>{if(!p)return;const{item:v,value:N}=p,O=Be.value.find(P=>P.prop==v.prop);O&&O.contents.push({label:N,value:N})},kn=e.computed(()=>{var N,O,P;const p=(N=A.value)==null?void 0:N.some(T=>T==null?void 0:T.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",p?"inline-block":"none"),(P=(O=A.value)==null?void 0:O.filter(T=>(T==null?void 0:T.label)!=="操作"))==null?void 0:P.map(T=>({...T,filterable:!!(T!=null&&T.filterable),showSummary:!!(T!=null&&T.showSummary),operable:!!(T!=null&&T.operable),fixed:T==null?void 0:T.fixed}))}),ai=async(p,v,N)=>{const O=M.cloneDeep(A.value);await e.nextTick();const P=O==null?void 0:O.map(oe=>(N==null?void 0:N.label)===(oe==null?void 0:oe.label)?{...oe,[v]:p}:oe),T=$i(P);await ks(u.index,T),A.value=P,ee.value=T},$i=p=>{var P;const v=p||[];return((P=te.getAllLeafNodes(v)||[])==null?void 0:P.filter(T=>(T==null?void 0:T.prop)&&(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate")).map(T=>{const{prop:oe}=T;return v0(oe,T)})},io=async p=>{let v=await y0(u.index);v||(v=$i(p)),ee.value=v},oo=async(p,v)=>{const N=M.cloneDeep(A.value),O=oe=>Array.isArray(oe)?oe.map(ie=>{const q=Array.isArray(ie==null?void 0:ie.children)&&ie.children.length>0,xe={...ie};return(xe==null?void 0:xe.prop)==="operate"||(xe==null?void 0:xe.label)==="操作"||(xe==null?void 0:xe.type)==="operate"?(xe.sortable=!1,xe.filterable=!1,xe.operable=!1):xe.sortable=q?!1:!!p,q&&(xe.children=O(xe.children)),xe}):oe,P=O(N),T=$i(P);await ks(u.index,T),A.value=P,ee.value=T,await e.nextTick(),Wr.value=Wr.value+1},to=()=>{Je.value=!1},li=p=>{de("clickTrigger",p)},so=async p=>{var T,oe,ie,q,xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze,rl,xa;const v=p==null?void 0:p.row,N=p==null?void 0:p.rowData,O=p==null?void 0:p.suffix;if((T=v==null?void 0:v.toString())!=null&&T.includes(".urdf")||p!=null&&p.isUrdf||O!=null&&O.includes(".urdf")){if(v.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(se(v)){const ye={files:[Ve(v)],data:{}};Me(ye);return}Re.value=[{url:v,extension:be(v)}],ue.value=!0,B.value={data:M.cloneDeep(N)},$e.value=!0;return}let P=[];if((oe=v==null?void 0:v.toString())!=null&&oe.includes(".stl")||(ie=v==null?void 0:v.toString())!=null&&ie.includes(".STL")||(q=v==null?void 0:v.toString())!=null&&q.includes(".obj")||(xe=v==null?void 0:v.toString())!=null&&xe.includes(".mtl")){const il=(Se=v==null?void 0:v.toString())==null?void 0:Se.split(","),ye=aa(il),Fa=ye==null?void 0:ye[0];if(se(Fa==null?void 0:Fa.extension)){Me({files:ye,data:{}});return}Re.value=ye,ue.value=!1,$e.value=!0;return}if((Ge=v==null?void 0:v.toString())!=null&&Ge.includes(".stl")||(qe=v==null?void 0:v.toString())!=null&&qe.includes(".STL")||(Xe=v==null?void 0:v.toString())!=null&&Xe.includes(".obj")||(ka=v==null?void 0:v.toString())!=null&&ka.includes(".mtl")||O!=null&&O.includes(".stl")||O!=null&&O.includes(".STL")||O!=null&&O.includes(".obj")||O!=null&&O.includes(".mtl")){let il,ye=[],Fa={};if(Array.isArray(v)?il=v:il=v==null?void 0:v.split(","),il==null||il.forEach(ya=>{ya.includes(".mtl")?ye.push(ya):Fa.blob=Fa.blob?Fa.blob+","+ya:ya}),(ye==null?void 0:ye.length)>0&&(Fa.mtlBlobs=ye),O&&(Fa.suffix=O),($a=(Ba=Object.values(Fa))==null?void 0:Ba[0])!=null&&$a.includes("http:"))P.push(Fa);else{const ya=new Blob([Fa.blob],{type:"application/octet-stream;charset=UTF-8"});let Ka=URL.createObjectURL(ya),Oa="";(Ze=v==null?void 0:v.split("/"))==null||Ze.forEach((D,K)=>{var Pe;K===((Pe=v==null?void 0:v.split("/"))==null?void 0:Pe.length)-1&&(Oa=D)}),(rl=Fa.blob)!=null&&rl.includes(".stl")&&(Oa=(Oa==null?void 0:Oa.replaceAll(">",""))+".urdf"),ta.value=[{name:Oa,blobUrl:Ka}],ne.value=!0}}else{const il=await Ja.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ye=new Blob([il.data],{type:"application/octet-stream;charset=UTF-8"});let Fa=URL.createObjectURL(ye),ya="";if((xa=v==null?void 0:v.split("/"))==null||xa.forEach((Ka,Oa)=>{var D;Oa===((D=v==null?void 0:v.split("/"))==null?void 0:D.length)-1&&(ya=Ka)}),se(ya)){const Ka=U(ya),Oa=Ve(v);Me({files:[Oa],data:{trackFileType:Ka}});return}ta.value=[{name:ya,blobUrl:Fa}],ne.value=!0}(P==null?void 0:P.length)>0&&r.setBlobUrls(P)},ri=p=>{var O,P,T,oe;if(p!=null&&p.downloadUrl)return p==null?void 0:p.name;const v=(oe=(O=p==null?void 0:p.url)==null?void 0:O.split("."))==null?void 0:oe[((T=(P=p==null?void 0:p.url)==null?void 0:P.split("."))==null?void 0:T.length)-1];return(p==null?void 0:p.name)+"."+v},co=p=>{if(!p)return"未知文件";try{const O=ri(p);if(typeof O=="string"&&O.includes("."))return O}catch{}const v=(p==null?void 0:p.fileName)||(p==null?void 0:p.name)||"未知文件",N=(p==null?void 0:p.suffix)||"";return v.includes(".")?v:`${v}${N}`},uo=p=>{if(p==null||typeof p=="number"||typeof p!="string")return p;const v=p.match(/^(\d+)\_(\d+)$/);if(!v)return p;const N=Number(v[1]),O=Number(v[2]);return!Number.isFinite(N)||!Number.isFinite(O)?p:String(N*1e3+O)},ni=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;const N=Number(v);return Number.isFinite(N)?N:null},Zo=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;if(/^\d+$/.test(v)){const P=Number(v);return Number.isFinite(P)?v.length<=10?P*1e3:P:null}const N=v.includes("T")?v:v.replace(" ","T"),O=Date.parse(N);return Number.isFinite(O)?O:null},yi=(p,v=[])=>{const N=Array.isArray(p)?p.slice():[];if(N.length<=1)return N;const O=new Map((v||[]).map((oe,ie)=>[String(oe),ie])),P=N.some(oe=>ni(oe==null?void 0:oe.sort)!==null),T=N.map((oe,ie)=>({r:oe,idx:ie,id:String((oe==null?void 0:oe.id)??""),sortVal:ni(oe==null?void 0:oe.sort),createTimeMs:Zo(oe==null?void 0:oe.create_time),prevIdx:O.has(String(oe==null?void 0:oe.id))?O.get(String(oe==null?void 0:oe.id)):Number.POSITIVE_INFINITY}));return T.sort((oe,ie)=>{if(P){const Se=oe.sortVal,Ge=ie.sortVal;if(Se===null&&Ge!==null)return 1;if(Se!==null&&Ge===null)return-1;if(Se!==null&&Ge!==null&&Se!==Ge)return Se-Ge}const q=oe.createTimeMs,xe=ie.createTimeMs;return q!==null&&xe!==null&&q!==xe?xe-q:q!==null&&xe===null?-1:q===null&&xe!==null?1:oe.prevIdx!==ie.prevIdx?oe.prevIdx-ie.prevIdx:oe.idx-ie.idx}),T.map(oe=>oe.r)},ii=(p,v=[])=>{const N=v==null?void 0:v[p-1],O=v==null?void 0:v[p],P=ni(N==null?void 0:N.sort),T=ni(O==null?void 0:O.sort);let oe=null;P!==null&&T!==null&&T>P?oe=(P+T)/2:P!==null?oe=P+1:T!==null?oe=Math.max(T-1,0):oe=(p??0)+1;const ie=Number(oe.toFixed(6));return String(Number.isFinite(ie)?ie:oe)},gi=async p=>{let v=null,N=null;if(p!=null&&p.id){const P=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const T=await M.platformDownloadFile(p);v=URL.createObjectURL(T.data),N=co(p)}finally{P.close()}}else if(p!=null&&p.downloadUrl){const P=await bi(),T=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),oe=await Ja.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{T.close()}),ie=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(ie),N=p==null?void 0:p.name}else{const P=await M.platformDownloadFile({url:p==null?void 0:p.url});!p.url.toUpperCase().includes(".OBJ")&&!p.url.toUpperCase().includes(".STL")&&!p.url.toUpperCase().includes(".MTL")&&!p.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(P.data),N=ri(p)):v=p==null?void 0:p.url}if(se(v)){const P={row:`${v}`,suffix:be(N)};so(P);return}const O={name:N,blobUrl:v};ta.value=[O],ne.value=!0},Qo=async p=>{let v=null,N=null;if(p!=null&&p.id){const T=await M.platformDownloadFile(p);v=URL.createObjectURL(T.data),N=co(p)}else if(p!=null&&p.downloadUrl){const T=await bi(),oe=await Ja.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:T,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),ie=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(ie),N=p==null?void 0:p.name}else{const T=await M.platformDownloadFile({url:p==null?void 0:p.url});v=URL.createObjectURL(T.data),N=ri(p)}const O={name:N,blobUrl:v},P=document.createElement("a");P.href=O.blobUrl,P.download=O.name,P.style.display="none",document.body.appendChild(P),P.click(),setTimeout(()=>{document.body.removeChild(P)},100)},Vi=(p,v)=>{var O;if(Object.values(v).length===0)return;let N=p;return Object.values(v).find(P=>{var T,oe,ie;return((T=P==null?void 0:P.toString())==null?void 0:T.includes(".txt"))||((oe=P==null?void 0:P.toString())==null?void 0:oe.includes(".cpt"))||((ie=P==null?void 0:P.toString())==null?void 0:ie.includes(".obj"))})?N=[...p,J.value]:(O=u==null?void 0:u.config)!=null&&O.allowMove&&(N=[...p,{label:"迁移"}]),N},et=()=>{z.value=!0},at=e.ref([]),po=async(p,v,N=!1)=>{var oe,ie,q,xe;if(!p)return;if(N){Ae.value=[...La.value.values()].filter(Se=>Object.values(Se).some(Ge=>typeof Ge=="string"?Ge==null?void 0:Ge.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let O={};for(let Se in p)(p==null?void 0:p[Se])!==""&&(O[Se]=p==null?void 0:p[Se]);if(JSON.stringify(O)==="{}"){Ae.value=Array.from(((oe=La.value)==null?void 0:oe.values())??[]);return}let P=(ie=u==null?void 0:u.related)==null?void 0:ie.find(Se=>Se==null?void 0:Se.includes("content_")),T=await M.getFillFind({platId:parseInt((q=xl==null?void 0:xl.value)==null?void 0:q.plat_id),tableName:P,params:O});T=(xe=T==null?void 0:T.data)==null?void 0:xe.result,Ae.value=T,fa.setTableLoading(!1)},oi=e.computed(()=>{var v,N;return((N=(v=u==null?void 0:u.itemData)==null?void 0:v.find(O=>(O==null?void 0:O.key)==="isEdit"))==null?void 0:N.contents)??!0}),zn=async p=>{var O,P,T,oe;if(!_a(u.config,{type:He.TABLE})||!(((P=(O=u==null?void 0:u.itemData)==null?void 0:O.find(ie=>(ie==null?void 0:ie.key)==="isEdit"))==null?void 0:P.contents)??!0)||!p)return;((T=Array.from(s.value))==null?void 0:T.length)>0&&await Li();const N=p==null?void 0:p.id;N!=null&&(s.value.clear(),h.value.clear(),h.value.has(N)||h.value.set(N,M.cloneDeep(p)),Ae.value=(oe=Ae.value)==null?void 0:oe.map(ie=>({...ie,tableEditType:(ie==null?void 0:ie.id)===N?"edit":"text"})),s.value.add(N),Yl.value=!0)},Fi=async(p,v,N,O)=>{O!=null&&O.isExistChild&&de("clickMainKey",p,N,A.value)},Pi=()=>{ne.value=!1},lt=p=>{de("rowClick",p)};e.watch(()=>u.changedContent,()=>{var N,O;if(!u.changedContent)return;let p=(N=Ae.value)==null?void 0:N.map(P=>{var T;return P.id===((T=u.changedContent)==null?void 0:T.id)&&(P={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete P.newId),P});const v=(O=u.itemData)==null?void 0:O.map(P=>((P==null?void 0:P.key)==="tableContents"&&(P.contents=p),P));Ae.value=p,de("contentChange",{contents:v,index:u.index}),de("change",{content:p,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const rt=()=>{},nt=async()=>{const p=we.value,v=sessionStorage.getItem("systemKey"),N=await te.getItemData(p,v,""),O=(N==null?void 0:N.find(ie=>(ie==null?void 0:ie.name)==="方法明细"))||(N==null?void 0:N[0]),P=(O==null?void 0:O.compData)||[],T=P==null?void 0:P.find(ie=>{const q=ie==null?void 0:ie.key;return q==="formContent"||q==="tableContents"});return T==null?void 0:T.contents},bi=async()=>{const v=Ja.Local.get("access-token");return v?`Bearer ${v}`:""},it=async(p,{token:v,inputData:N}={})=>await Ja.axios.post(p,N,{headers:{Authorization:v}}).catch(P=>(ce.setImportLoading(!1),Promise.reject(P))),ot=p=>{var O;let v={};const N=[];return v.form={},(O=M.cloneDeep(p))==null||O.forEach((P,T)=>{var oe,ie,q,xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze,rl,xa;if((P==null?void 0:P.comp)==="Table"){(ie=(oe=P==null?void 0:P.compData)==null?void 0:oe.find(ya=>(ya==null?void 0:ya.key)==="header"))==null||ie.contents;let il=(Se=(xe=(q=P==null?void 0:P.compData)==null?void 0:q.find(ya=>(ya==null?void 0:ya.key)==="tableContents"))==null?void 0:xe.contents)==null?void 0:Se.map(ya=>ya.slice(1));(Ba=(ka=(Xe=(qe=(Ge=P==null?void 0:P.compData)==null?void 0:Ge.find(ya=>(ya==null?void 0:ya.key)==="header"))==null?void 0:qe.contents)==null?void 0:Xe[0])==null?void 0:ka[0])==null||Ba.label;let ye=(Ze=($a=P==null?void 0:P.compData)==null?void 0:$a.find(ya=>(ya==null?void 0:ya.key)==="header"))==null?void 0:Ze.contents,Fa=[];il==null||il.forEach(ya=>{let Ka=[];ya==null||ya.forEach((Oa,D)=>{var Pe;let K={};((Pe=ye[D])==null?void 0:Pe.label)!=="操作"&&(K[ye[D].label]=Oa,Ka.push(K))}),Fa.push(Ka)}),v[P.name]=Fa}else{const il=(xa=(rl=P.compData)==null?void 0:rl.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:xa.contents;il==null||il.forEach(ye=>{var Fa,ya;if(ye.prop!==""){let Ka=ye==null?void 0:ye.value;Array.isArray(Ka)?Ka=((Fa=Ka==null?void 0:Ka[0])==null?void 0:Fa.oldUrl)||"http://222.92.178.198:62001/"+((ya=Ka==null?void 0:Ka[0])==null?void 0:ya.url):Ka=Ka.toString(),ye={key:(ye==null?void 0:ye.prop)??(ye==null?void 0:ye.label),value:Ka},N.push(ye)}})}}),v.form=te.getFormContents(N),v},tt=p=>{const v=[],N=O=>{O&&typeof O=="object"&&!Array.isArray(O)?Object.values(O).forEach(N):v.push(O)};return N(p),v},st=async(p,v,N)=>{var ye,Fa,ya,Ka,Oa,D,K,Pe,ea,De,Qe,Na,tl,Wa,kl,ml,ar;ce.setImportLoading(!0),fa.setFreshContent(!1);let O=await nt().catch(Ga=>(ce.setImportLoading(!1),Promise.reject(Ga)));O=O==null?void 0:O.filter(Ga=>{var Tl;return((Tl=Ga==null?void 0:Ga.find(Pa=>Pa==null?void 0:Pa.id))==null?void 0:Tl.id)===(v==null?void 0:v.id)});let P=te.getEqualChild([(ye=A.value)==null?void 0:ye.filter(Ga=>(Ga==null?void 0:Ga.label)!=="操作")]);const T=(ya=(Fa=te.tableToForm(O,P))==null?void 0:Fa[0])==null?void 0:ya.find(Ga=>{const Tl=Ga==null?void 0:Ga.key;return Tl==="Interface"||Tl==="方法体"}),oe=T==null?void 0:T.value;if(!oe){console.log("未搜索到isMain, 缺少算法执行接口"),ce.setImportLoading(!1);return}const ie=A.value?te.getEqualChild([A.value]):[],q=ie.find(Ga=>{const Tl=Ga==null?void 0:Ga.prop;return Tl==="Input1"||Tl==="输入数据.输入1"||Tl==="样本输入数据"}),xe=q==null?void 0:q.prop;let Se=v==null?void 0:v[xe];const Ge=await bi().catch(Ga=>(ce.setImportLoading(!1),Promise.reject(Ga)));let qe=!0,Xe="";(Ka=A.value)==null||Ka.forEach(Ga=>{(Ga==null?void 0:Ga.prop)===xe&&(qe=!!(Ga!=null&&Ga.childPath),Xe=Ga==null?void 0:Ga.childPath)});let ka="";if(qe){let Ga=(D=(Oa=A.value)==null?void 0:Oa.find(hl=>(hl==null?void 0:hl.isMainKey)===!0))==null?void 0:D.prop;ka=v==null?void 0:v[Ga];let Tl=Xe==null?void 0:Xe.split(E),Pa=[];Tl==null||Tl.forEach((hl,Ll)=>{(Tl==null?void 0:Tl.length)-1===Ll&&Pa.push(ka),Pa.push(hl)}),Pa=Pa==null?void 0:Pa[0];let pl=await te.getItemData(Pa,sessionStorage.getItem("systemKey"),""),al=pl==null?void 0:pl.filter(hl=>(hl==null?void 0:hl.name)===xe);al=al==null?void 0:al.map(hl=>{var Ll;return hl.compData=(Ll=hl==null?void 0:hl.compData)==null?void 0:Ll.map(Hl=>{var zr;return(Hl==null?void 0:Hl.key)==="tableContents"&&(Hl.contents=(zr=Hl==null?void 0:Hl.contents)==null?void 0:zr.filter(gr=>(gr==null?void 0:gr[1])===(v==null?void 0:v[xe]))),Hl}),hl}),(!al||(al==null?void 0:al.length)===0)&&(al=pl,al=al==null?void 0:al.map(hl=>{var Ll;return hl.compData=(Ll=hl==null?void 0:hl.compData)==null?void 0:Ll.map(Hl=>{var zr;return(Hl==null?void 0:Hl.key)==="tableContents"&&(Hl.contents=(zr=Hl==null?void 0:Hl.contents)==null?void 0:zr.filter(gr=>{var nr,Nl;return(gr==null?void 0:gr[1])===(v==null?void 0:v[(Nl=(nr=A==null?void 0:A.value)==null?void 0:nr[0])==null?void 0:Nl.prop])})),Hl}),hl})),Se=ot(al)}const Ba=await it(oe,{token:Ge,inputData:Se}).catch(Ga=>(ce.setImportLoading(!1),Promise.reject(Ga))),$a=(K=Ba==null?void 0:Ba.data)==null?void 0:K.data,Ze=ie.find(Ga=>(Ga==null?void 0:Ga.prop)==="Output1"),rl=Ze==null?void 0:Ze.prop;let xa=[],il=[];if($a&&((Pe=Object.values($a))==null?void 0:Pe.length)>0){let Ga=[];const Tl=new FormData,Pa=(ea=tt($a))==null?void 0:ea.map(async al=>{var hl,Ll;if(!Array.isArray(al)&&(al!=null&&al.includes("http"))){let Hl=await Ja.axios.get(al,{responseType:"blob"}),zr=(Ll=al==null?void 0:al.split("/"))==null?void 0:Ll[((hl=al==null?void 0:al.split("/"))==null?void 0:hl.length)-1];Tl.append("files",Hl.data,zr)}else Ga.push(al)});if(await Promise.all(Pa),!te.isFormDataEmpty(Tl)){let al=await M.uploadAmountApi(Tl),hl=(Qe=(De=al==null?void 0:al.data)==null?void 0:De.result)==null?void 0:Qe.map(Ll=>{var Hl,zr,gr,nr,Nl,Jl;return{name:(Jl=(Nl=(nr=(Hl=Ll==null?void 0:Ll.url)==null?void 0:Hl.split("/"))==null?void 0:nr[((gr=(zr=Ll==null?void 0:Ll.url)==null?void 0:zr.split("/"))==null?void 0:gr.length)-1])==null?void 0:Nl.split("."))==null?void 0:Jl[0],url:Ll==null?void 0:Ll.url}});Ga=[...Ga,...hl]}let pl={};for(let al in v)al!=="id"&&(pl[al]=v[al]);pl[rl]=Ga,il.push({id:v==null?void 0:v.id,value:{tableData:pl}})}if((il==null?void 0:il.length)>0){const Ga=il.map(Pa=>{const pl={id:Pa.id,...Pa.value.tableData};return delete pl._isOCRRow,delete pl._ocrTableId,delete pl._isTemp,delete pl.tableEditType,delete pl.index,pl}),Tl=[{tableName:(Na=u==null?void 0:u.related)==null?void 0:Na.find(Pa=>Pa==null?void 0:Pa.includes("content")),tableContents:Ga}];await M.pageBatchUpdateApi({platId:parseInt((tl=xl.value)==null?void 0:tl.plat_id),changeContents:Tl})}if((xa==null?void 0:xa.length)>0)try{await M.pageBatchAddApi({platId:parseInt((Wa=xl.value)==null?void 0:Wa.plat_id),changeContents:[{tableName:(kl=u==null?void 0:u.related)==null?void 0:kl.find(Ga=>Ga==null?void 0:Ga.includes("content")),tableContents:xa.map(Ga=>{var Pa,pl,al;const Tl={id:((Pa=Ga==null?void 0:Ga.key)==null?void 0:Pa.id)??((pl=Ga==null?void 0:Ga.key)==null?void 0:pl.rowId)??(Ga==null?void 0:Ga.id),...((al=Ga==null?void 0:Ga.value)==null?void 0:al.tableData)||{}};return delete Tl._isOCRRow,delete Tl._ocrTableId,delete Tl._isTemp,delete Tl.tableEditType,delete Tl.index,Object.keys(Tl).forEach(hl=>{hl==="证书附件"&&Array.isArray(Tl[hl])&&(Tl[hl]=JSON.stringify(Tl[hl]))}),Tl})}]})}catch(Ga){Ja.ElMessage.error(((ar=(ml=Ga==null?void 0:Ga.response)==null?void 0:ml.data)==null?void 0:ar.message)||(Ga==null?void 0:Ga.message)||"保存失败"),fa.setTableLoading(!1);return}Ui(!0),ce.setImportLoading(!1),fa.setFreshContent(!0)},fo=(p,v)=>(p=p==null?void 0:p.map(N=>{var O,P;return N!=null&&N.children&&((O=N.children)!=null&&O.find(T=>T.id===(v==null?void 0:v.id))?N.children=(P=N.children)==null?void 0:P.filter(T=>(T==null?void 0:T.id)!==(v==null?void 0:v.id)):N.children=fo(N.children,v)),N}),p),ki=e.ref(!1),t=()=>{ki.value=!0},o=async p=>{var N,O,P,T;ki.value=!1;const v=Array.isArray(p)?p:p?[p]:[];if(v.length!==0)for(const oe of v){const ie={name:oe.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(oe),raw:oe,uid:Date.now()+Math.random()};Il.value.push(ie),vr(ie,"uploading"),Wl(ie,0);try{const q=new FormData;q.append("file",oe,ie.name);const xe=await M.platformUploadFile(q);ie.uploadResult=((N=xe==null?void 0:xe.data)==null?void 0:N.result)||{name:ie.name,url:"",fileName:ie.name},Ml({name:((O=ie.uploadResult)==null?void 0:O.name)||ie.name,url:((P=ie.uploadResult)==null?void 0:P.url)||"",id:(T=ie.uploadResult)==null?void 0:T.id}),vr(ie,"uploaded"),Wl(ie,100)}catch(q){console.error("文件上传失败:",q),Ja.ElMessage.error(`文件 ${ie.name} 上传失败,请重试`),vr(ie,"pending"),Wl(ie,0);const xe=Il.value.findIndex(Se=>Se.uid===ie.uid);xe>-1&&Il.value.splice(xe,1)}}},f=e.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:(p,v,N)=>{v===(u==null?void 0:u.index)?N(new Error("选择源不能和目标源一致")):N()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),y=e.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],newRows:[],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:""}),S=()=>{y.show=!1},R=async p=>{var v,N,O,P,T,oe,ie,q;try{const xe=[];let Se=(v=Ae.value||[])==null?void 0:v.slice();(p||[]).forEach(Ba=>{const $a={...Ba};try{$a.sort=ii(0,Se)}catch{}xe.push($a),Se.unshift($a)});let Ge=await M.quoteApi({platId:parseInt((N=xl==null?void 0:xl.value)==null?void 0:N.plat_id),type:"fatherSyncs",related:[{menus:we.value,groups:""},{menus:we.value,groups:u==null?void 0:u.compName}]});Ge=(O=Ge==null?void 0:Ge.data)==null?void 0:O.result;let qe=Ge==null?void 0:Ge.map(Ba=>({tableName:"content_"+(Ba==null?void 0:Ba.id),tableContents:xe==null?void 0:xe.map(($a,Ze)=>({id:Ze,...$a}))})),Xe=[{tableName:(P=u==null?void 0:u.related)==null?void 0:P.find(Ba=>Ba==null?void 0:Ba.includes("content")),tableContents:xe==null?void 0:xe.map((Ba,$a)=>({id:$a,...Ba}))}];Xe=[...Xe,...qe];const ka=await M.pageBatchAddApi({platId:parseInt((T=xl.value)==null?void 0:T.plat_id),changeContents:Xe});if(((oe=ka==null?void 0:ka.data)==null?void 0:oe.code)===200){const Ba={buttonName:"新增",columns:A.value,fixContent:xe==null?void 0:xe.map((Ze,rl)=>({id:rl,...Ze})),relatedContents:u==null?void 0:u.related};await Bt(Ba),Ja.ElMessage.success("数据导入成功");let $a=[];Xe==null||Xe.forEach(Ze=>{var rl;(rl=Ze==null?void 0:Ze.tableContents)==null||rl.forEach(xa=>{$a.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(xa),request_result:"{}",is_delete:!1,request_table:Ze==null?void 0:Ze.tableName,request_type:"export"})})}),await M.pageBatchAddApi({platId:parseInt((ie=xl==null?void 0:xl.value)==null?void 0:ie.plat_id),changeContents:[{tableName:"log",tableContents:$a}]})}else{let Ba=[];Xe==null||Xe.forEach($a=>{var Ze;(Ze=$a==null?void 0:$a.tableContents)==null||Ze.forEach(rl=>{Ba.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(rl),request_result:"{}",is_delete:!1,request_table:$a==null?void 0:$a.tableName,request_type:"error"})})}),await M.pageBatchAddApi({platId:parseInt((q=xl==null?void 0:xl.value)==null?void 0:q.plat_id),changeContents:[{tableName:"log",tableContents:Ba}]}),Ja.ElMessage.error("数据导入响应失败")}}catch(xe){throw new Error(xe)}},Y=async p=>{var v,N,O,P,T,oe,ie,q,xe,Se;try{if(p==="cancel"&&(y.show=!1),p==="replace"&&((v=y==null?void 0:y.existRows)==null?void 0:v.length)>0){await M.pageBatchDeleteApi({platId:parseInt((N=xl.value)==null?void 0:N.plat_id),changeContents:[{tableName:((O=u==null?void 0:u.related)==null?void 0:O.find(qe=>qe==null?void 0:qe.includes("content_")))||((P=u==null?void 0:u.related)==null?void 0:P.find(qe=>qe==null?void 0:qe.includes("content"))),tableContents:y==null?void 0:y.existRows}]});const Ge=await M.pageBatchAddApi({platId:parseInt((T=xl.value)==null?void 0:T.plat_id),changeContents:[{tableName:(oe=u==null?void 0:u.related)==null?void 0:oe.find(qe=>qe==null?void 0:qe.includes("content")),tableContents:(()=>{const qe=(Ae.value||[]).filter($a=>!((y==null?void 0:y.existRows)||[]).some(Ze=>String(Ze==null?void 0:Ze.id)===String($a==null?void 0:$a.id))),Xe=(y==null?void 0:y.tableData)||[],ka=[];let Ba=qe.slice();return Xe.forEach($a=>{const Ze={...$a};try{Ze.sort=ii(0,Ba)}catch{}ka.push(Ze),Ba.unshift(Ze)}),ka.map(($a,Ze)=>({id:Ze,...$a}))})()}]});if(((ie=Ge==null?void 0:Ge.data)==null?void 0:ie.code)!==200)return;(q=y.newRows)!=null&&q.length&&await R(y.newRows),await Bt({buttonName:"新增",columns:A.value,fixContent:(xe=y==null?void 0:y.tableData)==null?void 0:xe.map((qe,Xe)=>({id:Xe,...qe})),relatedContents:u==null?void 0:u.related}),(Se=y.newRows)!=null&&Se.length||Ja.ElMessage.success("数据导入成功")}}catch(Ge){throw new Error(Ge)}finally{y.show=!1,y.columns=[],y.tableData=[],y.existRows=[]}},ae=()=>{f.show=!1},ke=p=>{var v,N;if((p==null?void 0:p.buttonName)==="取消")return f.show=!1;f.to=p==null?void 0:p.content,!(!(u!=null&&u.index)||!((v=f.to)!=null&&v.groupName))&&(u==null?void 0:u.index)!==((N=f.to)==null?void 0:N.groupName)&&(de("change",{buttonName:"迁移",value:{from:f.from,to:f.to,data:f.selectRow}}),f.show=!1)},Ue=async p=>{var v,N,O,P;if(p){if(!br.validateFileSize(p.raw)){Ja.ElMessage.warning(`文件大小不能超过 ${yn.value.maxSize}MB`);const T=Il.value.findIndex(oe=>oe.uid===p.uid);T>-1&&Il.value.splice(T,1),_e();return}if(!br.validateFileType(p.raw)){Ja.ElMessage.warning("请上传图片文件");const T=Il.value.findIndex(oe=>oe.uid===p.uid);T>-1&&Il.value.splice(T,1),_e();return}vr(p,"uploading"),Wl(p,0);try{const T=new FormData;T.append("file",p.raw,p.name);const oe=await M.platformUploadFile(T);p.uploadResult=((v=oe==null?void 0:oe.data)==null?void 0:v.result)||{name:p.name,url:"",fileName:p.name},Ml({name:((N=p.uploadResult)==null?void 0:N.name)||p.name,url:((O=p.uploadResult)==null?void 0:O.url)||"",id:(P=p.uploadResult)==null?void 0:P.id}),vr(p,"uploaded"),Wl(p,100)}catch(T){console.error("文件上传失败:",T),Ja.ElMessage.error(`文件 ${p.name} 上传失败,请重试`),vr(p,"pending"),Wl(p,0);const oe=Il.value.findIndex(ie=>ie.uid===p.uid);oe>-1&&Il.value.splice(oe,1)}finally{_e()}}},_e=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');p&&(p.value="")})},la=async()=>{var N,O;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),Il.value.length===0){Ja.ElMessage.warning("请先选择要上传的图片");return}if(Il.value.filter(P=>{const T=jl(P);return T!=="uploaded"&&T!=="completed"&&T!=="failed"}).length>0){Ja.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ql.value=!0,za.value=0;let v=null;try{Il.value.forEach(Ze=>{vr(Ze,"processing")});const P=Math.floor(Math.random()*10)+90;v=setInterval(()=>{za.value<P?za.value+=1:clearInterval(v)},50);const T=Il.value.map(Ze=>{var rl,xa,il;return{name:((rl=Ze.uploadResult)==null?void 0:rl.name)||Ze.name,url:((xa=Ze.uploadResult)==null?void 0:xa.url)||"",fileName:((il=Ze.uploadResult)==null?void 0:il.fileName)||Ze.name}}),oe=br.extractTableHeaders(A.value),ie=T.map(Ze=>({name:(Ze==null?void 0:Ze.fileName)||(Ze==null?void 0:Ze.name),url:(Ze==null?void 0:Ze.url)||""})),q=await br.recognize(ie,oe);if(console.log(q,"ocrResult"),clearInterval(v),v=null,(q==null?void 0:q.code)===500||(q==null?void 0:q.type)==="error"||!(q!=null&&q.result)){za.value=0,Il.value.forEach(Ze=>{vr(Ze,"failed"),Wl(Ze,0)}),Ja.ElMessage.error((q==null?void 0:q.message)||"OCR识别失败,请重试"),ql.value=!1;return}za.value=P;const xe=Array.isArray(q==null?void 0:q.result)?q.result:[];if(xe.length===0){za.value=0,Il.value.forEach(Ze=>{vr(Ze,"failed"),Wl(Ze,0)}),Ja.ElMessage.warning("OCR识别未返回有效数据"),ql.value=!1;return}const Se=new Set,Ge=[];xe.forEach((Ze,rl)=>{const xa=Ze!=null&&Ze.数据&&typeof(Ze==null?void 0:Ze.数据)=="object"?Ze.数据:{},il=Array.isArray(Ze==null?void 0:Ze.图片信息)?Ze.图片信息:[],ye=new Map;il.forEach(ya=>{ya!=null&&ya.name&&ye.set(ya.name,ya.url||"")});const Fa={_index:rl,_certType:(Ze==null?void 0:Ze.证书类型)||"",_certNo:(Ze==null?void 0:Ze.证书编号)||"",_ocrImages:il,__ocrFieldMeta:{}};Object.entries(xa).forEach(([ya,Ka])=>{let Oa="",D=0,K=[],Pe="";Ka&&typeof Ka=="object"&&!Array.isArray(Ka)?(Oa=(Ka==null?void 0:Ka.value)??"",D=(Ka==null?void 0:Ka.score)??0,K=Array.isArray(Ka==null?void 0:Ka.bboxNorm)?Ka==null?void 0:Ka.bboxNorm:[],Pe=(Ka==null?void 0:Ka.imageName)||""):Array.isArray(Ka)&&Ka.length>=2?(Oa=Ka[0]??"",D=Ka[1]??0):(Oa=Ka??"",D=0),Fa[ya]=Oa,Fa[`${ya}_accuracy`]=D,Se.add(ya),Fa.__ocrFieldMeta[ya]={value:Oa,score:D,bboxNorm:K,imageName:Pe,imageUrl:Pe&&ye.get(Pe)||"",images:il}}),Ge.push(Fa)});const qe=[],Xe=new Set;Ge.forEach(Ze=>{Ze&&Se.forEach(rl=>{const xa=Ze[`${rl}_accuracy`];(typeof xa=="number"?xa>0:xa!=null&&String(xa).trim()!==""&&String(xa)!=="0")&&Xe.add(rl)})}),Se.forEach(Ze=>{qe.push({prop:Ze,label:Ze,editable:!0,minWidth:230}),Xe.has(Ze)&&qe.push({prop:`${Ze}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),Il.value.forEach(Ze=>{vr(Ze,"completed")}),za.value=100,Dl.value=qe,Ha.value=Ge,ja.value=T,Ee.value=q;const ka=["出厂编号","设备名称","制造厂"],Ba=qe.filter(Ze=>Ze&&!Ze.isAccuracy&&typeof Ze.prop=="string").map(Ze=>Ze.prop),$a=["出厂编号","设备名称","制造厂"];Ma.value=Ba.filter(Ze=>$a.includes(Ze)),console.log("[OCR] 默认勾选字段 props:",Ma.value),Ra.value=2,ql.value=!1,da.value=!1}catch(P){console.error("OCR处理失败:",P),v&&(clearInterval(v),v=null),Ja.ElMessage.error(((O=(N=P==null?void 0:P.response)==null?void 0:N.data)==null?void 0:O.message)||"OCR识别失败,请重试"),ql.value=!1,za.value=0,Il.value.forEach(T=>{vr(T,"pending"),Wl(T,0)})}},Da=p=>{if(p==null)return"";let v=String(p);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,N=>String.fromCharCode(N.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},ll=()=>{var Ze,rl;const p=ja.value,v=Ee.value,N=Ha.value;if(!N||N.length===0){Ja.ElMessage.warning("暂无数据可添加");return}const O=(Ze=te.getAllLeafNodes(A.value)||[])==null?void 0:Ze.filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),P=new Map,T=new Map,oe=(rl=O==null?void 0:O.find(xa=>(xa==null?void 0:xa.label)==="证书附件"))==null?void 0:rl.prop;O==null||O.forEach(xa=>{xa!=null&&xa.label&&(xa!=null&&xa.prop)&&(P.set(xa.label,xa.prop),T.set(xa.prop,xa.label))});const ie=Date.now(),q=xa=>String(ie*1e3+xa),xe=[],Se=[],Ge=xa=>{const il=Mo&&Mo[xa]||[xa];for(const ye of il){const Fa=P.get(ye);if(Fa)return Fa}return""},qe=Ge("出厂编号"),Xe=Ge("设备名称"),ka=Ge("制造厂"),Ba=[],$a=xa=>{var Oa,D;if(!oe)return[];const il=(Array.isArray(p)?p[xa]:null)||null,ye=(il==null?void 0:il.url)||"",Fa=(il==null?void 0:il.fileName)||(il==null?void 0:il.name)||"";return(String(Fa).toLowerCase().endsWith(".pdf")||String(ye).toLowerCase().endsWith(".pdf"))&&ye?[{url:ye,name:Fa,fileName:Fa}]:(Array.isArray((D=(Oa=v==null?void 0:v.result)==null?void 0:Oa[xa])==null?void 0:D.图片信息)?v.result[xa].图片信息:[]).map(K=>({url:(K==null?void 0:K.url)||"",name:(K==null?void 0:K.name)||"",fileName:(K==null?void 0:K.name)||""})).filter(K=>K.url)};if(N.forEach((xa,il)=>{var tl;const ye={id:q(il),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[Wa,kl]of P.entries())Object.prototype.hasOwnProperty.call(xa,Wa)&&(ye[kl]=xa[Wa]);oe&&(ye[oe]=$a(il));const Fa=(Array.isArray(v==null?void 0:v.result)?v.result[il]:null)||null,ya=(Array.isArray(p)?p[il]:null)||null,Ka=(ya==null?void 0:ya.url)||"",Oa=(ya==null?void 0:ya.fileName)||(ya==null?void 0:ya.name)||"",D=String(Oa).toLowerCase().endsWith(".pdf")||String(Ka).toLowerCase().endsWith(".pdf"),K={ts:Date.now(),versionId:String(Date.now())+"_"+String(il),label:new Date().toLocaleString(),certType:(Fa==null?void 0:Fa.证书类型)||"",certNo:(Fa==null?void 0:Fa.证书编号)||"",fileType:D?"pdf":"image",sourceUrl:D?Ka:"",images:Array.isArray(Fa==null?void 0:Fa.图片信息)?Fa.图片信息.map(Wa=>({name:(Wa==null?void 0:Wa.name)||"",url:(Wa==null?void 0:Wa.url)||""})).filter(Wa=>Wa.url):[]},Pe=Wa=>Da(Wa?ye==null?void 0:ye[Wa]:""),ea=Pe(qe),De=Pe(Xe),Qe=Pe(ka);if(!!(qe&&Xe&&ka&&ea&&De&&Qe)){const Wa=(Ae.value||[]).find(kl=>{const ml=Da(qe?kl==null?void 0:kl[qe]:""),ar=Da(Xe?kl==null?void 0:kl[Xe]:""),Ga=Da(ka?kl==null?void 0:kl[ka]:"");return ml&&ar&&Ga&&ml===ea&&ar===De&&Ga===Qe});if(Wa){Ba.push({idx:il,ocrRow:ye,versionItem:K,ocrNo:ea,candidates:[Wa],selectedTargetId:String((Wa==null?void 0:Wa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(ea&&qe){const Wa=(Ae.value||[]).filter(kl=>{const ml=Da(qe?kl==null?void 0:kl[qe]:"");return ml&&ml===ea});if(Wa.length>0){Ba.push({idx:il,ocrRow:ye,versionItem:K,ocrNo:ea,candidates:Wa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ye.sort===void 0||ye.sort===null||String(ye.sort).trim()===""){const Wa=(Ae.value||[]).map(ml=>ni(ml==null?void 0:ml.sort)).filter(ml=>ml!==null),kl=Wa.length>0?Math.max(...Wa):((tl=Ae.value)==null?void 0:tl.length)??0;ye.sort=String(Number((kl+1).toFixed(6)))}}catch{}Qa(u==null?void 0:u.index,ye.id,K),Ba.push({idx:il,ocrRow:ye,versionItem:K,ocrNo:ea,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Ba||[]).length>0){wa.value=(Ba||[]).map(xa=>({...xa,selectedTargetId:(xa==null?void 0:xa.selectedTargetId)||""})),oa.value=!0,ga.value=Se,ol.value=xe,Fe.value=v,gl.value=p,Ne.value=oe||"";return}},el=(p,v,N)=>{Ha.value[p]&&(Ha.value[p][v]=N)},cl=p=>p==null||p===0?"-":`${(Number(p)*100).toFixed(1)}%`,Bl=p=>{if(p==null||p===0)return"#909399";const v=Number(p);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},Sl=p=>{var N,O,P,T;if(Ya.value===p){Ya.value=null,wl.value=!1,vl.value="";return}Ya.value=p,vl.value="";const v=(N=Ha.value)==null?void 0:N[p];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){Ie.value=v._ocrImages.map(q=>({name:(q==null?void 0:q.name)||"",url:(q==null?void 0:q.url)||""})).filter(q=>q.name||q.url);const oe=v.__ocrFieldMeta||{},ie=(O=Object.values(oe))==null?void 0:O.find(q=>q==null?void 0:q.imageName);ba.value=(ie==null?void 0:ie.imageName)||((T=(P=Ie.value)==null?void 0:P[0])==null?void 0:T.name)||"",wl.value=Ie.value.length>0}else Ie.value=[],wl.value=!1,ba.value=""},Fl=()=>{Ua.value=!1,Il.value=[],lr.value=null,Ra.value=1,nl.value.clear(),va.value.clear(),za.value=0,wl.value=!1},Zl=p=>p.raw?URL.createObjectURL(p.raw):p.url?p.url:"",jl=p=>{const v=p.uid||p.name;return nl.value.get(v)||"pending"},Gl=p=>{const v=p.uid||p.name;return va.value.get(v)||0},Wl=(p,v)=>{const N=p.uid||p.name;va.value.set(N,Math.min(100,Math.max(0,v)))},on=p=>{const v=jl(p),N=100.53;if(v==="completed"||v==="uploaded")return`${N} ${N}`;if(v==="failed")return`${N} ${N}`;if(v==="uploading"){const O=Gl(p);return`${N*(O/100)} ${N}`}else if(v==="processing")return`${N*.5} ${N}`;return`0 ${N}`},vr=(p,v)=>{const N=p.uid||p.name;nl.value.set(N,v),(v==="completed"||v==="uploaded")&&Wl(p,100)},dn=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');if(p)p.value="",p.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 N=>{const O=Array.from(N.target.files||[]);for(const P of O){const T={name:P.name,raw:P,uid:Date.now()+Math.random()};Il.value.push(T),await Ue(T)}N.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},xn=()=>{Ra.value>1&&Ra.value--},Bn=()=>{Ra.value===1?Il.value.length>0&&!ql.value&&la():Ra.value===2&&(ll(),Ra.value=3)},xi=async p=>{await Lt(p==null?void 0:p.row)},ti=async({row:p,prop:v})=>{!p||!v||await Lt(p,v)},Lt=async(p,v)=>{var P,T;const N=p==null?void 0:p.id;if(!N){Ja.ElMessage.warning("暂无可预览数据");return}let O=Al(u==null?void 0:u.index,N);if(!O||O.length===0){const oe=sessionStorage.getItem("ocr_root_table_id"),ie=oe!==null?Number(oe):null;if(ie!=null&&ie!==""&&!Number.isNaN(ie)){const q=Al(ie,N);Array.isArray(q)&&q.length>0&&(er(u==null?void 0:u.index,N,q),O=q)}}if(!O||O.length===0){const oe=(P=te.getAllLeafNodes(A.value)||[])==null?void 0:P.filter(q=>(q==null?void 0:q.type)!=="operate"&&(q==null?void 0:q.label)!=="操作"&&(q==null?void 0:q.prop)!=="operate"),ie=v||((T=oe==null?void 0:oe.find(q=>(q==null?void 0:q.label)==="证书附件"))==null?void 0:T.prop);if(ie&&p[ie]){const q=p[ie];let xe=[],Se="",Ge=!1;if(typeof q=="string")try{const qe=JSON.parse(q);Array.isArray(qe)&&(xe=qe.map(Xe=>({name:(Xe==null?void 0:Xe.name)||(Xe==null?void 0:Xe.fileName)||"",url:(Xe==null?void 0:Xe.url)||""})).filter(Xe=>Xe.url||Xe.name),xe.length>0&&(Se=xe[0].url||"",Ge=String(xe[0].name).toLowerCase().endsWith(".pdf")||String(Se).toLowerCase().endsWith(".pdf")))}catch{Se=q,Ge=String(q).toLowerCase().endsWith(".pdf"),xe=[{name:q,url:q}]}else Array.isArray(q)&&(xe=q.map(qe=>({name:(qe==null?void 0:qe.name)||(qe==null?void 0:qe.fileName)||"",url:(qe==null?void 0:qe.url)||""})).filter(qe=>qe.url||qe.name),xe.length>0&&(Se=xe[0].url||"",Ge=String(xe[0].name).toLowerCase().endsWith(".pdf")||String(Se).toLowerCase().endsWith(".pdf")));if(xe.length>0||Se){const qe={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:p.证书类型||"",certNo:p.证书编号||"",fileType:Ge?"pdf":"image",sourceUrl:Ge?Se:"",images:xe};O=[qe],Qa(u==null?void 0:u.index,N,qe)}}}if(!O||O.length===0){Ja.ElMessage.warning("暂无可预览数据");return}xr.value=O,_l.value=!0},uu=p=>{Il.value=Il.value.filter((v,N)=>N!==p)},ct=async(p,v,N)=>{var O,P,T,oe,ie,q,xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze,rl,xa,il,ye,Fa,ya,Ka;if(_a(u.config,{type:He.TABLE,tableOperate:p})){if(Aa.value="",Va.value=!0,ua.value=!0,de("onButtonClick",p,v),le.value=[],p==="删除")M.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Oa,D,K,Pe;(Oa=Ae.value)!=null&&Oa.find(ea=>(ea==null?void 0:ea.id)===(v==null?void 0:v.id))?Ae.value=(D=M.cloneDeep(Ae.value))==null?void 0:D.filter(ea=>(ea==null?void 0:ea.id)!==(v==null?void 0:v.id)):Ae.value=fo(M.cloneDeep(Ae.value),v);try{v!=null&&v.id&&((Pe=(K=La.value)==null?void 0:K.has)!=null&&Pe.call(K,v==null?void 0:v.id))&&La.value.delete(v.id)}catch{}jf(Ur.value,Kr.value,v==null?void 0:v.id),fa.setTableLoading(u==null?void 0:u.index),de("change",{content:Ae.value,fixContent:[v],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:p,columns:A.value,relatedContents:u==null?void 0:u.related}),console.log(v,"item")});else if(p==="批量删除"){if(((O=Xl.value)==null?void 0:O.length)===0)return Ja.ElMessage.warning("请先勾选操作的数据");M.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var K,Pe,ea,De,Qe;const Oa=(K=Xl.value)==null?void 0:K.map(Na=>Na.id);Ae.value=(Pe=M.cloneDeep(Ae.value))==null?void 0:Pe.filter(Na=>!(Oa!=null&&Oa.includes(Na.id))),fa.setTableLoading(u==null?void 0:u.index),de("change",{content:Ae.value,fixContent:Xl.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:p,relatedContents:u==null?void 0:u.related,columns:A.value});const D=(Oa||[]).filter(Boolean);if(D.length>0&&D.every(Na=>Na!=null&&Na!=="")){const Na=(Xl.value||[]).map(tl=>{const Wa={...tl};return delete Wa._isOCRRow,delete Wa._ocrTableId,delete Wa._isTemp,delete Wa.tableEditType,delete Wa.index,Wa});await M.pageBatchDeleteApi({platId:parseInt((ea=xl.value)==null?void 0:ea.plat_id),changeContents:[{tableName:((De=u==null?void 0:u.related)==null?void 0:De.find(tl=>tl==null?void 0:tl.includes("content_")))||((Qe=u==null?void 0:u.related)==null?void 0:Qe.find(tl=>tl==null?void 0:tl.includes("content"))),tableContents:Na}]})}})}else if(p==="复制新增"){ma.value="复制新增",M.cloneDeep(v);const Oa=(P=A.value)==null?void 0:P.find(D=>D==null?void 0:D.isMainKey);Oa||((T=A.value)==null||T[0]),Pl.value=v,Ui(!0)}else if(p==="新增")ma.value="新增",ji(""),Je.value=!0;else if(p==="编辑")ma.value="编辑",ji(v),Je.value=!0;else if(p==="查看")ma.value="查看",ji(v),Va.value=!1,ua.value=!1,Je.value=!0;else if(p==="查看三维模型"){const Oa={};for(let K in v)K!=="id"&&(Oa[K]=v[K]);let D=(oe=Object.values(Oa))==null?void 0:oe[1];Ke.setTableShowThree(D)}else if(p==="切换视图")_u();else if(((ie=N==null?void 0:N.extra)==null?void 0:ie.type)==="modelExample")ma.value=p,je.value=!0;else if(p==="新建"){let Oa=pe.value,D=[];for(let Qe in Oa)Qe!=null&&Qe.includes(`loading${((q=xl.value)==null?void 0:q.account)||((xe=xl.value)==null?void 0:xe.账号)}`)&&(D=[...D,...Qe]);let K=[];for(let Qe in Oa)Qe!=null&&Qe.includes(`updateLoading${((Se=xl.value)==null?void 0:Se.account)||((Ge=xl.value)==null?void 0:Ge.账号)}`)&&(K=[...K,...Qe]);let Pe=D==null?void 0:D.map(Qe=>Qe==null?void 0:Qe.id);const ea=K==null?void 0:K.map(Qe=>Qe==null?void 0:Qe.id);Pe=[...M.cloneDeep(Pe),...ea],(Pe==null?void 0:Pe.length)>0&&(Pe!=null&&Pe.every(Qe=>Qe!==null&&Qe))&&await Fr.batchDeleteInsofDataApi({ids:Pe});const De=(qe=Le.value)==null?void 0:qe.find(Qe=>(Qe==null?void 0:Qe.label)==="新建");await fu(!1,De)}else if(p==="修改模板"){let Oa=M.cloneDeep(we).value;fa.setRouteToChildPath(Oa),ce.setActiveMenuPath(Oa+E)}else if(p==="执行")st(p,v);else if(p==="导出paraform"){const Oa=M.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const D=["推力","真空","压力","温度","流量"],K=Nl=>{var Jl,cr,Ol;return Nl?typeof(Nl==null?void 0:Nl.value)=="string"?Nl.value:((Ol=(cr=(Jl=Nl==null?void 0:Nl._custom)==null?void 0:Jl.value)==null?void 0:cr.value)==null?void 0:Ol.value)||"":""},Pe=Array.isArray(or.value)?or.value:[],ea=K(Pe.find(Nl=>(Nl==null?void 0:Nl.condition)==="child")),De=String(ea||"").slice(0,8),Qe=Nl=>{if(Nl==null)return"";const Jl=String(Nl).trim();if(!Jl)return"";if(/^\d{8}$/.test(Jl))return Jl;const cr=Jl.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(cr){const ur=cr[1],kr=cr[2].padStart(2,"0"),dr=cr[3].padStart(2,"0");return`${ur}${kr}${dr}`}const Ol=Jl.replace(/\D/g,"");return Ol.length>=8?Ol.slice(0,8):""},Na=async Nl=>{var Jl,cr;if(!Nl)return"";try{const Ol=await Gr("试验任务/任务管理",!1),ur=(tr,Br=[])=>{if(!Array.isArray(tr))return Br;for(const Ir of tr)(Ir==null?void 0:Ir.comp)==="Table"&&(Ir!=null&&Ir.name)&&Br.push(Ir),Array.isArray(Ir==null?void 0:Ir.children)&&ur(Ir.children,Br),Array.isArray(Ir==null?void 0:Ir.tab)&&ur(Ir.tab,Br),Array.isArray(Ir==null?void 0:Ir.choice)&&ur(Ir.choice,Br);return Br},dr=ur(Ol||[]).find(tr=>(tr==null?void 0:tr.name)==="任务列表"),Cr=((cr=(Jl=dr==null?void 0:dr.compData)==null?void 0:Jl.find(tr=>(tr==null?void 0:tr.key)==="tableContents"))==null?void 0:cr.contents)||[];if(!Array.isArray(Cr)||Cr.length===0)return"";const an=Cr.find(tr=>String((tr==null?void 0:tr["试验代号(名称)"])||"").slice(0,8)===Nl);return Qe(an==null?void 0:an.计划试验时间)}catch(Ol){return console.warn("获取任务列表计划试验时间失败:",Ol),""}},tl=(we.value||"").replace(/\/+$/,""),Wa=ea?`${tl}/${ea}`:tl,kl=await Gr(Wa||we.value,!1),ml=String(ia.value||"").trim(),ar=Nl=>String(Nl||"").trim(),Ga=(Nl,Jl=[],cr="")=>{if(!Array.isArray(Nl))return Jl;for(const Ol of Nl){const ur=ar((Ol==null?void 0:Ol.choiceName)||(Ol==null?void 0:Ol.name0)||cr);(Ol==null?void 0:Ol.comp)==="Table"&&(Ol==null?void 0:Ol.name)&&D.includes(Ol.name)&&(!ml||ur===ml)&&Jl.push(Ol),Array.isArray(Ol==null?void 0:Ol.children)&&Ga(Ol.children,Jl,ur),Array.isArray(Ol==null?void 0:Ol.tab)&&Ga(Ol.tab,Jl,ur),Array.isArray(Ol==null?void 0:Ol.choice)&&Ga(Ol.choice,Jl,ur)}return Jl},Tl=Ga(kl||[]),Pa=new Map;for(const Nl of Tl)Nl!=null&&Nl.name&&!Pa.has(Nl.name)&&Pa.set(Nl.name,Nl);const pl=D.map(Nl=>Pa.get(Nl)).filter(Boolean);if(!pl||pl.length===0)return Ja.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const al=Nl=>{const Jl=new Map,cr=(Ol,ur=[])=>{if(Array.isArray(Ol))for(const kr of Ol){const dr=((kr==null?void 0:kr.label)??"").toString().trim(),Cr=dr?[...ur,dr]:[...ur];if(Array.isArray(kr==null?void 0:kr.children)&&kr.children.length>0)cr(kr.children,Cr);else{const tr=((kr==null?void 0:kr.prop)??"").toString();if(!tr)continue;const Br=dr||tr,Ir=(Cr.length>0?[...ur,Br]:[Br]).join(".");Jl.set(tr,Ir)}}};return cr(Nl,[]),Jl},hl=(Nl,Jl)=>{const cr=al(Nl||[]),ur=(te.getAllLeafNodes(Nl||[])||[]).filter(dr=>(dr==null?void 0:dr.prop)&&(dr==null?void 0:dr.type)!=="operate"&&(dr==null?void 0:dr.label)!=="操作"&&(dr==null?void 0:dr.prop)!=="operate"),kr=Array.isArray(Jl)?Jl:[];return kr.length===0?[]:kr.map(dr=>{const Cr={};return ur.forEach(an=>{const tr=String(an.prop),Br=cr.get(tr)||String(an.label||an.prop);Cr[Br]=(dr==null?void 0:dr[tr])??""}),Cr})},Ll=pl.map(Nl=>{var kr,dr;const Jl=(Nl==null?void 0:Nl.compData)||[];let cr=(kr=Jl==null?void 0:Jl.find(Cr=>(Cr==null?void 0:Cr.key)==="header"))==null?void 0:kr.contents;Array.isArray(cr==null?void 0:cr[0])&&(cr=cr[0]);const Ol=((dr=Jl==null?void 0:Jl.find(Cr=>(Cr==null?void 0:Cr.key)==="tableContents"))==null?void 0:dr.contents)||[];if(!Array.isArray(cr)||cr.length===0||!Array.isArray(Ol)||Ol.length===0)return null;const ur=hl(cr||[],Ol||[]);return!Array.isArray(ur)||ur.length===0?null:{类型:Nl==null?void 0:Nl.name,数据:ur}}).filter(Boolean);if(!Ll||Ll.length===0)return Ja.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const Hl=await Na(De),zr={试验代号:De,试验日期:Hl,ParaForm:Ll},gr=await bi().catch(()=>""),nr=await M.exportParaformApi(zr,gr);if(((Xe=nr==null?void 0:nr.data)==null?void 0:Xe.code)===200&&((Ba=(ka=nr==null?void 0:nr.data)==null?void 0:ka.result)!=null&&Ba.Excel文件)){const Nl=nr.data.result.Excel文件,Jl=await M.platformDownloadFile({url:Nl}),cr=new Blob([Jl.data],{type:"application/vnd.ms-excel"}),Ol=URL.createObjectURL(cr),ur=M.dayjs().format("YYYYMMDD"),dr=`${(De||"UNKNOWN").trim()||"UNKNOWN"}_${ur}_paraform.xls`,Cr=document.createElement("a");Cr.href=Ol,Cr.download=dr,Cr.style.display="none",document.body.appendChild(Cr),Cr.click(),setTimeout(()=>{document.body.removeChild(Cr),URL.revokeObjectURL(Ol)},100);const an=Array.isArray((Ze=($a=nr==null?void 0:nr.data)==null?void 0:$a.result)==null?void 0:Ze.warnings)?nr.data.result.warnings:[];if(an.length>0){const tr=an.map((Br,Ir)=>`${Ir+1}. ${(Br==null?void 0:Br.field)||"未知字段"}:${(Br==null?void 0:Br.message)||""}`).join(`
24
+ `);Ja.ElMessage.warning({message:`导出成功,但存在以下提示:
25
+ ${tr}`,duration:5e3,showClose:!0})}else Ja.ElMessage.success("导出成功")}else Ja.ElMessage.error(((rl=nr==null?void 0:nr.data)==null?void 0:rl.message)||"导出失败")}catch(D){console.error("导出paraform失败:",D),Ja.ElMessage.error("导出失败:"+((D==null?void 0:D.message)||"未知错误"))}finally{Oa.close()}}else if(p!=null&&p.includes("导出")&&p!=="导出paraform"){if(p==="导出选中"&&((xa=Xl.value)==null?void 0:xa.length)===0)return Ja.ElMessage.warning(`请先勾选${p}的数据`);if(p==="导出全部"&&((il=Ae.value)==null?void 0:il.length)===0)return Ja.ElMessage.warning("暂无数据导出");let Oa=["序号",...(Fa=(ye=A.value)==null?void 0:ye.map(ea=>ea==null?void 0:ea.prop))==null?void 0:Fa.filter(ea=>ea!=="操作")],D=p==="导出全部"?Ae.value:Xl.value;const K=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];D=D==null?void 0:D.map(ea=>Object.fromEntries(Object.entries(ea).filter(([De])=>!K.includes(De)))),Oa=["序号",...Oa],D=D==null?void 0:D.map((ea,De)=>({序号:De+1,...ea}));let Pe=(u==null?void 0:u.compName)||"表格信息";Ko(D,Pe,Oa,Pe)}else if(p==="OCR识别")Ua.value=!0,Il.value=[],Ra.value=1,nl.value.clear(),va.value.clear(),za.value=0;else if(p==="迁移")f.selectRow=v,f.show=!0;else if(p==="生成方法"){let Oa=await o0(v),D;v!==""?D=[v]:D=M.cloneDeep(Ae.value),D=D==null?void 0:D.map(Pe=>(Pe.输出值=Oa,Pe));const K={fixContent:D,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:A.value,name:u==null?void 0:u.groupNames};de("change",K)}else if(((ya=N==null?void 0:N.extra)==null?void 0:ya.type)==="methodButton"){let Oa;v!==""?Oa=[v]:Oa=M.cloneDeep(Ae.value);const D=await _t(Oa,A==null?void 0:A.value,"Manual",Ae.value,u==null?void 0:u.calculator);let K;(Ka=D==null?void 0:D[0])!=null&&Ka.menuPathContent?K={fixContent:D,buttonName:"新增",relatedContents:u==null?void 0:u.related,columns:A.value,name:u==null?void 0:u.groupNames}:K={fixContent:D,buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:A.value,name:u==null?void 0:u.groupNames},de("change",K)}}},du=async(p,v)=>{var N,O,P,T,oe,ie,q,xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze,rl,xa,il,ye;try{let Fa,ya;const Ka=(N=pe.value[we.value+E])==null?void 0:N.filter(Na=>{var tl;return((tl=Na==null?void 0:Na.key)==null?void 0:tl.type)==="structureMethod"}),Oa=(O=pe.value[we.value+E])==null?void 0:O.filter(Na=>{var tl;return((tl=Na==null?void 0:Na.key)==null?void 0:tl.type)==="structure"}),D=Ka==null?void 0:Ka.find(Na=>{var tl,Wa;return((Wa=(tl=Na==null?void 0:Na.value)==null?void 0:tl.pageData)==null?void 0:Wa.method)==="保存"});if(!D)return;const K=(ie=(oe=pe.value[(T=(P=D==null?void 0:D.value)==null?void 0:P.pageData)==null?void 0:T.path])==null?void 0:oe.filter(Na=>{var tl;return((tl=Na==null?void 0:Na.key)==null?void 0:tl.type)==="data"}))==null?void 0:ie.find(Na=>{var tl,Wa,kl,ml;return((Wa=(tl=Na==null?void 0:Na.value)==null?void 0:tl.tableData)==null?void 0:Wa.算法名称)===((ml=(kl=D==null?void 0:D.value)==null?void 0:kl.pageData)==null?void 0:ml.method)});if(!K)return;const Pe={buttonName:(xe=(q=D==null?void 0:D.value)==null?void 0:q.pageData)==null?void 0:xe.method,api:(Ge=(Se=K==null?void 0:K.value)==null?void 0:Se.tableData)==null?void 0:Ge.算法体,content:Oa==null?void 0:Oa.map(Na=>{var tl;return(tl=Na==null?void 0:Na.value)==null?void 0:tl.pageData}),extraContent:[],extraValues:(Xe=(qe=D==null?void 0:D.value)==null?void 0:qe.pageData)==null?void 0:Xe.data,methodName:(Ba=(ka=D==null?void 0:D.value)==null?void 0:ka.pageData)==null?void 0:Ba.path};if(!p)return;const ea={...p,compData:($a=p==null?void 0:p.compData)==null?void 0:$a.map(Na=>{var tl;return(Na==null?void 0:Na.key)==="formContent"?{...Na,contents:(tl=Na==null?void 0:Na.contents)==null?void 0:tl.map(Wa=>(Wa==null?void 0:Wa.prop)===v?{...Wa,value:""}:Wa)}:Na})},De={key:{pageKey:we.value+E,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ea}},Qe=await Ja.axios.post(Pe.api,De,{headers:{"Content-Type":"application/json"}});return((Ze=Qe==null?void 0:Qe.data)==null?void 0:Ze.code)===200&&(Fa=(xa=(rl=Qe==null?void 0:Qe.data)==null?void 0:rl.result)==null?void 0:xa.latestReportCode,ya=(ye=(il=Qe==null?void 0:Qe.data)==null?void 0:il.result)==null?void 0:ye.status),{newMainKeyValue:Fa,newStatus:ya}}catch(Fa){throw Ja.ElMessage.error(Fa),new Error(Fa)}},Rt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const pu=async(p,v,N)=>{var q,xe;let O=p==null?void 0:p[v==null?void 0:v.prop],P=1,T,oe;const ie=M.cloneDeep(we).value+E+O;if(ie){Rt.value="",T=(q=pe.value[ie])==null?void 0:q.filter(qe=>{var Xe;return((Xe=qe==null?void 0:qe.key)==null?void 0:Xe.type)==="structure"});const Se=T==null?void 0:T.find(qe=>{var Xe,ka,Ba;return((Ba=(ka=(Xe=qe==null?void 0:qe.value)==null?void 0:Xe.pageData)==null?void 0:ka.comp)==null?void 0:Ba.toUpperCase())==="FORM"});oe={...(xe=Se==null?void 0:Se.value)==null?void 0:xe.pageData,id:Se==null?void 0:Se.id};const Ge=await du(oe,v==null?void 0:v.prop);if(Rt.value=Ge==null?void 0:Ge.newStatus,Ge!=null&&Ge.newMainKeyValue)return Ge==null?void 0:Ge.newMainKeyValue}if(Ae.value.some(Se=>(Se==null?void 0:Se[v==null?void 0:v.prop])===O)){const Se=O;for(;Ae.value.some(Ge=>(Ge==null?void 0:Ge[v==null?void 0:v.prop])===`${Se}(${P})`);)P++;O=`${Se}(${P})`}return O},fu=async(p,v,N)=>{var T,oe,ie,q;let O,P;if(await pu(N==null?void 0:N.data,N==null?void 0:N.firstCol),O=M.cloneDeep(we).value+E,P=M.cloneDeep(O)+`loading${((T=xl.value)==null?void 0:T.account)||((oe=xl.value)==null?void 0:oe.账号)}`,v){const xe=(q=(ie=pe.value[P])==null?void 0:ie.filter(Se=>{var Ge;return((Ge=Se==null?void 0:Se.key)==null?void 0:Ge.parentTable)===""}))==null?void 0:q.map(Se=>{var Ge;return{id:Se==null?void 0:Se.id,...(Ge=Se==null?void 0:Se.value)==null?void 0:Ge.pageData}});(xe==null?void 0:xe.length)>0||await te.loadingConstruct(O,P,null,null,null),fa.setRouteToChildPath(M.cloneDeep(we).value),ce.setActiveMenuPath(P)}else fa.setRouteToChildPath(M.cloneDeep(we).value),ce.setActiveMenuPath(P)},hu=()=>{$e.value=!1,Re.value=[],ue.value=!1},ji=p=>{var T,oe,ie,q,xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze,rl,xa,il,ye,Fa,ya,Ka,Oa;const v=[];fe.value=M.cloneDeep(A.value),(oe=te.getColumnChild((T=M.cloneDeep(A.value))==null?void 0:T.filter(D=>(D==null?void 0:D.label)!=="操作")))==null||oe.forEach((D,K)=>{var Pe,ea,De;D!=null&&D.formType&&((Pe=D==null?void 0:D.formType)==null?void 0:Pe.toUpperCase())==="SELECT"||D!=null&&D.menuId?v.push({label:(ea=D==null?void 0:D.prop)!=null&&ea.includes(".")?D==null?void 0:D.prop:(D==null?void 0:D.label)??(D==null?void 0:D.prop)??"",name:(D==null?void 0:D.prop)??"t"+K,prop:D==null?void 0:D.prop,type:"Select",value:(p==null?void 0:p[D==null?void 0:D.prop])??(D==null?void 0:D.value)??"",id:(D==null?void 0:D.id)??K,contents:(D==null?void 0:D.options)??[],multiple:(D==null?void 0:D.multiple)??!1,multipleLimit:D==null?void 0:D.multipleLimit,width:1,isFormColHidden:D==null?void 0:D.isFormColHidden,relatedValueId:D==null?void 0:D.relatedValueId,disabled:D==null?void 0:D.disabled,menus:D==null?void 0:D.menus,groups:D==null?void 0:D.groups,words:D==null?void 0:D.words,allSelectionContents:(D==null?void 0:D.allSelectionContents)??[],filterContent:D==null?void 0:D.filterContent,disabled:(D==null?void 0:D.prop)==="disabled"?!0:D==null?void 0:D.disabled,filter:D==null?void 0:D.filter,bindMenus:D==null?void 0:D.bindMenus,isMainPath:D==null?void 0:D.isMainPath,required:(D==null?void 0:D.required)??!1,relatedContents:D==null?void 0:D.relatedContents,mainKey:D==null?void 0:D.mainKey,relatedContents:D==null?void 0:D.relatedContents,functionName:D==null?void 0:D.functionName,functionRelatedWords:D==null?void 0:D.functionRelatedWords,calculatorFilter:D==null?void 0:D.calculatorFilter,isReadonly:D==null?void 0:D.isReadonly}):v.push({label:(De=D==null?void 0:D.prop)!=null&&De.includes(".")?D==null?void 0:D.prop:(D==null?void 0:D.label)??(D==null?void 0:D.prop)??"",prop:D==null?void 0:D.prop,name:(D==null?void 0:D.prop)??"t"+K,type:!(D!=null&&D.formType)||(D==null?void 0:D.formType)===""?"Input":D==null?void 0:D.formType,value:(D==null?void 0:D.formType)==="Upload"?(p==null?void 0:p[D==null?void 0:D.prop])??"{}":(p==null?void 0:p[D==null?void 0:D.prop])??(D==null?void 0:D.value)??"",id:(D==null?void 0:D.id)??K,contents:(D==null?void 0:D.options)??[],multiple:(D==null?void 0:D.multiple)??!1,width:1,isFormColHidden:D==null?void 0:D.isFormColHidden,disabled:(D==null?void 0:D.prop)==="disabled"?!0:D==null?void 0:D.disabled,relatedValueId:D==null?void 0:D.relatedValueId,menus:D==null?void 0:D.menus,groups:D==null?void 0:D.groups,words:D==null?void 0:D.words,filter:D==null?void 0:D.filter,bindMenus:D==null?void 0:D.bindMenus,isMainPath:D==null?void 0:D.isMainPath,required:(D==null?void 0:D.required)??!1,relatedContents:D==null?void 0:D.relatedContents,mainKey:D==null?void 0:D.mainKey,relatedContents:D==null?void 0:D.relatedContents,functionName:D==null?void 0:D.functionName,functionRelatedWords:D==null?void 0:D.functionRelatedWords,calculatorFilter:D==null?void 0:D.calculatorFilter,isReadonly:D==null?void 0:D.isReadonly})}),p===""||!p||(Aa.value=(p==null?void 0:p.id)??"");let N=te.getColumnChild((ie=M.cloneDeep(A.value))==null?void 0:ie.filter(D=>(D==null?void 0:D.label)!=="操作"));Sa.value&&((q=Sa.value)==null?void 0:q.length)>0&&(Sa.value=(xe=M.cloneDeep(Sa).value)==null?void 0:xe.map(D=>{var Pe;let K=(D==null?void 0:D.prop)||((Pe=N==null?void 0:N.find(ea=>(ea==null?void 0:ea.label)===(D==null?void 0:D.label)))==null?void 0:Pe.prop);return K&&(D.value=p[K]),D})),Be.value=Sa.value&&((Se=Sa.value)==null?void 0:Se.length)>0?te.getTableFormToForm(Sa.value):v,Be.value=((Ge=Be.value)==null?void 0:Ge.map(D=>({...D,disabled:(D==null?void 0:D.prop)==="disabled"?!0:D==null?void 0:D.disabled})))??Be.value;let O=[],P=((ka=(Xe=(qe=u.itemData)==null?void 0:qe.filter(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:Xe[0])==null?void 0:ka.contents)??"";if(P=te.analyzeSplitToContent(P,","),(P==null?void 0:P.length)>0&&(O=P.flat()),(O==null?void 0:O.length)>0){let D=O==null?void 0:O.filter(Qe=>Qe==null?void 0:Qe.includes("@Type"));if(D=D==null?void 0:D[(D==null?void 0:D.length)-1],(D==null?void 0:D[(D==null?void 0:D.length)-1])===","&&(D=D==null?void 0:D.slice(0,(D==null?void 0:D.length)-1)),D){let Qe=($a=(Ba=D==null?void 0:D.replace("=",w))==null?void 0:Ba.split(w))==null?void 0:$a[1];((Ze=Qe==null?void 0:Qe.trim())==null?void 0:Ze.toUpperCase())==="MANUAL"&&(u==null||u.index,Be.value=(rl=Be.value)==null?void 0:rl.map((Na,tl)=>Na))}let K=(xa=Be.value)==null?void 0:xa.filter(Qe=>Qe==null?void 0:Qe.mainKey),Pe;K==null||K.forEach(Qe=>{var tl;if(Pe!==void 0)return;let Na=Qe==null?void 0:Qe.menus;((tl=K==null?void 0:K.filter(Wa=>Wa==null?void 0:Wa.mainKey))==null?void 0:tl.length)>1&&(Pe=Na,Qe==null||Qe.groups)});let ea=[],De=new Map;if(K==null||K.forEach(Qe=>{var Na,tl,Wa,kl,ml,ar,Ga,Tl,Pa,pl,al,hl,Ll;if((Na=Qe==null?void 0:Qe.prop)!=null&&Na.includes(".")){let Hl=[];De.get(((Wa=(tl=Qe==null?void 0:Qe.prop)==null?void 0:tl.split("."))==null?void 0:Wa[0])+(Qe!=null&&Qe.isMainPath?0:1)+((kl=Qe==null?void 0:Qe.groups)==null?void 0:kl[0]))&&(Hl=De.get(((ar=(ml=Qe==null?void 0:Qe.prop)==null?void 0:ml.split("."))==null?void 0:ar[0])+(Qe!=null&&Qe.isMainPath?0:1)+((Ga=Qe==null?void 0:Qe.groups)==null?void 0:Ga[0]))),Hl.push(Qe),De.set(((Pa=(Tl=Qe==null?void 0:Qe.prop)==null?void 0:Tl.split("."))==null?void 0:Pa[0])+(Qe!=null&&Qe.isMainPath?0:1)+((pl=Qe==null?void 0:Qe.groups)==null?void 0:pl[0]),Hl)}else{let Hl=[];De.get("normal"+(Qe!=null&&Qe.isMainPath?0:1)+((al=Qe==null?void 0:Qe.groups)==null?void 0:al[0]))&&(Hl=De.get("normal"+(Qe!=null&&Qe.isMainPath?0:1)+((hl=Qe==null?void 0:Qe.groups)==null?void 0:hl[0]))),Hl.push(Qe),De.set("normal"+(Qe!=null&&Qe.isMainPath?0:1)+((Ll=Qe==null?void 0:Qe.groups)==null?void 0:Ll[0]),Hl)}}),ea=Array.from(De.values()),(ea==null?void 0:ea.length)>0)for(let Qe in ea){let Na=ea==null?void 0:ea[Qe];if((Na==null?void 0:Na.length)!==1){if((Na==null?void 0:Na.length)>1){let tl=Na==null?void 0:Na.map(pl=>pl==null?void 0:pl.prop),Wa=Na==null?void 0:Na.map(pl=>pl==null?void 0:pl.label),kl=Na==null?void 0:Na.map(pl=>pl==null?void 0:pl.value),ml=(il=M.cloneDeep(Na))==null?void 0:il[0],ar=(ye=Be.value)==null?void 0:ye.findIndex(pl=>(pl==null?void 0:pl.prop)===(ml==null?void 0:ml.prop)),Ga=(Fa=Be.value)==null?void 0:Fa.slice(0,ar),Tl=(Ka=Be.value)==null?void 0:Ka.slice(ar,(ya=Be.value)==null?void 0:ya.length);ml.label=Wa==null?void 0:Wa.join("·"),ml.value=kl==null?void 0:kl.join(" "),ml.value.trim()===""&&(ml.value=""),ml.prop=tl==null?void 0:tl.join("·");let Pa=Na==null?void 0:Na.map(pl=>{var al;return(al=pl==null?void 0:pl.words)==null?void 0:al.join(".")});ml.relatedWords=Pa,ml.usingType="parent",Tl.unshift(ml),Be.value=[...Ga,...Tl],Be.value=(Oa=Be.value)==null?void 0:Oa.map(pl=>(tl!=null&&tl.find(al=>al===(pl==null?void 0:pl.prop))&&(pl.isFormColHidden=!0,pl.relatedWords=Pa),pl))}}}}},vu=()=>{var v;const p=(v=i.value)==null?void 0:v.$el;p&&Vl.Sortable.create(p,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:N=>{var oe;const{oldIndex:O,newIndex:P}=N;if(O===P)return;const T=kn.value.splice(O,1)[0];kn.value.splice(P,0,T),A.value=(oe=A.value)==null?void 0:oe.slice().sort((ie,q)=>{if(ie.label==="操作")return 1;if(q.label==="操作")return-1;const xe=kn.value.findIndex(Ge=>Ge.label===ie.label),Se=kn.value.findIndex(Ge=>Ge.label===q.label);return xe-Se})}})};e.onMounted(()=>{We.value=window.innerWidth-240*2,window.addEventListener("keydown",lo)});const mu=()=>{e.nextTick(()=>{vu()})},yu=()=>{c.value=!0},ut=(p,v)=>{var O;if(!p&&!(p!=null&&p.children))return{contents:p,currentSelectContents:void 0};let N;return p.children=(O=p.children)==null?void 0:O.map(P=>{var T,oe;if((P==null?void 0:P.id)===Aa.value){let ie={};for(let q in P){let xe=(T=v==null?void 0:v.find(Se=>(Se==null?void 0:Se.prop)===q))==null?void 0:T.label;xe?ie[q]=(oe=Pl.value)==null?void 0:oe[xe]:ie[q]=P[q]??""}P=Object.assign(ie,Pl.value),N=P}else{let ie=ut(P,v);P=ie==null?void 0:ie.contents,N=ie==null?void 0:ie.currentSelectContents}return P}),{contents:p,currentSelectContents:N}},$t=(p,v)=>{let N,O;return p!=null&&p.find(P=>(P==null?void 0:P.id)===Aa.value)?N=p==null?void 0:p.map(P=>{var T,oe,ie;if((P==null?void 0:P.id)===Aa.value){let q={};for(let Se in P){let Ge=(T=v==null?void 0:v.find(qe=>(qe==null?void 0:qe.prop)===Se))==null?void 0:T.label;Ge?q[Se]=((oe=Pl.value)==null?void 0:oe[Ge])??"":q[Se]=P[Se]??""}let xe=Pl.value;for(let Se in q)(ie=Pl.value)!=null&&ie[Se]||(xe[Se]=(q==null?void 0:q[Se])??"");P=xe,O=P}return P}):N=p==null?void 0:p.map(P=>{var T,oe,ie,q;if((P==null?void 0:P.id)===Aa.value){let xe={};for(let Se in P){let Ge=(T=v==null?void 0:v.find(qe=>(qe==null?void 0:qe.prop)===Se))==null?void 0:T.label;Ge?xe[Se]=(oe=Pl.value)==null?void 0:oe[Ge]:xe[Se]=P[Se]??""}P=Object.assign(xe,Pl.value),O=P}else P=(ie=ut(P,v))==null?void 0:ie.contents,O=(q=ut(P,v))==null?void 0:q.currentSelectContents;return P}),{newContents:N,currentSelectContents:O}},Vt=(p,v,N)=>{var O,P;return p[v==null?void 0:v.prop]=N,typeof p.id=="number"&&(p.id=(O=p.id)==null?void 0:O.toString()),p.children&&((P=p.children)==null?void 0:P.length)>0&&(p.children=p.children.map(Vt)),p},Ft=p=>{var N;const v=[];return v.push({...p}),p!=null&&p.children&&Array.isArray(p.children)&&((N=p.children)==null||N.forEach(O=>{v.push(...Ft(O))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(O=>{const P={...O};return delete P.children,P}):[]},ho=["Pacific6000数据采集装置.通道号","通道号"],Hi=p=>{if(!p)return"";const v=ho.map(N=>p==null?void 0:p[N]).find(N=>N!=null&&String(N).trim()!=="");return v==null?"":String(v).trim()},dt=async(p,v=void 0)=>{if(!p)return!1;try{const N=Xe=>{var ka,Ba,$a;return Xe?typeof(Xe==null?void 0:Xe.value)=="string"?Xe.value:(($a=(Ba=(ka=Xe==null?void 0:Xe._custom)==null?void 0:ka.value)==null?void 0:Ba.value)==null?void 0:$a.value)||"":""},O=Array.isArray(or.value)?or.value:[],P=N(O.find(Xe=>(Xe==null?void 0:Xe.condition)==="child")),T=(we.value||"").replace(/\/+$/,""),oe=P?`${T}/${P}`:T,ie=await Gr(oe||we.value,!1),q=String(ia.value||"").trim(),xe=Xe=>String(Xe||"").trim(),Se=(Xe,ka=[],Ba="")=>{if(!Array.isArray(Xe))return ka;for(const $a of Xe){const Ze=xe(($a==null?void 0:$a.choiceName)||($a==null?void 0:$a.name0)||Ba);($a==null?void 0:$a.comp)==="Table"&&(!q||Ze===q)&&ka.push($a),Array.isArray($a==null?void 0:$a.children)&&Se($a.children,ka,Ze),Array.isArray($a==null?void 0:$a.tab)&&Se($a.tab,ka,Ze),Array.isArray($a==null?void 0:$a.choice)&&Se($a.choice,ka,Ze)}return ka},Ge=Se(ie||[]),qe=String((u==null?void 0:u.compName)||"");return Ge.some(Xe=>{var Ba,$a;const ka=(($a=(Ba=Xe==null?void 0:Xe.compData)==null?void 0:Ba.find(Ze=>(Ze==null?void 0:Ze.key)==="tableContents"))==null?void 0:$a.contents)||[];return!Array.isArray(ka)||ka.length===0?!1:ka.some(Ze=>{if(String((Xe==null?void 0:Xe.name)||"")===qe&&(Ze==null?void 0:Ze.id)===v)return!1;const xa=Hi(Ze);return!!xa&&xa===p})})}catch{return(Ae.value||[]).some(O=>{if((O==null?void 0:O.id)===v)return!1;const P=Hi(O);return!!P&&P===p})}},Ui=async(p=!0,v,N)=>{var xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze,rl,xa,il,ye,Fa,ya,Ka,Oa,D,K,Pe,ea,De,Qe,Na,tl,Wa,kl,ml,ar,Ga,Tl;if(Pl.value){const Pa=(Se=te.getColumnChild((xe=M.cloneDeep(A.value))==null?void 0:xe.filter(al=>(al==null?void 0:al.label)!=="操作")))==null?void 0:Se.filter(al=>(al==null?void 0:al.required)===!0);for(let al=0;al<((Pa==null?void 0:Pa.length)??0);al++){const hl=Pa[al],Ll=hl==null?void 0:hl.prop,Hl=(hl==null?void 0:hl.label)??Ll,zr=(Ge=Pl.value)==null?void 0:Ge[Ll];if(zr===""||zr===null||zr===void 0||Array.isArray(zr)&&zr.length===0){Ja.ElMessage.error(`${Hl}不能为空`);return}}const pl=Hi(Pl.value);if(pl&&await dt(pl,Aa.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let O=te.getColumnChild((qe=M.cloneDeep(A.value))==null?void 0:qe.filter(Pa=>(Pa==null?void 0:Pa.label)!=="操作")),P,T=M.cloneDeep(Ae.value);if(!Pl.value){Je.value=!1;return}if(Aa.value===""){Ta.value++;let Pa;Pa={id:Ta.value.toString()};try{Pa.sort=ii(0,Ae.value||[])}catch{}Pa!=null&&Pa.children&&(Pa={...Pa,children:(Xe=Pa.children)==null?void 0:Xe.map(al=>Vt(al,v,N))});const pl=Object.assign(Pl.value,Pa);T.unshift(pl),P=pl}else T=(ka=$t(T,O))==null?void 0:ka.newContents,P=(Ba=$t(T,O))==null?void 0:Ba.currentSelectContents;const oe=($a=u.itemData)==null?void 0:$a.filter(Pa=>(Pa==null?void 0:Pa.key)==="childTree")[0];if(((Ze=oe==null?void 0:oe.contents)==null?void 0:Ze.length)>0){ma.value="编辑";const Pa=[];T==null||T.forEach((hl,Ll)=>{var zr;let Hl={};if(Array.isArray(hl)){let gr=[];hl==null||hl.filter(nr=>!(nr!=null&&nr.id)).forEach((nr,Nl)=>{var Jl,cr,Ol,ur,kr,dr,Cr;if((cr=(Jl=_r.value)==null?void 0:Jl[Nl])!=null&&cr.prop&&!Array.isArray(nr)){let an={};an[_r.value[Nl].column]=nr,V!=null&&V.value&&((Ol=V==null?void 0:V.value)==null?void 0:Ol.length)>0&&((ur=V==null?void 0:V.value)!=null&&ur.find(tr=>JSON.stringify(tr==null?void 0:tr[0])===JSON.stringify(an)))&&(gr=(kr=V==null?void 0:V.value)==null?void 0:kr.find(tr=>JSON.stringify(tr==null?void 0:tr[0])===JSON.stringify(an))),gr&&gr.length>0?Hl[_r.value[Nl].prop]=gr!=null&&gr.find(tr=>{var Br;return((Br=Object.keys(tr))==null?void 0:Br[0])===_r.value[Nl].column})?(dr=gr==null?void 0:gr.find(tr=>{var Br;return((Br=Object.keys(tr))==null?void 0:Br[0])===_r.value[Nl].column}))==null?void 0:dr[_r.value[Nl].column]:nr:Hl[_r.value[Nl].prop]=nr}else Array.isArray(nr)&&((Cr=_r.value[Nl])!=null&&Cr.prop?Hl[_r.value[Nl].prop]=nr:Hl.children=St(nr,_r.value))})}else Hl=hl;if(Array.isArray(hl)&&hl.some(gr=>gr==null?void 0:gr.id)){const gr=(zr=hl==null?void 0:hl.find(nr=>nr.id))==null?void 0:zr.id;Pa.push(Object.assign(Hl,{id:uo(gr)}))}else Hl.id?Pa.push(Hl):Pa.push(Object.assign(Hl,{id:Ll.toString()}))});const pl=(Ae.value||[]).map(hl=>String(hl==null?void 0:hl.id)),al=yi(Pa,pl);Ae.value=Ut(al,oe,A.value)}jt(Ae.value),Ur.value=Ae.value;const ie=Uf(Ur.value,Kr.value,T);let q=[];if(H.value?(q=(rl=M.cloneDeep(H).value.singleContent)==null?void 0:rl.filter(Pa=>(Pa==null?void 0:Pa.id)!==(P==null?void 0:P.id)),q.push(P)):q=[P],Yl.value){const Pa={content:ie,singleContent:((xa=oe==null?void 0:oe.contents)==null?void 0:xa.length)>0?q==null?void 0:q.flatMap(Ft):q,index:u==null?void 0:u.index,buttonName:"编辑",column:A.value,parentTableId:u==null?void 0:u.parentTableId};fa.setCacheUpdatingData(Pa)}if((il=A.value)==null||il.forEach(Pa=>{(Pa==null?void 0:Pa.formType)==="Upload"&&(P[Pa.prop]=P[Pa.prop]===""?"{}":typeof P[Pa.prop]!="string"?JSON.stringify(P[Pa.prop]):P[Pa.prop])}),p){(Ka=(ya=(Fa=(ye=u.itemData)==null?void 0:ye.find(al=>(al==null?void 0:al.key)==="filterAllType"))==null?void 0:Fa.value)==null?void 0:ya.find(al=>(al==null?void 0:al.value)==="onConditionContents"))==null||Ka.content;let Pa=(Oa=u.itemData)==null?void 0:Oa.filter(al=>(al==null?void 0:al.key)==="filterAllType");Pa=Array.from(new Map(Pa.filter(Boolean).map((al,hl)=>[al.value,{...al,_idx:hl}])).values()).sort((al,hl)=>al._idx-hl._idx).map(({_idx:al,...hl})=>hl),Pa=(D=Pa==null?void 0:Pa[(Pa==null?void 0:Pa.length)-1])==null?void 0:D.value;const pl={fixContent:[P],buttonName:ma.value,relatedContents:u==null?void 0:u.related,columns:A.value,name:u==null?void 0:u.groupNames};fa.setTableLoading(u==null?void 0:u.index),Je.value=!1,Pl.value=void 0,de("change",pl)}if((ea=(Pe=(K=Be.value)==null?void 0:K[0])==null?void 0:Pe.optionUrl)!=null&&ea.menuId){Je.value=!1;let Pa=(De=u.itemData)==null?void 0:De.filter(pl=>(pl==null?void 0:pl.key)==="filterAllType");if((Pa==null?void 0:Pa.length)>0){let pl=Pa==null?void 0:Pa.map(Ll=>Ll==null?void 0:Ll.value),al=(tl=(Na=(Qe=pl.flat().find(Ll=>{var Hl;return(Hl=Ll==null?void 0:Ll.content)==null?void 0:Hl.includes("@Num")}))==null?void 0:Qe.content)==null?void 0:Na.split(":"))==null?void 0:tl[1];((ml=(kl=(Wa=pl.flat().find(Ll=>{var Hl;return(Hl=Ll==null?void 0:Ll.content)==null?void 0:Hl.includes("@Type:")}))==null?void 0:Wa.content)==null?void 0:kl.split(":"))==null?void 0:ml[1])!=="Manual"&&(al=parseInt(al),Ae.value=(Tl=Ae.value)==null?void 0:Tl.slice(((ar=Ae.value)==null?void 0:ar.length)-al,(Ga=Ae.value)==null?void 0:Ga.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",lo),A.value=[],Ae.value=[],fe.value=[],Ea.value=[],Sa.value=[],sa.value=[],Re.value=[],Oe.value=[],Be.value=[],Xl.value=[],i.value=null,Hn.value=""});const vo=async(p,v,N)=>{var Xe,ka,Ba,$a,Ze,rl,xa,il,ye,Fa,ya,Ka,Oa;wr.value=(N==null?void 0:N.prop)??(N==null?void 0:N.property);const O=M.cloneDeep(u.itemData),P=((Xe=O==null?void 0:O.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:Xe.contents)??[];let T=P==null?void 0:P.find((D,K)=>{var Pe,ea,De;return(D==null?void 0:D.prop)===wr.value||(D==null?void 0:D.label)===wr.value||(K==null?void 0:K.toString())===((De=(ea=(Pe=wr.value)==null?void 0:Pe.split("a"))==null?void 0:ea[1])==null?void 0:De.toString())});const oe=te.getColumnChild((ka=M.cloneDeep(A.value))==null?void 0:ka.filter(D=>(D==null?void 0:D.label)!=="操作"));if(T||(T=oe==null?void 0:oe.find(D=>(D==null?void 0:D.prop)===wr.value||(D==null?void 0:D.label)===wr.value)),T&&!((Ba=T==null?void 0:T.menus)!=null&&Ba.length)&&!(($a=T==null?void 0:T.groups)!=null&&$a.length)&&!((Ze=T==null?void 0:T.words)!=null&&Ze.length)){const D=(rl=Be.value)==null?void 0:rl.find(K=>(K==null?void 0:K.prop)===wr.value);D&&(T={...T,menus:(D==null?void 0:D.menus)??(T==null?void 0:T.menus),groups:(D==null?void 0:D.groups)??(T==null?void 0:T.groups),words:(D==null?void 0:D.words)??(T==null?void 0:T.words),bindMenus:(D==null?void 0:D.bindMenus)??(T==null?void 0:T.bindMenus),isMainPath:(D==null?void 0:D.isMainPath)??(T==null?void 0:T.isMainPath),relatedContents:(D==null?void 0:D.relatedContents)??(T==null?void 0:T.relatedContents),endChildMenu:(D==null?void 0:D.endChildMenu)??(T==null?void 0:T.endChildMenu)})}if(T&&((xa=Be==null?void 0:Be.value)==null||xa.forEach(D=>{var K,Pe,ea,De,Qe;(D==null?void 0:D.prop)===(T==null?void 0:T.prop)&&(D!=null&&D.endChildMenu)&&((K=T==null?void 0:T.prop)!=null&&K.includes(".")&&((ea=(Pe=T==null?void 0:T.prop)==null?void 0:Pe.split("."))==null?void 0:ea[0])!==((Qe=(De=D==null?void 0:D.prop)==null?void 0:De.split("."))==null?void 0:Qe[0])?T.endChildMenu=D==null?void 0:D.value:T.endChildMenu=D==null?void 0:D.endChildMenu)})),!T)return;const ie=wr.value,q=(il=Ae.value)==null?void 0:il.findIndex(D=>(D==null?void 0:D.id)===(v==null?void 0:v.id));q!==-1&&ie&&(Ae.value[q]={...Ae.value[q],[ie]:p});const xe=D=>{Array.isArray(D)&&D.forEach(K=>{Array.isArray(K==null?void 0:K.allSelectionContents)&&K.allSelectionContents.length>0&&(K.contactValue=Ae.value[q]??v),Array.isArray(K==null?void 0:K.children)&&K.children.length>0&&xe(K.children)})};xe(A.value),T.value=p,T.endChildMenu=T.endChildMenu||"";let Se=T!=null&&T.isMainPath&&(T!=null&&T.mainKey)?T==null?void 0:T.value:"";const Ge=D=>{Array.isArray(D)&&D.forEach(K=>{var ea,De;if(((K==null?void 0:K.type)==="Select"||(K==null?void 0:K.formType)&&K.formType.toUpperCase()==="SELECT"||(K==null?void 0:K.columnType)&&K.columnType.toUpperCase()==="SELECT")&&Array.isArray(K==null?void 0:K.menus)&&K.menus.length>0&&K.menus[K.menus.length-1]===""&&(T!=null&&T.isMainPath)&&(T!=null&&T.mainKey)){const Qe=(ea=K==null?void 0:K.prop)!=null&&ea.includes(".")?K.prop.split(".")[0]:null,Na=(De=T==null?void 0:T.prop)!=null&&De.includes(".")?T.prop.split(".")[0]:null;(!Qe||!Na||Qe===Na)&&(K.endChildMenu=Se)}Array.isArray(K==null?void 0:K.children)&&K.children.length>0&&Ge(K.children)})};if(Ge(A.value),!!(T!=null&&T.mainKey)&&Array.isArray(T==null?void 0:T.menus)&&(T==null?void 0:T.menus.length)>0&&(T!=null&&T.value)&&(T==null?void 0:T.value)!==""){let D=T!=null&&T.relatedContents&&((ye=T==null?void 0:T.relatedContents)==null?void 0:ye.length)>0?(Fa=T==null?void 0:T.relatedContents)==null?void 0:Fa.find(K=>{var Pe,ea,De,Qe;return(K==null?void 0:K[(Qe=(Pe=T==null?void 0:T.prop)==null?void 0:Pe.split("."))==null?void 0:Qe[((De=(ea=T==null?void 0:T.prop)==null?void 0:ea.split("."))==null?void 0:De.length)-1]])===(T==null?void 0:T.value)}):await vs(T);if(D){const K={...v};oe==null||oe.forEach(Pe=>{var ea,De,Qe,Na,tl,Wa,kl,ml,ar,Ga,Tl,Pa,pl,al,hl,Ll;(Pe==null?void 0:Pe.prop)!==(T==null?void 0:T.prop)&&(T!=null&&T.relatedContents&&((ea=T==null?void 0:T.relatedContents)==null?void 0:ea.length)>0?(De=Pe==null?void 0:Pe.prop)!=null&&De.includes(".")&&((Na=(Qe=Pe==null?void 0:Pe.prop)==null?void 0:Qe.split("."))==null?void 0:Na[0])===((Wa=(tl=T==null?void 0:T.prop)==null?void 0:tl.split("."))==null?void 0:Wa[0])?K[Pe.prop]=D[(Ga=(kl=Pe==null?void 0:Pe.prop)==null?void 0:kl.split("."))==null?void 0:Ga[((ar=(ml=Pe==null?void 0:Pe.prop)==null?void 0:ml.split("."))==null?void 0:ar.length)-1]]??K[Pe.prop]:K[Pe.prop]=(D==null?void 0:D[Pe.prop])??K[Pe.prop]:te.same((T==null?void 0:T.menus)??[],(Pe==null?void 0:Pe.menus)??[])&&te.same((T==null?void 0:T.groups)??[],(Pe==null?void 0:Pe.groups)??[])&&!te.same((T==null?void 0:T.words)??[],(Pe==null?void 0:Pe.words)??[])?(Tl=Pe==null?void 0:Pe.prop)!=null&&Tl.includes(".")&&((pl=(Pa=Pe==null?void 0:Pe.prop)==null?void 0:Pa.split("."))==null?void 0:pl[0])!==((hl=(al=T==null?void 0:T.prop)==null?void 0:al.split("."))==null?void 0:hl[0])||(K[Pe.prop]=(D==null?void 0:D[(Ll=Pe==null?void 0:Pe.words)==null?void 0:Ll.join(".")])??(D==null?void 0:D[Pe.prop])??K[Pe.prop]):(!(Pe!=null&&Pe.isMainPath)&&te.same((T==null?void 0:T.bindMenus)??[],(Pe==null?void 0:Pe.bindMenus)??[]),K[Pe.prop]=(D==null?void 0:D[Pe.prop])??K[Pe.prop]))}),Ae.value=(ya=M.cloneDeep(Ae.value))==null?void 0:ya.map(Pe=>(Pe==null?void 0:Pe.id)===(v==null?void 0:v.id)?{...K,id:Pe==null?void 0:Pe.id}:Pe)}}if((Ka=T==null?void 0:T.optionUrl)!=null&&Ka.menuSelect){let D="";oe==null||oe.forEach(ea=>{var De,Qe,Na,tl,Wa;D===""&&((Na=(Qe=(De=ea==null?void 0:ea.optionUrl)==null?void 0:De.groupSelect)==null?void 0:Qe[1])!=null&&Na.includes("["))&&(D=(Wa=(tl=ea==null?void 0:ea.optionUrl)==null?void 0:tl.groupSelect)==null?void 0:Wa[1])});let K=await Et(T),Pe;if(K==null||K.forEach(ea=>{var De,Qe,Na,tl,Wa,kl,ml,ar,Ga,Tl;D===((Qe=(De=T==null?void 0:T.optionUrl)==null?void 0:De.groupSelect)==null?void 0:Qe[1])&&((Wa=(tl=(Na=T==null?void 0:T.optionUrl)==null?void 0:Na.groupSelect)==null?void 0:tl[1])!=null&&Wa.includes("["))&&((Tl=M.cloneDeep(ea))==null?void 0:Tl[(Ga=(ar=(ml=(kl=T==null?void 0:T.optionUrl)==null?void 0:kl.groupSelect)==null?void 0:ml[1])==null?void 0:ar.replaceAll("[",""))==null?void 0:Ga.replaceAll("]","")])===(T==null?void 0:T.value)&&(Pe=ea)}),Pe){const ea={...v};oe==null||oe.forEach(De=>{var Qe,Na,tl,Wa,kl,ml,ar,Ga,Tl,Pa,pl;(Pe!=null&&Pe[De==null?void 0:De.label]||Pe!=null&&Pe[(Wa=(tl=(Na=(Qe=De==null?void 0:De.optionUrl)==null?void 0:Qe.groupSelect)==null?void 0:Na[1])==null?void 0:tl.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])&&((ar=(ml=(kl=De==null?void 0:De.optionUrl)==null?void 0:kl.groupSelect)==null?void 0:ml[1])!=null&&ar.includes("["))&&(ea[De.prop]=(Pe==null?void 0:Pe[De==null?void 0:De.label])||(Pe==null?void 0:Pe[(pl=(Pa=(Tl=(Ga=De==null?void 0:De.optionUrl)==null?void 0:Ga.groupSelect)==null?void 0:Tl[1])==null?void 0:Pa.replaceAll("[",""))==null?void 0:pl.replaceAll("]","")]))}),Ae.value=(Oa=M.cloneDeep(Ae.value))==null?void 0:Oa.map(De=>(De==null?void 0:De.id)===(v==null?void 0:v.id)?{...ea,id:De==null?void 0:De.id}:De)}}},gu=async p=>{var Xe,ka,Ba,$a,Ze,rl,xa,il,ye,Fa,ya,Ka,Oa,D;if(!p)return;const v=M.cloneDeep(Pl.value||{});Pl.value=p;const N=Hi(v),O=Hi(Pl.value);if(O&&O!==N&&await dt(O,Aa.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),ho.forEach(Pe=>{if(Object.prototype.hasOwnProperty.call(Pl.value||{},Pe)||Object.prototype.hasOwnProperty.call(v||{},Pe)){const ea=(v==null?void 0:v[Pe])??"";Pl.value[Pe]=ea,p[Pe]=ea}}),Be.value=(Be.value||[]).map(Pe=>{if(!(Pe!=null&&Pe.prop)||!ho.includes(Pe.prop))return Pe;const ea=(v==null?void 0:v[Pe.prop])??"";return{...Pe,value:ea,selectValue:ea===""?[]:[ea]}});return}let P=M.cloneDeep(u.itemData);P==null||P.map(K=>{var Pe,ea,De,Qe;return(K==null?void 0:K.key)==="header"&&(Array.isArray((Pe=K.contents)==null?void 0:Pe[0])?K.contents=(De=te.getColumnChild((ea=K.contents)==null?void 0:ea[0]))==null?void 0:De.map((Na,tl)=>{var Wa,kl,ml,ar,Ga,Tl;return((ml=(kl=(Wa=Be.value)==null?void 0:Wa.find(Pa=>(Pa==null?void 0:Pa.prop)===(Na==null?void 0:Na.prop)))==null?void 0:kl.optionUrl)==null?void 0:ml.multiple)===!0&&!Array.isArray((ar=Object.values(p))==null?void 0:ar[tl])?Na.value=[(Ga=Object.values(p))==null?void 0:Ga[tl]]:Na.value=(Tl=Object.values(p))==null?void 0:Tl[tl],Na}):K.contents=(Qe=K.contents)==null?void 0:Qe.map((Na,tl)=>{var Wa,kl,ml,ar,Ga,Tl;return((ml=(kl=(Wa=Be.value)==null?void 0:Wa.find(Pa=>(Pa==null?void 0:Pa.prop)===(Na==null?void 0:Na.prop)))==null?void 0:kl.optionUrl)==null?void 0:ml.multiple)===!0&&!Array.isArray((ar=Object.values(p))==null?void 0:ar[tl])?Na.value=[(Ga=Object.values(p))==null?void 0:Ga[tl]]:Na.value=(Tl=Object.values(p))==null?void 0:Tl[tl],Na})),K});let T=Be.value,oe=(Xe=P==null?void 0:P.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:Xe.contents;if(wr.value||(T=T==null?void 0:T.map(K=>{var Pe;return K.value=K.value??((Pe=oe==null?void 0:oe.find((ea,De)=>(ea==null?void 0:ea.prop)===(K==null?void 0:K.name)))==null?void 0:Pe.value),K})),!Pr.value)return;let ie=M.cloneDeep(wr.value);(ka=wr.value)!=null&&ka.includes("·")&&(wr.value=($a=(Ba=wr.value)==null?void 0:Ba.split("·"))==null?void 0:$a[0]);let q=(rl=(Ze=P==null?void 0:P.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:Ze.contents)==null?void 0:rl.find((K,Pe)=>(K==null?void 0:K.prop)===wr.value);(xa=Be==null?void 0:Be.value)==null||xa.forEach(K=>{var Pe,ea,De,Qe,Na,tl,Wa,kl,ml;(K==null?void 0:K.prop)===(q==null?void 0:q.prop)&&(K!=null&&K.endChildMenu)&&((Pe=q==null?void 0:q.prop)!=null&&Pe.includes(".")&&((De=(ea=q==null?void 0:q.prop)==null?void 0:ea.split("."))==null?void 0:De[0])!==((Na=(Qe=K==null?void 0:K.prop)==null?void 0:Qe.split("."))==null?void 0:Na[0])?q.endChildMenu=(Wa=(tl=K==null?void 0:K.value)==null?void 0:tl.split(" "))==null?void 0:Wa[0]:q.endChildMenu=(ml=(kl=K==null?void 0:K.endChildMenu)==null?void 0:kl.split(" "))==null?void 0:ml[0])});let xe=q!=null&&q.isMainPath&&(q!=null&&q.mainKey)?q==null?void 0:q.value:"",Se=T,Ge=X.value;if(Ge!=null&&Ge.find(K=>(q==null?void 0:q.prop)===(K==null?void 0:K.key))&&(Ge=Ge==null?void 0:Ge.filter(K=>(q==null?void 0:q.prop)!==(K==null?void 0:K.key))),Ge!=null&&Ge.find(K=>ie===(K==null?void 0:K.key))&&(Ge=Ge==null?void 0:Ge.filter(K=>ie!==(K==null?void 0:K.key))),(q==null?void 0:q.formType)==="Select"?Se=Se==null?void 0:Se.map(K=>{var Pe,ea,De,Qe,Na,tl,Wa,kl,ml,ar,Ga,Tl,Pa,pl,al,hl;return(K==null?void 0:K.type)==="Select"&&(((Pe=K==null?void 0:K.allSelectionContents)==null?void 0:Pe.length)>0&&(K.contactValue=p),((q==null?void 0:q.prop)===(K==null?void 0:K.prop)||ie===(K==null?void 0:K.prop))&&q&&(Array.isArray(q.value)&&((ea=q.value)==null?void 0:ea.length)>0&&((De=q.value)!=null&&De.every(Ll=>typeof Ll=="string"))?(Ge.push({key:K==null?void 0:K.prop,value:[(Na=q.value)==null?void 0:Na[((Qe=q.value)==null?void 0:Qe.length)-1]]}),K.selectValue=(tl=Ge==null?void 0:Ge.find(Ll=>(Ll==null?void 0:Ll.key)===(K==null?void 0:K.prop)))==null?void 0:tl.value):Array.isArray(q.value)&&((Wa=q.value)==null?void 0:Wa.length)===0?(Ge=[],K.selectValue=[],p[K==null?void 0:K.prop]=""):Array.isArray(K.value)&&Ge.push({key:K==null?void 0:K.prop,value:[(kl=K.value)==null?void 0:kl[(K==null?void 0:K.length)-1]]})),((ar=K==null?void 0:K.menus)==null?void 0:ar[((ml=K==null?void 0:K.menus)==null?void 0:ml.length)-1])===""&&(q!=null&&q.isMainPath)&&(q!=null&&q.mainKey)&&((Ga=K==null?void 0:K.prop)!=null&&Ga.includes(".")&&((Pa=(Tl=K==null?void 0:K.prop)==null?void 0:Tl.split("."))==null?void 0:Pa[0])!==((al=(pl=q==null?void 0:q.prop)==null?void 0:pl.split("."))==null?void 0:al[0])||(K.endChildMenu=(hl=xe==null?void 0:xe.split(" "))==null?void 0:hl[0]))),K.value=(p==null?void 0:p[K==null?void 0:K.prop])??(K==null?void 0:K.value),K}):(q==null?void 0:q.formType)!=="Input"&&(Se=Se==null?void 0:Se.map(K=>(K.value=(p==null?void 0:p[K==null?void 0:K.prop])??(K==null?void 0:K.value),K))),X.value=Ge,Se!=null&&Se.some(K=>(K==null?void 0:K.functionName)&&(K==null?void 0:K.functionName)!=="")){let K=await _t([p],A==null?void 0:A.value,"Auto",Ae.value),Pe=[];(il=Se==null?void 0:Se.filter(De=>(De==null?void 0:De.functionName)&&(De==null?void 0:De.functionName)!==""))==null||il.forEach(De=>{var Qe;((Qe=De==null?void 0:De.functionRelatedWords)==null?void 0:Qe.length)>0&&(Pe=[...Pe,...De==null?void 0:De.functionRelatedWords])}),Pe=Pe==null?void 0:Pe.filter(De=>(De==null?void 0:De[0])!=="@");let ea=[];for(let De in K==null?void 0:K[0])Pe!=null&&Pe.find(Qe=>De===Qe||(De==null?void 0:De.includes("."+Qe)))&&ea.push(((ye=K==null?void 0:K[0])==null?void 0:ye[De])!=="");(K==null?void 0:K.length)>0&&ea.every(De=>De)&&(Se=Se==null?void 0:Se.map(De=>{var Qe;return De.value=((Qe=K==null?void 0:K[0])==null?void 0:Qe[De==null?void 0:De.prop])??De.value,De})),Pl.value=K==null?void 0:K[0]}if(Be.value=Se,q=Object.assign({},q??{},{relatedWords:(ya=(Fa=Be==null?void 0:Be.value)==null?void 0:Fa.find(K=>(K==null?void 0:K.prop)===(q==null?void 0:q.prop)))==null?void 0:ya.relatedWords}),(q==null?void 0:q.mainKey)&&(q!=null&&q.value)&&(q==null?void 0:q.value)!==""){let K=q!=null&&q.relatedContents&&((Ka=q==null?void 0:q.relatedContents)==null?void 0:Ka.length)>0?(Oa=q==null?void 0:q.relatedContents)==null?void 0:Oa.find(Pe=>{var ea,De,Qe,Na;return(Pe==null?void 0:Pe[(Na=(ea=q==null?void 0:q.prop)==null?void 0:ea.split("."))==null?void 0:Na[((Qe=(De=q==null?void 0:q.prop)==null?void 0:De.split("."))==null?void 0:Qe.length)-1]])===(q==null?void 0:q.value)}):await vs(q);if(K&&JSON.stringify(K)!=="{}"){let Pe=Se;Pe=Pe==null?void 0:Pe.map(De=>{var Qe,Na,tl,Wa,kl,ml,ar,Ga,Tl,Pa,pl,al,hl,Ll,Hl,zr,gr,nr,Nl,Jl,cr;if((q==null?void 0:q.prop)===(De==null?void 0:De.prop))De.value=(K==null?void 0:K[(Qe=De==null?void 0:De.words)==null?void 0:Qe.join(".")])??(K==null?void 0:K[De==null?void 0:De.prop])??K[(kl=(Na=De==null?void 0:De.prop)==null?void 0:Na.split("."))==null?void 0:kl[((Wa=(tl=De==null?void 0:De.prop)==null?void 0:tl.split("."))==null?void 0:Wa.length)-1]];else if(q!=null&&q.relatedContents&&((ml=q==null?void 0:q.relatedContents)==null?void 0:ml.length)>0)De.value=(ar=De==null?void 0:De.prop)!=null&&ar.includes(".")&&((Tl=(Ga=De==null?void 0:De.prop)==null?void 0:Ga.split("."))==null?void 0:Tl[0])===((pl=(Pa=q==null?void 0:q.prop)==null?void 0:Pa.split("."))==null?void 0:pl[0])?K[(Hl=(al=De==null?void 0:De.prop)==null?void 0:al.split("."))==null?void 0:Hl[((Ll=(hl=De==null?void 0:De.prop)==null?void 0:hl.split("."))==null?void 0:Ll.length)-1]]:(K==null?void 0:K[De==null?void 0:De.prop])??(De==null?void 0:De.value);else if(te.same((q==null?void 0:q.menus)??[],(De==null?void 0:De.menus)??[])&&te.same((q==null?void 0:q.groups)??[],(De==null?void 0:De.groups)??[])&&!te.same((q==null?void 0:q.words)??[],(De==null?void 0:De.words)??[]))if((zr=De==null?void 0:De.prop)!=null&&zr.includes(".")&&((nr=(gr=De==null?void 0:De.prop)==null?void 0:gr.split("."))==null?void 0:nr[0])!==((Jl=(Nl=q==null?void 0:q.prop)==null?void 0:Nl.split("."))==null?void 0:Jl[0])){let Ol=Object.keys(K);Ol=Ol==null?void 0:Ol.find(ur=>{var kr;return ur==null?void 0:ur.includes("."+((kr=De==null?void 0:De.words)==null?void 0:kr.join(".")))}),De.value=(K==null?void 0:K[Ol])??(K==null?void 0:K[De==null?void 0:De.prop])??De.value}else{let Ol=Object.keys(K);Ol=Ol==null?void 0:Ol.find(ur=>{var kr;return ur==null?void 0:ur.includes("."+((kr=De==null?void 0:De.words)==null?void 0:kr.join(".")))}),De.value=(K==null?void 0:K[(cr=De==null?void 0:De.words)==null?void 0:cr.join(".")])??(K==null?void 0:K[Ol])??(K==null?void 0:K[De==null?void 0:De.prop])??De.value}else!(De!=null&&De.isMainPath)&&te.same((q==null?void 0:q.bindMenus)??[],(De==null?void 0:De.bindMenus)??[]),De.value=(K==null?void 0:K[De==null?void 0:De.prop])??De.value;return De}),Be.value=Pe;let ea={};(D=Be.value)==null||D.forEach(De=>{ea[De.prop]=De==null?void 0:De.value}),Pl.value=ea}}Pr.value=!0,z.value=!1},bu=p=>p?(p==null?void 0:p.toUpperCase())==="INPUT"?"TEXTAREA":p:"TEXTAREA",ku=p=>{var T,oe;const v=(oe=(T=Sa.value)==null?void 0:T.find(ie=>(ie==null?void 0:ie.label)===(p==null?void 0:p.label)))==null?void 0:oe.multiple,N=p==null?void 0:p.prop;if((p==null?void 0:p.formType)!="Select")return;Ae.value.forEach(ie=>{const q=ie==null?void 0:ie[N];v&&Ao.isString(q)&&(ie[N]=[q]),!v&&!Ao.isString(q)&&(ie[N]="")})},Pt=(p,v)=>{var N;return v==null||v.forEach(O=>{p[O==null?void 0:O.prop]=O==null?void 0:O.value}),p.children&&((N=p.children)==null?void 0:N.length)>0&&(p.children=p.children.map(O=>Pt(O,v))),p},pt=p=>{var N,O,P,T,oe,ie;ji("");const v=(N=Be.value)==null?void 0:N.reduce((q,xe)=>(q[xe.name]=xe.value,q),{});if(((O=Object.keys(v))==null?void 0:O.length)>0){Pl.value=v,Aa.value="",Ta.value=(P=Ae.value)==null?void 0:P.length,Oe.value=(T=Le.value)==null?void 0:T.filter(xe=>(xe==null?void 0:xe.label)!=="新增");const q=(ie=(oe=fe.value)==null?void 0:oe.filter(xe=>(xe==null?void 0:xe.label)!=="操作"))==null?void 0:ie.map(xe=>{var Ge,qe,Xe;const Se=(qe=(Ge=Sa.value)==null?void 0:Ge.find(ka=>(ka==null?void 0:ka.label)===(xe==null?void 0:xe.label)))==null?void 0:qe.multiple;return ku(xe),{...xe,contents:(xe==null?void 0:xe.options)??[],optionUrl:xe!=null&&xe.formMenuSelect&&((Xe=xe==null?void 0:xe.formMenuSelect)==null?void 0:Xe.length)>0?{groupSelect:xe==null?void 0:xe.groupSelect,menuSelect:xe==null?void 0:xe.formMenuSelect,selectRelateType:"",type:xe==null?void 0:xe.formType,multiple:Se}:null}});A.value=q==null?void 0:q.map(xe=>Pt(xe,[{prop:"type",value:"edit"},{prop:"columnType",value:bu(xe==null?void 0:xe.formType)||(xe==null?void 0:xe.columnType)}])),p==="createClick"&&(ma.value="新增",Ui(!0))}},wi={START:"开始时间",END:"结束时间",HOURS:"工时"},xu=(p,v)=>Number(M.dayjs(v).diff(M.dayjs(p),"day",!0).toFixed(1)),jt=p=>{var T;const v=u.itemData,N=(T=v==null?void 0:v.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:T.contents,O=new Map;return N==null||N.forEach((oe,ie)=>{const{label:q}=oe;O.set(q,ie)}),!O.has(wi.START)||!O.has(wi.END)||!O.has(wi.HOURS)?p:p==null?void 0:p.map(oe=>{const ie=oe==null?void 0:oe[wi.START],q=oe==null?void 0:oe[wi.END],xe=xu(ie,q);return ie&&q&&(oe[wi.HOURS]=`${xe}天`),oe})},Ht=(p,v,N=0)=>{if(N>((v==null?void 0:v.length)??""))return p;const O=v==null?void 0:v[N],P=new Map;for(const oe of p){const ie=oe[O];P.has(ie)||P.set(ie,[]),P.get(ie)&&P.get(ie).push(oe)}const T=[];for(const[oe,ie]of P){const[q,...xe]=ie,Se={...q};N+1===((v==null?void 0:v.length)??"")?Se.children=ie==null?void 0:ie.map(Ge=>(Ge.level=M.cloneDeep(N)+1,Ge)).filter((Ge,qe)=>qe!==0):xe.length>0&&(Se.children=Ht(xe,v,N+1)),Se.level=N,T.push(Se)}return T},Ut=(p,v,N)=>{var P;if(!(v!=null&&v.contents)||((P=v==null?void 0:v.contents)==null?void 0:P.length)===0)return p;let O=[];return O=Ht(p,v==null?void 0:v.contents,0),O},qt=async(p,v)=>{var Ze,rl,xa,il,ye,Fa,ya,Ka,Oa,D,K,Pe,ea,De,Qe,Na,tl,Wa,kl,ml,ar,Ga,Tl,Pa,pl,al,hl,Ll,Hl,zr,gr,nr,Nl,Jl,cr,Ol,ur,kr,dr,Cr,an,tr,Br,Ir,Kt,Gt,Yt,Jt;const N=p==null?void 0:p.filter(ra=>(ra==null?void 0:ra.key)==="header");p==null||p.filter(ra=>(ra==null?void 0:ra.key)==="tableIndexColumn")[0];const O=p==null?void 0:p.filter(ra=>(ra==null?void 0:ra.key)==="childTree")[0];let P=!0;if((xa=(rl=(Ze=p==null?void 0:p.find(ra=>(ra==null?void 0:ra.key)==="filterAllType"))==null?void 0:Ze.value)==null?void 0:rl.find(ra=>(ra==null?void 0:ra.value)==="onPamButtonContents"))!=null&&xa.content){let ra=(Fa=(ye=(il=p==null?void 0:p.find(zl=>(zl==null?void 0:zl.key)==="filterAllType"))==null?void 0:il.value)==null?void 0:ye.find(zl=>(zl==null?void 0:zl.value)==="onPamButtonContents"))==null?void 0:Fa.content;ra=(ya=ra==null?void 0:ra.split(":"))==null?void 0:ya[1],ra=(Ka=ra.slice(1,(ra==null?void 0:ra.length)-1))==null?void 0:Ka.split(","),P=!!(ra!=null&&ra.find(zl=>zl==="操作"))}const T=p==null?void 0:p.find(ra=>(ra==null?void 0:ra.key)==="page"),oe=p==null?void 0:p.find(ra=>(ra==null?void 0:ra.key)==="rowButton"),ie=p==null?void 0:p.find(ra=>(ra==null?void 0:ra.key)==="extraButton"),q=p==null?void 0:p.filter(ra=>(ra==null?void 0:ra.key)==="tableContents"),xe=p==null?void 0:p.filter(ra=>(ra==null?void 0:ra.key)==="bottomButton");let Se=[];const Ge=p==null?void 0:p.filter(ra=>(ra==null?void 0:ra.key)==="tableIndex");Sa.value=(D=(Oa=p==null?void 0:p.filter(ra=>(ra==null?void 0:ra.key)==="tableToForm"))==null?void 0:Oa[0])==null?void 0:D.contents,Ce.value=(T==null?void 0:T.contents)??!0;let qe=[];sr.value===""?qe=N==null?void 0:N[0]:qe=(N==null?void 0:N.find(ra=>(ra==null?void 0:ra.selectLabel)==="("+sr.value+")"))??(N==null?void 0:N.find(ra=>!(ra!=null&&ra.selectLabel)));let Xe=[];sr.value===""?Xe=Ge==null?void 0:Ge[0]:Xe=(Ge==null?void 0:Ge.find(ra=>(ra==null?void 0:ra.selectLabel)==="("+sr.value+")"))??(Ge==null?void 0:Ge.find(ra=>!(ra!=null&&ra.selectLabel)));let ka=[],Ba=[];if(((K=qe==null?void 0:qe.contents)==null?void 0:K.length)>0){let ra=[],zl=qe==null?void 0:qe.contents;if(Array.isArray(zl==null?void 0:zl[0])&&((Pe=zl==null?void 0:zl[0])!=null&&Pe.every(Xa=>!(Xa!=null&&Xa.children)))&&(zl=zl==null?void 0:zl[0]),zl.some(Xa=>Array.isArray(Xa)&&(Xa==null?void 0:Xa.find(Ye=>Ye.children))))ra=(ea=te.getGradeColumns(zl,P))==null?void 0:ea[0],ra!=null&&ra.find(Xa=>(Xa==null?void 0:Xa.label)==="操作")||ra.push({label:"操作",prop:"operate",type:"operate"});else{let Xa=zl.some(Ye=>Array.isArray(Ye))?zl==null?void 0:zl[0]:zl;Xa!=null&&Xa.find(Ye=>(Ye==null?void 0:Ye.label)==="操作")||Xa.push({label:"操作",prop:"operate",type:"operate"}),Xa==null||Xa.forEach((Ye,pr)=>{var Hr,Xr,Rr,si,_i,Si,Nr,Nn,Wn,Ei,bn,Kn,Xt,Zt,Qt,es,as,ls,rs,ns,is;if((Xr=(Hr=we.value)==null?void 0:Hr.split("/"))==null||Xr.forEach(mr=>{var Dr,Mn,os;mr!==""&&((os=(Mn=(Dr=mr==null?void 0:mr.split(E+"updateLoading"))==null?void 0:Dr[0])==null?void 0:Mn.split(E+"loading"))==null||os[0])}),Ye!=null&&Ye.methodContent){let mr=(_i=(si=(Rr=Ye==null?void 0:Ye.methodContent)==null?void 0:Rr.replace("@","%%#"))==null?void 0:si.split("%%#"))==null?void 0:_i[1];if(mr=mr==null?void 0:mr.slice(0,(mr==null?void 0:mr.length)-1),mr=te.contentTransArrayToAllNoExtra(mr??"",","),(Si=mr==null?void 0:mr.find(Dr=>Dr==null?void 0:Dr.includes("@Button")))!=null&&Si.includes("Prop")&&((Nr=mr==null?void 0:mr.find(Dr=>Dr==null?void 0:Dr.includes("Type")))!=null&&Nr.includes("Manual"))){let Dr=(Wn=(Nn=mr==null?void 0:mr.find(Mn=>Mn==null?void 0:Mn.includes("@Button")))==null?void 0:Nn.split(":"))==null?void 0:Wn[1];Dr=((Kn=(bn=(Ei=Dr==null?void 0:Dr.replaceAll("[",""))==null?void 0:Ei.replaceAll("]",""))==null?void 0:bn.split(","))==null?void 0:Kn[1])??"算法执行",ka.push(Dr)}else if((Xt=mr==null?void 0:mr.find(Dr=>Dr==null?void 0:Dr.includes("@Button")))!=null&&Xt.includes("Row")&&((Zt=mr==null?void 0:mr.find(Dr=>Dr==null?void 0:Dr.includes("Type")))!=null&&Zt.includes("Manual"))){let Dr=(es=(Qt=mr==null?void 0:mr.find(Mn=>Mn==null?void 0:Mn.includes("@Button")))==null?void 0:Qt.split(":"))==null?void 0:es[1];Dr=((rs=(ls=(as=Dr==null?void 0:Dr.replaceAll("[",""))==null?void 0:as.replaceAll("]",""))==null?void 0:ls.split(","))==null?void 0:rs[1])??"算法执行",Ba.push(Dr)}}(ns=Sa.value)==null||ns.find(mr=>(mr==null?void 0:mr.prop)===(Ye==null?void 0:Ye.prop));let rn=((is=Ye==null?void 0:Ye.filter)==null?void 0:is.includes("@EditRead=Read"))??!1;ra.push({label:(Ye==null?void 0:Ye.label)==="操作"?P?"操作":"":(Ye==null?void 0:Ye.label)??"",prop:(Ye==null?void 0:Ye.label)==="操作"?"operate":(Ye==null?void 0:Ye.prop)??"a"+pr,width:Ye!=null&&Ye.width?parseInt(Ye.width):"",fixed:(Ye==null?void 0:Ye.fixed)??void 0,sortable:(Ye==null?void 0:Ye.sortable)??!1,filterable:(Ye==null?void 0:Ye.filterable)??!1,operable:(Ye==null?void 0:Ye.operable)??!1,showSummary:(Ye==null?void 0:Ye.showSummary)??!1,align:(Ye==null?void 0:Ye.align)??"left",showOverflowTooltip:(Ye==null?void 0:Ye.showOverflowTooltip)??!0,isNotDrag:(Ye==null?void 0:Ye.isNotDrag)??!1,isEditCol:(Ye==null?void 0:Ye.isEditCol)??!1,isOperate:(Ye==null?void 0:Ye.isOperate)??!1,id:(Ye==null?void 0:Ye.id)??pr,type:(Ye==null?void 0:Ye.label)==="操作"?"operate":void 0,formType:(Ye==null?void 0:Ye.formType)??(Ye!=null&&Ye.groupSelect?"Select":""),disabled:Ye==null?void 0:Ye.disabled,options:(Ye==null?void 0:Ye.options)??[],value:(Ye==null?void 0:Ye.value)??"",isExistChild:(Ye==null?void 0:Ye.isExistChild)??!1,mainKey:(Ye==null?void 0:Ye.mainKey)??pr===0,allSelectionContents:(Ye==null?void 0:Ye.allContents)??[],filterContent:Ye==null?void 0:Ye.filterContents,menus:Ye==null?void 0:Ye.menus,groups:Ye==null?void 0:Ye.groups,words:Ye==null?void 0:Ye.words,filter:Ye==null?void 0:Ye.filter,bindMenus:Ye==null?void 0:Ye.bindMenus,fatherPath:Ye==null?void 0:Ye.fatherPath,isMainPath:Ye==null?void 0:Ye.isMainPath,required:(Ye==null?void 0:Ye.required)??!1,relatedContents:Ye==null?void 0:Ye.relatedContents,functionName:Ye==null?void 0:Ye.functionName,functionRelatedWords:Ye==null?void 0:Ye.functionRelatedWords,calculatorFilter:Ye==null?void 0:Ye.calculatorFilter,relatedPages:Ye==null?void 0:Ye.relatedPages,multiple:(Ye==null?void 0:Ye.multiple)??!1,multipleLimit:Ye==null?void 0:Ye.multipleLimit,isReadonly:rn})})}ra=ra==null?void 0:ra.filter(Xa=>{var Ye;return!((Ye=Xa==null?void 0:Xa.filter)!=null&&Ye.includes("@ShowHide=Hide"))}),j.value=(De=xe==null?void 0:xe[0])==null?void 0:De.contents;const ln=te.getNewColumnChild(ra);Se=te.getColumnChild(ln);const qn=Xa=>Array.isArray(Xa)?Xa.map(Ye=>(Array.isArray(Ye==null?void 0:Ye.children)&&Ye.children.length>0?(Ye.sortable=!1,qn(Ye.children)):(Ye==null?void 0:Ye.prop)==="operate"||(Ye==null?void 0:Ye.label)==="操作"||(Ye==null?void 0:Ye.type)==="operate"||(Ye.sortable=!1),Ye)):Xa;qn(ln),await io(ln),f0(ee.value,ln),A.value=ln,Ea.value=ln,n.value=(Qe=A.value)==null?void 0:Qe.map(Xa=>Xa==null?void 0:Xa.label);let Or=(tl=(Na=te.getAllLeafNodes(A.value))==null?void 0:Na.filter(Xa=>(Xa==null?void 0:Xa.type)!=="operate"))==null?void 0:tl.map((Xa,Ye)=>({prop:(Xa==null?void 0:Xa.prop)??"a"+Ye,column:Xa.label}));_r.value=Or;let Vr=[];sr.value===""?Vr=q==null?void 0:q[0]:Vr=(q==null?void 0:q.find(Xa=>(Xa==null?void 0:Xa.selectLabel)==="("+sr.value+")"))??(q==null?void 0:q.find(Xa=>!(Xa!=null&&Xa.selectLabel)));let Lr=Array.isArray((Wa=Vr==null?void 0:Vr.contents)==null?void 0:Wa[0])&&((kl=Vr==null?void 0:Vr.contents)!=null&&kl[0].every(Xa=>Array.isArray(Xa)))?(ml=Vr==null?void 0:Vr.contents)==null?void 0:ml[0]:Vr==null?void 0:Vr.contents;Xe!=null&&Xe.contents&&((ar=Xe==null?void 0:Xe.contents)==null?void 0:ar.length)!==0&&(Lr=(Ga=M.cloneDeep(Lr))==null?void 0:Ga.map((Xa,Ye)=>{if(!Array.isArray(Xa)){let pr={};for(let rn in Xa)rn!=="id"&&rn!=="index"&&(pr[rn]=Xa[rn]);Xa=Object.values(pr)}return Xa}));const mo=!!((Tl=A.value)!=null&&Tl.find(Xa=>Xa.prop==="index"));Lr=mc(Lr,Xe==null?void 0:Xe.contents,mo);const Rn=[];Lr==null||Lr.forEach((Xa,Ye)=>{var rn;let pr={};if(Array.isArray(Xa)){let Hr=[];Xa==null||Xa.filter(Xr=>!(Xr!=null&&Xr.id)).forEach((Xr,Rr)=>{var si,_i,Si,Nr,Nn,Wn;if((si=Or==null?void 0:Or[Rr])!=null&&si.prop&&!Array.isArray(Xr)){let Ei={};Ei[Or[Rr].column]=Xr,V!=null&&V.value&&((_i=V==null?void 0:V.value)==null?void 0:_i.length)>0&&((Si=V==null?void 0:V.value)!=null&&Si.find(bn=>JSON.stringify(bn==null?void 0:bn[0])===JSON.stringify(Ei)))&&(Hr=(Nr=V==null?void 0:V.value)==null?void 0:Nr.find(bn=>JSON.stringify(bn==null?void 0:bn[0])===JSON.stringify(Ei))),Hr&&Hr.length>0?pr[Or[Rr].prop]=Hr!=null&&Hr.find(bn=>{var Kn;return((Kn=Object.keys(bn))==null?void 0:Kn[0])===Or[Rr].column})?(Nn=Hr==null?void 0:Hr.find(bn=>{var Kn;return((Kn=Object.keys(bn))==null?void 0:Kn[0])===Or[Rr].column}))==null?void 0:Nn[Or[Rr].column]:Xr:pr[Or[Rr].prop]=Xr}else Array.isArray(Xr)&&((Wn=Or[Rr])!=null&&Wn.prop?pr[Or[Rr].prop]=Xr:pr.children=St(Xr,Or))})}else pr=Xa;if(Array.isArray(Xa)&&Xa.some(Hr=>Hr==null?void 0:Hr.id)){const Hr=(rn=Xa==null?void 0:Xa.find(Xr=>Xr.id))==null?void 0:rn.id;Rn.push(Object.assign(pr,{id:uo(Hr)}))}else pr.id?Rn.push(pr):Rn.push(Object.assign(pr,{id:Ye.toString()}))});try{const Xa=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ye=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),pr=Xa==null?void 0:Xa.tableId,rn=Xa==null?void 0:Xa.compIndex;if(pr&&Array.isArray(Ye)&&Ye.length>0&&String(pr)===String(u==null?void 0:u.parentTableId)&&String(rn)===String(u==null?void 0:u.index)){const Hr=new Set(Rn.map(Rr=>String(Rr==null?void 0:Rr.id))),Xr=Ye.filter(Rr=>!Hr.has(String(Rr)));if(Xr.length>0){const Rr=Xa==null?void 0:Xa.pageKey,si=Rr!=null&&Rr.startsWith("/")?Rr.substring(1):Rr;((v==null?void 0:v[Rr])||(v==null?void 0:v[si])||[]).filter(Nr=>{var Nn,Wn;return((Nn=Nr==null?void 0:Nr.key)==null?void 0:Nn.type)==="data"&&String((Wn=Nr==null?void 0:Nr.key)==null?void 0:Wn.tableId)===String(pr)&&Xr.includes(Nr==null?void 0:Nr.id)}).forEach(Nr=>{var Nn;Hr.has(String(Nr==null?void 0:Nr.id))||(Rn.push({id:Nr==null?void 0:Nr.id,...((Nn=Nr==null?void 0:Nr.value)==null?void 0:Nn.tableData)||{}}),Hr.add(String(Nr==null?void 0:Nr.id)))})}}}catch{}let $n=null;try{const Xa=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ye=JSON.parse(sessionStorage.getItem(Xa)||"null");Array.isArray(Ye)&&Ye.length>0&&($n=new Set(Ye.map(pr=>String(pr))))}catch{}const qi=Array.from(((Pa=La.value)==null?void 0:Pa.values())||[]).filter(Xa=>!(!(Xa!=null&&Xa._isOCRRow&&(Xa==null?void 0:Xa._ocrTableId)===(u==null?void 0:u.index))||$n&&$n.has(String(Xa==null?void 0:Xa.id)))),yo=(Ae.value||[]).map(Xa=>String(Xa==null?void 0:Xa.id)),Ql=yi(Rn,yo);if(Ae.value=Ut(Ql,O,A.value),ha.value=Ql,(pl=ha.value)==null||pl.forEach(Xa=>{var Ye;(Ye=La.value)==null||Ye.set(Xa.id,Xa)}),$n&&$n.size>0)try{const Xa=new Set(Array.from($n.values()));Ae.value=(Ae.value||[]).filter(Ye=>!Xa.has(String(Ye==null?void 0:Ye.id))),ha.value=(ha.value||[]).filter(Ye=>!Xa.has(String(Ye==null?void 0:Ye.id))),Xa.forEach(Ye=>{var pr,rn;try{(rn=(pr=La.value)==null?void 0:pr.delete)==null||rn.call(pr,Ye)}catch{}})}catch{}const jr=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ft=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(jr&&Array.isArray(ft)&&ft.length>0&&String(jr==null?void 0:jr.compIndex)===String(u==null?void 0:u.index)){const Xa=new Set((ha.value||[]).map(Ye=>String(Ye==null?void 0:Ye.id)));ft.filter(Ye=>!Xa.has(String(Ye)))}if(qi.length>0){const Xa=new Set((Ae.value||[]).map(pr=>pr==null?void 0:pr.id)),Ye=qi.filter(pr=>!Xa.has(pr.id));Ye.length>0&&(Ae.value=[...Ae.value||[],...Ye],ha.value=[...ha.value||[],...Ye],Ye.forEach(pr=>{var rn;return(rn=La.value)==null?void 0:rn.set(pr.id,pr)}))}}else A.value=[],fe.value=[],Ae.value=[],ha.value=[],La.value=new Map;if(Ba=[...new Set(Ba)],Ba=Ba==null?void 0:Ba.map(ra=>({label:ra,type:"methodButton"})),((al=oe==null?void 0:oe.contents)==null?void 0:al.length)>0?sa.value=oe==null?void 0:oe.contents:sa.value=[],sa.value=[...sa.value,...Ba],ka=[...new Set(ka)],ka=ka==null?void 0:ka.map(ra=>({label:ra,type:"methodButton"})),((hl=ie==null?void 0:ie.contents)==null?void 0:hl.length)>0)if((zr=(Hl=(Ll=p==null?void 0:p.find(ra=>(ra==null?void 0:ra.key)==="filterAllType"))==null?void 0:Ll.value)==null?void 0:Hl.find(ra=>(ra==null?void 0:ra.value)==="onButtonContents"))!=null&&zr.content){let ra=(Nl=(nr=(gr=p==null?void 0:p.find(zl=>(zl==null?void 0:zl.key)==="filterAllType"))==null?void 0:gr.value)==null?void 0:nr.find(zl=>(zl==null?void 0:zl.value)==="onButtonContents"))==null?void 0:Nl.content;if(ra=(Jl=ra==null?void 0:ra.split(":"))==null?void 0:Jl[1],ra=(cr=ra.slice(1,(ra==null?void 0:ra.length)-1))==null?void 0:cr.split(","),Oe.value=(Ol=ie==null?void 0:ie.contents)==null?void 0:Ol.filter(zl=>ra==null?void 0:ra.find(ln=>ln===(zl==null?void 0:zl.label))),Le.value=(ur=ie==null?void 0:ie.contents)==null?void 0:ur.filter(zl=>ra==null?void 0:ra.find(ln=>ln===(zl==null?void 0:zl.label))),(kr=ie==null?void 0:ie.contents)!=null&&kr.some(zl=>(zl==null?void 0:zl.label)==="OCR识别")&&!((dr=Oe.value)!=null&&dr.some(zl=>(zl==null?void 0:zl.label)==="OCR识别"))){const zl=(Cr=ie==null?void 0:ie.contents)==null?void 0:Cr.find(ln=>(ln==null?void 0:ln.label)==="OCR识别");Oe.value=[...Oe.value,zl],Le.value=[...Le.value,zl]}G.value=!!(ra!=null&&ra.find(zl=>zl==="搜索")),$.value=!!(ra!=null&&ra.find(zl=>zl==="块状显示"))}else Oe.value=ie==null?void 0:ie.contents,Le.value=ie==null?void 0:ie.contents;else Oe.value=[],Le.value=[];if(Oe.value=[...Oe.value,...ka],Le.value=[...Le.value,...ka],typeof we.value=="string"&&we.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((an=Oe.value)!=null&&an.some(ra=>(ra==null?void 0:ra.label)==="OCR识别")||(Oe.value=[...Oe.value||[],{label:"OCR识别"}]),(tr=Le.value)!=null&&tr.some(ra=>(ra==null?void 0:ra.label)==="OCR识别")||(Le.value=[...Le.value||[],{label:"OCR识别"}])):(Oe.value=(Oe.value||[]).filter(ra=>(ra==null?void 0:ra.label)!=="OCR识别"),Le.value=(Le.value||[]).filter(ra=>(ra==null?void 0:ra.label)!=="OCR识别")),(Br=Oe.value)!=null&&Br.some(ra=>(ra==null?void 0:ra.label)==="切换视图")||(Oe.value=[...Oe.value||[],{label:"切换视图"}]),(Ir=Le.value)!=null&&Ir.some(ra=>(ra==null?void 0:ra.label)==="切换视图")||(Le.value=[...Le.value||[],{label:"切换视图"}]),Se!=null&&Se.some(ra=>{var zl;return(ra==null?void 0:ra.calculatorFilter)&&((zl=ra==null?void 0:ra.calculatorFilter)==null?void 0:zl.includes("@Button"))})){let ra=(Kt=Se==null?void 0:Se.filter(Or=>{var Vr;return(Or==null?void 0:Or.calculatorFilter)&&((Vr=Or==null?void 0:Or.calculatorFilter)==null?void 0:Vr.includes("@Button"))}))==null?void 0:Kt.map(Or=>Or==null?void 0:Or.calculatorFilter),zl=[],ln=[],qn=[];ra==null||ra.forEach(Or=>{var mo,Rn,$n,qi,yo;let Vr=(mo=te.analyzeSplitToContent(Or,","))==null?void 0:mo.map(Ql=>((Ql==null?void 0:Ql[(Ql==null?void 0:Ql.length)-1])===","&&(Ql=Ql==null?void 0:Ql.slice(0,(Ql==null?void 0:Ql.length)-1)),Ql)),Lr=Vr==null?void 0:Vr.find(Ql=>Ql==null?void 0:Ql.includes("@Button"));if(Vr!=null&&Vr.find(Ql=>Ql==null?void 0:Ql.includes("Manual"))){Lr=($n=(Rn=Lr==null?void 0:Lr.replace("=","$R"))==null?void 0:Rn.split("$R"))==null?void 0:$n[1],Lr=Lr==null?void 0:Lr.slice(1,(Lr==null?void 0:Lr.length)-1);let Ql=(qi=te.analyzeSplitToContent(Lr,","))==null?void 0:qi.map(jr=>((jr==null?void 0:jr[(jr==null?void 0:jr.length)-1])===","&&(jr=jr==null?void 0:jr.slice(0,(jr==null?void 0:jr.length)-1)),jr));Ql=Ql==null?void 0:Ql[0],Ql=Ql==null?void 0:Ql.slice(1,(Ql==null?void 0:Ql.length)-1),Ql=(yo=Ql==null?void 0:Ql.split(","))==null?void 0:yo.map(jr=>({label:jr,prop:jr})),Lr!=null&&Lr.includes("Up")?zl=[...zl,...Ql??[]]:Lr!=null&&Lr.includes("Line")?ln=[...ln,...Ql??[]]:qn=[...qn,...Ql??[]]}}),Oe.value=[...zl,...Oe.value??[]],sa.value=[...ln,...sa.value??[]],qn.value=[...qn,...qn.value??[]]}Ta.value=((Gt=Ae==null?void 0:Ae.value)==null?void 0:Gt.length)??0,jt(Ae.value),Ur.value=Ae.value,Yl.value&&(A.value=(Jt=(Yt=fe.value)==null?void 0:Yt.filter(ra=>(ra==null?void 0:ra.label)!=="操作"))==null?void 0:Jt.map(ra=>{var zl;return{...ra,type:"edit",optionUrl:ra!=null&&ra.formMenuSelect&&((zl=ra==null?void 0:ra.formMenuSelect)==null?void 0:zl.length)>0?{groupSelect:ra==null?void 0:ra.groupSelect,menuSelect:ra==null?void 0:ra.formMenuSelect,selectRelateType:"",type:ra==null?void 0:ra.formType}:null}}),pt())};e.watch(()=>[u.itemData,sr.value,Zr.value,Kr.value,V==null?void 0:V.value],async()=>{var p,v,N,O,P,T;if((p=u==null?void 0:u.itemData)!=null&&p.find(oe=>(oe==null?void 0:oe.key)==="columnPath")&&!((v=Z.value)!=null&&v.find(oe=>{var ie,q;return(oe==null?void 0:oe.key)===((q=(ie=u==null?void 0:u.itemData)==null?void 0:ie.find(xe=>(xe==null?void 0:xe.key)==="columnPath"))==null?void 0:q.contents)}))){let oe=Z.value,ie={key:(O=(N=u==null?void 0:u.itemData)==null?void 0:N.find(q=>(q==null?void 0:q.key)==="columnPath"))==null?void 0:O.contents,value:(T=(P=u==null?void 0:u.itemData)==null?void 0:P.find(q=>(q==null?void 0:q.key)==="columnUsingPath"))==null?void 0:T.contents};oe!=null&&oe.find(q=>(q==null?void 0:q.key)===(ie==null?void 0:ie.key))?oe=oe==null?void 0:oe.map(q=>((q==null?void 0:q.key)===(ie==null?void 0:ie.key)&&(q.value=ie.value),q)):oe.push(ie),fa.setTableViewContents(oe)}await qt(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.operatingForm,p=>{p!=null&&p.form&&(ji(p==null?void 0:p.form),ma.value=p==null?void 0:p.dialogTitle,Va.value=!0,Je.value=!0)},{immediate:!0,deep:!0});const wu=()=>{var p;(p=k.value)!=null&&p.includes("read")&&(Yl.value=!Yl.value)},_u=()=>{Tr.value=!Tr.value};e.watch(()=>{var p;return(p=u==null?void 0:u.config)==null?void 0:p.viewport},p=>{var v;k.value=p,(p==null?void 0:p.length)===0?Yl.value=!1:(p!=null&&p.includes("read")||(Yl.value=!0),p!=null&&p.includes("edit")||(Yl.value=!1)),I.value=((v=u==null?void 0:u.config)==null?void 0:v.showIndex)||Yl.value},{immediate:!0}),e.watch(()=>Yl.value,p=>{var v;p?(pt("viewChange"),fa.setCacheUpdatingData(null)):(Oe.value=Le.value,A.value=Ea.value,H.value&&(fa.setTableLoading(u==null?void 0:u.index),de("change",H.value))),I.value=p||((v=u==null?void 0:u.config)==null?void 0:v.showIndex),Xl.value=[]},{immediate:!0}),e.watch(()=>{var p;return(p=Sn.value)==null?void 0:p.length},p=>{p===0&&(me.currentPage=1)}),e.watch(()=>u==null?void 0:u.compNames,p=>{f.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:p||[],width:1}]},{immediate:!0}),e.ref(!1);const Su=(p,v)=>{var N;pt("createClick"),v===me.pageSize&&(me.currentPage=Math.ceil(((N=Ae.value)==null?void 0:N.length)/me.pageSize))},Eu=async(p,v,N)=>{var P,T,oe,ie,q;const O=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(O&&ho.includes(O)&&N!==void 0&&N!==null&&String(N).trim()!==""){const xe=String(N).trim();if(await dt(xe,p==null?void 0:p.id)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ge=(P=Ae.value)==null?void 0:P.findIndex(Xe=>(Xe==null?void 0:Xe.id)===(p==null?void 0:p.id)),qe=Ge!==-1?(oe=(T=Ae.value)==null?void 0:T[Ge])==null?void 0:oe[O]:void 0;O&&(p[O]=qe??"");return}}if(Yl.value){const xe=p==null?void 0:p.id;xe!=null&&(h.value.has(xe)||h.value.set(xe,M.cloneDeep(p)),s.value.add(xe));const Se=(ie=Ae.value)==null?void 0:ie.findIndex(Ge=>(Ge==null?void 0:Ge.id)===(p==null?void 0:p.id));Se!==-1&&O&&(Ae.value[Se]={...Ae.value[Se],[O]:N}),vo(N,p,v);return}vo(N,p,v),Pl.value=M.cloneDeep(p),Aa.value=p==null?void 0:p.id,Ta.value=(q=Ae.value)==null?void 0:q.length,ma.value=p!=null&&p._isTemp?"新增":"编辑",Ui(!1)},Cu=async()=>{var p,v;try{const N=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(O=>{if(typeof O=="string"&&O.includes("content_")){const P=O.split("_")[1];P&&(N.push(`content_${P}`),N.push(`struct_${P}`))}})),N.length===0&&(u!=null&&u.itemData)){const O=(v=(p=u.itemData)==null?void 0:p.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:v.contents;O&&(N.push(`content_${O}`),N.push(`struct_${O}`))}return N}catch(N){return console.error("获取 tableNames 失败:",N),[]}},Du=async(p,v,N)=>{var T,oe;if(!N||typeof N!="string"||N.trim()===""){const ie=(v==null?void 0:v.property)??(v==null?void 0:v.prop),q=`${p==null?void 0:p.id}:${ie}`;d.value.delete(q),g.value.set(q,!1);return}const O=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=`${p==null?void 0:p.id}:${O}`;g.value.set(P,!0);try{const ie=await Cu();if(ie.length===0){console.warn("未找到同名表,跳过全局搜索"),d.value.delete(P),g.value.set(P,!1);return}const q=parseInt((T=xl.value)==null?void 0:T.plat_id);if(!q){console.warn("platId 无效,跳过全局搜索"),d.value.delete(P),g.value.set(P,!1);return}const xe=await M.getAllTables({platId:q,tableNames:ie??[]}),Se=((oe=xe==null?void 0:xe.data)==null?void 0:oe.result)||[],Ge=[],qe=[];for(let Xe=0;Xe<Se.length;Xe+=2)Xe+1<Se.length&&qe.push([Se[Xe],Se[Xe+1]]);qe.forEach(([Xe,ka])=>{var il;if(!Array.isArray(Xe)||Xe.length===0||!Array.isArray(ka)||ka.length===0)return;const Ba=ka[0];let $a=((il=Ba==null?void 0:Ba.结构)==null?void 0:il.contents)??[];if(!Array.isArray($a)||$a.length===0)return;let Ze=M.cloneDeep($a);if(Array.isArray(Ze==null?void 0:Ze[0])&&(Ze=te.getColumnChild(Ze[0])),!Array.isArray(Ze)||Ze.length===0||!Ze.some(ye=>(ye==null?void 0:ye.prop)===O))return;[...Xe].sort((ye,Fa)=>{const ya=Number((ye==null?void 0:ye.update_time)??0);return Number((Fa==null?void 0:Fa.update_time)??0)-ya}).slice(0,20).forEach(ye=>{const Fa=ye[O];if(Fa!=null){const ya=String(Fa);ya.toLowerCase().includes(N.toLowerCase())&&Ge.findIndex(Oa=>{var D;return ye.id&&((D=Oa.rowData)==null?void 0:D.id)===ye.id?!0:Oa.label===ya})===-1&&Ge.push({label:ya,rowData:M.cloneDeep(ye),sourceTable:(Ba==null?void 0:Ba.source_table)||""})}})}),d.value.set(P,Ge)}catch(ie){console.error("全局搜索建议失败:",ie),d.value.delete(P)}finally{g.value.set(P,!1)}},Tu=(p,v,N)=>{if(!Yl.value)return;const O=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(P&&P.toUpperCase()!=="INPUT"&&P!=="")return;const T=`${p==null?void 0:p.id}:${O}`;if(m.has(T)&&clearTimeout(m.get(T)),!N||N.trim()===""){d.value.delete(T),g.value.set(T,!1);return}const oe=setTimeout(()=>{Du(p,{prop:O,property:O},N),m.delete(T)},300);m.set(T,oe)};function Bu(p,v){const N=`${p==null?void 0:p.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return d.value.get(N)||[]}const Nu=(p,v,N)=>{var xe;if(!N||!N.rowData)return;const O=N.rowData,P=p==null?void 0:p.id,T=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(te.getAllLeafNodes(A.value)||[]).filter(Se=>(Se==null?void 0:Se.type)!=="operate"&&(Se==null?void 0:Se.label)!=="操作"&&(Se==null?void 0:Se.prop)!=="operate").forEach(Se=>{const Ge=Se==null?void 0:Se.prop;Ge&&O[Ge]!==void 0&&(p[Ge]=O[Ge])}),(xe=Ae.value)==null||xe.findIndex(Se=>(Se==null?void 0:Se.id)===P),P!=null&&(h.value.has(P)||h.value.set(P,M.cloneDeep(p)),s.value.add(P));const q=`${P}:${T}`;d.value.delete(q),g.value.set(q,!1),vo(p[T],p,v)},tn=p=>{var q,xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze,rl;const{row:v,column:N,item:O,slotData:P}=p;let T=v!=null&&v[N==null?void 0:N.prop]||(v==null?void 0:v[N==null?void 0:N.prop])===0?((xe=(q=v==null?void 0:v[N==null?void 0:N.prop])==null?void 0:q[0])==null?void 0:xe.contents)??((v==null?void 0:v[N==null?void 0:N.prop])===0?"0":v==null?void 0:v[N==null?void 0:N.prop]):((Ge=(Se=v==null?void 0:v[O==null?void 0:O.prop])==null?void 0:Se[0])==null?void 0:Ge.contents)??(v==null?void 0:v[O==null?void 0:O.prop])??((Xe=(qe=P==null?void 0:P[O==null?void 0:O.prop])==null?void 0:qe[0])==null?void 0:Xe.contents)??(P==null?void 0:P[O==null?void 0:O.prop])??(($a=(Ba=v==null?void 0:v[(ka=O==null?void 0:O.child)==null?void 0:ka.prop])==null?void 0:Ba[0])==null?void 0:$a.contents)??(v==null?void 0:v[(Ze=O==null?void 0:O.child)==null?void 0:Ze.prop]),ie=Array.isArray(T)&&!(T!=null&&T.every(xa=>typeof xa=="string"||typeof xa=="number"))?"查看":T;if(ie=Array.isArray(ie)?ie.join(","):ie,(N==null?void 0:N.formType)==="Date")if(!ie||ie===""||ie===null||ie===void 0)ie="";else{const xa=M.dayjs(ie,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ie=xa.isValid()?xa.format("YYYYMMDD"):ie??""}return Array.isArray(N==null?void 0:N.relatedPages)&&((rl=N==null?void 0:N.relatedPages)==null?void 0:rl.length)>0&&(ie="详情页"),ie},Au=p=>{var xe,Se,Ge,qe,Xe,ka,Ba,$a,Ze,rl;const{row:v,column:N,item:O,slotData:P}=p;let T=v!=null&&v[N==null?void 0:N.prop]?((Se=(xe=v==null?void 0:v[N==null?void 0:N.prop])==null?void 0:xe[0])==null?void 0:Se.contents)??(v==null?void 0:v[N==null?void 0:N.prop]):((qe=(Ge=v==null?void 0:v[O==null?void 0:O.prop])==null?void 0:Ge[0])==null?void 0:qe.contents)??(v==null?void 0:v[O==null?void 0:O.prop])??((ka=(Xe=P==null?void 0:P[O==null?void 0:O.prop])==null?void 0:Xe[0])==null?void 0:ka.contents)??(P==null?void 0:P[O==null?void 0:O.prop])??((Ze=($a=v==null?void 0:v[(Ba=O==null?void 0:O.child)==null?void 0:Ba.prop])==null?void 0:$a[0])==null?void 0:Ze.contents)??(v==null?void 0:v[(rl=O==null?void 0:O.child)==null?void 0:rl.prop]);const ie=Array.isArray(T)&&!(T!=null&&T.every(xa=>typeof xa=="string"||typeof xa=="number")),q=Array.isArray(T)&&(T==null?void 0:T.find(xa=>xa==null?void 0:xa.url));return ie&&q},zu=p=>{var P,T,oe,ie;if(!(p!=null&&p.column))return!1;const v=we.value==="试验任务/任务管理",N=(u==null?void 0:u.compName)==="任务列表",O=((T=(P=p==null?void 0:p.column)==null?void 0:P.filter)==null?void 0:T.includes("@TextRGBA"))||((ie=(oe=p==null?void 0:p.column)==null?void 0:oe.filter)==null?void 0:ie.includes("@TextBackRGBA"));return v&&N&&O},Mu=(p,v)=>p.find(N=>Object.values(N).some(O=>O===v));return e.watch(()=>he.value,async p=>{if(p){ce.setContentLoading(!0),await e.nextTick();const v=Mu(Ae.value,p==null?void 0:p.data);if(!v)return ce.setContentLoading(!1);await Fi(p==null?void 0:p.data,null,v,{data:p==null?void 0:p.data}),ce.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.cacheNewData,p=>{var v;p&&(Array.isArray(p)?p.forEach(N=>{var O,P,T,oe,ie;if(换,String(N==null?void 0:N.compId)===String(u==null?void 0:u.index)&&(N!=null&&N.resId)&&((O=N==null?void 0:N.data)!=null&&O.id)){const q=(P=N==null?void 0:N.data)==null?void 0:P.id,xe=N==null?void 0:N.resId;if(Ae.value=(T=Ae.value)==null?void 0:T.map(Se=>{if((Se==null?void 0:Se.id)===q){const Ge={...Se,id:xe};return delete Ge._isOCRRow,delete Ge._ocrTableId,Ge}return Se}),(ie=(oe=La.value)==null?void 0:oe.has)!=null&&ie.call(oe,q)){const Ge={...La.value.get(q)||{},id:xe};delete Ge._isOCRRow,delete Ge._ocrTableId,La.value.delete(q),La.value.set(xe,Ge)}Ul(u==null?void 0:u.index,q,xe)}}):String(p==null?void 0:p.compId)===String(u==null?void 0:u.index)&&(Ae.value=(v=Ae.value)==null?void 0:v.map(N=>{var O;if((N==null?void 0:N.id)===((O=p==null?void 0:p.data)==null?void 0:O.id)){const P={...N,id:p==null?void 0:p.resId};return delete P._isOCRRow,delete P._ocrTableId,P}return N})))},{immediate:!0,deep:!0}),(p,v)=>{var Ze,rl,xa,il;const N=e.resolveComponent("svg-icon"),O=e.resolveComponent("el-popover"),P=e.resolveComponent("el-switch"),T=e.resolveComponent("el-checkbox"),oe=e.resolveComponent("el-radio"),ie=e.resolveComponent("el-radio-group"),q=e.resolveComponent("el-checkbox-group"),xe=e.resolveComponent("el-button"),Se=e.resolveComponent("el-icon"),Ge=e.resolveComponent("el-progress"),qe=e.resolveComponent("el-alert"),Xe=e.resolveComponent("el-table-column"),ka=e.resolveComponent("el-table"),Ba=e.resolveComponent("el-upload"),$a=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",Q0,[Er.value?(e.openBlock(),e.createBlock(dl.ssTable,{id:"excel-table",pageObj:me,showIndex:I.value,isTree:(Ze=a.compItem)==null?void 0:Ze.isTree,summaryInfo:Q,columns:A.value,defaultSort:re,isCardViewport:Tr.value,checkedColumns:n.value,key:Wr.value+JSON.stringify(A.value),tableData:Sn.value,isEditViewport:Yl.value,isShowPagination:Ce.value,isShowEdit:!1,isShowDelete:!1,allowSelect:C.value,onDbClickRow:zn,extraButton:Oe.value,rowButton:sa.value,cacheExtraButtons:Le.value,isClearSelection:((rl=Xl.value)==null?void 0:rl.length)===0,onDoCurrentChange:Ii,onDoSizeChange:Ho,onSortChange:Uo,onContentClick:Fi,onRowClick:lt,onSelectChange:Xo,onCellChange:Eu,onCellInput:Tu,onSelectSuggest:Nu,onChange:vo,onPreview:so,onSubmitEditingTable:ro,onHandleColEditChange:ao,onHandleColTypeChange:nn,onClickButton:ct,onAddNewRow:Go,bottomButton:j.value,allowRowAddOrDelete:oi.value},e.createSlots({headerButton:e.withCtx(ye=>{var Fa,ya,Ka,Oa;return[a.showHeader?(e.openBlock(),e.createBlock(Bf,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(pa)===e.unref(we),filterValues:at.value,selectNums:(Fa=Xl.value)==null?void 0:Fa.length,dataNums:(ya=Ae.value)==null?void 0:ya.length,compName:a.compName,isDevMode:a.isDevMode,buttons:ye.buttons,menuFilter:(Oa=(Ka=a.compItem)==null?void 0:Ka.component)==null?void 0:Oa.menuFilter,onButtonClick:v[1]||(v[1]=(D,K,Pe)=>ct(D,K,{extra:Pe})),columns:A.value,onFilter:po,onGetImportData:Wo,level:a.level,filterShow:G.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var ye,Fa,ya,Ka;return[((ye=Ae.value)==null?void 0:ye.length)>0&&a.allowOperate&&$.value?(e.openBlock(),e.createElementBlock("div",l3,[(Fa=k.value)!=null&&Fa.includes("read")&&((ya=k.value)!=null&&ya.includes("edit"))&&((Ka=sa.value)!=null&&Ka.some(Oa=>(Oa==null?void 0:Oa.label)==="编辑"))&&!Tr.value&&e.unref(pa)!==e.unref(we)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:wu},[e.createVNode(N,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:ye,index:Fa})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ya=>Su(ye,Fa)},[e.createVNode(N,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,r3)]),operateCol:e.withCtx(()=>[e.createVNode(O,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:mu,onBeforeEnter:yu},{reference:e.withCtx(()=>[e.createElementVNode("span",n3,[e.createVNode(N,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",i3,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(P,{"model-value":F.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=ye=>oo(ye))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(q,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=ye=>n.value=ye),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(kn.value,ye=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ye.label},[e.createVNode(T,{value:ye.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:ye.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(ye.label),9,o3)]),_:2},1032,["value"]),e.createVNode(O,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(N,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Fa;return[e.createElementVNode("div",t3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Fa=Object.keys(ye))==null?void 0:Fa.filter(ya=>{var Ka;return(Ka=_.value)==null?void 0:Ka.find(Oa=>(Oa==null?void 0:Oa.value)===ya)}),ya=>{var Ka,Oa;return e.openBlock(),e.createElementBlock("div",{key:ya},[L[ya]=="radio"?(e.openBlock(),e.createElementBlock("div",s3,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(ie,{"model-value":ye==null?void 0:ye[ya],onChange:D=>ai(D,ya,ye)},{default:e.withCtx(()=>{var D,K;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((K=(D=_.value)==null?void 0:D.find(Pe=>(Pe==null?void 0:Pe.value)===ya))==null?void 0:K.options,Pe=>(e.openBlock(),e.createBlock(oe,{key:Pe==null?void 0:Pe.value,label:Pe==null?void 0:Pe.value,value:Pe==null?void 0:Pe.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Pe==null?void 0:Pe.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),L[ya]=="switch"?(e.openBlock(),e.createBlock(P,{key:1,"model-value":ye==null?void 0:ye[ya],"active-text":(Oa=(Ka=_.value)==null?void 0:Ka.find(D=>(D==null?void 0:D.value)===ya))==null?void 0:Oa.label,onChange:D=>ai(D,ya,ye)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",c3,[e.createVNode(N,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(ye=>{var Fa,ya,Ka,Oa,D,K,Pe,ea,De,Qe,Na,tl,Wa,kl,ml,ar,Ga,Tl,Pa,pl;return[((Fa=ye==null?void 0:ye.column)==null?void 0:Fa.label)==="证书附件"||((ya=ye==null?void 0:ye.column)==null?void 0:ya.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",u3,[e.createVNode(N,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(al=>xi(ye),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Au(ye)?(e.openBlock(),e.createBlock(O,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",d3,e.toDisplayString(tn(ye)),1)]),default:e.withCtx(()=>{var al,hl;return[e.createElementVNode("div",p3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((hl=ye==null?void 0:ye.row)==null?void 0:hl[(al=ye==null?void 0:ye.column)==null?void 0:al.prop],Ll=>(e.openBlock(),e.createElementBlock("div",f3,[e.createElementVNode("div",{class:"prop-url",title:ri(Ll),onClick:Hl=>gi(Ll)},e.toDisplayString(ri(Ll)),9,h3),e.createElementVNode("div",{class:"prop-download",onClick:Hl=>Qo(Ll)}," 下载 ",8,v3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[zu(ye)?(e.openBlock(),e.createBlock(Hu,{key:0,value:tn(ye),columnContent:ye==null?void 0:ye.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(tn(ye))&&((Oa=(Ka=tn(ye))==null?void 0:Ka.toString())!=null&&Oa.includes(".txt")||(K=(D=tn(ye))==null?void 0:D.toString())!=null&&K.includes(".cpt")||(ea=(Pe=tn(ye))==null?void 0:Pe.toString())!=null&&ea.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(tn(ye))&&((Qe=(De=tn(ye))==null?void 0:De.toString())!=null&&Qe.includes(".txt")||(tl=(Na=tn(ye))==null?void 0:Na.toString())!=null&&tl.includes(".cpt")||(kl=(Wa=tn(ye))==null?void 0:Wa.toString())!=null&&kl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(tn(ye))&&((ar=(ml=tn(ye))==null?void 0:ml.toString())!=null&&ar.includes(".txt")||(Tl=(Ga=tn(ye))==null?void 0:Ga.toString())!=null&&Tl.includes(".cpt")||(pl=(Pa=tn(ye))==null?void 0:Pa.toString())!=null&&pl.includes(".cyd"))?"pointer":"",marginLeft:(ye==null?void 0:ye.colIndex)===0?`${((ye==null?void 0:ye.level)??0)*20}px`:0}),onClick:al=>{var hl;return Qn(tn(ye),((hl=ye==null?void 0:ye.column)==null?void 0:hl.relatedPages)??[])}},e.toDisplayString(tn(ye)===0?"0":tn(ye)),13,m3))],64))]}),_:2},[((xa=sa.value)==null?void 0:xa.length)>0?{name:"actions",fn:e.withCtx(({item:ye,fIndex:Fa})=>[e.createVNode(O,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(N,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",e3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Vi(sa.value,ye),(ya,Ka)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ka,onClick:e.withModifiers(Oa=>ct(ya==null?void 0:ya.label,ye,{extra:ya}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:ya==null?void 0:ya.textColor}),class:"extra-button-label"},e.toDisplayString(ya==null?void 0:ya.label),5)],8,a3))),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","allowRowAddOrDelete"])):e.createCommentVNode("",!0),Yl.value?(e.openBlock(),e.createElementBlock("div",y3,[e.createVNode(xe,{id:"themeBorderButton",onClick:Jo},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(xe,{class:"ok-button",id:"themeButton",onClick:Li},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(Mr.ssDialog,{title:ma.value,visible:Je.value,width:hr.value,onBeforeDestroy:to,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",g3,[e.createVNode(dl.ssForm,{ref_key:"formRef",ref:W,rowContents:Be.value,showOperator:!1,onChange:gu,isEnableWrap:!1,onFixChangeValue:et,onClickTrigger:li,isEdit:ua.value,onBlurChange:no,onCreate:mi,onTagChange:Ln},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Va.value?(e.openBlock(),e.createElementBlock("div",b3,[e.createVNode(xe,{onClick:v[4]||(v[4]=ye=>Je.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(xe,{class:"ok-button",onClick:v[5]||(v[5]=ye=>Ui(!0)),id:"themeButton"},{default:e.withCtx(()=>v[25]||(v[25]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[25]})])):e.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),e.createVNode(Mr.ssDialog,{title:ma.value,visible:je.value,width:We.value,onBeforeDestroy:v[7]||(v[7]=ye=>je.value=!1)},{default:e.withCtx(()=>[e.createVNode(Pf)]),footer:e.withCtx(()=>[e.createElementVNode("div",k3,[e.createVNode(xe,{onClick:v[6]||(v[6]=ye=>je.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(xe,{class:"ok-button",onClick:rt,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ne.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:2,fileDataList:ta.value,onDestroy:Pi},null,8,["fileDataList"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createBlock(Mr.ssDialog,{key:3,visible:$e.value,onBeforeDestroy:hu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:Re.value,threeData:B.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Mr.ssDialog,{title:"OCR扫描录入",visible:Ua.value,"close-on-click-modal":!1,onBeforeDestroy:Fl,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:e.withCtx(()=>[v[38]||(v[38]=e.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),e.createElementVNode("div",x3,[e.createElementVNode("div",w3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ra.value===1}])},v[28]||(v[28]=[e.createElementVNode("div",{class:"step-circle"},"1",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),v[31]||(v[31]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ra.value===2}])},v[29]||(v[29]=[e.createElementVNode("div",{class:"step-circle"},"2",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),v[32]||(v[32]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ra.value===3}])},v[30]||(v[30]=[e.createElementVNode("div",{class:"step-circle"},"3",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),Ra.value===1?(e.openBlock(),e.createElementBlock("div",_3,[e.createVNode(xe,{onClick:t,class:"ocr-action-btn",disabled:ql.value,size:"default"},{default:e.withCtx(()=>v[33]||(v[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(xe,{onClick:dn,class:"ocr-action-btn",disabled:ql.value,size:"default"},{default:e.withCtx(()=>v[34]||(v[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),Ra.value===1?(e.openBlock(),e.createElementBlock("div",S3,[e.createElementVNode("div",E3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Il.value,(ye,Fa)=>{var ya;return e.openBlock(),e.createElementBlock("div",{key:Fa,class:"ocr-file-item"},[e.createElementVNode("div",C3,[ye.raw&&((ya=ye.raw.type)!=null&&ya.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:Zl(ye),alt:"预览",class:"thumbnail-image"},null,8,D3)):(e.openBlock(),e.createElementBlock("div",T3,[e.createVNode(Se,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:jl(ye)==="uploading",processing:jl(ye)==="processing",completed:jl(ye)==="completed"||jl(ye)==="uploaded",failed:jl(ye)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",B3,[v[35]||(v[35]=e.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),e.createElementVNode("circle",{class:e.normalizeClass(["progress-ring-fill",{completed:jl(ye)==="completed"||jl(ye)==="uploaded",uploading:jl(ye)==="uploading",processing:jl(ye)==="processing",failed:jl(ye)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:jl(ye)==="failed"?"#f56c6c":jl(ye)==="completed"||jl(ye)==="uploaded"?"#67c23a":"#409eff","stroke-width":jl(ye)==="completed"||jl(ye)==="uploaded"||jl(ye)==="failed"?3:2,"stroke-dasharray":on(ye),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,N3)])),jl(ye)==="completed"||jl(ye)==="uploaded"?(e.openBlock(),e.createElementBlock("div",A3,[e.createVNode(Se,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:1})])):e.createCommentVNode("",!0),jl(ye)==="failed"?(e.openBlock(),e.createElementBlock("div",z3,[e.createVNode(Se,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ka=>uu(Fa)},[e.createVNode(Se,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.close_default))]),_:1})],8,M3)]),e.createElementVNode("div",I3,e.toDisplayString(ye.name||"文件名123"),1)])}),128))]),Il.value.length>0?(e.openBlock(),e.createElementBlock("div",O3,[e.createVNode(xe,{onClick:la,class:"ocr-start-recognize-btn",disabled:ql.value||Il.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ra.value===1?(e.openBlock(),e.createElementBlock("div",L3,[e.createVNode(Ge,{percentage:za.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),Ra.value===2?(e.openBlock(),e.createElementBlock("div",R3,[e.createElementVNode("div",$3,[e.createVNode(qe,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",V3,[e.createVNode(ka,{data:Ha.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(Xe,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Dl.value,ye=>(e.openBlock(),e.createBlock(Xe,{key:ye.prop,prop:ye.prop,"min-width":ye.minWidth||230,"class-name":ye.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",F3,[e.createElementVNode("span",null,e.toDisplayString(ye.label),1)])]),default:e.withCtx(({row:Fa,$index:ya})=>{var Ka,Oa,D;return[ye.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:Bl(Fa[ye.prop]),fontWeight:500})},e.toDisplayString(cl(Fa[ye.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Ya.value!==ya?(e.openBlock(),e.createElementBlock("span",P3,e.toDisplayString(Fa[ye.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(na(ye.prop)),{key:1,modelValue:Fa[ye.prop],"onUpdate:modelValue":K=>Fa[ye.prop]=K,size:"small",placeholder:"请输入"+ye.label,content:((Ka=Te(ye.prop))==null?void 0:Ka.contents)??((Oa=Te(ye.prop))==null?void 0:Oa.options)??[],optionUrl:(D=Te(ye.prop))==null?void 0:D.optionUrl,onChange:K=>el(ya,ye.prop,K),onFocus:K=>vl.value=ye.prop,onBlur:v[8]||(v[8]=K=>vl.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(Xe,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:ye})=>[Ya.value===ye?(e.openBlock(),e.createBlock(Se,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Fa=>Sl(ye),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(N,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers(Fa=>Sl(ye),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),Ra.value===3?(e.openBlock(),e.createElementBlock("div",j3,[e.createVNode(Se,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:1}),v[37]||(v[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(Ba,{ref:"ocrUploadRef","file-list":Il.value,"onUpdate:fileList":v[9]||(v[9]=ye=>Il.value=ye),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":Ue,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[Ra.value!==3?(e.openBlock(),e.createElementBlock("div",H3,[e.createVNode(xe,{onClick:xn,class:"ocr-start-recognize-btn",disabled:Ra.value===1||ql.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(xe,{onClick:Bn,class:"ocr-start-recognize-btn",disabled:ql.value},{default:e.withCtx(()=>v[40]||(v[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(i0,{visible:ki.value,onConfirm:o,onCancel:v[10]||(v[10]=ye=>ki.value=!1)},null,8,["visible"]),e.createVNode(Sd,{visible:_l.value,"onUpdate:visible":v[11]||(v[11]=ye=>_l.value=ye),versions:xr.value},null,8,["visible","versions"]),e.createVNode(ud,{visible:wl.value,"onUpdate:visible":v[12]||(v[12]=ye=>wl.value=ye),images:Ie.value,"default-image-name":ba.value,"field-meta":Ya.value!==null?((il=Ha.value[Ya.value])==null?void 0:il.__ocrFieldMeta)||{}:{},"focused-field-name":vl.value,onClose:v[13]||(v[13]=ye=>wl.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Rd,{visible:oa.value,"onUpdate:visible":v[14]||(v[14]=ye=>oa.value=ye),candidates:wa.value,"name-prop":Kl.value,"mfr-prop":Ca.value,columns:A.value,onSubmit:$l,onPreviewFile:ti},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(Ud,{visible:da.value,"onUpdate:visible":v[15]||(v[15]=ye=>da.value=ye),ocrPreviewData:Ha.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=ye=>Ha.value=ye),ocrSelectedFields:Ma.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=ye=>Ma.value=ye),ocrPreviewColumns:Dl.value,onConfirm:ll,onFieldChange:v[18]||(v[18]=({rowIndex:ye,prop:Fa,value:ya})=>el(ye,Fa,ya))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(Mr.ssDialog,{title:f.title,visible:f.show,width:f.width,onBeforeDestroy:ae},{default:e.withCtx(()=>[e.createElementVNode("div",U3,[e.createVNode(dl.ssForm,{rowContents:f==null?void 0:f.contents,formRules:f==null?void 0:f.formRules,showOperator:!1,buttonValue:f.buttonValue,isEdit:ua.value,isStartJustify:!1,onOnButtonClick:ke},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(Mr.ssDialog,{title:"",visible:y.show,width:y.width,alignCenter:!0,onBeforeDestroy:S},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",q3,e.toDisplayString(y.title),1),e.createVNode($a,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",W3,[e.createVNode($a,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(Hn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",K3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y==null?void 0:y.buttonValue,ye=>(e.openBlock(),e.createBlock(xe,{key:ye==null?void 0:ye.label,style:e.normalizeStyle({background:ye==null?void 0:ye.background,color:ye==null?void 0:ye.color}),onClick:Fa=>Y(ye==null?void 0:ye.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ye==null?void 0:ye.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(Nf,{columns:y==null?void 0:y.columns,tableData:y==null?void 0:y.tableData},{content:e.withCtx(({row:ye,item:Fa,slotData:ya,scope:Ka,column:Oa,columnProp:D,$index:K})=>[e.createTextVNode(e.toDisplayString((ye==null?void 0:ye[Oa==null?void 0:Oa.prop])||(ye==null?void 0:ye[Oa==null?void 0:Oa.label])||(ye==null?void 0:ye[Oa==null?void 0:Oa.property])||(ya==null?void 0:ya[Oa==null?void 0:Oa.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"])])}}},Ic=ir._export_sfc(Y3,[["__scopeId","data-v-fe38ced7"]]),J3={key:1,class:"static-form-body"},X3=["onClick"],Z3={key:1},Q3=e.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},backgroundUrl:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,i=w=>{switch(w){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},s=e.computed(()=>{var F;const w=(F=n.itemData)==null?void 0:F.find($=>($==null?void 0:$.key)==="formContent"),b=(w==null?void 0:w.contents)||[];return(n.fields&&n.fields.length>0?n.fields:b).filter($=>($==null?void 0:$.label)||($==null?void 0:$.isHideInForm)).map($=>{let le=$==null?void 0:$.value;Array.isArray(le)&&(le=le.map(A=>A==null?"":typeof A=="object"?A.label??A.value??A.name??JSON.stringify(A):String(A)).filter(Boolean).join(",")),le!=null&&typeof le=="object"&&(le=le.label??le.value??le.name??JSON.stringify(le));const Q=$.isHideInForm?"":$.label??"",me=le==null||le===""?"-":String(le),de=Q==="使用状态";return{label:Q,value:me,isStatus:de,tagType:de?i(me):"",width:$.width??1,field:$}})}),h=e.ref(null),c=e.ref(null),d=e.computed(()=>{const w=Number(n==null?void 0:n.textSize),b=te.rgbaToColor(n==null?void 0:n.textColor),E={},F={},$={},le={};return!Number.isNaN(w)&&w&&(E.fontSize=`${w}px`,F.fontSize=`${w+1}px`,$.fontSize=`${w}px`,le.fontSize=`${w}px`),b&&(F.color=b,$.color=b,le.color=b),{item:E,label:F,value:$,empty:le}}),m=e.ref(""),g=e.ref(""),u=e.ref(!1),C=async w=>{if(w){g.value&&(URL.revokeObjectURL(g.value),g.value="");try{const b=await M.platformDownloadFile({url:w}),E=new Blob([b==null?void 0:b.data],{type:(b==null?void 0:b.headers["content-type"])||"image/*"});g.value=URL.createObjectURL(E)}catch{g.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,w=>{w&&(m.value=w)},{immediate:!0}),e.watch(m,w=>{C(w)},{immediate:!0});const I=()=>{var w;(w=c.value)==null||w.click()},k=async w=>{var F,$,le;const b=w.target,E=(F=b==null?void 0:b.files)==null?void 0:F[0];if(!E){b.value="";return}u.value=!0;try{const Q=new FormData;Q.append("file",E);const me=await M.platformUploadFile(Q),de=(le=($=me==null?void 0:me.data)==null?void 0:$.result)==null?void 0:le.url;de?(m.value=de,r("update:backGroundImage",de),C(de),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{u.value=!1,b.value=""}},G=e.computed(()=>{var w;return g.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(w=n==null?void 0:n.backgroundUrl)==null?void 0:w.replace(/\\/g,"/")}")`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),z=w=>dl.getComponent(w),j=w=>{if(!w)return;const b=w.querySelector("input, textarea, .el-input__inner");b&&typeof b.focus=="function"&&b.focus()},L=(w,b,E)=>{n.disabled||(h.value=b,e.nextTick(()=>{j(E.currentTarget)}))},_=()=>{h.value=null},x=w=>{const b=w!=null&&w.width&&w.width>0?w.width:1,F=`calc((100% - ${(b-1)*48}px) / ${b})`;return{flex:`0 0 ${F}`,maxWidth:F,minWidth:"0",boxSizing:"border-box"}};return(w,b)=>{const E=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(G.value),onClick:b[2]||(b[2]=F=>(n==null?void 0:n.backGround)==="Yes"&&I())},[(n==null?void 0:n.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:b[0]||(b[0]=e.withModifiers(F=>I(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:k},null,544),b[3]||(b[3]=e.createElementVNode("img",{src:dl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),s.value.length?(e.openBlock(),e.createElementBlock("div",J3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(F,$)=>{var le,Q,me,de,A,ee,X,re,fe;return e.openBlock(),e.createElementBlock("div",{key:$,class:"static-form-item",style:e.normalizeStyle({...x(F),...d.value.item}),onClick:b[1]||(b[1]=e.withModifiers(()=>{},["stop"]))},[F.label&&!((le=F==null?void 0:F.field)!=null&&le.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(d.value.label)},e.toDisplayString(F.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(d.value.value),onClick:$e=>{var ue;return(ue=F.field)!=null&&ue.isNoClick?null:L(F,$,$e)}},[h.value===$&&F.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(z(((Q=F.field)==null?void 0:Q.type)??"Input")),{key:0,modelValue:F.field.value,"onUpdate:modelValue":$e=>F.field.value=$e,isEdit:!0,disabled:(me=F.field)==null?void 0:me.disabled,content:((de=F.field)==null?void 0:de.contents)??[],optionUrl:F.field,originalValue:(A=F.field)==null?void 0:A.value,config:(ee=F.field)==null?void 0:ee.config,configModel:((X=F.field)==null?void 0:X.prop)??((re=F.field)==null?void 0:re.name),selectedTagList:((fe=F.field)==null?void 0:fe.selectValue)??[],onBlur:_,onBlurChange:_},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[F.isStatus?(e.openBlock(),e.createBlock(E,{key:0,type:F.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(F.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",Z3,e.toDisplayString(F.value??"-"),1))],64))],12,X3)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(d.value.empty)}," 暂无数据 ",4))],4)}}}),Oc=ir._export_sfc(Q3,[["__scopeId","data-v-5937a104"]]),eh={class:"form-content"},ah={title:"选择标签"},lh={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},rh={class:"col-operate-wrap"},nh={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ih={__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(a,{emit:l}){const n=()=>{c.value=!1,d.value=!1,m.value=[]},r=a;e.computed(()=>{var je;const W=(je=Ea.value)==null?void 0:je.split("/");return(W==null?void 0:W.some(We=>(We==null?void 0:We.includes("updateLoading"))||(We==null?void 0:We.includes("loading"))))?!1:$e.value==="view"});const i=l,s=e.ref(""),h=e.ref([]),c=e.ref(!1),d=e.ref(!1),m=e.ref([]),{getFileExtension:g}=No.useThreeSystem(),u=e.ref(),C=e.ref(!1),I=e.ref(!1),k=M.useUnit(M.pinia),{chooseTitle:G}=M.storeToRefs(k),z=e.ref([]),j=e.ref(),L=e.ref(!1),_=e.ref([]),x=vc(M.pinia),w=Mt(M.pinia),b=e.ref(!1),E=e.ref(),F=e.ref(),$=e.ref(),le=e.ref(),Q=e.ref(),me=M.useLoginState(M.pinia),{loginUserInfo:de}=M.storeToRefs(me),A=e.ref(),ee=e.ref(!0),X=M.useModelComp(M.pinia),{tableViewContents:re,itemData:fe,isEdit:$e,routeToChildPath:ue,lockingPage:B,homepageBackgroundTableId:se,refreshCurrentPageInform:U}=M.storeToRefs(X),be=e.ref(null),Me=e.ref(!1),Ve=e.ref(!1),aa=M.useMenuState(),{activeMenuPath:Ea}=M.storeToRefs(aa),ne=te.useOriginalState(M.pinia),{originalPath:ta}=M.storeToRefs(ne),{compType:ce,hasEditable:ca}=ec.useRole(),we=()=>!ca(r.config,{type:ce.FORM});e.computed(()=>Ea.value==="设备管理/试验设备"&&r.compName==="设备概要");const ge=async()=>{var je,We,Sa;const W=se==null?void 0:se.value,J=(je=de==null?void 0:de.value)==null?void 0:je.plat_id;if(!(!W||!J))try{const sa=await M.getAllTables({platId:parseInt(J),tableNames:[`content_${W}`,`struct_${W}`],user_unique_id:"0"}),Va=((Sa=(We=sa==null?void 0:sa.data)==null?void 0:We.result)==null?void 0:Sa[0])??[],Re=String((r==null?void 0:r.index)??""),Oe=Va==null?void 0:Va.find(Le=>String(Le==null?void 0:Le.relatedForm_id)===Re);Oe!=null&&Oe.backgroundImg_url&&(le.value=Oe.backgroundImg_url)}catch(sa){console.error("获取首页背景图片表数据失败:",sa)}},he=e.ref([]),Ke=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),fa=async W=>{Ve.value=W,await pa("disabled",null,W,!0)},qa=async W=>{await pa("operable",null,W,!0)};e.watch(()=>Ea.value,async()=>{h.value=[],m.value=[]},{deep:!0,immediate:!0});const V=()=>{e.nextTick(()=>{pe()})},H=W=>{var J;h.value=(J=h.value)==null?void 0:J.map(je=>({...je,isFormColHidden:!(W!=null&&W.includes(je.label))}))};e.onUnmounted(()=>{be.value=null});const Z=W=>{i("clickTrigger",W)},ve=async W=>{var J,je,We,Sa,sa,Va;if(W===""){let Re="";(J=h.value)==null||J.forEach(ze=>{ze!=null&&ze.isMain&&(Re=ze==null?void 0:ze.value)});let Oe=await te.getItemData(ue.value,sessionStorage.getItem("systemKey"),"");Re=((Va=(sa=(Sa=(We=(je=Oe==null?void 0:Oe[0])==null?void 0:je.compData)==null?void 0:We.find(ze=>(ze==null?void 0:ze.key)==="mainRouters"))==null?void 0:Sa.contents)==null?void 0:sa[0])==null?void 0:Va.routerContent)+ta.value+Re;let Be=await te.getItemData(Re,sessionStorage.getItem("systemKey"),"");L.value=!0,_.value=Be==null?void 0:Be.filter(ze=>(ze==null?void 0:ze.comp)!=="methodButton"),i("routeUrl",_.value)}},pe=()=>{var J;const W=(J=be.value)==null?void 0:J.$el;W&&Vl.Sortable.create(W,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:je=>{const{oldIndex:We,newIndex:Sa}=je;if(We===Sa)return;const sa=h.value.splice(We,1)[0];h.value.splice(Sa,0,sa)}})},pa=async(W,J,je,We=!1)=>{try{X.setRefreshCurStructure(!1)}catch{Ja.ElMessage.error("编辑处理失败")}},ia=async(W,J)=>{await pa()},He=async(W,J)=>{W&&await pa()},_a=async(W,J,je)=>{await pa(J,je,W,!1)},Ae=(W,J)=>{A.value===J?ee.value=!1:ee.value=!0,A.value=J==null?void 0:J.changeProp},ha=async W=>{var Va;le.value=W;const J=r.itemData,je=J==null?void 0:J.find(Re=>(Re==null?void 0:Re.key)==="backGroundImage");je?je.contents=W:J==null||J.push({key:"backGroundImage",contents:W}),i("change",{key:"backGroundImage",contents:W});const We=se==null?void 0:se.value,Sa=r==null?void 0:r.index,sa=(Va=de==null?void 0:de.value)==null?void 0:Va.plat_id;if(!(!We||!sa||!Sa||!W))try{await M.pageBatchAddApi({platId:parseInt(sa),changeContents:[{tableName:`content_${We}`,tableContents:[{backgroundImg_url:W,relatedForm_id:String(Sa)}]}],user_unique_id:"0"})}catch(Re){console.error("保存背景图片记录失败:",Re),Ja.ElMessage.error("背景图片记录保存失败")}},La=async W=>{var je,We,Sa,sa,Va,Re,Oe,Le,Be,ze,ul,Cl,Ml,Rl,Al;let J=[];if((je=W==null?void 0:W.toString())!=null&&je.includes(".urdf")){if(W.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}m.value=[{url:W,extension:g(W)}],d.value=!0,c.value=!0;return}if((We=W==null?void 0:W.toString())!=null&&We.includes(".stl")||(Sa=W==null?void 0:W.toString())!=null&&Sa.includes(".STL")||(sa=W==null?void 0:W.toString())!=null&&sa.includes(".obj")||(Va=W==null?void 0:W.toString())!=null&&Va.includes(".mtl")){const Qa=((Re=W==null?void 0:W.toString())==null?void 0:Re.split(",")).map(Ul=>({url:Ul,extension:g(Ul)}));m.value=Qa,d.value=!1,c.value=!0;return}if((Oe=W==null?void 0:W.toString())!=null&&Oe.includes(".stl")||(Le=W==null?void 0:W.toString())!=null&&Le.includes(".STL")||(Be=W==null?void 0:W.toString())!=null&&Be.includes(".obj")||(ze=W==null?void 0:W.toString())!=null&&ze.includes(".mtl")){let er,Qa=[],Ul={};if(Array.isArray(W)?er=W:er=W==null?void 0:W.split(","),er==null||er.forEach(Ua=>{Ua.includes(".mtl")?Qa.push(Ua):Ul.blob=Ul.blob?Ul.blob+","+Ua:Ua}),(Qa==null?void 0:Qa.length)>0&&(Ul.mtlBlobs=Qa),(Cl=(ul=Object.values(Ul))==null?void 0:ul[0])!=null&&Cl.includes("http:"))J.push(Ul);else{const Ua=new Blob([Ul.blob],{type:"application/octet-stream;charset=UTF-8"});let ql=URL.createObjectURL(Ua),Il="";(Ml=W==null?void 0:W.split("/"))==null||Ml.forEach((lr,_l)=>{var xr;_l===((xr=W==null?void 0:W.split("/"))==null?void 0:xr.length)-1&&(Il=lr)}),(Rl=Ul.blob)!=null&&Rl.includes(".stl")&&(Il=(Il==null?void 0:Il.replaceAll(">",""))+".urdf"),j.value=[{name:Il,blobUrl:ql}],I.value=!0}}else{const er=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Qa=await Ja.axios.get(W,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{er.close()}),Ul=new Blob([Qa.data],{type:"application/octet-stream;charset=UTF-8"});let Ua=URL.createObjectURL(Ul),ql="";(Al=W==null?void 0:W.split("/"))==null||Al.forEach((Il,lr)=>{var _l;lr===((_l=W==null?void 0:W.split("/"))==null?void 0:_l.length)-1&&(ql=Il)}),j.value=[{name:ql,blobUrl:Ua}],I.value=!0}(J==null?void 0:J.length)>0&&w.setBlobUrls(J)},Aa=()=>{I.value=!1},ua=W=>{var sa,Va,Re,Oe;const J=(Va=(sa=dl.safeClone(r.itemData))==null?void 0:sa.find(Le=>(Le==null?void 0:Le.key)==="formContent"))==null?void 0:Va.contents,je=dl.safeClone(W.content);let We={};je&&((Re=Object.values(je))==null?void 0:Re.length)>0&&((Oe=Object.values(je))==null||Oe.forEach((Le,Be)=>{We[J[Be].key]=Le}));const Sa={content:We,index:r==null?void 0:r.index,buttonName:W==null?void 0:W.buttonName};i("change",Sa)};e.computed(()=>"http://222.92.178.198:62001");const Ta=async W=>{var ul,Cl,Ml,Rl,Al,er,Qa,Ul,Ua,ql,Il,lr,_l,xr,Ra,nl;if(!W)return;(Cl=(ul=r==null?void 0:r.itemData)==null?void 0:ul.find(va=>(va==null?void 0:va.key)==="parentFormPath"))==null||Cl.contents;let J=re.value;(J==null?void 0:J.length)>0&&(J=J==null?void 0:J.map(va=>{var da,Ha,Dl,Te;let za=(da=va==null?void 0:va.key)==null?void 0:da.split("/");return(r==null?void 0:r.compName)===(za==null?void 0:za[0])&&(Ha=h.value)!=null&&Ha.find(na=>(na==null?void 0:na.prop)===(za==null?void 0:za[1]))&&(va.value=(Te=(Dl=h.value)==null?void 0:Dl.find(na=>(na==null?void 0:na.prop)===(za==null?void 0:za[1])))==null?void 0:Te.value),va}),X.setTableViewContents(J));const je=dl.safeClone(r.itemData);let We=je==null?void 0:je.map(va=>{var za;return(va==null?void 0:va.key)==="formContent"&&((za=va.contents)==null||za.map((da,Ha)=>{var Dl,Te,na,ja,Ee,Ma,Ya,vl,wl,Ie,ba,oa,wa,ga,ol,Fe,gl,Ne,Kl,Ca,sl;return da.type=(Te=(Dl=h.value)==null?void 0:Dl.find(Za=>(Za==null?void 0:Za.prop)===(da==null?void 0:da.prop)))==null?void 0:Te.type,da.options=da!=null&&da.options?da.options:((Ee=(ja=(na=da==null?void 0:da.key)==null?void 0:na.split("$"))==null?void 0:ja[1])==null?void 0:Ee.length)>0?(wl=(vl=Fu((Ya=(Ma=da==null?void 0:da.key)==null?void 0:Ma.split("$"))==null?void 0:Ya[1]))==null?void 0:vl.split(","))==null?void 0:wl.map(Za=>({label:Za,value:Za})):[],(Ie=da==null?void 0:da.key)!=null&&Ie.includes("$")&&(da.key=(oa=(ba=da==null?void 0:da.key)==null?void 0:ba.split("$"))==null?void 0:oa[0]),da.signature=(ga=(wa=h.value)==null?void 0:wa.find(Za=>(Za==null?void 0:Za.prop)===(da==null?void 0:da.prop)))==null?void 0:ga.signature,da.isLoginUser=(Fe=(ol=h.value)==null?void 0:ol.find(Za=>(Za==null?void 0:Za.prop)===(da==null?void 0:da.prop)))==null?void 0:Fe.isLoginUser,da.value=(gl=Object.values(W))==null?void 0:gl[Ha],da.isFormColHidden=(Kl=(Ne=h.value)==null?void 0:Ne.find(Za=>(Za==null?void 0:Za.prop)===(da==null?void 0:da.prop)))==null?void 0:Kl.isFormColHidden,da.isHideInForm=(sl=(Ca=h.value)==null?void 0:Ca.find(Za=>(Za==null?void 0:Za.prop)===(da==null?void 0:da.prop)))==null?void 0:sl.isHideInForm,da})),va}),Sa=h.value,sa=(Rl=(Ml=dl.safeClone(We))==null?void 0:Ml.find(va=>(va==null?void 0:va.key)==="formContent"))==null?void 0:Rl.contents;if(Sa=Sa==null?void 0:Sa.map(va=>{var za,da;return(va==null?void 0:va.type)==="Select"&&((za=va==null?void 0:va.allSelectionContents)==null?void 0:za.length)>0&&(va.contactValue=W),va.value=(da=sa==null?void 0:sa.find((Ha,Dl)=>((Ha==null?void 0:Ha.id)??Dl)===(va==null?void 0:va.id)))==null?void 0:da.value,va}),!ee.value){i("contentChange",{contents:We,index:r.index});return}let Va="",Re=(Qa=(er=(Al=dl.safeClone(We))==null?void 0:Al.find(va=>(va==null?void 0:va.key)==="formContent"))==null?void 0:er.contents)==null?void 0:Qa.find((va,za)=>{var da,Ha,Dl;return(va==null?void 0:va.label)===A.value||za.toString()===((Dl=(Ha=(da=A.value)==null?void 0:da.split("t"))==null?void 0:Ha[1])==null?void 0:Dl.toString())}),Oe=(Ul=Re==null?void 0:Re.optionUrl)==null?void 0:Ul.menuSelect,Le=!0;if((Il=(ql=(Ua=dl.safeClone(We))==null?void 0:Ua.find(va=>(va==null?void 0:va.key)==="formContent"))==null?void 0:ql.contents)==null||Il.forEach(va=>{var za,da,Ha,Dl,Te,na;Le&&((Ha=(da=(za=va==null?void 0:va.optionUrl)==null?void 0:za.groupSelect)==null?void 0:da[1])!=null&&Ha.includes("["))&&(Va=(Te=(Dl=va==null?void 0:va.optionUrl)==null?void 0:Dl.groupSelect)==null?void 0:Te[1],JSON.stringify(Oe)===JSON.stringify((na=va==null?void 0:va.optionUrl)==null?void 0:na.menuSelect)&&(Le=!1))}),(lr=Re==null?void 0:Re.optionUrl)!=null&&lr.menuSelect&&ee.value){let va=await Et(Re),za,da=(_l=Re==null?void 0:Re.optionUrl)==null?void 0:_l.menuSelect;if(va==null||va.forEach(Ha=>{var Dl,Te,na,ja,Ee,Ma,Ya,vl,wl,Ie;Va===((Te=(Dl=Re==null?void 0:Re.optionUrl)==null?void 0:Dl.groupSelect)==null?void 0:Te[1])&&((Ee=(ja=(na=Re==null?void 0:Re.optionUrl)==null?void 0:na.groupSelect)==null?void 0:ja[1])!=null&&Ee.includes("["))&&((Ie=dl.safeClone(Ha))==null?void 0:Ie[(wl=(vl=(Ya=(Ma=Re==null?void 0:Re.optionUrl)==null?void 0:Ma.groupSelect)==null?void 0:Ya[1])==null?void 0:vl.replaceAll("[",""))==null?void 0:wl.replaceAll("]","")])===(Re==null?void 0:Re.value)&&(za=Ha)}),za){let Ha=dl.safeClone(Sa);Ha=Ha==null?void 0:Ha.map(Te=>{var na,ja,Ee,Ma,Ya,vl,wl,Ie,ba,oa,wa;return(za!=null&&za[Te==null?void 0:Te.label]||za!=null&&za[(Ma=(Ee=(ja=(na=Te==null?void 0:Te.optionUrl)==null?void 0:na.groupSelect)==null?void 0:ja[1])==null?void 0:Ee.replaceAll("[",""))==null?void 0:Ma.replaceAll("]","")])&&((wl=(vl=(Ya=Te==null?void 0:Te.optionUrl)==null?void 0:Ya.groupSelect)==null?void 0:vl[1])!=null&&wl.includes("["))&&da!=null&&da.every(ga=>{var ol,Fe;return(Fe=(ol=Te==null?void 0:Te.optionUrl)==null?void 0:ol.menuSelect)==null?void 0:Fe.includes(ga)})&&(Te.value=(za==null?void 0:za[Te==null?void 0:Te.label])||(za==null?void 0:za[(wa=(oa=(ba=(Ie=Te==null?void 0:Te.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:ba[1])==null?void 0:oa.replaceAll("[",""))==null?void 0:wa.replaceAll("]","")]),Array.isArray(Te.value)&&Te.value.every(ga=>(ga==null?void 0:ga.url)&&(ga==null?void 0:ga.name))&&(Te.type="Upload")),Te}),Ha=Ha==null?void 0:Ha.map(Te=>{var na,ja,Ee;return(na=Te==null?void 0:Te.optionUrl)!=null&&na.oldMenuSelect&&(Te.optionUrl.menuSelect=(Ee=(ja=dl.safeClone(Te))==null?void 0:ja.optionUrl)==null?void 0:Ee.oldMenuSelect),Te}),h.value=dl.safeClone(Ha);let Dl=dl.safeClone(Ha);Dl=Dl==null?void 0:Dl.map(Te=>{var na,ja,Ee,Ma,Ya,vl;return(ja=(na=Te==null?void 0:Te.optionUrl)==null?void 0:na.menuSelect)!=null&&ja.some(wl=>wl==null?void 0:wl.includes("["))&&(Te.optionUrl.oldMenuSelect=(Ma=(Ee=dl.safeClone(Te))==null?void 0:Ee.optionUrl)==null?void 0:Ma.menuSelect,Te.optionUrl.menuSelect=(vl=(Ya=Te==null?void 0:Te.optionUrl)==null?void 0:Ya.menuSelect)==null?void 0:vl.map(wl=>{var Ie,ba,oa,wa;if(wl!=null&&wl.includes("[")){let ga=(ba=(Ie=wl==null?void 0:wl.replaceAll("[","").replaceAll("]",""))==null?void 0:Ie.split(":"))==null?void 0:ba[1];wl=(wa=(oa=dl.safeClone(Ha))==null?void 0:oa.find(ol=>(ol==null?void 0:ol.label)===ga))==null?void 0:wa.value}return wl})),Te}),h.value=Dl}else h.value=Sa;We=We==null?void 0:We.map(Ha=>{var Dl;return(Ha==null?void 0:Ha.key)==="formContent"&&(Ha.contents=(Dl=Ha.contents)==null?void 0:Dl.map(Te=>{var na,ja,Ee,Ma;return Te.value=((ja=(na=h.value)==null?void 0:na.find(Ya=>(Ya==null?void 0:Ya.label)===(Te==null?void 0:Te.key)))==null?void 0:ja.value)??(Te==null?void 0:Te.value),Te.type=((Ma=(Ee=h.value)==null?void 0:Ee.find(Ya=>(Ya==null?void 0:Ya.prop)===(Te==null?void 0:Te.key)))==null?void 0:Ma.type)??(Te==null?void 0:Te.type),Te})),Ha})}ee.value=!1,i("contentChange",{contents:We,index:r.index});let Be=[],ze=[];if((Ra=dl.safeClone((xr=We==null?void 0:We.find(va=>(va==null?void 0:va.key)==="formContent"))==null?void 0:xr.contents))==null||Ra.forEach(va=>{var za;Array.isArray(va==null?void 0:va.value)&&((za=va==null?void 0:va.value)!=null&&za.find(da=>{var Ha;return(Ha=da==null?void 0:da.url)==null?void 0:Ha.includes(".obj")}))&&(ze=va==null?void 0:va.value)}),(ze==null?void 0:ze.length)>0){const va=(nl=dl.safeClone(ze))==null?void 0:nl.filter(za=>{var da;return(da=za==null?void 0:za.url)==null?void 0:da.includes(".obj")});va==null||va.forEach(za=>{var Ha,Dl,Te,na;const da=(Ha=ze==null?void 0:ze.filter(ja=>{var Ee;return(ja==null?void 0:ja.name)===(za==null?void 0:za.name)&&((Ee=ja==null?void 0:ja.url)==null?void 0:Ee.includes(".mtl"))}))==null?void 0:Ha.map(ja=>ja==null?void 0:ja.url);Be.push({objUrl:za==null?void 0:za.url,mtlUrls:((Dl=ze==null?void 0:ze.filter(ja=>{var Ee;return(ja==null?void 0:ja.name)===(za==null?void 0:za.name)&&((Ee=ja==null?void 0:ja.url)==null?void 0:Ee.includes(".mtl"))}))==null?void 0:Dl.length)===1?(na=(Te=ze==null?void 0:ze.filter(ja=>{var Ee;return(ja==null?void 0:ja.name)===(za==null?void 0:za.name)&&((Ee=ja==null?void 0:ja.url)==null?void 0:Ee.includes(".mtl"))}))==null?void 0:Te[0])==null?void 0:na.url:da})}),w.setObjUrl(Be)}},Ce=(W,J,je)=>{let We="";const Sa=J==null?void 0:J.map(sa=>{var Va;return(Va=sa==null?void 0:sa.value)==null?void 0:Va.pageData});return Sa==null||Sa.forEach(sa=>{var Va;(sa==null?void 0:sa.name)===(W==null?void 0:W[0])&&((Va=sa==null?void 0:sa.compData)==null||Va.forEach(Re=>{var Oe;(Re==null?void 0:Re.key)==="formContent"&&((Oe=Re==null?void 0:Re.contents)==null||Oe.forEach(Le=>{var Be;(Le==null?void 0:Le.prop)===(W==null?void 0:W[1])&&(We=(Le==null?void 0:Le.value)===""?te.judgeContents((Be=dl.safeClone(Le))==null?void 0:Be.optionUrl,je):Le==null?void 0:Le.value)}))}))}),We},ma=(W,J,je,We)=>{var Re,Oe;let Sa="",sa="";(Re=dl.safeClone(J))==null||Re.forEach((Le,Be)=>{Le!=null&&Le.includes("[")?sa=sa+ta.value+W[Be]:sa=sa===""?sa+Le:sa+"/"+Le});let Va=(Oe=We[sa])==null?void 0:Oe.map(Le=>{var Be;return(Be=Le==null?void 0:Le.value)==null?void 0:Be.pageData});return Va==null||Va.forEach(Le=>{var Be;(Le==null?void 0:Le.name)===(je==null?void 0:je[0])&&((Be=Le==null?void 0:Le.compData)==null||Be.forEach(ze=>{var ul;(ze==null?void 0:ze.key)==="formContent"&&((ul=ze==null?void 0:ze.contents)==null||ul.forEach(Cl=>{(Cl==null?void 0:Cl.prop)===(je==null?void 0:je[1])&&(Sa=Cl==null?void 0:Cl.value)}))}))}),Sa};e.watch(()=>se==null?void 0:se.value,async()=>{await ge()},{immediate:!0});const Je=async W=>await Wp(W,"Auto");return e.watch(()=>U.value,async()=>{var W;(W=h.value)!=null&&W.some(J=>(J==null?void 0:J.functionName)&&(J==null?void 0:J.functionName)!=="")&&(h.value=await Je(h.value))},{immediate:!0,deep:!0}),e.watch(()=>r.itemData,async()=>{var Cl,Ml,Rl,Al,er,Qa,Ul,Ua,ql,Il,lr,_l,xr,Ra,nl,va,za,da,Ha,Dl,Te,na,ja,Ee,Ma,Ya,vl,wl;const W=(Cl=r.itemData)==null?void 0:Cl.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent");let J=(Ml=r.itemData)==null?void 0:Ml.find(Ie=>(Ie==null?void 0:Ie.key)==="backGround");J&&((Rl=J==null?void 0:J.contents)==null?void 0:Rl.length)>0&&(s.value=((er=(Al=J==null?void 0:J.contents)==null?void 0:Al[0])==null?void 0:er.url)??"");const je=(Qa=dl.safeClone(r.itemData))==null?void 0:Qa.find(Ie=>(Ie==null?void 0:Ie.key)==="formButton"),We=(Ul=dl.safeClone(r.itemData))==null?void 0:Ul.find(Ie=>(Ie==null?void 0:Ie.key)==="formFlex"),Sa=(Ua=dl.safeClone(r.itemData))==null?void 0:Ua.find(Ie=>(Ie==null?void 0:Ie.key)==="formWrap"),sa=(ql=dl.safeClone(r.itemData))==null?void 0:ql.find(Ie=>(Ie==null?void 0:Ie.key)==="enableWrap"),Va=(Il=dl.safeClone(r.itemData))==null?void 0:Il.find(Ie=>(Ie==null?void 0:Ie.key)==="textSize"),Re=(lr=dl.safeClone(r.itemData))==null?void 0:lr.find(Ie=>(Ie==null?void 0:Ie.key)==="textRGBA"),Oe=(_l=dl.safeClone(r.itemData))==null?void 0:_l.find(Ie=>(Ie==null?void 0:Ie.key)==="backGround"),Le=(xr=dl.safeClone(r.itemData))==null?void 0:xr.find(Ie=>(Ie==null?void 0:Ie.key)==="backGroundImage");(Sa==null?void 0:Sa.contents)==="纵向"?C.value=!1:C.value=!0;const Be=Number(Va==null?void 0:Va.contents);E.value=Number.isNaN(Be)?void 0:Be,F.value=Re==null?void 0:Re.contents,$.value=Oe==null?void 0:Oe.contents,le.value=Le==null?void 0:Le.contents;const ze=sa==null?void 0:sa.contents;if(ze===void 0?b.value=ui.BLOCK:typeof ze=="boolean"?b.value=ze?ui.ORDINARY:ui.BLOCK:b.value=ze,Q.value=typeof(We==null?void 0:We.contents)!="boolean"?!(!(We!=null&&We.contents)===""||((Ra=We==null?void 0:We.contents)==null?void 0:Ra.toUpperCase())==="VERTICAL"):We==null?void 0:We.contents,((nl=W==null?void 0:W.contents)==null?void 0:nl.length)>0&&Array.isArray(W==null?void 0:W.contents)){let Ie=r.allMapContents;const ba=(za=(va=dl.safeClone(W))==null?void 0:va.contents)==null?void 0:za.map((Ne,Kl)=>{var Yr,Zr,Kr,or,sr,Qr,xl,hr,Yl,Tr,Xl,wr,Pr;let Ca=(Ne==null?void 0:Ne.label)??(Ne==null?void 0:Ne.key)??"";Ne==null||Ne.type;let sl=(Ne==null?void 0:Ne.options)??[];if((Yr=Ne==null?void 0:Ne.key)!=null&&Yr.includes("$")&&(Ca=(Zr=dl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:Zr[0],((or=(Kr=dl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:Kr[1])==null?void 0:or.length)>0)){const[Er,un]=(Qr=(sr=dl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:sr[1])==null?void 0:Qr.split(/[()]/);(xl=te.FormType.find(en=>(en==null?void 0:en.key)===Er))==null||xl.value,((hr=un==null?void 0:un.split(","))==null?void 0:hr.length)>0&&(sl=(Yl=un==null?void 0:un.split(","))==null?void 0:Yl.map(en=>({label:en,value:en})))}let Za=Ne==null?void 0:Ne.options;((Tr=Ne==null?void 0:Ne.optionUrl)==null?void 0:Tr.selectRelateType)==="自定义绑定"&&(Za=(wr=(Xl=Ne==null?void 0:Ne.optionUrl)==null?void 0:Xl.defaultSelect)==null?void 0:wr.map(Er=>({label:Er,value:Er})));let bl=(Ne==null?void 0:Ne.menuPath)??[],Ia=(Ne==null?void 0:Ne.groups)??[],$l=(Ne==null?void 0:Ne.columns)??[],br=!1,yn=(Ne==null?void 0:Ne.isFormColHidden)??!1,_r="",Pl=Ne!=null&&Ne.value?Ne.value:(Za==null?void 0:Za.length)>0?(Pr=Za==null?void 0:Za[0])==null?void 0:Pr.value:(Ne==null?void 0:Ne.value)??"",cn=!1,Ur="Input";return((Za==null?void 0:Za.length)>0||(bl==null?void 0:bl.length)>0)&&(Ur="Select"),(Array.isArray(_r)&&(_r!=null&&_r.every(Er=>(Er==null?void 0:Er.name)&&(Er==null?void 0:Er.url)))||Array.isArray(Pl)&&(Pl!=null&&Pl.every(Er=>(Er==null?void 0:Er.name)&&(Er==null?void 0:Er.url))))&&(Ur="upload"),Ne!=null&&Ne.isMainUrl&&(Ur="Url"),{label:Ca??"",name:Ca??"t"+Kl,prop:Ca??dl.safeClone(Ne==null?void 0:Ne.key),type:(Ne==null?void 0:Ne.type)??Ur,value:(Ne==null?void 0:Ne.type)==="Date"&&Pl===""?new Date:Pl,id:(Ne==null?void 0:Ne.id)??Kl,contents:(Za==null?void 0:Za.length)>0?Za:sl??[],width:(Ne==null?void 0:Ne.width)??1,isLoginUser:br,config:Ne==null?void 0:Ne.config,optionUrl:(Ne==null?void 0:Ne.optionUrl)??Ne,isFormColHidden:yn,isHideInForm:(Ne==null?void 0:Ne.isHideInForm)??!1,signature:cn,isMain:Ne==null?void 0:Ne.isMain,required:(Ne==null?void 0:Ne.required)??!1,isMainUrl:Ne==null?void 0:Ne.isMainUrl,operable:(Ne==null?void 0:Ne.operable)??!1,disabled:(Ne==null?void 0:Ne.disabled)??!1,isSync:Ne==null?void 0:Ne.isSync,menus:bl,groups:Ia,words:$l,allSelectionContents:Ne==null?void 0:Ne.allContents,filterContent:Ne==null?void 0:Ne.filterContents,isNoClick:(Ne==null?void 0:Ne.isNoClick)??!1,functionName:Ne==null?void 0:Ne.functionName,functionRelatedWords:Ne==null?void 0:Ne.functionRelatedWords,calculatorFilter:Ne==null?void 0:Ne.calculatorFilter}}),oa=ba==null?void 0:ba.map(Ne=>Ne==null?void 0:Ne.value);let wa="";oa==null||oa.forEach(Ne=>{Ne!==""&&Ne!==void 0&&(wa=wa===""?Ne:wa+"/"+Ne)}),x.setSelectArray(oa),x.setSelectString(wa);let ga=(da=dl.safeClone(ba))==null?void 0:da.map(Ne=>(Ne!=null&&Ne.value&&te.IsJson(Ne==null?void 0:Ne.value)&&Array.isArray(JSON.parse(Ne==null?void 0:Ne.value))&&(Ne.value=JSON.parse(Ne.value)),Ne)),ol={};ga==null||ga.forEach(Ne=>{ol[Ne.label]=Ne==null?void 0:Ne.value}),ga=ga==null?void 0:ga.map(Ne=>{var Kl,Ca,sl,Za,bl,Ia,$l,br,yn;if((Ne==null?void 0:Ne.type)==="Select"&&((Kl=Ne==null?void 0:Ne.allSelectionContents)==null?void 0:Kl.length)>0&&(Ne.contactValue=ol),(sl=(Ca=Ne==null?void 0:Ne.optionUrl)==null?void 0:Ca.menuSelect)!=null&&sl.some(_r=>_r==null?void 0:_r.includes("["))){let _r="";Ne.optionUrl.oldMenuSelect=(bl=(Za=dl.safeClone(Ne))==null?void 0:Za.optionUrl)==null?void 0:bl.menuSelect,Ne.optionUrl.menuSelect=($l=(Ia=Ne==null?void 0:Ne.optionUrl)==null?void 0:Ia.menuSelect)==null?void 0:$l.map(Pl=>{var cn,Ur,Wr,Yr,Zr,Kr;if(Pl!=null&&Pl.includes("[")){let or=(Ur=(cn=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:cn.split(":"))==null?void 0:Ur[1];_r=Ce((Wr=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:Wr.split(":"),Ie==null?void 0:Ie[Ea.value],Ie),Pl=((Zr=(Yr=dl.safeClone(ga))==null?void 0:Yr.find(sr=>(sr==null?void 0:sr.label)===or))==null?void 0:Zr.value)||Ce((Kr=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:Kr.split(":"),Ie==null?void 0:Ie[Ea.value],Ie)}return Pl}),_r!==""&&Ne.value===""&&(Ne.value=ma(Ne.optionUrl.menuSelect,Ne.optionUrl.oldMenuSelect,(br=Ne==null?void 0:Ne.optionUrl)==null?void 0:br.groupSelect,Ie),Array.isArray(Ne.value)&&((yn=Ne.value)!=null&&yn.every(Pl=>Pl==null?void 0:Pl.url))&&(Ne.type="UPLOAD"))}return Ne}),h.value=ga,Ve.value=((Ha=h.value)==null?void 0:Ha.every(Ne=>Ne==null?void 0:Ne.disabled))||B.value===Ea.value,Me.value=(Dl=h.value)==null?void 0:Dl.every(Ne=>Ne==null?void 0:Ne.operable),he.value=(Te=h.value)==null?void 0:Te.map(Ne=>Ne==null?void 0:Ne.label);let Fe=[],gl=[];if((na=dl.safeClone(h.value))==null||na.forEach(Ne=>{var Kl;Array.isArray(Ne==null?void 0:Ne.value)&&((Kl=Ne==null?void 0:Ne.value)!=null&&Kl.find(Ca=>{var sl;return(sl=Ca==null?void 0:Ca.url)==null?void 0:sl.includes(".obj")}))&&(gl=Ne==null?void 0:Ne.value)}),(gl==null?void 0:gl.length)>0){const Ne=(ja=dl.safeClone(gl))==null?void 0:ja.filter(Kl=>{var Ca;return(Ca=Kl==null?void 0:Kl.url)==null?void 0:Ca.includes(".obj")});Ne==null||Ne.forEach(Kl=>{var sl,Za,bl,Ia;const Ca=(sl=gl==null?void 0:gl.filter($l=>{var br;return($l==null?void 0:$l.name)===(Kl==null?void 0:Kl.name)&&((br=$l==null?void 0:$l.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:sl.map($l=>$l==null?void 0:$l.url);Fe.push({objUrl:Kl==null?void 0:Kl.url,mtlUrls:((Za=gl==null?void 0:gl.filter($l=>{var br;return($l==null?void 0:$l.name)===(Kl==null?void 0:Kl.name)&&((br=$l==null?void 0:$l.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:Za.length)===1?(Ia=(bl=gl==null?void 0:gl.filter($l=>{var br;return($l==null?void 0:$l.name)===(Kl==null?void 0:Kl.name)&&((br=$l==null?void 0:$l.url)==null?void 0:br.includes(".mtl"))}))==null?void 0:bl[0])==null?void 0:Ia.url:Ca})}),w.setObjUrl(Fe)}(Ee=dl.safeClone(h.value))==null||Ee.forEach(Ne=>{var Kl,Ca,sl,Za,bl,Ia,$l,br,yn,_r,Pl,cn,Ur;if((Ca=(Kl=Ne==null?void 0:Ne.value)==null?void 0:Kl.toString())!=null&&Ca.includes(".stl")||(Za=(sl=Ne==null?void 0:Ne.value)==null?void 0:sl.toString())!=null&&Za.includes(".STL")||(Ia=(bl=Ne==null?void 0:Ne.value)==null?void 0:bl.toString())!=null&&Ia.includes(".obj")||(br=($l=Ne==null?void 0:Ne.value)==null?void 0:$l.toString())!=null&&br.includes(".mtl")||(_r=(yn=Ne==null?void 0:Ne.value)==null?void 0:yn.toString())!=null&&_r.includes(".urdf")){let Wr={},Yr=[],Zr;Array.isArray(Ne==null?void 0:Ne.value)?Zr=Ne==null?void 0:Ne.value:Zr=(Pl=Ne==null?void 0:Ne.value)==null?void 0:Pl.split(","),Zr==null||Zr.forEach(Kr=>{Kr.includes(".mtl")?Yr.push(Kr):Wr.blob=Wr.blob==="undefined"?Kr:Wr.blob+","+Kr}),(Yr==null?void 0:Yr.length)>0&&(Wr.mtlBlobs=Yr),(Ur=(cn=Object.values(Wr))==null?void 0:cn[0])!=null&&Ur.includes("http:")}})}else h.value=[];let ul=re.value;if((ul==null?void 0:ul.length)>0&&(ul=ul==null?void 0:ul.map(Ie=>{var oa,wa,ga,ol;let ba=(oa=Ie==null?void 0:Ie.key)==null?void 0:oa.split("/");return(r==null?void 0:r.compName)===(ba==null?void 0:ba[0])&&(wa=h.value)!=null&&wa.find(Fe=>(Fe==null?void 0:Fe.prop)===(ba==null?void 0:ba[1]))&&(Ie.value=(ol=(ga=h.value)==null?void 0:ga.find(Fe=>(Fe==null?void 0:Fe.prop)===(ba==null?void 0:ba[1])))==null?void 0:ol.value),Ie}),X.setTableViewContents(ul)),r!=null&&r.formRules)u.value=r==null?void 0:r.formRules;else{let Ie={};(Ma=dl.safeClone(h).value)==null||Ma.forEach(ba=>{((ba==null?void 0:ba.isMain)===!0||(ba==null?void 0:ba.required)===!0)&&(Ie[(ba==null?void 0:ba.prop)??(ba==null?void 0:ba.name)]=[{required:!0,message:`${(ba==null?void 0:ba.label)||(ba==null?void 0:ba.prop)||(ba==null?void 0:ba.name)}不能为空`}])}),u.value=Ie}if(((Ya=je==null?void 0:je.contents)==null?void 0:Ya.length)>0){const Ie=[];(vl=je==null?void 0:je.contents)==null||vl.forEach((ba,oa)=>{(ba==null?void 0:ba.label)!==""&&Ie.push({label:(ba==null?void 0:ba.label)??"",id:(ba==null?void 0:ba.id)??oa,type:(ba==null?void 0:ba.type)??"",background:ba==null?void 0:ba.background})}),z.value=Ie}else z.value=[];(wl=h.value)!=null&&wl.some(Ie=>(Ie==null?void 0:Ie.functionName)&&(Ie==null?void 0:Ie.functionName)!=="")&&(h.value=await Je(h.value))},{deep:!0,immediate:!0}),e.watch(()=>B.value,W=>{Ve.value=W===Ea.value},{immediate:!0}),(W,J)=>{var Re;const je=e.resolveComponent("svg-icon"),We=e.resolveComponent("el-switch"),Sa=e.resolveComponent("el-checkbox"),sa=e.resolveComponent("el-popover"),Va=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",eh,[b.value===e.unref(ui).TEXT?(e.openBlock(),e.createBlock(Oc,{key:0,itemData:a.itemData,compName:a.compName,fields:h.value,textSize:E.value,textColor:F.value,backGround:$.value,backGroundImage:le.value,disabled:Ve.value||we(),"onUpdate:backGroundImage":ha,backgroundUrl:s.value},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):b.value===e.unref(ui).BLOCK?(e.openBlock(),e.createBlock(Lf,{key:1,items:(Re=h.value)==null?void 0:Re.map(Oe=>({label:Oe!=null&&Oe.isHideInForm?"":Oe==null?void 0:Oe.label,value:Oe==null?void 0:Oe.value,width:(Oe==null?void 0:Oe.width)??1,field:Oe})),textSize:E.value,textColor:F.value,backGround:$.value,backGroundImage:le.value,disabled:Ve.value||we(),"onUpdate:backGroundImage":ha,backgroundUrl:s.value},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":b.value===e.unref(ui).ORDINARY})},[e.createVNode(dl.ssForm,{rowContents:h.value,formRules:u.value,buttonValue:z.value,isRowFlex:!1,isEnableWrap:!0,textSize:E.value,textColor:F.value,backGround:$.value,backGroundImage:le.value,onOnButtonClick:ua,onChange:Ta,formDisabled:Ve.value||we(),formLabelsOperable:Me.value,isButtonRow:C.value,onPreview:La,onBlurChange:Ae,style:e.normalizeStyle({backGroundImage:s.value!==""?`url("${s.value}")`:void 0}),onHandleColEditChange:ia,onHandleColTypeChange:He,onRouteUrl:ve,onClickTrigger:Z,"onUpdate:backGroundImage":ha},{operateCol:e.withCtx(({renderColumns:Oe,formDisabled:Le,formLabelsOperable:Be})=>[e.createVNode(sa,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:V},{reference:e.withCtx(()=>[e.createElementVNode("span",ah,[e.createVNode(je,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",lh,[J[1]||(J[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(We,{"model-value":Le,"active-text":"禁用","inactive-text":"",onChange:fa,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(We,{"model-value":Be,"active-text":"编辑所有标签","inactive-text":"",onChange:qa},null,8,["model-value"]),J[2]||(J[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Va,{modelValue:he.value,"onUpdate:modelValue":J[0]||(J[0]=ze=>he.value=ze),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:be,onChange:H},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oe,ze=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ze.label},[e.createVNode(Sa,{value:ze.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ze.label),1)]),_:2},1032,["value"]),e.createVNode(sa,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(je,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ul;return[e.createElementVNode("div",rh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ul=Object.keys(ze))==null?void 0:ul.filter(Cl=>{var Ml;return(Ml=Ke.value)==null?void 0:Ml.find(Rl=>(Rl==null?void 0:Rl.value)===Cl)}),Cl=>{var Ml,Rl;return e.openBlock(),e.createElementBlock("div",{key:Cl},[e.createVNode(dl._sfc_main$1,{value:ze==null?void 0:ze[Cl],"active-text":(Rl=(Ml=Ke.value)==null?void 0:Ml.find(Al=>(Al==null?void 0:Al.value)===Cl))==null?void 0:Rl.label,inactiveText:"",onChange:Al=>_a(Al,Cl,ze)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",nh,[e.createVNode(je,{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","style"])],2)),I.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:3,fileDataList:j.value,onDestroy:Aa},null,8,["fileDataList"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(Mr.ssDialog,{key:4,visible:c.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:m.value,onGetAnimationData:W.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Cs=ir._export_sfc(ih,[["__scopeId","data-v-4eb80a57"]]),$o=e.ref(0),Lc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=M.cloneDeep(a))==null?void 0:l.map(r=>($o.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$o.value,children:Lc(r==null?void 0:r.children)},r))},oh=a=>{var n;return(n=M.cloneDeep(a))==null?void 0:n.map(r=>($o.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??$o.value,children:Lc(r==null?void 0:r.children)},r))},Rc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(n=M.cloneDeep(a))==null?void 0:n.filter(i=>(i==null?void 0:i.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=Rc(r==null?void 0:r.children,l),r)),a)},$c=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=M.cloneDeep(a))==null?void 0:n.map(i=>((i==null?void 0:i.id)===(l==null?void 0:l.id)&&(i=l),i)):(a=a==null?void 0:a.map(r=>(r.children=$c(r==null?void 0:r.children,l),r)),a)},Vc=(a,l)=>{var n;return a!=null&&a.find(r=>{var i;return(r==null?void 0:r.id)===((i=l==null?void 0:l.contents)==null?void 0:i.id)})?(n=M.cloneDeep(a))==null?void 0:n.map(i=>{var s;return(i==null?void 0:i.id)===((s=l==null?void 0:l.contents)==null?void 0:s.id)&&(i=l==null?void 0:l.contents),i}):(a=a==null?void 0:a.map(r=>(r.children=Vc(r==null?void 0:r.children,l),r)),a)},Fc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=M.cloneDeep(a))==null?void 0:n.map(i=>((i==null?void 0:i.id)===(l==null?void 0:l.id)&&(i!=null&&i.children||(i.children=[]),i.children.push(l.contents)),i)):(a=a==null?void 0:a.map(r=>(r.children=Fc(r==null?void 0:r.children,l),r)),a)},yr=[{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"}],th=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],sh=[{label:"新增",value:"add"}],Fn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:sh},{key:"background",label:"按钮背景色",type:"Color"}],Pn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:th},{key:"textColor",label:"按钮颜色",type:"Color"}],ch={class:"table-header-child"},uh={class:"table-header-child-main"},dh={class:"table-header-child-content"},ph={class:"table-header-child-content-item"},fh={class:"fix-button"},hh={key:0},vh={class:"form-content"},mh={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),s=e.ref(""),h=te.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(h);e.ref(0);const d=e.ref(""),m=e.ref([]),g=e.ref([]),u=_=>{var w;i.value=!0;let x=[];yr==null||yr.forEach(b=>{let E=M.cloneDeep(c.value)+1;h.setTableIndex(E),x.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:_[b.key],id:c.value,contents:b==null?void 0:b.options})}),_!=null&&_.children&&((w=_==null?void 0:_.children)==null?void 0:w.length)>0&&x.push({children:_==null?void 0:_.children,isFormColHidden:!0}),d.value=_==null?void 0:_.id,m.value=x,g.value=x},C=_=>{r("fixChange",M.cloneDeep(_))},I=_=>{r("deleteChange",M.cloneDeep(_))},k=_=>{i.value=!0;let x=[];yr==null||yr.forEach(w=>{let b=M.cloneDeep(c.value)+1;h.setTableIndex(b),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=_==null?void 0:_.id,m.value=x,g.value=x},G=_=>{let x=M.cloneDeep(g.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=_==null?void 0:_[w.name]),w)),g.value=x},z=()=>{var x,w;m.value=g.value;let _={};if(d.value!=="")_.id=d.value,(x=m.value)==null||x.forEach(b=>{const E=yr==null?void 0:yr.find(F=>(F==null?void 0:F.label)===(b==null?void 0:b.label));E?_[E.key]=b.value:b!=null&&b.children&&b.children.length>0&&(_.children=b.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(_),id:s.value,type:"fix"});else{let b=M.cloneDeep(c.value)+1;h.setTableIndex(b),_.id="id"+c.value,(w=m.value)==null||w.forEach(E=>{const F=yr==null?void 0:yr.find($=>($==null?void 0:$.label)===(E==null?void 0:E.label));F?_[F.key]=E.value:E!=null&&E.children&&E.children.length>0&&(_.children=E.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(_),id:s.value,type:"add"})}d.value="",m.value=[],g.value=[]},j=()=>{i.value=!1,d.value="",s.value="",m.value=[],g.value=[]},L=_=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",_),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(_,x)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ch,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(b,E)=>(e.openBlock(),e.createElementBlock("div",uh,[e.createElementVNode("div",dh,[e.createElementVNode("div",ph,e.toDisplayString(b.label),1),e.createElementVNode("div",fh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>k(b)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>u(b)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>L(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",hh,[e.createVNode(Pc,{tableChildContents:b==null?void 0:b.children,onDeleteChange:I,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Mr.ssDialog,{visible:i.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vh,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:G},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:j,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:z},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},yh=ir._export_sfc(mh,[["__scopeId","data-v-e0fef72d"]]),gh={class:"table-header-child"},bh={class:"table-header-child-main"},kh={class:"table-header-child-content"},xh={class:"table-header-child-content-item"},wh={class:"fix-button"},_h={key:0},Sh={class:"form-content"},Eh={class:"dialog-footer"},Ch={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),s=e.ref(""),h=te.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(h),d=e.ref(""),m=e.ref([]),g=e.ref([]),u=_=>{r("fixChange",M.cloneDeep(_))},C=_=>{var w;i.value=!0;let x=[];yr==null||yr.forEach(b=>{let E=M.cloneDeep(c.value)+1;h.setTableIndex(E),x.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:_[b.key],id:c.value,contents:b==null?void 0:b.options})}),_!=null&&_.children&&((w=_==null?void 0:_.children)==null?void 0:w.length)>0&&x.push({children:_==null?void 0:_.children,isFormColHidden:!0}),d.value=_==null?void 0:_.id,m.value=x,g.value=x},I=_=>{i.value=!0;let x=[];yr==null||yr.forEach(w=>{let b=M.cloneDeep(c.value)+1;h.setTableIndex(b),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=_==null?void 0:_.id,m.value=x,g.value=x},k=_=>{let x=M.cloneDeep(g.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=_==null?void 0:_[w.name]),w)),g.value=x},G=()=>{var x,w;m.value=g.value;let _={};if(d.value!=="")_.id=d.value,(x=m.value)==null||x.forEach(b=>{const E=yr==null?void 0:yr.find(F=>(F==null?void 0:F.label)===(b==null?void 0:b.label));E?_[E.key]=b.value:b!=null&&b.children&&b.children.length>0&&(_.children=b.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(_),id:s.value,type:"fix"});else{let b=M.cloneDeep(c.value)+1;h.setTableIndex(b),_.id="idChild"+c.value,(w=m.value)==null||w.forEach(E=>{const F=yr==null?void 0:yr.find($=>($==null?void 0:$.label)===(E==null?void 0:E.label));F?_[F.key]=E.value:E!=null&&E.children&&E.children.length>0&&(_.children=E.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(_),id:s.value,type:"add"})}d.value="",m.value=[],g.value=[]},z=()=>{i.value=!1,d.value="",s.value="",m.value=[],g.value=[]},j=_=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",_),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=_=>{r("deleteChange",_)};return(_,x)=>{const w=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",gh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(E,F)=>(e.openBlock(),e.createElementBlock("div",bh,[e.createElementVNode("div",kh,[e.createElementVNode("div",xh,e.toDisplayString(E.label),1),e.createElementVNode("div",wh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>I(E)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>C(E)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>j(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",_h,[e.createVNode(yh,{tableChildContents:E==null?void 0:E.children,onDeleteChange:L,onFixChange:u},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Mr.ssDialog,{visible:i.value,onBeforeDestroy:z,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Sh,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Eh,[e.createVNode(b,{onClick:z,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(b,{class:"ok-button button",onClick:G,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Pc=ir._export_sfc(Ch,[["__scopeId","data-v-ebd68fa1"]]),Dh={class:"table-operate-content"},Th={class:"table-operate-item"},Bh={class:"operate-title"},Nh={class:"operate-content"},Ah={class:"fix-content"},zh={class:"fix-content-label"},Mh={class:"fix-button"},Ih={key:0},Oh={class:"operate-title"},Lh={class:"operate-content"},Rh={class:"fix-content"},$h={class:"fix-content-label"},Vh={class:"fix-button"},Fh={class:"operate-title"},Ph={class:"operate-content"},jh={class:"fix-content"},Hh={class:"fix-content-label"},Uh={class:"fix-button"},qh={class:"operate-title"},Wh={class:"operate-content"},Kh={class:"fix-content"},Gh={class:"fix-content-label"},Yh={class:"fix-button"},Jh={class:"operate-content"},Xh={style:{display:"flex","justify-content":"space-between"}},Zh={class:"form-content"},Qh={class:"dialog-footer"},e6={class:"form-content"},a6={class:"dialog-footer"},l6={class:"form-content"},r6={class:"dialog-footer"},n6={class:"form-content"},i6={class:"dialog-footer"},o6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]),s=e.ref(!1),h=e.ref(!1),c=e.ref([]),d=e.ref(!1),m=e.ref([]),g=e.ref(!1),u=e.ref([]),C=e.ref(""),I=e.ref(""),k=e.ref([]),G=e.ref([]),z=e.ref([]),j=e.ref([]),L=e.ref(!1),_=e.ref([]),x=e.ref([]),w=e.ref(0),b=e.ref([]),E=e.ref([]),F=e.ref([]),$=()=>{L.value=!0;let V=[];Fn==null||Fn.forEach(H=>{w.value++,V.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:w.value,contents:H==null?void 0:H.options})}),_.value=V,x.value=V},le=()=>{var H,Z,ve;h.value=!0;let V=[];(ve=(Z=(H=te.FormContent)==null?void 0:H.find(pe=>(pe==null?void 0:pe.key)==="Input"))==null?void 0:Z.value)==null||ve.forEach(pe=>{w.value++,V.push({label:pe==null?void 0:pe.label,name:(pe==null?void 0:pe.name)||(pe==null?void 0:pe.label),type:pe.type,value:(pe==null?void 0:pe.label)==="类型"?"Input":"",id:w.value,contents:pe==null?void 0:pe.options})}),b.value=V,E.value=V},Q=V=>{V||(b.value=E.value)},me=async V=>{var H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa;if((V==null?void 0:V.类型)!==((Z=(H=E.value)==null?void 0:H.find(ua=>(ua==null?void 0:ua.label)==="类型"))==null?void 0:Z.value)){let ua=[],Ta=await((pa=(pe=(ve=te.FormContent)==null?void 0:ve.find(Ce=>(Ce==null?void 0:Ce.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:pe.value)==null?void 0:pa.value)?await((ha=(Ae=(_a=te.FormContent)==null?void 0:_a.find(Ce=>(Ce==null?void 0:Ce.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ae.value)==null?void 0:ha.value):(He=(ia=te.FormContent)==null?void 0:ia.find(Ce=>(Ce==null?void 0:Ce.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:He.value;if(Ta==null||Ta.forEach(Ce=>{w.value++,ua.push({label:Ce==null?void 0:Ce.label,name:(Ce==null?void 0:Ce.name)||(Ce==null?void 0:Ce.label),type:Ce.type,value:Ce!=null&&Ce.属性名?(V==null?void 0:V.prop)||(V==null?void 0:V.name)||(V==null?void 0:V.label):(V==null?void 0:V[Ce.label])??"",id:w.value,contents:Ce==null?void 0:Ce.options,prop:(Ce==null?void 0:Ce.prop)||(Ce==null?void 0:Ce.name)||(Ce==null?void 0:Ce.label)})}),V!=null&&V.菜单选项&&((La=V==null?void 0:V.菜单选项)==null?void 0:La.length)>0){const Ce=await te.menuToContentType(V==null?void 0:V.菜单选项);ua=ua==null?void 0:ua.map(ma=>((ma==null?void 0:ma.name)==="组信息选项"&&(ma.contents=Ce),ma))}E.value=await te.selectToBase(M.cloneDeep(ua)),b.value=await te.selectToBase(M.cloneDeep(ua))}else{let ua=M.cloneDeep(b.value);if(ua=ua==null?void 0:ua.map(Ta=>(Ta.value=V==null?void 0:V[Ta.name],Ta)),V!=null&&V.菜单选项&&((Aa=V==null?void 0:V.菜单选项)==null?void 0:Aa.length)>0){const Ta=await te.menuToContentType(V==null?void 0:V.菜单选项);ua=ua==null?void 0:ua.map(Ce=>((Ce==null?void 0:Ce.name)==="组信息选项"&&(Ce.contents=Ta),Ce))}ua=te.formToOptionsContents(ua),E.value=await te.selectToBase(M.cloneDeep(ua))}},de=async V=>{await me(V),b.value=E.value},A=(V,H)=>{if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.selectRelateType)||H[V.key]}if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.menuSelect)||H[V.key]}if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.groupSelect)||H[V.key]}if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(H==null?void 0:H.value)||H[V.key];if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const Z=H[V.key];return lc(Z)?Z:V.default}return(V==null?void 0:V.label)==="类型"&&H[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!H[V.key]?!1:H[V.key]},ee=async V=>{var ve,pe,pa,ia,He,_a,Ae,ha,La;h.value=!0;let H=[];const Z=await((pa=(pe=(ve=te.FormContent)==null?void 0:ve.find(Aa=>(Aa==null?void 0:Aa.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:pe.value)==null?void 0:pa.value)?await((ha=(Ae=(_a=te.FormContent)==null?void 0:_a.find(Aa=>(Aa==null?void 0:Aa.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Ae.value)==null?void 0:ha.value):(He=(ia=te.FormContent)==null?void 0:ia.find(Aa=>(Aa==null?void 0:Aa.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:He.value;if(Z==null||Z.forEach(Aa=>{w.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)==="属性名"?(V==null?void 0:V.prop)||(V==null?void 0:V.name)||(V==null?void 0:V.label):A(Aa,V),id:w.value,contents:Aa==null?void 0:Aa.options})}),V!=null&&V.menuSelect&&((La=V==null?void 0:V.menuSelect)==null?void 0:La.length)>0){const Aa=await te.menuToContentType(V==null?void 0:V.menuSelect);H=H==null?void 0:H.map(ua=>((ua==null?void 0:ua.name)==="组信息选项"&&(ua.contents=Aa),ua))}C.value=V==null?void 0:V.id,b.value=await te.selectToBase(te.formToOptionsContents(H)),E.value=await te.selectToBase(te.formToOptionsContents(H))},X=V=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;F.value=(H=M.cloneDeep(F.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(V==null?void 0:V.id)),r("change",(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ve=>((ve==null?void 0:ve.key)==="tableToForm"&&(ve.contents=F.value),ve))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},re=()=>{h.value=!1,b.value=[],C.value=""},fe=async()=>{var ve,pe,pa,ia,He,_a,Ae,ha,La,Aa;b.value=E.value;let V={};C.value!==""?V.id=C.value:(w.value++,V.id="id"+w.value);let H=await((pa=(pe=(ve=te.FormContent)==null?void 0:ve.find(ua=>{var Ta,Ce;return(ua==null?void 0:ua.key)===(((Ce=(Ta=b.value)==null?void 0:Ta.find(ma=>(ma==null?void 0:ma.label)==="类型"))==null?void 0:Ce.value)??"label")}))==null?void 0:pe.value)==null?void 0:pa.value)??((He=(ia=te.FormContent)==null?void 0:ia.find(ua=>{var Ta,Ce;return(ua==null?void 0:ua.key)===(((Ce=(Ta=b.value)==null?void 0:Ta.find(ma=>(ma==null?void 0:ma.label)==="类型"))==null?void 0:Ce.value)??"label")}))==null?void 0:He.value);if((_a=b.value)==null||_a.forEach(ua=>{const Ta=H==null?void 0:H.find(Ce=>(Ce==null?void 0:Ce.label)===(ua==null?void 0:ua.label));Ta&&(V[Ta.key]=ua.value)}),V.name=V.label,(Ae=F.value)!=null&&Ae.find(ua=>ua.id===V.id))F.value=(ha=F.value)==null?void 0:ha.map(ua=>(ua.id===V.id&&(ua=V),ua));else{let ua=M.cloneDeep(F.value);F.value||(F.value=[]),ua.push(V),F.value=ua}F.value=F.value.map(({id:ua,...Ta})=>Ta),h.value=!1,C.value="";let Z=M.cloneDeep(n.originalItemContents);(La=M.cloneDeep(n.originalItemContents))!=null&&La.find(ua=>(ua==null?void 0:ua.key)==="tableToForm")?Z=(Aa=M.cloneDeep(n.originalItemContents))==null?void 0:Aa.map(ua=>((ua==null?void 0:ua.key)==="tableToForm"&&(ua.contents=F.value),ua)):Z.push({key:"tableToForm",contents:F.value}),r("change",Z)},$e=V=>{L.value=!0;let H=[];Fn==null||Fn.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:V[Z.key],id:w.value,contents:Z==null?void 0:Z.options})}),C.value=V==null?void 0:V.id,_.value=H,x.value=H};e.watch(()=>g.value,()=>{var H,Z;let V=M.cloneDeep(n.originalItemContents);(H=M.cloneDeep(n.originalItemContents))!=null&&H.find(ve=>(ve==null?void 0:ve.key)==="page")?V=(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ve=>((ve==null?void 0:ve.key)==="page"&&(ve.contents=g.value),ve)):V.push({key:"page",contents:g.value}),r("change",V)},{deep:!0});const ue=V=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;G.value=(H=M.cloneDeep(G.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(V==null?void 0:V.id)),r("change",(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ve=>((ve==null?void 0:ve.key)==="extraButton"&&(ve.contents=G.value),ve))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},B=()=>{var Z,ve,pe,pa,ia;_.value=x.value;let V={};if(C.value!==""?V.id=C.value:(w.value++,V.id="id"+w.value),(Z=_.value)==null||Z.forEach(He=>{const _a=Fn==null?void 0:Fn.find(Ae=>(Ae==null?void 0:Ae.label)===(He==null?void 0:He.label));_a?V[_a.key]=He.value:He!=null&&He.children&&He.children.length>0&&(V.children=He.children)}),(ve=G.value)!=null&&ve.find(He=>He.id===V.id))G.value=(pe=G.value)==null?void 0:pe.map(He=>(He.id===V.id&&(He=V),He));else{let He=M.cloneDeep(G.value)??[];He.push(V),G.value=He}L.value=!1,C.value="";let H=M.cloneDeep(n.originalItemContents);(pa=M.cloneDeep(n.originalItemContents))!=null&&pa.find(He=>(He==null?void 0:He.key)==="extraButton")?H=(ia=M.cloneDeep(n.originalItemContents))==null?void 0:ia.map(He=>((He==null?void 0:He.key)==="extraButton"&&(He.contents=G.value),He)):H.push({key:"extraButton",contents:G.value}),r("change",H)},se=V=>{let H=M.cloneDeep(x.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=V==null?void 0:V[Z.name]),Z)),x.value=H},U=()=>{L.value=!1,_.value=[],C.value=""},be=V=>{d.value=!0;let H=[];Pn==null||Pn.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:V[Z.key],id:w.value,contents:Z==null?void 0:Z.options})}),C.value=V==null?void 0:V.id,z.value=H,j.value=H},Me=V=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;k.value=(H=M.cloneDeep(k.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(V==null?void 0:V.id)),r("change",(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ve=>((ve==null?void 0:ve.key)==="rowButton"&&(ve.contents=k.value),ve))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ve=()=>{s.value=!0;let V=[];yr==null||yr.forEach(H=>{w.value++,V.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),m.value=V,u.value=V},aa=()=>{d.value=!0;let V=[];Pn==null||Pn.forEach(H=>{w.value++,V.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),z.value=V,j.value=V},Ea=V=>{let H=M.cloneDeep(j.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=V==null?void 0:V[Z.name]),Z)),j.value=H},ne=()=>{var Z,ve,pe,pa,ia;z.value=j.value;let V={};if(C.value!==""?V.id=C.value:(w.value++,V.id="id"+w.value),(Z=z.value)==null||Z.forEach(He=>{const _a=Pn==null?void 0:Pn.find(Ae=>(Ae==null?void 0:Ae.label)===(He==null?void 0:He.label));_a?V[_a.key]=He.value:He!=null&&He.children&&He.children.length>0&&(V.children=He.children)}),(ve=k.value)!=null&&ve.find(He=>He.id===V.id))k.value=(pe=k.value)==null?void 0:pe.map(He=>(He.id===V.id&&(He=V),He));else{let He=M.cloneDeep(k.value);He.push(V),k.value=He}d.value=!1,C.value="";let H=M.cloneDeep(n.originalItemContents);(pa=M.cloneDeep(n.originalItemContents))!=null&&pa.find(He=>(He==null?void 0:He.key)==="rowButton")?H=(ia=M.cloneDeep(n.originalItemContents))==null?void 0:ia.map(He=>((He==null?void 0:He.key)==="rowButton"&&(He.contents=k.value),He)):H.push({key:"rowButton",contents:k.value}),r("change",H)},ta=()=>{d.value=!1,C.value="",j.value=[],z.value=[]},ce=V=>{s.value=!0;let H=[];yr==null||yr.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:"",id:w.value,contents:Z==null?void 0:Z.options})}),m.value=H,I.value=V==null?void 0:V.id,u.value=H},ca=V=>{var H;c.value=Rc(M.cloneDeep(c.value),V==null?void 0:V.id),r("change",(H=M.cloneDeep(n.originalItemContents))==null?void 0:H.map(Z=>{var ve;return(Z==null?void 0:Z.key)==="header"&&(Z.contents=(ve=c.value)!=null&&ve.some(pe=>pe==null?void 0:pe.children)?[c.value]:c.value),Z}))},we=V=>{var Z,ve,pe;V.type==="fix"?V.id!==""?c.value=Vc(c.value,V):c.value=$c(c.value,V==null?void 0:V.contents):c.value=Fc(c.value,V),c.value=(Z=c.value)!=null&&Z.some(pa=>pa==null?void 0:pa.children)?[c.value]:c.value,C.value="";let H=M.cloneDeep(n.originalItemContents);(ve=M.cloneDeep(n.originalItemContents))!=null&&ve.find(pa=>(pa==null?void 0:pa.key)==="header")?H=(pe=M.cloneDeep(n.originalItemContents))==null?void 0:pe.map(pa=>((pa==null?void 0:pa.key)==="header"&&(pa.contents=c.value),pa)):H.push({key:"header",contents:c.value}),r("change",H)},ge=V=>{var Z;s.value=!0;let H=[];yr==null||yr.forEach(ve=>{w.value++,H.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:V[ve.key],id:w.value,contents:ve==null?void 0:ve.options})}),V!=null&&V.children&&((Z=V==null?void 0:V.children)==null?void 0:Z.length)>0&&H.push({children:V==null?void 0:V.children,isFormColHidden:!0}),C.value=V==null?void 0:V.id,I.value="",m.value=H,u.value=H},he=V=>{let H=M.cloneDeep(u.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=V==null?void 0:V[Z.name]),Z)),u.value=H},Ke=()=>{s.value=!1,C.value="",I.value="",u.value=[]},fa=()=>{var Z,ve,pe,pa,ia,He;m.value=u.value;let V={};if(C.value!==""?V.id=C.value:(w.value++,V.id="id"+w.value),(Z=m.value)==null||Z.forEach(_a=>{const Ae=yr==null?void 0:yr.find(ha=>(ha==null?void 0:ha.label)===(_a==null?void 0:_a.label));Ae?V[Ae.key]=_a.value:_a!=null&&_a.children&&_a.children.length>0&&(V.children=_a.children)}),(ve=c.value)!=null&&ve.find(_a=>_a.id===V.id))c.value=(pe=c.value)==null?void 0:pe.map(_a=>(_a.id===V.id&&(_a=V),_a));else{let _a=M.cloneDeep(c.value)??[];I.value===""?_a.push(V):_a=_a==null?void 0:_a.map(Ae=>(Ae.id===I.value&&(Ae.children||(Ae.children=[]),Ae.children.push(V)),Ae)),c.value=_a}c.value=(pa=c.value)!=null&&pa.some(_a=>_a==null?void 0:_a.children)?[c.value]:c.value,s.value=!1,C.value="",I.value="";let H=M.cloneDeep(n.originalItemContents);(ia=M.cloneDeep(n.originalItemContents))!=null&&ia.find(_a=>(_a==null?void 0:_a.key)==="header")?H=(He=M.cloneDeep(n.originalItemContents))==null?void 0:He.map(_a=>((_a==null?void 0:_a.key)==="header"&&(_a.contents=c.value),_a)):H.push({key:"header",contents:c.value}),r("change",H)},qa=V=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;c.value=(H=M.cloneDeep(c.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(V==null?void 0:V.id)),r("change",(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ve=>{var pe;return(ve==null?void 0:ve.key)==="header"&&(ve.contents=(pe=c.value)!=null&&pe.some(pa=>pa==null?void 0:pa.children)?[c.value]:c.value),ve})),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(i.value=M.cloneDeep(n.originalItemContents),c.value=(H=(V=i.value)==null?void 0:V.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:H.contents,k.value=(ve=(Z=i.value)==null?void 0:Z.find(J=>(J==null?void 0:J.key)==="rowButton"))==null?void 0:ve.contents,G.value=(pa=(pe=i.value)==null?void 0:pe.find(J=>(J==null?void 0:J.key)==="extraButton"))==null?void 0:pa.contents,g.value=(He=(ia=i.value)==null?void 0:ia.find(J=>(J==null?void 0:J.key)==="page"))!=null&&He.contents?!!((Ae=(_a=i.value)==null?void 0:_a.find(J=>(J==null?void 0:J.key)==="page"))!=null&&Ae.contents):!1,F.value=(La=(ha=i.value)==null?void 0:ha.find(J=>(J==null?void 0:J.key)==="tableToForm"))==null?void 0:La.contents,c.value=(Aa=c.value)==null?void 0:Aa.map((J,je)=>(Array.isArray(J)?J=oh(J):J={label:(J==null?void 0:J.label)??"",prop:(J==null?void 0:J.label)==="操作"?"operate":J==null?void 0:J.prop,width:J!=null&&J.width?parseInt(J.width):"",fixed:(J==null?void 0:J.fixed)??void 0,sortable:(J==null?void 0:J.sortable)??!1,align:(J==null?void 0:J.align)??"left",showOverflowTooltip:(J==null?void 0:J.showOverflowTooltip)??!0,isNotDrag:(J==null?void 0:J.isNotDrag)??!1,isEditCol:(J==null?void 0:J.isEditCol)??!1,isOperate:(J==null?void 0:J.isOperate)??!1,id:(J==null?void 0:J.id)??je,formMenuSelect:(J==null?void 0:J.formMenuSelect)??void 0,groupSelect:(J==null?void 0:J.groupSelect)??void 0},J)),c.value=(ua=c.value)!=null&&ua.every(J=>Array.isArray(J))?(Ta=c.value)==null?void 0:Ta[0]:c.value,k.value=(Ce=k.value)==null?void 0:Ce.map((J,je)=>J={label:(J==null?void 0:J.label)??"",type:(J==null?void 0:J.type)??"",textColor:(J==null?void 0:J.textColor)??"#000000",id:(J==null?void 0:J.id)??je}),G.value=(ma=G.value)==null?void 0:ma.map((J,je)=>J={label:(J==null?void 0:J.label)??"",type:(J==null?void 0:J.type)??"",background:(J==null?void 0:J.background)??"var(--ssComponent-primary-color)",id:(J==null?void 0:J.id)??je}),F.value)F.value=(W=F.value)==null?void 0:W.map(J=>{w.value++;let je=J;return je.id=w.value,je});else{let J=[];const je=(Je=te.getColumnChild(M.cloneDeep(c.value)))==null?void 0:Je.filter(We=>(We==null?void 0:We.prop)!=="operate");je==null||je.forEach(We=>{var Sa;w.value++,J.push({label:We==null?void 0:We.label,name:(We==null?void 0:We.prop)||(We==null?void 0:We.label),type:We!=null&&We.groupSelect?"Select":"Input",value:"",id:w.value,contents:We==null?void 0:We.options,menuSelect:We==null?void 0:We.formMenuSelect,groupSelect:(Sa=We==null?void 0:We.groupSelect)==null?void 0:Sa.split(":"),selectRelateType:"关联绑定列"})}),F.value=J}},{deep:!0,immediate:!0}),(V,H)=>{const Z=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Dh,[e.createElementVNode("div",Th,[e.createElementVNode("div",Bh,[H[2]||(H[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ve,{class:"icon-content",onClick:Ve,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[1]||(H[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Nh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(pe,pa)=>(e.openBlock(),e.createElementBlock("div",{key:pa},[e.createElementVNode("div",Ah,[e.createElementVNode("div",zh,e.toDisplayString(pe==null?void 0:pe.label),1),e.createElementVNode("div",Mh,[e.createVNode(Z,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>ce(pe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>ge(pe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>qa(pe)},null,8,["onClick"])])]),pe!=null&&pe.children&&pe.children.length>0?(e.openBlock(),e.createElementBlock("div",Ih,[e.createVNode(Pc,{tableChildContents:pe==null?void 0:pe.children,onDeleteChange:ca,onFixChange:we},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oh,[H[4]||(H[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:aa},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[3]||(H[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(pe,pa)=>(e.openBlock(),e.createElementBlock("div",{key:pa},[e.createElementVNode("div",Rh,[e.createElementVNode("div",$h,e.toDisplayString(pe==null?void 0:pe.label),1),e.createElementVNode("div",Vh,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>be(pe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Me(pe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Fh,[H[6]||(H[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:$},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[5]||(H[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ph,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(pe,pa)=>(e.openBlock(),e.createElementBlock("div",{key:pa},[e.createElementVNode("div",jh,[e.createElementVNode("div",Hh,e.toDisplayString(pe==null?void 0:pe.label),1),e.createElementVNode("div",Uh,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>$e(pe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>ue(pe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",qh,[H[8]||(H[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:le},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[7]||(H[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(pe,pa)=>(e.openBlock(),e.createElementBlock("div",{key:pa},[e.createElementVNode("div",Kh,[e.createElementVNode("div",Gh,e.toDisplayString(pe==null?void 0:pe.label),1),e.createElementVNode("div",Yh,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>ee(pe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>X(pe)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Jh,[e.createElementVNode("div",Xh,[H[9]||(H[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(dl._sfc_main$1,{modelValue:g.value,"onUpdate:modelValue":H[0]||(H[0]=pe=>g.value=pe)},null,8,["modelValue"])])])]),e.createVNode(Mr.ssDialog,{visible:s.value,onBeforeDestroy:Ke,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zh,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:he},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qh,[e.createVNode(ve,{onClick:Ke,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[11]||(H[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ve,{class:"ok-button button",onClick:fa,id:"themeButton"},{default:e.withCtx(()=>H[12]||(H[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Mr.ssDialog,{visible:d.value,onBeforeDestroy:ta,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",e6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:z.value,key:z.value,isEnableWrap:!0,onChange:Ea},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",a6,[e.createVNode(ve,{onClick:ta,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[13]||(H[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ve,{class:"ok-button button",onClick:ne,id:"themeButton"},{default:e.withCtx(()=>H[14]||(H[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Mr.ssDialog,{visible:L.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",l6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:_.value,key:_.value,isEnableWrap:!0,onChange:se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",r6,[e.createVNode(ve,{onClick:U,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[15]||(H[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ve,{class:"ok-button button",onClick:B,id:"themeButton"},{default:e.withCtx(()=>H[16]||(H[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Mr.ssDialog,{visible:h.value,onBeforeDestroy:re,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",n6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:me,onChangeVisible:Q,onBlurChange:de},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",i6,[e.createVNode(ve,{onClick:re,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[17]||(H[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ve,{class:"ok-button button",onClick:fe,id:"themeButton"},{default:e.withCtx(()=>H[18]||(H[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},t6=ir._export_sfc(o6,[["__scopeId","data-v-7a6b87b5"]]),s6=M.useModelComp(M.pinia),{pageMapState:c6}=M.storeToRefs(s6),u6=M.useMenuState(M.pinia),{activeMenuPath:d6}=M.storeToRefs(u6),p6=e.ref(24),f6=e.ref(6),h6=e.ref(10),v6=e.ref(70),m6=e.ref(.18),y6=e.ref(45),g6=(a,l,n,r)=>{var i,s,h,c,d,m,g,u,C,I,k,G,z,j,L,_;return{x:((s=(i=a==null?void 0:a.value)==null?void 0:i.tableData)==null?void 0:s.x)||l%2*12,y:((c=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:c.y)||l,w:((m=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:m.w)||p6.value,h:((u=(g=a==null?void 0:a.value)==null?void 0:g.tableData)==null?void 0:u.h)||n,minW:((I=(C=a==null?void 0:a.value)==null?void 0:C.tableData)==null?void 0:I.minW)||f6.value,minH:((G=(k=a==null?void 0:a.value)==null?void 0:k.tableData)==null?void 0:G.minH)||m6.value,maxH:((j=(z=a==null?void 0:a.value)==null?void 0:z.tableData)==null?void 0:j.maxH)||y6.value,i:((_=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:_.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},b6=(a,l)=>{var r,i,s,h,c,d,m,g;let n=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((h=(s=(i=a==null?void 0:a.compData)==null?void 0:i.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:h.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(n=((g=(m=(d=a==null?void 0:a.compData)==null?void 0:d.find(C=>(C==null?void 0:C.key)==="formContent"))==null?void 0:m.contents)==null?void 0:g.length)/5);return n*2},jc=(a,l,n)=>{var h,c;const r=(c=(h=c6.value)==null?void 0:h[d6.value])==null?void 0:c.filter(d=>{var m;return((m=d==null?void 0:d.key)==null?void 0:m.type)==="gridLayout"}),i=r==null?void 0:r.find(d=>{var m,g,u;return((u=(g=(m=d==null?void 0:d.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:u.id)===a.id}),s=b6(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((d,m)=>jc(d,m))),{...g6(i,l,s,a)}},k6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=M.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,i)=>jc(r,i)):[]},x6=a=>({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}]}]}}),w6=(a,l)=>a==null?void 0:a.map(n=>{for(const r in l)if(r===(n==null?void 0:n.prop))return{...n,value:l[r]};return n}),_6=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]);e.watch(()=>n.compType,c=>{var g;const d=x6(n==null?void 0:n.optionItems),m=c?(g=d[c==null?void 0:c.toUpperCase()])==null?void 0:g[n==null?void 0:n.target]:[];i.value=m==null?void 0:m.map(u=>{for(const[C,I]of Object.entries((n==null?void 0:n.comp)||{}))if((u==null?void 0:u.prop)===C)return{...u,value:I};return u})},{immediate:!0});const s=c=>dl.getComponent(c),h=c=>{var d,m;(c==null?void 0:c.prop)==="layout"&&(c==null?void 0:c.value)==="horizontal"?i.value=(d=i.value)==null?void 0:d.map(g=>{var u;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(u=g==null?void 0:g.options)==null?void 0:u.map(C=>({...C,disabled:!0}))}:(g==null?void 0:g.prop)==="isGridLayout"?{...g,disabled:!0}:g}):i.value=(m=i.value)==null?void 0:m.map(g=>{var u;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(u=g==null?void 0:g.options)==null?void 0:u.map(C=>({...C,disabled:!1}))}:(g==null?void 0:g.prop)==="isGridLayout"?{...g,disabled:!1}:g}),r("change",{target:n==null?void 0:n.target,styleConfigs:i.value,prop:c==null?void 0:c.prop})};return(c,d)=>{const m=e.resolveComponent("el-col"),g=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(g,{class:"style-row",key:u==null?void 0:u.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u==null?void 0:u.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(u.type)),{modelValue:u.value,"onUpdate:modelValue":C=>u.value=C,content:u==null?void 0:u.options,optionUrl:u==null?void 0:u.optionUrl,disabled:u==null?void 0:u.disabled,activeText:u==null?void 0:u.activeText,inactiveText:u==null?void 0:u.inactiveText,onChange:C=>h(u)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),S6=ir._export_sfc(_6,[["__scopeId","data-v-da01b651"]]),E6=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:l}){const n=a,r=l,i=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),h=j=>j==null?void 0:j.reduce((L,_)=>(L[_==null?void 0:_.prop]=_==null?void 0:_.rule,L),{}),c=e.computed(()=>({formRules:h(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),d=e.ref([]),m=e.ref(""),g=(j,L,_)=>{var b;let x=[];(n==null?void 0:n.activeTabName)==="任务配置"?(x=[{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:j},{label:"按钮名称",value:"按钮名称",children:L}]},{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:"暂停"}]}],s.value=[{prop:"任务名称",rule:i},{prop:"任务关键词",rule:i},{prop:"执行任务",rule:i},{prop:"执行动作",rule:i},{prop:"执行交互",rule:i}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(x=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(b=n==null?void 0:n.relatedData)==null?void 0:b.map(E=>({label:E==null?void 0:E.任务名称,value:E==null?void 0:E.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:i},{prop:"关联状态",rule:i},{prop:"关联形式",rule:i},{prop:"关联任务集合",rule:i}]);let w;return _&&(_==null?void 0:_.length)>0?w=[...x,...u(j,L,_)]:w=x,w},u=(j,L,_)=>{const x=[{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 _?x==null?void 0:x.filter(w=>_==null?void 0:_.includes(w==null?void 0:w.prop)):x},C=(j,L)=>{var E,F,$,le,Q,me,de,A,ee;const _=((Q=(le=($=(F=(E=n==null?void 0:n.comp)==null?void 0:E.compData)==null?void 0:F.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:$.contents)==null?void 0:le.filter(X=>(X==null?void 0:X.label)!=="操作"))==null?void 0:Q.map(X=>({value:X==null?void 0:X.prop,label:X.label})))||[],x=/button/i,w=((ee=(A=(de=(me=n==null?void 0:n.comp)==null?void 0:me.compData)==null?void 0:de.filter(X=>x.test(X==null?void 0:X.key)))==null?void 0:A.flatMap(X=>X==null?void 0:X.contents))==null?void 0:ee.map(X=>({value:X==null?void 0:X.label,label:X.label})))||[],b=g(_,w,j);d.value=L?w6(b,L):b,j&&(j==null?void 0:j.length)>0&&s.value.push(...j==null?void 0:j.map(X=>({prop:X,rule:i})))};e.onMounted(()=>{C(null,n==null?void 0:n.extendItem)});const I=j=>{const L=j==null?void 0:j[m.value];if(m.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const _=L==null?void 0:L.join("/");C(_==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:_==="进度设置/进度条"?["进度关键词"]:null,j)}},k=j=>{r("change",{target:n==null?void 0:n.target,extendConfigs:j})},G=(j,L)=>{m.value=L==null?void 0:L.changeProp,I(j)},z=j=>{r("onButtonClick",j)};return(j,L)=>(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:d.value,key:d.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:k,onBlurChange:G,onOnButtonClick:z},null,8,["rowContents","formRules","buttonValue"]))}}),C6=ir._export_sfc(E6,[["__scopeId","data-v-4b39853f"]]),D6={};function T6(a,l){return null}const B6=ir._export_sfc(D6,[["render",T6]]),N6={class:"form-operate-content"},A6={class:"form-operate-item"},z6={class:"operate-title"},M6={class:"operate-content"},I6={class:"fix-content"},O6={class:"fix-button"},L6={class:"operate-title"},R6={class:"operate-content"},$6={class:"fix-content"},V6={class:"fix-button"},F6={style:{display:"flex","justify-content":"space-between"}},P6={class:"form-content"},j6={class:"dialog-footer"},H6={class:"form-content"},U6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),s=e.ref([]),h=e.ref([]),c=e.ref(!1),d=e.ref([]),m=e.ref([]),g=e.ref(""),u=e.ref(!1),C=e.ref(0),I=e.ref([]),k=e.ref([]),G=(A,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="selectRelateType"){const X=ee==null?void 0:ee.optionUrl;return(X==null?void 0:X.selectRelateType)||ee[A.key]}if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="menuSelect"){const X=ee==null?void 0:ee.optionUrl;return(X==null?void 0:X.menuSelect)||ee[A.key]}if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="groupSelect"){const X=ee==null?void 0:ee.optionUrl;return(X==null?void 0:X.groupSelect)||ee[A.key]}if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[A.key];if((ee==null?void 0:ee.type)=="Select"&&(A==null?void 0:A.key)==="multiple"){const X=ee[A.key];return lc(X)?X:A.default}return(A==null?void 0:A.label)==="类型"&&ee[A.key]===""?"Input":(A==null?void 0:A.key)==="isFormColHidden"&&!ee[A.key]?!1:ee[A.key]},z=async A=>{var re,fe,$e,ue,B,se;i.value=!0;let ee=[];const X=await(($e=(fe=(re=te.FormContent)==null?void 0:re.find(U=>(U==null?void 0:U.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:fe.value)==null?void 0:$e.value)??((B=(ue=te.FormContent)==null?void 0:ue.find(U=>(U==null?void 0:U.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:B.value);if(X==null||X.forEach(U=>{C.value++,ee.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,prop:U==null?void 0:U.prop,value:G(U,A),id:C.value,contents:U==null?void 0:U.options,width:(A==null?void 0:A.width)??1})}),A!=null&&A.menuSelect&&((se=A==null?void 0:A.menuSelect)==null?void 0:se.length)>0){const U=await te.menuToContentType(A==null?void 0:A.menuSelect);ee=ee==null?void 0:ee.map(be=>((be==null?void 0:be.name)==="组信息选项"&&(be.contents=U),be))}g.value=A==null?void 0:A.id,s.value=await te.selectToBase(te.formToOptionsContents(ee)),h.value=await te.selectToBase(te.formToOptionsContents(ee))},j=A=>{var X;c.value=!0;let ee=[];(X=te.FormButton)==null||X.forEach(re=>{C.value++,ee.push({label:re==null?void 0:re.label,name:re==null?void 0:re.label,type:re.type,value:(re==null?void 0:re.label)==="类型"&&A[re.key]===""?"normal":A[re.key],id:C.value,contents:re==null?void 0:re.options})}),I.value=ee,k.value=ee,g.value=A==null?void 0:A.id};e.watch(()=>u.value,()=>{var ee,X;let A=M.cloneDeep(n.originalItemContents);(ee=M.cloneDeep(n.originalItemContents))!=null&&ee.find(re=>(re==null?void 0:re.key)==="enableWrap")?A=(X=M.cloneDeep(n.originalItemContents))==null?void 0:X.map(re=>((re==null?void 0:re.key)==="enableWrap"&&(re.contents=!u.value),re)):A.push({key:"enableWrap",contents:!u.value}),r("change",A)},{deep:!0});const L=()=>{var X,re,fe,$e,ue;I.value=k.value;let A={};if(g.value!==""?A.id=g.value:(C.value++,A.id="id"+C.value),(X=I.value)==null||X.forEach(B=>{var U;const se=(U=te.FormButton)==null?void 0:U.find(be=>(be==null?void 0:be.label)===(B==null?void 0:B.label));se&&(A[se.key]=B.value)}),(re=d.value)!=null&&re.find(B=>B.id===A.id))d.value=(fe=d.value)==null?void 0:fe.map(B=>(B.id===A.id&&(B=A),B));else{let B=M.cloneDeep(d.value);d.value||(d.value=[]),B.push(A),d.value=B}c.value=!1,g.value="";let ee=M.cloneDeep(n.originalItemContents);($e=M.cloneDeep(n.originalItemContents))!=null&&$e.find(B=>(B==null?void 0:B.key)==="formButton")?ee=(ue=M.cloneDeep(n.originalItemContents))==null?void 0:ue.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=d.value),B)):ee.push({key:"formButton",contents:d.value}),r("change",ee)},_=A=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,X;m.value=(ee=M.cloneDeep(m.value))==null?void 0:ee.filter(re=>(re==null?void 0:re.id)!==(A==null?void 0:A.id)),r("change",(X=M.cloneDeep(n.originalItemContents))==null?void 0:X.map(re=>((re==null?void 0:re.key)==="formContent"&&(re.contents=m.value),re))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=A=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,X;d.value=(ee=M.cloneDeep(d.value))==null?void 0:ee.filter(re=>(re==null?void 0:re.id)!==(A==null?void 0:A.id)),r("change",(X=M.cloneDeep(n.originalItemContents))==null?void 0:X.map(re=>((re==null?void 0:re.key)==="formButton"&&(re.contents=d.value),re))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{var ee;c.value=!0;let A=[];(ee=te.FormButton)==null||ee.forEach(X=>{C.value++,A.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:(X==null?void 0:X.label)==="类型"?"normal":"",id:C.value,contents:X==null?void 0:X.options})}),I.value=A,k.value=A},b=()=>{var ee,X,re;i.value=!0;let A=[];(re=(X=(ee=te.FormContent)==null?void 0:ee.find(fe=>(fe==null?void 0:fe.key)==="Input"))==null?void 0:X.value)==null||re.forEach(fe=>{C.value++,A.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:(fe==null?void 0:fe.label)==="类型"?"Input":"",id:C.value,contents:fe==null?void 0:fe.options})}),s.value=A,h.value=A},E=A=>{let ee=M.cloneDeep(k.value);ee=ee==null?void 0:ee.map(X=>(X.value=A==null?void 0:A[X.name],X)),k.value=ee},F=A=>{const ee=A.find(fe=>(fe==null?void 0:fe.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const X=A.find(fe=>(fe==null?void 0:fe.name)==="多选"),re=A.find(fe=>(fe==null?void 0:fe.name)==="初始值");X!=null&&X.value&&Ao.isString(re.value)&&(re.value=[re.value]),!(X!=null&&X.value)&&!Ao.isString(re.value)&&(re.value="")},$=async A=>{var ee,X,re,fe,$e,ue,B,se,U,be,Me,Ve;if((A==null?void 0:A.类型)!==((X=(ee=h.value)==null?void 0:ee.find(aa=>(aa==null?void 0:aa.label)==="类型"))==null?void 0:X.value)){let aa=[];const Ea=await(($e=(fe=(re=te.FormContent)==null?void 0:re.find(ne=>(ne==null?void 0:ne.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:fe.value)==null?void 0:$e.value)?await((be=(U=(se=te.FormContent)==null?void 0:se.find(ne=>(ne==null?void 0:ne.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:U.value)==null?void 0:be.value):(B=(ue=te.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:B.value;if(Ea==null||Ea.forEach(ne=>{var ce,ca;C.value++;const ta=Vu(ne==null?void 0:ne.default)?(A==null?void 0:A[ne.label])??ne.value??"":ne==null?void 0:ne.default;aa.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:ta,prop:ne==null?void 0:ne.prop,id:C.value,contents:ne==null?void 0:ne.options,width:((ca=(ce=h.value)==null?void 0:ce[0])==null?void 0:ca.width)??1})}),A!=null&&A.菜单选项&&((Me=A==null?void 0:A.菜单选项)==null?void 0:Me.length)>0){const ne=await te.menuToContentType(A==null?void 0:A.菜单选项);aa=aa==null?void 0:aa.map(ta=>((ta==null?void 0:ta.name)==="组信息选项"&&(ta.contents=ne),ta))}F(aa),h.value=await te.selectToBase(M.cloneDeep(aa)),s.value=await te.selectToBase(M.cloneDeep(aa))}else{let aa=M.cloneDeep(h.value);if(aa=aa==null?void 0:aa.map(Ea=>(Ea.value=A==null?void 0:A[Ea.name],Ea)),A!=null&&A.菜单选项&&((Ve=A==null?void 0:A.菜单选项)==null?void 0:Ve.length)>0){const Ea=await te.menuToContentType(A==null?void 0:A.菜单选项);aa=aa==null?void 0:aa.map(ne=>((ne==null?void 0:ne.name)==="组信息选项"&&(ne.contents=Ea),ne))}aa=te.formToOptionsContents(aa),F(aa),h.value=await te.selectToBase(M.cloneDeep(aa))}},le=A=>{A||(s.value=h.value)},Q=async A=>{await $(A),s.value=h.value},me=Vl.debounce(async()=>{var re,fe,$e,ue,B,se,U,be,Me,Ve,aa,Ea;s.value=h.value;let A={};A.width=((fe=(re=s.value)==null?void 0:re[0])==null?void 0:fe.width)??1,g.value!==""?A.id=g.value:(C.value++,A.id="id"+C.value);let ee=await((B=(ue=($e=te.FormContent)==null?void 0:$e.find(ne=>{var ta,ce;return(ne==null?void 0:ne.key)===(((ce=(ta=s.value)==null?void 0:ta.find(ca=>(ca==null?void 0:ca.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:ue.value)==null?void 0:B.value)??((U=(se=te.FormContent)==null?void 0:se.find(ne=>{var ta,ce;return(ne==null?void 0:ne.key)===(((ce=(ta=s.value)==null?void 0:ta.find(ca=>(ca==null?void 0:ca.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:U.value);if((be=s.value)==null||be.forEach(ne=>{const ta=ee==null?void 0:ee.find(ce=>(ce==null?void 0:ce.label)===(ne==null?void 0:ne.label));ta&&(A[ta.key]=ne.value)}),A.width=A.width?A.width:1,A.key=A==null?void 0:A.label,A.isFormColHidden=A==null?void 0:A.isFormColHidden,(Me=m.value)!=null&&Me.find(ne=>ne.id===A.id))m.value=(Ve=m.value)==null?void 0:Ve.map(ne=>(ne.id===A.id&&(ne=A),ne));else{let ne=M.cloneDeep(m.value);ne.push(A),m.value=ne}m.value=m.value.map(({id:ne,...ta})=>ta),i.value=!1,g.value="";let X=M.cloneDeep(n.originalItemContents);(aa=M.cloneDeep(n.originalItemContents))!=null&&aa.find(ne=>(ne==null?void 0:ne.key)==="formContent")?X=(Ea=M.cloneDeep(n.originalItemContents))==null?void 0:Ea.map(ne=>((ne==null?void 0:ne.key)==="formContent"&&(ne.contents=m.value),ne)):X.push({key:"formContent",contents:m.value}),r("change",X)},300),de=()=>{i.value=!1,c.value=!1,g.value="",h.value=[],k.value=[]};return e.watch(()=>n.originalItemContents,()=>{var ee,X,re,fe,$e,ue;if(!n.originalItemContents||n.originalItemContents.length===0)return;const A=M.cloneDeep(n.originalItemContents);m.value=((ee=A==null?void 0:A.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:ee.contents)??[],d.value=((X=A==null?void 0:A.find(B=>(B==null?void 0:B.key)==="formButton"))==null?void 0:X.contents)??[],u.value=(re=A==null?void 0:A.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&re.contents?!((fe=A==null?void 0:A.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&fe.contents):!0,m.value=($e=M.cloneDeep(m.value))==null?void 0:$e.map((B,se)=>{var be;let U=B;return U.id=(B==null?void 0:B.id)??se,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=((be=B==null?void 0:B.options)==null?void 0:be.length)===0?(B==null?void 0:B.contents)??"":B==null?void 0:B.options,U}),m.value=te.formToOptionsContents(m.value),d.value=(ue=d.value)==null?void 0:ue.map((B,se)=>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:se})},{deep:!0,immediate:!0}),(A,ee)=>{const X=e.resolveComponent("svg-icon"),re=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",N6,[e.createElementVNode("div",A6,[e.createElementVNode("div",z6,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(re,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",M6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(fe,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",I6,[e.createElementVNode("div",null,e.toDisplayString(fe.label),1),e.createElementVNode("div",O6,[e.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>z(fe)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>_(fe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",L6,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(re,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",R6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(fe,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",$6,[e.createElementVNode("div",null,e.toDisplayString(fe.label),1),e.createElementVNode("div",V6,[e.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>j(fe)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>x(fe)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",F6,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(dl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":ee[0]||(ee[0]=fe=>u.value=fe)},null,8,["modelValue"])])]),e.createVNode(Mr.ssDialog,{visible:i.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",P6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:$,onChangeVisible:le,onBlurChange:Q},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",j6,[e.createVNode(re,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(re,{class:"ok-button button",onClick:e.unref(me),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Mr.ssDialog,{visible:c.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",H6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:de,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ds=ir._export_sfc(U6,[["__scopeId","data-v-20850524"]]),q6={class:"step-module content"},W6={class:"module-data"},K6={class:"step-module layout"},G6={class:"form-content"},Y6=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),d=e.ref("create"),m=e.ref({}),g=e.ref([]),u=z=>{var j;m.value=z,r("change",(j=k())==null?void 0:j.compData)},C=(z,j)=>{var L,_;switch(z){case"create":(L=s.value)==null||L.forEach(x=>{x.value=""}),d.value="create",c.visible=!0;break;case"update":(_=s.value)==null||_.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),d.value="update",c.visible=!0;break;case"delete":g.value.splice(j,1),d.value="delete";break}},I=z=>{var j,L,_;if((z==null?void 0:z.buttonName)==="确认"){const x=M.cloneDeep(z==null?void 0:z.content);switch(Object.keys(x).forEach(w=>{x[w]===""&&delete x[w]}),d.value){case"create":g.value.push({...x,index:((j=g.value)==null?void 0:j.length)+1});break;case"update":g.value=(L=g.value)==null?void 0:L.map(w=>w.index===(x==null?void 0:x.index)?{...w,title:x==null?void 0:x.title,description:x==null?void 0:x.description}:w);break}r("change",(_=k())==null?void 0:_.compData),c.visible=!1}else c.visible=!1},k=()=>({comp:"Step",compData:[{key:"stepList",contents:g.value},{key:"stepConfig",contents:m.value}]}),G=()=>{c.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,z=>{var j,L;z&&(m.value=((j=z==null?void 0:z.find(_=>_.key==="stepConfig"))==null?void 0:j.contents)??{},g.value=((L=z==null?void 0:z.find(_=>_.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),(z,j)=>{const L=e.resolveComponent("svg-icon"),_=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",q6,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(_,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",W6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.title),1),e.createElementVNode("div",null,[e.createVNode(_,{type:"primary",size:"small",onClick:b=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(_,{type:"danger",size:"small",onClick:b=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",K6,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(dl.ssForm,{rowContents:i.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Mr.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:G,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",G6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:I},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),J6=ir._export_sfc(Y6,[["__scopeId","data-v-7dbd17f2"]]),X6={class:"step-module content"},Z6={class:"module-data"},Q6={class:"step-module layout"},e4={class:"form-content"},a4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref("create"),s=e.ref({}),h=e.ref([]),c=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"时间线"}),u=z=>{var j;s.value=z,r("change",(j=k())==null?void 0:j.compData)},C=(z,j)=>{var L,_;switch(z){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),i.value="create",g.visible=!0;break;case"update":(_=d.value)==null||_.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),i.value="update",g.visible=!0;break;case"delete":h.value.splice(j,1),i.value="delete";break}},I=z=>{var j,L,_,x;if((z==null?void 0:z.buttonName)==="确认"){const w=M.cloneDeep(z==null?void 0:z.content);switch(Object.keys(w).forEach(b=>{w[b]===""&&delete w[b]}),i.value){case"create":(L=h.value)==null||L.push({...w,index:((j=h.value)==null?void 0:j.length)+1});break;case"update":h.value=(_=h.value)==null?void 0:_.map(b=>b.index===(w==null?void 0:w.index)?{...b,content:w==null?void 0:w.content,timestamp:w==null?void 0:w.timestamp}:b);break}r("change",(x=k())==null?void 0:x.compData),g.visible=!1}else g.visible=!1},k=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:h.value},{key:"timeLineConfig",contents:s.value}]}),G=()=>{g.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,z=>{var j,L;z&&(s.value=((j=z==null?void 0:z.find(_=>_.key==="timeLineConfig"))==null?void 0:j.contents)??{},h.value=((L=z==null?void 0:z.find(_=>_.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),(z,j)=>{const L=e.resolveComponent("svg-icon"),_=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",X6,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(_,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Z6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.content),1),e.createElementVNode("div",null,[e.createVNode(_,{type:"primary",size:"small",onClick:b=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(_,{type:"danger",size:"small",onClick:b=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Q6,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(dl.ssForm,{rowContents:c.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Mr.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:G,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",e4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:I},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),l4=ir._export_sfc(a4,[["__scopeId","data-v-39ffc861"]]),r4={};function n4(a,l){return e.openBlock(),e.createElementBlock("div")}const i4=ir._export_sfc(r4,[["render",n4]]),o4={class:"extra-content"},t4={key:0},s4={key:1},c4={class:"dialog-footer"},u4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const n=a,r=e.ref(0),i=e.ref(),s=e.ref(),h=l,c=e.ref(!1),d=e.ref({}),m=e.ref({}),g=e.ref();e.watch(()=>[n.itemData],()=>{var x;const _=M.cloneDeep(n.itemData);i.value=(x=M.cloneDeep(_))==null?void 0:x.map(w=>{var b;if(w.key==="extra"){let E=[];(b=w.value)==null||b.forEach(F=>{var $;E.push(($=Object.values(F))==null?void 0:$[0])}),w.value=E}return w})},{deep:!0,immediate:!0});const u=(_,x,w,b)=>{var F;let E={};((F=_==null?void 0:_[0])==null?void 0:F.contents)==="详情"&&(c.value=!0,E[x]=_,s.value=_==null?void 0:_.filter($=>($==null?void 0:$.key)!=="tableContentName"),d.value=E,m.value=w,g.value=b.id)},C=_=>{var $,le,Q,me;const x=(le=($=Object.values(M.cloneDeep(d.value)))==null?void 0:$[0])==null?void 0:le.filter(de=>(de==null?void 0:de.key)==="tableContentName"),w=(me=(Q=Object.values(M.cloneDeep(d.value)))==null?void 0:Q[0])==null?void 0:me.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),b=w==null?void 0:w.map((de,A)=>{var ee;return A===_.index&&(de==null?void 0:de.comp)==="Table"&&(de.compData=(ee=de.compData)==null?void 0:ee.map(X=>{var re,fe;return(X==null?void 0:X.key)==="tableContents"&&(X.contents=(fe=(re=_.content)==null?void 0:re.map($e=>{let ue={};for(let B in $e)B!=="id"&&(ue[B]=$e[B]);return ue}))==null?void 0:fe.map($e=>Object.values($e))),X})),de});b.unshift(x==null?void 0:x[0]);let E=M.cloneDeep(d.value),F={};for(let de in E)F[de]=b;d.value=F},I=()=>{c.value=!1,d.value={},m.value={},g.value=void 0,r.value++},k=_=>{var $,le,Q,me;const x=(le=($=Object.values(M.cloneDeep(d.value)))==null?void 0:$[0])==null?void 0:le.filter(de=>(de==null?void 0:de.key)==="tableContentName"),w=(me=(Q=Object.values(M.cloneDeep(d.value)))==null?void 0:Q[0])==null?void 0:me.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),b=w==null?void 0:w.map((de,A)=>(A===_.index&&(de.compData=_.contents),de));b.unshift(x==null?void 0:x[0]);let E=M.cloneDeep(d.value),F={};for(let de in E)F[de]=b;d.value=F},G=()=>{var x,w;let _={};for(let b in m.value)b===((x=Object.keys(d.value))==null?void 0:x[0])?_[b]=(w=Object.values(d.value))==null?void 0:w[0]:_[b]=m.value[b];h("change",{buttonName:"编辑",index:g.value,singleContent:_},"methodData"),c.value=!1,d.value={},m.value={},g.value=void 0},z=()=>{c.value=!1,d.value={},m.value={},g.value=void 0},j=_=>{h("change",_,"methodData")},L=_=>Mi(_);return(_,x)=>{const w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",o4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(b,E)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(b==null?void 0:b.key)==="extra"?(e.openBlock(),e.createElementBlock("div",t4)):(e.openBlock(),e.createElementBlock("div",s4,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(b.comp)),{itemData:b==null?void 0:b.compData,childItemData:b==null?void 0:b.itemChildData,key:E,index:(b==null?void 0:b.id)??E,onContentClick:u,onChange:j},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Mr.ssDialog,{visible:c.value,onBeforeDestroy:z},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(b,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(b.comp)),{itemData:b==null?void 0:b.compData,onChange:C,childItemData:b==null?void 0:b.itemChildData,key:E,onContentChange:k,index:(b==null?void 0:b.id)??E,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",c4,[e.createVNode(w,{class:"cancel-button footer-button",onClick:I,id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(w,{class:"confirm-button footer-button",onClick:G,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},d4=ir._export_sfc(u4,[["__scopeId","data-v-2d9c5ab2"]]),p4={key:0,class:"method-content"},f4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),n=te.useOriginalState(M.pinia),{originalPath:r}=M.storeToRefs(n),i=a,s=e.ref(!1),h=e.ref(),c=te.useTableComp(M.pinia),{multipleTableConst:d}=M.storeToRefs(c),m=M.useModelComp(M.pinia),g=e.ref(!1),u=M.useMenuState(M.pinia),C=M.useLoginState(M.pinia),{itemData:I,isEdit:k,routeToChildPath:G,tableViewContents:z,lockingPage:j,payloadTypes:L}=M.storeToRefs(m),{activeMenuPath:_,platform:x,childMenu:w}=M.storeToRefs(u),{loginUserInfo:b}=M.storeToRefs(C),E=e.ref(!1),F=async()=>{var ue,B;(ue=l.value)!=null&&ue.find(se=>(se==null?void 0:se.buttonName)==="保存")&&await X((B=l.value)==null?void 0:B.find(se=>(se==null?void 0:se.buttonName)==="保存")),await te.onSaveBack()};e.watch(()=>I.value,async()=>{k.value==="view"&&!E.value&&await $e(M.cloneDeep(i.itemData)),E.value=!1},{deep:!0});const $=()=>{s.value=!1,h.value=void 0},le=ue=>ue.map(B=>{const se={};for(const U in B){const be=B[U];if(U.includes(d.value)){const Me=U.split(d.value);let Ve=se;Me.forEach((aa,Ea)=>{Ea===Me.length-1?Ve[aa]=be:(Ve[aa]||(Ve[aa]={}),Ve=Ve[aa])})}else se[U]=be}return se}),Q=async(ue,B,se=[])=>{var be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa;let U=(be=M.cloneDeep(B))==null?void 0:be.filter(V=>(V==null?void 0:V.comp)!=="methodButton");if(ue!=null&&ue.includes("[")){let V=(ne=(Ea=(aa=(Ve=(Me=M.cloneDeep(ue))==null?void 0:Me.split("["))==null?void 0:Ve[1])==null?void 0:aa.split("]"))==null?void 0:Ea[0])==null?void 0:ne.split(":"),H="";if(V!=null&&V[0]){let Z=(ta=U==null?void 0:U.find(ve=>(ve==null?void 0:ve.name)===(V==null?void 0:V[0])))==null?void 0:ta.compData;if(!Z){let ve=(ce=ue==null?void 0:ue.split("["))==null?void 0:ce[0],pe=await te.getItemData(ve,sessionStorage.getItem("systemKey"),"",!1,"","",se);Z=(ca=pe==null?void 0:pe.find(pa=>(pa==null?void 0:pa.name)===(V==null?void 0:V[0])))==null?void 0:ca.compData}Z==null||Z.forEach(ve=>{var pe,pa,ia,He,_a,Ae;if((ve==null?void 0:ve.key)==="formContent")(pe=ve==null?void 0:ve.contents)==null||pe.forEach(ha=>{var La;(ha==null?void 0:ha.key)===(V==null?void 0:V[1])&&(Array.isArray(ha==null?void 0:ha.value)?H=ha==null?void 0:ha.value:H=(La=ha==null?void 0:ha.value)==null?void 0:La.toString())});else if((ve==null?void 0:ve.key)==="tableContents"){let ha=[],La=(pa=Z==null?void 0:Z.find(ua=>(ua==null?void 0:ua.key)==="header"))==null?void 0:pa.contents,Aa=(V==null?void 0:V[1])??"";if(La!=null&&La.every(ua=>Array.isArray(ua))){let ua=te.getColumnChild((_a=La==null?void 0:La[0])==null?void 0:_a.filter(Ta=>(Ta==null?void 0:Ta.label)!=="操作"));(Ae=ve.contents)==null||Ae.forEach(Ta=>{let Ce={};Ta=Ta==null?void 0:Ta.filter(ma=>!(ma!=null&&ma.id)),ua==null||ua.forEach((ma,Je)=>{let W=Ta[Je];typeof Ta[Je]=="number"&&(W=Ta[Je].toString()),(Aa===""||Aa===ma.prop)&&(Ce[ma.prop]=W)}),ha.push(Ce)}),ha=le(ha)}else{let ua=(ia=La==null?void 0:La.map(Ta=>Ta==null?void 0:Ta.label))==null?void 0:ia.filter(Ta=>Ta!=="操作");(He=ve.contents)==null||He.forEach(Ta=>{let Ce={};Ta=Ta==null?void 0:Ta.filter(ma=>!(ma!=null&&ma.id)),ua==null||ua.forEach((ma,Je)=>{let W=Ta[Je];typeof Ta[Je]=="number"&&(W=Ta[Je].toString()),(Aa===""||Aa===ma)&&(Ce[ma]=W)}),ha.push(Ce)})}H=ha}})}return H}else if(ue!=null&&ue.includes("/")){let V={};return(we=M.cloneDeep(U))==null||we.forEach((H,Z)=>{var ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W,J,je,We;if((H==null?void 0:H.comp)==="Table"){let Sa=Array.isArray((pa=(pe=(ve=H==null?void 0:H.compData)==null?void 0:ve.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:pe.contents)==null?void 0:pa[0])?(Ae=(_a=(He=(ia=H==null?void 0:H.compData)==null?void 0:ia.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:He.contents)==null?void 0:_a[0])==null?void 0:Ae.some(Oe=>Oe==null?void 0:Oe.children):[],sa=(Aa=(La=(ha=H==null?void 0:H.compData)==null?void 0:ha.find(Oe=>(Oe==null?void 0:Oe.key)==="tableContents"))==null?void 0:La.contents)==null?void 0:Aa.map(Oe=>(Oe!=null&&Oe.find(Le=>Le==null?void 0:Le.id)&&(Oe=Oe.slice(1)),Oe)),Va=(Je=(ma=(Ce=(Ta=(ua=H==null?void 0:H.compData)==null?void 0:ua.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:Ta.contents)==null?void 0:Ce[0])==null?void 0:ma[0])==null?void 0:Je.label,Re=(J=(W=H==null?void 0:H.compData)==null?void 0:W.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:J.contents;if(Sa)(Sa==null?void 0:Sa.length)===0?V[H.name]=V!=null&&V[H.name]?V[H.name]:te.tableToForm(sa,Re):V[Va]=te.tableToForm(sa,Re);else{const Oe=[];Re=Re.slice(1,Re.length-1),Re==null||Re.forEach((Le,Be)=>{sa==null||sa.forEach(ze=>{Oe.push({key:Le.label+ze[0],value:ze[Be+1]})})}),V["form"+Z]=Oe}}else{const Sa=(We=(je=H.compData)==null?void 0:je.find(Va=>(Va==null?void 0:Va.key)==="formContent"))==null?void 0:We.contents;V!=null&&V.form||(V.form=[]);const sa=[];Sa==null||Sa.forEach(Va=>{Va.key!==""&&(Va={key:(Va==null?void 0:Va.key)??(Va==null?void 0:Va.label),value:Va==null?void 0:Va.value},sa.push(Va))}),V.form=[...sa,...M.cloneDeep(V==null?void 0:V.form)]}}),V}else{if(ue==="createInsofDataApi"){let V=(ge=M.cloneDeep(B))==null?void 0:ge[0];return V={comp:(he=M.cloneDeep(V))==null?void 0:he.comp,compData:(Ke=M.cloneDeep(V))==null?void 0:Ke.compData,name:(fa=M.cloneDeep(V))==null?void 0:fa.name,isShow:(qa=M.cloneDeep(V))==null?void 0:qa.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:_.value},value:{pageData:V}}}return ue}},me=async(ue,B,se)=>{var Me,Ve,aa;let U=await te.getItemData(B,sessionStorage.getItem("systemKey"),""),be=U==null?void 0:U.find(Ea=>(Ea==null?void 0:Ea.name)===(se==null?void 0:se[0]));if(be){if((be==null?void 0:be.comp)==="Table"){let Ea={};for(let he in M.cloneDeep(ue))M.cloneDeep(ue)[he]!=="loginUser"?Ea[he]=M.cloneDeep(ue)[he]:Ea[he]=((Me=b.value)==null?void 0:Me.account)||((Ve=b.value)==null?void 0:Ve.账号);let ne=[],ta=Ea;Array.isArray(ue)||(ta=[Ea]),ta==null||ta.forEach(he=>{ne.push({[he[se[1]]]:he})});let ce=[],ca=ne==null?void 0:ne.map(he=>{var Ke;return(Ke=Object.keys(he))==null?void 0:Ke[0]});U==null||U.forEach(he=>{var Ke;(he==null?void 0:he.name)===(se==null?void 0:se[0])&&((Ke=he==null?void 0:he.compData)==null||Ke.forEach(fa=>{var qa;(fa==null?void 0:fa.key)==="tableContents"&&((qa=fa==null?void 0:fa.contents)==null||qa.forEach(V=>{V!=null&&V.some(H=>ca.includes(H))&&ce.push({[V.find(H=>H.id).id]:V.find(H=>ca.includes(H))})}))}))});let we=ce==null?void 0:ce.map(he=>{var Ke;return(Ke=Object.keys(he))==null?void 0:Ke[0]}),ge=[];if(we==null||we.forEach(he=>{var qa;let Ke=(qa=ce==null?void 0:ce.find(V=>{var H;return((H=Object.keys(V))==null?void 0:H[0].toString())===he.toString()}))==null?void 0:qa[he],fa=ne==null?void 0:ne.find(V=>{var H;return((H=Object.keys(V))==null?void 0:H[0])===Ke});ge.push({id:parseInt(he),value:{tableData:fa[Ke]}})}),(ge==null?void 0:ge.length)>0)return ge}else if((be==null?void 0:be.comp)==="Form"){let Ea=M.cloneDeep(be);Ea.compData=(aa=Ea.compData)==null?void 0:aa.map(ce=>{var ca;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(ca=ce.contents)==null?void 0:ca.map(we=>((we==null?void 0:we.key)===(se==null?void 0:se[1])&&(we.value=(ue==null?void 0:ue[we==null?void 0:we.prop])||ue),we))),ce});let ne={};for(let ce in Ea)ce!=="id"&&(ne[ce]=Ea[ce]);let ta=[];if(ta.push({id:be==null?void 0:be.id,keyType:se==null?void 0:se[1],value:{pageData:ne}}),(ta==null?void 0:ta.length)>0)return ta}}},de=async(ue,B,se)=>{var Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge;let U=await te.getItemData(B,sessionStorage.getItem("systemKey"),""),be=U==null?void 0:U.find(he=>(he==null?void 0:he.name)===(se==null?void 0:se[0]));if(be){if((be==null?void 0:be.comp)==="Table"){let he={};for(let Ke in M.cloneDeep(ue))M.cloneDeep(ue)[Ke]!=="loginUser"?he[Ke]=M.cloneDeep(ue)[Ke]:he[Ke]=((Me=b.value)==null?void 0:Me.account)||((Ve=b.value)==null?void 0:Ve.账号);await Fr.createInsofDataApi({key:{type:"data",pageKey:B,tableId:be==null?void 0:be.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:he}})}else if((be==null?void 0:be.comp)==="Form"){let he=M.cloneDeep(be),Ke=Object.keys(ue),fa="";(Ea=(aa=M.cloneDeep(he))==null?void 0:aa.compData)==null||Ea.forEach(pe=>{var pa,ia;(pe==null?void 0:pe.key)==="formContent"&&((ia=(pa=M.cloneDeep(pe))==null?void 0:pa.contents)==null||ia.forEach(He=>{var _a;Ke.includes(He==null?void 0:He.key)&&(He==null?void 0:He.value)===((_a=b.value)==null?void 0:_a.姓名)&&(fa=He==null?void 0:He.key)}))});let qa=[];(ne=Object.values(ue[fa]))==null||ne.forEach(pe=>{pe!=null&&pe.includes("(")&&qa.push(pe)}),qa=[...new Set(qa)];const V=qa==null?void 0:qa.map(async pe=>{var Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W,J,je;let pa="";(Ta=(ua=(Aa=(La=(ha=(Ae=M.cloneDeep(pe))==null?void 0:Ae.split("("))==null?void 0:ha[1])==null?void 0:La.split(")"))==null?void 0:Aa[0])==null?void 0:ua.split(":"))==null||Ta.forEach(We=>{pa=pa===""?pa+We.replaceAll("'",""):pa+"/"+We.replaceAll("'","")});let ia=[];(je=(J=(W=(Je=(ma=(Ce=M.cloneDeep(pe))==null?void 0:Ce.split("<"))==null?void 0:ma[1])==null?void 0:Je.split(">"))==null?void 0:W[0])==null?void 0:J.split(":"))==null||je.forEach(We=>{ia.push(We.replaceAll("'",""))});const He=await te.getItemData(pa,sessionStorage.getItem("systemKey"),"");let _a="";return He==null||He.forEach(We=>{var Sa;We.name===(ia==null?void 0:ia[0])&&((Sa=We==null?void 0:We.compData)==null||Sa.forEach(sa=>{var Va;(sa==null?void 0:sa.key)==="formContent"&&((Va=sa.contents)==null||Va.forEach(Re=>{(Re==null?void 0:Re.key)===(ia==null?void 0:ia[1])&&(_a=Re==null?void 0:Re.value)}))}))}),{[pe]:_a}}),H=await Promise.all(V);he.compData=(ce=(ta=M.cloneDeep(he))==null?void 0:ta.compData)==null?void 0:ce.map(pe=>{var pa,ia;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(ia=(pa=M.cloneDeep(pe))==null?void 0:pa.contents)==null?void 0:ia.map(He=>{var _a,Ae,ha,La;return(_a=ue[fa])!=null&&_a[He==null?void 0:He.key]&&(ue[fa][He==null?void 0:He.key].includes("(")?He.value=(Ae=H==null?void 0:H.find(Aa=>{var ua;return((ua=Object.keys(Aa))==null?void 0:ua[0])===ue[fa][He==null?void 0:He.key]}))==null?void 0:Ae[ue[fa][He==null?void 0:He.key]]:He.value=(La=(ha=M.cloneDeep(ue))==null?void 0:ha[fa])==null?void 0:La[He==null?void 0:He.key]),He})),pe});const Z=await Fr.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let ve="";((ca=Z==null?void 0:Z.data)==null?void 0:ca.type)==="success"&&((ge=(we=Z==null?void 0:Z.data)==null?void 0:we.result)==null||ge.forEach(pe=>{var pa,ia;((ia=(pa=pe==null?void 0:pe.value)==null?void 0:pa.pageData)==null?void 0:ia.name)===(se==null?void 0:se[0])&&(ve=pe.id)}),await Fr.updateInsofDataApi({id:ve,value:{pageData:he}}))}}},A=(ue,B="",se={})=>{for(const[U,be]of Object.entries(ue)){const Me=B?`${B}.${U}`:U;be!==null&&typeof be=="object"&&!Array.isArray(be)&&Object.prototype.toString.call(be)!=="[object Date]"?A(be,Me,se):se[Me]=be}return se},ee=async(ue,B,se,U)=>{var Ve,aa,Ea,ne,ta,ce,ca,we,ge,he,Ke,fa,qa,V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La;let be=await te.getItemData(B,sessionStorage.getItem("systemKey"),""),Me=be==null?void 0:be.find(Aa=>(Aa==null?void 0:Aa.name)===(se==null?void 0:se[0]));if(Me){if(!(se!=null&&se[1])&&(Me==null?void 0:Me.comp)==="Table"){let Aa={},ua=[],Ta=(aa=(Ve=Me==null?void 0:Me.compData)==null?void 0:Ve.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:aa.contents;Ta!=null&&Ta.every(Je=>Array.isArray(Je))?ua=(ne=te.getColumnChild((Ea=Ta==null?void 0:Ta[0])==null?void 0:Ea.filter(Je=>(Je==null?void 0:Je.label)!=="操作")))==null?void 0:ne.map(Je=>Je==null?void 0:Je.prop):ua=Ta==null?void 0:Ta.map(Je=>Je==null?void 0:Je.label);for(let Je in M.cloneDeep(ue))if(M.cloneDeep(ue)[Je]!=="loginUser"){let W=A(M.cloneDeep(ue)[Je]),J={};for(let je in W)if(ua!=null&&ua.find(We=>We===je))J[je]=W[je];else if(ua!=null&&ua.find(We=>(We==null?void 0:We.toUpperCase())===(je==null?void 0:je.toUpperCase()))){let We=ua==null?void 0:ua.find(Sa=>(Sa==null?void 0:Sa.toUpperCase())===(je==null?void 0:je.toUpperCase()));J[We]=W[je]}Aa[Je]=J}else Aa[Je]=((ta=b.value)==null?void 0:ta.account)||((ce=b.value)==null?void 0:ce.账号);let Ce=await Fr.getInsofDataApi({keyLikes:{tableId:Me==null?void 0:Me.id}});if(((we=(ca=Ce==null?void 0:Ce.data)==null?void 0:ca.result)==null?void 0:we.length)>0){let Je=(he=(ge=Ce==null?void 0:Ce.data)==null?void 0:ge.result)==null?void 0:he.map(W=>W==null?void 0:W.id);(Je==null?void 0:Je.length)>0&&await Fr.batchDeleteInsofDataApi({ids:Je})}let ma=[];if((Ke=Me==null?void 0:Me.compData)!=null&&Ke.find(Je=>(Je==null?void 0:Je.key)==="pageColumn")&&((V=(qa=(fa=Me==null?void 0:Me.compData)==null?void 0:fa.find(Je=>(Je==null?void 0:Je.key)==="pageColumn"))==null?void 0:qa.contents)!=null&&V.includes("["))){const Je=await Fr.getInsofDataApi({id:Me==null?void 0:Me.tableId});let W=((pe=(ve=(Z=(H=Je==null?void 0:Je.data)==null?void 0:H.result)==null?void 0:Z[0])==null?void 0:ve.key)==null?void 0:pe.pageKey)??"";(pa=Object.values(Aa))==null||pa.forEach(J=>{ma.push({key:{type:"data",pageKey:W,tableId:Me==null?void 0:Me.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:J}})})}else(ia=Object.values(Aa))==null||ia.forEach(Je=>{ma.push({key:{type:"data",pageKey:B,tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Je}})});(ma==null?void 0:ma.length)>0&&await Fr.batchAddInsofDataApi({dataList:ma})}else if(!(se!=null&&se[1])&&(Me==null?void 0:Me.comp)==="Form"){let Aa=M.cloneDeep(Me);Aa.compData=(_a=(He=M.cloneDeep(Aa))==null?void 0:He.compData)==null?void 0:_a.map(Ce=>{var ma,Je;return(Ce==null?void 0:Ce.key)==="formContent"&&(Ce.contents=(Je=(ma=M.cloneDeep(Ce))==null?void 0:ma.contents)==null?void 0:Je.map(W=>{var J,je;return(J=M.cloneDeep(ue))!=null&&J[W==null?void 0:W.key]&&(W.value=(je=M.cloneDeep(ue))==null?void 0:je[W==null?void 0:W.key]),W})),Ce});const ua=await Fr.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let Ta="";((Ae=ua==null?void 0:ua.data)==null?void 0:Ae.type)==="success"&&((La=(ha=ua==null?void 0:ua.data)==null?void 0:ha.result)==null||La.forEach(Ce=>{var ma,Je;((Je=(ma=Ce==null?void 0:Ce.value)==null?void 0:ma.pageData)==null?void 0:Je.name)===(se==null?void 0:se[0])&&(Ta=Ce.id)}),await Fr.updateInsofDataApi({id:Ta,value:{pageData:Aa}}))}}},X=async ue=>{var B,se,U,be,Me,Ve,aa,Ea,ne,ta,ce,ca,we,ge;u.setImportLoading(!0);try{if(ue.api){let he=new WeakMap,Ke=await te.getItemData((w==null?void 0:w.value)===""?_.value:w==null?void 0:w.value,sessionStorage.getItem("systemKey"),"",!1,"","",he),fa="";if(Ke=Ke==null?void 0:Ke.map(ia=>{var He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W;if((ia==null?void 0:ia.comp)==="Form")ia.compData=(He=ia.compData)==null?void 0:He.map(J=>{var je;return(J==null?void 0:J.key)==="formContent"&&(J.contents=(je=J.contents)==null?void 0:je.map(We=>{var Sa;if((We==null?void 0:We.value)===""&&(We==null?void 0:We.type)==="Select"){let sa=te.judgeContents((Sa=M.cloneDeep(We))==null?void 0:Sa.optionUrl,he);We.value=We.value||sa}return We})),J});else if((ia==null?void 0:ia.comp)==="Table"&&(_a=ia.compData)!=null&&_a.find(J=>(J==null?void 0:J.key)==="pageColumn")){let J=(ha=(Ae=ia.compData)==null?void 0:Ae.find(sa=>(sa==null?void 0:sa.key)==="pageColumn"))==null?void 0:ha.contents,je=((Aa=(La=ia.compData)==null?void 0:La.find(sa=>(sa==null?void 0:sa.key)==="pageGroup"))==null?void 0:Aa.contents)??"",We=(Ce=(Ta=(ua=J==null?void 0:J.split("["))==null?void 0:ua[1])==null?void 0:Ta.split("]"))==null?void 0:Ce[0];fa=((ma=J==null?void 0:J.split("["))==null?void 0:ma[0])+((W=(Je=z.value)==null?void 0:Je.find(sa=>(sa==null?void 0:sa.key)===We))==null?void 0:W.value)}return ia}),!(fa===""||fa==="")){const ia=await te.getItemData(fa,sessionStorage.getItem("systemKey"),"",!1,"","",he);Ke=Ke==null?void 0:Ke.map(He=>{var _a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W,J,je;if((He==null?void 0:He.comp)==="Table"&&(_a=He.compData)!=null&&_a.find(We=>(We==null?void 0:We.key)==="pageColumn")){let We=(ha=(Ae=He.compData)==null?void 0:Ae.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn"))==null?void 0:ha.contents,Sa=((Aa=(La=He.compData)==null?void 0:La.find(Oe=>(Oe==null?void 0:Oe.key)==="pageGroup"))==null?void 0:Aa.contents)??"",sa=(Ce=(Ta=(ua=We==null?void 0:We.split("["))==null?void 0:ua[1])==null?void 0:Ta.split("]"))==null?void 0:Ce[0],Va=((ma=We==null?void 0:We.split("["))==null?void 0:ma[0])+((W=(Je=z.value)==null?void 0:Je.find(Oe=>(Oe==null?void 0:Oe.key)===sa))==null?void 0:W.value),Re=(J=ia==null?void 0:ia.find(Oe=>(Oe==null?void 0:Oe.name)===(Sa===""?i==null?void 0:i.compName:Sa)))==null?void 0:J.compData;He.compData=(je=He.compData)==null?void 0:je.map(Oe=>{var Le;return(Oe==null?void 0:Oe.key)==="tableContents"&&(Oe.contents=(Le=Re==null?void 0:Re.find(Be=>(Be==null?void 0:Be.key)==="tableContents"))==null?void 0:Le.contents),Oe})}return He})}let qa={};if(((se=(B=ue==null?void 0:ue.extraValues)==null?void 0:B.input)==null?void 0:se.length)>0){const ia=(be=(U=ue==null?void 0:ue.extraValues)==null?void 0:U.input)==null?void 0:be.map(async He=>{var _a;re!=null&&re.find(Ae=>Ae===He)?qa=await Q(He,Ke):qa[Object.keys(He)[0]]=await Q((_a=Object.values(He))==null?void 0:_a[0],Ke,he)});await Promise.all(ia)}else qa=await Q("/",Ke);let V=!1;(Ve=(Me=ue==null?void 0:ue.extraValues)==null?void 0:Me.output)==null||Ve.forEach(ia=>{var He,_a;(_a=(He=Object.values(ia))==null?void 0:He[0])!=null&&_a.includes(".doc")&&(V=!0)});let H;if(V){const ia=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await Ja.axios.post(ue.api,qa,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ia.close()})}else H=await Ja.axios.post(ue.api,qa,{headers:{"Content-Type":"application/json"}});let Z=(ta=(ne=(Ea=(aa=M.cloneDeep(ue))==null?void 0:aa.extraValues)==null?void 0:Ea.output)==null?void 0:ne.map(ia=>{var He,_a,Ae,ha,La,Aa,ua,Ta,Ce,ma,Je,W,J,je,We,Sa;if(!((_a=(He=Object.values(ia))==null?void 0:He[0])!=null&&_a.includes(".doc"))){let sa=(ma=(Ce=(Ta=(ha=M.cloneDeep((Ae=Object.values(ia))==null?void 0:Ae[0]))==null?void 0:ha.split("["))==null?void 0:Ta[((ua=(Aa=M.cloneDeep((La=Object.values(ia))==null?void 0:La[0]))==null?void 0:Aa.split("["))==null?void 0:ua.length)-1])==null?void 0:Ce.split("]"))==null?void 0:ma[0],Va=sa==null?void 0:sa.split(":"),Re=(J=M.cloneDeep((Je=Object.values(ia))==null?void 0:Je[0]))==null?void 0:J.substring(0,M.cloneDeep((W=Object.values(ia))==null?void 0:W[0]).lastIndexOf("["));if(Re=(We=M.cloneDeep(Re))==null?void 0:We.slice(0,((je=M.cloneDeep(Re))==null?void 0:je.length)-1),Re!=null&&Re.includes("[")){let Oe="";if((Sa=te.contentTransArrayToAll(Re,"/"))==null||Sa.forEach(Le=>{var Be,ze,ul,Cl,Ml,Rl,Al;if(!(Le!=null&&Le.includes("[")))Oe=Oe===""?Oe+Le.replaceAll("/",""):Oe+"/"+Le.replaceAll("/","");else{let er=M.cloneDeep(Le).slice(1,((Be=M.cloneDeep(Le))==null?void 0:Be.length)-1),Qa=(Rl=(Ml=(Cl=(ul=(ze=M.cloneDeep(er))==null?void 0:ze.split("["))==null?void 0:ul[1])==null?void 0:Cl.split("]"))==null?void 0:Ml[0])==null?void 0:Rl.split(":"),Ul="",Ua=(Al=Ke==null?void 0:Ke.find(ql=>(ql==null?void 0:ql.name)===(Qa==null?void 0:Qa[0])))==null?void 0:Al.compData;Ua==null||Ua.forEach(ql=>{var Il;(ql==null?void 0:ql.key)==="formContent"&&((Il=ql==null?void 0:ql.contents)==null||Il.forEach(lr=>{(lr==null?void 0:lr.key)===(Qa==null?void 0:Qa[1])&&(Ul=lr==null?void 0:lr.value)}))}),Oe=Oe===""?Oe+Ul.replaceAll("/",""):Oe+"/"+Ul.replaceAll("/","")}}),Re=Oe,Re[(Re==null?void 0:Re.length)-1]!=="/")return Re}}}))==null?void 0:ta.filter(ia=>ia);Z=[...new Set(M.cloneDeep(Z))];let ve=Z==null?void 0:Z.map(async ia=>{let He=await te.getItemData(ia,sessionStorage.getItem("systemKey"),"",!1,"","",he);if((He==null?void 0:He.length)===0)return await te.getParentContents(ia)});await Promise.all(ve);let pe=[],pa=(we=(ca=(ce=M.cloneDeep(ue))==null?void 0:ce.extraValues)==null?void 0:ca.output)==null?void 0:we.map(async ia=>{var Ta,Ce,ma,Je,W,J,je,We,Sa,sa,Va,Re,Oe,Le,Be,ze,ul,Cl,Ml,Rl,Al,er,Qa,Ul,Ua,ql,Il,lr,_l,xr,Ra,nl,va,za,da,Ha,Dl,Te,na,ja,Ee,Ma,Ya,vl,wl,Ie,ba,oa,wa,ga,ol,Fe,gl,Ne,Kl,Ca,sl,Za,bl,Ia,$l,br,yn,_r,Pl,cn,Ur,Wr,Yr,Zr;if((Ce=(Ta=Object.values(ia))==null?void 0:Ta[0])!=null&&Ce.includes(".doc")){var He=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),_a=H.headers["content-disposition"],Ae=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ha=Ae.exec(_a),La=ha==null?void 0:ha[1],Aa=document.createElement("a"),ua=window.URL.createObjectURL(He);h.value=[{name:La,blobUrl:ua}],s.value=!0}else{let Kr=(sa=(Sa=(We=(Je=M.cloneDeep((ma=Object.values(ia))==null?void 0:ma[0]))==null?void 0:Je.split("["))==null?void 0:We[((je=(J=M.cloneDeep((W=Object.values(ia))==null?void 0:W[0]))==null?void 0:J.split("["))==null?void 0:je.length)-1])==null?void 0:Sa.split("]"))==null?void 0:sa[0],or=Kr==null?void 0:Kr.split(":"),sr=(Oe=M.cloneDeep((Va=Object.values(ia))==null?void 0:Va[0]))==null?void 0:Oe.substring(0,M.cloneDeep((Re=Object.values(ia))==null?void 0:Re[0]).lastIndexOf("["));if(sr!=null&&sr.includes("[")?sr=(Be=M.cloneDeep(sr))==null?void 0:Be.slice(0,((Le=M.cloneDeep(sr))==null?void 0:Le.length)-1):sr===""&&(sr=_.value),sr=sr.replaceAll("<","[").replaceAll(">","]"),sr!=null&&sr.includes("[")){let xl="";(ze=te.contentTransArrayToAll(sr,"/"))==null||ze.forEach((hr,Yl)=>{var Tr,Xl,wr,Pr,Er,un,en,Zn,Hn,Tn,On;if(!(hr!=null&&hr.includes("[")))xl=xl===""?xl+hr.replaceAll("/",""):xl+"/"+hr.replaceAll("/","");else{let Un="",gn="";(Tr=M.cloneDeep(hr))!=null&&Tr.includes("]")?(Un=M.cloneDeep(hr).slice(1,((Xl=M.cloneDeep(hr))==null?void 0:Xl.length)-1),gn=(en=(un=(Er=(Pr=(wr=M.cloneDeep(Un))==null?void 0:wr.split("["))==null?void 0:Pr[1])==null?void 0:Er.split("]"))==null?void 0:un[0])==null?void 0:en.split(":")):(Un=M.cloneDeep(hr).slice(1,(Zn=M.cloneDeep(hr))==null?void 0:Zn.length),gn=(Hn=M.cloneDeep(Un))==null?void 0:Hn.split("/"));let Ln="",Qn=(Tn=Ke==null?void 0:Ke.find(Jr=>(Jr==null?void 0:Jr.name)===(gn==null?void 0:gn[0])))==null?void 0:Tn.compData;Qn==null||Qn.forEach(Jr=>{var ei;(Jr==null?void 0:Jr.key)==="formContent"&&((ei=Jr==null?void 0:Jr.contents)==null||ei.forEach(Sn=>{(Sn==null?void 0:Sn.key)===(gn==null?void 0:gn[1])&&(Ln=Sn==null?void 0:Sn.value)}))}),((On=te.contentTransArrayToAll(sr,"/"))==null?void 0:On.length)-1!==Yl?xl=xl===""?xl+Ln.replaceAll("/",""):xl+"/"+Ln.replaceAll("/",""):xl=xl+r.value+Ln.replaceAll("/","")}}),(ul=_.value)!=null&&ul.includes(xl)?sr=_.value:sr=xl}let Qr=M.cloneDeep((Cl=Object.keys(ia))==null?void 0:Cl[0]);if(((Ml=H==null?void 0:H.data)==null?void 0:Ml.statusCode)===200||((Rl=H==null?void 0:H.data)==null?void 0:Rl.code)===200){if(((er=(Al=H==null?void 0:H.data)==null?void 0:Al.data)!=null&&er[Qr]||(Ul=(Qa=H==null?void 0:H.data)==null?void 0:Qa.result)!=null&&Ul[Qr])&&(or==null?void 0:or.length)===1)return await ee(((ql=(Ua=H==null?void 0:H.data)==null?void 0:Ua.data)==null?void 0:ql[Qr])||((lr=(Il=H==null?void 0:H.data)==null?void 0:Il.result)==null?void 0:lr[Qr]),M.cloneDeep(sr),or,fa);if((xr=(_l=H==null?void 0:H.data)==null?void 0:_l.data)!=null&&xr[Qr]||(nl=(Ra=H==null?void 0:H.data)==null?void 0:Ra.result)!=null&&nl[Qr]){let xl=await me(((za=(va=H==null?void 0:H.data)==null?void 0:va.data)==null?void 0:za[Qr])||((Ha=(da=H==null?void 0:H.data)==null?void 0:da.result)==null?void 0:Ha[Qr]),M.cloneDeep(sr),or);return xl&&(pe=[...pe,...xl]),xl}else{if(!((Dl=H==null?void 0:H.data)!=null&&Dl.data)){let xl=await te.getItemData(_.value,sessionStorage.getItem("systemKey"),"",!1,"","",he);xl=xl==null?void 0:xl.map(Yl=>{var Tr;return(Yl==null?void 0:Yl.name)===(or==null?void 0:or[0])&&(Yl.compData=(Tr=Yl.compData)==null?void 0:Tr.map(Xl=>{var wr;return(Xl==null?void 0:Xl.key)==="formContent"&&(Xl.contents=(wr=Xl.contents)==null?void 0:wr.map(Pr=>{var Er,un;return(Pr==null?void 0:Pr.key)===(or==null?void 0:or[1])&&(Pr.value=(un=(Er=H==null?void 0:H.data)==null?void 0:Er.result)==null?void 0:un[Qr==null?void 0:Qr.replaceAll(":","")]),Pr})),Xl})),Yl});let hr=[];(Te=xl==null?void 0:xl.filter(Yl=>(Yl==null?void 0:Yl.comp)==="Form"))==null||Te.forEach(async Yl=>{let Tr={};for(let Xl in Yl)Xl!=="id"&&(Tr[Xl]=Yl[Xl]);hr.push({id:Yl==null?void 0:Yl.id,value:{pageData:Tr}})}),(hr==null?void 0:hr.length)>0&&await Fr.batchUpdateInsofDataApi({dataList:hr});return}if((or==null?void 0:or.length)===1){const xl=(Ee=(ja=(na=H==null?void 0:H.data)==null?void 0:na.data)==null?void 0:ja.path)==null?void 0:Ee.path;let hr="";(Ie=(wl=(vl=(Ya=(Ma=xl==null?void 0:xl.split("("))==null?void 0:Ma[1])==null?void 0:Ya.split(")"))==null?void 0:vl[0])==null?void 0:wl.split(":"))==null||Ie.forEach(Xl=>{var wr,Pr;hr=hr===""?hr+((wr=Xl==null?void 0:Xl.replaceAll("'",""))==null?void 0:wr.trim()):hr+"/"+((Pr=Xl==null?void 0:Xl.replaceAll("'",""))==null?void 0:Pr.trim())});let Yl=[(ol=(ga=(wa=(oa=(ba=xl==null?void 0:xl.split("<"))==null?void 0:ba[1])==null?void 0:oa.split(">"))==null?void 0:wa[0])==null?void 0:ga.replaceAll("'",""))==null?void 0:ol.trim()],Tr;return(Ne=(gl=(Fe=H==null?void 0:H.data)==null?void 0:Fe.data)==null?void 0:gl.data)!=null&&Ne[or==null?void 0:or[0]]?Tr=await ee((sl=(Ca=(Kl=H==null?void 0:H.data)==null?void 0:Kl.data)==null?void 0:Ca.data)==null?void 0:sl[or==null?void 0:or[0]],hr,or,fa):Tr=await de((bl=(Za=H==null?void 0:H.data)==null?void 0:Za.data)==null?void 0:bl.data,hr,Yl,he),Tr}else{const xl=(br=($l=(Ia=H==null?void 0:H.data)==null?void 0:Ia.data)==null?void 0:$l.path)==null?void 0:br.path;let hr="";return(Ur=(cn=(Pl=(_r=(yn=xl==null?void 0:xl.split("("))==null?void 0:yn[1])==null?void 0:_r.split(")"))==null?void 0:Pl[0])==null?void 0:cn.split(":"))==null||Ur.forEach(Tr=>{var Xl,wr;hr=hr===""?hr+((Xl=Tr==null?void 0:Tr.replaceAll("'",""))==null?void 0:Xl.trim()):hr+"/"+((wr=Tr==null?void 0:Tr.replaceAll("'",""))==null?void 0:wr.trim())}),await me((Zr=(Yr=(Wr=H==null?void 0:H.data)==null?void 0:Wr.data)==null?void 0:Yr.data)==null?void 0:Zr[or==null?void 0:or[0]],hr,or)}}}}});if(await Promise.all(pa),(pe==null?void 0:pe.length)>0){let ia=[];pe==null||pe.forEach(Ae=>{ia!=null&&ia.find(ha=>{var La,Aa,ua,Ta;return((Aa=(La=ha==null?void 0:ha.value)==null?void 0:La.pageData)==null?void 0:Aa.name)===((Ta=(ua=Ae==null?void 0:Ae.value)==null?void 0:ua.pageData)==null?void 0:Ta.name)})||ia.push(Ae)});let He=[];ia==null||ia.forEach(Ae=>{var Aa,ua,Ta,Ce;let ha=M.cloneDeep(Ae);ha.value.pageData.compData=(Aa=ha.value.pageData.compData)==null?void 0:Aa.map(ma=>{var Je;return(ma==null?void 0:ma.key)==="formContent"&&(ma.contents=(Je=ma.contents)==null?void 0:Je.map(W=>{var je,We,Sa,sa;let J=(je=M.cloneDeep(pe))==null?void 0:je.find(Va=>(Va==null?void 0:Va.keyType)===(W==null?void 0:W.key));if(J){let Va=(sa=(Sa=(We=J.value.pageData.compData)==null?void 0:We.find(Re=>(Re==null?void 0:Re.key)==="formContent"))==null?void 0:Sa.contents)==null?void 0:sa.find(Re=>(Re==null?void 0:Re.key)===(W==null?void 0:W.key));W.value=Va==null?void 0:Va.value}return W})),ma}),He.push({id:ha==null?void 0:ha.id,value:ha==null?void 0:ha.value});let La=[];(Ce=(Ta=(ua=ha==null?void 0:ha.value)==null?void 0:ua.pageData)==null?void 0:Ta.compData)==null||Ce.forEach(ma=>{var Je;(ma==null?void 0:ma.key)==="formContent"&&((Je=ma==null?void 0:ma.contents)==null||Je.forEach(W=>{var J,je,We,Sa,sa,Va;if((je=(J=W==null?void 0:W.optionUrl)==null?void 0:J.menuSelect)!=null&&je.find(Re=>Re==null?void 0:Re.includes("[")))if(La!=null&&La.find(Re=>{var Oe,Le,Be;return((Oe=Re==null?void 0:Re.key)==null?void 0:Oe.join(","))===((Be=(Le=W==null?void 0:W.optionUrl)==null?void 0:Le.menuSelect)==null?void 0:Be.join(","))})){let Re=(We=La==null?void 0:La.find(Oe=>{var Le,Be,ze;return((Le=Oe==null?void 0:Oe.key)==null?void 0:Le.join(","))===((ze=(Be=W==null?void 0:W.optionUrl)==null?void 0:Be.menuSelect)==null?void 0:ze.join(","))}))==null?void 0:We.value;Re.push({key:W==null?void 0:W.prop,groups:(Sa=W==null?void 0:W.optionUrl)==null?void 0:Sa.groupSelect,value:W==null?void 0:W.value}),La=La==null?void 0:La.map(Oe=>{var Le,Be,ze;return((Le=Oe==null?void 0:Oe.key)==null?void 0:Le.join(","))===((ze=(Be=W==null?void 0:W.optionUrl)==null?void 0:Be.menuSelect)==null?void 0:ze.join(","))&&(Oe.value=Re),Oe})}else La.push({key:(sa=W==null?void 0:W.optionUrl)==null?void 0:sa.menuSelect,value:[{key:W==null?void 0:W.prop,groups:(Va=W==null?void 0:W.optionUrl)==null?void 0:Va.groupSelect,value:W==null?void 0:W.value}]})}))}),(La==null?void 0:La.length)>0&&(La=La==null?void 0:La.map(ma=>{var W;let Je="";return(W=ma==null?void 0:ma.key)==null||W.forEach(J=>{var je;if(!(J!=null&&J.includes("[")))Je=Je===""?Je+J:Je+"/"+J;else{let We="",Sa=(je=J==null?void 0:J.replaceAll("[","").replaceAll("]",""))==null?void 0:je.split(":");Ke==null||Ke.forEach(sa=>{var Va;(sa==null?void 0:sa.name)===(Sa==null?void 0:Sa[0])&&((Va=sa==null?void 0:sa.compData)==null||Va.forEach(Re=>{var Oe;(Re==null?void 0:Re.key)==="formContent"&&((Oe=Re==null?void 0:Re.contents)==null||Oe.forEach(Le=>{(Le==null?void 0:Le.prop)===(Sa==null?void 0:Sa[1])&&(We=Le==null?void 0:Le.value)}))}))}),Je=Je+r.value+We}}),ma.key=Je,ma})),La==null||La.forEach(ma=>{var je,We,Sa;let Je=(je=he[ma.key])==null?void 0:je.find(sa=>{var Va,Re,Oe,Le,Be,ze,ul;return((Re=(Va=sa==null?void 0:sa.value)==null?void 0:Va.pageData)==null?void 0:Re.name)===((Be=(Le=(Oe=ma==null?void 0:ma.value)==null?void 0:Oe[0])==null?void 0:Le.groups)==null?void 0:Be[0])&&((ul=(ze=sa==null?void 0:sa.value)==null?void 0:ze.pageData)==null?void 0:ul.name)!==void 0}),W=Je==null?void 0:Je.id,J=(We=Je==null?void 0:Je.value)==null?void 0:We.pageData;J.compData=(Sa=J.compData)==null?void 0:Sa.map(sa=>{var Va;return(sa==null?void 0:sa.key)==="formContent"&&(sa.contents=(Va=sa.contents)==null?void 0:Va.map(Re=>{var Le;let Oe=(Le=ma.value)==null?void 0:Le.find(Be=>(Be==null?void 0:Be.key)===(Re==null?void 0:Re.prop));return Oe&&(Re.value=Oe.value),Re})),sa}),He.push({id:W,value:{pageData:J}})})});let _a=(ge=M.cloneDeep(pe))==null?void 0:ge[0];(He==null?void 0:He.length)>0&&await Fr.batchUpdateInsofDataApi({dataList:He})}m.setFreshContent(!0)}u.setImportLoading(!1)}catch{Ja.ElMessage.error("方法执行错误,请查看方法!"),u.setImportLoading(!1)}E.value=!0},re=["createInsofDataApi"],fe=Vl.debounce(async ue=>{X(ue)},100),$e=async ue=>{var Ve,aa,Ea;const B=M.cloneDeep(ue);let se,U=new WeakMap;ue!=null&&ue[0].path&&(se=await(B==null?void 0:B.map(async(ne,ta)=>{var qa,V,H,Z,ve,pe,pa,ia,He,_a,Ae,ha,La,Aa,ua,Ta;const ca=(qa=U[ne==null?void 0:ne.path])==null?void 0:qa.filter(Ce=>{var ma;return((ma=Ce==null?void 0:Ce.key)==null?void 0:ma.type)==="data"});let we="";const ge=await te.getItemData(_.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);ca==null||ca.forEach(Ce=>{var ma,Je,W,J,je;((Je=(ma=Ce==null?void 0:Ce.value)==null?void 0:ma.tableData)==null?void 0:Je.算法名称)===((W=B==null?void 0:B[ta])==null?void 0:W.method)&&(we=(je=(J=Ce==null?void 0:Ce.value)==null?void 0:J.tableData)==null?void 0:je.算法体)});const he=await te.getItemData(ne==null?void 0:ne.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);let Ke="",fa=(ve=(Z=(H=(V=he==null?void 0:he[0])==null?void 0:V.compData)==null?void 0:H.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:Z.contents)==null?void 0:ve.findIndex(Ce=>(Ce==null?void 0:Ce.prop)==="算法体");return(pa=(pe=he==null?void 0:he[0])==null?void 0:pe.compData)==null||pa.forEach(Ce=>{var ma;(Ce==null?void 0:Ce.key)==="tableContents"&&((ma=Ce==null?void 0:Ce.contents)==null||ma.forEach(Je=>{Je!=null&&Je.find(W=>W===(ne==null?void 0:ne.method))&&(Ke=Je[fa])}))}),{buttonName:((ia=B==null?void 0:B[ta])==null?void 0:ia.method)||((Ae=(_a=(He=ca==null?void 0:ca[0])==null?void 0:He.value)==null?void 0:_a.tableData)==null?void 0:Ae.算法名称),api:(we===""?(Aa=(La=(ha=ca==null?void 0:ca[0])==null?void 0:ha.value)==null?void 0:La.tableData)==null?void 0:Aa.算法体:we)||Ke,content:ge==null?void 0:ge.filter(Ce=>Ce.comp!=="methodButton"),extraContent:(ua=M.cloneDeep(ne.value))==null?void 0:ua.slice(1),methodName:(ne==null?void 0:ne.path)??"",extraValues:(Ta=B==null?void 0:B[ta])==null?void 0:Ta.data}})));const be=B==null?void 0:B.map(async ne=>{var he,Ke,fa,qa,V,H;const ta=(he=resAll.data.result)==null?void 0:he.filter(Z=>{var ve,pe,pa;return((ve=Z==null?void 0:Z.key)==null?void 0:ve.parentTable)===""&&((pe=Z==null?void 0:Z.key)==null?void 0:pe.type)==="method"&&((pa=Z==null?void 0:Z.key)==null?void 0:pa.methodName)===Z.method}),ce=ta==null?void 0:ta[0],ca=(Ke=resAll.data.result)==null?void 0:Ke.filter(Z=>{var ve,pe;return((ve=Z==null?void 0:Z.key)==null?void 0:ve.type)==="methodData"&&((pe=Z==null?void 0:Z.key)==null?void 0:pe.tableId)===(ce==null?void 0:ce.id)}),we=await te.getItemData(_.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U),ge=ca==null?void 0:ca[0];return{buttonName:(fa=ce==null?void 0:ce.key)==null?void 0:fa.methodKey,api:(V=(qa=ge==null?void 0:ge.value)==null?void 0:qa.tableData)==null?void 0:V[0],content:we==null?void 0:we.filter(Z=>Z.comp!=="methodButton"),extraContent:(H=M.cloneDeep(ne.value))==null?void 0:H.slice(1),methodName:(ne==null?void 0:ne.method)??""}}),Me=(Ve=ue==null?void 0:ue[0])!=null&&Ve.path&&((aa=ue==null?void 0:ue[0])==null?void 0:aa.path)!==""?await Promise.all(se):await Promise.all(be);l.value=Me==null?void 0:Me.filter(ne=>ne==null?void 0:ne.extraContent),(Ea=l.value)==null||Ea.forEach(ne=>{var ta;ne.api===""&&((ta=ne.content)==null||ta.forEach(ce=>{var ca;ce.comp=="Table"&&m.setExtraContents(te.methodTableToContent(ce.compData,(ca=ne.extraContent)==null?void 0:ca[0]))}))})};return e.watch(()=>i.itemData,async()=>{k.value=="view"&&!E.value&&await $e(M.cloneDeep(i.itemData)),E.value=!1},{immediate:!0,deep:!0}),(ue,B)=>{var se,U,be;return e.unref(k)!=="edit"?(e.openBlock(),e.createElementBlock("div",p4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=l.value)==null?void 0:se.filter(Me=>(Me==null?void 0:Me.buttonName)!=="保存"),Me=>{var Ve;return e.openBlock(),e.createElementBlock("div",null,[Me.api!==""?(e.openBlock(),e.createBlock(e.unref(ss._sfc_main),{key:0,disabled:e.unref(j)===e.unref(_)&&!((Ve=Me==null?void 0:Me.buttonName)!=null&&Ve.includes("预览")),class:"calculator-content",modelValue:Me.buttonName,onClickTrigger:aa=>e.unref(fe)(Me),loading:g.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(G)!==""&&((be=e.unref(_))==null?void 0:be[((U=e.unref(_))==null?void 0:U.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(ss._sfc_main),{key:0,class:"calculator-content",onClickTrigger:F,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:0,fileDataList:h.value,onDestroy:$},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},h4=ir._export_sfc(f4,[["__scopeId","data-v-063aa9af"]]),v4={};function m4(a,l){return" 567 "}const y4=ir._export_sfc(v4,[["render",m4]]),g4={class:"module content"},b4={class:"module data"},k4={class:"module layout"},x4={class:"form-content"},w4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),d=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),m=e.ref({}),g=e.ref([]),u=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:g.value},{key:"signConfig",contents:m.value}]}),C=z=>{var j;m.value=M.cloneDeep(z),r("change",(j=u())==null?void 0:j.compData)},I=z=>{var j,L;if((z==null?void 0:z.buttonName)==="确认"){const _=M.cloneDeep(z==null?void 0:z.content);switch(s.value){case"create":g.value.push({..._,index:((j=g.value)==null?void 0:j.length)+1});break}r("change",(L=u())==null?void 0:L.compData),i.visible=!1}else i.visible=!1},k=(z,j)=>{var L,_;switch(z){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),s.value="create",i.visible=!0;break;case"update":(_=d.value)==null||_.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),s.value="update",i.visible=!0;break;case"delete":g.value.splice(j,1),s.value="delete";break}},G=()=>{i.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,z=>{var j,L;z&&(m.value=((j=z==null?void 0:z.find(_=>_.key==="signConfig"))==null?void 0:j.contents)??{},g.value=((L=z==null?void 0:z.find(_=>_.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),(z,j)=>{const L=e.resolveComponent("svg-icon"),_=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",g4,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(_,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>k("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",b4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",null,[e.createVNode(_,{type:"primary",size:"small",onClick:b=>k("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(_,{type:"danger",size:"small",onClick:b=>k("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",k4,[e.createVNode(dl.ssForm,{rowContents:c.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(Mr.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:G,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",x4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:I},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),_4=ir._export_sfc(w4,[["__scopeId","data-v-487e0536"]]),S4=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(0),s=e.computed(()=>{var u,C;return(u=n==null?void 0:n.stepConfig)!=null&&u.allowTrigger?i.value:(C=n==null?void 0:n.stepConfig)==null?void 0:C.active}),h=(u,C)=>{i.value=C-1,r("clickStep",u,C)};e.onMounted(()=>{var u;r("clickStep",(u=n==null?void 0:n.stepList)==null?void 0:u[0],0)});const c=u=>dl.getComponent(u),d=()=>{var C;const u=(C=n==null?void 0:n.stepList)==null?void 0:C.find((I,k)=>k+1===s.value);return console.log("findStep",u),u?u==null?void 0:u.children:[]},m=u=>{r("clickTrigger",u)},g=u=>{r("changeTrigger",u)};return(u,C)=>{var G,z,j,L,_;const I=e.resolveComponent("el-step"),k=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k,{direction:(G=a.stepConfig)==null?void 0:G.direction,active:s.value,"finish-status":"success",simple:(z=a.stepConfig)==null?void 0:z.simple,"align-center":((j=a.stepConfig)==null?void 0:j.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(x,w)=>(e.openBlock(),e.createBlock(I,{key:w,class:"step-item",onClick:b=>h(x,w+1)},{title:e.withCtx(()=>[e.renderSlot(u.$slots,"title",{title:x==null?void 0:x.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(u.$slots,"description",{descriptions:x==null?void 0:x.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((_=a.stepConfig)!=null&&_.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(x,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(x==null?void 0:x.type)),{modelValue:x.value,"onUpdate:modelValue":b=>x.value=b,onClickTrigger:m,onChangeTrigger:g,content:x==null?void 0:x.content},e.createSlots({_:2},[e.renderList(u.$slots,(b,E)=>({name:E,fn:e.withCtx(F=>[e.renderSlot(u.$slots,E,e.mergeProps({ref_for:!0},F||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),E4=ir._export_sfc(S4,[["__scopeId","data-v-a30ff621"]]),C4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const n=a,r=l,i=e.ref({}),s=e.ref([]),h=(c,d)=>{r("clickStep",c,d)};return e.watch(()=>n==null?void 0:n.itemData,c=>{var u,C,I,k;i.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let d=((u=c==null?void 0:c.find(G=>(G==null?void 0:G.key)==="stepName"))==null?void 0:u.contents)??[],m=[];(I=(C=c==null?void 0:c.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:C.contents)==null||I.forEach(G=>{m.push({label:G==null?void 0:G.label,prop:G==null?void 0:G.prop,name:G==null?void 0:G.prop,type:"text",disabled:!0})});let g=((k=c==null?void 0:c.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:k.contents)??[];d=d==null?void 0:d.map((G,z)=>{let j=m==null?void 0:m.map(L=>{var _;return{...L,value:(_=g==null?void 0:g[z])==null?void 0:_[L==null?void 0:L.prop]}});return{title:G,description:j}}),s.value=d},{immediate:!0,deep:!0}),(c,d)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(E4,{stepConfig:i.value,stepList:s.value,onClickStep:h},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:g})=>[e.createTextVNode(e.toDisplayString(g),1)]),description:e.withCtx(({descriptions:g})=>[e.createVNode(dl.ssForm,{ref:"formRef",rowContents:g,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),D4=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,n)=>{const r=e.resolveComponent("el-timeline-item"),i=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(i,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,h)=>(e.openBlock(),e.createBlock(r,{key:h,timestamp:s.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),T4=ir._export_sfc(D4,[["__scopeId","data-v-4172a886"]]),B4={class:"line-content"},N4={class:"line-time"},A4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,i=>{var s,h;r.value=(s=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:s.contents,n.value=(h=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:h.contents},{immediate:!0}),(i,s)=>(e.openBlock(),e.createBlock(T4,{activities:r.value,timeLineConfig:n.value},{content:e.withCtx(({content:h,timestamp:c})=>[e.createElementVNode("span",B4,e.toDisplayString(h),1),e.createElementVNode("span",N4,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),z4=ir._export_sfc(A4,[["__scopeId","data-v-b4d9deed"]]),M4={class:"tabs-content"},I4=e.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(a,{emit:l}){const n=a,r=l,i=e.ref();e.watch(()=>n==null?void 0:n.itemData,()=>{i.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const s=C=>{r("change",C)},h=(C,I)=>{r("contentChange",C,I)},c=C=>{r("pageChange",C)},d=C=>{r("rowClick",C)},m=(C,I)=>{r("routeUrl",C,I)},g=C=>{r("clickTrigger",C)},u=(C,I)=>{r("clickMainKey",C,I)};return(C,I)=>{var k,G;return e.openBlock(),e.createElementBlock("div",M4,[(k=i.value)!=null&&k.length?(e.openBlock(),e.createBlock(dl.ssTab,{tabsContents:i.value,key:(G=i.value)==null?void 0:G.length},{pane:e.withCtx(({tab:z,index:j})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)(z==null?void 0:z.comp)),{related:z==null?void 0:z.relatedTables,compNames:n==null?void 0:n.compNames,compName:z==null?void 0:z.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:a.isDevMode,itemData:z==null?void 0:z.compData,childItemData:z==null?void 0:z.itemChildData,onChange:s,index:(z==null?void 0:z.id)??j,config:{showIndex:z==null?void 0:z.showIndex,allowMove:z==null?void 0:z.allowMove,viewport:z==null?void 0:z.viewport,status:z==null?void 0:z.status},onContentChange:h,onPageChange:c,onRowClick:d,onRouteUrl:m,parentTableId:z==null?void 0:z.tableId,allMapContents:a.allMapContents,children:z==null?void 0:z.children,level:1,onClickTrigger:g,onClickMainKey:u},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),O4=ir._export_sfc(I4,[["__scopeId","data-v-1ea318b4"]]),L4={class:"type-select"},R4=["onClick"],$4={class:"list-icon"},V4={__name:"modelSelect",setup(a){const l=Xn(M.pinia),{itemData:n}=M.storeToRefs(l),r=i=>{const s=M.cloneDeep(n.value);s.push({comp:i.comp,name:i.name,compData:[]}),l.setItemData(s)};return(i,s)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",L4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(cu),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:d},[e.createElementVNode("div",{class:"list-content",onClick:m=>r(c)},[e.createElementVNode("div",$4,[e.createVNode(h,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,R4)]))),128))])}}},F4=ir._export_sfc(V4,[["__scopeId","data-v-91799bf8"]]),P4={class:"fill-content"},j4={class:"operate-content"},H4={class:"collapse-title-content"},U4={class:"collapse-title-item"},q4={key:1},W4=["onClick"],K4={class:"icon-content"},G4={key:0,class:"edit-content"},Y4=["onClick"],J4={class:"comp-child"},X4={__name:"modelFill",setup(a){const l=Xn(M.pinia),{itemData:n,originalData:r}=M.storeToRefs(l),i=e.ref([]);e.ref([]);const s=e.ref([]),h=e.ref([]),c=I=>{var G;let k=(G=M.cloneDeep(h.value))==null?void 0:G.map((z,j)=>(I===j&&(z.content=!0),z));h.value=k},d=I=>{var G;let k=(G=M.cloneDeep(h.value))==null?void 0:G.map((z,j)=>(I===j&&(z.content=!1),z));h.value=k,i.value=M.cloneDeep(n.value)},m=(I,k)=>{var L;let G=(L=M.cloneDeep(h.value))==null?void 0:L.map((_,x)=>(I===x&&(_.content=!1),_));h.value=G;const z=M.cloneDeep(n.value),j=z==null?void 0:z.filter((_,x)=>(x===I&&(_.name=k),_));l.setOriginalData(j),l.setItemData(j)};e.watch(()=>n.value,()=>{var I,k,G;!n.value||((I=n.value)==null?void 0:I.length)===0?i.value=[]:i.value=(k=M.cloneDeep(n.value))==null?void 0:k.filter(z=>(z==null?void 0:z.comp)!=="methodButton"),s.value=i.value,h.value=(G=M.cloneDeep(s.value))==null?void 0:G.map((z,j)=>({id:j,content:!1}))},{deep:!0,immediate:!0});const g=I=>Mi(I),u=(I,k,G)=>{var j,L;if(!I)return;let z=M.cloneDeep(n.value);z=(j=z==null?void 0:z.map((_,x)=>(x===G&&(_.compData=I),_)))==null?void 0:j.filter(_=>(_==null?void 0:_.comp)!=="methodButton"),h.value=(L=M.cloneDeep(z))==null?void 0:L.map((_,x)=>({id:x,content:!1})),l.setOriginalData(z),l.setItemData(z)},C=I=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const k=M.cloneDeep(n.value),G=k==null?void 0:k.filter((z,j)=>j!==I);l.setOriginalData(G),l.setItemData(G),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(I,k)=>{const G=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",P4,[k[1]||(k[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",j4,[e.createVNode(ac.default,{class:"collapse-content",collapseContents:i.value},{title:e.withCtx(({item:z,index:j})=>{var L,_,x,w,b,E,F,$,le,Q;return[e.createElementVNode("div",H4,[e.createElementVNode("div",U4,[(_=(L=h.value)==null?void 0:L.find(me=>me.id===j))!=null&&_.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:z.name&&z.name!==""?"8px":"0px"})},e.toDisplayString(z.name),5)),(w=(x=h.value)==null?void 0:x.find(me=>me.id===j))!=null&&w.content?(e.openBlock(),e.createElementBlock("div",q4,[e.createVNode(dl.ssInput,{modelValue:z.name,"onUpdate:modelValue":me=>z.name=me,onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(E=(b=h.value)==null?void 0:b.find(me=>me.id===j))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(me=>c(j),["stop"]),class:"icon-content"},[e.createVNode(G,{name:"Edit",style:{width:"16px",height:"16px"}})],8,W4))]),e.createElementVNode("div",K4,[($=(F=h.value)==null?void 0:F.find(me=>me.id===j))!=null&&$.content?(e.openBlock(),e.createElementBlock("div",G4,[e.createVNode(G,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(me=>d(j),["stop"])},null,8,["onClick"]),e.createVNode(G,{name:"Save",onClick:e.withModifiers(me=>m(j,z.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Q=(le=h.value)==null?void 0:le.find(me=>me.id===j))!=null&&Q.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(me=>C(j),["stop"]),class:"icon-content"},[e.createVNode(G,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Y4))])])]}),content:e.withCtx(({item:z,index:j})=>{var L,_;return[e.createElementVNode("div",J4,[e.createTextVNode(e.toDisplayString(g(z.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(z.comp+"Operate")),{itemContents:z==null?void 0:z.compData,originalItemContents:(_=(L=s.value)==null?void 0:L.find((x,w)=>w===j))==null?void 0:_.compData,onChange:x=>u(x,z,j)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Z4=ir._export_sfc(X4,[["__scopeId","data-v-a46a44b9"]]),Q4={key:0,class:"show-content"},e2={style:{display:"flex"}},a2={__name:"modelShow",setup(a){const l=Xn(M.pinia),{itemData:n}=M.storeToRefs(l),r=e.ref([]);e.watch(()=>n.value,()=>{var s;!n.value||((s=n.value)==null?void 0:s.length)===0?r.value=[]:r.value=M.cloneDeep(n.value)},{deep:!0,immediate:!0});const i=s=>Mi(s);return(s,h)=>{var c;return((c=r.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",Q4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(d,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",e2,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},l2=ir._export_sfc(a2,[["__scopeId","data-v-3f3e863e"]]),r2={class:"tabs-header"},n2={class:"tabs-list"},i2={class:"tab-name"},o2={class:"tab-actions"},t2=["onClick"],s2=["onClick"],c2=["onClick"],u2={class:"model-operate"},d2={class:"model-select",style:{display:"unset"}},p2={class:"existing-components"},f2={class:"component-list"},h2=["onClick"],v2={class:"component-info"},m2={class:"component-type"},y2={class:"component-name"},g2={class:"model-fill"},b2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]),s=e.ref(!1),h=e.ref(""),c=e.ref({title:""}),d=e.ref(-1),m=e.ref(!1),g=e.ref(-1),u=e.ref(new WeakMap),C=e.ref(null),I=Xn(M.pinia),{itemData:k}=M.storeToRefs(I),G=()=>{h.value="新增标签页",c.value.title="",d.value=-1,s.value=!0},z=ue=>{h.value="修改标签页",c.value.title=i.value[ue].title,d.value=ue,s.value=!0},j=ue=>{const B=x(ue);u.value.delete(B),i.value.splice(ue,1),$e()},L=()=>{if(c.value.title.trim()){if(d.value===-1){const ue={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:_()};i.value.push(ue)}else i.value[d.value].title=c.value.title,i.value[d.value].value=c.value.title,i.value[d.value].label=c.value.title;s.value=!1,$e()}},_=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,x=ue=>{const B=i.value[ue];return B.id||(B.id=_()),B.id},w=ue=>{var U;g.value=ue;const B=x(ue);C.value=M.cloneDeep(k.value);let se=u.value.get(B);!se&&((U=i.value[ue].children)==null?void 0:U.length)>0&&(se=$(i.value[ue].children)),se?I.setItemData(M.cloneDeep(se)):I.setItemData([]),m.value=!0},b=e.computed(()=>{const ue=M.useModelComp(M.pinia),B=M.storeToRefs(ue).itemData.value;return console.log("可用组件数据",B),!B||!Array.isArray(B)?[]:B.filter(se=>{var U;if(se.comp==="Tabs"&&g.value>=0){const be=x(g.value);if((U=se.compData)==null?void 0:U.some(Ve=>{var aa;return Ve.key==="stepList"&&((aa=Ve.contents)==null?void 0:aa.some(Ea=>Ea.id===be))}))return!1}return!0})}),E=ue=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ue]||ue,F=ue=>{var B;try{const se=M.cloneDeep(ue);se.id=Date.now()+Math.random(),se.comp==="Tabs"&&((B=se.compData)==null||B.forEach(be=>{be.key==="stepList"&&be.contents&&be.contents.forEach(Me=>{Me.id=_()})}));const U=M.cloneDeep(k.value);U.push(se),I.setItemData(U)}catch(se){console.error("添加组件失败:",se)}},$=ue=>ue.map(B=>{var se;switch(B.type){case"form":return{comp:"Form",name:B.value||"表单",compData:le(B.content)};case"table":return{comp:"Table",name:B.value||"表格",compData:Q(B.content)};default:return{comp:"Unknown",name:B.value||"",compData:((se=B.content)==null?void 0:se.originalData)||[]}}}),le=ue=>{if(!ue)return[];const B=[];return ue.rowContents&&B.push({key:"formContent",contents:ue.rowContents}),ue.buttonValue&&B.push({key:"formButton",contents:ue.buttonValue}),typeof ue.isEnableWrap<"u"&&B.push({key:"enableWrap",contents:ue.isEnableWrap}),B},Q=ue=>[],me=()=>{if(g.value>=0&&g.value<i.value.length){const ue=x(g.value);u.value.set(ue,M.cloneDeep(k.value)),i.value[g.value].children=ee(k.value),console.log("保存后的数据",ee(k.value))}m.value=!1,g.value=-1,C.value=null,$e()},de=()=>{C.value&&I.setItemData(M.cloneDeep(C.value)),m.value=!1,g.value=-1,C.value=null},A=()=>{m.value&&de()},ee=ue=>{if(!Array.isArray(ue))throw new Error("sourceData must be an array");return ue.map((B,se)=>{if(!B||typeof B!="object")return B;const{comp:U,name:be,compData:Me}=B;switch(U){case"Form":return{type:"form",content:X(Me||[]),value:"表单"};case"Table":return{type:"table",content:re(Me||[]),value:"表格"};default:return{type:"xxx",content:fe(Me||[]),value:""}}})},X=ue=>{const B={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},se={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ue.forEach((U,be)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${be}:`,U);return}const{key:Me,contents:Ve}=U,aa=se[Me];if(!aa){console.warn(`Unknown Form config key: ${Me}`);return}Me==="enableWrap"?B[aa]=!!Ve:B[aa]=Array.isArray(Ve)?Ve:[]}),B},re=ue=>{const B={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},se={header:"columns",tableContents:"tableData"};return ue.forEach((U,be)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${be}:`,U);return}const{key:Me,contents:Ve}=U,aa=se[Me];if(!aa){console.warn(`Unknown Table config key: ${Me}`);return}B[aa]=Array.isArray(Ve)?Ve:[]}),B},fe=ue=>(console.log("Default conversion logic - to be implemented"),{originalData:ue,processed:!1,componentType:"unknown"}),$e=()=>{const ue=[{key:"stepList",contents:i.value}];r("change",ue)};return e.watch(()=>n.itemContents,ue=>{if(ue&&ue.length>0){const B=ue.find(se=>se.key==="stepList");B&&B.contents&&(i.value=B.contents.map(se=>({title:se.title||"",value:se.value||se.title||"",label:se.label||se.title||"",children:se.children||[],id:se.id||_()})))}},{immediate:!0,deep:!0}),(ue,B)=>{const se=e.resolveComponent("svg-icon"),U=e.resolveComponent("el-input"),be=e.resolveComponent("el-form-item"),Me=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",r2,[B[6]||(B[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:G},[e.createVNode(se,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),B[5]||(B[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",n2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(Ve,aa)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:aa},[e.createElementVNode("span",i2,e.toDisplayString(Ve.title),1),e.createElementVNode("div",o2,[e.createElementVNode("button",{onClick:Ea=>z(aa)},"修改标题",8,t2),e.createElementVNode("button",{onClick:Ea=>w(aa)},"布局调整",8,s2),e.createElementVNode("button",{onClick:Ea=>j(aa)},"删除",8,c2)])]))),128))]),e.createVNode(Mr.ssDialog,{modelValue:s.value,"onUpdate:modelValue":B[2]||(B[2]=Ve=>s.value=Ve),title:h.value,onBeforeDestroy:B[3]||(B[3]=Ve=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:B[1]||(B[1]=Ve=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(Me,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(be,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:c.value.title,"onUpdate:modelValue":B[0]||(B[0]=Ve=>c.value.title=Ve),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Mr.ssDialog,{modelValue:m.value,"onUpdate:modelValue":B[4]||(B[4]=Ve=>m.value=Ve),title:"布局调整",fullScreen:"",onBeforeDestroy:A},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:de},"取消"),e.createElementVNode("button",{onClick:me},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",u2,[e.createElementVNode("div",d2,[e.createVNode(F4),e.createElementVNode("div",p2,[B[8]||(B[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",f2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,Ve=>(e.openBlock(),e.createElementBlock("div",{key:Ve.id,class:"component-item",onClick:aa=>F(Ve)},[e.createElementVNode("div",v2,[e.createElementVNode("span",m2,e.toDisplayString(E(Ve.comp)),1),e.createElementVNode("span",y2,e.toDisplayString(Ve.name),1)]),B[7]||(B[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,h2))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:ue.innerWidth},[e.createVNode(l2)])),e.createElementVNode("div",g2,[e.createVNode(Z4)])])]),_:1},8,["modelValue"])])}}},k2=ir._export_sfc(b2,[["__scopeId","data-v-9096ed0d"]]);function x2(){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 w2(a){return{type:"line",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],...a}}function _2(){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:[]},yAxis:[{type:"value"}],series:[]}}function S2(a){return{type:"bar",barWidth:"60%",showBackground:!0,backgroundStyle:{color:"rgba(180, 180, 180, 0.1)"},itemStyle:{color:new Vl.LinearGradient(0,0,0,1,[{offset:0,color:"#94C2FD"},{offset:.7,color:"#6491E1"},{offset:1,color:"#3264C8"}])},emphasis:{itemStyle:{color:new Vl.LinearGradient(0,0,0,1,[{offset:0,color:"#3264C8"},{offset:.7,color:"#6491E1"},{offset:1,color:"#94C2FD"}])}},...a}}function E2(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function C2(a){return{type:"pie",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],radius:["40%","70%"],itemStyle:{borderRadius:6,borderColor:"#fff",borderWidth:2},label:{show:!0,formatter:function(l){return"{b|"+l.name+`}
26
+ {c|`+l.value+"}"},rich:{b:{fontFamily:"SourceHanSansSC",fontWeight:"bold",fontSize:14,color:"#333"},c:{fontFamily:"SourceHanSansSC",fontSize:12,color:"#666"},d:{fontFamily:"SourceHanSansSC",fontSize:12,color:"#999"}}},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const D2=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),T2=a=>({type:"scatter",symbolSize:20,...a}),Dn={Line:{initBaseoptions:x2,initSeries:w2},Bar:{initBaseoptions:_2,initSeries:S2},Pie:{initBaseoptions:E2,initSeries:C2},Scatter:{initBaseoptions:D2,initSeries:T2}},B2=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},s=Dn==null?void 0:Dn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=i??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let g=[];if(m==null||m.forEach(C=>{var I;g.push((I=n==null?void 0:n[0])==null?void 0:I[C])}),!m||!g)return d;d.xAxis.data=m;const u=c({data:g});return d.series.push(u),d},N2=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},s=Dn==null?void 0:Dn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=i??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let g=[];if(m==null||m.forEach(C=>{var I;g.push((I=n==null?void 0:n[0])==null?void 0:I[C])}),!m||!g)return d;d.xAxis.data=m;const u=c({data:g});return d.series.push(u),d},A2=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},s=Dn==null?void 0:Dn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=i??"";const m=l==null?void 0:l.map(I=>I==null?void 0:I.prop);let g=[];if(m==null||m.forEach(I=>{var k;g.push((k=n==null?void 0:n[0])==null?void 0:k[I])}),!m||!g)return d;const u=[];for(let I=0;I<m.length;I++){const k=m[I],G=g[I];u.push({name:k,value:G})}const C=c({data:u});return d.series.push(C),d},z2=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},s=Dn==null?void 0:Dn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=i??"";let m=[];const g=l==null?void 0:l.map(I=>I==null?void 0:I.prop);if(m=g==null?void 0:g.map(I=>{var G;let k=[];return k.push(I),k.push((G=n==null?void 0:n[0])==null?void 0:G[I]),k}),!m)return d;const C=c({data:m});return d.series.push(C),d},M2=async(a=[])=>{var h,c,d;const l=((h=a==null?void 0:a.find(m=>m.key==="ChartType"))==null?void 0:h.contents)??{},n=((c=a==null?void 0:a.find(m=>m.key==="header"))==null?void 0:c.contents)??[],r=((d=a==null?void 0:a.find(m=>m.key==="tableContents"))==null?void 0:d.contents)??[];let{type:i}=l,s={};return i==="Line"&&(s=await B2({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),i==="Bar"&&(s=await N2({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),i==="Pie"&&(s=await A2({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),i==="Scatter"&&(s=await z2({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),s},I2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const l=a,n=e.ref({});e.onMounted(async()=>{const i=l==null?void 0:l.itemData;n.value=await M2(i)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Lu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),O2=ir._export_sfc(I2,[["__scopeId","data-v-d4c081e8"]]),L2={class:"chart-module layout"},R2={class:"chart-module content"},$2={class:"chart-module content"},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=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),h=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],c=e.ref({}),d=()=>{var we;s.value=h(),(we=s.value)==null||we.forEach(ge=>{var Ke;const he=ge==null?void 0:ge.prop;ge.value=(Ke=c==null?void 0:c.value)==null?void 0:Ke[he]}),i.visible=!0},m=we=>{c.value=we},g=()=>{var we;i.visible=!1,r("change",(we=ce())==null?void 0:we.compData)},u=e.reactive({visible:!1,width:"840",title:"数据配置"}),C=e.ref([]),I=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],k=e.ref({}),G=()=>{const we=C.value,ge=M.cloneDeep(we);return ge==null||ge.forEach(he=>{var fa;const Ke=he==null?void 0:he.prop;he.value=(fa=k.value)==null?void 0:fa[Ke]}),ge},z=we=>{var he;k.value=we;const ge=G();C.value=ge,r("change",(he=ce())==null?void 0:he.compData)},j=async()=>{const we=await te.getMenusContent(),ge=G();ge==null||ge.forEach(he=>{(he==null?void 0:he.prop)==="menu"&&(he.contents=we)}),C.value=ge,u.visible=!0,await Ve(k.value.menu),await ne(k.value.group)},L=e.reactive({visible:!1,width:"840",title:"详情页配置"}),_=e.ref([]),x=()=>[{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:[]}],w=e.ref({}),b=()=>{const we=_.value,ge=M.cloneDeep(we);return ge==null||ge.forEach(he=>{var fa;const Ke=he==null?void 0:he.prop;he.value=(fa=w.value)==null?void 0:fa[Ke]}),ge},E=we=>{var he;w.value=we;const ge=b();_.value=ge,r("change",(he=ce())==null?void 0:he.compData)},F=async()=>{await A();const we=M.cloneDeep($.value),ge=b();ge==null||ge.forEach(he=>{var fa;const Ke=he==null?void 0:he.prop;he.value=(fa=w==null?void 0:w.value)==null?void 0:fa[Ke],Ke==="mainKey"&&(he.contents=we)}),_.value=ge,L.visible=!0},$=e.ref([]),le=e.ref([]),Q=e.ref({}),me=e.ref({}),de=()=>{const{compData:we}=U.value||{},ge=we==null?void 0:we.find(Z=>{const{key:ve}=Z;return ve==="header"}),he=(ge==null?void 0:ge.contents)||[],Ke=he==null?void 0:he.filter((Z,ve)=>{const{label:pe}=Z;return pe!=="操作"}),fa=Ke==null?void 0:Ke.findIndex((Z,ve)=>{const{isMainKey:pe}=Z;return pe});if(fa<0)return[];const qa=we==null?void 0:we.find(Z=>{const{key:ve}=Z;return ve==="tableContents"}),V=(qa==null?void 0:qa.contents)||[];return V==null?void 0:V.map(Z=>{const ve=Z==null?void 0:Z[0];let pe=fa;Ja.isObject(ve)&&(ve!=null&&ve.id)&&(pe=pe+1);const pa=Z==null?void 0:Z[pe];return{label:pa,value:pa}})},A=async()=>{const we=await de();$.value=we},ee=async we=>{const ge=sessionStorage.getItem("systemKey");return await te.getItemData(we,ge,"")},X=async we=>{const ge=we;le.value=ge==null?void 0:ge.map(he=>{const{name:Ke}=he;return Q.value[Ke]=he,{label:Ke,value:Ke}})},re=we=>{const{comp:ge,compData:he}=me.value||{};if(ge==="Table"){let Ke=b();Ke=Ke.filter(fa=>{const{prop:qa}=fa;return qa!=="formItems"}),aa(Ke,he),_.value=Ke}},fe=async()=>{var he,Ke;const we=(he=w==null?void 0:w.value)==null?void 0:he.mainKey,ge=(Ke=k==null?void 0:k.value)==null?void 0:Ke.menu;if(we){const qa=`${ge==null?void 0:ge.join("/")}^${we}`,V=await ee(qa);await X(V);const H=b();H==null||H.forEach(Z=>{(Z==null?void 0:Z.prop)==="group"&&(Z.contents=le.value)}),_.value=H}};e.watch(()=>{var we;return(we=w==null?void 0:w.value)==null?void 0:we.mainKey},async(we,ge)=>{we!=ge&&we&&await fe()});const $e=async we=>{const ge=Q.value[we];me.value=ge,await re()};e.watch(()=>{var we;return(we=w==null?void 0:w.value)==null?void 0:we.group},async(we,ge)=>{we!=ge&&we&&$e(we)});const ue=async()=>{var ge;await fe();const we=(ge=w.value)==null?void 0:ge.group;await $e(we)},B=e.ref([]),se=e.ref({}),U=e.ref({}),be=async we=>{const ge=we==null?void 0:we.join("/"),he=sessionStorage.getItem("systemKey");return await te.getItemData(ge,he,"")},Me=async we=>{const ge=await be(we);B.value=ge==null?void 0:ge.map(he=>{const{name:Ke}=he;return se.value[Ke]=he,{label:Ke,value:Ke}})},Ve=async(we,ge)=>{await Me(we);const he=G();he==null||he.forEach(Ke=>{(Ke==null?void 0:Ke.prop)==="group"&&(Ke.contents=B.value)}),C.value=he};e.watch(()=>{var we;return(we=k==null?void 0:k.value)==null?void 0:we.menu},async(we,ge)=>{const he=we==null?void 0:we.join("/"),Ke=ge==null?void 0:ge.join("/");he!=Ke&&await Ve(we)});const aa=(we,ge)=>{const he=ge==null?void 0:ge.find(V=>{const{key:H}=V;return H==="header"}),Ke=(he==null?void 0:he.contents)||[],fa=Ke==null?void 0:Ke.filter((V,H)=>{const{label:Z}=V;return Z!=="操作"}),qa=fa==null?void 0:fa.map((V,H)=>{const{label:Z}=V;return{label:Z,value:H}});we==null||we.forEach(V=>{const H=V==null?void 0:V.prop;(H==="nameCol"||H==="valueCol")&&(V.contents=qa)})},Ea=we=>{const{comp:ge,compData:he}=U.value||{};if(ge==="Table"){k.value.formItems=[];let Ke=G();Ke=Ke.filter(fa=>{const{prop:qa}=fa;return qa!=="formItems"}),aa(Ke,he),C.value=Ke}},ne=async we=>{const ge=se.value[we];U.value=ge,await Ea()};e.watch(()=>{var we;return(we=k==null?void 0:k.value)==null?void 0:we.group},async(we,ge)=>{we!=ge&&ne(we)});const ta=async()=>{var he,Ke;const we=(he=k.value)==null?void 0:he.menu;await Ve(we);const ge=(Ke=k.value)==null?void 0:Ke.group;await ne(ge)},ce=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:k.value},{key:"chartDetailConfig",contents:w.value}]}),ca=()=>{i.visible=!1,u.visible=!1,L.visible=!1};return e.onMounted(async()=>{var ge,he,Ke;C.value=I(),_.value=x();const we=n==null?void 0:n.itemContents;c.value=((ge=we==null?void 0:we.find(fa=>fa.key==="chartBaseConfig"))==null?void 0:ge.contents)??{},k.value=((he=we==null?void 0:we.find(fa=>fa.key==="chartDataConfig"))==null?void 0:he.contents)??{},await ta(),w.value=((Ke=we==null?void 0:we.find(fa=>fa.key==="chartDetailConfig"))==null?void 0:Ke.contents)??{},await ue()}),(we,ge)=>{const he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",L2,[ge[4]||(ge[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(he,{id:"themeButton",onClick:ge[0]||(ge[0]=Ke=>d())},{default:e.withCtx(()=>ge[3]||(ge[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",R2,[ge[6]||(ge[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(he,{id:"themeButton",onClick:ge[1]||(ge[1]=Ke=>j())},{default:e.withCtx(()=>ge[5]||(ge[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",$2,[ge[8]||(ge[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(he,{id:"themeButton",onClick:ge[2]||(ge[2]=Ke=>F())},{default:e.withCtx(()=>ge[7]||(ge[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Mr.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:ca,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",V2,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",F2,[e.createVNode(he,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ge[9]||(ge[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(he,{class:"ok-button button",onClick:g,id:"themeButton"},{default:e.withCtx(()=>ge[10]||(ge[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Mr.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:ca,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",P2,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",j2,[e.createVNode(he,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ge[11]||(ge[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(he,{class:"ok-button button",onClick:ca,id:"themeButton"},{default:e.withCtx(()=>ge[12]||(ge[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Mr.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:ca,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",H2,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:_.value,key:_.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",U2,[e.createVNode(he,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ge[13]||(ge[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(he,{class:"ok-button button",onClick:ca,id:"themeButton"},{default:e.withCtx(()=>ge[14]||(ge[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),W2=ir._export_sfc(q2,[["__scopeId","data-v-fe119645"]]),K2={class:"layout"},G2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const n=l,r=a;e.onMounted(async()=>{});const i=e.computed(()=>M.cloneDeep(r==null?void 0:r.itemData)||[]),s=e.computed(()=>{var g;const m=(g=i==null?void 0:i.value)==null?void 0:g.find(u=>{const{key:C}=u;return C==="baseConfig"});return m==null?void 0:m.contents}),h=e.computed(()=>{var g;const m=(g=i==null?void 0:i.value)==null?void 0:g.find(u=>{const{key:C}=u;return C==="children"});return m==null?void 0:m.contents}),c=e.computed(()=>{let m=M.cloneDeep(h.value)||[];const g=m.length;let u=0;const C=[];if(m=m.map(I=>{const k=I.span;return k?(I.span=Number(k),u=u+I.span):C.push(I),I}),u<24){const I=Math.floor((24-u)/g);C.forEach(k=>{k.span=I})}return m}),d=m=>{n("rowClick",m)};return(m,g)=>{var I;const u=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",K2,[e.createVNode(C,{style:e.normalizeStyle({height:(I=s.value)==null?void 0:I.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(k,G)=>(e.openBlock(),e.createBlock(u,{span:k==null?void 0:k.span},{default:e.withCtx(()=>{var z;return[e.unref(zi)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)(k.comp)),{key:e.unref(Jn),compName:k.name,index:(k==null?void 0:k.id)??G,height:(z=s.value)==null?void 0:z.height,itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,onChange:e.unref(Oo),onContentChange:e.unref(Lo),onPageChange:e.unref(Ro),onRowClick:d},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Y2=ir._export_sfc(G2,[["__scopeId","data-v-ab9a36ed"]]),J2={class:"layout-operate"},X2={class:"layout-module"},Z2={class:"collapse-title-item"},Q2={class:"collapse-title"},e1={class:"icon-content"},a1=["onClick"],l1={class:"comp-child"},r1=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l;e.onMounted(()=>{G()});const i=e.ref({}),s=e.ref({}),h=e.ref([]),c=w=>[{label:"高度",prop:"height",type:"input",value:w==null?void 0:w.height}],d=w=>{s.value=w,r("change",x(),!0)},m=e.ref([]),g=e.ref([]),u=w=>[{label:"占比",prop:"span",type:"input",value:w==null?void 0:w.span}],C=e.computed(()=>{const w=n==null?void 0:n.itemContents;return M.cloneDeep(w)}),I=e.computed(()=>{const w=C==null?void 0:C.value,b=w==null?void 0:w.find(E=>{const{key:F}=E;return F==="baseConfig"});return b==null?void 0:b.contents}),k=e.computed(()=>{const w=C==null?void 0:C.value,b=w==null?void 0:w.find(E=>{const{key:F}=E;return F==="children"});return b==null?void 0:b.contents}),G=()=>{var w;i.value=C.value||{},m.value=(k==null?void 0:k.value)||[],h.value=c(),h.value=(w=h.value)==null?void 0:w.map(b=>{var F;const{prop:E}=b;return b.value=(F=I.value)==null?void 0:F[E],b})};e.watch(()=>{var w;return(w=k==null?void 0:k.value)==null?void 0:w.length},()=>{var w;m.value=(k==null?void 0:k.value)||[],g.value=(w=k.value)==null?void 0:w.map(b=>u(b))},{immediate:!0});const z=(w,b)=>{const E=M.cloneDeep(k==null?void 0:k.value);E[b].span=w.span,m.value=E,r("change",x(),!0)},j=w=>Mi(w),L=(w,b,E)=>{if(!w)return;const F=M.cloneDeep(k==null?void 0:k.value);F[E]&&(F[E].compData=w,m.value=F,r("change",x(),!0))},_=w=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let b=M.cloneDeep(k==null?void 0:k.value);b=b==null?void 0:b.filter((E,F)=>w!==F),m.value=b,r("change",x(),!0),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:m==null?void 0:m.value}]});return(w,b)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",J2,[e.createElementVNode("div",X2,[b[1]||(b[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(dl.ssForm,{rowContents:h.value,isEnableWrap:!0,onChange:b[0]||(b[0]=F=>d(F))},null,8,["rowContents"])])]),e.createVNode(ac.default,{class:"collapse-content",collapseContents:k.value},{title:e.withCtx(({item:F,index:$})=>[e.createElementVNode("div",Z2,[e.createElementVNode("div",Q2,e.toDisplayString(F.name),1),e.createElementVNode("div",e1,[e.createElementVNode("div",{onClick:e.withModifiers(le=>_($),["stop"]),class:"icon-content"},[e.createVNode(E,{name:"Delete",style:{width:"16px",height:"16px"}})],8,a1)])])]),content:e.withCtx(({item:F,index:$})=>[e.createElementVNode("div",l1,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:g.value[$],key:$,isEnableWrap:!0,onChange:le=>z(le,$)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(F.comp+"Operate")),{itemContents:F==null?void 0:F.compData,originalItemContents:F.compData,onChange:le=>L(le,F,$)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),n1=ir._export_sfc(r1,[["__scopeId","data-v-ba05456e"]]),i1=typeof window<"u";var Ts;i1&&((Ts=window==null?void 0:window.navigator)!=null&&Ts.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function wn(a){return a==null}function Hc(){}const o1=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(o1)));function s1(){const a=new Map;return{on(l,n){const r=a.get(l);r!=null&&r.add(n)||a.set(l,new Set([n]))},off(l,n){const r=a.get(l);r&&r.delete(n)},clear(l){const n=a.get(l);n&&n.clear()},clearAll(){a.clear()},emit(l,...n){const r=a.get(l);r&&r.forEach(i=>{i(...n)})}}}function Bs(a,l=16){if(typeof a!="function")return Hc;const n=(...s)=>{a(...s)};if(l<=0)return Uc(n);let r=0,i;return function(...s){const h=Date.now(),c=h-r;clearTimeout(i),c>=l?(r=h,n(...s)):i=setTimeout(()=>{r=Date.now(),n(...s)},Math.max(0,l-c))}}function c1(a,l=100){if(typeof a!="function")return Hc;const n=(...i)=>{a(...i)};if(l<=0)return Uc(n);let r;return function(...i){clearTimeout(r),r=setTimeout(()=>{n(...i)},l)}}function Uc(a){if(typeof a!="function")return a;let l=!1,n,r;return function(...i){return n=i,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...n)))),r}}const Yi=new Set,qc=new WeakMap;function u1(){Yi.forEach(a=>{a(...qc.get(a))}),Yi.clear()}function pn(a,...l){if(typeof a!="function")return a;qc.set(a,l),!Yi.has(a)&&(Yi.add(a),Yi.size===1&&Promise.resolve().then(u1))}const Wc=Symbol("LAYOUT_KEY"),Kc=Symbol("EMITTER_KEY");function d1(a){let l=0,n;for(let r=0,i=a.length;r<i;r++)n=a[r].y+a[r].h,n>l&&(l=n);return l}function Nt(a){const l=Array(a.length);for(let n=0,r=a.length;n<r;n++)l[n]=p1(a[n]);return l}function p1(a){return{...a}}function Gc(a,l){return!(a===l||a.x+a.w<=l.x||a.x>=l.x+l.w||a.y+a.h<=l.y||a.y>=l.y+l.h)}function Di(a,l,n){const r=Jc(a),i=Xc(a),s=Array(a.length);for(let h=0,c=i.length;h<c;h++){let d=i[h];d.static||(d=f1(r,d,l,n),r.push(d)),s[a.findIndex(m=>m.i===d.i)]=d,d.moved=!1}return s}function f1(a,l,n,r){if(n)for(;l.y>0&&!Ji(a,l);)l.y--;else if(r){const s=r[l.i].y;for(;l.y>s&&!Ji(a,l);)l.y--}let i;for(;i=Ji(a,l);)l.y=i.y+i.h;return l}function h1(a,l){const n=Jc(a);for(let r=0,i=a.length;r<i;r++){const s=a[r];if(s.x+s.w>l.cols&&(s.x=l.cols-s.w),s.x<0&&(s.x=0,s.w=l.cols),!s.static)n.push(s);else for(;Ji(n,s);)s.y++}return a}function Ns(a,l){for(let n=0,r=a.length;n<r;n++)if(a[n].i===l)return a[n]}function Ji(a,l){for(let n=0,r=a.length;n<r;n++)if(Gc(a[n],l))return a[n]}function Yc(a,l){return a.filter(n=>Gc(n,l))}function Jc(a){return a.filter(l=>l.static)}function At(a,l,n,r,i=!1,s=!1){if(l.static)return a;const h=l.x,c=l.y,d=r&&l.y>r;typeof n=="number"&&(l.x=n),typeof r=="number"&&(l.y=r),l.moved=!0;let m=Xc(a);d&&(m=m.reverse());const g=Yc(m,l);if(s&&g.length)return l.x=h,l.y=c,l.moved=!1,a;for(let u=0,C=g.length;u<C;u++){const I=g[u];I.moved||l.y>I.y&&l.y-I.y>I.h/4||(I.static?a=As(a,I,l,i):a=As(a,l,I,i))}return a}function As(a,l,n,r){if(r){const i={x:n.x,y:n.y,w:n.w,h:n.h};if(i.y=Math.max(l.y-n.h,0),!Ji(a,i))return At(a,n,void 0,i.y,!1)}return At(a,n,void 0,n.y+1,!1)}function v1(a,l,n,r){const i="translate3d("+l+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:n+"px",height:r+"px",position:"absolute"}}function m1(a,l,n,r){const i="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:n+"px",height:r+"px",position:"absolute"}}function y1(a,l,n,r){return{top:a+"px",left:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function g1(a,l,n,r){return{top:a+"px",right:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function Xc(a){return Array.from(a).sort(function(l,n){return l.y===n.y&&l.x===n.x?0:l.y>n.y||l.y===n.y&&l.x>n.x?1:-1})}function b1(a,l){l=l||"Layout";const n=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let i=0,s=a.length;i<s;i++){const h=a[i];for(let c=0;c<n.length;c++)if(typeof h[n[c]]!="number")throw new Error("VueGridLayout: "+l+"["+i+"]."+n[c]+" must be a number!");if(h.i===void 0||h.i===null)throw new Error("VueGridLayout: "+l+"["+i+"].i cannot be null!");if(typeof h.i!="number"&&typeof h.i!="string")throw new Error("VueGridLayout: "+l+"["+i+"].i must be a string or number!");if(r.indexOf(h.i)>=0)throw new Error("VueGridLayout: "+l+"["+i+"].i must be unique!");if(r.push(h.i),h.static!==void 0&&typeof h.static!="boolean")throw new Error("VueGridLayout: "+l+"["+i+"].static must be a boolean!")}}function k1(a,l="vgl"){const n=()=>`${l}-${a}`;return{b:n,be:r=>`${n()}__${r}`,bm:r=>`${n()}--${r}`,bem:(r,i)=>`${n()}__${r}--${i}`}}function zs(a){return x1(a)}function x1(a){var l;const n=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),i=a.clientX+n.scrollLeft-r.left,s=a.clientY+n.scrollTop-r.top;return{x:i,y:s}}function Ms(a,l,n,r){return w1(a)?{deltaX:n-a,deltaY:r-l,lastX:a,lastY:l,x:n,y:r}:{deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}}function w1(a){return typeof a=="number"&&!Number.isNaN(a)}function _1(a,l){const n=Qc(a);let r=n[0];for(let i=1,s=n.length;i<s;i++){const h=n[i];l>a[h]&&(r=h)}return r}function Zc(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function S1(a,l,n,r,i,s,h){if(l[r])return Nt(l[r]);let c=a;const d=Qc(n),m=d.slice(d.indexOf(r));for(let g=0,u=m.length;g<u;g++){const C=m[g];if(l[C]){c=l[C];break}}return c=Nt(c||[]),Di(h1(c,{cols:s}),h)}function Qc(a){return Object.keys(a).sort((l,n)=>a[l]-a[n])}let E1="auto";function C1(){return typeof document<"u"}function Is(){return C1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):E1}var Ki={exports:{}},D1=Ki.exports,Os;function T1(){return Os||(Os=1,function(a,l){(function(n,r){a.exports=r()})(D1,function(){function n(t,o){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(t);o&&(y=y.filter(function(S){return Object.getOwnPropertyDescriptor(t,S).enumerable})),f.push.apply(f,y)}return f}function r(t){for(var o=1;o<arguments.length;o++){var f=arguments[o]!=null?arguments[o]:{};o%2?n(Object(f),!0).forEach(function(y){d(t,y,f[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(y){Object.defineProperty(t,y,Object.getOwnPropertyDescriptor(f,y))})}return t}function i(t){return i=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},i(t)}function s(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function h(t,o){for(var f=0;f<o.length;f++){var y=o[f];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(t,G(y.key),y)}}function c(t,o,f){return o&&h(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function d(t,o,f){return(o=G(o))in t?Object.defineProperty(t,o,{value:f,enumerable:!0,configurable:!0,writable:!0}):t[o]=f,t}function m(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&&u(t,o)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},g(t)}function u(t,o){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,y){return f.__proto__=y,f},u(t,o)}function C(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function I(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,y=g(t);if(o){var S=g(this).constructor;f=Reflect.construct(y,arguments,S)}else f=y.apply(this,arguments);return function(R,Y){if(Y&&(typeof Y=="object"||typeof Y=="function"))return Y;if(Y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(R)}(this,f)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,o,f){var y=function(R,Y){for(;!Object.prototype.hasOwnProperty.call(R,Y)&&(R=g(R))!==null;);return R}(t,o);if(y){var S=Object.getOwnPropertyDescriptor(y,o);return S.get?S.get.call(arguments.length<3?t:f):S.value}},k.apply(this,arguments)}function G(t){var o=function(f,y){if(typeof f!="object"||f===null)return f;var S=f[Symbol.toPrimitive];if(S!==void 0){var R=S.call(f,y);if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(t,"string");return typeof o=="symbol"?o:o+""}var z=function(t){return!(!t||!t.Window)&&t instanceof t.Window},j=void 0,L=void 0;function _(t){j=t;var o=t.document.createTextNode("");o.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(o)===o&&(t=t.wrap(t)),L=t}function x(t){return z(t)?t:(t.ownerDocument||t).defaultView||L.window}typeof window<"u"&&window&&_(window);var w=function(t){return!!t&&i(t)==="object"},b=function(t){return typeof t=="function"},E={window:function(t){return t===L||z(t)},docFrag:function(t){return w(t)&&t.nodeType===11},object:w,func:b,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||i(t)!=="object")return!1;var o=x(t)||L;return/object|function/.test(typeof Element>"u"?"undefined":i(Element))?t instanceof Element||t instanceof o.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return w(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return w(t)&&t.length!==void 0&&b(t.splice)}};function F(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 $(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="drag"){var y=f.prepared.axis;if(y==="x"||y==="y"){var S=y==="x"?"y":"x";o.page[S]=f.coords.start.page[S],o.client[S]=f.coords.start.client[S],o.delta[S]=0}}}var le={id:"actions/drag",install:function(t){var o=t.actions,f=t.Interactable,y=t.defaults;f.prototype.draggable=le.draggable,o.map.drag=le,o.methodDict.drag="draggable",y.actions.drag=le.defaults},listeners:{"interactions:before-action-move":F,"interactions:action-resume":F,"interactions:action-move":$,"auto-start:check":function(t){var o=t.interaction,f=t.interactable,y=t.buttons,S=f.options.drag;if(S&&S.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(y&f.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:S.lockAxis==="start"?S.startAxis:S.lockAxis},!1}},draggable:function(t){return E.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):E.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:F,move:$,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},Q=le,me={init:function(t){var o=t;me.document=o.document,me.DocumentFragment=o.DocumentFragment||de,me.SVGElement=o.SVGElement||de,me.SVGSVGElement=o.SVGSVGElement||de,me.SVGElementInstance=o.SVGElementInstance||de,me.Element=o.Element||de,me.HTMLElement=o.HTMLElement||me.Element,me.Event=o.Event,me.Touch=o.Touch||de,me.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 de(){}var A=me,ee={init:function(t){var o=A.Element,f=t.navigator||{};ee.supportsTouch="ontouchstart"in t||E.func(t.DocumentTouch)&&A.document instanceof t.DocumentTouch,ee.supportsPointerEvent=f.pointerEnabled!==!1&&!!A.PointerEvent,ee.isIOS=/iP(hone|od|ad)/.test(f.platform),ee.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),ee.isIe9=/MSIE 9/.test(f.userAgent),ee.isOperaMobile=f.appName==="Opera"&&ee.supportsTouch&&/Presto/.test(f.userAgent),ee.prefixedMatchesSelector="matches"in o.prototype?"matches":"webkitMatchesSelector"in o.prototype?"webkitMatchesSelector":"mozMatchesSelector"in o.prototype?"mozMatchesSelector":"oMatchesSelector"in o.prototype?"oMatchesSelector":"msMatchesSelector",ee.pEventTypes=ee.supportsPointerEvent?A.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,ee.wheelEvent=A.document&&"onmousewheel"in A.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},X=ee;function re(t,o){if(t.contains)return t.contains(o);for(;o;){if(o===t)return!0;o=o.parentNode}return!1}function fe(t,o){for(;E.element(t);){if(ue(t,o))return t;t=$e(t)}return null}function $e(t){var o=t.parentNode;if(E.docFrag(o)){for(;(o=o.host)&&E.docFrag(o););return o}return o}function ue(t,o){return L!==j&&(o=o.replace(/\/deep\//g," ")),t[X.prefixedMatchesSelector](o)}var B=function(t){return t.parentNode||t.host};function se(t,o){for(var f,y=[],S=t;(f=B(S))&&S!==o&&f!==S.ownerDocument;)y.unshift(S),S=f;return y}function U(t,o,f){for(;E.element(t);){if(ue(t,o))return!0;if((t=$e(t))===f)return ue(t,o)}return!1}function be(t){return t.correspondingUseElement||t}function Me(t){var o=t instanceof A.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 Ve(t){var o,f=Me(t);if(!X.isIOS7&&f){var y={x:(o=(o=x(t))||L).scrollX||o.document.documentElement.scrollLeft,y:o.scrollY||o.document.documentElement.scrollTop};f.left+=y.x,f.right+=y.x,f.top+=y.y,f.bottom+=y.y}return f}function aa(t){for(var o=[];t;)o.push(t),t=$e(t);return o}function Ea(t){return!!E.string(t)&&(A.document.querySelector(t),!0)}function ne(t,o){for(var f in o)t[f]=o[f];return t}function ta(t,o,f){return t==="parent"?$e(f):t==="self"?o.getRect(f):fe(f,t)}function ce(t,o,f,y){var S=t;return E.string(S)?S=ta(S,o,f):E.func(S)&&(S=S.apply(void 0,y)),E.element(S)&&(S=Ve(S)),S}function ca(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function we(t){return!t||"x"in t&&"y"in t||((t=ne({},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 ge(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 he(t,o,f){var y=f&&t.options[f];return ca(ce(y&&y.origin||t.options.origin,t,o,[t&&o]))||{x:0,y:0}}function Ke(t,o){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(ke){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},E.string(t)&&t.search(" ")!==-1&&(t=fa(t)),E.array(t))return t.forEach(function(ke){return Ke(ke,o,f,y)}),y;if(E.object(t)&&(o=t,t=""),E.func(o)&&f(t))y[t]=y[t]||[],y[t].push(o);else if(E.array(o))for(var S=0,R=o;S<R.length;S++){var Y=R[S];Ke(t,Y,f,y)}else if(E.object(o))for(var ae in o)Ke(fa(ae).map(function(ke){return"".concat(t).concat(ke)}),o[ae],f,y);return y}function fa(t){return t.trim().split(/ +/)}var qa=function(t,o){return Math.sqrt(t*t+o*o)},V=["webkit","moz"];function H(t,o){t.__set||(t.__set={});var f=function(S){if(V.some(function(R){return S.indexOf(R)===0}))return 1;typeof t[S]!="function"&&S!=="__set"&&Object.defineProperty(t,S,{get:function(){return S in t.__set?t.__set[S]:t.__set[S]=o[S]},set:function(R){t.__set[S]=R},configurable:!0})};for(var y in o)f(y);return t}function Z(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 ve(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function pe(t){return t instanceof A.Event||t instanceof A.Touch}function pa(t,o,f){return t=t||"page",(f=f||{}).x=o[t+"X"],f.y=o[t+"Y"],f}function ia(t,o){return o=o||{x:0,y:0},X.isOperaMobile&&pe(t)?(pa("screen",t,o),o.x+=window.scrollX,o.y+=window.scrollY):pa("page",t,o),o}function He(t){return E.number(t.pointerId)?t.pointerId:t.identifier}function _a(t,o,f){var y=o.length>1?ha(o):o[0];ia(y,t.page),function(S,R){R=R||{},X.isOperaMobile&&pe(S)?pa("screen",S,R):pa("client",S,R)}(y,t.client),t.timeStamp=f}function Ae(t){var o=[];return E.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 ha(t){for(var o={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<t.length;f++){var y=t[f];for(var S in o)o[S]+=y[S]}for(var R in o)o[R]/=t.length;return o}function La(t){if(!t.length)return null;var o=Ae(t),f=Math.min(o[0].pageX,o[1].pageX),y=Math.min(o[0].pageY,o[1].pageY),S=Math.max(o[0].pageX,o[1].pageX),R=Math.max(o[0].pageY,o[1].pageY);return{x:f,y,left:f,top:y,right:S,bottom:R,width:S-f,height:R-y}}function Aa(t,o){var f=o+"X",y=o+"Y",S=Ae(t),R=S[0][f]-S[1][f],Y=S[0][y]-S[1][y];return qa(R,Y)}function ua(t,o){var f=o+"X",y=o+"Y",S=Ae(t),R=S[1][f]-S[0][f],Y=S[1][y]-S[0][y];return 180*Math.atan2(Y,R)/Math.PI}function Ta(t){return E.string(t.pointerType)?t.pointerType:E.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof A.Touch?"touch":"mouse"}function Ce(t){var o=E.func(t.composedPath)?t.composedPath():t.path;return[be(o?o[0]:t.target),be(t.currentTarget)]}var ma=function(){function t(o){s(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=o}return c(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(ma.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Je=function(t,o){for(var f=0;f<o.length;f++){var y=o[f];t.push(y)}return t},W=function(t){return Je([],t)},J=function(t,o){for(var f=0;f<t.length;f++)if(o(t[f],f,t))return f;return-1},je=function(t,o){return t[J(t,o)]},We=function(t){m(f,t);var o=I(f);function f(y,S,R){var Y;s(this,f),(Y=o.call(this,S._interaction)).dropzone=void 0,Y.dragEvent=void 0,Y.relatedTarget=void 0,Y.draggable=void 0,Y.propagationStopped=!1,Y.immediatePropagationStopped=!1;var ae=R==="dragleave"?y.prev:y.cur,ke=ae.element,Ue=ae.dropzone;return Y.type=R,Y.target=ke,Y.currentTarget=ke,Y.dropzone=Ue,Y.dragEvent=S,Y.relatedTarget=S.target,Y.draggable=S.interactable,Y.timeStamp=S.timeStamp,Y}return c(f,[{key:"reject",value:function(){var y=this,S=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&S.cur.dropzone===this.dropzone&&S.cur.element===this.target)if(S.prev.dropzone=this.dropzone,S.prev.element=this.target,S.rejected=!0,S.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var R=S.activeDrops,Y=J(R,function(ke){var Ue=ke.dropzone,_e=ke.element;return Ue===y.dropzone&&_e===y.target});S.activeDrops.splice(Y,1);var ae=new f(S,this.dragEvent,"dropdeactivate");ae.dropzone=this.dropzone,ae.target=this.target,this.dropzone.fire(ae)}else this.dropzone.fire(new f(S,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(ma);function Sa(t,o){for(var f=0,y=t.slice();f<y.length;f++){var S=y[f],R=S.dropzone,Y=S.element;o.dropzone=R,o.target=Y,R.fire(o),o.propagationStopped=o.immediatePropagationStopped=!1}}function sa(t,o){for(var f=function(R,Y){for(var ae=[],ke=0,Ue=R.interactables.list;ke<Ue.length;ke++){var _e=Ue[ke];if(_e.options.drop.enabled){var la=_e.options.drop.accept;if(!(E.element(la)&&la!==Y||E.string(la)&&!ue(Y,la)||E.func(la)&&!la({dropzone:_e,draggableElement:Y})))for(var Da=0,ll=_e.getAllElements();Da<ll.length;Da++){var el=ll[Da];el!==Y&&ae.push({dropzone:_e,element:el,rect:_e.getRect(el)})}}}return ae}(t,o),y=0;y<f.length;y++){var S=f[y];S.rect=S.dropzone.getRect(S.element)}return f}function Va(t,o,f){for(var y=t.dropState,S=t.interactable,R=t.element,Y=[],ae=0,ke=y.activeDrops;ae<ke.length;ae++){var Ue=ke[ae],_e=Ue.dropzone,la=Ue.element,Da=Ue.rect,ll=_e.dropCheck(o,f,S,R,la,Da);Y.push(ll?la:null)}var el=function(cl){for(var Bl,Sl,Fl,Zl=[],jl=0;jl<cl.length;jl++){var Gl=cl[jl],Wl=cl[Bl];if(Gl&&jl!==Bl)if(Wl){var on=B(Gl),vr=B(Wl);if(on!==Gl.ownerDocument)if(vr!==Gl.ownerDocument)if(on!==vr){Zl=Zl.length?Zl:se(Wl);var dn=void 0;if(Wl instanceof A.HTMLElement&&Gl instanceof A.SVGElement&&!(Gl instanceof A.SVGSVGElement)){if(Gl===vr)continue;dn=Gl.ownerSVGElement}else dn=Gl;for(var xn=se(dn,Wl.ownerDocument),Bn=0;xn[Bn]&&xn[Bn]===Zl[Bn];)Bn++;var xi=[xn[Bn-1],xn[Bn],Zl[Bn]];if(xi[0])for(var ti=xi[0].lastChild;ti;){if(ti===xi[1]){Bl=jl,Zl=xn;break}if(ti===xi[2])break;ti=ti.previousSibling}}else Fl=Wl,(parseInt(x(Sl=Gl).getComputedStyle(Sl).zIndex,10)||0)>=(parseInt(x(Fl).getComputedStyle(Fl).zIndex,10)||0)&&(Bl=jl);else Bl=jl}else Bl=jl}return Bl}(Y);return y.activeDrops[el]||null}function Re(t,o,f){var y=t.dropState,S={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(S.activate=new We(y,f,"dropactivate"),S.activate.target=null,S.activate.dropzone=null),f.type==="dragend"&&(S.deactivate=new We(y,f,"dropdeactivate"),S.deactivate.target=null,S.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(S.leave=new We(y,f,"dragleave"),f.dragLeave=S.leave.target=y.prev.element,f.prevDropzone=S.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(S.enter=new We(y,f,"dragenter"),f.dragEnter=y.cur.element,f.dropzone=y.cur.dropzone)),f.type==="dragend"&&y.cur.dropzone&&(S.drop=new We(y,f,"drop"),f.dropzone=y.cur.dropzone,f.relatedTarget=y.cur.element),f.type==="dragmove"&&y.cur.dropzone&&(S.move=new We(y,f,"dropmove"),f.dropzone=y.cur.dropzone)),S}function Oe(t,o){var f=t.dropState,y=f.activeDrops,S=f.cur,R=f.prev;o.leave&&R.dropzone.fire(o.leave),o.enter&&S.dropzone.fire(o.enter),o.move&&S.dropzone.fire(o.move),o.drop&&S.dropzone.fire(o.drop),o.deactivate&&Sa(y,o.deactivate),f.prev.dropzone=S.dropzone,f.prev.element=S.element}function Le(t,o){var f=t.interaction,y=t.iEvent,S=t.event;if(y.type==="dragmove"||y.type==="dragend"){var R=f.dropState;o.dynamicDrop&&(R.activeDrops=sa(o,f.element));var Y=y,ae=Va(f,Y,S);R.rejected=R.rejected&&!!ae&&ae.dropzone===R.cur.dropzone&&ae.element===R.cur.element,R.cur.dropzone=ae&&ae.dropzone,R.cur.element=ae&&ae.element,R.events=Re(f,0,Y)}}var Be={id:"actions/drop",install:function(t){var o=t.actions,f=t.interactStatic,y=t.Interactable,S=t.defaults;t.usePlugin(Q),y.prototype.dropzone=function(R){return function(Y,ae){if(E.object(ae)){if(Y.options.drop.enabled=ae.enabled!==!1,ae.listeners){var ke=Ke(ae.listeners),Ue=Object.keys(ke).reduce(function(la,Da){return la[/^(enter|leave)/.test(Da)?"drag".concat(Da):/^(activate|deactivate|move)/.test(Da)?"drop".concat(Da):Da]=ke[Da],la},{}),_e=Y.options.drop.listeners;_e&&Y.off(_e),Y.on(Ue),Y.options.drop.listeners=Ue}return E.func(ae.ondrop)&&Y.on("drop",ae.ondrop),E.func(ae.ondropactivate)&&Y.on("dropactivate",ae.ondropactivate),E.func(ae.ondropdeactivate)&&Y.on("dropdeactivate",ae.ondropdeactivate),E.func(ae.ondragenter)&&Y.on("dragenter",ae.ondragenter),E.func(ae.ondragleave)&&Y.on("dragleave",ae.ondragleave),E.func(ae.ondropmove)&&Y.on("dropmove",ae.ondropmove),/^(pointer|center)$/.test(ae.overlap)?Y.options.drop.overlap=ae.overlap:E.number(ae.overlap)&&(Y.options.drop.overlap=Math.max(Math.min(1,ae.overlap),0)),"accept"in ae&&(Y.options.drop.accept=ae.accept),"checker"in ae&&(Y.options.drop.checker=ae.checker),Y}return E.bool(ae)?(Y.options.drop.enabled=ae,Y):Y.options.drop}(this,R)},y.prototype.dropCheck=function(R,Y,ae,ke,Ue,_e){return function(la,Da,ll,el,cl,Bl,Sl){var Fl=!1;if(!(Sl=Sl||la.getRect(Bl)))return!!la.options.drop.checker&&la.options.drop.checker(Da,ll,Fl,la,Bl,el,cl);var Zl=la.options.drop.overlap;if(Zl==="pointer"){var jl=he(el,cl,"drag"),Gl=ia(Da);Gl.x+=jl.x,Gl.y+=jl.y;var Wl=Gl.x>Sl.left&&Gl.x<Sl.right,on=Gl.y>Sl.top&&Gl.y<Sl.bottom;Fl=Wl&&on}var vr=el.getRect(cl);if(vr&&Zl==="center"){var dn=vr.left+vr.width/2,xn=vr.top+vr.height/2;Fl=dn>=Sl.left&&dn<=Sl.right&&xn>=Sl.top&&xn<=Sl.bottom}return vr&&E.number(Zl)&&(Fl=Math.max(0,Math.min(Sl.right,vr.right)-Math.max(Sl.left,vr.left))*Math.max(0,Math.min(Sl.bottom,vr.bottom)-Math.max(Sl.top,vr.top))/(vr.width*vr.height)>=Zl),la.options.drop.checker&&(Fl=la.options.drop.checker(Da,ll,Fl,la,Bl,el,cl)),Fl}(this,R,Y,ae,ke,Ue,_e)},f.dynamicDrop=function(R){return E.bool(R)?(t.dynamicDrop=R,f):t.dynamicDrop},ne(o.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),o.methodDict.drop="dropzone",t.dynamicDrop=!1,S.actions.drop=Be.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,y=(t.event,t.iEvent);if(f.prepared.name==="drag"){var S=f.dropState;S.activeDrops=[],S.events={},S.activeDrops=sa(o,f.element),S.events=Re(f,0,y),S.events.activate&&(Sa(S.activeDrops,S.events.activate),o.fire("actions/drop:start",{interaction:f,dragEvent:y}))}},"interactions:action-move":Le,"interactions:after-action-move":function(t,o){var f=t.interaction,y=t.iEvent;if(f.prepared.name==="drag"){var S=f.dropState;Oe(f,S.events),o.fire("actions/drop:move",{interaction:f,dragEvent:y}),S.events={}}},"interactions:action-end":function(t,o){if(t.interaction.prepared.name==="drag"){var f=t.interaction,y=t.iEvent;Le(t,o),Oe(f,f.dropState.events),o.fire("actions/drop:end",{interaction:f,dragEvent:y})}},"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:sa,getDrop:Va,getDropEvents:Re,fireDropEvents:Oe,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ze=Be;function ul(t){var o=t.interaction,f=t.iEvent,y=t.phase;if(o.prepared.name==="gesture"){var S=o.pointers.map(function(Ue){return Ue.pointer}),R=y==="start",Y=y==="end",ae=o.interactable.options.deltaSource;if(f.touches=[S[0],S[1]],R)f.distance=Aa(S,ae),f.box=La(S),f.scale=1,f.ds=0,f.angle=ua(S,ae),f.da=0,o.gesture.startDistance=f.distance,o.gesture.startAngle=f.angle;else if(Y||o.pointers.length<2){var ke=o.prevEvent;f.distance=ke.distance,f.box=ke.box,f.scale=ke.scale,f.ds=0,f.angle=ke.angle,f.da=0}else f.distance=Aa(S,ae),f.box=La(S),f.scale=f.distance/o.gesture.startDistance,f.angle=ua(S,ae),f.ds=f.scale-o.gesture.scale,f.da=f.angle-o.gesture.angle;o.gesture.distance=f.distance,o.gesture.angle=f.angle,E.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(o.gesture.scale=f.scale)}}var Cl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var o=t.actions,f=t.Interactable,y=t.defaults;f.prototype.gesturable=function(S){return E.object(S)?(this.options.gesture.enabled=S.enabled!==!1,this.setPerAction("gesture",S),this.setOnEvents("gesture",S),this):E.bool(S)?(this.options.gesture.enabled=S,this):this.options.gesture},o.map.gesture=Cl,o.methodDict.gesture="gesturable",y.actions.gesture=Cl.defaults},listeners:{"interactions:action-start":ul,"interactions:action-move":ul,"interactions:action-end":ul,"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}},Ml=Cl;function Rl(t,o,f,y,S,R,Y){if(!o)return!1;if(o===!0){var ae=E.number(R.width)?R.width:R.right-R.left,ke=E.number(R.height)?R.height:R.bottom-R.top;if(Y=Math.min(Y,Math.abs((t==="left"||t==="right"?ae:ke)/2)),ae<0&&(t==="left"?t="right":t==="right"&&(t="left")),ke<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var Ue=ae>=0?R.left:R.right;return f.x<Ue+Y}if(t==="top"){var _e=ke>=0?R.top:R.bottom;return f.y<_e+Y}if(t==="right")return f.x>(ae>=0?R.right:R.left)-Y;if(t==="bottom")return f.y>(ke>=0?R.bottom:R.top)-Y}return!!E.element(y)&&(E.element(o)?o===y:U(y,o,S))}function Al(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var y=o;f.interactable.options.resize.square?(f.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=f.resizeAxes,f.resizeAxes==="x"?y.delta.y=0:f.resizeAxes==="y"&&(y.delta.x=0))}}var er,Qa,Ul={id:"actions/resize",before:["actions/drag"],install:function(t){var o=t.actions,f=t.browser,y=t.Interactable,S=t.defaults;Ul.cursors=function(R){return R.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),Ul.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,y.prototype.resizable=function(R){return function(Y,ae,ke){return E.object(ae)?(Y.options.resize.enabled=ae.enabled!==!1,Y.setPerAction("resize",ae),Y.setOnEvents("resize",ae),E.string(ae.axis)&&/^x$|^y$|^xy$/.test(ae.axis)?Y.options.resize.axis=ae.axis:ae.axis===null&&(Y.options.resize.axis=ke.defaults.actions.resize.axis),E.bool(ae.preserveAspectRatio)?Y.options.resize.preserveAspectRatio=ae.preserveAspectRatio:E.bool(ae.square)&&(Y.options.resize.square=ae.square),Y):E.bool(ae)?(Y.options.resize.enabled=ae,Y):Y.options.resize}(this,R,t)},o.map.resize=Ul,o.methodDict.resize="resizable",S.actions.resize=Ul.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(o){var f=o.iEvent,y=o.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var S=f,R=y.rect;y._rects={start:ne({},R),corrected:ne({},R),previous:ne({},R),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},S.edges=y.prepared.edges,S.rect=y._rects.corrected,S.deltaRect=y._rects.delta}})(t),Al(t)},"interactions:action-move":function(t){(function(o){var f=o.iEvent,y=o.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var S=f,R=y.interactable.options.resize.invert,Y=R==="reposition"||R==="negate",ae=y.rect,ke=y._rects,Ue=ke.start,_e=ke.corrected,la=ke.delta,Da=ke.previous;if(ne(Da,_e),Y){if(ne(_e,ae),R==="reposition"){if(_e.top>_e.bottom){var ll=_e.top;_e.top=_e.bottom,_e.bottom=ll}if(_e.left>_e.right){var el=_e.left;_e.left=_e.right,_e.right=el}}}else _e.top=Math.min(ae.top,Ue.bottom),_e.bottom=Math.max(ae.bottom,Ue.top),_e.left=Math.min(ae.left,Ue.right),_e.right=Math.max(ae.right,Ue.left);for(var cl in _e.width=_e.right-_e.left,_e.height=_e.bottom-_e.top,_e)la[cl]=_e[cl]-Da[cl];S.edges=y.prepared.edges,S.rect=_e,S.deltaRect=la}})(t),Al(t)},"interactions:action-end":function(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var y=o;y.edges=f.prepared.edges,y.rect=f._rects.corrected,y.deltaRect=f._rects.delta}},"auto-start:check":function(t){var o=t.interaction,f=t.interactable,y=t.element,S=t.rect,R=t.buttons;if(S){var Y=ne({},o.coords.cur.page),ae=f.options.resize;if(ae&&ae.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(R&ae.mouseButtons)!=0)){if(E.object(ae.edges)){var ke={left:!1,right:!1,top:!1,bottom:!1};for(var Ue in ke)ke[Ue]=Rl(Ue,ae.edges[Ue],Y,o._latestPointer.eventTarget,y,S,ae.margin||Ul.defaultMargin);ke.left=ke.left&&!ke.right,ke.top=ke.top&&!ke.bottom,(ke.left||ke.right||ke.top||ke.bottom)&&(t.action={name:"resize",edges:ke})}else{var _e=ae.axis!=="y"&&Y.x>S.right-Ul.defaultMargin,la=ae.axis!=="x"&&Y.y>S.bottom-Ul.defaultMargin;(_e||la)&&(t.action={name:"resize",axes:(_e?"x":"")+(la?"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,y=t.name,S=Ul.cursors,R=null;if(f)R=S[y+f];else if(o){for(var Y="",ae=0,ke=["top","bottom","left","right"];ae<ke.length;ae++){var Ue=ke[ae];o[Ue]&&(Y+=Ue)}R=S[Y]}return R},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},Ua=Ul,ql={id:"actions",install:function(t){t.usePlugin(Ml),t.usePlugin(Ua),t.usePlugin(Q),t.usePlugin(ze)}},Il=0,lr={request:function(t){return er(t)},cancel:function(t){return Qa(t)},init:function(t){if(er=t.requestAnimationFrame,Qa=t.cancelAnimationFrame,!er)for(var o=["ms","moz","webkit","o"],f=0;f<o.length;f++){var y=o[f];er=t["".concat(y,"RequestAnimationFrame")],Qa=t["".concat(y,"CancelAnimationFrame")]||t["".concat(y,"CancelRequestAnimationFrame")]}er=er&&er.bind(t),Qa=Qa&&Qa.bind(t),er||(er=function(S){var R=Date.now(),Y=Math.max(0,16-(R-Il)),ae=t.setTimeout(function(){S(R+Y)},Y);return Il=R+Y,ae},Qa=function(S){return clearTimeout(S)})}},_l={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){_l.isScrolling=!0,lr.cancel(_l.i),t.autoScroll=_l,_l.interaction=t,_l.prevTime=_l.now(),_l.i=lr.request(_l.scroll)},stop:function(){_l.isScrolling=!1,_l.interaction&&(_l.interaction.autoScroll=null),lr.cancel(_l.i)},scroll:function(){var t=_l.interaction,o=t.interactable,f=t.element,y=t.prepared.name,S=o.options[y].autoScroll,R=xr(S.container,o,f),Y=_l.now(),ae=(Y-_l.prevTime)/1e3,ke=S.speed*ae;if(ke>=1){var Ue={x:_l.x*ke,y:_l.y*ke};if(Ue.x||Ue.y){var _e=Ra(R);E.window(R)?R.scrollBy(Ue.x,Ue.y):R&&(R.scrollLeft+=Ue.x,R.scrollTop+=Ue.y);var la=Ra(R),Da={x:la.x-_e.x,y:la.y-_e.y};(Da.x||Da.y)&&o.fire({type:"autoscroll",target:f,interactable:o,delta:Da,interaction:t,container:R})}_l.prevTime=Y}_l.isScrolling&&(lr.cancel(_l.i),_l.i=lr.request(_l.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()&&_l.check(o.interactable,o.prepared.name))if(o.simulation)_l.x=_l.y=0;else{var y,S,R,Y,ae=o.interactable,ke=o.element,Ue=o.prepared.name,_e=ae.options[Ue].autoScroll,la=xr(_e.container,ae,ke);if(E.window(la))Y=f.clientX<_l.margin,y=f.clientY<_l.margin,S=f.clientX>la.innerWidth-_l.margin,R=f.clientY>la.innerHeight-_l.margin;else{var Da=Me(la);Y=f.clientX<Da.left+_l.margin,y=f.clientY<Da.top+_l.margin,S=f.clientX>Da.right-_l.margin,R=f.clientY>Da.bottom-_l.margin}_l.x=S?1:Y?-1:0,_l.y=R?1:y?-1:0,_l.isScrolling||(_l.margin=_e.margin,_l.speed=_e.speed,_l.start(o))}}};function xr(t,o,f){return(E.string(t)?ta(t,o,f):t)||x(f)}function Ra(t){return E.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var nl={id:"auto-scroll",install:function(t){var o=t.defaults,f=t.actions;t.autoScroll=_l,_l.now=function(){return t.now()},f.phaselessTypes.autoscroll=!0,o.perAction.autoScroll=_l.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,_l.stop(),_l.interaction&&(_l.interaction=null)},"interactions:stop":_l.stop,"interactions:action-move":function(t){return _l.onInteractionMove(t)}}},va=nl;function za(t,o){var f=!1;return function(){return f||(L.console.warn(o),f=!0),t.apply(this,arguments)}}function da(t,o){return t.name=o.name,t.axis=o.axis,t.edges=o.edges,t}function Ha(t){return E.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Dl(t){return E.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Te={id:"auto-start/interactableMethods",install:function(t){var o=t.Interactable;o.prototype.getAction=function(f,y,S,R){var Y=function(ae,ke,Ue,_e,la){var Da=ae.getRect(_e),ll=ke.buttons||{0:1,1:4,3:8,4:16}[ke.button],el={action:null,interactable:ae,interaction:Ue,element:_e,rect:Da,buttons:ll};return la.fire("auto-start:check",el),el.action}(this,y,S,R,t);return this.options.actionChecker?this.options.actionChecker(f,y,Y,this,R,S):Y},o.prototype.ignoreFrom=za(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),o.prototype.allowFrom=za(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),o.prototype.actionChecker=Dl,o.prototype.styleCursor=Ha}};function na(t,o,f,y,S){return o.testIgnoreAllow(o.options[t.name],f,y)&&o.options[t.name].enabled&&Ya(o,f,t,S)?t:null}function ja(t,o,f,y,S,R,Y){for(var ae=0,ke=y.length;ae<ke;ae++){var Ue=y[ae],_e=S[ae],la=Ue.getAction(o,f,t,_e);if(la){var Da=na(la,Ue,_e,R,Y);if(Da)return{action:Da,interactable:Ue,element:_e}}}return{action:null,interactable:null,element:null}}function Ee(t,o,f,y,S){var R=[],Y=[],ae=y;function ke(_e){R.push(_e),Y.push(ae)}for(;E.element(ae);){R=[],Y=[],S.interactables.forEachMatch(ae,ke);var Ue=ja(t,o,f,R,Y,y,S);if(Ue.action&&!Ue.interactable.options[Ue.action.name].manualStart)return Ue;ae=$e(ae)}return{action:null,interactable:null,element:null}}function Ma(t,o,f){var y=o.action,S=o.interactable,R=o.element;y=y||{name:null},t.interactable=S,t.element=R,da(t.prepared,y),t.rect=S&&y.name?S.getRect(R):null,Ie(t,f),f.fire("autoStart:prepared",{interaction:t})}function Ya(t,o,f,y){var S=t.options,R=S[f.name].max,Y=S[f.name].maxPerElement,ae=y.autoStart.maxInteractions,ke=0,Ue=0,_e=0;if(!(R&&Y&&ae))return!1;for(var la=0,Da=y.interactions.list;la<Da.length;la++){var ll=Da[la],el=ll.prepared.name;if(ll.interacting()&&(++ke>=ae||ll.interactable===t&&((Ue+=el===f.name?1:0)>=R||ll.element===o&&(_e++,el===f.name&&_e>=Y))))return!1}return ae>0}function vl(t,o){return E.number(t)?(o.autoStart.maxInteractions=t,this):o.autoStart.maxInteractions}function wl(t,o,f){var y=f.autoStart.cursorElement;y&&y!==t&&(y.style.cursor=""),t.ownerDocument.documentElement.style.cursor=o,t.style.cursor=o,f.autoStart.cursorElement=o?t:null}function Ie(t,o){var f=t.interactable,y=t.element,S=t.prepared;if(t.pointerType==="mouse"&&f&&f.options.styleCursor){var R="";if(S.name){var Y=f.options[S.name].cursorChecker;R=E.func(Y)?Y(S,f,y,t._interacting):o.actions.map[S.name].getCursor(S)}wl(t.element,R||"",o)}else o.autoStart.cursorElement&&wl(o.autoStart.cursorElement,"",o)}var ba={id:"auto-start/base",before:["actions"],install:function(t){var o=t.interactStatic,f=t.defaults;t.usePlugin(Te),f.base.actionChecker=null,f.base.styleCursor=!0,ne(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),o.maxInteractions=function(y){return vl(y,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:Ya,cursorElement:null}},listeners:{"interactions:down":function(t,o){var f=t.interaction,y=t.pointer,S=t.event,R=t.eventTarget;f.interacting()||Ma(f,Ee(f,y,S,R,o),o)},"interactions:move":function(t,o){(function(f,y){var S=f.interaction,R=f.pointer,Y=f.event,ae=f.eventTarget;S.pointerType!=="mouse"||S.pointerIsDown||S.interacting()||Ma(S,Ee(S,R,Y,ae,y),y)})(t,o),function(f,y){var S=f.interaction;if(S.pointerIsDown&&!S.interacting()&&S.pointerWasMoved&&S.prepared.name){y.fire("autoStart:before-start",f);var R=S.interactable,Y=S.prepared.name;Y&&R&&(R.options[Y].manualStart||!Ya(R,S.element,S.prepared,y)?S.stop():(S.start(S.prepared,R,S.element),Ie(S,y)))}}(t,o)},"interactions:stop":function(t,o){var f=t.interaction,y=f.interactable;y&&y.options.styleCursor&&wl(f.element,"",o)}},maxInteractions:vl,withinInteractionLimit:Ya,validateAction:na},oa=ba,wa={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,o){var f=t.interaction,y=t.eventTarget,S=t.dx,R=t.dy;if(f.prepared.name==="drag"){var Y=Math.abs(S),ae=Math.abs(R),ke=f.interactable.options.drag,Ue=ke.startAxis,_e=Y>ae?"x":Y<ae?"y":"xy";if(f.prepared.axis=ke.lockAxis==="start"?_e[0]:ke.lockAxis,_e!=="xy"&&Ue!=="xy"&&Ue!==_e){f.prepared.name=null;for(var la=y,Da=function(el){if(el!==f.interactable){var cl=f.interactable.options.drag;if(!cl.manualStart&&el.testIgnoreAllow(cl,la,y)){var Bl=el.getAction(f.downPointer,f.downEvent,f,la);if(Bl&&Bl.name==="drag"&&function(Sl,Fl){if(!Fl)return!1;var Zl=Fl.options.drag.startAxis;return Sl==="xy"||Zl==="xy"||Zl===Sl}(_e,el)&&oa.validateAction(Bl,el,la,y,o))return el}}};E.element(la);){var ll=o.interactables.forEachMatch(la,Da);if(ll){f.prepared.name="drag",f.interactable=ll,f.element=la;break}la=$e(la)}}}}}};function ga(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 ol={id:"auto-start/hold",install:function(t){var o=t.defaults;t.usePlugin(oa),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=ga(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;ga(o)>0&&(o.prepared.name=null)}},getHoldDuration:ga},Fe=ol,gl={id:"auto-start",install:function(t){t.usePlugin(oa),t.usePlugin(Fe),t.usePlugin(wa)}},Ne=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):E.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function Kl(t){var o=t.interaction,f=t.event;o.interactable&&o.interactable.checkAndPreventDefault(f)}var Ca={id:"core/interactablePreventDefault",install:function(t){var o=t.Interactable;o.prototype.preventDefault=Ne,o.prototype.checkAndPreventDefault=function(f){return function(y,S,R){var Y=y.options.preventDefault;if(Y!=="never")if(Y!=="always"){if(S.events.supportsPassive&&/^touch(start|move)$/.test(R.type)){var ae=x(R.target).document,ke=S.getDocOptions(ae);if(!ke||!ke.events||ke.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(R.type)||E.element(R.target)&&ue(R.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||R.preventDefault()}else R.preventDefault()}(this,t,f)},t.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var y=0,S=t.interactions.list;y<S.length;y++){var R=S[y];if(R.element&&(R.element===f.target||re(R.element,f.target)))return void R.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(t,o){return t["interactions:".concat(o)]=Kl,t},{})};function sl(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 Za(t){var o={};for(var f in t){var y=t[f];E.plainObject(y)?o[f]=Za(y):E.array(y)?o[f]=W(y):o[f]=y}return o}var bl=function(){function t(o){s(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=Ia(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(t,[{key:"start",value:function(o,f){var y,S,R=o.phase,Y=this.interaction,ae=function(Ue){var _e=Ue.interactable.options[Ue.prepared.name],la=_e.modifiers;return la&&la.length?la:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Da){var ll=_e[Da];return ll&&ll.enabled&&{options:ll,methods:ll._methods}}).filter(function(Da){return!!Da})}(Y);this.prepareStates(ae),this.startEdges=ne({},Y.edges),this.edges=ne({},this.startEdges),this.startOffset=(y=Y.rect,S=f,y?{left:S.x-y.left,top:S.y-y.top,right:y.right-S.x,bottom:y.bottom-S.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var ke=this.fillArg({phase:R,pageCoords:f,preEnd:!1});return this.result=Ia(),this.startAll(ke),this.result=this.setAll(ke)}},{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,y=this.states;f<y.length;f++){var S=y[f];S.methods.start&&(o.state=S,S.methods.start(o))}}},{key:"setAll",value:function(o){var f=o.phase,y=o.preEnd,S=o.skipModifiers,R=o.rect,Y=o.edges;o.coords=ne({},o.pageCoords),o.rect=ne({},R),o.edges=ne({},Y);for(var ae=S?this.states.slice(S):this.states,ke=Ia(o.coords,o.rect),Ue=0;Ue<ae.length;Ue++){var _e,la=ae[Ue],Da=la.options,ll=ne({},o.coords),el=null;(_e=la.methods)!=null&&_e.set&&this.shouldDo(Da,y,f)&&(o.state=la,el=la.methods.set(o),ge(o.edges,o.rect,{x:o.coords.x-ll.x,y:o.coords.y-ll.y})),ke.eventProps.push(el)}ne(this.edges,o.edges),ke.delta.x=o.coords.x-o.pageCoords.x,ke.delta.y=o.coords.y-o.pageCoords.y,ke.rectDelta.left=o.rect.left-R.left,ke.rectDelta.right=o.rect.right-R.right,ke.rectDelta.top=o.rect.top-R.top,ke.rectDelta.bottom=o.rect.bottom-R.bottom;var cl=this.result.coords,Bl=this.result.rect;if(cl&&Bl){var Sl=ke.rect.left!==Bl.left||ke.rect.right!==Bl.right||ke.rect.top!==Bl.top||ke.rect.bottom!==Bl.bottom;ke.changed=Sl||cl.x!==ke.coords.x||cl.y!==ke.coords.y}return ke}},{key:"applyToInteraction",value:function(o){var f=this.interaction,y=o.phase,S=f.coords.cur,R=f.coords.start,Y=this.result,ae=this.startDelta,ke=Y.delta;y==="start"&&ne(this.startDelta,Y.delta);for(var Ue=0,_e=[[R,ae],[S,ke]];Ue<_e.length;Ue++){var la=_e[Ue],Da=la[0],ll=la[1];Da.page.x+=ll.x,Da.page.y+=ll.y,Da.client.x+=ll.x,Da.client.y+=ll.y}var el=this.result.rectDelta,cl=o.rect||f.rect;cl.left+=el.left,cl.right+=el.right,cl.top+=el.top,cl.bottom+=el.bottom,cl.width=cl.right-cl.left,cl.height=cl.bottom-cl.top}},{key:"setAndApply",value:function(o){var f=this.interaction,y=o.phase,S=o.preEnd,R=o.skipModifiers,Y=this.setAll(this.fillArg({preEnd:S,phase:y,pageCoords:o.modifiedCoords||f.coords.cur.page}));if(this.result=Y,!Y.changed&&(!R||R<this.states.length)&&f.interacting())return!1;if(o.modifiedCoords){var ae=f.coords.cur.page,ke={x:o.modifiedCoords.x-ae.x,y:o.modifiedCoords.y-ae.y};Y.coords.x+=ke.x,Y.coords.y+=ke.y,Y.delta.x+=ke.x,Y.delta.y+=ke.y}this.applyToInteraction(o)}},{key:"beforeEnd",value:function(o){var f=o.interaction,y=o.event,S=this.states;if(S&&S.length){for(var R=!1,Y=0;Y<S.length;Y++){var ae=S[Y];o.state=ae;var ke=ae.options,Ue=ae.methods,_e=Ue.beforeEnd&&Ue.beforeEnd(o);if(_e)return this.endResult=_e,!1;R=R||!R&&this.shouldDo(ke,!0,o.phase,!0)}R&&f.move({event:y,preEnd:!0})}}},{key:"stop",value:function(o){var f=o.interaction;if(this.states&&this.states.length){var y=ne({states:this.states,interactable:f.interactable,element:f.element,rect:null},o);this.fillArg(y);for(var S=0,R=this.states;S<R.length;S++){var Y=R[S];y.state=Y,Y.methods.stop&&Y.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(o){this.states=[];for(var f=0;f<o.length;f++){var y=o[f],S=y.options,R=y.methods,Y=y.name;this.states.push({options:S,methods:R,index:f,name:Y})}return this.states}},{key:"restoreInteractionCoords",value:function(o){var f=o.interaction,y=f.coords,S=f.rect,R=f.modification;if(R.result){for(var Y=R.startDelta,ae=R.result,ke=ae.delta,Ue=ae.rectDelta,_e=0,la=[[y.start,Y],[y.cur,ke]];_e<la.length;_e++){var Da=la[_e],ll=Da[0],el=Da[1];ll.page.x-=el.x,ll.page.y-=el.y,ll.client.x-=el.x,ll.client.y-=el.y}S.left-=Ue.left,S.right-=Ue.right,S.top-=Ue.top,S.bottom-=Ue.bottom}}},{key:"shouldDo",value:function(o,f,y,S){return!(!o||o.enabled===!1||S&&!o.endOnly||o.endOnly&&!f||y==="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 Za(f)}),this.result=Ia(ne({},o.result.coords),ne({},o.result.rect))}},{key:"destroy",value:function(){for(var o in this)this[o]=null}}]),t}();function Ia(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 $l(t,o){var f=t.defaults,y={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},S=function(R){var Y=R||{};for(var ae in Y.enabled=Y.enabled!==!1,f)ae in Y||(Y[ae]=f[ae]);var ke={options:Y,methods:y,name:o,enable:function(){return Y.enabled=!0,ke},disable:function(){return Y.enabled=!1,ke}};return ke};return o&&typeof o=="string"&&(S._defaults=f,S._methods=y),S}function br(t){var o=t.iEvent,f=t.interaction.modification.result;f&&(o.modifiers=f.eventProps)}var yn={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var o=t.interaction;o.modification=new bl(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,y=f.setAndApply(t);return o.edges=f.edges,y},"interactions:before-action-end":function(t){var o=t.interaction,f=o.modification,y=f.beforeEnd(t);return o.edges=f.startEdges,y},"interactions:action-start":br,"interactions:action-move":br,"interactions:action-end":br,"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)}}},_r=yn,Pl={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},cn=function(t){m(f,t);var o=I(f);function f(y,S,R,Y,ae,ke,Ue){var _e;s(this,f),(_e=o.call(this,y)).relatedTarget=null,_e.screenX=void 0,_e.screenY=void 0,_e.button=void 0,_e.buttons=void 0,_e.ctrlKey=void 0,_e.shiftKey=void 0,_e.altKey=void 0,_e.metaKey=void 0,_e.page=void 0,_e.client=void 0,_e.delta=void 0,_e.rect=void 0,_e.x0=void 0,_e.y0=void 0,_e.t0=void 0,_e.dt=void 0,_e.duration=void 0,_e.clientX0=void 0,_e.clientY0=void 0,_e.velocity=void 0,_e.speed=void 0,_e.swipe=void 0,_e.axes=void 0,_e.preEnd=void 0,ae=ae||y.element;var la=y.interactable,Da=(la&&la.options||Pl).deltaSource,ll=he(la,ae,R),el=Y==="start",cl=Y==="end",Bl=el?C(_e):y.prevEvent,Sl=el?y.coords.start:cl?{page:Bl.page,client:Bl.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return _e.page=ne({},Sl.page),_e.client=ne({},Sl.client),_e.rect=ne({},y.rect),_e.timeStamp=Sl.timeStamp,cl||(_e.page.x-=ll.x,_e.page.y-=ll.y,_e.client.x-=ll.x,_e.client.y-=ll.y),_e.ctrlKey=S.ctrlKey,_e.altKey=S.altKey,_e.shiftKey=S.shiftKey,_e.metaKey=S.metaKey,_e.button=S.button,_e.buttons=S.buttons,_e.target=ae,_e.currentTarget=ae,_e.preEnd=ke,_e.type=Ue||R+(Y||""),_e.interactable=la,_e.t0=el?y.pointers[y.pointers.length-1].downTime:Bl.t0,_e.x0=y.coords.start.page.x-ll.x,_e.y0=y.coords.start.page.y-ll.y,_e.clientX0=y.coords.start.client.x-ll.x,_e.clientY0=y.coords.start.client.y-ll.y,_e.delta=el||cl?{x:0,y:0}:{x:_e[Da].x-Bl[Da].x,y:_e[Da].y-Bl[Da].y},_e.dt=y.coords.delta.timeStamp,_e.duration=_e.timeStamp-_e.t0,_e.velocity=ne({},y.coords.velocity[Da]),_e.speed=qa(_e.velocity.x,_e.velocity.y),_e.swipe=cl||Y==="inertiastart"?_e.getSwipe():null,_e}return c(f,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var S=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;S<0&&(S+=360);var R=112.5<=S&&S<247.5,Y=202.5<=S&&S<337.5;return{up:Y,down:!Y&&22.5<=S&&S<157.5,left:R,right:!R&&(292.5<=S||S<67.5),angle:S,speed:y.prevEvent.speed,velocity:{x:y.prevEvent.velocityX,y:y.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),f}(ma);Object.defineProperties(cn.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 Ur=c(function t(o,f,y,S,R){s(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=y,this.downTime=S,this.downTarget=R}),Wr=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),Yr=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),Zr=0,Kr=function(){function t(o){var f=this,y=o.pointerType,S=o.scopeFire;s(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=za(function(_e){this.move(_e)},"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=Zr++,this._scopeFire=S,this.pointerType=y;var R=this;this._proxy={};var Y=function(_e){Object.defineProperty(f._proxy,_e,{get:function(){return R[_e]}})};for(var ae in Wr)Y(ae);var ke=function(_e){Object.defineProperty(f._proxy,_e,{value:function(){return R[_e].apply(R,arguments)}})};for(var Ue in Yr)ke(Ue);this._scopeFire("interactions:new",{interaction:this})}return c(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(o,f,y){var S=this.updatePointer(o,f,y,!0),R=this.pointers[S];this._scopeFire("interactions:down",{pointer:o,event:f,eventTarget:y,pointerIndex:S,pointerInfo:R,type:"down",interaction:this})}},{key:"start",value:function(o,f,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(o.name==="gesture"?2:1)||!f.options[o.name].enabled)&&(da(this.prepared,o),this.interactable=f,this.element=y,this.rect=f.getRect(y),this.edges=this.prepared.edges?ne({},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,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(o,f,y,!1);var S,R,Y=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(S=this.coords.cur.client.x-this.coords.start.client.x,R=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=qa(S,R)>this.pointerMoveTolerance);var ae,ke,Ue,_e=this.getPointerIndex(o),la={pointer:o,pointerIndex:_e,pointerInfo:this.pointers[_e],event:f,type:"move",eventTarget:y,dx:S,dy:R,duplicate:Y,interaction:this};Y||(ae=this.coords.velocity,ke=this.coords.delta,Ue=Math.max(ke.timeStamp/1e3,.001),ae.page.x=ke.page.x/Ue,ae.page.y=ke.page.y/Ue,ae.client.x=ke.client.x/Ue,ae.client.y=ke.client.y/Ue,ae.timeStamp=Ue),this._scopeFire("interactions:move",la),Y||this.simulation||(this.interacting()&&(la.type=null,this.move(la)),this.pointerWasMoved&&Z(this.coords.prev,this.coords.cur))}},{key:"move",value:function(o){o&&o.event||ve(this.coords.delta),(o=ne({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,y,S){var R=this.getPointerIndex(o);R===-1&&(R=this.updatePointer(o,f,y,!1));var Y=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(Y),{pointer:o,pointerIndex:R,pointerInfo:this.pointers[R],event:f,eventTarget:y,type:Y,curEventTarget:S,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=He(o);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:J(this.pointers,function(y){return y.id===f})}},{key:"getPointerInfo",value:function(o){return this.pointers[this.getPointerIndex(o)]}},{key:"updatePointer",value:function(o,f,y,S){var R,Y,ae,ke=He(o),Ue=this.getPointerIndex(o),_e=this.pointers[Ue];return S=S!==!1&&(S||/(down|start)$/i.test(f.type)),_e?_e.pointer=o:(_e=new Ur(ke,o,f,null,null),Ue=this.pointers.length,this.pointers.push(_e)),_a(this.coords.cur,this.pointers.map(function(la){return la.pointer}),this._now()),R=this.coords.delta,Y=this.coords.prev,ae=this.coords.cur,R.page.x=ae.page.x-Y.page.x,R.page.y=ae.page.y-Y.page.y,R.client.x=ae.client.x-Y.client.x,R.client.y=ae.client.y-Y.client.y,R.timeStamp=ae.timeStamp-Y.timeStamp,S&&(this.pointerIsDown=!0,_e.downTime=this.coords.cur.timeStamp,_e.downTarget=y,H(this.downPointer,o),this.interacting()||(Z(this.coords.start,this.coords.cur),Z(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(o,f,y),this._scopeFire("interactions:update-pointer",{pointer:o,event:f,eventTarget:y,down:S,pointerInfo:_e,pointerIndex:Ue,interaction:this}),Ue}},{key:"removePointer",value:function(o,f){var y=this.getPointerIndex(o);if(y!==-1){var S=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:o,event:f,eventTarget:null,pointerIndex:y,pointerInfo:S,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(o,f,y){this._latestPointer.pointer=o,this._latestPointer.event=f,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(o,f,y,S){return new cn(this,o,this.prepared.name,f,this.element,y,S)}},{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,y=o.phase,S=o.preEnd,R=o.type,Y=this.rect;if(Y&&y==="move"&&(ge(this.edges,Y,this.coords.delta[this.interactable.options.deltaSource]),Y.width=Y.right-Y.left,Y.height=Y.bottom-Y.top),this._scopeFire("interactions:before-action-".concat(y),o)===!1)return!1;var ae=o.iEvent=this._createPreparedEvent(f,y,S,R);return this._scopeFire("interactions:action-".concat(y),o),y==="start"&&(this.prevEvent=ae),this._fireEvent(ae),this._scopeFire("interactions:after-action-".concat(y),o),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function or(t){sr(t.interaction)}function sr(t){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(t))return!1;var o=t.offset.pending;return xl(t.coords.cur,o),xl(t.coords.delta,o),ge(t.edges,t.rect,o),o.x=0,o.y=0,!0}function Qr(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 xl(t,o){var f=t.page,y=t.client,S=o.x,R=o.y;f.x+=S,f.y+=R,y.x+=S,y.y+=R}Yr.offsetBy="";var hr={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Qr},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&&(xl(o.coords.cur,o.offset.total),o.offset.pending.x=0,o.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":or,"interactions:before-action-move":or,"interactions:before-action-end":function(t){var o=t.interaction;if(sr(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}}},Yl=hr,Tr=function(){function t(o){s(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 c(t,[{key:"start",value:function(o){var f=this.interaction,y=Xl(f);if(!y||!y.enabled)return!1;var S=f.coords.velocity.client,R=qa(S.x,S.y),Y=this.modification||(this.modification=new bl(f));if(Y.copyFrom(f.modification),this.t0=f._now(),this.allowResume=y.allowResume,this.v0=R,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=Y.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&R>y.minSpeed&&R>y.endSpeed)this.startInertia();else{if(Y.result=Y.setAll(this.modifierArg),!Y.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,y=Xl(this.interaction),S=y.resistance,R=-Math.log(y.endSpeed/this.v0)/S;this.targetOffset={x:(f.x-R)/S,y:(f.y-R)/S},this.te=R,this.lambda_v0=S/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var Y=this.modification,ae=this.modifierArg;ae.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},Y.result=Y.setAll(ae),Y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+Y.result.delta.x,y:this.targetOffset.y+Y.result.delta.y}),this.onNextFrame(function(){return 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=lr.request(function(){f.active&&o()})}},{key:"inertiaTick",value:function(){var o,f,y,S,R,Y,ae,ke=this,Ue=this.interaction,_e=Xl(Ue).resistance,la=(Ue._now()-this.t0)/1e3;if(la<this.te){var Da,ll=1-(Math.exp(-_e*la)-this.lambda_v0)/this.one_ve_v0;this.isModified?(o=0,f=0,y=this.targetOffset.x,S=this.targetOffset.y,R=this.modifiedOffset.x,Y=this.modifiedOffset.y,Da={x:Pr(ae=ll,o,y,R),y:Pr(ae,f,S,Y)}):Da={x:this.targetOffset.x*ll,y:this.targetOffset.y*ll};var el={x:Da.x-this.currentOffset.x,y:Da.y-this.currentOffset.y};this.currentOffset.x+=el.x,this.currentOffset.y+=el.y,Ue.offsetBy(el),Ue.move(),this.onNextFrame(function(){return ke.inertiaTick()})}else Ue.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,y=f._now()-this.t0,S=Xl(f).smoothEndDuration;if(y<S){var R={x:Er(y,0,this.targetOffset.x,S),y:Er(y,0,this.targetOffset.y,S)},Y={x:R.x-this.currentOffset.x,y:R.y-this.currentOffset.y};this.currentOffset.x+=Y.x,this.currentOffset.y+=Y.y,f.offsetBy(Y),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,y=o.event,S=o.eventTarget,R=this.interaction;R.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),R.updatePointer(f,y,S,!0),R._doPhase({interaction:R,event:y,phase:"resume"}),Z(R.coords.prev,R.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,lr.cancel(this.timeout)}}]),t}();function Xl(t){var o=t.interactable,f=t.prepared;return o&&o.options&&f.name&&o.options[f.name].inertia}var wr={id:"inertia",before:["modifiers","actions"],install:function(t){var o=t.defaults;t.usePlugin(Yl),t.usePlugin(_r),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 Tr(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,y=o.inertia;if(y.active)for(var S=f;E.element(S);){if(S===o.element){y.resume(t);break}S=$e(S)}},"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":br,"interactions:action-inertiastart":br,"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,y){var S=1-t;return S*S*o+2*S*t*f+t*t*y}function Er(t,o,f,y){return-f*(t/=y)*(t-2)+o}var un=wr;function en(t,o){for(var f=0;f<o.length;f++){var y=o[f];if(t.immediatePropagationStopped)break;y(t)}}var Zn=function(){function t(o){s(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ne({},o||{})}return c(t,[{key:"fire",value:function(o){var f,y=this.global;(f=this.types[o.type])&&en(o,f),!o.propagationStopped&&y&&(f=y[o.type])&&en(o,f)}},{key:"on",value:function(o,f){var y=Ke(o,f);for(o in y)this.types[o]=Je(this.types[o]||[],y[o])}},{key:"off",value:function(o,f){var y=Ke(o,f);for(o in y){var S=this.types[o];if(S&&S.length)for(var R=0,Y=y[o];R<Y.length;R++){var ae=Y[R],ke=S.indexOf(ae);ke!==-1&&S.splice(ke,1)}}}},{key:"getRect",value:function(o){return null}}]),t}(),Hn=function(){function t(o){s(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=o,H(this,o)}return c(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Tn(t){return E.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function On(t,o){return t===o||(typeof t=="boolean"?!!o.capture===t&&!o.passive:!!t.capture==!!o.capture&&!!t.passive==!!o.passive)}var Un={id:"events",install:function(t){var o,f=[],y={},S=[],R={add:Y,remove:ae,addDelegate:function(_e,la,Da,ll,el){var cl=Tn(el);if(!y[Da]){y[Da]=[];for(var Bl=0;Bl<S.length;Bl++){var Sl=S[Bl];Y(Sl,Da,ke),Y(Sl,Da,Ue,!0)}}var Fl=y[Da],Zl=je(Fl,function(jl){return jl.selector===_e&&jl.context===la});Zl||(Zl={selector:_e,context:la,listeners:[]},Fl.push(Zl)),Zl.listeners.push({func:ll,options:cl})},removeDelegate:function(_e,la,Da,ll,el){var cl,Bl=Tn(el),Sl=y[Da],Fl=!1;if(Sl)for(cl=Sl.length-1;cl>=0;cl--){var Zl=Sl[cl];if(Zl.selector===_e&&Zl.context===la){for(var jl=Zl.listeners,Gl=jl.length-1;Gl>=0;Gl--){var Wl=jl[Gl];if(Wl.func===ll&&On(Wl.options,Bl)){jl.splice(Gl,1),jl.length||(Sl.splice(cl,1),ae(la,Da,ke),ae(la,Da,Ue,!0)),Fl=!0;break}}if(Fl)break}}},delegateListener:ke,delegateUseCapture:Ue,delegatedEvents:y,documents:S,targets:f,supportsOptions:!1,supportsPassive:!1};function Y(_e,la,Da,ll){if(_e.addEventListener){var el=Tn(ll),cl=je(f,function(Bl){return Bl.eventTarget===_e});cl||(cl={eventTarget:_e,events:{}},f.push(cl)),cl.events[la]||(cl.events[la]=[]),je(cl.events[la],function(Bl){return Bl.func===Da&&On(Bl.options,el)})||(_e.addEventListener(la,Da,R.supportsOptions?el:el.capture),cl.events[la].push({func:Da,options:el}))}}function ae(_e,la,Da,ll){if(_e.addEventListener&&_e.removeEventListener){var el=J(f,function(on){return on.eventTarget===_e}),cl=f[el];if(cl&&cl.events)if(la!=="all"){var Bl=!1,Sl=cl.events[la];if(Sl){if(Da==="all"){for(var Fl=Sl.length-1;Fl>=0;Fl--){var Zl=Sl[Fl];ae(_e,la,Zl.func,Zl.options)}return}for(var jl=Tn(ll),Gl=0;Gl<Sl.length;Gl++){var Wl=Sl[Gl];if(Wl.func===Da&&On(Wl.options,jl)){_e.removeEventListener(la,Da,R.supportsOptions?jl:jl.capture),Sl.splice(Gl,1),Sl.length===0&&(delete cl.events[la],Bl=!0);break}}}Bl&&!Object.keys(cl.events).length&&f.splice(el,1)}else for(la in cl.events)cl.events.hasOwnProperty(la)&&ae(_e,la,"all")}}function ke(_e,la){for(var Da=Tn(la),ll=new Hn(_e),el=y[_e.type],cl=Ce(_e)[0],Bl=cl;E.element(Bl);){for(var Sl=0;Sl<el.length;Sl++){var Fl=el[Sl],Zl=Fl.selector,jl=Fl.context;if(ue(Bl,Zl)&&re(jl,cl)&&re(jl,Bl)){var Gl=Fl.listeners;ll.currentTarget=Bl;for(var Wl=0;Wl<Gl.length;Wl++){var on=Gl[Wl];On(on.options,Da)&&on.func(ll)}}}Bl=$e(Bl)}}function Ue(_e){return ke(_e,!0)}return(o=t.document)==null||o.createElement("div").addEventListener("test",null,{get capture(){return R.supportsOptions=!0},get passive(){return R.supportsPassive=!0}}),t.events=R,R}},gn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var o=0,f=gn.methodOrder;o<f.length;o++){var y=f[o],S=gn[y](t);if(S)return S}return null},simulationResume:function(t){var o=t.pointerType,f=t.eventType,y=t.eventTarget,S=t.scope;if(!/down|start/i.test(f))return null;for(var R=0,Y=S.interactions.list;R<Y.length;R++){var ae=Y[R],ke=y;if(ae.simulation&&ae.simulation.allowResume&&ae.pointerType===o)for(;ke;){if(ke===ae.element)return ae;ke=$e(ke)}}return null},mouseOrPen:function(t){var o,f=t.pointerId,y=t.pointerType,S=t.eventType,R=t.scope;if(y!=="mouse"&&y!=="pen")return null;for(var Y=0,ae=R.interactions.list;Y<ae.length;Y++){var ke=ae[Y];if(ke.pointerType===y){if(ke.simulation&&!Ln(ke,f))continue;if(ke.interacting())return ke;o||(o=ke)}}if(o)return o;for(var Ue=0,_e=R.interactions.list;Ue<_e.length;Ue++){var la=_e[Ue];if(!(la.pointerType!==y||/down/i.test(S)&&la.simulation))return la}return null},hasPointer:function(t){for(var o=t.pointerId,f=0,y=t.scope.interactions.list;f<y.length;f++){var S=y[f];if(Ln(S,o))return S}return null},idle:function(t){for(var o=t.pointerType,f=0,y=t.scope.interactions.list;f<y.length;f++){var S=y[f];if(S.pointers.length===1){var R=S.interactable;if(R&&(!R.options.gesture||!R.options.gesture.enabled))continue}else if(S.pointers.length>=2)continue;if(!S.interacting()&&o===S.pointerType)return S}return null}};function Ln(t,o){return t.pointers.some(function(f){return f.id===o})}var Qn=gn,Jr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ei(t,o){return function(f){var y=o.interactions.list,S=Ta(f),R=Ce(f),Y=R[0],ae=R[1],ke=[];if(/^touch/.test(f.type)){o.prevTouchTime=o.now();for(var Ue=0,_e=f.changedTouches;Ue<_e.length;Ue++){var la=_e[Ue],Da={pointer:la,pointerId:He(la),pointerType:S,eventType:f.type,eventTarget:Y,curEventTarget:ae,scope:o},ll=Sn(Da);ke.push([Da.pointer,Da.eventTarget,Da.curEventTarget,ll])}}else{var el=!1;if(!X.supportsPointerEvent&&/mouse/.test(f.type)){for(var cl=0;cl<y.length&&!el;cl++)el=y[cl].pointerType!=="mouse"&&y[cl].pointerIsDown;el=el||o.now()-o.prevTouchTime<500||f.timeStamp===0}if(!el){var Bl={pointer:f,pointerId:He(f),pointerType:S,eventType:f.type,curEventTarget:ae,eventTarget:Y,scope:o},Sl=Sn(Bl);ke.push([Bl.pointer,Bl.eventTarget,Bl.curEventTarget,Sl])}}for(var Fl=0;Fl<ke.length;Fl++){var Zl=ke[Fl],jl=Zl[0],Gl=Zl[1],Wl=Zl[2];Zl[3][t](jl,f,Gl,Wl)}}}function Sn(t){var o=t.pointerType,f=t.scope,y={interaction:Qn.search(t),searchDetails:t};return f.fire("interactions:find",y),y.interaction||f.interactions.new({pointerType:o})}function Ii(t,o){var f=t.doc,y=t.scope,S=t.options,R=y.interactions.docEvents,Y=y.events,ae=Y[o];for(var ke in y.browser.isIOS&&!S.events&&(S.events={passive:!1}),Y.delegatedEvents)ae(f,ke,Y.delegateListener),ae(f,ke,Y.delegateUseCapture,!0);for(var Ue=S&&S.events,_e=0;_e<R.length;_e++){var la=R[_e];ae(f,la.type,la.listener,Ue)}}var Ho={id:"core/interactions",install:function(t){for(var o={},f=0;f<Jr.length;f++){var y=Jr[f];o[y]=ei(y,t)}var S,R=X.pEventTypes;function Y(){for(var ae=0,ke=t.interactions.list;ae<ke.length;ae++){var Ue=ke[ae];if(Ue.pointerIsDown&&Ue.pointerType==="touch"&&!Ue._interacting)for(var _e=function(){var ll=Da[la];t.documents.some(function(el){return re(el.doc,ll.downTarget)})||Ue.removePointer(ll.pointer,ll.event)},la=0,Da=Ue.pointers;la<Da.length;la++)_e()}}(S=A.PointerEvent?[{type:R.down,listener:Y},{type:R.down,listener:o.pointerDown},{type:R.move,listener:o.pointerMove},{type:R.up,listener:o.pointerUp},{type:R.cancel,listener:o.pointerUp}]:[{type:"mousedown",listener:o.pointerDown},{type:"mousemove",listener:o.pointerMove},{type:"mouseup",listener:o.pointerUp},{type:"touchstart",listener:Y},{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(ae){for(var ke=0,Ue=t.interactions.list;ke<Ue.length;ke++)Ue[ke].documentBlur(ae)}}),t.prevTouchTime=0,t.Interaction=function(ae){m(Ue,ae);var ke=I(Ue);function Ue(){return s(this,Ue),ke.apply(this,arguments)}return c(Ue,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(_e){t.interactions.pointerMoveTolerance=_e}},{key:"_now",value:function(){return t.now()}}]),Ue}(Kr),t.interactions={list:[],new:function(ae){ae.scopeFire=function(Ue,_e){return t.fire(Ue,_e)};var ke=new t.Interaction(ae);return t.interactions.list.push(ke),ke},listeners:o,docEvents:S,pointerMoveTolerance:1},t.usePlugin(Ca)},listeners:{"scope:add-document":function(t){return Ii(t,"add")},"scope:remove-document":function(t){return Ii(t,"remove")},"interactable:unset":function(t,o){for(var f=t.interactable,y=o.interactions.list.length-1;y>=0;y--){var S=o.interactions.list[y];S.interactable===f&&(S.stop(),o.fire("interactions:destroy",{interaction:S}),S.destroy(),o.interactions.list.length>2&&o.interactions.list.splice(y,1))}}},onDocSignal:Ii,doOnInteractions:ei,methodNames:Jr},Uo=Ho,An=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(An||{}),qo=function(){function t(o,f,y,S){s(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Zn,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||y,this._win=x(Ea(o)?this._context:o),this._doc=this._win.document,this._scopeEvents=S,this.set(f)}return c(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(o,f){return E.func(f.onstart)&&this.on("".concat(o,"start"),f.onstart),E.func(f.onmove)&&this.on("".concat(o,"move"),f.onmove),E.func(f.onend)&&this.on("".concat(o,"end"),f.onend),E.func(f.oninertiastart)&&this.on("".concat(o,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(o,f,y){var S,R=this,Y=(S=this._actions.map[o])==null?void 0:S.filterEventType,ae=function(ke){return(Y==null||Y(ke))&&sl(ke,R._actions)};(E.array(f)||E.object(f))&&this._onOff(An.Off,o,f,void 0,ae),(E.array(y)||E.object(y))&&this._onOff(An.On,o,y,void 0,ae)}},{key:"setPerAction",value:function(o,f){var y=this._defaults;for(var S in f){var R=S,Y=this.options[o],ae=f[R];R==="listeners"&&this.updatePerActionListeners(o,Y.listeners,ae),E.array(ae)?Y[R]=W(ae):E.plainObject(ae)?(Y[R]=ne(Y[R]||{},Za(ae)),E.object(y.perAction[R])&&"enabled"in y.perAction[R]&&(Y[R].enabled=ae.enabled!==!1)):E.bool(ae)&&E.object(y.perAction[R])?Y[R].enabled=ae:Y[R]=ae}}},{key:"getRect",value:function(o){return o=o||(E.element(this.target)?this.target:null),E.string(this.target)&&(o=o||this._context.querySelector(this.target)),Ve(o)}},{key:"rectChecker",value:function(o){var f=this;return E.func(o)?(this.getRect=function(y){var S=ne({},o.apply(f,y));return"width"in S||(S.width=S.right-S.left,S.height=S.bottom-S.top),S},this):o===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(o,f){if(Ea(f)||E.object(f)){for(var y in this.options[o]=f,this._actions.map)this.options[y][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 E.string(o)?Array.from(this._context.querySelectorAll(o)):E.func(o)&&o.getAllElements?o.getAllElements():E.element(o)?[o]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(o){return this._context===o.ownerDocument||re(this._context,o)}},{key:"testIgnoreAllow",value:function(o,f,y){return!this.testIgnore(o.ignoreFrom,f,y)&&this.testAllow(o.allowFrom,f,y)}},{key:"testAllow",value:function(o,f,y){return!o||!!E.element(y)&&(E.string(o)?U(y,o,f):!!E.element(o)&&re(o,y))}},{key:"testIgnore",value:function(o,f,y){return!(!o||!E.element(y))&&(E.string(o)?U(y,o,f):!!E.element(o)&&re(o,y))}},{key:"fire",value:function(o){return this.events.fire(o),this}},{key:"_onOff",value:function(o,f,y,S,R){E.object(f)&&!E.array(f)&&(S=y,y=null);var Y=Ke(f,y,R);for(var ae in Y){ae==="wheel"&&(ae=X.wheelEvent);for(var ke=0,Ue=Y[ae];ke<Ue.length;ke++){var _e=Ue[ke];sl(ae,this._actions)?this.events[o===An.On?"on":"off"](ae,_e):E.string(this.target)?this._scopeEvents[o===An.On?"addDelegate":"removeDelegate"](this.target,this._context,ae,_e,S):this._scopeEvents[o===An.On?"add":"remove"](this.target,ae,_e,S)}}return this}},{key:"on",value:function(o,f,y){return this._onOff(An.On,o,f,y)}},{key:"off",value:function(o,f,y){return this._onOff(An.Off,o,f,y)}},{key:"set",value:function(o){var f=this._defaults;for(var y in E.object(o)||(o={}),this.options=Za(f.base),this._actions.methodDict){var S=y,R=this._actions.methodDict[S];this.options[S]={},this.setPerAction(S,ne(ne({},f.perAction),f.actions[S])),this[R](o[S])}for(var Y in o)Y!=="getRect"?E.func(this[Y])&&this[Y](o[Y]):this.rectChecker(o.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var o in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[o],y=f.length-1;y>=0;y--){var S=f[y],R=S.selector,Y=S.context,ae=S.listeners;R===this.target&&Y===this._context&&f.splice(y,1);for(var ke=ae.length-1;ke>=0;ke--)this._scopeEvents.removeDelegate(this.target,this._context,o,ae[ke][0],ae[ke][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),Wo=function(){function t(o){var f=this;s(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=o,o.addListeners({"interactable:unset":function(y){var S=y.interactable,R=S.target,Y=E.string(R)?f.selectorMap[R]:R[f.scope.id],ae=J(Y,function(ke){return ke===S});Y.splice(ae,1)}})}return c(t,[{key:"new",value:function(o,f){f=ne(f||{},{actions:this.scope.actions});var y=new this.scope.Interactable(o,f,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),E.string(o)?(this.selectorMap[o]||(this.selectorMap[o]=[]),this.selectorMap[o].push(y)):(y.target[this.scope.id]||Object.defineProperty(o,this.scope.id,{value:[],configurable:!0}),o[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:o,options:f,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(o,f){var y=f&&f.context||this.scope.document,S=E.string(o),R=S?this.selectorMap[o]:o[this.scope.id];if(R)return je(R,function(Y){return Y._context===y&&(S||Y.inContext(o))})}},{key:"forEachMatch",value:function(o,f){for(var y=0,S=this.list;y<S.length;y++){var R=S[y],Y=void 0;if((E.string(R.target)?E.element(o)&&ue(o,R.target):o===R.target)&&R.inContext(o)&&(Y=f(R)),Y!==void 0)return Y}}}]),t}(),Ko=function(){function t(){var o=this;s(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=X,this.defaults=Za(Pl),this.Eventable=Zn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var S=function R(Y,ae){var ke=y.interactables.getExisting(Y,ae);return ke||((ke=y.interactables.new(Y,ae)).events.global=R.globalEvents),ke};return S.getPointerAverage=ha,S.getTouchBBox=La,S.getTouchDistance=Aa,S.getTouchAngle=ua,S.getElementRect=Ve,S.getElementClientRect=Me,S.matchesSelector=ue,S.closest=fe,S.globalEvents={},S.version="1.10.27",S.scope=y,S.use=function(R,Y){return this.scope.usePlugin(R,Y),this},S.isSet=function(R,Y){return!!this.scope.interactables.get(R,Y&&Y.context)},S.on=za(function(R,Y,ae){if(E.string(R)&&R.search(" ")!==-1&&(R=R.trim().split(/ +/)),E.array(R)){for(var ke=0,Ue=R;ke<Ue.length;ke++){var _e=Ue[ke];this.on(_e,Y,ae)}return this}if(E.object(R)){for(var la in R)this.on(la,R[la],Y);return this}return sl(R,this.scope.actions)?this.globalEvents[R]?this.globalEvents[R].push(Y):this.globalEvents[R]=[Y]:this.scope.events.add(this.scope.document,R,Y,{options:ae}),this},"The interact.on() method is being deprecated"),S.off=za(function(R,Y,ae){if(E.string(R)&&R.search(" ")!==-1&&(R=R.trim().split(/ +/)),E.array(R)){for(var ke=0,Ue=R;ke<Ue.length;ke++){var _e=Ue[ke];this.off(_e,Y,ae)}return this}if(E.object(R)){for(var la in R)this.off(la,R[la],Y);return this}var Da;return sl(R,this.scope.actions)?R in this.globalEvents&&(Da=this.globalEvents[R].indexOf(Y))!==-1&&this.globalEvents[R].splice(Da,1):this.scope.events.remove(this.scope.document,R,Y,ae),this},"The interact.off() method is being deprecated"),S.debug=function(){return this.scope},S.supportsTouch=function(){return X.supportsTouch},S.supportsPointerEvent=function(){return X.supportsPointerEvent},S.stop=function(){for(var R=0,Y=this.scope.interactions.list;R<Y.length;R++)Y[R].stop();return this},S.pointerMoveTolerance=function(R){return E.number(R)?(this.scope.interactions.pointerMoveTolerance=R,this):this.scope.interactions.pointerMoveTolerance},S.addDocument=function(R,Y){this.scope.addDocument(R,Y)},S.removeDocument=function(R){this.scope.removeDocument(R)},S}(this),this.InteractEvent=cn,this.Interactable=void 0,this.interactables=new Wo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return o.removeDocument(y.target)};var f=this;this.Interactable=function(y){m(R,y);var S=I(R);function R(){return s(this,R),S.apply(this,arguments)}return c(R,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(Y){return k(g(R.prototype),"set",this).call(this,Y),f.fire("interactable:set",{options:Y,interactable:this}),this}},{key:"unset",value:function(){k(g(R.prototype),"unset",this).call(this);var Y=f.interactables.list.indexOf(this);Y<0||(f.interactables.list.splice(Y,1),f.fire("interactable:unset",{interactable:this}))}}]),R}(qo)}return c(t,[{key:"addListeners",value:function(o,f){this.listenerMaps.push({id:f,map:o})}},{key:"fire",value:function(o,f){for(var y=0,S=this.listenerMaps;y<S.length;y++){var R=S[y].map[o];if(R&&R(f,this,o)===!1)return!1}}},{key:"init",value:function(o){return this.isInitialized?this:function(f,y){return f.isInitialized=!0,E.window(y)&&_(y),A.init(y),X.init(y),lr.init(y),f.window=y,f.document=y.document,f.usePlugin(Uo),f.usePlugin(Un),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 y=0,S=this.listenerMaps.length,R=o.before.reduce(function(ae,ke){return ae[ke]=!0,ae[Oi(ke)]=!0,ae},{});y<S;y++){var Y=this.listenerMaps[y].id;if(Y&&(R[Y]||R[Oi(Y)]))break}this.listenerMaps.splice(y,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 y=x(o);f=f?ne({},f):{},this.documents.push({doc:o,options:f}),this.events.documents.push(o),o!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:o,window:y,scope:this,options:f})}},{key:"removeDocument",value:function(o){var f=this.getDocIndex(o),y=x(o),S=this.documents[f].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:o,window:y,scope:this,options:S})}},{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 Oi(t){return t&&t.replace(/\/.*$/,"")}var ao=new Ko,nn=ao.interactStatic,Go=typeof globalThis<"u"?globalThis:window;ao.init(Go);var Yo=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var o=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var S=y[0],R=y[1];return S in t||R in t}),f=function(y,S){for(var R=t.range,Y=t.limits,ae=Y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:Y,ke=t.offset,Ue=ke===void 0?{x:0,y:0}:ke,_e={range:R,grid:t,x:null,y:null},la=0;la<o.length;la++){var Da=o[la],ll=Da[0],el=Da[1],cl=Math.round((y-Ue.x)/t[ll]),Bl=Math.round((S-Ue.y)/t[el]);_e[ll]=Math.max(ae.left,Math.min(ae.right,cl*t[ll]+Ue.x)),_e[el]=Math.max(ae.top,Math.min(ae.bottom,Bl*t[el]+Ue.y))}return _e};return f.grid=t,f.coordFields=o,f}}),Li={id:"snappers",install:function(t){var o=t.interactStatic;o.snappers=ne(o.snappers||{},Yo),o.createSnapGrid=o.snappers.grid}},Jo=Li,Ri={start:function(t){var o=t.state,f=t.rect,y=t.edges,S=t.pageCoords,R=o.options,Y=R.ratio,ae=R.enabled,ke=o.options,Ue=ke.equalDelta,_e=ke.modifiers;Y==="preserve"&&(Y=f.width/f.height),o.startCoords=ne({},S),o.startRect=ne({},f),o.ratio=Y,o.equalDelta=Ue;var la=o.linkedEdges={top:y.top||y.left&&!y.bottom,left:y.left||y.top&&!y.right,bottom:y.bottom||y.right&&!y.top,right:y.right||y.bottom&&!y.left};if(o.xIsPrimaryAxis=!(!y.left&&!y.right),o.equalDelta){var Da=(la.left?1:-1)*(la.top?1:-1);o.edgeSign={x:Da,y:Da}}else o.edgeSign={x:la.left?-1:1,y:la.top?-1:1};if(ae!==!1&&ne(y,la),_e!=null&&_e.length){var ll=new bl(t.interaction);ll.copyFrom(t.interaction.modification),ll.prepareStates(_e),o.subModification=ll,ll.startAll(r({},t))}},set:function(t){var o=t.state,f=t.rect,y=t.coords,S=o.linkedEdges,R=ne({},y),Y=o.equalDelta?lo:ro;if(ne(t.edges,S),Y(o,o.xIsPrimaryAxis,y,f),!o.subModification)return null;var ae=ne({},f);ge(S,ae,{x:y.x-R.x,y:y.y-R.y});var ke=o.subModification.setAll(r(r({},t),{},{rect:ae,edges:S,pageCoords:y,prevCoords:y,prevRect:ae})),Ue=ke.delta;return ke.changed&&(Y(o,Math.abs(Ue.x)>Math.abs(Ue.y),ke.coords,ke.rect),ne(y,ke.coords)),ke.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function lo(t,o,f){var y=t.startCoords,S=t.edgeSign;o?f.y=y.y+(f.x-y.x)*S.y:f.x=y.x+(f.y-y.y)*S.x}function ro(t,o,f,y){var S=t.startRect,R=t.startCoords,Y=t.ratio,ae=t.edgeSign;if(o){var ke=y.width/Y;f.y=R.y+(ke-S.height)*ae.y}else{var Ue=y.height*Y;f.x=R.x+(Ue-S.width)*ae.x}}var Xo=$l(Ri,"aspectRatio"),no=function(){};no._defaults={};var mi=no;function kn(t,o,f){return E.func(t)?ce(t,o.interactable,o.element,[f.x,f.y,o]):ce(t,o.interactable,o.element)}var ai={start:function(t){var o=t.rect,f=t.startOffset,y=t.state,S=t.interaction,R=t.pageCoords,Y=y.options,ae=Y.elementRect,ke=ne({left:0,top:0,right:0,bottom:0},Y.offset||{});if(o&&ae){var Ue=kn(Y.restriction,S,R);if(Ue){var _e=Ue.right-Ue.left-o.width,la=Ue.bottom-Ue.top-o.height;_e<0&&(ke.left+=_e,ke.right+=_e),la<0&&(ke.top+=la,ke.bottom+=la)}ke.left+=f.left-o.width*ae.left,ke.top+=f.top-o.height*ae.top,ke.right+=f.right-o.width*(1-ae.right),ke.bottom+=f.bottom-o.height*(1-ae.bottom)}y.offset=ke},set:function(t){var o=t.coords,f=t.interaction,y=t.state,S=y.options,R=y.offset,Y=kn(S.restriction,f,o);if(Y){var ae=function(ke){return!ke||"left"in ke&&"top"in ke||((ke=ne({},ke)).left=ke.x||0,ke.top=ke.y||0,ke.right=ke.right||ke.left+ke.width,ke.bottom=ke.bottom||ke.top+ke.height),ke}(Y);o.x=Math.max(Math.min(ae.right-R.right,o.x),ae.left+R.left),o.y=Math.max(Math.min(ae.bottom-R.bottom,o.y),ae.top+R.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},$i=$l(ai,"restrict"),io={top:1/0,left:1/0,bottom:-1/0,right:-1/0},oo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function to(t,o){for(var f=0,y=["top","left","bottom","right"];f<y.length;f++){var S=y[f];S in t||(t[S]=o[S])}return t}var li={noInner:io,noOuter:oo,start:function(t){var o,f=t.interaction,y=t.startOffset,S=t.state,R=S.options;R&&(o=ca(kn(R.offset,f,f.coords.start.page))),o=o||{x:0,y:0},S.offset={top:o.y+y.top,left:o.x+y.left,bottom:o.y-y.bottom,right:o.x-y.right}},set:function(t){var o=t.coords,f=t.edges,y=t.interaction,S=t.state,R=S.offset,Y=S.options;if(f){var ae=ne({},o),ke=kn(Y.inner,y,ae)||{},Ue=kn(Y.outer,y,ae)||{};to(ke,io),to(Ue,oo),f.top?o.y=Math.min(Math.max(Ue.top+R.top,ae.y),ke.top+R.top):f.bottom&&(o.y=Math.max(Math.min(Ue.bottom+R.bottom,ae.y),ke.bottom+R.bottom)),f.left?o.x=Math.min(Math.max(Ue.left+R.left,ae.x),ke.left+R.left):f.right&&(o.x=Math.max(Math.min(Ue.right+R.right,ae.x),ke.right+R.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},so=$l(li,"restrictEdges"),ri=ne({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},ai.defaults),co=$l({start:ai.start,set:ai.set,defaults:ri},"restrictRect"),uo={width:-1/0,height:-1/0},ni={width:1/0,height:1/0},Zo=$l({start:function(t){return li.start(t)},set:function(t){var o=t.interaction,f=t.state,y=t.rect,S=t.edges,R=f.options;if(S){var Y=we(kn(R.min,o,t.coords))||uo,ae=we(kn(R.max,o,t.coords))||ni;f.options={endOnly:R.endOnly,inner:ne({},li.noInner),outer:ne({},li.noOuter)},S.top?(f.options.inner.top=y.bottom-Y.height,f.options.outer.top=y.bottom-ae.height):S.bottom&&(f.options.inner.bottom=y.top+Y.height,f.options.outer.bottom=y.top+ae.height),S.left?(f.options.inner.left=y.right-Y.width,f.options.outer.left=y.right-ae.width):S.right&&(f.options.inner.right=y.left+Y.width,f.options.outer.right=y.left+ae.width),li.set(t),f.options=R}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),yi={start:function(t){var o,f=t.interaction,y=t.interactable,S=t.element,R=t.rect,Y=t.state,ae=t.startOffset,ke=Y.options,Ue=ke.offsetWithOrigin?function(Da){var ll=Da.interaction.element,el=ca(ce(Da.state.options.origin,null,null,[ll])),cl=el||he(Da.interactable,ll,Da.interaction.prepared.name);return cl}(t):{x:0,y:0};if(ke.offset==="startCoords")o={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var _e=ce(ke.offset,y,S,[f]);(o=ca(_e)||{x:0,y:0}).x+=Ue.x,o.y+=Ue.y}var la=ke.relativePoints;Y.offsets=R&&la&&la.length?la.map(function(Da,ll){return{index:ll,relativePoint:Da,x:ae.left-R.width*Da.x+o.x,y:ae.top-R.height*Da.y+o.y}}):[{index:0,relativePoint:null,x:o.x,y:o.y}]},set:function(t){var o=t.interaction,f=t.coords,y=t.state,S=y.options,R=y.offsets,Y=he(o.interactable,o.element,o.prepared.name),ae=ne({},f),ke=[];S.offsetWithOrigin||(ae.x-=Y.x,ae.y-=Y.y);for(var Ue=0,_e=R;Ue<_e.length;Ue++)for(var la=_e[Ue],Da=ae.x-la.x,ll=ae.y-la.y,el=0,cl=S.targets.length;el<cl;el++){var Bl=S.targets[el],Sl=void 0;(Sl=E.func(Bl)?Bl(Da,ll,o._proxy,la,el):Bl)&&ke.push({x:(E.number(Sl.x)?Sl.x:Da)+la.x,y:(E.number(Sl.y)?Sl.y:ll)+la.y,range:E.number(Sl.range)?Sl.range:S.range,source:Bl,index:el,offset:la})}for(var Fl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Zl=0;Zl<ke.length;Zl++){var jl=ke[Zl],Gl=jl.range,Wl=jl.x-ae.x,on=jl.y-ae.y,vr=qa(Wl,on),dn=vr<=Gl;Gl===1/0&&Fl.inRange&&Fl.range!==1/0&&(dn=!1),Fl.target&&!(dn?Fl.inRange&&Gl!==1/0?vr/Gl<Fl.distance/Fl.range:Gl===1/0&&Fl.range!==1/0||vr<Fl.distance:!Fl.inRange&&vr<Fl.distance)||(Fl.target=jl,Fl.distance=vr,Fl.range=Gl,Fl.inRange=dn,Fl.delta.x=Wl,Fl.delta.y=on)}return Fl.inRange&&(f.x=Fl.target.x,f.y=Fl.target.y),y.closest=Fl,Fl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},ii=$l(yi,"snap"),gi={start:function(t){var o=t.state,f=t.edges,y=o.options;if(!f)return null;t.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},o.targetFields=o.targetFields||[["width","height"],["x","y"]],yi.start(t),o.offsets=t.state.offsets,t.state=o},set:function(t){var o=t.interaction,f=t.state,y=t.coords,S=f.options,R=f.offsets,Y={x:y.x-R[0].x,y:y.y-R[0].y};f.options=ne({},S),f.options.targets=[];for(var ae=0,ke=S.targets||[];ae<ke.length;ae++){var Ue=ke[ae],_e=void 0;if(_e=E.func(Ue)?Ue(Y.x,Y.y,o):Ue){for(var la=0,Da=f.targetFields;la<Da.length;la++){var ll=Da[la],el=ll[0],cl=ll[1];if(el in _e||cl in _e){_e.x=_e[el],_e.y=_e[cl];break}}f.options.targets.push(_e)}}var Bl=yi.set(t);return f.options=S,Bl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Qo=$l(gi,"snapSize"),Vi={aspectRatio:Xo,restrictEdges:so,restrict:$i,restrictRect:co,restrictSize:Zo,snapEdges:$l({start:function(t){var o=t.edges;return o?(t.state.targetFields=t.state.targetFields||[[o.left?"left":"right",o.top?"top":"bottom"]],gi.start(t)):null},set:gi.set,defaults:ne(Za(gi.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:ii,snapSize:Qo,spring:mi,avoid:mi,transform:mi,rubberband:mi},et={id:"modifiers",install:function(t){var o=t.interactStatic;for(var f in t.usePlugin(_r),t.usePlugin(Jo),o.modifiers=Vi,Vi){var y=Vi[f],S=y._defaults,R=y._methods;S._methods=R,t.defaults.perAction[f]=S}}},at=et,po=function(t){m(f,t);var o=I(f);function f(y,S,R,Y,ae,ke){var Ue;if(s(this,f),H(C(Ue=o.call(this,ae)),R),R!==S&&H(C(Ue),S),Ue.timeStamp=ke,Ue.originalEvent=R,Ue.type=y,Ue.pointerId=He(S),Ue.pointerType=Ta(S),Ue.target=Y,Ue.currentTarget=null,y==="tap"){var _e=ae.getPointerIndex(S);Ue.dt=Ue.timeStamp-ae.pointers[_e].downTime;var la=Ue.timeStamp-ae.tapTime;Ue.double=!!ae.prevTap&&ae.prevTap.type!=="doubletap"&&ae.prevTap.target===Ue.target&&la<500}else y==="doubletap"&&(Ue.dt=S.timeStamp-ae.tapTime,Ue.double=!0);return Ue}return c(f,[{key:"_subtractOrigin",value:function(y){var S=y.x,R=y.y;return this.pageX-=S,this.pageY-=R,this.clientX-=S,this.clientY-=R,this}},{key:"_addOrigin",value:function(y){var S=y.x,R=y.y;return this.pageX+=S,this.pageY+=R,this.clientX+=S,this.clientY+=R,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(ma),oi={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=oi,t.defaults.actions.pointerEvents=oi.defaults,ne(t.actions.phaselessTypes,oi.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,y=t.pointer,S=t.event,R=t.eventTarget;t.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Pi(t),zn({interaction:f,pointer:y,event:S,eventTarget:R,type:"move"},o))},"interactions:down":function(t,o){(function(f,y){for(var S=f.interaction,R=f.pointer,Y=f.event,ae=f.eventTarget,ke=f.pointerIndex,Ue=S.pointers[ke].hold,_e=aa(ae),la={interaction:S,pointer:R,event:Y,eventTarget:ae,type:"hold",targets:[],path:_e,node:null},Da=0;Da<_e.length;Da++){var ll=_e[Da];la.node=ll,y.fire("pointerEvents:collect-targets",la)}if(la.targets.length){for(var el=1/0,cl=0,Bl=la.targets;cl<Bl.length;cl++){var Sl=Bl[cl].eventable.options.holdDuration;Sl<el&&(el=Sl)}Ue.duration=el,Ue.timeout=setTimeout(function(){zn({interaction:S,eventTarget:ae,pointer:R,event:Y,type:"hold"},y)},el)}})(t,o),zn(t,o)},"interactions:up":function(t,o){Pi(t),zn(t,o),function(f,y){var S=f.interaction,R=f.pointer,Y=f.event,ae=f.eventTarget;S.pointerWasMoved||zn({interaction:S,eventTarget:ae,pointer:R,event:Y,type:"tap"},y)}(t,o)},"interactions:cancel":function(t,o){Pi(t),zn(t,o)}},PointerEvent:po,fire:zn,collectEventTargets:Fi,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 zn(t,o){var f=t.interaction,y=t.pointer,S=t.event,R=t.eventTarget,Y=t.type,ae=t.targets,ke=ae===void 0?Fi(t,o):ae,Ue=new po(Y,y,S,R,f,o.now());o.fire("pointerEvents:new",{pointerEvent:Ue});for(var _e={interaction:f,pointer:y,event:S,eventTarget:R,targets:ke,type:Y,pointerEvent:Ue},la=0;la<ke.length;la++){var Da=ke[la];for(var ll in Da.props||{})Ue[ll]=Da.props[ll];var el=he(Da.eventable,Da.node);if(Ue._subtractOrigin(el),Ue.eventable=Da.eventable,Ue.currentTarget=Da.node,Da.eventable.fire(Ue),Ue._addOrigin(el),Ue.immediatePropagationStopped||Ue.propagationStopped&&la+1<ke.length&&ke[la+1].node!==Ue.currentTarget)break}if(o.fire("pointerEvents:fired",_e),Y==="tap"){var cl=Ue.double?zn({interaction:f,pointer:y,event:S,eventTarget:R,type:"doubletap"},o):Ue;f.prevTap=cl,f.tapTime=cl.timeStamp}return Ue}function Fi(t,o){var f=t.interaction,y=t.pointer,S=t.event,R=t.eventTarget,Y=t.type,ae=f.getPointerIndex(y),ke=f.pointers[ae];if(Y==="tap"&&(f.pointerWasMoved||!ke||ke.downTarget!==R))return[];for(var Ue=aa(R),_e={interaction:f,pointer:y,event:S,eventTarget:R,type:Y,path:Ue,targets:[],node:null},la=0;la<Ue.length;la++){var Da=Ue[la];_e.node=Da,o.fire("pointerEvents:collect-targets",_e)}return Y==="hold"&&(_e.targets=_e.targets.filter(function(ll){var el,cl;return ll.eventable.options.holdDuration===((el=f.pointers[ae])==null||(cl=el.hold)==null?void 0:cl.duration)})),_e.targets}function Pi(t){var o=t.interaction,f=t.pointerIndex,y=o.pointers[f].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var lt=Object.freeze({__proto__:null,default:oi});function rt(t){var o=t.interaction;o.holdIntervalHandle&&(clearInterval(o.holdIntervalHandle),o.holdIntervalHandle=null)}var nt={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(oi);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)]=rt,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,y=t.pointerEvent,S=t.eventTarget,R=t.targets;if(y.type==="hold"&&R.length){var Y=R[0].eventable.options.holdRepeatInterval;Y<=0||(f.holdIntervalHandle=setTimeout(function(){o.pointerEvents.fire({interaction:f,eventTarget:S,type:"hold",pointer:y,event:y},o)},Y))}}})},bi=nt,it={id:"pointer-events/interactableTargets",install:function(t){var o=t.Interactable;o.prototype.pointerEvents=function(y){return ne(this.events.options,y),this};var f=o.prototype._backCompatOption;o.prototype._backCompatOption=function(y,S){var R=f.call(this,y,S);return R===this&&(this.events.options[y]=S),R}},listeners:{"pointerEvents:collect-targets":function(t,o){var f=t.targets,y=t.node,S=t.type,R=t.eventTarget;o.interactables.forEachMatch(y,function(Y){var ae=Y.events,ke=ae.options;ae.types[S]&&ae.types[S].length&&Y.testIgnoreAllow(ke,y,R)&&f.push({node:y,eventable:ae,props:{interactable:Y}})})},"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,y=t.options;ne(f.events.options,o.pointerEvents.defaults),ne(f.events.options,y.pointerEvents||{})}}},ot=it,tt={id:"pointer-events",install:function(t){t.usePlugin(lt),t.usePlugin(bi),t.usePlugin(ot)}},st=tt,fo={id:"reflow",install:function(t){var o=t.Interactable;t.actions.phases.reflow=!0,o.prototype.reflow=function(f){return function(y,S,R){for(var Y=y.getAllElements(),ae=R.window.Promise,ke=ae?[]:null,Ue=function(){var la=Y[_e],Da=y.getRect(la);if(!Da)return 1;var ll,el=je(R.interactions.list,function(Sl){return Sl.interacting()&&Sl.interactable===y&&Sl.element===la&&Sl.prepared.name===S.name});if(el)el.move(),ke&&(ll=el._reflowPromise||new ae(function(Sl){el._reflowResolve=Sl}));else{var cl=we(Da),Bl=function(Sl){return{coords:Sl,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:cl.x,y:cl.y},client:{x:cl.x,y:cl.y},timeStamp:R.now()});ll=function(Sl,Fl,Zl,jl,Gl){var Wl=Sl.interactions.new({pointerType:"reflow"}),on={interaction:Wl,event:Gl,pointer:Gl,eventTarget:Zl,phase:"reflow"};Wl.interactable=Fl,Wl.element=Zl,Wl.prevEvent=Gl,Wl.updatePointer(Gl,Gl,Zl,!0),ve(Wl.coords.delta),da(Wl.prepared,jl),Wl._doPhase(on);var vr=Sl.window,dn=vr.Promise,xn=dn?new dn(function(Bn){Wl._reflowResolve=Bn}):void 0;return Wl._reflowPromise=xn,Wl.start(jl,Fl,Zl),Wl._interacting?(Wl.move(on),Wl.end(Gl)):(Wl.stop(),Wl._reflowResolve()),Wl.removePointer(Gl,Gl),xn}(R,y,la,S,Bl)}ke&&ke.push(ll)},_e=0;_e<Y.length&&!Ue();_e++);return ke&&ae.all(ke).then(function(){return y})}(this,f,t)}},listeners:{"interactions:stop":function(t,o){var f=t.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(y,S){y.splice(y.indexOf(S),1)}(o.interactions.list,f))}}},ki=fo;if(nn.use(Ca),nn.use(Yl),nn.use(st),nn.use(un),nn.use(at),nn.use(gl),nn.use(ql),nn.use(va),nn.use(ki),nn.default=nn,i(a)==="object"&&a)try{a.exports=nn}catch{}return nn.default=nn,nn})}(Ki,Ki.exports)),Ki.exports}var B1=T1();const Ls=M.getDefaultExportFromCjs(B1),Vo=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:l,emit:n}){const r=a,i=n,s=e.inject(Wc),h=e.inject(Kc);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const c=e.shallowRef(null),d=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let m=!1,g=!1,u=NaN,C=NaN,I=NaN,k=NaN,G=-1,z=-1,j=-1,L=-1,_=r.x,x=r.y,w=r.w,b=r.h;const E=e.ref(),F=e.reactive({i:e.toRef(r,"i"),state:d,wrapper:E,calcXY:ce});function $(pe){Ke(pe)}function le(){fa()}function Q(pe){wn(r.isDraggable)&&(d.draggable=pe)}function me(pe){wn(r.isResizable)&&(d.resizable=pe)}function de(pe){wn(r.isBounded)&&(d.bounded=pe)}function A(pe){d.transformScale=pe}function ee(pe){d.rowHeight=pe}function X(pe){d.maxRows=pe}function re(){d.rtl=Is()==="rtl",fa()}function fe(pe){d.cols=Math.floor(pe)}s.increaseItem(F),e.onBeforeMount(()=>{d.rtl=Is()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?d.cols=Zc(s.lastBreakpoint,s.cols):d.cols=s.colNum,d.rowHeight=s.rowHeight,d.containerWidth=s.width!==null?s.width:100,d.margin=s.margin!==void 0?s.margin.map(Number):[10,10],d.maxRows=s.maxRows,wn(r.isDraggable)?d.draggable=s.isDraggable:d.draggable=r.isDraggable,wn(r.isResizable)?d.resizable=s.isResizable:d.resizable=r.isResizable,wn(r.isBounded)?d.bounded=s.isBounded:d.bounded=r.isBounded,d.transformScale=s.transformScale,d.useCssTransforms=s.useCssTransforms,d.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{_=r.x,x=r.y,b=r.h,w=r.w,pn(Ve)}),h.on("updateWidth",$),h.on("compact",le),h.on("setDraggable",Q),h.on("setResizable",me),h.on("setBounded",de),h.on("setTransformScale",A),h.on("setRowHeight",ee),h.on("setMaxRows",X),h.on("directionchange",re),h.on("setColNum",fe)}),e.onBeforeUnmount(()=>{h.off("updateWidth",$),h.off("compact",le),h.off("setDraggable",Q),h.off("setResizable",me),h.off("setBounded",de),h.off("setTransformScale",A),h.off("setRowHeight",ee),h.off("setMaxRows",X),h.off("directionchange",re),h.off("setColNum",fe),c.value&&(c.value.unset(),c.value=null),s.decreaseItem(F)}),l({state:d,wrapper:E});const $e=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ue=e.computed(()=>d.resizable&&!r.static),B=e.computed(()=>s.isMirrored?!d.rtl:d.rtl),se=e.computed(()=>(d.draggable||d.resizable)&&!r.static),U=k1("item"),be=e.computed(()=>({[U.b()]:!0,[U.bm("resizable")]:ue.value,[U.bm("static")]:r.static,[U.bm("resizing")]:d.isResizing,[U.bm("dragging")]:d.isDragging,[U.bm("transform")]:d.useCssTransforms,[U.bm("rtl")]:B.value,[U.bm("no-touch")]:$e&&se.value})),Me=e.computed(()=>[U.be("resizer"),B.value&&U.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,pe=>{d.draggable=pe}),e.watch(()=>r.static,()=>{pn(H),pn(ve)}),e.watch(()=>d.draggable,()=>{pn(H)}),e.watch(()=>r.isResizable,pe=>{d.resizable=pe}),e.watch(()=>r.isBounded,pe=>{d.bounded=pe}),e.watch(()=>d.resizable,()=>{pn(ve)}),e.watch(()=>d.rowHeight,()=>{pn(Ve),pn(aa)}),e.watch([()=>d.cols,()=>d.containerWidth],()=>{pn(ve),pn(Ve),pn(aa)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{pn(ve)}),e.watch(B,()=>{pn(ve),pn(Ve)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const pe=s.margin;!pe||pe[0]===d.margin[0]&&pe[1]===d.margin[1]||(d.margin=pe.map(Number),pn(Ve),pn(aa))});function Ve(){r.x+r.w>d.cols?(_=0,w=r.w>d.cols?d.cols:r.w):(_=r.x,w=r.w);const pe=ta(_,x,w,b);d.isDragging&&(pe.top=d.dragging.top,B.value?pe.right=d.dragging.left:pe.left=d.dragging.left),d.isResizing&&(pe.width=d.resizing.width,pe.height=d.resizing.height);let pa;d.useCssTransforms?B.value?pa=m1(pe.top,pe.right,pe.width,pe.height):pa=v1(pe.top,pe.left,pe.width,pe.height):B.value?pa=g1(pe.top,pe.right,pe.width,pe.height):pa=y1(pe.top,pe.left,pe.width,pe.height),d.style=pa}function aa(){const pe={};for(const pa of["width","height"]){const ia=d.style[pa].match(/^(\d+)px$/);if(!ia)return;pe[pa]=ia[1]}i("container-resized",r.i,r.h,r.w,pe.height,pe.width)}function Ea(pe){if(r.static)return;const pa=pe.type;if(pa==="resizestart"&&d.isResizing||pa!=="resizestart"&&!d.isResizing)return;const ia=zs(pe);if(wn(ia))return;const{x:He,y:_a}=ia,Ae={width:0,height:0};let ha;switch(pa){case"resizestart":{ve(),G=w,z=b,ha=ta(_,x,w,b),Ae.width=ha.width,Ae.height=ha.height,d.resizing=Ae,d.isResizing=!0;break}case"resizemove":{!pe.edges.right&&!pe.edges.left&&(I=He),!pe.edges.top&&!pe.edges.bottom&&(k=_a);const La=Ms(I,k,He,_a);B.value?Ae.width=d.resizing.width-La.deltaX/d.transformScale:Ae.width=d.resizing.width+La.deltaX/d.transformScale,Ae.height=d.resizing.height+La.deltaY/d.transformScale,d.resizing=Ae;break}case"resizeend":{ha=ta(_,x,w,b),Ae.width=ha.width,Ae.height=ha.height,d.resizing={width:-1,height:-1},d.isResizing=!1;break}}ha=he(Ae.height,Ae.width),ha.w<r.minW&&(ha.w=r.minW),ha.w>r.maxW&&(ha.w=r.maxW),ha.h<r.minH&&(ha.h=r.minH),ha.h>r.maxH&&(ha.h=r.maxH),ha.h<1&&(ha.h=1),ha.w<1&&(ha.w=1),I=He,k=_a,(w!==ha.w||b!==ha.h)&&i("resize",r.i,ha.h,ha.w,Ae.height,Ae.width),pe.type==="resizeend"&&(G!==w||z!==b)&&i("resized",r.i,ha.h,ha.w,Ae.height,Ae.width),h.emit("resizeEvent",pe.type,r.i,_,x,ha.h,ha.w)}function ne(pe){if(r.static||d.isResizing)return;const pa=pe.type;if(pa==="dragstart"&&d.isDragging||pa!=="dragstart"&&!d.isDragging)return;const ia=zs(pe);if(wn(ia))return;const{x:He,y:_a}=ia,Ae=pe.target;if(!Ae.offsetParent)return;const ha={top:0,left:0};switch(pa){case"dragstart":{j=_,L=x;const Aa=Ae.offsetParent.getBoundingClientRect(),ua=Ae.getBoundingClientRect(),Ta=ua.left/d.transformScale,Ce=Aa.left/d.transformScale,ma=ua.right/d.transformScale,Je=Aa.right/d.transformScale,W=ua.top/d.transformScale,J=Aa.top/d.transformScale;B.value?ha.left=(ma-Je)*-1:ha.left=Ta-Ce,ha.top=W-J,d.dragging=ha,d.isDragging=!0;break}case"dragmove":{const Aa=Ms(u,C,He,_a);if(B.value?ha.left=d.dragging.left-Aa.deltaX/d.transformScale:ha.left=d.dragging.left+Aa.deltaX/d.transformScale,ha.top=d.dragging.top+Aa.deltaY/d.transformScale,d.bounded){const ua=Ae.offsetParent.clientHeight-we(r.h,d.rowHeight,d.margin[1]);ha.top=ge(ha.top,0,ua);const Ta=ca(),Ce=d.containerWidth-we(r.w,Ta,d.margin[0]);ha.left=ge(ha.left,0,Ce)}d.dragging=ha;break}case"dragend":{const Aa=Ae.offsetParent.getBoundingClientRect(),ua=Ae.getBoundingClientRect(),Ta=ua.left/d.transformScale,Ce=Aa.left/d.transformScale,ma=ua.right/d.transformScale,Je=Aa.right/d.transformScale,W=ua.top/d.transformScale,J=Aa.top/d.transformScale;B.value?ha.left=(ma-Je)*-1:ha.left=Ta-Ce,ha.top=W-J,d.dragging={top:-1,left:-1},d.isDragging=!1;break}}let La;B.value,La=ce(ha.top,ha.left),u=He,C=_a,(_!==La.x||x!==La.y)&&i("move",r.i,La.x,La.y),pe.type==="dragend"&&(j!==_||L!==x)&&i("moved",r.i,La.x,La.y),h.emit("dragEvent",pe.type,r.i,La.x,La.y,b,w)}function ta(pe,pa,ia,He){const _a=ca();let Ae;return B.value?Ae={right:Math.round(_a*pe+(pe+1)*d.margin[0]),top:Math.round(d.rowHeight*pa+(pa+1)*d.margin[1]),width:ia===1/0?ia:Math.round(_a*ia+Math.max(0,ia-1)*d.margin[0]),height:He===1/0?He:Math.round(d.rowHeight*He+Math.max(0,He-1)*d.margin[1])}:Ae={left:Math.round(_a*pe+(pe+1)*d.margin[0]),top:Math.round(d.rowHeight*pa+(pa+1)*d.margin[1]),width:ia===1/0?ia:Math.round(_a*ia+Math.max(0,ia-1)*d.margin[0]),height:He===1/0?He:Math.round(d.rowHeight*He+Math.max(0,He-1)*d.margin[1])},Ae}function ce(pe,pa){const ia=ca();let He=Math.round((pa-d.margin[0])/(ia+d.margin[0])),_a=Math.round((pe-d.margin[1])/(d.rowHeight+d.margin[1]));return He=Math.max(Math.min(He,d.cols-w),0),_a=Math.max(Math.min(_a,d.maxRows-b),0),{x:He,y:_a}}function ca(){return(d.containerWidth-d.margin[0]*(d.cols+1))/d.cols}function we(pe,pa,ia){return Number.isFinite(pe)?Math.round(pa*pe+Math.max(0,pe-1)*ia):pe}function ge(pe,pa,ia){return Math.max(Math.min(pe,ia),pa)}function he(pe,pa,ia=!1){const He=ca();let _a=Math.round((pa+d.margin[0])/(He+d.margin[0])),Ae=0;return ia?Ae=Math.ceil((pe+d.margin[1])/(d.rowHeight+d.margin[1])):Ae=Math.round((pe+d.margin[1])/(d.rowHeight+d.margin[1])),_a=Math.max(Math.min(_a,d.cols-_),0),Ae=Math.max(Math.min(Ae,d.maxRows-x),0),{w:_a,h:Ae}}function Ke(pe,pa){d.containerWidth=pe}function fa(){Ve()}function qa(){!c.value&&E.value&&(c.value=Ls(E.value),d.useStyleCursor||c.value.styleCursor(!1))}const V=Bs(ne);function H(){if(qa(),!!c.value)if(d.draggable&&!r.static){const pe={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};c.value.draggable(pe),m||(m=!0,c.value.on("dragstart dragmove dragend",pa=>{pa.type==="dragmove"?V(pa):ne(pa)}))}else c.value.draggable({enabled:!1})}const Z=Bs(Ea);function ve(){if(qa(),!!c.value)if(d.resizable&&!r.static){const pe=ta(0,0,r.maxW,r.maxH),pa=ta(0,0,r.minW,r.minH),ia={edges:{left:B.value?`.${Me.value[0]}`:!1,right:B.value?!1:`.${Me.value[0]}`,bottom:`.${Me.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:pa.height*d.transformScale,width:pa.width*d.transformScale},max:{height:pe.height*d.transformScale,width:pe.width*d.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(ia.modifiers=[Ls.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(ia),g||(g=!0,c.value.on("resizestart resizemove resizeend",He=>{He.type==="resizemove"?Z(He):Ea(He)}))}else c.value.resizable({enabled:!1})}return(pe,pa)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:E,class:e.normalizeClass(be.value),style:e.normalizeStyle(d.style)},[e.renderSlot(pe.$slots,"default"),ue.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Me.value)},null,2)):e.createCommentVNode("",!0)],6))}}),vi=typeof window<"u";var Rs;vi&&(Rs=window==null?void 0:window.navigator)!=null&&Rs.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function $s(a){return a!=null}function Vs(){}const N1=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(N1)));const A1=vi&&("ontouchstart"in window||M1()>0),z1=A1?"pointerdown":"click";function M1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function I1(a,l,n=window.Event){const{type:r,bubbles:i=!1,cancelable:s=!1,...h}=l;if(!$s(r)||r==="")return!1;let c;return $s(n)?c=new n(r,{bubbles:i,cancelable:s}):(c=document.createEvent("HTMLEvents"),c.initEvent(r,i,s)),Object.assign(c,h),a.dispatchEvent(c)}const O1="clickoutside",L1=new Set;vi&&document.addEventListener(z1,a=>{const l=a.target,n=a.composedPath&&a.composedPath();L1.forEach(r=>{r!==l&&(n?!n.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&I1(r,{type:O1})})},!0);const R1=[["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 To;if(vi){for(const a of R1)if(a[1]in document){To=a;break}}e.computed(()=>!1);const $1=new Set,V1=new WeakMap;if(vi&&To){const a=To[2],l=To[4];document.addEventListener(l,()=>{if($1.forEach(n=>{n.value=!1}),document[a]){const n=V1.get(document[a]);n&&(n.value=!0)}},!1)}const eu=new Map;eu.set("x",0);eu.set("y",0);var fi=[],F1=function(){return fi.some(function(a){return a.activeTargets.length>0})},P1=function(){return fi.some(function(a){return a.skippedTargets.length>0})},Fs="ResizeObserver loop completed with undelivered notifications.",j1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Fs}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Fs),window.dispatchEvent(a)},eo;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(eo||(eo={}));var hi=function(a){return Object.freeze(a)},H1=function(){function a(l,n){this.inlineSize=l,this.blockSize=n,hi(this)}return a}(),au=function(){function a(l,n,r,i){return this.x=l,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,hi(this)}return a.prototype.toJSON=function(){var l=this,n=l.x,r=l.y,i=l.top,s=l.right,h=l.bottom,c=l.left,d=l.width,m=l.height;return{x:n,y:r,top:i,right:s,bottom:h,left:c,width:d,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Ot=function(a){return a instanceof SVGElement&&"getBBox"in a},lu=function(a){if(Ot(a)){var l=a.getBBox(),n=l.width,r=l.height;return!n&&!r}var i=a,s=i.offsetWidth,h=i.offsetHeight;return!(s||h||a.getClientRects().length)},Ps=function(a){var l;if(a instanceof Element)return!0;var n=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(n&&a instanceof n.Element)},U1=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Xi=typeof window<"u"?window:{},So=new WeakMap,js=/auto|scroll/,q1=/^tb|vertical/,W1=/msie|trident/i.test(Xi.navigator&&Xi.navigator.userAgent),In=function(a){return parseFloat(a||"0")},Ni=function(a,l,n){return a===void 0&&(a=0),l===void 0&&(l=0),n===void 0&&(n=!1),new H1((n?l:a)||0,(n?a:l)||0)},Hs=hi({devicePixelContentBoxSize:Ni(),borderBoxSize:Ni(),contentBoxSize:Ni(),contentRect:new au(0,0,0,0)}),ru=function(a,l){if(l===void 0&&(l=!1),So.has(a)&&!l)return So.get(a);if(lu(a))return So.set(a,Hs),Hs;var n=getComputedStyle(a),r=Ot(a)&&a.ownerSVGElement&&a.getBBox(),i=!W1&&n.boxSizing==="border-box",s=q1.test(n.writingMode||""),h=!r&&js.test(n.overflowY||""),c=!r&&js.test(n.overflowX||""),d=r?0:In(n.paddingTop),m=r?0:In(n.paddingRight),g=r?0:In(n.paddingBottom),u=r?0:In(n.paddingLeft),C=r?0:In(n.borderTopWidth),I=r?0:In(n.borderRightWidth),k=r?0:In(n.borderBottomWidth),G=r?0:In(n.borderLeftWidth),z=u+m,j=d+g,L=G+I,_=C+k,x=c?a.offsetHeight-_-a.clientHeight:0,w=h?a.offsetWidth-L-a.clientWidth:0,b=i?z+L:0,E=i?j+_:0,F=r?r.width:In(n.width)-b-w,$=r?r.height:In(n.height)-E-x,le=F+z+w+L,Q=$+j+x+_,me=hi({devicePixelContentBoxSize:Ni(Math.round(F*devicePixelRatio),Math.round($*devicePixelRatio),s),borderBoxSize:Ni(le,Q,s),contentBoxSize:Ni(F,$,s),contentRect:new au(u,d,F,$)});return So.set(a,me),me},nu=function(a,l,n){var r=ru(a,n),i=r.borderBoxSize,s=r.contentBoxSize,h=r.devicePixelContentBoxSize;switch(l){case eo.DEVICE_PIXEL_CONTENT_BOX:return h;case eo.BORDER_BOX:return i;default:return s}},K1=function(){function a(l){var n=ru(l);this.target=l,this.contentRect=n.contentRect,this.borderBoxSize=hi([n.borderBoxSize]),this.contentBoxSize=hi([n.contentBoxSize]),this.devicePixelContentBoxSize=hi([n.devicePixelContentBoxSize])}return a}(),iu=function(a){if(lu(a))return 1/0;for(var l=0,n=a.parentNode;n;)l+=1,n=n.parentNode;return l},G1=function(){var a=1/0,l=[];fi.forEach(function(s){if(s.activeTargets.length!==0){var h=[];s.activeTargets.forEach(function(c){var d=new K1(c.target),m=iu(c.target);h.push(d),c.lastReportedSize=nu(c.target,c.observedBox),m<a&&(a=m)}),l.push(function(){s.callback.call(s.observer,h,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=l;n<r.length;n++){var i=r[n];i()}return a},Us=function(a){fi.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(n){n.isActive()&&(iu(n.target)>a?l.activeTargets.push(n):l.skippedTargets.push(n))})})},Y1=function(){var a=0;for(Us(a);F1();)a=G1(),Us(a);return P1()&&j1(),a>0},gt,ou=[],J1=function(){return ou.splice(0).forEach(function(a){return a()})},X1=function(a){if(!gt){var l=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return J1()}).observe(n,r),gt=function(){n.textContent="".concat(l?l--:l++)}}ou.push(a),gt()},Z1=function(a){X1(function(){requestAnimationFrame(a)})},Bo=0,Q1=function(){return!!Bo},ev=250,av={attributes:!0,characterData:!0,childList:!0,subtree:!0},qs=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ws=function(a){return a===void 0&&(a=0),Date.now()+a},bt=!1,lv=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var n=this;if(l===void 0&&(l=ev),!bt){bt=!0;var r=Ws(l);Z1(function(){var i=!1;try{i=Y1()}finally{if(bt=!1,l=r-Ws(),!Q1())return;i?n.run(1e3):l>0?n.run(l):n.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,n=function(){return l.observer&&l.observer.observe(document.body,av)};document.body?n():Xi.addEventListener("DOMContentLoaded",n)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),qs.forEach(function(n){return Xi.addEventListener(n,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),qs.forEach(function(n){return Xi.removeEventListener(n,l.listener,!0)}),this.stopped=!0)},a}(),zt=new lv,Ks=function(a){!Bo&&a>0&&zt.start(),Bo+=a,!Bo&&zt.stop()},rv=function(a){return!Ot(a)&&!U1(a)&&getComputedStyle(a).display==="inline"},nv=function(){function a(l,n){this.target=l,this.observedBox=n||eo.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=nu(this.target,this.observedBox,!0);return rv(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),iv=function(){function a(l,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=n}return a}(),Eo=new WeakMap,Gs=function(a,l){for(var n=0;n<a.length;n+=1)if(a[n].target===l)return n;return-1},Co=function(){function a(){}return a.connect=function(l,n){var r=new iv(l,n);Eo.set(l,r)},a.observe=function(l,n,r){var i=Eo.get(l),s=i.observationTargets.length===0;Gs(i.observationTargets,n)<0&&(s&&fi.push(i),i.observationTargets.push(new nv(n,r&&r.box)),Ks(1),zt.schedule())},a.unobserve=function(l,n){var r=Eo.get(l),i=Gs(r.observationTargets,n),s=r.observationTargets.length===1;i>=0&&(s&&fi.splice(fi.indexOf(r),1),r.observationTargets.splice(i,1),Ks(-1))},a.disconnect=function(l){var n=this,r=Eo.get(l);r.observationTargets.slice().forEach(function(i){return n.unobserve(l,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),ov=function(){function a(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Co.connect(this,l)}return a.prototype.observe=function(l,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ps(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Co.observe(this,l,n)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ps(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Co.unobserve(this,l)},a.prototype.disconnect=function(){Co.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Fo=new WeakMap;function tv(a){var l;for(let n=0,r=a.length;n<r;++n){const i=a[n],s=Fo.get(i.target);if(typeof s=="function"){const{inlineSize:h,blockSize:c}=((l=i.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:d,offsetHeight:m}=i.target;s(Object.assign(i,{offsetWidth:d,offsetHeight:m,width:h??d,height:c??m}))}}}const tu=new(vi&&window.ResizeObserver||ov)(tv);function Ys(a,l){Fo.set(a,l),tu.observe(a)}function Js(a){Fo.has(a)&&(tu.unobserve(a),Fo.delete(a))}function sv(a={}){let l=Vs;const n=e.watch(()=>e.unref(a.target),i=>{l(),!(!i||typeof a.onResize!="function")&&(Ys(i,a.onResize),l=()=>{Js(i),l=Vs})},{immediate:!0}),r=()=>{n(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:Ys,unobserveResize:Js,unobserve:r}}const cv=e.ref(!1);e.computed(()=>cv.value);const Xs="__theme_style__",kt="__theme_observer__",Zs=e.reactive(new Map),Qs=new Map;e.watch(Zs,()=>{if(!vi)return;Qs.clear();const a=document.head.querySelector(`#${Xs}`);a&&document.head.removeChild(a);const l=document.createElement("style");let n=`.${kt} { width: 1px }`,r=1;for(const[i,[s,h]]of Zs.entries())n+=` html.${s} .${kt}, .${h} .${kt} { width: ${++r}px }`,Qs.set(r,i);l.textContent=n,l.id=Xs,document.head.appendChild(l)});const su=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:l,emit:n}){const r=a,i=n,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),h=new Map,c=e.ref(r.layout),d=e.ref(),{observeResize:m,unobserveResize:g}=sv(),u=s1();u.on("resizeEvent",C),u.on("dragEvent",I),e.onBeforeMount(()=>{i("layout-before-mount",c.value)}),e.onMounted(()=>{i("layout-mounted",c.value),e.nextTick(()=>{b1(c.value),s.originalLayout=c.value,e.nextTick(()=>{$(),d.value&&m(d.value,c1(_,16)),Di(c.value,r.verticalCompact),i("layout-updated",c.value),L(),_()})})}),e.onBeforeUnmount(()=>{u.clearAll(),d.value&&g(d.value)});function C(Q,me,de,A,ee,X){E(Q,me,de,A,ee,X)}function I(Q,me,de,A,ee,X){b(Q,me,de,A,ee,X)}e.watch(()=>s.width,(Q,me)=>{e.nextTick(()=>{u.emit("updateWidth",Q),me===-1&&e.nextTick(()=>{i("layout-ready",c.value)}),L()})}),e.watch(()=>[r.layout,r.layout.length],()=>{c.value=r.layout,j()}),e.watch(()=>r.colNum,Q=>{u.emit("setColNum",Q)}),e.watch(()=>r.rowHeight,Q=>{u.emit("setRowHeight",Q)}),e.watch(()=>r.isDraggable,Q=>{u.emit("setDraggable",Q)}),e.watch(()=>r.isResizable,Q=>{u.emit("setResizable",Q)}),e.watch(()=>r.isBounded,Q=>{u.emit("setBounded",Q)}),e.watch(()=>r.transformScale,Q=>{u.emit("setTransformScale",Q)}),e.watch(()=>r.responsive,Q=>{Q||(i("update:layout",s.originalLayout),u.emit("setColNum",r.colNum)),_()}),e.watch(()=>r.maxRows,Q=>{u.emit("setMaxRows",Q)}),e.watch([()=>r.margin,()=>r.margin[1]],L),e.provide(Wc,e.reactive({...e.toRefs(r),...e.toRefs(s),increaseItem:k,decreaseItem:G})),e.provide(Kc,u),l({state:s,getItem:z,resizeEvent:E,dragEvent:b,layoutUpdate:j});function k(Q){h.set(Q.i,Q)}function G(Q){h.delete(Q.i)}function z(Q){return h.get(Q)}function j(){if(!wn(c.value)&&!wn(s.originalLayout)){if(c.value.length!==s.originalLayout.length){const Q=le(c.value,s.originalLayout);if(Q.length>0)if(c.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(Q);else{const me=new Set(Q.map(de=>de.i));s.originalLayout=s.originalLayout.filter(de=>!me.has(de.i))}s.lastLayoutLength=c.value.length,$()}Di(c.value,r.verticalCompact),u.emit("updateWidth",s.width),L(),i("layout-updated",c.value)}}function L(){s.mergedStyle={height:x()}}function _(){d.value&&(s.width=d.value.offsetWidth),u.emit("resizeEvent")}function x(){if(!r.autoSize)return;const Q=parseFloat(r.margin[1]);return d1(c.value)*(r.rowHeight+Q)+Q+"px"}let w;function b(Q,me,de,A,ee,X){let re=Ns(c.value,me);wn(re)&&(re={h:0,w:0,x:0,y:0,i:""}),Q==="dragstart"&&!r.verticalCompact&&(w=c.value.reduce((fe,{i:$e,x:ue,y:B})=>({...fe,[$e]:{x:ue,y:B}}),{})),Q==="dragmove"||Q==="dragstart"?(s.placeholder.i=me,s.placeholder.x=re.x,s.placeholder.y=re.y,s.placeholder.w=X,s.placeholder.h=ee,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),c.value=At(c.value,re,de,A,!0,r.preventCollision),r.restoreOnDrag?(re.static=!0,Di(c.value,r.verticalCompact,w),re.static=!1):Di(c.value,r.verticalCompact),u.emit("compact"),L(),Q==="dragend"&&(w=void 0,i("layout-updated",c.value))}function E(Q,me,de,A,ee,X){let re=Ns(c.value,me);wn(re)&&(re={h:0,w:0,x:0,y:0,i:""});let fe;if(r.preventCollision){const $e=Yc(c.value,{...re,w:X,h:ee}).filter(ue=>ue.i!==re.i);if(fe=$e.length>0,fe){let ue=1/0,B=1/0;$e.forEach(se=>{se.x>re.x&&(ue=Math.min(ue,se.x)),se.y>re.y&&(B=Math.min(B,se.y))}),Number.isFinite(ue)&&(re.w=ue-re.x),Number.isFinite(B)&&(re.h=B-re.y)}}fe||(re.w=X,re.h=ee),Q==="resizestart"||Q==="resizemove"?(s.placeholder.i=me,s.placeholder.x=de,s.placeholder.y=A,s.placeholder.w=re.w,s.placeholder.h=re.h,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):Q&&e.nextTick(()=>{s.isDragging=!1}),r.responsive&&F(),Di(c.value,r.verticalCompact),u.emit("compact"),L(),Q==="resizeend"&&i("layout-updated",c.value)}function F(){const Q=_1(r.breakpoints,s.width);if(Q===s.lastBreakpoint)return;const me=Zc(Q,r.cols);!wn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=Nt(c.value));const de=S1(s.originalLayout,s.layouts,r.breakpoints,Q,s.lastBreakpoint,me,r.verticalCompact);s.layouts[Q]=de,s.lastBreakpoint!==Q&&i("breakpoint-changed",Q,de),c.value=de,i("update:layout",de),s.lastBreakpoint=Q,u.emit("setColNum",me)}function $(){s.layouts=Object.assign({},r.responsiveLayouts)}function le(Q,me){const de=new Set(me.map(re=>re.i)),A=new Set(Q.map(re=>re.i)),ee=Q.filter(re=>!de.has(re.i)),X=me.filter(re=>!A.has(re.i));return ee.concat(X)}return(Q,me)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:d,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[Q.$slots.default?e.renderSlot(Q.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,de=>(e.openBlock(),e.createBlock(Vo,e.mergeProps({key:de.i,ref_for:!0},de),{default:e.withCtx(()=>[e.renderSlot(Q.$slots,"item",{item:de})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Vo,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.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(a)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const uv={key:0,class:"item-view-group"},dv={key:0,class:"item-view-group"},pv=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const n=M.useModelComp(M.pinia),{isEdit:r}=M.storeToRefs(n),i=Xn(M.pinia),s=l,h=a,c=e.ref(""),d=e.computed(()=>h==null?void 0:h.children),m=e.computed(()=>{var L,_,x,w;return((L=h==null?void 0:h.children)==null?void 0:L.length)>0&&((_=h==null?void 0:h.children)!=null&&_.every(b=>b==null?void 0:b.layout))?(w=(x=h==null?void 0:h.children)==null?void 0:x[0])==null?void 0:w.layout:"vertical"}),g=L=>{c.value=L,s("radioChange",L)},u=e.computed(()=>{var L,_;return((_=(L=h==null?void 0:h.children)==null?void 0:L[0])==null?void 0:_.isGridLayout)||!1}),C=e.ref((h==null?void 0:h.level)+1),I=e.computed(()=>{if(!(h!=null&&h.children)||!Array.isArray(h.children)||h.children.length<2)return!1;const L=h.children.some(x=>(x==null?void 0:x.name)==="测量系统配置表"&&(x==null?void 0:x.comp)==="ParentItem"),_=h.children.some(x=>(x==null?void 0:x.name)==="测量系统传递表"&&(x==null?void 0:x.comp)==="ParentItem");return L&&_}),k=e.computed(()=>{var _,x,w,b,E,F;let L=(_=h==null?void 0:h.children)==null?void 0:_.filter($=>$==null?void 0:$.choice);if(i.setSelectTab((x=L==null?void 0:L[0])==null?void 0:x.choiceName),(c==null?void 0:c.value)!=="")return(w=h==null?void 0:h.children)==null?void 0:w.filter($=>!($!=null&&$.choiceName)||($==null?void 0:$.choiceName)===(c==null?void 0:c.value));{let $=(E=(b=h==null?void 0:h.children)==null?void 0:b.find(le=>le==null?void 0:le.choice))==null?void 0:E.choiceName;return(F=h==null?void 0:h.children)==null?void 0:F.filter(le=>!(le!=null&&le.choiceName)||(le==null?void 0:le.choiceName)===$)}}),G=L=>{const _=(L==null?void 0:L.menuFilter)||[];return Array.isArray(_)&&(_==null?void 0:_.some(x=>{const w=typeof x=="string"?x:JSON.stringify(x);return w==null?void 0:w.includes("HideGroup=Yes")}))};e.watch(()=>h==null?void 0:h.children,()=>{I.value},{deep:!0});const z=L=>{s("rowClick",L)},j=(L,_)=>{s("routeUrl",L,_)};return(L,_)=>u.value?(e.openBlock(),e.createBlock(e.unref(su),{key:0,layout:d.value,"onUpdate:layout":_[0]||(_[0]=x=>d.value=x),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(x,w)=>(e.openBlock(),e.createBlock(e.unref(Vo),{key:x.i,x:x.x,y:x.y,"min-h":x.minH,"max-h":x.maxH,"min-w":x.minW,w:x.w,h:x.h,i:x.i},{default:e.withCtx(()=>{var b,E,F,$,le,Q,me,de,A,ee,X,re,fe,$e;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:w===((b=h==null?void 0:h.children)==null?void 0:b.length)-1?"0px":"24px"})},[((F=(E=x==null?void 0:x.component)==null?void 0:E.comp)==null?void 0:F.toUpperCase())!=="TABLE"&&(($=x==null?void 0:x.component)!=null&&$.name)?(e.openBlock(),e.createElementBlock("div",uv,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((le=x==null?void 0:x.component)==null?void 0:le.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)((Q=x==null?void 0:x.component)==null?void 0:Q.comp)),{pageLayout:m.value,config:{showIndex:(me=e.unref(fr)[w])==null?void 0:me.showIndex,allowMove:(de=e.unref(fr)[w])==null?void 0:de.allowMove,viewport:(A=e.unref(fr)[w])==null?void 0:A.viewport,status:(ee=e.unref(fr)[w])==null?void 0:ee.status},related:x==null?void 0:x.relatedTables,compName:x==null?void 0:x.component.name,compNames:e.unref(Tc),itemData:(X=x==null?void 0:x.component)==null?void 0:X.compData,childItemData:(re=x==null?void 0:x.component)==null?void 0:re.itemChildData,key:e.unref(Jn),cacheNewData:e.unref(Dc),onChange:e.unref(Oo),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(Lo),onPageChange:e.unref(Ro),parentTableId:(fe=x==null?void 0:x.component)==null?void 0:fe.tableId,allMapContents:e.unref(Dt),children:($e=x==null?void 0:x.component)==null?void 0:$e.children,level:C.value,onRowClick:z,onRouteUrl:j,onClickTrigger:e.unref(Bc),onClickMainKey:e.unref(Nc),onRadioChange:g},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"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(k.value,(x,w)=>{var b,E;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(x==null?void 0:x.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(w)===((b=h==null?void 0:h.children)==null?void 0:b.length)-1?"0px":"24px"})},[((E=x==null?void 0:x.comp)==null?void 0:E.toUpperCase())!=="TABLE"&&x.name?(e.openBlock(),e.createElementBlock("div",dv,[G(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(x.name),5))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)(x.comp)),{compName:x.name,groupNames:x==null?void 0:x.nameContents,config:{showIndex:x==null?void 0:x.showIndex,allowMove:x==null?void 0:x.allowMove,viewport:x==null?void 0:x.viewport,status:x==null?void 0:x.status},itemData:x==null?void 0:x.compData,related:x==null?void 0:x.relatedTables,childItemData:x==null?void 0:x.itemChildData,key:e.unref(Jn),onChange:e.unref(Oo),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(Lo),onPageChange:e.unref(Ro),parentTableId:x==null?void 0:x.tableId,allMapContents:e.unref(Dt),children:x==null?void 0:x.children,level:C.value,onRowClick:z,onRouteUrl:j,onRadioChange:g},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),fv=ir._export_sfc(pv,[["__scopeId","data-v-bafbdd45"]]),hv={class:"radio-group-container"},vv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(),s=Xn(M.pinia),{selectTab:h}=M.storeToRefs(s);e.watch(()=>n==null?void 0:n.itemData,()=>{i.value=h.value},{immediate:!0,deep:!0});const c=d=>{i.value=d,r("radioChange",i.value)};return(d,m)=>(e.openBlock(),e.createElementBlock("div",hv,[e.createVNode(dl.ssRadio,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=g=>i.value=g),content:n==null?void 0:n.itemData,onChange:c},null,8,["modelValue","content"])]))}}),mv=ir._export_sfc(vv,[["__scopeId","data-v-177d64c3"]]),yv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,()=>{var r,i;n.value=((i=(r=l==null?void 0:l.itemData)==null?void 0:r.find(s=>(s==null?void 0:s.key)==="backGround"))==null?void 0:i.contents)??[]},{deep:!0,immediate:!0}),(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(dl.ssCarousel,{carouselList:n.value},null,8,["carouselList"])]))}}),cu=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),gv={TABLE:Ic,FORM:Cs,STATICFORM:Oc,TABLEOPERATE:t6,TABLESTYLE:S6,TABLEEXTEND:C6,TABLEINTERACTION:B6,FORMOPERATE:Ds,FOLD:i4,CALCULATOR:d4,METHODBUTTON:h4,AVATARUPLOAD:ts.ssAvatar,SIGNATURE:ts.ssSignature,FORMTOP:Cs,STEP:C4,STEPOPERATE:J6,TIMELINE:z4,TIMELINEOPERATE:l4,FORMTOPOPERATE:Ds,SIGNATUREOPERATE:_4,AVATARUPLOADOPERATE:y4,TABS:O4,TABSOPERATE:k2,CHART:O2,CHARTOPERATE:W2,LAYOUT:Y2,LAYOUTOPERATE:n1,PARENTITEM:fv,RADIO:mv,CAROUSEL:yv};function Mi(a){return gv[a==null?void 0:a.toUpperCase()]||null}exports.De=su;exports.activeStepInfo=Ti;exports.addContents=Zi;exports.addVisibleDialog=It;exports.affixItems=L0;exports.allMapContents=Dt;exports.analyzeMenu=oc;exports.cacheNewData=Dc;exports.clickMainKey=Nc;exports.clickSavePage=O0;exports.clickStep=zc;exports.clickTrigger=Bc;exports.compId=Jn;exports.compNames=Tc;exports.compShow=zi;exports.existLayouts=U0;exports.fixChangeValue=Po;exports.generateLayouts=k6;exports.getComponent=Mi;exports.getComponents=Qi;exports.getPageConstruct=Zd;exports.getPageData=Gr;exports.getSliceContLength=J0;exports.gridRowHeight=v6;exports.gridRowHeightHmPg=h6;exports.isStepLayout=Mc;exports.onBack=M0;exports.onButtonChange=F0;exports.onChange=Oo;exports.onClick=I0;exports.onClickStep=q0;exports.onContentChange=Lo;exports.onExtendTaskEnd=H0;exports.onOk=P0;exports.onPageBack=K0;exports.onPageChange=Ro;exports.onSelectFixContent=z0;exports.renderShowItems=Ec;exports.showItems=fr;exports.sliceTableLength=Cc;exports.slotContent=cu;exports.ssTable=Ic;exports.st=Vo;exports.stepItems=X0;exports.tabChange=W0;exports.toolBar=j0;exports.useFormComp=Mt;exports.useModelLoader=Mf;exports.verifyButton=G0;