ss-component-new 1.3.502 → 1.3.503
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{array-DvMnFzsV.cjs → array-B2x1CB3X.cjs} +1 -1
- package/dist/{array-CeYh-Xo9.js → array-BoTFq1wv.js} +2 -2
- package/dist/index-6e7psowX.cjs +26 -0
- package/dist/{index-BvNEKZ2_.js → index-B1AbjHPf.js} +7 -7
- package/dist/{index-CxzsJ99n.cjs → index-B4jIuCO4.cjs} +1 -1
- package/dist/{index-BmbAwtJ4.cjs → index-B6VU1__u.cjs} +1 -1
- package/dist/{index-CfEN4VZm.cjs → index-BIZcZe2Z.cjs} +1 -1
- package/dist/{index-DmDMLZ8y.js → index-BUdY44M7.js} +3 -3
- package/dist/index-Bl5sePlj.js +24142 -0
- package/dist/{index-CI_-JPAM.cjs → index-BvsoMmSG.cjs} +1 -1
- package/dist/{index-BsnW2PbW.cjs → index-C-odwbOG.cjs} +1 -1
- package/dist/{index-DgAKx6RP.js → index-C0eBQmSx.js} +1 -1
- package/dist/{index-BY6gdi10.js → index-C6LHnM9_.js} +2 -2
- package/dist/{index-CrixckXS.cjs → index-C92g_qZD.cjs} +1 -1
- package/dist/{index-BkxM_2uI.js → index-CLtmJDrQ.js} +1 -1
- package/dist/{index-kWZiX5VW.cjs → index-CMkqZrHH.cjs} +1 -1
- package/dist/{index-BLeo9xms.cjs → index-COG8lLpg.cjs} +1 -1
- package/dist/{index-BSskQsFp.js → index-CR4BLVeR.js} +2 -2
- package/dist/{index-DDdB29yy.cjs → index-Cm9ao8vK.cjs} +1 -1
- package/dist/{index-i69639DU.js → index-DClOk-l-.js} +1 -1
- package/dist/{index-q9A2lsc4.cjs → index-De4znrwk.cjs} +1 -1
- package/dist/{index-aMkrTQ-K.js → index-Dpo26Hcq.js} +1 -1
- package/dist/{index-wxXvRr6v.js → index-Dwb2XHg4.js} +1 -1
- package/dist/{index-CMIwaoj9.js → index-OngfXlOu.js} +1 -1
- package/dist/{index-DeLmH_fB.cjs → index-aMMHzxe9.cjs} +1 -1
- package/dist/{index-CPZi4WUr.js → index-tPWNG6Bz.js} +2 -2
- package/dist/{main-Dju73RDx.cjs → main-BoeTSni-.cjs} +1 -1
- package/dist/{main-DIS6yf9J.js → main-CLEWU0T0.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-R5y_cOm5.js → threeModel-C-8TO3OU.js} +1 -1
- package/dist/{threeModel-BM0x7hDF.cjs → threeModel-C0CNkVVN.cjs} +1 -1
- package/dist/{threeSceneView-DWw1it0G.cjs → threeSceneView-B1-9rRHE.cjs} +1 -1
- package/dist/{threeSceneView-BJMo7yxh.js → threeSceneView-jFiiJxwO.js} +3 -3
- package/dist/{threeSceneViewForCPMPIP-nsxBtn5B.js → threeSceneViewForCPMPIP-Cb8H3SOO.js} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CpZHZ008.cjs → threeSceneViewForCPMPIP-DWef0kiT.cjs} +1 -1
- package/dist/{threeViewerHost-Bw5fsbCC.cjs → threeViewerHost-BbOxODru.cjs} +1 -1
- package/dist/{threeViewerHost-B3nLZs-x.js → threeViewerHost-Ch6ACmc2.js} +1 -1
- package/package.json +1 -1
- package/dist/index-BYHRPJmR.js +0 -25046
- package/dist/index-DXsGi7zj.cjs +0 -39
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";var ed=Object.defineProperty;var ad=(a,l,r)=>l in a?ed(a,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[l]=r;var hn=(a,l,r)=>ad(a,typeof l!="symbol"?l+"":l,r);const e=require("vue"),Xa=require("./request-Dl8yi2iS.cjs"),z=require("./index-CMUsYepp.cjs"),ul=require("./index-B6VU1__u.cjs"),re=require("./index-BuZHI6xx.cjs"),fr=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fl=require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-J7Knzs4U.cjs"),Vr=require("./index-B-pflqKE.cjs"),Do=require("./threeViewerHost-BbOxODru.cjs"),Zr=require("./index-DmwxzDGW.cjs"),vs=require("./index-BvsoMmSG.cjs"),dc=require("./index-DkTHtURJ.cjs");;/* empty css */const To=require("./isString-CGrvcmBw.cjs"),ms=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),pc=require("./index-BVaHwt5f.cjs"),ld=require("./index-CPTra5LJ.cjs"),rd=require("vue3-seamless-scroll"),Yn=require("./MTLLoader-DqJ6tn_v.cjs"),nd=require("./URDFLoader-CnIz461N.cjs");var id="[object Boolean]";function fc(a){return a===!0||a===!1||Xa.isObjectLike(a)&&Xa.baseGetTag(a)==id}function od(a){return a===void 0}const td=a=>a.match(/\((.*)\)/)[1],sd={__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,r=e.ref(null),n=e.ref(!1),i=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{n.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>i.value,()=>{e.nextTick(()=>{var o,d;(d=(o=r.value)==null?void 0:o.updatePopper)==null||d.call(o)})},{deep:!0,immediate:!0}),(o,d)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:n.value,"onUpdate:visible":d[0]||(d[0]=u=>n.value=u),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:r,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"reference",{ref_key:"referenceRef",ref:i})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},cd=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,r=e.computed(()=>{var u,y,b,g,p,D;const n=l.value??"";let i=(u=l==null?void 0:l.columnContent)==null?void 0:u.filter;if(i=(y=re.analyzeSplitToContent(i,","))==null?void 0:y.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m)),i=i==null?void 0:i.find(m=>(m==null?void 0:m[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 o=(g=(b=l==null?void 0:l.columnContent)==null?void 0:b.options)==null?void 0:g.findIndex(m=>(m==null?void 0:m.value)===n);o=i==null?void 0:i[o],o=re.analyzeSplitToContent(o,","),o=o==null?void 0:o.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=o==null?void 0:o.find(m=>m==null?void 0:m.includes("@TextBackRGBA"));d?d=re.rgbaToColor((p=d==null?void 0:d.split("="))==null?void 0:p[1]):d=void 0;let c=o==null?void 0:o.find(m=>m==null?void 0:m.includes("@TextRGBA"));return c?c=re.rgbaToColor((D=c==null?void 0:c.split("="))==null?void 0:D[1]):c=void 0,{backgroundColor:d,color:c}});return(n,i)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(r.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),hc=fr._export_sfc(cd,[["__scopeId","data-v-3290070b"]]);function ud(a,l,r,n={}){if(!a||!l||!r||r.length!==4)return;const i=a.getContext("2d");if(!i)return;const{color:o="rgba(255, 235, 59, 0.3)",strokeWidth:d=2,fillOpacity:c=.2}=n,u=a.getBoundingClientRect(),y=l.getBoundingClientRect(),b=l.naturalWidth,g=l.naturalHeight,p=y.width/b,D=y.height/g,m=Math.min(p,D),F=b*m,C=g*m,L=(u.width-F)/2,O=(u.height-C)/2,S=r.map(([x,k])=>{const _=L+x*F,I=O+k*C;return{x:_,y:I}});i.clearRect(0,0,a.width,a.height),i.beginPath(),i.moveTo(S[0].x,S[0].y);for(let x=1;x<S.length;x++)i.lineTo(S[x].x,S[x].y);i.closePath();const E=o.replace(/[\d.]+\)$/,`${c})`);i.fillStyle=E,i.fill(),i.strokeStyle=o.replace(/[\d.]+\)$/,"1)"),i.lineWidth=d,i.stroke()}function Bi(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ys(a,l){if(!a||!l)return null;const r=a[l];return!r||!r.bboxNorm||!Array.isArray(r.bboxNorm)||r.bboxNorm.length!==4?null:{bboxNorm:r.bboxNorm,imageName:r.imageName||""}}const dd={key:0,class:"ocr-img-preview-root"},pd={class:"ocr-img-preview-window"},fd={key:0,class:"img-preview-body"},hd={class:"img-preview-header"},vd={class:"img-header-left"},md={class:"img-name"},yd={key:0,class:"img-header-right"},gd={class:"img-index"},bd={key:0,class:"img-thumb-list"},kd=["onClick"],xd={key:1,class:"thumb-placeholder"},wd={class:"thumb-name"},_d={class:"img-preview-container"},Sd={key:0,class:"img-placeholder"},Ed={key:2,class:"img-placeholder"},Cd={key:0},Dd={key:1},Td={key:1,class:"img-placeholder"},Bd=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 r=a,n=l,i=e.computed({get:()=>r.visible,set:A=>n("update:visible",A)});let o=!1,d="",c=0,u=0,y=0,b=0,g=0,p=0,D=null;const m=A=>{var G,fe;const se=(fe=(G=A==null?void 0:A.target)==null?void 0:G.closest)==null?void 0:fe.call(G,".ocr-img-preview-window");return se||document.querySelector(".ocr-img-preview-window")},F=A=>{if(!A||A==="none")return{tx:0,ty:0};let se=A.match(/matrix\(([^)]+)\)/);if(se){const G=se[1].split(",").map(fe=>Number(fe.trim()));return{tx:(G==null?void 0:G[4])||0,ty:(G==null?void 0:G[5])||0}}if(se=A.match(/matrix3d\(([^)]+)\)/),se){const G=se[1].split(",").map(fe=>Number(fe.trim()));return{tx:(G==null?void 0:G[12])||0,ty:(G==null?void 0:G[13])||0}}return se=A.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}},C=(A,se,G)=>{A.style.transform=`translate(${se}px, ${G}px)`},L=A=>{const se=m(A);if(!se)return;o=!0,D=se,d="move",c=A.clientX,u=A.clientY;const G=window.getComputedStyle(se),{tx:fe,ty:we}=F(G.transform);g=fe,p=we,document.addEventListener("mousemove",S),document.addEventListener("mouseup",E)},O=(A,se)=>{const G=m(A);if(!G)return;o=!0,D=G,d=se,c=A.clientX,u=A.clientY;const fe=G.getBoundingClientRect();y=fe.width,b=fe.height;const we=window.getComputedStyle(G),{tx:_e,ty:Ue}=F(we.transform);g=_e,p=Ue,document.addEventListener("mousemove",S),document.addEventListener("mouseup",E)},S=A=>{if(!o||!D)return;const se=A.clientX-c,G=A.clientY-u,fe=360,we=420;let _e=y,Ue=b,ra=g,H=p;if(d==="move"){ra=g+se,H=p+G,C(D,ra,H);return}if(d.includes("right")&&(_e=Math.max(fe,y+se)),d.includes("bottom")&&(Ue=Math.max(we,b+G)),d.includes("left")){const Ge=y-se;Ge<fe?(_e=fe,ra=g+(y-fe)):(_e=Ge,ra=g+se)}if(d.includes("top")){const Ge=b-G;Ge<we?(Ue=we,H=p+(b-we)):(Ue=Ge,H=p+G)}D.style.width=`${_e}px`,D.style.height=`${Ue}px`,C(D,ra,H)},E=()=>{o=!1,d="",D=null,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",E)},x=e.ref([]),k=e.ref(!1);e.watch(()=>r.images,async A=>{if(!Array.isArray(A)||A.length===0){x.value=[];return}k.value=!0;const se=[];for(const G of A)if(G.url&&!G.url.startsWith("blob:")&&!G.url.startsWith("http"))try{const fe=await Fl.downloadFile(G.url),we=URL.createObjectURL(fe);se.push({...G,blobUrl:we})}catch(fe){console.error(`Failed to load image for preview: ${G.url}`,fe),se.push({...G,blobUrl:""})}else se.push({...G,blobUrl:G.url});x.value=se,k.value=!1},{deep:!0,immediate:!0});const _=e.ref(0),I=e.ref(null),R=e.ref(null),ae=e.computed(()=>x.value[_.value]||null),X=()=>{if(!x.value.length){_.value=0;return}if(r.defaultImageName){const A=x.value.findIndex(se=>(se==null?void 0:se.name)===r.defaultImageName);_.value=A>=0?A:0}else _.value=0},me=A=>{if(!x.value.length)return;const se=Math.max(0,Math.min(A,x.value.length-1));_.value=se},ue=()=>me(_.value-1),U=()=>me(_.value+1),W=A=>{if(!A)return;const se=x.value.findIndex(G=>(G==null?void 0:G.name)===A);se>=0&&(_.value=se)},Z=()=>{if(!R.value)return;const A=R.value.parentElement;if(!A)return;const se=A.getBoundingClientRect();R.value.width=se.width,R.value.height=se.height},Q=()=>{var fe,we;if(!R.value||!I.value||!r.focusedFieldName){R.value&&Bi(R.value);return}const A=(fe=I.value.$el)==null?void 0:fe.querySelector("img");if(!A)return;if(!A.complete||A.naturalWidth===0){A.onload=()=>{e.nextTick(()=>{Q()})};return}const se=((we=ae.value)==null?void 0:we.name)||"",G=ys(r.fieldMeta,r.focusedFieldName);if(!G){Bi(R.value);return}if(G.imageName!==se){Bi(R.value);return}Z(),ud(R.value,A,G.bboxNorm)},ve=()=>{e.nextTick(()=>{Z(),Q()})};e.watch(()=>r.focusedFieldName,()=>{if(!i.value)return;const A=ys(r.fieldMeta,r.focusedFieldName);A!=null&&A.imageName&&W(A.imageName),e.nextTick(()=>{Q()})}),e.watch(()=>{var A;return(A=ae.value)==null?void 0:A.name},()=>{i.value&&e.nextTick(()=>{R.value&&Bi(R.value),Q()})}),e.watch(()=>r.visible,A=>{A?(X(),e.nextTick(()=>{Z(),Q()})):R.value&&Bi(R.value)}),e.watch(()=>r.defaultImageName,()=>{i.value&&X()});let Ae=null;e.onMounted(()=>{var A;typeof ResizeObserver<"u"&&(Ae=new ResizeObserver(()=>{Z(),e.nextTick(()=>{Q()})}),(A=R.value)!=null&&A.parentElement&&Ae.observe(R.value.parentElement))}),e.onUnmounted(()=>{Ae&&(Ae.disconnect(),Ae=null),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",E)});const te=()=>{R.value&&Bi(R.value),n("update:visible",!1),n("close")};return(A,se)=>{var Ue,ra;const G=e.resolveComponent("el-button"),fe=e.resolveComponent("el-image"),we=e.resolveComponent("Loading"),_e=e.resolveComponent("el-icon");return i.value?(e.openBlock(),e.createElementBlock("div",dd,[se[12]||(se[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",pd,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(L,["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:te},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:se[0]||(se[0]=e.withModifiers(H=>O(H,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:se[1]||(se[1]=e.withModifiers(H=>O(H,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:se[2]||(se[2]=e.withModifiers(H=>O(H,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:se[3]||(se[3]=e.withModifiers(H=>O(H,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:se[4]||(se[4]=e.withModifiers(H=>O(H,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:se[5]||(se[5]=e.withModifiers(H=>O(H,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:se[6]||(se[6]=e.withModifiers(H=>O(H,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:se[7]||(se[7]=e.withModifiers(H=>O(H,"bottom-right"),["stop"]))},null,32),ae.value?(e.openBlock(),e.createElementBlock("div",fd,[e.createElementVNode("div",hd,[e.createElementVNode("div",vd,[e.createElementVNode("span",md,e.toDisplayString(ae.value.name?ae.value.name+(ae.value.url&&ae.value.url.lastIndexOf(".")!==-1?ae.value.url.substring(ae.value.url.lastIndexOf(".")):""):""),1)]),x.value.length>1?(e.openBlock(),e.createElementBlock("div",yd,[e.createVNode(G,{size:"small",disabled:_.value===0,onClick:ue},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",gd,e.toDisplayString(_.value+1)+" / "+e.toDisplayString(x.value.length),1),e.createVNode(G,{size:"small",disabled:_.value===x.value.length-1,onClick:U},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),x.value.length>1?(e.openBlock(),e.createElementBlock("div",bd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(H,Ge)=>(e.openBlock(),e.createElementBlock("div",{key:(H.name||"")+"-"+Ge,class:e.normalizeClass(["img-thumb-item",{active:Ge===_.value}]),onClick:Me=>me(Ge)},[H!=null&&H.blobUrl?(e.openBlock(),e.createBlock(fe,{key:0,src:H.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[H.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",xd,"加载失败")),e.createElementVNode("div",wd,e.toDisplayString(H.name||"-"),1)],10,kd))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",_d,[k.value?(e.openBlock(),e.createElementBlock("div",Sd,[e.createVNode(_e,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(we)]),_:1}),se[11]||(se[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(Ue=ae.value)!=null&&Ue.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(fe,{ref_key:"imageRef",ref:I,src:ae.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[ae.value.blobUrl],onLoad:ve},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:R,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",Ed,[(ra=ae.value)!=null&&ra.url?(e.openBlock(),e.createElementBlock("span",Cd,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",Dd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",Td,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),Nd=fr._export_sfc(Bd,[["__scopeId","data-v-48a4ecb1"]]),Ad={class:"cert-preview-body"},zd={key:0,class:"pdf-preview-container"},Md={class:"thumbs"},Id=["onClick"],Od={class:"thumb-img"},Ld=["src"],Rd={key:1,class:"thumb-loading"},$d={class:"thumb-title"},Vd={class:"viewer"},Fd={key:0,class:"viewer-img-wrap"},Pd=["src"],jd={key:1,class:"viewer-loading"},Hd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(""),o=e.ref(""),d=e.computed(()=>(r.versions||[]).find(m=>String(m.versionId)===String(i.value))),c=e.ref({}),u=e.ref(""),y=e.ref("证书附件.pdf"),b=()=>{try{Object.values(c.value||{}).forEach(m=>{m&&URL.revokeObjectURL(m)}),u.value&&URL.revokeObjectURL(u.value)}catch{}c.value={},u.value=""},g=async m=>{if(!m||m.fileType==="pdf")return;const F=Array.isArray(m.images)?m.images:[];for(const C of F){const L=C==null?void 0:C.url;if(!(!L||c.value[L]))try{const O=await z.platformDownloadFile({url:L}),S=URL.createObjectURL(O.data);c.value={...c.value,[L]:S}}catch{}}},p=async m=>{var C;if(!m||m.fileType!=="pdf"){u.value="";return}const F=m.sourceUrl||"";if(!F){u.value="";return}if(u.value){try{URL.revokeObjectURL(u.value)}catch{}u.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:F,versionId:m==null?void 0:m.versionId,certNo:m==null?void 0:m.certNo});const L=await z.platformDownloadFile({url:F});console.log("[CertificatePreview] PDF响应:",{url:F,status:L==null?void 0:L.status,size:(C=L==null?void 0:L.data)==null?void 0:C.size});const O=URL.createObjectURL(L.data);u.value=O;const S=m.certNo?String(m.certNo):"";y.value=S?`${S}.pdf`:"证书附件.pdf"}catch(L){console.error("[CertificatePreview] PDF加载失败:",{url:F,error:L}),u.value=""}};e.watch(()=>r.visible,async m=>{var C;if(!m){b();return}const F=(C=r.versions)==null?void 0:C[0];i.value=(F==null?void 0:F.versionId)||"",await g(F),await p(F)},{immediate:!0}),e.watch(()=>i.value,async()=>{var F,C;const m=d.value;if(!m){o.value="",u.value="";return}if(m.fileType==="pdf"){o.value="",await p(m);return}u.value="",o.value=((C=(F=m.images)==null?void 0:F[0])==null?void 0:C.url)||"",await g(m)},{immediate:!0});const D=()=>{n("update:visible",!1),b()};return e.onBeforeUnmount(()=>{b()}),(m,F)=>{const C=e.resolveComponent("el-empty"),L=e.resolveComponent("el-tab-pane"),O=e.resolveComponent("el-tabs"),S=e.resolveComponent("el-button"),E=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(E,{"model-value":m.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:D},{footer:e.withCtx(()=>[e.createVNode(S,{id:"themeBorderButton",onClick:D},{default:e.withCtx(()=>F[1]||(F[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[m.versions&&m.versions.length>0?(e.openBlock(),e.createBlock(O,{key:0,modelValue:i.value,"onUpdate:modelValue":F[0]||(F[0]=x=>i.value=x),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.versions,x=>(e.openBlock(),e.createBlock(L,{key:x.versionId,name:x.versionId,label:x.label},{default:e.withCtx(()=>[e.createElementVNode("div",Ad,[x.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",zd,[u.value?(e.openBlock(),e.createBlock(ul.SsFilePreview,{key:1,fileName:y.value,blobUrl:u.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(C,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Md,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.images||[],k=>(e.openBlock(),e.createElementBlock("div",{key:k.url,class:e.normalizeClass(["thumb",{active:k.url===o.value}]),onClick:_=>o.value=k.url},[e.createElementVNode("div",Od,[c.value[k.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[k.url]},null,8,Ld)):(e.openBlock(),e.createElementBlock("div",Rd,"加载中"))]),e.createElementVNode("div",$d,e.toDisplayString(k.name),1)],10,Id))),128))]),e.createElementVNode("div",Vd,[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[o.value]?(e.openBlock(),e.createElementBlock("div",Fd,[e.createElementVNode("img",{class:"viewer-img",src:c.value[o.value]},null,8,Pd)])):(e.openBlock(),e.createElementBlock("div",jd,"加载中"))],64)):(e.openBlock(),e.createBlock(C,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(C,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),Ud=fr._export_sfc(Hd,[["__scopeId","data-v-220703c0"]]),qd={class:"ocr-candidate-wrap"},Wd={class:"ocr-candidate-left"},Gd={key:1},Kd={key:0},Yd={key:1},Jd={key:2},Xd={key:3},Zd={key:0,class:"ocr-candidate-right"},Qd={class:"ocr-candidate-actions"},ep={key:1},ap={class:"dialog-footer"},lp={__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 r=(_=[])=>{const I=[],R=ae=>{(ae||[]).forEach(X=>{if(!X)return;const me=X.children||X.childrens||X.columns;Array.isArray(me)&&me.length>0?R(me):I.push(X)})};return R(_),I},n=a,i=l,o=e.computed(()=>{var _;return((_=p.value)==null?void 0:_.allowAdd)!==!1}),d=e.computed(()=>{var _;return((_=p.value)==null?void 0:_.allowReplace)!==!1}),c=_=>{if(!_)return[];if(Array.isArray(_))return _;if(typeof _=="string")try{const I=JSON.parse(_);return Array.isArray(I)?I:[]}catch{return[]}return[]},u=_=>{i("preview-file",_)},y=e.ref([]),b=e.ref(0),g=e.ref("");e.watch(()=>n.candidates,_=>{var I,R;y.value=(_||[]).map(ae=>({...ae,...(ae==null?void 0:ae.ocrRow)||{},selectedTargetId:(ae==null?void 0:ae.selectedTargetId)||"",__decision:ae==null?void 0:ae.__decision})),b.value=0,g.value=((R=(I=y.value)==null?void 0:I[0])==null?void 0:R.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>n.visible,_=>{var I,R;_&&(b.value=0,g.value=((R=(I=y.value)==null?void 0:I[0])==null?void 0:R.selectedTargetId)||"")});const p=e.computed(()=>{var I;const _=Number(b.value||0);return((I=y.value||[])==null?void 0:I[_])||null}),D=e.computed(()=>(r(n.columns||[])||[]).filter(R=>R&&R.prop).filter(R=>R.type!=="operate"&&R.label!=="操作"&&R.prop!=="operate")),m=e.computed(()=>D.value.filter(_=>_.label!=="证书附件"&&_.prop!=="证书附件")),F=_=>{if(!_)return;const I=(y.value||[]).findIndex(R=>(R==null?void 0:R.idx)===(_==null?void 0:_.idx));I>-1&&(b.value=I,g.value=(_==null?void 0:_.selectedTargetId)||"")},C=_=>{if(!_){g.value="";return}g.value=String((_==null?void 0:_.id)??"")},L=(_,I="")=>{const R=Number(b.value||0),ae=y.value||[],X=ae[R];X&&(X.__decision=_,X.selectedTargetId=I,g.value=I,y.value=[...ae])},O=()=>L("skip",""),S=()=>L("add",""),E=()=>{if(!g.value){Xa.ElMessage.warning("请先选择要替换的目标记录");return}L("replace",g.value)},x=()=>{i("update:visible",!1)},k=()=>{const _=y.value||[];if(_.find(R=>(R==null?void 0:R.__decision)==="replace"&&!(R!=null&&R.selectedTargetId))){Xa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}i("submit",_),i("update:visible",!1)};return(_,I)=>{const R=e.resolveComponent("el-table-column"),ae=e.resolveComponent("svg-icon"),X=e.resolveComponent("el-table"),me=e.resolveComponent("el-button"),ue=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(Vr.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:x},{default:e.withCtx(()=>{var U,W;return[e.createElementVNode("div",qd,[e.createElementVNode("div",Wd,[I[0]||(I[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(X,{data:y.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:F},{default:e.withCtx(()=>[e.createVNode(R,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,Z=>(e.openBlock(),e.createBlock(R,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:Q})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(Q==null?void 0:Q[Z.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ve=>u({row:Q,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Gd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((Q==null?void 0:Q[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(R,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:Z})=>[e.createTextVNode(e.toDisplayString(((Z==null?void 0:Z.candidates)||[]).length),1)]),_:1}),e.createVNode(R,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:Z})=>[(Z==null?void 0:Z.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Kd,"替换")):(Z==null?void 0:Z.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Yd,"新增")):(Z==null?void 0:Z.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Jd,"跳过")):(e.openBlock(),e.createElementBlock("span",Xd,"未处理"))]),_:1})]),_:1},8,["data"])]),y.value&&y.value.length>0?(e.openBlock(),e.createElementBlock("div",Zd,[I[4]||(I[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Qd,[e.createVNode(me,{id:"themeBorderButton",onClick:O},{default:e.withCtx(()=>I[1]||(I[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(me,{id:"themeBorderButton",onClick:S,disabled:!o.value},{default:e.withCtx(()=>I[2]||(I[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(me,{class:"ok-button",id:"themeButton",onClick:E,disabled:!d.value||!g.value},{default:e.withCtx(()=>I[3]||(I[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((U=p.value)==null?void 0:U.candidates)||[]).length===0?(e.openBlock(),e.createBlock(ue,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(X,{data:((W=p.value)==null?void 0:W.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:C,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(R,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,Z=>(e.openBlock(),e.createBlock(R,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:Q})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(Q==null?void 0:Q[Z.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ve=>u({row:Q,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",ep,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((Q==null?void 0:Q[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",ap,[e.createVNode(me,{id:"themeBorderButton",onClick:x},{default:e.withCtx(()=>I[5]||(I[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(me,{class:"ok-button",id:"themeButton",onClick:k},{default:e.withCtx(()=>I[6]||(I[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},rp=fr._export_sfc(lp,[["__scopeId","data-v-89e0489c"]]),np={class:"ocr-preview-content"},ip={class:"ocr-preview-tip"},op={class:"ocr-preview-table"},tp={style:{display:"flex","align-items":"center",gap:"8px"}},sp={class:"dialog-footer"},cp={__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 r=a,n=l,i=e.ref([]),o=e.ref([]),d=e.ref([]);e.watch(()=>r.visible,D=>{D&&(i.value=JSON.parse(JSON.stringify(r.ocrPreviewData)),o.value=JSON.parse(JSON.stringify(r.ocrPreviewColumns)),d.value=[...r.ocrSelectedFields])});const c=(D,m)=>{const F=[...d.value];if(m)F.includes(D)||F.push(D);else{const C=F.indexOf(D);C>-1&&F.splice(C,1)}d.value=F,n("update:ocrSelectedFields",F)},u=(D,m,F)=>{n("fieldChange",{rowIndex:D,prop:m,value:F})},y=()=>{n("update:ocrPreviewData",i.value),n("confirm",i.value),n("update:visible",!1)},b=()=>{n("update:visible",!1)},g=D=>typeof D!="number"?"-":`${(D*100).toFixed(1)}%`,p=D=>typeof D!="number"?"#606266":D>=.9?"#67c23a":D>=.7?"#e6a23c":"#f56c6c";return(D,m)=>{const F=e.resolveComponent("el-alert"),C=e.resolveComponent("el-table-column"),L=e.resolveComponent("el-checkbox"),O=e.resolveComponent("el-input"),S=e.resolveComponent("el-table"),E=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Vr.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:b,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",np,[e.createElementVNode("div",ip,[e.createVNode(F,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",op,[e.createVNode(S,{data:i.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(C,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,x=>(e.openBlock(),e.createBlock(C,{key:x.prop,prop:x.prop,"min-width":x.minWidth||230,"class-name":x.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",tp,[x.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L,{key:0,"model-value":d.value.includes(x.prop),onChange:k=>c(x.prop,k),onClick:m[0]||(m[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(x.label),1)])]),default:e.withCtx(({row:k,$index:_})=>[x.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:p(k[x.prop]),fontWeight:500})},e.toDisplayString(g(k[x.prop])),5)):(e.openBlock(),e.createBlock(O,{key:1,modelValue:k[x.prop],"onUpdate:modelValue":I=>k[x.prop]=I,size:"small",placeholder:"请输入"+x.label,onChange:I=>u(_,x.prop,I)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",sp,[e.createVNode(E,{onClick:b,id:"themeBorderButton"},{default:e.withCtx(()=>m[1]||(m[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(E,{class:"ok-button",onClick:y,id:"themeButton"},{default:e.withCtx(()=>m[2]||(m[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},up=fr._export_sfc(cp,[["__scopeId","data-v-df66eb1f"]]),ri=a=>{var n;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 r=(n=re.analyzeSplitToContent(l,","))==null?void 0:n.map(i=>((i==null?void 0:i[(i==null?void 0:i.length)-1])===","&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),vn(i)));return r=r==null?void 0:r.join(","),r};function vc(a){return Xa.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function dp(a){return Xa.axios.get(a,{responseType:"blob"})}let dr="$R",pp="http://222.92.178.198:55002/AIRobot",yt=["Form","BarChart","FormText","FormBlock"];const St=a=>{var r,n;let l=(n=re.analyzeSplitToContent(a,"@"))==null?void 0:n[((r=re.analyzeSplitToContent(a,"@"))==null?void 0:r.length)-1];return!!(yt!=null&&yt.some(i=>l==null?void 0:l.includes(i)))},fp=async(a,l,r,n)=>{var o,d,c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me;let i=a;if(St(i==null?void 0:i[0])){let Le=gc(i),Ie=(o=Le==null?void 0:Le.filter)==null?void 0:o.join(","),de=[];(d=Le==null?void 0:Le.hideContents)==null||d.forEach(Sa=>{if(Sa){const We=Sa;We&&de.push(`(HideGroup=Yes, prop=${We})`)}});let De=(c=Le==null?void 0:Le.formContents)==null?void 0:c.filter(Sa=>{var We;return(We=Sa==null?void 0:Sa.filters)==null?void 0:We.includes("@ShowHide=Hide")});(De==null?void 0:De.length)>0&&(De==null||De.forEach(Sa=>{if(Sa){const We=Sa==null?void 0:Sa.prop;We&&de.push(`(Hide=Yes, prop=${We})`)}}));let Je=(n==null?void 0:n.menuFilter)??[];return Array.isArray(Je)||(Je=Je?[Je]:[]),Je=[...Je,...de],Ie===""&&((u=Le==null?void 0:Le.formContents)==null?void 0:u.length)===0?void 0:{key:"Form",name:Le==null?void 0:Le.groupName,value:Le==null?void 0:Le.formContents,contents:Array.isArray((y=Le==null?void 0:Le.contents)==null?void 0:y[0])&&((g=(b=Le==null?void 0:Le.contents)==null?void 0:b[0])!=null&&g.every(Sa=>Array.isArray(Sa)))?[(D=(p=Le==null?void 0:Le.contents)==null?void 0:p[0])==null?void 0:D[r]]:[Le==null?void 0:Le.contents],filter:"("+Ie+")",menuFilter:Je,groupFilter:Le==null?void 0:Le.groupFilters}}else if(((m=i==null?void 0:i[0])==null?void 0:m[0])!=="&"){let Le=bc(i,n),Ie="";(F=Le==null?void 0:Le.tableFilter)!=null&&F.includes(dr)?Le.tableFilter=(C=Le==null?void 0:Le.tableFilter)==null?void 0:C.replace(dr,""):Ie=(S=(O=(L=Le==null?void 0:Le.tableFilter)==null?void 0:L.replace("(",dr))==null?void 0:O.split(dr))==null?void 0:S[0];let de=[];Le!=null&&Le.tableFilter&&((E=re.analyzeSplitToContent(Le==null?void 0:Le.tableFilter,","))==null||E.forEach(Je=>{Je!=null&&Je.includes("@ShowHide=Hide")&&de.push("HideGroup=Yes")}));let De=(n==null?void 0:n.menuFilter)??[];return Array.isArray(De)||(De=De?[De]:[]),De=[...De,...de],{key:"Table",name:Le==null?void 0:Le.groupName,tableColumns:Le==null?void 0:Le.tableColumns,assistColumn:Le==null?void 0:Le.columns,tableContents:l===1?Le==null?void 0:Le.tableContents:(k=(x=Le==null?void 0:Le.tableContents)==null?void 0:x[r])!=null&&k.every(Je=>Array.isArray(Je))?(_=Le==null?void 0:Le.tableContents)==null?void 0:_[r]:[(I=Le==null?void 0:Le.tableContents)==null?void 0:I[r]],filter:Le==null?void 0:Le.tableFilter,menuFilter:De,quotePage:Ie!==""?((X=(ae=(R=Ie==null?void 0:Ie.replace("*",dr))==null?void 0:R.split(dr))==null?void 0:ae[0])==null?void 0:X.replaceAll(":","/"))??"":void 0,quoteGroup:Ie!==""?((ve=(Q=(Z=(W=(U=(ue=(me=Ie==null?void 0:Ie.replace("*",dr))==null?void 0:me.split(dr))==null?void 0:ue[1])==null?void 0:U.replace("{",dr))==null?void 0:W.split(dr))==null?void 0:Z[0])==null?void 0:Q.split(":"))==null?void 0:ve.filter(Je=>Je!==""))??[]:[],relatedQuotes:Le==null?void 0:Le.relatedQuotes,fatherSyncContents:Le==null?void 0:Le.fatherSyncContents,sonSyncContents:Le==null?void 0:Le.sonSyncContents,calculatorFilters:(Le==null?void 0:Le.calculatorFilters)??[]}}else{let Le=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Ie=i==null?void 0:i[0];Ie=Ie==null?void 0:Ie.slice(1,Ie==null?void 0:Ie.length),Ie=re.analyzeSplitToContent(Ie,":"),Ie=Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1];let de=[];de.push("1");let De=Ie==null?void 0:Ie.replace("(",dr);De=(Ae=De==null?void 0:De.split(dr))==null?void 0:Ae[0],de.push(De);let Je=Ie==null?void 0:Ie.replace("(",dr);if(Je=(te=Je==null?void 0:Je.split(dr))==null?void 0:te[1],Je=(se=(A=Je==null?void 0:Je.replace(")",dr))==null?void 0:A.split(dr))==null?void 0:se[0],(fe=(G=Je==null?void 0:Je.replace(",",dr))==null?void 0:G.split(dr))==null||fe.forEach(Sa=>{de.push(Sa)}),de.push(""),de.push(""),(we=de==null?void 0:de[2])!=null&&we.includes(".xlsx")||(_e=de==null?void 0:de[2])!=null&&_e.includes(".xls"))try{let Sa=pp+"/"+(de==null?void 0:de[2]),We=await dp(Sa),V=`生成js函数名称为${de==null?void 0:de[1]}的函数,规则为:`+(de==null?void 0:de[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((We==null?void 0:We.status)===200){let P=We==null?void 0:We.data;const le=new FormData;le.append("file",P,de==null?void 0:de[2]),le.append("query",V);let ce=await vc(le);ce=(H=(ra=(Ue=ce==null?void 0:ce.data)==null?void 0:Ue.data)==null?void 0:ra.response)==null?void 0:H.replace("generateResult",de==null?void 0:de[1]),de[de.length-2]=ce,de[de.length-1]=[{name:(Me=(Ge=de==null?void 0:de[2])==null?void 0:Ge.split("."))==null?void 0:Me[0],url:Sa}]}}catch{}return de=[de],{key:"Method",name:[],tableContents:de,tableColumns:Le}}},hp=(a,l)=>{var n,i,o,d,c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa;let r=(i=(n=re.analyzeSplitToContent(a,"="))==null?void 0:n.filter(We=>We!=="="))==null?void 0:i.map(We=>((We==null?void 0:We[(We==null?void 0:We.length)-1])==="="&&(We=We==null?void 0:We.slice(0,(We==null?void 0:We.length)-1)),We));if(St(r==null?void 0:r[1])||St(r==null?void 0:r[0])){let We=kp(r);if(We!=null&&We.formContents){let he=(o=We==null?void 0:We.filter)==null?void 0:o.join(","),ua=[];(d=We==null?void 0:We.hideContents)==null||d.forEach(va=>{if(va){const Ea=va;Ea&&ua.push(`(HideGroup=Yes, prop=${Ea})`)}});let ia=(c=We==null?void 0:We.formContents)==null?void 0:c.filter(va=>{var Ea;return(Ea=va==null?void 0:va.filters)==null?void 0:Ea.includes("@ShowHide=Hide")});(ia==null?void 0:ia.length)>0&&(ia==null||ia.forEach(va=>{if(va){const Ea=va==null?void 0:va.prop;Ea&&ua.push(`(Hide=Yes, prop=${Ea})`)}}));let Ve=(l==null?void 0:l.menuFilter)??[];return Array.isArray(Ve)||(Ve=Ve?[Ve]:[]),Ve=[...Ve,...ua],he===""&&((u=We==null?void 0:We.formContents)==null?void 0:u.length)===0?void 0:{key:"Form",name:We==null?void 0:We.groupName,value:We==null?void 0:We.formContents,contents:[We==null?void 0:We.contents],filter:"("+he+")",menuFilter:Ve,groupFilter:We==null?void 0:We.groupFilters,calculatorFilters:We==null?void 0:We.calculatorFilters}}let V=(g=(b=(y=We==null?void 0:We.filter)==null?void 0:y.replace("@",dr))==null?void 0:b.split(dr))==null?void 0:g[0],P=(m=(D=(p=We==null?void 0:We.filter)==null?void 0:p.replace("(",dr))==null?void 0:D.split(dr))==null?void 0:m[1],le=(L=(C=(F=We==null?void 0:We.filter)==null?void 0:F.replace("(",dr))==null?void 0:C.split(dr))==null?void 0:L[0];le="@"+((O=le==null?void 0:le.split("@"))==null?void 0:O[1]),P=P==null?void 0:P.slice(0,(P==null?void 0:P.length)-1),P=(E=(S=re.analyzeSplitToContent(P,","))==null?void 0:S.map(he=>(he=le+he,he)))==null?void 0:E.join("");let ce=V+"("+P+")";return{key:"Form",name:We==null?void 0:We.group,filter:ce,formPage:((_=(k=(x=V==null?void 0:V.replace("*",dr))==null?void 0:x.split(dr))==null?void 0:k[0])==null?void 0:_.replaceAll(":","/"))??"",formGroup:((U=(ue=(me=(X=(ae=(R=(I=V==null?void 0:V.replace("*",dr))==null?void 0:I.split(dr))==null?void 0:R[1])==null?void 0:ae.replace("{",dr))==null?void 0:X.split(dr))==null?void 0:me[0])==null?void 0:ue.split(":"))==null?void 0:U.filter(he=>he!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter,contents:[]}}else{let We=r==null?void 0:r.filter((ia,Ve)=>Ve!==0);We=We==null?void 0:We.join("");let V=bc(r,l,We),P="";(W=V==null?void 0:V.tableFilter)!=null&&W.includes(dr)?V.tableFilter=(Z=V==null?void 0:V.tableFilter)==null?void 0:Z.replace(dr,""):P=(Ae=(ve=(Q=V==null?void 0:V.tableFilter)==null?void 0:Q.replace("(",dr))==null?void 0:ve.split(dr))==null?void 0:Ae[0];let le=(se=(A=(te=V==null?void 0:V.tableFilter)==null?void 0:te.replace("(",dr))==null?void 0:A.split(dr))==null?void 0:se[0];le=[{menus:(fe=(G=le==null?void 0:le.split("*"))==null?void 0:G[0])==null?void 0:fe.replaceAll(":","/"),groups:((_e=(we=le==null?void 0:le.split("*"))==null?void 0:we[1])==null?void 0:_e.split(":"))??[]}];let ce=(H=(ra=(Ue=V==null?void 0:V.tableFilter)==null?void 0:Ue.replace("(",dr))==null?void 0:ra.split(dr))==null?void 0:H[1];(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));let he=[];V!=null&&V.tableFilter&&((Ge=re.analyzeSplitToContent(V==null?void 0:V.tableFilter,","))==null||Ge.forEach(ia=>{ia!=null&&ia.includes("@ShowHide=Hide")&&he.push("HideGroup=Yes")}));let ua=(l==null?void 0:l.menuFilter)??[];return Array.isArray(ua)||(ua=ua?[ua]:[]),ua=[...ua,...he],{key:"Table",name:V==null?void 0:V.groupName,filter:V==null?void 0:V.tableFilter,tableColumns:V==null?void 0:V.tableColumns,tableContents:V==null?void 0:V.tableContents,quotePage:P!==""?((Ie=(Le=(Me=P==null?void 0:P.replace("*",dr))==null?void 0:Me.split(dr))==null?void 0:Le[0])==null?void 0:Ie.replaceAll(":","/"))??"":void 0,quoteGroup:P!==""?((Sa=(Je=(De=(de=P==null?void 0:P.replace("*",dr))==null?void 0:de.split(dr))==null?void 0:De[1])==null?void 0:Je.split(":"))==null?void 0:Sa.filter(ia=>ia!==""))??[]:[],menuFilter:ua,relatedQuotes:le,fatherSyncContents:(V==null?void 0:V.fatherSyncContents)??[],sonSyncContents:(V==null?void 0:V.sonSyncContents)??[],calculatorFilters:(V==null?void 0:V.calculatorFilters)??[]}}},vp=async(a,l)=>{let r=[],n=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(i,o)=>{let d=[];i=i==null?void 0:i.map(async c=>{var u,y;if(d.push(c),((u=re.analyzeSplitToContent(a,"="))==null?void 0:u.length)<=2){if(((y=re.analyzeSplitToContent(a,"="))==null?void 0:y.length)!==0){const b=await fp(re.analyzeSplitToContent(a,"="),n,o,c);b&&d.push(b)}}else d.push(hp(a,c))}),await Promise.all(i),r.push(d)}),await Promise.all(l),r};let Wi="/",mp="$",zn="$R";const mc=a=>{var r,n,i;let l="";if((a==null?void 0:a.length)>1){let o=a==null?void 0:a.filter((d,c)=>c!==0);o=o==null?void 0:o.join(""),o=re.analyzerSplitToWord(o,")"),(o==null?void 0:o.length)!==1?(o==null?void 0:o[(o==null?void 0:o.length)-1])===")"?o=o==null?void 0:o.join(""):o=(r=o==null?void 0:o.filter((d,c)=>c!==(o==null?void 0:o.length)-1))==null?void 0:r.join(""):o=o==null?void 0:o[0],l="("+o,((i=a==null?void 0:a[0])==null?void 0:i[((n=a==null?void 0:a[0])==null?void 0:n.length)-2])==="@"&&(l="@"+l)}return{filter:l}},yc=(a,l=[])=>{let r=(a==null?void 0:a.map(o=>{var d,c;return(c=o==null?void 0:o.key)==null?void 0:c.slice(1,(d=o==null?void 0:o.key)==null?void 0:d.length)}))??[],n=[];r==null||r.forEach(o=>{var d,c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me;if(o===""&&(o="算法库:通用算法"),o!=null&&o.includes(mp)){let ue="",U=!0,W=re.analyzerSplitToWord(o,"(");(W==null?void 0:W.length)>1&&(ue="("+((d=re.analyzerSplitToWord(W==null?void 0:W[1],")"))==null?void 0:d[0]),((u=W==null?void 0:W[0])==null?void 0:u[((c=W==null?void 0:W[0])==null?void 0:c.length)-2])==="@"&&(ue="@"+ue));let Z=o;Z=Z==null?void 0:Z.replace(ue,""),ue=vn(ue),ue=(y=re.analyzeSplitToContent(ue,","))==null?void 0:y.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)),ue!=null&&ue.includes("@ShowHide=Hide")&&(U=!1);let Q=(b=Z==null?void 0:Z.replace("$",zn))==null?void 0:b.split(zn),ve=Q==null?void 0:Q[1],Ae=Q==null?void 0:Q[0];Ae!=null&&Ae.includes("[")&&(Ae=(p=(g=Ae==null?void 0:Ae.replace("[",zn))==null?void 0:g.split(zn))==null?void 0:p[0],ve=ve+":["+((F=(m=(D=Q==null?void 0:Q[0])==null?void 0:D.replace("[",zn))==null?void 0:m.split(zn))==null?void 0:F[1])),Ae=(L=(C=Ae==null?void 0:Ae.replaceAll(":","/"))==null?void 0:C.replaceAll("{",""))==null?void 0:L.replaceAll("}",""),(Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1])!=="/"&&(Ae=Ae+"/"),ve=((O=Ae==null?void 0:Ae.split("/"))==null?void 0:O[0])+":"+ve;let A="";if(!(ve!=null&&ve.includes("[")))A=ve==null?void 0:ve.replaceAll(":","/"),n==null||n.push({path:A,isShow:U,filter:ue,fatherPath:Ae});else{let se=(E=(S=ve==null?void 0:ve.replace("[",zn))==null?void 0:S.split(zn))==null?void 0:E[1];se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1),se=(x=re.analyzeSplitToContent(se,","))==null?void 0:x.map(G=>((G==null?void 0:G[(G==null?void 0:G.length)-1])===","&&(G=G==null?void 0:G.slice(0,(G==null?void 0:G.length)-1)),G)),se==null||se.forEach(G=>{var fe,we;A=((we=(fe=ve==null?void 0:ve.replace("[",zn))==null?void 0:fe.split(zn))==null?void 0:we[0])+G,A=A==null?void 0:A.replaceAll(":","/"),n==null||n.push({path:A,isShow:U,filter:ue,fatherPath:Ae})})}}else{let ue="",U=!0,W=re.analyzerSplitToWord(o,"(");(W==null?void 0:W.length)>1&&(ue=(k=mc(W))==null?void 0:k.filter);let Z=o;if(Z=Z==null?void 0:Z.replace(ue,""),(ue==null?void 0:ue[0])==="("){ue=ue==null?void 0:ue.slice(1,(ue==null?void 0:ue.length)-1);let ve=[];(_=re.analyzeSplitToContent(ue,","))==null||_.forEach(Ae=>{(Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1])===","&&(Ae=Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1)),(Ae==null?void 0:Ae[0])==="("&&(Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1)),(Ae==null?void 0:Ae[0])!=="@"&&(Ae="@"+Ae),ve.push(vn(Ae))}),ue=ve==null?void 0:ve.join(",")}else ue=vn(ue);ue=(I=re.analyzeSplitToContent(ue,","))==null?void 0:I.map(ve=>((ve==null?void 0:ve[(ve==null?void 0:ve.length)-1])===","&&(ve=ve==null?void 0:ve.slice(0,(ve==null?void 0:ve.length)-1)),ve)),ue!=null&&ue.includes("@ShowHide=Hide")&&(U=!1),(Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])==="}"&&(Z=Z+":"),Z=(R=Z==null?void 0:Z.replaceAll("{",""))==null?void 0:R.replaceAll("}","");let Q="";if(Z!=null&&Z.includes("[")){let ve=(ae=Z==null?void 0:Z.replace("[",zn))==null?void 0:ae.split(zn),Ae=ve==null?void 0:ve[1];Ae=Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1),(me=(X=re.analyzeSplitToContent(Ae,","))==null?void 0:X.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te)))==null||me.forEach(te=>{Q=(ve==null?void 0:ve[0])+te,Q=Q==null?void 0:Q.replaceAll(":","/"),n==null||n.push({path:Q,isShow:U,filter:ue})})}else Q=Z==null?void 0:Z.replaceAll(":","/"),n==null||n.push({path:Q,isShow:U,filter:ue})}});let i=z.cloneDeep(n);return(l==null?void 0:l.length)>0&&(i=l),i=i==null?void 0:i.filter(o=>{var d,c,u,y;return!(o!=null&&o.fatherPath)&&((c=(d=o==null?void 0:o.path)==null?void 0:d.split(Wi))==null?void 0:c.length)>1&&((y=(u=o==null?void 0:o.path)==null?void 0:u.split(Wi))==null?void 0:y[1])===""}),i=i==null?void 0:i.map(o=>{var d;return o.path=(d=o.path)==null?void 0:d.replace(Wi,""),o.path}),(i==null?void 0:i.length)>0&&(n=n==null?void 0:n.map(o=>{var c,u,y,b,g,p,D;let d=i==null?void 0:i.find(m=>{var F;return(F=o==null?void 0:o.path)==null?void 0:F.includes(m)});return!(o!=null&&o.fatherPath)&&d&&!((c=o==null?void 0:o.path)!=null&&c.includes(Wi))&&!(i!=null&&i.find(m=>(o==null?void 0:o.path)===m))&&(o.path=d+Wi+((D=(y=(u=o==null?void 0:o.path)==null?void 0:u.split(d))==null?void 0:y[1])==null?void 0:D.slice(1,(p=(g=(b=o==null?void 0:o.path)==null?void 0:b.split(d))==null?void 0:g[1])==null?void 0:p.length))),o})),n},yp=(a,l)=>yc([{key:a}],l),gp=async(a,l)=>{const r=[],n=yp(a==null?void 0:a.key,l);return n&&(n==null?void 0:n.length)>0&&(n==null||n.forEach(o=>{r.push([{key:"path",value:o==null?void 0:o.path,parentPath:(o==null?void 0:o.parentPath)??"",isShow:o==null?void 0:o.isShow,menuFilter:o==null?void 0:o.filter}])})),await vp(a==null?void 0:a.value,r)};let yl="$R",Yi="[Any]";const bp=a=>{var n;let l=[],r=a;return(n=re.chunkArray(r))==null||n.forEach(i=>{var y,b,g,p,D;let o="",d=[],c="";(i==null?void 0:i.length)>1&&(c="@"+(i==null?void 0:i[0]),c=vn(c));let u=(i==null?void 0:i.length)===1?i==null?void 0:i[0]:i==null?void 0:i[1];u=u==null?void 0:u.slice(1,u==null?void 0:u.length),o=(b=(y=u==null?void 0:u.replace("(",yl))==null?void 0:y.split(yl))==null?void 0:b[0],u=(p=(g=u==null?void 0:u.replace("(",yl))==null?void 0:g.split(yl))==null?void 0:p[1],u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1),d=(D=re.analyzeSplitToContent(u,","))==null?void 0:D.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)),l.push({functionName:o,functionRelatedWords:d,calculatorFilter:c})}),l},kp=a=>{var r,n,i;let l={};if(((r=a==null?void 0:a[1])==null?void 0:r[0])==="&"){let o=a==null?void 0:a[0],d=a==null?void 0:a[1];d=re.analyzeSplitToContent(d,":"),d!=null&&d[1]&&(d==null?void 0:d[1])!==""&&(o=o+":"+(d==null?void 0:d[1])),d=d==null?void 0:d[0],d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1),d=[d],o=[o],o=gc(o),l.filter=o==null?void 0:o.filter,l.contents=o==null?void 0:o.contents,l.formContents=o==null?void 0:o.formContents,l.groupFilters=o==null?void 0:o.groupFilters,l.groupName=o==null?void 0:o.groupName,l.hideContents=o==null?void 0:o.hideContents,l.calculatorFilters=bp(d)??[]}else{let 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)),d=d==null?void 0:d.split(":"),l.group=d;let c=a==null?void 0:a[1],u;c!=null&&c.includes("{")?u=(i=(n=c==null?void 0:c.replaceAll("{",""))==null?void 0:n.replaceAll("}",""))==null?void 0:i.replaceAll(Yi,""):u=c==null?void 0:c.replaceAll(Yi,""),(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),l.filter=u}return l},gc=a=>{var p,D,m,F,C,L;let l=[],r=[],n=[],i=[],o=[],d=[],c="",u=a==null?void 0:a[0];(u==null?void 0:u[0])==="*"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length));let y=re.analyzeSplitToContent(u,":");(p=y==null?void 0:y.filter(O=>(O==null?void 0:O[0])!=="{"&&(O==null?void 0:O[0])!=="["))==null||p.forEach(O=>{var E,x,k;(O==null?void 0:O[(O==null?void 0:O.length)-1])===":"&&(O=O==null?void 0:O.slice(0,(O==null?void 0:O.length)-1));let S=re.analyzerSplitToWord(O,"(");if((S==null?void 0:S.length)>1){c=(E=mc(S))==null?void 0:E.filter;let _=O==null?void 0:O.replace(c,"");if(n.push(_),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let I=[];(x=re.analyzeSplitToContent(c,","))==null||x.forEach(R=>{(R==null?void 0:R[(R==null?void 0:R.length)-1])===","&&(R=R==null?void 0:R.slice(0,(R==null?void 0:R.length)-1)),(R==null?void 0:R[0])==="("&&(R=R==null?void 0:R.slice(1,(R==null?void 0:R.length)-1)),(R==null?void 0:R[0])!=="@"&&(R="@"+R),I.push(vn(R))}),c=I==null?void 0:I.join(",")}else c=vn(c);c=(k=re.analyzeSplitToContent(c,","))==null?void 0:k.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)),c!=null&&c.includes("@ShowHide=Hide")&&d.push(_),i=[...i,...c]}else n.push(S==null?void 0:S[0])});let b=(D=y==null?void 0:y.filter(O=>(O==null?void 0:O[0])==="{"))==null?void 0:D[0],g=(m=y==null?void 0:y.filter(O=>(O==null?void 0:O[0])==="["))==null?void 0:m[0];return l=Li(g??""),l!=null&&l.every(O=>Array.isArray(O))&&(l=[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)),o=(F=re.analyzeSplitToContent(b,"@"))==null?void 0:F[1],o="@"+o,b=b==null?void 0:b.replace(o,""),o=vn(o),o=(C=re.analyzeSplitToContent(o,","))==null?void 0:C.map(O=>((O==null?void 0:O[(O==null?void 0:O.length)-1])===","&&(O=O==null?void 0:O.slice(0,(O==null?void 0:O.length)-1)),O)),(b==null?void 0:b[0])==="{"&&(b=b==null?void 0:b.slice(1,(b==null?void 0:b.length)-1)),b=(L=re.analyzeSplitToContent(b,","))==null?void 0:L.map(O=>((O==null?void 0:O[(O==null?void 0:O.length)-1])===","&&(O=O==null?void 0:O.slice(0,(O==null?void 0:O.length)-1)),O)),b==null||b.forEach((O,S)=>{var Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We,V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja;let E=[],x=[],k=[],_="",I="",R=!1,ae,X=[],me=[],ue=[],U="Input",W=[],Z=[];if(O!=null&&O.includes("==")){ae=(Q=O==null?void 0:O.split("=="))==null?void 0:Q[0];let sa=(ve=O==null?void 0:O.split("=="))==null?void 0:ve[1],Fe="";((Ae=re.analyzeSplitToContent(sa,"$"))==null?void 0:Ae.length)>1&&((te=re.analyzeSplitToContent(sa,"$"))==null?void 0:te[0])!=="$"?(Fe=(A=re.analyzeSplitToContent(sa,"$"))==null?void 0:A[0],Fe=Fe==null?void 0:Fe.slice(0,(Fe==null?void 0:Fe.length)-1)):((se=re.analyzeSplitToContent(sa,"}"))==null?void 0:se.length)>1&&(Fe=(G=re.analyzeSplitToContent(sa,"}"))==null?void 0:G[1]);let ha=sa==null?void 0:sa.replace(Fe,"");if((Fe==null?void 0:Fe[0])==="("&&(Fe=Fe==null?void 0:Fe.slice(1,(Fe==null?void 0:Fe.length)-1)),(fe=re.analyzeSplitToContent(Fe,","))==null||fe.forEach(Qe=>{var $e;(Qe==null?void 0:Qe[0])!=="@"&&(Qe="@"+Qe),(Qe==null?void 0:Qe[(Qe==null?void 0:Qe.length)-1])===","&&(Qe=Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-1));let Oe=vn(Qe);($e=re.analyzeSplitToContent(Oe,","))==null||$e.forEach(ne=>{(ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])===","&&(ne=ne==null?void 0:ne.slice(0,(ne==null?void 0:ne.length)-1)),E.push(ne)})}),(ha==null?void 0:ha[0])==="$"&&(ha=ha==null?void 0:ha.slice(1,ha==null?void 0:ha.length)),ha!=null&&ha.includes("&")){let Qe=ha;if((ha==null?void 0:ha[0])==="("){let $e=(we=re.analyzeSplitToContent(ha,"&"))==null?void 0:we.map(ne=>((ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])==="&"&&(ne=ne==null?void 0:ne.slice(0,(ne==null?void 0:ne.length)-1)),ne));Qe=$e==null?void 0:$e[1],$e=$e==null?void 0:$e[0],($e==null?void 0:$e[0])!=="@"&&($e="@"+$e),_=vn($e)}(Qe==null?void 0:Qe[0])==="&"&&(Qe=Qe==null?void 0:Qe.slice(1,Qe==null?void 0:Qe.length)),I=(Ue=(_e=Qe==null?void 0:Qe.replace("(",yl))==null?void 0:_e.split(yl))==null?void 0:Ue[0],k=(H=(ra=Qe==null?void 0:Qe.replace("(",yl))==null?void 0:ra.split(yl))==null?void 0:H[1],k=[k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)],U="Input"}else{let Qe=(Ge=ha==null?void 0:ha.replace("*",yl))==null?void 0:Ge.split(yl);X=(Me=Qe==null?void 0:Qe[0])==null?void 0:Me.split(":"),me=(Ie=(Le=re.analyzeSplitToContent(Qe==null?void 0:Qe[1],":"))==null?void 0:Le.filter((Oe,$e)=>{var ne,qe;return $e!==((qe=(ne=Qe==null?void 0:Qe[1])==null?void 0:ne.split(":"))==null?void 0:qe.length)-1}))==null?void 0:Ie.map(Oe=>((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)),Oe)),ue=(De=(de=re.analyzeSplitToContent(Qe==null?void 0:Qe[1],":"))==null?void 0:de.filter((Oe,$e)=>{var ne,qe;return $e===((qe=(ne=Qe==null?void 0:Qe[1])==null?void 0:ne.split(":"))==null?void 0:qe.length)-1}))==null?void 0:De[0],ue=(Sa=(Je=ue==null?void 0:ue.replaceAll("{",""))==null?void 0:Je.replaceAll("}",""))==null?void 0:Sa.split(":"),U="Select"}if(ae!=null&&ae.includes("@")){let Qe=re.analyzeSplitToContent(ae,"@");ae=Qe==null?void 0:Qe[0],ae=ae==null?void 0:ae.slice(0,(ae==null?void 0:ae.length)-1),Qe="@"+(Qe==null?void 0:Qe[1]),Qe=vn(Qe),E=(We=re.analyzeSplitToContent(Qe,","))==null?void 0:We.map(Oe=>((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)),Oe))}}else if(((V=re.analyzeSplitToContent(O,"="))==null?void 0:V.length)>1)if(U="Select",ae=(le=(P=O==null?void 0:O.replace("=",yl))==null?void 0:P.split(yl))==null?void 0:le[0],!(O!=null&&O.includes("If")))W=(he=(ce=O==null?void 0:O.replace("=",yl))==null?void 0:ce.split(yl))==null?void 0:he[1],W=W==null?void 0:W.split("||");else{let sa=(ia=(ua=O==null?void 0:O.replace("=",yl))==null?void 0:ua.split(yl))==null?void 0:ia[1];Z=(Ve=re.analyzeSplitToContent(sa,")"))==null?void 0:Ve.filter(Fe=>!(Fe!=null&&Fe.includes("If"))),Z=Z==null?void 0:Z.map(Fe=>((Fe==null?void 0:Fe[0])==="("&&(Fe=Fe==null?void 0:Fe.slice(1,(Fe==null?void 0:Fe.length)-1)),Fe=Fe==null?void 0:Fe.split("||"),Fe)),x=(va=re.analyzeSplitToContent(sa,")"))==null?void 0:va.filter(Fe=>Fe==null?void 0:Fe.includes("If")),x=x==null?void 0:x.map(Fe=>((Fe==null?void 0:Fe[0])==="|"&&(Fe=Fe==null?void 0:Fe.slice(2,Fe==null?void 0:Fe.length)),(Fe==null?void 0:Fe[0])==="("&&(Fe=Fe==null?void 0:Fe.slice(1,(Fe==null?void 0:Fe.length)-1)),(Fe==null?void 0:Fe[0])!=="@"&&(Fe="@"+Fe),Fe))}else if(((Ea=re.analyzeSplitToContent(O,"@"))==null?void 0:Ea.length)>1){ae=(Ce=re.analyzeSplitToContent(O,"@"))==null?void 0:Ce[0],(ae==null?void 0:ae[(ae==null?void 0:ae.length)-1])==="@"&&(ae=ae==null?void 0:ae.slice(0,(ae==null?void 0:ae.length)-1));let sa="@"+((Fa=re.analyzeSplitToContent(O,"@"))==null?void 0:Fa[1]);sa=vn(sa),E=(Da=re.analyzeSplitToContent(sa,","))==null?void 0:Da.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)),E!=null&&E.find(Fe=>Fe==null?void 0:Fe.includes("@Type"))&&(U=(ja=(da=E==null?void 0:E.find(Fe=>Fe==null?void 0:Fe.includes("@Type")))==null?void 0:da.split("="))==null?void 0:ja[1])}else ae=O;E!=null&&E.includes("@ShowHide=Hide")&&(R=!0),r.push({prop:ae,label:ae,value:"",menuPath:X,groups:me,columns:ue,type:U,options:W,allContents:Z,filters:E,width:b==null?void 0:b.length,isFormColHidden:R,filterContents:x,functionName:I,functionRelatedWords:k,calculatorFilter:_})}),{groupName:n,groupFilters:i,formContents:r,contents:l,filter:o,hideContents:d}},Li=a=>{var n,i;if(!a||typeof a!="string")return[];let l=[],r=a.slice(1,(a==null?void 0:a.length)-1);if((r==null?void 0:r[0])!=="[")(n=re.analyzeSplitToContent(r,","))==null||n.forEach(o=>{(o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o.slice(0,(o==null?void 0:o.length)-1)),l.push(o??"")}),(r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&l.push("");else{let o=[];(i=re.analyzeSplitToContent(r,","))==null||i.forEach(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)),o.push(Li(d))}),l=o}return l},Et=(a,l)=>{var L,O,S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We,V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe,Oe,$e,ne,qe,na,fa;let r,n=[],i=[],o=[],d=[],c=[],u=[],y=[],b="Input",g,p="",D="",m="",F=[],C="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(r=(L=a==null?void 0:a.split("=="))==null?void 0:L[0],g=(O=a==null?void 0:a.split("=="))==null?void 0:O[0],b="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((x=(E=(S=a==null?void 0:a.replace("=",yl))==null?void 0:S.split(yl))==null?void 0:E[1])!=null&&x.includes("If")))if(r=re.analyzeSplitToContent(a,"@"),r=r==null?void 0:r[0],(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=(_=(k=r==null?void 0:r.replace("=",yl))==null?void 0:k.split(yl))==null?void 0:_[0],r!=null&&r.includes("&")&&(r=(R=(I=r==null?void 0:r.replace("&",yl))==null?void 0:I.split(yl))==null?void 0:R[0]),g=r,((ae=re.analyzeSplitToContent(a,"@"))==null?void 0:ae.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let ze=(X=re.analyzeSplitToContent(a,"@"))==null?void 0:X[1];if((ze==null?void 0:ze[0])!=="@"&&(ze="@"+ze),ze=vn(ze),D=ze,D!=null&&D.includes("@Type")){let Be=re.analyzeSplitToContent(D,",");Be=Be==null?void 0:Be.map(Ke=>((Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1])===","&&(Ke=Ke==null?void 0:Ke.slice(0,(Ke==null?void 0:Ke.length)-1)),Ke)),Be=(me=Be==null?void 0:Be.filter(Ke=>Ke==null?void 0:Ke.includes("@Type")))==null?void 0:me[0],b=(ue=Be==null?void 0:Be.split("="))==null?void 0:ue[1],b==="File"&&(b="Upload")}else b="Input"}}else if(a!=null&&a.includes("||")){let ze=[];n=(Z=(W=(U=re.analyzeSplitToContent(a,"="))==null?void 0:U[1])==null?void 0:W.split("||"))==null?void 0:Z.map(Ke=>{var ye,$a,wl,el;let Ee=Ke;if(Ee!=null&&Ee.includes("@")){let Pl="@"+(($a=(ye=Ee==null?void 0:Ee.replace("@",yl))==null?void 0:ye.split(yl))==null?void 0:$a[1]);Ee=(el=(wl=Ee==null?void 0:Ee.replace("@",yl))==null?void 0:wl.split(yl))==null?void 0:el[0],Pl=ri(Pl),ze.push(Pl)}return{label:Ee==null?void 0:Ee.replaceAll("'",""),value:Ee==null?void 0:Ee.replaceAll("'","")}}),(ze==null?void 0:ze.length)>0&&(D="("+(ze==null?void 0:ze.join("||"))+")");let Be=(Q=re.analyzeSplitToContent(a,"="))==null?void 0:Q[0];if(Be!=null&&Be.includes("@")){(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));let Ke=(ve=re.analyzeSplitToContent(Be,"@"))==null?void 0:ve[1];Ke="@"+Ke,Ke=ri(Ke),D=D===""?Ke:Ke+","+D}}else b="Input",p=(A=(te=(Ae=a==null?void 0:a.replace("=",yl))==null?void 0:Ae.split(yl))==null?void 0:te[1])==null?void 0:A.replaceAll("'","");else if((G=(se=re.analyzeSplitToContent(a,"="))==null?void 0:se[1])!=null&&G.includes("||")){let ze=(fe=re.analyzeSplitToContent(a,"="))==null?void 0:fe[0];if((ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])==="="&&(ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1)),ze!=null&&ze.includes("@")){let ye=(we=re.analyzeSplitToContent(ze,"@"))==null?void 0:we[1];ye="@"+ye,D=ri(ye),r=(H=(_e=re.analyzeSplitToContent(ze,"@"))==null?void 0:_e[0])==null?void 0:H.slice(0,((ra=(Ue=re.analyzeSplitToContent(ze,"@"))==null?void 0:Ue[0])==null?void 0:ra.length)-1),g=(Ie=(Ge=re.analyzeSplitToContent(ze,"@"))==null?void 0:Ge[0])==null?void 0:Ie.slice(0,((Le=(Me=re.analyzeSplitToContent(ze,"@"))==null?void 0:Me[0])==null?void 0:Le.length)-1)}else r=ze,g=ze;let Be=(de=re.analyzeSplitToContent(a,"="))==null?void 0:de[1];Be=re.analyzeSplitToContent(Be,")");let Ke=Be==null?void 0:Be.filter(ye=>!(ye!=null&&ye.includes("If")));Ke==null||Ke.forEach(ye=>{(ye==null?void 0:ye[0])==="("&&(ye=ye==null?void 0:ye.slice(1,(ye==null?void 0:ye.length)-1)),i==null||i.push(ye==null?void 0:ye.split("||"))});let Ee=Be==null?void 0:Be.filter(ye=>ye==null?void 0:ye.includes("If"));Ee=Ee==null?void 0:Ee.map(ye=>((ye==null?void 0:ye[0])==="|"&&(ye==null?void 0:ye[1])==="|"&&(ye=ye==null?void 0:ye.slice(2,ye==null?void 0:ye.length)),(ye==null?void 0:ye[0])==="("&&(ye=ye==null?void 0:ye.slice(1,(ye==null?void 0:ye.length)-1)),(ye==null?void 0:ye[0])!=="@"&&(ye="@"+ye),ye)),o=Ee}else{let ze=a==null?void 0:a.split("=="),Be=(De=ze==null?void 0:ze.filter(Ke=>(Ke==null?void 0:Ke.includes("$"))&&(Ke==null?void 0:Ke[0])!=="{"))==null?void 0:De[0];if(Be&&!(Be!=null&&Be.includes("&"))){let Ke=(Sa=re.analyzeSplitToContent(Be,")"))==null?void 0:Sa[((Je=re.analyzeSplitToContent(Be,")"))==null?void 0:Je.length)-1],Ee=(We=Ke==null?void 0:Ke.replace("*",yl))==null?void 0:We.split(yl),ye=(Ee==null?void 0:Ee[0])===""?l==null?void 0:l.value:Ee==null?void 0:Ee[0];(ye==null?void 0:ye[0])==="("&&(ye=(V=re.analyzeSplitToContent(ye,")"))==null?void 0:V[1]),ye=(le=(P=ye==null?void 0:ye.replaceAll("{",""))==null?void 0:P.replaceAll("}",""))==null?void 0:le.replaceAll(Yi,""),(ye==null?void 0:ye[0])==="$"&&(ye=(ce=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length))==null?void 0:ce.replaceAll(":","/")),d=ye==null?void 0:ye.split("/");let $a=(ua=(he=Ee==null?void 0:Ee[1])==null?void 0:he.replace("{",yl))==null?void 0:ua.split(yl),wl=$a==null?void 0:$a[0];(wl==null?void 0:wl[(wl==null?void 0:wl.length)-1])===":"&&(wl=wl==null?void 0:wl.slice(0,(wl==null?void 0:wl.length)-1)),c=wl==null?void 0:wl.split(":"),u=(Ea=(va=(Ve=(ia=$a==null?void 0:$a[1])==null?void 0:ia.replace("}",yl))==null?void 0:Ve.split(yl))==null?void 0:va[0])==null?void 0:Ea.split(":");let el="";((Ce=re.analyzeSplitToContent(Be,")"))==null?void 0:Ce.length)>1&&(el=(Fa=re.analyzeSplitToContent(Be,")"))==null?void 0:Fa[0]),el&&el!==""&&((el==null?void 0:el[0])!=="@"&&(el="@"+el),D=ri(el))}if(ze!=null&&ze.some(Ke=>Ke==null?void 0:Ke.includes("&"))){let Ke=(Da=ze==null?void 0:ze.filter($a=>$a==null?void 0:$a.includes("&")))==null?void 0:Da[0];Ke=(da=re.analyzeSplitToContent(Ke,"&"))==null?void 0:da.map($a=>(($a==null?void 0:$a[($a==null?void 0:$a.length)-1])==="&"&&($a=$a==null?void 0:$a.slice(0,($a==null?void 0:$a.length)-1)),$a)),m=(Fe=(sa=(ja=Ke==null?void 0:Ke[1])==null?void 0:ja.replace("(",yl))==null?void 0:sa.split(yl))==null?void 0:Fe[0];let Ee=(ha=re.analyzeSplitToContent(Ke==null?void 0:Ke[1],")"))==null?void 0:ha[0];Ee=(Oe=(Qe=Ee==null?void 0:Ee.replace("(",yl))==null?void 0:Qe.split(yl))==null?void 0:Oe[1],Ee=Ee==null?void 0:Ee.slice(0,(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)),(Ee==null?void 0:Ee[(Ee==null?void 0:Ee.length)-1])==="}"&&(Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1)),F=Ee==null?void 0:Ee.split(",");let ye=Ke==null?void 0:Ke[0];ye&&ye!==""&&((ye==null?void 0:ye[0])!=="@"&&(ye="@"+ye),C=ri(ye))}else if(!Be&&(($e=ze==null?void 0:ze.filter(Ke=>(Ke==null?void 0:Ke[0])==="{"))==null?void 0:$e.length)>0){let Ke=ze==null?void 0:ze[(ze==null?void 0:ze.length)-1];Ke=Ke==null?void 0:Ke.slice(1,(Ke==null?void 0:Ke.length)-1),Ke=re.analyzeSplitToContent(Ke,","),Ke=Ke==null?void 0:Ke.map(Ee=>((Ee==null?void 0:Ee[(Ee==null?void 0:Ee.length)-1])===","&&(Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1)),Ee)),Ke=Ke==null?void 0:Ke.map(Ee=>{var ye,$a,wl,el;if(Ee=Ee==null?void 0:Ee.replaceAll("$",""),Ee!=null&&Ee.includes("{")){let Pl="";Ee=Ee==null?void 0:Ee.replaceAll("{","");let bl=Ee==null?void 0:Ee.split("}");Pl=(($a=(ye=bl==null?void 0:bl[0])==null?void 0:ye.split(":"))==null?void 0:$a[0])+":"+(bl==null?void 0:bl[1]),Ee=Pl,Ee=Ee+":"}if(Ee!=null&&Ee.includes(Yi)){let Pl="",bl=Ee==null?void 0:Ee.split(Yi);Pl=((el=(wl=bl==null?void 0:bl[0])==null?void 0:wl.split(":"))==null?void 0:el[0])+":"+(bl==null?void 0:bl[1]),Ee=Pl,Ee=Ee+":"}return Ee=Ee==null?void 0:Ee.replaceAll(":","/"),Ee}),y=Ke}else!((ne=ze==null?void 0:ze[1])!=null&&ne.includes("$"))&&((qe=ze==null?void 0:ze[1])==null?void 0:qe[0])!=="("&&u.push(ze==null?void 0:ze[1])}else r=(na=a==null?void 0:a.split("&"))==null?void 0:na[0],g=(fa=a==null?void 0:a.split("&"))==null?void 0:fa[0];return(n==null?void 0:n.length)===0&&(i==null?void 0:i.length)===0&&(d==null?void 0:d.length)===0&&b==="Select"&&(b="Input"),{label:r,prop:g,options:n,allContents:i,filterContents:o,menus:d,groups:c,words:u,align:"center",formType:b,filter:D,functionName:m,functionRelatedWords:F,calculatorFilter:C,relatedPages:y,value:p}},Bo=(a,l)=>{var n,i,o,d,c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z;let r=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((d=(o=(i=(n=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:n.replace(":",yl))==null?void 0:i.split(yl))==null?void 0:o[0])!=null&&d.includes(","))){let Q=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),ve=(c=Q==null?void 0:Q.replace(":",yl))==null?void 0:c.split(yl);if(((u=re.analyzeSplitToContent(ve==null?void 0:ve[1],"="))==null?void 0:u.length)===1){let Ae=ve==null?void 0:ve[0],te=[];(g=re.analyzeSplitToContent((b=ve==null?void 0:ve[1])==null?void 0:b.slice(1,((y=ve==null?void 0:ve[1])==null?void 0:y.length)-1),","))==null||g.forEach(A=>{var se,G;((se=re.analyzeSplitToContent(A,"="))==null?void 0:se.length)>1?((A==null?void 0:A[(A==null?void 0:A.length)-1])===","&&(A=A==null?void 0:A.slice(0,(A==null?void 0:A.length)-1)),te=[...te,...Bo(A,l)]):((A==null?void 0:A[(A==null?void 0:A.length)-1])===","&&(A=A==null?void 0:A.slice(0,(A==null?void 0:A.length)-1)),te.push((G=Bo(A,l))==null?void 0:G[0]))}),r==null||r.push({label:Ae,prop:Ae,children:te,align:"center"})}else{let Ae=[];if(((p=re.analyzeSplitToContent(Q,"="))==null?void 0:p.length)>=2){let A=(D=re.analyzeSplitToContent(Q,"="))==null?void 0:D[1],se=(m=re.analyzeSplitToContent(A,"/"))==null?void 0:m.map(G=>((G==null?void 0:G[(G==null?void 0:G.length)-1])==="/"&&(G=G==null?void 0:G.slice(0,(G==null?void 0:G.length)-1)),G));Ae=se==null?void 0:se.map(G=>(G=Li(G),G))}let te=(E=(S=(O=(L=(C=(F=Q==null?void 0:Q.replace("{",yl))==null?void 0:F.split(yl))==null?void 0:C[1])==null?void 0:L.replace("}",yl))==null?void 0:O.split(yl))==null?void 0:S[0])==null?void 0:E.split(",");te==null||te.forEach((A,se)=>{(Ae==null?void 0:Ae.length)>0&&se===0?r==null||r.push({label:A,prop:A,align:"center",formType:"Select",relatedContents:Ae==null?void 0:Ae.map(G=>{let fe={};return te==null||te.forEach((we,_e)=>{fe[we]=G==null?void 0:G[_e]}),fe}),options:Ae==null?void 0:Ae.map(G=>({label:G==null?void 0:G[0],value:G==null?void 0:G[0]})),mainKey:!0}):r==null||r.push({label:A,prop:A,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((x=re.analyzeSplitToContent(a,"="))==null?void 0:x.length)===2&&((_=(k=re.analyzeSplitToContent(a,"="))==null?void 0:k[1])==null?void 0:_[0])==="["){let Q=[];if(((I=re.analyzeSplitToContent(a,"="))==null?void 0:I.length)>=2){let Ae=(R=re.analyzeSplitToContent(a,"="))==null?void 0:R[1],te=(X=(ae=re.analyzeSplitToContent(Ae,"|"))==null?void 0:ae.filter(A=>A!=="|"))==null?void 0:X.map(A=>((A==null?void 0:A[(A==null?void 0:A.length)-1])==="|"&&(A=A==null?void 0:A.slice(0,(A==null?void 0:A.length)-1)),A));Q=te==null?void 0:te.map(A=>(A=Li(A),A))}let ve=(ue=(me=a==null?void 0:a.replace("}",yl))==null?void 0:me.split(yl))==null?void 0:ue[0];ve=(U=ve==null?void 0:ve.slice(1,ve==null?void 0:ve.length))==null?void 0:U.split(","),ve==null||ve.forEach((Ae,te)=>{(Q==null?void 0:Q.length)>0&&te===0?r==null||r.push({label:Ae,prop:Ae,align:"center",formType:"Select",relatedContents:Q==null?void 0:Q.map(A=>{let se={};return ve==null||ve.forEach((G,fe)=>{se[G]=A==null?void 0:A[fe]}),se}),options:Q==null?void 0:Q.map(A=>({label:A==null?void 0:A[0],value:A==null?void 0:A[0]})),mainKey:!0}):r==null||r.push({label:Ae,prop:Ae,align:"center"})})}else(W=re.analyzeSplitToContent(a,","))==null||W.forEach(Q=>{var ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We,V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe;if((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?void 0:Q[0])==="{"){let Oe=re.analyzeSplitToContent(Q,"="),$e=Oe==null?void 0:Oe[(Oe==null?void 0:Oe.length)-1],ne=[],qe=[],na=[],fa="",ze="",Be=[],Ke=[],Ee=(ve=$e==null?void 0:$e.replace("*",yl))==null?void 0:ve.split(yl),ye=(Ee==null?void 0:Ee[0])===""?l==null?void 0:l.value:Ee==null?void 0:Ee[0];ye=re.analyzeSplitToContent(ye,")");let $a="";if((ye==null?void 0:ye.length)>1&&((Ae=ye==null?void 0:ye[0])==null?void 0:Ae[0])!=="&"&&($a=ye==null?void 0:ye[0],($a==null?void 0:$a[0])!=="@"&&($a="@"+$a),ze=$a??""),ye=(te=ye==null?void 0:ye.filter(ll=>(ll==null?void 0:ll[0])==="$"))==null?void 0:te[0],((A=re.analyzeSplitToContent(ye,"}"))==null?void 0:A.length)>1&&((G=(se=re.analyzeSplitToContent(ye,"}"))==null?void 0:se[1])==null?void 0:G[0])==="("&&($a=(fe=re.analyzeSplitToContent(ye,"}"))==null?void 0:fe[1],($a==null?void 0:$a[0])!=="@"&&($a="@"+$a),ze!==""&&(ze=ze+","),ze=ze+$a),(we=ye==null?void 0:ye.slice(1,(ye==null?void 0:ye.length)-1))!=null&&we.includes("$")||(ye=(_e=re.analyzeSplitToContent(ye,"}"))==null?void 0:_e[0]),(ye==null?void 0:ye[0])==="$"&&(ye=(Ue=ye==null?void 0:ye.replace("{",""))==null?void 0:Ue.replace("}",":"),ye=(ra=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length))==null?void 0:ra.replaceAll(":","/")),ye!=null&&ye.includes("$")){let ll=(H=ye==null?void 0:ye.split("$"))==null?void 0:H[0];ll=(Ge=ll==null?void 0:ll.split("/"))==null?void 0:Ge[0],ye=ll+"/"+((Me=ye==null?void 0:ye.split("$"))==null?void 0:Me[1])+"/"}ne=(ye==null?void 0:ye.split("/"))??[];let wl=(Ie=(Le=Ee==null?void 0:Ee[1])==null?void 0:Le.replace("{",yl))==null?void 0:Ie.split(yl);if((Je=(De=(de=Ee==null?void 0:Ee[1])==null?void 0:de.split("(@"))==null?void 0:De[0])!=null&&Je.includes("&&")||(V=(We=(Sa=Ee==null?void 0:Ee[1])==null?void 0:Sa.split("@"))==null?void 0:We[0])!=null&&V.includes("&&")){let ll=(P=Ee==null?void 0:Ee[1])!=null&&P.includes("(@")?(he=(ce=(le=Ee==null?void 0:Ee[1])==null?void 0:le.split("(@"))==null?void 0:ce[0])==null?void 0:he.split("&&"):(Ve=(ia=(ua=Ee==null?void 0:Ee[1])==null?void 0:ua.split("@"))==null?void 0:ia[0])==null?void 0:Ve.split("&&");Be=ll==null?void 0:ll.map(Ga=>{var Jl,Xl;return(Ga==null?void 0:Ga[0])==="*"&&(Ga=Ga==null?void 0:Ga.slice(1,Ga==null?void 0:Ga.length)),Ga=(Xl=(Jl=Ga==null?void 0:Ga.replace("{",yl))==null?void 0:Jl.split(yl))==null?void 0:Xl[0],(Ga==null?void 0:Ga[(Ga==null?void 0:Ga.length)-1])===":"&&(Ga=Ga==null?void 0:Ga.slice(0,(Ga==null?void 0:Ga.length)-1)),Ga=Ga==null?void 0:Ga.split(":"),Ga});let Hl=[];ll==null||ll.forEach((Ga,Jl)=>{var Xl,ar;(Ga==null?void 0:Ga[0])==="*"&&(Ga=Ga==null?void 0:Ga.slice(1,Ga==null?void 0:Ga.length)),Ga=(ar=(Xl=Ga==null?void 0:Ga.replace("{",yl))==null?void 0:Xl.split(yl))==null?void 0:ar[1],(Ga==null?void 0:Ga[(Ga==null?void 0:Ga.length)-1])==="}"&&(Ga=Ga==null?void 0:Ga.slice(0,(Ga==null?void 0:Ga.length)-1)),Ga=Ga==null?void 0:Ga.split(","),Hl.push(Jl===0?(Ga==null?void 0:Ga.length)-1:Ga==null?void 0:Ga.length),Ke=[...Ke,...Ga]}),Hl=(va=re.prefixSum(Hl))==null?void 0:va.map(Ga=>Ga==null?void 0:Ga.total),Be=Be==null?void 0:Be.map((Ga,Jl)=>({number:Hl==null?void 0:Hl[Jl],contents:Ga}))}let el=wl==null?void 0:wl[0];(el==null?void 0:el[(el==null?void 0:el.length)-1])===":"&&(el=el==null?void 0:el.slice(0,(el==null?void 0:el.length)-1)),qe=(el==null?void 0:el.split(":"))??[],na=((Da=(Fa=(Ce=(Ea=wl==null?void 0:wl[1])==null?void 0:Ea.replace("}",yl))==null?void 0:Ce.split(yl))==null?void 0:Fa[0])==null?void 0:Da.split(","))??[];let Pl=(ja=Oe==null?void 0:Oe[0])==null?void 0:ja.slice(1,((da=Oe==null?void 0:Oe[0])==null?void 0:da.length)-2);ze&&ze!==""&&(fa=ri(ze));let bl=(sa=re.analyzeSplitToContent(fa,","))==null?void 0:sa.map(ll=>((ll==null?void 0:ll[(ll==null?void 0:ll.length)-1])===","&&(ll=ll==null?void 0:ll.slice(0,(ll==null?void 0:ll.length)-1)),ll)),jl=[];bl!=null&&bl.find(ll=>ll==null?void 0:ll.includes("@MainParam"))&&(bl=bl==null?void 0:bl.find(ll=>ll==null?void 0:ll.includes("@MainParam")),bl=(ha=(Fe=bl==null?void 0:bl.replace("=",yl))==null?void 0:Fe.split(yl))==null?void 0:ha[1],bl=bl==null?void 0:bl.slice(1,(bl==null?void 0:bl.length)-1),jl=re.analyzeSplitToContent(bl,",")),(Qe=Pl==null?void 0:Pl.split(","))==null||Qe.forEach((ll,Hl)=>{var Ga,Jl,Xl,ar,Sl,pr;if(((Ga=re.analyzeSplitToContent(ll,"@"))==null?void 0:Ga.length)>1){let ya=(Jl=re.analyzeSplitToContent(ll,"@"))==null?void 0:Jl[1];ya="@"+ya,fa=ri(ya),ll=(Xl=re.analyzeSplitToContent(ll,"@"))==null?void 0:Xl[0],(ll==null?void 0:ll[(ll==null?void 0:ll.length)-1])==="@"&&(ll=ll==null?void 0:ll.slice(0,(ll==null?void 0:ll.length)-1))}r.push({label:ll,prop:ll,align:"center",menus:ne,groups:(Be==null?void 0:Be.length)===0?qe:(ar=Be==null?void 0:Be.find(ya=>(ya==null?void 0:ya.number)>=Hl))==null?void 0:ar.contents,words:(Ke==null?void 0:Ke.length)===0?(Sl=na==null?void 0:na[Hl])==null?void 0:Sl.split(":"):(pr=Ke==null?void 0:Ke[Hl])==null?void 0:pr.split(":"),formType:(ne==null?void 0:ne.length)>0?"Select":"Input",mainKey:!!(Hl===0||jl!=null&&jl.find(ya=>ya===ll)),filter:fa,isMainPath:(Be==null?void 0:Be.findIndex(ya=>(ya==null?void 0:ya.number)>=Hl))===0})})}else r.push({label:Q,prop:Q,align:"center"})});else{let Q=(Z=re.analyzeSplitToContent(a,","))==null?void 0:Z.map(ve=>((ve==null?void 0:ve[(ve==null?void 0:ve.length)-1])===","&&(ve=ve==null?void 0:ve.slice(0,(ve==null?void 0:ve.length)-1)),ve));Q==null||Q.forEach(ve=>{r.push(Et(ve,l))})}return r},xp=(a,l)=>{var d,c,u,y,b;let r=a;if(!a)return;let n="";((d=re.analyzeSplitToContent(a,"}"))==null?void 0:d.length)>1&&(r=(c=re.analyzeSplitToContent(a,"}"))==null?void 0:c[0],n=(u=re.analyzeSplitToContent(a,"}"))==null?void 0:u[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let i=[],o=[];return i.push({label:"排序",prop:"sort"}),i.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(y=re.analyzeSplitToContent(r,","))==null||y.forEach(g=>{var p;(g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),(g==null?void 0:g[0])==="{"?(p=Bo(g,l))==null||p.forEach(D=>{i.push(D)}):i.push(Et(g,l))}),i!=null&&i.some(g=>{var p;return(p=g==null?void 0:g.prop)==null?void 0:p.includes("@")})&&(i=i==null?void 0:i.filter(g=>{var p;return!((p=g==null?void 0:g.prop)!=null&&p.includes("@"))})),n!==""&&((n==null?void 0:n[0])=="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),(b=re.analyzeSplitToContent(n,","))==null||b.forEach(g=>{var p;(g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),(g==null?void 0:g[0])==="{"?(p=Bo(g,l))==null||p.forEach(D=>{o.push(D)}):o.push(Et(g,l))})),{columns:i,secondColumns:o}},vn=a=>{var l,r,n,i,o;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let d=(r=(l=a==null?void 0:a.replace("(",yl))==null?void 0:l.split(yl))==null?void 0:r[1],c=(i=(n=a==null?void 0:a.replace("(",yl))==null?void 0:n.split(yl))==null?void 0:i[0];return d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1),d=(o=re.analyzeSplitToContent(d,","))==null?void 0:o.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==null?void 0:u[0])==="("&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1)),c+u)),d=d==null?void 0:d.join(","),a!=null&&a.includes("@Quote")&&(d!=null&&d.includes("@QuoteType")||(d=d===""?d+"@QuoteType=Manual":d+",@QuoteType=Manual"),d!=null&&d.includes("@QuoteSonSync")||(d=d===""?d+"@QuoteSonSync=No":d+",@QuoteSonSync=No"),d!=null&&d.includes("@QuoteFatherSync")||(d=d===""?d+"@QuoteFatherSync=Yes":d+",@QuoteFatherSync=Yes")),d}},gs=a=>{let l=a==null?void 0:a.map(r=>{var n,i;return{menus:r==null?void 0:r.menus,content:((n=r==null?void 0:r.menus)==null?void 0:n.join("/"))+yl+((i=r==null?void 0:r.groups)==null?void 0:i.join("/"))}});return l=l==null?void 0:l.filter(r=>{var n;return(r==null?void 0:r.menus)&&((n=r==null?void 0:r.menus)==null?void 0:n.length)>0}),l=l==null?void 0:l.map(r=>r==null?void 0:r.content),l=[...new Set(l)],l=l==null?void 0:l.map(r=>{var n,i;return{menus:(n=r==null?void 0:r.split(yl))==null?void 0:n[0],groups:((i=r==null?void 0:r.split(yl))==null?void 0:i[1])??[]}}),l},bs=a=>{var r;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=(r=re.analyzeSplitToContent(l,","))==null?void 0:r.map(n=>((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==null?void 0:n[0])!=="@"&&(n="@"+n),(n==null?void 0:n[1])==="("&&(n=vn(n)),n)),l==null?void 0:l.join(",")},bc=(a,l,r="")=>{var S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We,V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe,Oe;let n=[],i=[],o=[],d="",c="",u="",y=[],b=[],g=[],p=[],D="";if(((S=a==null?void 0:a[0])==null?void 0:S[0])!=="*"&&((E=a==null?void 0:a[0])==null?void 0:E[0])!=="$"&&!((x=a==null?void 0:a[0])!=null&&x.includes("$")))return;((k=a==null?void 0:a[0])==null?void 0:k[0])!=="*"&&((_=a==null?void 0:a[0])==null?void 0:_[0])!=="$"&&(d=(I=re.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:I[0],(d==null?void 0:d[0])!=="@"&&(d="@"+d),d=ri(d),u=(R=re.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:R[1],(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),u=u==null?void 0:u.replaceAll(":","/"));let F=re.analyzeSplitToContent(a==null?void 0:a[0],":");if(n=(ae=F==null?void 0:F.filter($e=>($e==null?void 0:$e[0])!=="{"&&($e==null?void 0:$e[0])!=="["))==null?void 0:ae.join(""),c=(X=a==null?void 0:a[0])==null?void 0:X.replace(n,""),(n==null?void 0:n[0])==="("&&(n=""),D=(me=F==null?void 0:F.filter($e=>($e==null?void 0:$e[0])!=="["))==null?void 0:me.join(""),D=(ue=a==null?void 0:a[0])==null?void 0:ue.replace(D,""),c=c==null?void 0:c.replace(D,""),(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[(n==null?void 0:n.length)-1])===":"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),((U=re.analyzeSplitToContent(c,"@"))==null?void 0:U.length)>1&&(d=(W=re.analyzeSplitToContent(c,"@"))==null?void 0:W[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="@"+d,d=vn(d),c=(Z=re.analyzeSplitToContent(c,"@"))==null?void 0:Z[0],c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),((Q=re.analyzeSplitToContent(n,"@"))==null?void 0:Q.length)>1){d!==""&&(d=d+",");let $e=(ve=re.analyzeSplitToContent(n,"@"))==null?void 0:ve[1];$e="@"+$e,$e=vn($e),d=d+$e,n=(Ae=re.analyzeSplitToContent(n,"@"))==null?void 0:Ae[0]}if((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=n===""?[]:n==null?void 0:n.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)),r!==""){let $e=(te=re.analyzeSplitToContent(r,")"))==null?void 0:te[0],ne=re.analyzeSplitToContent(r,")");ne=ne==null?void 0:ne.filter((ze,Be)=>Be!==(ne==null?void 0:ne.length)-1),ne=ne==null?void 0:ne.join("");let qe=(A=re.analyzeSplitToContent(r,"@"))==null?void 0:A[1];u=(G=(se=re.analyzeSplitToContent(r,"@"))==null?void 0:se[0])==null?void 0:G.replace(ne,""),(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));let na="";if(na=re.analyzeSplitToContent(r,")"),na=na==null?void 0:na.filter((ze,Be)=>Be!==0&&Be!==(na==null?void 0:na.length)-1),((fe=re.analyzeSplitToContent(r,"&"))==null?void 0:fe.length)>1&&(na==null?void 0:na.length)<2&&($e="",u="",na=re.analyzeSplitToContent(r,")")),na!=null&&na.some(ze=>(ze==null?void 0:ze[0])===":")){let ze=(we=na==null?void 0:na.filter(Be=>(Be==null?void 0:Be[0])===":"))==null?void 0:we.join("");D=ze==null?void 0:ze.slice(1,ze==null?void 0:ze.length),na=na==null?void 0:na.filter(Be=>(Be==null?void 0:Be[0])!==":")}(na==null?void 0:na.length)>0&&((_e=re.chunkArray(na))==null||_e.forEach(ze=>{var $a,wl,el,Pl,bl;let Be="",Ke=[],Ee="";(ze==null?void 0:ze.length)>1&&(Ee="@"+(ze==null?void 0:ze[0]),Ee=vn(Ee));let ye=(ze==null?void 0:ze.length)===1?ze==null?void 0:ze[0]:ze==null?void 0:ze[1];ye=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length),Be=(wl=($a=ye==null?void 0:ye.replace("(",yl))==null?void 0:$a.split(yl))==null?void 0:wl[0],ye=(Pl=(el=ye==null?void 0:ye.replace("(",yl))==null?void 0:el.split(yl))==null?void 0:Pl[1],ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1),Ke=(bl=re.analyzeSplitToContent(ye,","))==null?void 0:bl.map(jl=>((jl==null?void 0:jl[(jl==null?void 0:jl.length)-1])===","&&(jl=jl==null?void 0:jl.slice(0,(jl==null?void 0:jl.length)-1)),jl)),y.push({functionName:Be,functionRelatedWords:Ke,calculatorFilter:Ee})})),$e=bs($e),qe=bs(qe);let fa=$e??"";if(fa!==""&&(fa=fa+","),fa=fa+qe,(fa==null?void 0:fa[(fa==null?void 0:fa.length)-1])===","&&(fa=fa==null?void 0:fa.slice(0,(fa==null?void 0:fa.length)-1)),fa!==""&&d!==""&&(d=d+","),d=d+fa,(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),u=(Ue=re.analyzeSplitToContent(u,":"))==null?void 0:Ue.filter((ze,Be)=>{var Ke;return!((ze==null?void 0:ze[0])==="{"&&Be===((Ke=re.analyzeSplitToContent(u,":"))==null?void 0:Ke.length)-1)}),u=u==null?void 0:u.join(""),(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)),d!=null&&d.includes("@Sync")||(d=d===""?d+"@Sync=(Yes,Yes)":d+",@Sync=(Yes,Yes)"),u!=null&&u.includes("$")){let ze=(H=(ra=u==null?void 0:u.replace("*",yl))==null?void 0:ra.split(yl))==null?void 0:H[1],Be=(Me=(Ge=u==null?void 0:u.replace("*",yl))==null?void 0:Ge.split(yl))==null?void 0:Me[0];Be=Be==null?void 0:Be.split("$"),Be=((Ie=(Le=Be==null?void 0:Be[0])==null?void 0:Le.split(":"))==null?void 0:Ie[0])+":"+(Be==null?void 0:Be[1])+":",u=Be+"*"+ze}else u=(de=u==null?void 0:u.replaceAll("{",""))==null?void 0:de.replaceAll("}","");(u==null?void 0:u[0])===":"&&(D=u==null?void 0:u.slice(1,u==null?void 0:u.length),u="")}d!==""&&d&&(d="("+d+")"),d=u+d,((De=re.analyzeSplitToContent(c,"}"))==null?void 0:De.length)>1&&(c=(Je=re.analyzeSplitToContent(c,"}"))==null?void 0:Je.filter($e=>($e==null?void 0:$e[0])!=="@"),c=c==null?void 0:c.join(""));let C=xp(c,l);o=c===""?[]:(C==null?void 0:C.columns)??[],p=re.getColumnChild(o);let L=re.getColumnChild(o);o!=null&&o.some($e=>{var ne;return Array.isArray($e==null?void 0:$e.children)&&((ne=$e==null?void 0:$e.children)==null?void 0:ne.length)>0})&&(o=[o]),i=D?Li(D):[],!(i!=null&&i.every($e=>Array.isArray($e)))&&(i==null?void 0:i.length)>0&&(i=[i]),(i==null?void 0:i.length)>0&&(Array.isArray(i==null?void 0:i[0])&&((Sa=i==null?void 0:i[0])!=null&&Sa.every($e=>Array.isArray($e)))?i=i==null?void 0:i.map(($e,ne)=>($e=$e.map((qe,na)=>(qe.unshift("{}"),qe.unshift((na+1).toString()),qe)),$e)):i=i==null?void 0:i.map(($e,ne)=>($e.unshift("{}"),$e.unshift((ne+1).toString()),$e))),C!=null&&C.secondColumns&&((We=C==null?void 0:C.secondColumns)==null?void 0:We.length)>0&&((i==null?void 0:i.length)>0?i=i==null?void 0:i.map(($e,ne)=>{var qe,na;return Array.isArray($e==null?void 0:$e[0])?$e=$e==null?void 0:$e.map((fa,ze)=>{var Be,Ke;return fa.unshift((Ke=(Be=C==null?void 0:C.secondColumns)==null?void 0:Be[ze])==null?void 0:Ke.prop),fa}):$e.unshift((na=(qe=C==null?void 0:C.secondColumns)==null?void 0:qe[ne])==null?void 0:na.prop),$e}):i=(V=C==null?void 0:C.secondColumns)==null?void 0:V.map(($e,ne)=>($e=[$e==null?void 0:$e.label],$e.push(ne),$e)),o.unshift({label:"",prop:"disabled",sortable:!1})),p=p==null?void 0:p.map($e=>{var ne,qe;return{menus:$e==null?void 0:$e.menus,content:((ne=$e==null?void 0:$e.menus)==null?void 0:ne.join("/"))+yl+((qe=$e==null?void 0:$e.groups)==null?void 0:qe.join("/"))}});let O=[];if(((le=(P=d==null?void 0:d.replace("(",yl))==null?void 0:P.split(yl))==null?void 0:le[0])!==""&&(O=(he=(ce=d==null?void 0:d.replace("(",yl))==null?void 0:ce.split(yl))==null?void 0:he[0],O=[O],O=O==null?void 0:O.map($e=>{var qe,na,fa;let ne=$e==null?void 0:$e.split("*");return{menus:(qe=ne==null?void 0:ne[0])==null?void 0:qe.split(":"),content:((na=ne==null?void 0:ne[0])==null?void 0:na.replaceAll(":","/"))+yl+((fa=ne==null?void 0:ne[1])==null?void 0:fa.replaceAll(":","/"))}}),p=[...p,...O]),p=p==null?void 0:p.filter($e=>{var ne;return($e==null?void 0:$e.menus)&&((ne=$e==null?void 0:$e.menus)==null?void 0:ne.length)>0}),p=p==null?void 0:p.map($e=>$e==null?void 0:$e.content),p=[...new Set(p)],p=p==null?void 0:p.map($e=>{var ne,qe;return{menus:(ne=$e==null?void 0:$e.split(yl))==null?void 0:ne[0],groups:((qe=$e==null?void 0:$e.split(yl))==null?void 0:qe[1])??[]}}),b=L==null?void 0:L.filter($e=>{var ne;return($e==null?void 0:$e.filter)&&((ne=$e==null?void 0:$e.filter)==null?void 0:ne.includes("@Sync"))}),(b==null?void 0:b.length)>0&&(b=b==null?void 0:b.filter($e=>{var ne,qe,na,fa;return(fa=(na=(qe=(ne=re.analyzeSplitToContent($e==null?void 0:$e.filter,","))==null?void 0:ne.find(ze=>ze==null?void 0:ze.includes("@Sync")))==null?void 0:qe.split(","))==null?void 0:na[0])==null?void 0:fa.includes("Yes")}),b=gs(b)),g=L==null?void 0:L.filter($e=>{var ne;return($e==null?void 0:$e.filter)&&((ne=$e==null?void 0:$e.filter)==null?void 0:ne.includes("@Sync"))}),(g==null?void 0:g.length)>0&&(g=g==null?void 0:g.filter($e=>{var ne,qe,na,fa;return(fa=(na=(qe=(ne=re.analyzeSplitToContent($e==null?void 0:$e.filter,","))==null?void 0:ne.find(ze=>ze==null?void 0:ze.includes("@Sync")))==null?void 0:qe.split(","))==null?void 0:na[1])==null?void 0:fa.includes("Yes")}),g=gs(g)),d!==""&&(d!=null&&d.includes("@Sync"))&&(d==null?void 0:d[0])!=="("){let $e=(ua=d==null?void 0:d.replace("(",yl))==null?void 0:ua.split(yl),ne=$e==null?void 0:$e[1];if(ne=ne==null?void 0:ne.slice(0,(ne==null?void 0:ne.length)-1),ne=re.analyzeSplitToContent(ne,","),(va=(Ve=(ia=ne==null?void 0:ne.find(qe=>qe==null?void 0:qe.includes("@Sync")))==null?void 0:ia.split(","))==null?void 0:Ve[0])!=null&&va.includes("Yes")){let qe=$e==null?void 0:$e[0];qe=[{menus:(Ce=(Ea=qe==null?void 0:qe.split("*"))==null?void 0:Ea[0])==null?void 0:Ce.replaceAll(":","/"),groups:((Da=(Fa=qe==null?void 0:qe.split("*"))==null?void 0:Fa[1])==null?void 0:Da.split(":"))??[]}],b=[...b,...qe]}if((sa=(ja=(da=ne==null?void 0:ne.find(qe=>qe==null?void 0:qe.includes("@Sync")))==null?void 0:da.split(","))==null?void 0:ja[1])!=null&&sa.includes("Yes")){let qe=$e==null?void 0:$e[0];qe=[{menus:(ha=(Fe=qe==null?void 0:qe.split("*"))==null?void 0:Fe[0])==null?void 0:ha.replaceAll(":","/"),groups:((Oe=(Qe=qe==null?void 0:qe.split("*"))==null?void 0:Qe[1])==null?void 0:Oe.split(":"))??[]}],g=[...g,...qe]}}return{groupName:n,tableColumns:o,tableFilter:d,tableContents:i,columns:(C==null?void 0:C.secondColumns)??[],relatedQuotes:p,fatherSyncContents:b,sonSyncContents:g,calculatorFilters:y}},kc=(a,l)=>(a=a==null?void 0:a.map((r,n)=>{var i,o,d,c;if(Array.isArray(r))r=r==null?void 0:r.map(u=>{var y,b,g,p;return u!=null&&u.isMainPath||(((y=u==null?void 0:u.children)==null?void 0:y.length)>0?u.children=kc(u.children,l):((b=u==null?void 0:u.menus)==null?void 0:b.length)>0&&!((g=r==null?void 0:r[0])!=null&&g.isMainPath)&&(u.menus=(p=u.menus)==null?void 0:p.map((D,m)=>{var F,C;return((F=u.menus)==null?void 0:F.length)-1===m&&D===""&&(l==null?void 0:l.parentContent)+"/"!==((C=u.menus)==null?void 0:C.join("/"))&&(D=l==null?void 0:l.value),u}),u.bindMenus=u.menus)),u});else{if(n===0&&((i=r.menus)==null?void 0:i.length)>0&&(r.mainKey=!0),r!=null&&r.isMainPath)return r;((o=r.menus)==null?void 0:o.length)>0&&!((d=a==null?void 0:a[0])!=null&&d.isMainPath)&&(r.menus=(c=r.menus)==null?void 0:c.map((u,y)=>{var b,g;return((b=r.menus)==null?void 0:b.length)-1===y&&u===""&&(l==null?void 0:l.parentContent)+"/"!==((g=r.menus)==null?void 0:g.join("/"))&&(u=l==null?void 0:l.value),u}),r.bindMenus=r.menus)}return r}),a),wp=(a,l)=>(a=a==null?void 0:a.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=kc(r.contents,l)),r)),a),Ct=(a,l)=>{let r=a;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(n=>(n=Ct(n,l),n)):r=r==null?void 0:r.map(n=>{var i,o;return n!=null&&n.children&&((i=n==null?void 0:n.children)==null?void 0:i.length)>0?n.children=Ct(n==null?void 0:n.children,l):n!=null&&n.words&&((o=n==null?void 0:n.words)==null?void 0:o.length)>0&&(l!=null&&l.find(d=>{var c,u,y,b;return((b=(c=n==null?void 0:n.prop)==null?void 0:c.split("."))==null?void 0:b[((y=(u=n==null?void 0:n.prop)==null?void 0:u.split("."))==null?void 0:y.length)-1])===d}))&&(n.mainKey=!0),n}),r};let Ar="$R";const _p=z.useUnit(z.pinia),{selectTitle:xn}=z.storeToRefs(_p),Sp=z.useMenuState(z.pinia),{localFiles:Ep}=z.storeToRefs(Sp),Cp=z.useLoginState(z.pinia),{loginUserInfo:gt}=z.storeToRefs(Cp),Mn=[{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:"@TextBackRGBA",value:"onTextBackRGBA",order:1},{key:"@Position",value:"onPosition",order:4},{key:"@ColumnNum",value:"onColumnNum",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 vi=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(vi||{});const Dp=async a=>{var r,n,i,o,d,c,u,y,b,g,p,D,m,F,C,L,O;let l=re.analyzeSplitToContent((a==null?void 0:a.filter)??"",")");if((l==null?void 0:l.length)>1){let S=l==null?void 0:l[0];S=S==null?void 0:S.slice(1,(S==null?void 0:S.length)-1),S=(n=(r=S==null?void 0:S.replace("(",Ar))==null?void 0:r.split(Ar))==null?void 0:n[1],S="("+((i=S==null?void 0:S.replaceAll("{",""))==null?void 0:i.replaceAll("}",""));let E=re.calculatorAndToOr(S),x=Object.keys(E==null?void 0:E[0]);if(S=E,((o=x==null?void 0:x[0])==null?void 0:o[0])==="$"){let k=(c=x==null?void 0:x[0])==null?void 0:c.slice(1,((d=x==null?void 0:x[0])==null?void 0:d.length)-1),_=(y=(u=k==null?void 0:k.split("*"))==null?void 0:u[0])==null?void 0:y.replaceAll(".","/"),I=(p=(g=(b=k==null?void 0:k.split("*"))==null?void 0:b[1])==null?void 0:g.split("."))==null?void 0:p[0],R=await qr(_,!1);R=(D=R==null?void 0:R.filter(U=>(U==null?void 0:U.name)===I))==null?void 0:D[0];let ae=(F=(m=R==null?void 0:R.compData)==null?void 0:m.find(U=>(U==null?void 0:U.key)==="tableContents"))==null?void 0:F.contents;S=S==null?void 0:S.map(U=>{var Z,Q;let W={};for(let ve in U)if((ve==null?void 0:ve[0])==="$"){let Ae=(Q=ve==null?void 0:ve.split("."))==null?void 0:Q[((Z=ve==null?void 0:ve.split("."))==null?void 0:Z.length)-1];W[Ae]=U==null?void 0:U[ve]}else W[ve]=U==null?void 0:U[ve];return W});let X=(L=(C=R==null?void 0:R.compData)==null?void 0:C.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:L.contents;X=(O=re.getEqualChild(X))==null?void 0:O.filter(U=>(U==null?void 0:U.label)!=="操作");let ue=re.tableToForm(ae,X);if(S==null||S.forEach(U=>{var W,Z,Q,ve,Ae;for(let te in U)(U==null?void 0:U[te])==="LoginUser"&&(U[te]=((W=gt.value)==null?void 0:W.姓名)||((Z=gt.value)==null?void 0:Z.account)||((Q=gt.value)==null?void 0:Q.账号)),!((ve=ue==null?void 0:ue[0])!=null&&ve.find(A=>{var se;return(A==null?void 0:A.key)===te||((se=A==null?void 0:A.key)==null?void 0:se.includes(te))}))&&!(ue!=null&&ue.find(A=>{var se;return(A==null?void 0:A.key)===te||((se=A==null?void 0:A.key)==null?void 0:se.includes(te))}))||(((Ae=U[te])==null?void 0:Ae[0])!=="!"?ue=ue==null?void 0:ue.filter(A=>{var se,G;return((se=A==null?void 0:A.find(fe=>{var we;return(fe==null?void 0:fe.key)===te||((we=fe==null?void 0:fe.key)==null?void 0:we.includes(te))}))==null?void 0:se.value)===U[te]||Array.isArray(U==null?void 0:U[te])&&((G=U==null?void 0:U[te])==null?void 0:G.find(fe=>{var we;return((we=A==null?void 0:A.find(_e=>{var Ue;return(_e==null?void 0:_e.key)===te||((Ue=_e==null?void 0:_e.key)==null?void 0:Ue.includes(te))}))==null?void 0:we.value)===fe}))}):ue=ue==null?void 0:ue.filter(A=>{var se;return((se=A==null?void 0:A.find(G=>{var fe;return(G==null?void 0:G.key)===te||((fe=G==null?void 0:G.key)==null?void 0:fe.includes(te))}))==null?void 0:se.value)!==U[te]}))}),(ue==null?void 0:ue.length)===0){let U=a==null?void 0:a.contents;return U.push({key:"hideContents",contents:!0}),U}}}return a==null?void 0:a.contents},Tp=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:"textBackRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Bp=a=>{var l,r,n,i,o;if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let d=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=re.analyzeSplitToContent(c,","))==null?void 0:l.map(g=>((g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g));let u=(c==null?void 0:c[2])??"Center",y=(c==null?void 0:c[0])??"Picture";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=(r=re.analyzeSplitToContent(c,","))==null?void 0:r.map(g=>((g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g));let b=(o=(i=(n=Ep.value)==null?void 0:n.filter(g=>{var p;return(g==null?void 0:g.path)===((p=a==null?void 0:a.groupName)==null?void 0:p[0])}))==null?void 0:i[0])==null?void 0:o.children;return b=(b==null?void 0:b.filter(g=>c==null?void 0:c.find(p=>p===(g==null?void 0:g.name))))??[],(c==null?void 0:c.length)>0&&(b==null?void 0:b.length)===0&&(c==null||c.forEach(g=>{b.push({url:"file:///"+(g==null?void 0:g.replaceAll("\\","/"))})})),b[0]={...b==null?void 0:b[0],position:u,fileType:y},d.push({key:"backGround",contents:b}),d}return a==null?void 0:a.contents},Np=a=>{const l=wc(a==null?void 0:a.filter);return l?of(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},Ap=a=>{let l=parseInt(a==null?void 0:a.filter);l=1/l;let r=a==null?void 0:a.contents;return r.push({key:"rowPosition",contents:l}),r},zp=a=>{const l=wc(a==null?void 0:a.filter);if(!l)return a==null?void 0:a.contents;let r=a==null?void 0:a.contents;return r.push({key:"numPosition",contents:l}),r},Mp=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 r=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(r)?a==null?void 0:a.filter:r}),l}return a==null?void 0:a.contents},Ip=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},Op=a=>{var r;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(n=>{var i;return(n==null?void 0:n.key)==="tableContents"&&(n.contents=(i=n.contents)==null?void 0:i.slice(0,parseInt(a==null?void 0:a.filter))),n})},Lp=async a=>{var l,r,n,i,o,d,c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me,ue,U;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(Z=>((Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=re.shuffle(Z.contents)),Z));if((a==null?void 0:a.filter)==="Auto"){let W=(n=(r=a==null?void 0:a.contents)==null?void 0:r.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:n.contents;Array.isArray(W==null?void 0:W[0])&&(W=W==null?void 0:W[0]),W=re.getColumnChild(W);let Z=W==null?void 0:W.filter(fe=>(fe==null?void 0:fe.filter)&&(fe==null?void 0:fe.filter)!==""),Q=new Map,ve=[];Z==null||Z.forEach(fe=>{var we,_e;Q.get((we=fe==null?void 0:fe.menus)==null?void 0:we.join("/"))||(Q.set((_e=fe==null?void 0:fe.menus)==null?void 0:_e.join("/"),fe),ve.push(fe))});let Ae=(o=(i=xn==null?void 0:xn.value)==null?void 0:i.find(fe=>(fe==null?void 0:fe.condition)==="child"))==null?void 0:o.value,te=ve==null?void 0:ve.map(fe=>{var we,_e,Ue;return fe=(we=fe==null?void 0:fe.menus)==null?void 0:we.join("/"),(fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])==="/"&&((Ue=(_e=xn==null?void 0:xn.value)==null?void 0:_e.find(ra=>(ra==null?void 0:ra.condition)==="child"))==null?void 0:Ue.parentContent)+"/"!==fe?fe=fe+Ae:(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}),A=ve==null?void 0:ve.map(fe=>fe==null?void 0:fe.groups),se=te==null?void 0:te.map(async fe=>{let we=await qr(fe,!1);return{path:fe,contents:we}});se=await Promise.all(se);let G=se==null?void 0:se.map((fe,we)=>{var Ue,ra,H,Ge,Me,Le,Ie;let _e=(Ue=fe==null?void 0:fe.contents)==null?void 0:Ue.filter(de=>{var De,Je;return(de==null?void 0:de.name)===((Je=A==null?void 0:A[we])==null?void 0:Je[((De=A==null?void 0:A[we])==null?void 0:De.length)-1])});return _e=(Ge=(H=(ra=_e==null?void 0:_e[0])==null?void 0:ra.compData)==null?void 0:H.find(de=>(de==null?void 0:de.key)==="tableContents"))==null?void 0:Ge.contents,(fe==null?void 0:fe.path)===((Le=(Me=xn==null?void 0:xn.value)==null?void 0:Me.find(de=>(de==null?void 0:de.condition)==="child"))==null?void 0:Le.parentContent)&&(_e=((Ie=_e==null?void 0:_e.map(de=>{for(let De in de)if(de[De]===Ae)return de}))==null?void 0:Ie.filter(de=>de))??[]),_e??[]});if(G=G==null?void 0:G.map(fe=>(fe=fe==null?void 0:fe.map(we=>{var Ue;let _e={};for(let ra in we)if(Z!=null&&Z.find(H=>{var Ge,Me;return((Me=(Ge=H==null?void 0:H.words)==null?void 0:Ge[0])==null?void 0:Me.replaceAll("'",""))===ra})){let H=(Ue=Z==null?void 0:Z.find(Ge=>{var Me,Le;return((Le=(Me=Ge==null?void 0:Ge.words)==null?void 0:Me[0])==null?void 0:Le.replaceAll("'",""))===ra}))==null?void 0:Ue.prop;_e[H]=we==null?void 0:we[ra]}return _e}),fe)),G=re.cartesianProduct(G),Array.isArray(G==null?void 0:G[0])&&(G=G==null?void 0:G[0]),(G==null?void 0:G.length)>0&&((g=(c=(d=Z==null?void 0:Z[0])==null?void 0:d.menus)==null?void 0:c.join("/"))==null?void 0:g[((b=(y=(u=Z==null?void 0:Z[0])==null?void 0:u.menus)==null?void 0:y.join("/"))==null?void 0:b.length)-1])==="/")return(p=a==null?void 0:a.contents)==null?void 0:p.map(we=>{var _e;return(we==null?void 0:we.key)==="tableContents"&&(G==null?void 0:G.length)>0&&(we.contents=((_e=we.contents)==null?void 0:_e.length)>0?we.contents:G),we})}if((a==null?void 0:a.filter)==="Manual"){let W=[],Z=[],Q=(m=(D=a==null?void 0:a.contents)==null?void 0:D.find(A=>(A==null?void 0:A.key)==="filter"))==null?void 0:m.contents;(Q==null?void 0:Q[(Q==null?void 0:Q.length)-1])===")"?Q=(C=(F=Q==null?void 0:Q.replace("(",Ar))==null?void 0:F.split(Ar))==null?void 0:C[0]:Q="",Q!==""&&(W=((O=(L=Q==null?void 0:Q.split("*"))==null?void 0:L[0])==null?void 0:O.split(":"))??[],Z=((_=(k=(x=(E=(S=Q==null?void 0:Q.split("*"))==null?void 0:S[1])==null?void 0:E.replace("{",Ar))==null?void 0:x.split(Ar))==null?void 0:k[0])==null?void 0:_.split(":"))??[]);let ve=(R=(I=a==null?void 0:a.contents)==null?void 0:I.find(A=>(A==null?void 0:A.key)==="filter"))==null?void 0:R.contents;ve=(X=(ae=ve==null?void 0:ve.replace("(",Ar))==null?void 0:ae.split(Ar))==null?void 0:X[1],ve=ve==null?void 0:ve.slice(0,(ve==null?void 0:ve.length)-1);let Ae=(me=a==null?void 0:a.contents)==null?void 0:me.map(A=>{var se,G,fe,we,_e,Ue,ra,H,Ge;return(A==null?void 0:A.key)==="header"&&((se=A==null?void 0:A.contents)!=null&&se.every(Me=>(Me==null?void 0:Me.mainKey)!==!0)&&Array.isArray(A==null?void 0:A.contents)&&!Array.isArray((G=A==null?void 0:A.contents)==null?void 0:G[0])?A.contents=(fe=A==null?void 0:A.contents)==null?void 0:fe.map((Me,Le)=>{var Ie,de,De;return Me!=null&&Me.isMainPath||(Le===0?(Me.mainKey=!0,Me.formType="Select",Me.bindMenus=W,Me.groups=((Ie=Me.groups)==null?void 0:Ie.length)===0?Z:Me.groups,Me.words=((de=Me.words)==null?void 0:de.length)===0?[Me==null?void 0:Me.prop]:Me.words,Me.filter=ve,(!(Me!=null&&Me.menus)||((De=Me==null?void 0:Me.menus)==null?void 0:De.length)===0)&&(Me.menus=W)):(Me.mainKey=!1,Me.bindMenus=W)),Me}):Array.isArray((we=A==null?void 0:A.contents)==null?void 0:we[0])&&((ra=(Ue=(_e=A==null?void 0:A.contents)==null?void 0:_e[0])==null?void 0:Ue.filter(()=>(W==null?void 0:W.length)>0))==null?void 0:ra.length)>0&&(A.contents[0]=(Ge=(H=A==null?void 0:A.contents)==null?void 0:H[0])==null?void 0:Ge.map((Me,Le)=>{var Ie,de,De;return Me!=null&&Me.isMainPath||(Le===0?(Me.mainKey=!0,Me.formType="Select",Me.bindMenus=W,Me.groups=((Ie=Me.groups)==null?void 0:Ie.length)===0?Z:Me.groups,Me.words=((de=Me.words)==null?void 0:de.length)===0?[Me==null?void 0:Me.prop]:Me.words,Me.filter=ve,(!(Me!=null&&Me.menus)||Array.isArray(Me==null?void 0:Me.menus)&&((De=Me==null?void 0:Me.menus)==null?void 0:De.length)===0)&&(W==null?void 0:W.length)>0&&(Me.menus=W)):(Me.mainKey=!1,Me.bindMenus=W)),Me}))),A}),te=(ue=Ae==null?void 0:Ae.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:ue.contents;if(Array.isArray(te==null?void 0:te[0])&&(te=te==null?void 0:te[0]),te=re.getColumnChild(te),te!=null&&te.some(A=>{var se,G;return((G=A==null?void 0:A.menus)==null?void 0:G[((se=A==null?void 0:A.menus)==null?void 0:se.length)-1])===""})){let A=(U=xn==null?void 0:xn.value)==null?void 0:U.find(se=>(se==null?void 0:se.condition)==="child");Ae=wp(Ae,A)}return Ae}if((a==null?void 0:a.filter)==="Chart"){let W=a==null?void 0:a.contents;return W.push({key:"newType",contents:"Chart"}),W}if((a==null?void 0:a.filter)==="Carousel"){let W=a==null?void 0:a.contents;return W.push({key:"newType",contents:"Carousel"}),W}return a==null?void 0:a.contents},Rp=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}if((a==null?void 0:a.filter)==="Frameless"){let l=a==null?void 0:a.contents;return l.push({key:"TableType",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},$p=a=>{var n,i,o,d,c,u,y,b,g,p,D,m;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((i=(n=l==null?void 0:l.replace(":",Ar))==null?void 0:n.split(Ar))==null?void 0:i[1])),l=(o=l==null?void 0:l.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(c=(d=l==null?void 0:l.split("="))==null?void 0:d[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 F=(u=l==null?void 0:l.split("="))==null?void 0:u[0],C=(y=l==null?void 0:l.split("="))==null?void 0:y[1];(b=C==null?void 0:C.slice(1,C==null?void 0:C.length))!=null&&b.includes("$")&&(C=(D=(p=(g=xn==null?void 0:xn.value)==null?void 0:g.filter(L=>(L==null?void 0:L.condition)==="child"))==null?void 0:p[0])==null?void 0:D.value),l=F+"="+C}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 r=re.calculatorAndToOr(l);if((r==null?void 0:r.length)>0){let F=[];return r==null||r.forEach(L=>{let O={};for(let S in L){let E=S;E!=null&&E.includes("[")||(O[E]=L[S])}F.push(O)}),(m=a==null?void 0:a.contents)==null?void 0:m.map(L=>{var S,E,x;let O=(E=(S=a==null?void 0:a.contents)==null?void 0:S.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:E.contents;if(O=(x=re.getEqualChild(O))==null?void 0:x.filter(k=>(k==null?void 0:k.label)!=="操作"),(L==null?void 0:L.key)==="tableContents"){let _=re.tableToForm(L==null?void 0:L.contents,O);F==null||F.forEach(I=>{var R,ae;for(let X in I)!((R=_==null?void 0:_[0])!=null&&R.find(me=>{var ue;return(me==null?void 0:me.key)===X||((ue=me==null?void 0:me.key)==null?void 0:ue.includes(X))}))&&!(_!=null&&_.find(me=>{var ue;return(me==null?void 0:me.key)===X||((ue=me==null?void 0:me.key)==null?void 0:ue.includes(X))}))||(((ae=I[X])==null?void 0:ae[0])!=="!"?_=_==null?void 0:_.filter(me=>{var ue,U;return((ue=me==null?void 0:me.find(W=>{var Z;return(W==null?void 0:W.key)===X||((Z=W==null?void 0:W.key)==null?void 0:Z.includes(X))}))==null?void 0:ue.value)===I[X]||Array.isArray(I==null?void 0:I[X])&&((U=I==null?void 0:I[X])==null?void 0:U.find(W=>{var Z;return((Z=me==null?void 0:me.find(Q=>{var ve;return(Q==null?void 0:Q.key)===X||((ve=Q==null?void 0:Q.key)==null?void 0:ve.includes(X))}))==null?void 0:Z.value)===W}))}):_=_==null?void 0:_.filter(me=>{var ue;return((ue=me==null?void 0:me.find(U=>{var W;return(U==null?void 0:U.key)===X||((W=U==null?void 0:U.key)==null?void 0:W.includes(X))}))==null?void 0:ue.value)!==(I[X]==="!"?"":I==null?void 0:I[X])}))}),(_==null?void 0:_.length)===0?L.contents=[]:L.contents=_==null?void 0:_.map(I=>{let R={};return I==null||I.forEach(ae=>{R[ae==null?void 0:ae.key]=ae==null?void 0:ae.value}),R})}return L})}return a==null?void 0:a.contents},Vp=a=>a==null?void 0:a.contents,Fp=a=>a==null?void 0:a.contents,Pp=a=>{var l,r,n,i;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let o=(n=(r=a==null?void 0:a.filter)==null?void 0:r.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:n.split(",");return(i=a==null?void 0:a.contents)==null?void 0:i.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=Ct(c.contents,o)),c))}return a==null?void 0:a.contents},jp=a=>{var r,n,i,o,d;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(n=(r=l==null?void 0:l.replace("(",Ar))==null?void 0:r.split(Ar))==null?void 0:n[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=re.analyzeSplitToContent(c,","))==null?void 0:i.map(g=>((g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g));let u=c==null?void 0:c[0];(u==null?void 0:u[0])==="("&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1));let y=(c==null?void 0:c[1])??"Up",b=(o=a==null?void 0:a.contents)==null?void 0:o.map(g=>{var p,D;if(y==="Up"){if((g==null?void 0:g.key)==="extraButton"){let m=(p=u==null?void 0:u.split(","))==null?void 0:p.map(F=>({label:F,prop:F}));g.contents=[...m??[],...g.contents]}}else if(y==="Line"&&(g==null?void 0:g.key)==="rowButton"){let m=(D=u==null?void 0:u.split(","))==null?void 0:D.map(F=>({label:F,prop:F}));g.contents=[...m??[],...g.contents]}return g});if(y==="Bottom"||y==="Down"){let g=(d=u==null?void 0:u.split(","))==null?void 0:d.map(p=>({label:p,prop:p}));b.push({key:"bottomButton",contents:g})}return b}return a==null?void 0:a.contents},Hp=a=>a==null?void 0:a.contents,Up=a=>{var r;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!==""?(r=a==null?void 0:a.contents)==null?void 0:r.map(i=>{var o;return(i==null?void 0:i.key)==="rowButton"&&(i.contents=(o=l==null?void 0:l.split(","))==null?void 0:o.map(d=>({label:d,prop:d}))),i}):a==null?void 0:a.contents},qp=a=>{var r;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 n=a==null?void 0:a.contents,i=(r=l==null?void 0:l.split(","))==null?void 0:r.map(o=>({label:o,prop:o}));return n.push({key:"bottomButton",contents:i}),n}return a==null?void 0:a.contents},Wp=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(r=>{var n;return(r==null?void 0:r.key)==="formContent"&&(r.contents=(n=r.contents)==null?void 0:n.map(i=>(i.isNoClick=!0,i))),r}),l!=null&&l.find(r=>(r==null?void 0:r.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(r=>(r==null?void 0:r.key)!=="extraButton"&&(r==null?void 0:r.key)!=="rowButton")),l}return a==null?void 0:a.contents},Gp=a=>{var l;if(a!=null&&a.filter){const r=parseInt(a==null?void 0:a.filter);return!r||Number.isNaN(r)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o;return(i==null?void 0:i.key)==="formContent"&&(i.contents=(o=i.contents)==null?void 0:o.map(d=>(d.width=r,d))),i})}return a==null?void 0:a.contents},Kp=a=>{var l,r,n,i;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const o=parseInt(a==null?void 0:a.filter);return!o||Number.isNaN(o)?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(c=>{var u;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(u=c.contents)==null?void 0:u.map(y=>(y.width=o,y))),c})}if(((n=a==null?void 0:a.filter)==null?void 0:n[0])==="["){let o=Li(a==null?void 0:a.filter),d=Array.isArray(o)?o.map(u=>parseInt(u)).filter(u=>!!u&&!Number.isNaN(u)):[];return d.length?(i=a==null?void 0:a.contents)==null?void 0:i.map(u=>{if((u==null?void 0:u.key)==="formContent"){const y=u.contents??[];u.contents=y.map((b,g)=>{const p=g+1;let D=0,m=0;for(let C=0;C<d.length;C++){if(m+=d[C],p<=m){D=C;break}C===d.length-1&&(D=d.length-1)}const F=d[D]||d[d.length-1]||1;return b.width=F,b})}return u}):a==null?void 0:a.contents}return a==null?void 0:a.contents},Yp=a=>{var l;if((a==null?void 0:a.filter)!==""){let 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=r==null?void 0:r.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o,d,c;return(i==null?void 0:i.key)==="header"&&(Array.isArray((o=i==null?void 0:i.contents)==null?void 0:o[0])?i.contents[0]=(c=i.contents[0])==null?void 0:c.map(u=>(r!=null&&r.find(y=>y===(u==null?void 0:u.prop))&&(u.fixed="left"),u)):i.contents=(d=i.contents)==null?void 0:d.map(u=>(r!=null&&r.find(y=>y===(u==null?void 0:u.prop))&&(u.fixed="left"),u))),i})}return a==null?void 0:a.contents},Jp=a=>{var l;if((a==null?void 0:a.filter)!==""){let r=a==null?void 0:a.filter;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(",");const n=o=>(r!=null&&r.find(d=>d===(o==null?void 0:o.prop))&&(o.required=!0),o!=null&&o.children&&Array.isArray(o.children)&&(o.children=o.children.map(d=>n(d))),o);return(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var d,c,u;return(o==null?void 0:o.key)==="header"&&(Array.isArray((d=o==null?void 0:o.contents)==null?void 0:d[0])?o.contents[0]=(u=o.contents[0])==null?void 0:u.map(y=>n(y)):o.contents=(c=o.contents)==null?void 0:c.map(y=>n(y))),o})}return a==null?void 0:a.contents},Xp=async a=>{var n,i,o,d,c,u,y,b,g,p,D,m,F,C,L,O,S;const l=z.useUnit(z.pinia),{chooseTitle:r}=z.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let E=await qr(((i=(n=r==null?void 0:r.value)==null?void 0:n[0])==null?void 0:i.parentContent)??((d=(o=r==null?void 0:r.value)==null?void 0:o[0])==null?void 0:d.relatedContent),!1),x=(u=(c=r==null?void 0:r.value)==null?void 0:c[0])==null?void 0:u.value;(b=(y=E==null?void 0:E[0])==null?void 0:y.compData)!=null&&b.find(R=>(R==null?void 0:R.key)==="header")?E=(g=E==null?void 0:E[0])==null?void 0:g.compData:E=(D=(p=E==null?void 0:E.filter(R=>{var ae;return(ae=R==null?void 0:R.compData)==null?void 0:ae.find(X=>(X==null?void 0:X.key)==="header")}))==null?void 0:p[0])==null?void 0:D.compData;let k=(m=E==null?void 0:E.find(R=>(R==null?void 0:R.key)==="header"))==null?void 0:m.contents;Array.isArray(k==null?void 0:k[0])&&(k=k==null?void 0:k[0]),k=((F=k==null?void 0:k.find(R=>R==null?void 0:R.isMainKey))==null?void 0:F.prop)??((C=k==null?void 0:k[0])==null?void 0:C.prop);let _=(O=(L=E==null?void 0:E.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:L.contents)==null?void 0:O.find(R=>(R==null?void 0:R[k])===x);return(S=a==null?void 0:a.contents)==null?void 0:S.map(R=>{var ae;return(R==null?void 0:R.key)==="formContent"&&(R.contents=(ae=R.contents)==null?void 0:ae.map(X=>(X.value=_==null?void 0:_[X==null?void 0:X.prop],X))),R})}return a==null?void 0:a.contents},Zp=a=>{var l,r,n,i,o;if((l=a==null?void 0:a.extra)!=null&&l.row){let d=a==null?void 0:a.filter;if(d!=null&&d.includes("*")&&(d="({"+((n=(r=d==null?void 0:d.replace("{",Ar))==null?void 0:r.split(Ar))==null?void 0:n[1])),d=(i=d==null?void 0:d.replaceAll("{",""))==null?void 0:i.replaceAll("}",""),(d==null?void 0:d[0])!=="("&&(d="("+d+")"),d.slice(1,(d==null?void 0:d.length)-1)==="undefined")return a==null?void 0:a.contents;let c=re.calculatorAndToOr(d),u=c==null?void 0:c[0],y=(o=a==null?void 0:a.extra)==null?void 0:o.row,b=[];for(let g in u)(u==null?void 0:u[g])===(y==null?void 0:y[g])?b.push(!0):b.push(!1);return b!=null&&b.every(g=>g===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Qp=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},ef=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},af=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},lf=a=>{var l;if(a!=null&&a.filter){let r=a==null?void 0:a.contents,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=(l=re.analyzeSplitToContent(n,","))==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)),r.push({key:"stepName",contents:n}),r}return a==null?void 0:a.contents},rf=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},xc={onNumSlice:Op,onRandomContents:Lp,onConditionContents:$p,onFatherPaceContents:Vp,onPaceContents:Fp,onMainTagContents:Pp,onButtonContents:jp,onPamButtonContents:Hp,onRowButtonContents:Up,onRelated:Xp,onRowNum:Kp,onFixRow:Yp,onReqItem:Jp,onBottomButtonContents:qp,onConditionContent:Zp,onTabs:Qp,onSinChoice:ef,onTextSize:Mp,onTextRGBA:Ip,onTextBackRGBA:Tp,onPosition:Np,onColumnNum:Ap,onSize:zp,onShowType:af,onStepName:lf,onStep:rf,onInterfaceTypeContents:Rp,onBackGround:Bp,onMaxColumn:Gp,onEditRead:Wp,onShowHide:Dp},nf=async(a,l,r="")=>{var d,c,u,y,b,g,p,D,m,F,C,L;let n="";if(((d=a==null?void 0:a.find(O=>(O==null?void 0:O.key)==="filter"))==null?void 0:d.contents)!==""&&(n=(c=a==null?void 0:a.find(O=>(O==null?void 0:O.key)==="filter"))==null?void 0:c.contents),n===""||!n)return a;(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n=(y=(u=n==null?void 0:n.replace("(",Ar))==null?void 0:u.split(Ar))==null?void 0:y[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(b=re.analyzeSplitToContent(n,","))==null?void 0:b.map(O=>((O==null?void 0:O[(O==null?void 0:O.length)-1])===","&&(O=O==null?void 0:O.slice(0,(O==null?void 0:O.length)-1)),O!=null&&O.includes("(")||(O=O==null?void 0:O.replaceAll(":","=")),O)),o=a;for(let O in i){let S,E="";S=(D=(p=(g=i==null?void 0:i[O])==null?void 0:g.replace("=",Ar))==null?void 0:p.split(Ar))==null?void 0:D[0],E=(C=(F=(m=i==null?void 0:i[O])==null?void 0:m.replace("=",Ar))==null?void 0:F.split(Ar))==null?void 0:C[1];let x=(L=Mn==null?void 0:Mn.find(k=>(k==null?void 0:k.key)===S))==null?void 0:L.value;if(x){const k=xc[x];o=await k({contents:o,filter:E,extra:l,groupName:r})}}return o},Vo=async(a,l,r="")=>{var c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae;let n="";if(((c=a==null?void 0:a.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:c.contents)!==""&&(n=(u=a==null?void 0:a.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:u.contents),n===""||!n)return a;(n==null?void 0:n[0])===","&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n==null?void 0:n[0])==="@"||(n=(b=(y=n==null?void 0:n.replace("(",Ar))==null?void 0:y.split(Ar))==null?void 0:b[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(g=re.analyzeSplitToContent(n,","))==null?void 0:g.map(X=>((X==null?void 0:X[(X==null?void 0:X.length)-1])===","&&(X=X==null?void 0:X.slice(0,(X==null?void 0:X.length)-1)),X!=null&&X.includes("(")||(X=X==null?void 0:X.replaceAll(":","=")),X)),o=a,d=new Map;i==null||i.forEach(X=>{var ue,U,W;let me=(ue=X==null?void 0:X.split("="))==null?void 0:ue[0];if(me==="@MainParam"&&d.get(me)){let Z=d.get(me);Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1);let Q=(W=(U=X==null?void 0:X.replace("{",Ar))==null?void 0:U.split(Ar))==null?void 0:W[1];Q=Z+","+Q,d.set(me,Q)}else me==="@Button"&&d.get(me)?d.set(X,X):d.set(me,X)}),i=Array.from(d.values()),i=i==null?void 0:i.sort((X,me)=>{var ue,U;return((ue=Mn==null?void 0:Mn.find(W=>me==null?void 0:me.includes(W==null?void 0:W.key)))==null?void 0:ue.order)-((U=Mn==null?void 0:Mn.find(W=>X==null?void 0:X.includes(W==null?void 0:W.key)))==null?void 0:U.order)});for(let X in i){let me,ue="";(p=i==null?void 0:i[X])!=null&&p.includes("(")&&((D=i==null?void 0:i[X])!=null&&D.includes("@If"))?(me=(C=(F=(m=i==null?void 0:i[X])==null?void 0:m.replace("(",Ar))==null?void 0:F.split(Ar))==null?void 0:C[0],ue="("+((S=(O=(L=i==null?void 0:i[X])==null?void 0:L.replace("(",Ar))==null?void 0:O.split(Ar))==null?void 0:S[1])):(me=(k=(x=(E=i==null?void 0:i[X])==null?void 0:E.replace("=",Ar))==null?void 0:x.split(Ar))==null?void 0:k[0],ue=(R=(I=(_=i==null?void 0:i[X])==null?void 0:_.replace("=",Ar))==null?void 0:I.split(Ar))==null?void 0:R[1]);let U=(ae=Mn==null?void 0:Mn.find(W=>(W==null?void 0:W.key)===me))==null?void 0:ae.value;if(U){const W=xc[U];o=await W({contents:o,filter:ue,extra:l,groupName:r})}}return o},wc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const r=l.slice(1,-1).split(",").map(n=>Number(n.trim()));return r.length<2||r.some(n=>Number.isNaN(n))?null:[r[0],r[1]]},of=(a,l)=>{var F,C,L,O,S;const r=Array.isArray(a)?a:[],n=r.find(E=>(E==null?void 0:E.key)==="formContent"),i=Array.isArray(n==null?void 0:n.contents)?n.contents:[],o=((F=r.find(E=>(E==null?void 0:E.key)==="_gridLayoutMeta"))==null?void 0:F.contents)??{},d=(i==null?void 0:i[0])??{};let c=((C=l==null?void 0:l.position)==null?void 0:C[0])??(o==null?void 0:o._positionStartRow)??(d==null?void 0:d._positionStartRow),u=((L=l==null?void 0:l.position)==null?void 0:L[1])??(o==null?void 0:o._positionRowSpan)??(d==null?void 0:d._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!u||Number.isNaN(u)||u<1)&&(u=1);let y=((O=l==null?void 0:l.size)==null?void 0:O[0])??(o==null?void 0:o._sizeStart)??(d==null?void 0:d._sizeStart),b=((S=l==null?void 0:l.size)==null?void 0:S[1])??(o==null?void 0:o._sizeEnd)??(d==null?void 0:d._sizeEnd);(y===void 0||Number.isNaN(y))&&(y=0),(b===void 0||Number.isNaN(b))&&(b=1),y=Math.max(0,Math.min(1,y)),b=Math.max(0,Math.min(1,b)),b<=y&&(y=0,b=1);const g=b-y,p=Math.max(1,Math.round(1/g));let D=r.map(E=>{if((E==null?void 0:E.key)!=="formContent")return E;const x=Array.isArray(E==null?void 0:E.contents)?E.contents:[];return{...E,contents:x.map(k=>({...k,width:p,_positionStartRow:c,_positionRowSpan:u,_sizeStart:y,_sizeEnd:b}))}});const m={_positionStartRow:c,_positionRowSpan:u,_sizeStart:y,_sizeEnd:b};return D.some(E=>(E==null?void 0:E.key)==="_gridLayoutMeta")?D=D.map(E=>(E==null?void 0:E.key)==="_gridLayoutMeta"?{...E,contents:m}:E):D.push({key:"_gridLayoutMeta",contents:m}),D};let Ni="$R";const tf=z.useUnit(z.pinia),{selectTitle:sf}=z.storeToRefs(tf);let cf=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],uf=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],df=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],pf=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ks=async(a,l,r=!0)=>{let n=[],i=a==null?void 0:a.map(async o=>{var g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We,V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe,Oe,$e,ne,qe,na,fa,ze,Be,Ke,Ee,ye,$a,wl,el,Pl,bl,jl,ll,Hl,Ga,Jl,Xl,ar,Sl,pr,ya,ol,vl,Bl,Ua,_a,rl,Te,oa,Ya,pe,wa,Pa,pl,Il,Qa,kl,Ma;let d=(m=(D=(p=(g=o==null?void 0:o.contents)==null?void 0:g.find(ea=>{var ma;return(ma=ea==null?void 0:ea.key)==null?void 0:ma.includes("struct")}))==null?void 0:p.value)==null?void 0:D[0])==null?void 0:m.类型,c=Object.values(o==null?void 0:o.name);c=c==null?void 0:c.reverse();let u=(F=o==null?void 0:o.contents)==null?void 0:F.map(ea=>ea==null?void 0:ea.key),y={comp:d,isShow:o==null?void 0:o.is_show,name:c==null?void 0:c[0],id:o==null?void 0:o.object_id,order_no:o==null?void 0:o.order_no,relatedTables:u,menuFilter:(C=o==null?void 0:o.filter)==null?void 0:C.menuFilter,status:o==null?void 0:o.status,fatherSyncContents:(L=o==null?void 0:o.filter)==null?void 0:L.fatherSyncs,relatedQuotes:(O=o==null?void 0:o.filter)==null?void 0:O.quotes,sonSyncContents:(S=o==null?void 0:o.filter)==null?void 0:S.sonSyncs,nameContents:(E=z.cloneDeep(c))==null?void 0:E.reverse(),isHidden:!1,calculatorFilters:(R=(I=(_=(k=(x=o==null?void 0:o.contents)==null?void 0:x.find(ea=>{var ma;return(ma=ea==null?void 0:ea.key)==null?void 0:ma.includes("struct")}))==null?void 0:k.value)==null?void 0:_[0])==null?void 0:I.算法)==null?void 0:R.contents};for(let ea in c)parseInt(ea)>=1&&(y[`name${parseInt(ea)-1}`]=c[ea]);let b=Array.isArray((ae=o==null?void 0:o.filter)==null?void 0:ae.menuFilter)?(X=o==null?void 0:o.filter)==null?void 0:X.menuFilter:[];if(((me=b==null?void 0:b.filter(ea=>ea==null?void 0:ea.includes("@If")))==null?void 0:me.length)>0){let ea=b==null?void 0:b.filter(Ba=>Ba==null?void 0:Ba.includes("@If"));ea=ea==null?void 0:ea[0],ea=(U=(ue=ea==null?void 0:ea.replace("(",Ni))==null?void 0:ue.split(Ni))==null?void 0:U[1],ea=ea==null?void 0:ea.slice(0,(ea==null?void 0:ea.length)-1),ea!=null&&ea.includes("*")&&(ea=(Z=(W=ea==null?void 0:ea.replace("{",Ni))==null?void 0:W.split(Ni))==null?void 0:Z[1],ea=ea==null?void 0:ea.replace("}","")),ea=re.calculatorAndToOr(ea);let ma=(l==null?void 0:l.originPath)??"";(ma==null?void 0:ma[(ma==null?void 0:ma.length)-1])==="/"&&(ma=ma==null?void 0:ma.slice(0,(ma==null?void 0:ma.length)-1));let Ha=await qr(ma,!1),ka=(Q=Ha==null?void 0:Ha.filter(Ba=>(Ba==null?void 0:Ba.comp)==="Table"))==null?void 0:Q[0];ka=(Ae=(ve=ka==null?void 0:ka.compData)==null?void 0:ve.find(Ba=>(Ba==null?void 0:Ba.key)==="tableContents"))==null?void 0:Ae.contents;let Ul=(A=(te=sf.value)==null?void 0:te.find(Ba=>(Ba==null?void 0:Ba.condition)==="child"))==null?void 0:A.value;ka=(se=ka==null?void 0:ka.map(Ba=>{for(let Rl in Ba)if((Ba==null?void 0:Ba[Rl])===Ul)return Ba}))==null?void 0:se.filter(Ba=>Ba),ka=ka==null?void 0:ka[0],ea=ea==null?void 0:ea[0];let Gl=[];for(let Ba in ea){let Rl="";Xa.isObject(ka)&&(Rl=(fe=(G=Object.keys(ka))==null?void 0:G.filter(Fr=>Fr==null?void 0:Fr.includes("."+Ba)))==null?void 0:fe[0]),Rl!==""&&(ka!=null&&ka[Rl])&&(ea==null?void 0:ea[Ba])===(ka==null?void 0:ka[Rl])||ka!=null&&ka[Ba]&&(ea==null?void 0:ea[Ba])===(ka==null?void 0:ka[Ba])?Gl.push(!0):Gl.push(!1)}if(Gl!=null&&Gl.some(Ba=>Ba===!1)&&((_e=l==null?void 0:l.originPath)==null?void 0:_e[((we=l==null?void 0:l.originPath)==null?void 0:we.length)-1])!=="/")return}if(d==="Table"||d==="Method"){!r&&((Ue=y==null?void 0:y.fatherSyncContents)==null?void 0:Ue.length)>0;let ea=((ra=o==null?void 0:o.contents)==null?void 0:ra.find(Ze=>{var La;return(La=Ze==null?void 0:Ze.key)==null?void 0:La.includes("content")}))||[],ma=[];y.comp="Table",ea.value=(H=ea==null?void 0:ea.value)==null?void 0:H.sort((Ze,La)=>parseInt(Ze==null?void 0:Ze.id)-parseInt(La==null?void 0:La.id)),ea.value=(Ge=ea==null?void 0:ea.value)==null?void 0:Ge.map(Ze=>{let La={};for(let hl in Ze)JSON.stringify(Ze==null?void 0:Ze[hl])==="{}"?La[hl]="":La[hl]=Ze==null?void 0:Ze[hl];return La}),ma.push({key:"tableContents",contents:ea==null?void 0:ea.value});let Ha=(De=(de=(Ie=(Le=(Me=o==null?void 0:o.contents)==null?void 0:Me.find(Ze=>{var La;return(La=Ze==null?void 0:Ze.key)==null?void 0:La.includes("struct")}))==null?void 0:Le.value)==null?void 0:Ie[0])==null?void 0:de.结构)==null?void 0:De.contents;Array.isArray(Ha==null?void 0:Ha[0])?Ha[0]=(Je=Ha==null?void 0:Ha[0])==null?void 0:Je.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="sort"&&(Ze==null?void 0:Ze.prop)!=="relatedId"):Ha=Ha==null?void 0:Ha.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="sort"&&(Ze==null?void 0:Ze.prop)!=="relatedId"),ma.push({key:"header",contents:Ha}),ma.push({key:"filter",contents:(le=(P=(V=(We=(Sa=o==null?void 0:o.contents)==null?void 0:Sa.find(Ze=>{var La;return(La=Ze==null?void 0:Ze.key)==null?void 0:La.includes("struct")}))==null?void 0:We.value)==null?void 0:V[0])==null?void 0:P.引用)==null?void 0:le.contents}),ma.push({key:"calculator",contents:y==null?void 0:y.calculatorFilters});let ka=cf,Ul=z.cloneDeep(uf);d==="Method"&&Ul.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Ha==null?void 0:Ha[0])&&((ce=Ha==null?void 0:Ha[0])==null?void 0:ce.prop)==="disabled"&&(ka=df,Ul=pf);const Gl=["推力","真空","压力","温度","流量"],Ba=y.name;Ba&&Gl.includes(Ba)&&(ka=[...ka],ka.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let Rl=[];if(!Array.isArray(Ha==null?void 0:Ha[0])&&(Ha!=null&&Ha.some(Ze=>{var La;return(Ze==null?void 0:Ze.calculatorFilter)&&((La=Ze==null?void 0:Ze.calculatorFilter)==null?void 0:La.includes("Manual"))}))){let Ze=(he=Ha==null?void 0:Ha.map(La=>La==null?void 0:La.calculatorFilter))==null?void 0:he.filter(La=>La&&(La==null?void 0:La.includes("Manual")));Ze==null||Ze.forEach(La=>{var Ll;let hl=re.analyzeSplitToContent(La,",");if(hl=hl==null?void 0:hl.map(Ta=>((Ta==null?void 0:Ta[(Ta==null?void 0:Ta.length)-1])===","&&(Ta=Ta==null?void 0:Ta.slice(0,(Ta==null?void 0:Ta.length)-1)),Ta)),hl!=null&&hl.find(Ta=>(Ta==null?void 0:Ta.includes("Extent"))&&(Ta==null?void 0:Ta.includes("Row")))&&(hl!=null&&hl.find(Ta=>(Ta==null?void 0:Ta.includes("Button"))&&(Ta==null?void 0:Ta.includes(","))))){let Ta=hl==null?void 0:hl.find(Yr=>Yr==null?void 0:Yr.includes("@FunctionButton"));Ta=(Ll=Ta==null?void 0:Ta.split("="))==null?void 0:Ll[1],Ta=Ta==null?void 0:Ta.slice(1,(Ta==null?void 0:Ta.length)-1),Ta=Ta==null?void 0:Ta.split(","),Ta=Ta==null?void 0:Ta[(Ta==null?void 0:Ta.length)-1],Rl.push(Ta)}}),Rl=[...new Set(Rl)],Rl=Rl==null?void 0:Rl.map(La=>({label:La,prop:La,type:"methodButton"}))}else if(Array.isArray(Ha==null?void 0:Ha[0])&&((ua=re.getColumnChild(Ha==null?void 0:Ha[0]))!=null&&ua.some(Ze=>{var La;return(Ze==null?void 0:Ze.calculatorFilter)&&((La=Ze==null?void 0:Ze.calculatorFilter)==null?void 0:La.includes("Manual"))}))){let Ze=(Ve=(ia=re.getColumnChild(Ha==null?void 0:Ha[0]))==null?void 0:ia.map(La=>La==null?void 0:La.calculatorFilter))==null?void 0:Ve.filter(La=>La&&(La==null?void 0:La.includes("Manual")));Ze==null||Ze.forEach(La=>{var Ll;let hl=re.analyzeSplitToContent(La,",");if(hl=hl==null?void 0:hl.map(Ta=>((Ta==null?void 0:Ta[(Ta==null?void 0:Ta.length)-1])===","&&(Ta=Ta==null?void 0:Ta.slice(0,(Ta==null?void 0:Ta.length)-1)),Ta)),hl!=null&&hl.find(Ta=>(Ta==null?void 0:Ta.includes("Extent"))&&(Ta==null?void 0:Ta.includes("Row")))&&(hl!=null&&hl.find(Ta=>(Ta==null?void 0:Ta.includes("Button"))&&(Ta==null?void 0:Ta.includes(","))))){let Ta=hl==null?void 0:hl.find(Yr=>Yr==null?void 0:Yr.includes("@FunctionButton"));Ta=(Ll=Ta==null?void 0:Ta.split("="))==null?void 0:Ll[1],Ta=Ta==null?void 0:Ta.slice(1,(Ta==null?void 0:Ta.length)-1),Ta=Ta==null?void 0:Ta.split(","),Ta=Ta==null?void 0:Ta[(Ta==null?void 0:Ta.length)-1],Rl.push(Ta)}}),Rl=[...new Set(Rl)],Rl=Rl==null?void 0:Rl.map(La=>({label:La,prop:La,type:"methodButton"}))}if(ma.push({key:"extraButton",contents:ka}),ma.push({key:"rowButton",contents:[...Ul,...Rl]}),y.compData=await Vo(ma,l,y==null?void 0:y.nameContents),(va=y.compData)!=null&&va.find(Ze=>(Ze==null?void 0:Ze.key)==="tab")&&(y.tab=(Ce=(Ea=y.compData)==null?void 0:Ea.find(Ze=>(Ze==null?void 0:Ze.key)==="tab"))==null?void 0:Ce.contents),(Fa=y.compData)!=null&&Fa.find(Ze=>(Ze==null?void 0:Ze.key)==="step")&&(y.step=(da=(Da=y.compData)==null?void 0:Da.find(Ze=>(Ze==null?void 0:Ze.key)==="step"))==null?void 0:da.contents),(ja=y.compData)!=null&&ja.find(Ze=>(Ze==null?void 0:Ze.key)==="choice")&&(y.choice=(Fe=(sa=y.compData)==null?void 0:sa.find(Ze=>(Ze==null?void 0:Ze.key)==="choice"))==null?void 0:Fe.contents),(ha=y.compData)!=null&&ha.find(Ze=>(Ze==null?void 0:Ze.key)==="hideContents")&&(y.isHidden=((Oe=(Qe=y.compData)==null?void 0:Qe.find(Ze=>(Ze==null?void 0:Ze.key)==="hideContents"))==null?void 0:Oe.contents)??!1),($e=y.compData)!=null&&$e.find(Ze=>(Ze==null?void 0:Ze.key)==="newType")){let Ze=(qe=(ne=y.compData)==null?void 0:ne.find(La=>(La==null?void 0:La.key)==="newType"))==null?void 0:qe.contents;y.comp=Ze,y.compData=(na=y.compData)==null?void 0:na.filter(La=>(La==null?void 0:La.key)!=="newType")}((ze=(fa=y.compData)==null?void 0:fa.find(Ze=>(Ze==null?void 0:Ze.key)==="TableType"))==null?void 0:ze.contents)==="Frameless"&&(y.comp="seamScroll",y.compData=(Be=y.compData)==null?void 0:Be.filter(Ze=>(Ze==null?void 0:Ze.key)!=="TableType"));let Fr="",Br=(Ke=y==null?void 0:y.compData)==null?void 0:Ke.filter(Ze=>(Ze==null?void 0:Ze.key)==="fixType");if((Br==null?void 0:Br.length)>0&&r&&(Fr=(Ee=Br==null?void 0:Br[0])==null?void 0:Ee.contents,y.comp=Fr),((ye=y==null?void 0:y.calculatorFilters)==null?void 0:ye.length)>0){let Ze=[],La=[],hl=[];($a=y==null?void 0:y.calculatorFilters)==null||$a.forEach(Ll=>{var Yr,ln,zr,Re,Zl,ql,Jr;let Ta=(zr=(ln=(Yr=Ll==null?void 0:Ll.calculatorFilter)==null?void 0:Yr.replace("(",Ni))==null?void 0:ln.split(Ni))==null?void 0:zr[1];Ta=(Re=Ta==null?void 0:Ta.split(","))==null?void 0:Re[0],Ta=Ta??(Ll==null?void 0:Ll.functionName),(Zl=Ll==null?void 0:Ll.calculatorFilter)!=null&&Zl.includes("Up")&&Ze.push({label:Ta,prop:Ta,type:"methodButton"}),(ql=Ll==null?void 0:Ll.calculatorFilter)!=null&&ql.includes("Line")&&La.push({label:Ta,prop:Ta,type:"methodButton"}),(Jr=Ll==null?void 0:Ll.calculatorFilter)!=null&&Jr.includes("Down")&&hl.push({label:Ta,prop:Ta,type:"methodButton"})}),y.compData=(wl=y.compData)==null?void 0:wl.map(Ll=>((Ll==null?void 0:Ll.key)==="extraButton"&&(Ll.contents=[...Ze??[],...Ll.contents]),(Ll==null?void 0:Ll.key)==="rowButton"&&(Ll.contents=[...La??[],...Ll.contents]),(Ll==null?void 0:Ll.key)==="bottomButton"&&(Ll.contents=[...hl??[],...Ll.contents]),Ll)),(hl==null?void 0:hl.length)>0&&!((Pl=(el=y.compData)==null?void 0:el.find(Ll=>(Ll==null?void 0:Ll.key)==="bottomButton"))!=null&&Pl.contents)&&y.compData.push({key:"bottomButton",contents:hl})}}else if(d==="Form"){let ea=[],ma=(ll=(jl=(bl=o==null?void 0:o.contents)==null?void 0:bl.find(Ba=>{var Rl;return(Rl=Ba==null?void 0:Ba.key)==null?void 0:Rl.includes("content")}))==null?void 0:jl.value)==null?void 0:ll[0],Ha=[],ka=Array.isArray((Hl=o==null?void 0:o.filter)==null?void 0:Hl.menuFilter)?(Ga=o==null?void 0:o.filter)==null?void 0:Ga.menuFilter:[];ka==null||ka.forEach(Ba=>{if(Ba!=null&&Ba.includes("@Param(Hide=Yes, prop=")||Ba!=null&&Ba.includes("(Hide=Yes, prop=")){const Rl=Ba==null?void 0:Ba.match(/prop=([^,)]+)/);Rl!=null&&Rl[1]&&Ha.push(Rl==null?void 0:Rl[1])}});let Ul=(pr=(Sl=(ar=(Xl=(Jl=o==null?void 0:o.contents)==null?void 0:Jl.find(Ba=>{var Rl;return(Rl=Ba==null?void 0:Ba.key)==null?void 0:Rl.includes("struct")}))==null?void 0:Xl.value)==null?void 0:ar[0])==null?void 0:Sl.结构)==null?void 0:pr.contents,Gl=(ya=Ul==null?void 0:Ul.map(Ba=>(Ba.value=ma==null?void 0:ma[Ba==null?void 0:Ba.prop],Ba)))==null?void 0:ya.filter(Ba=>(Ba==null?void 0:Ba.prop)!=="sort"&&(Ba==null?void 0:Ba.prop)!=="relatedId");Gl=Gl==null?void 0:Gl.map(Ba=>(Ha!=null&&Ha.includes(Ba==null?void 0:Ba.prop)&&(Ba.isHideInForm=!0),Ba)),ea.push({key:"calculator",contents:y==null?void 0:y.calculatorFilters}),ea.push({key:"filter",contents:(_a=(Ua=(Bl=(vl=(ol=o==null?void 0:o.contents)==null?void 0:ol.find(Ba=>{var Rl;return(Rl=Ba==null?void 0:Ba.key)==null?void 0:Rl.includes("struct")}))==null?void 0:vl.value)==null?void 0:Bl[0])==null?void 0:Ua.引用)==null?void 0:_a.contents}),ea.push({key:"formContent",contents:Gl}),ea.push({key:"paramHideProps",contents:Ha}),y.compData=await nf(ea,l,y==null?void 0:y.nameContents),(rl=y.compData)!=null&&rl.find(Ba=>(Ba==null?void 0:Ba.key)==="tab")&&(y.tab=(oa=(Te=y.compData)==null?void 0:Te.find(Ba=>(Ba==null?void 0:Ba.key)==="tab"))==null?void 0:oa.contents),(Ya=y.compData)!=null&&Ya.find(Ba=>(Ba==null?void 0:Ba.key)==="step")&&(y.step=(wa=(pe=y.compData)==null?void 0:pe.find(Ba=>(Ba==null?void 0:Ba.key)==="step"))==null?void 0:wa.contents),(Pa=y.compData)!=null&&Pa.find(Ba=>(Ba==null?void 0:Ba.key)==="choice")&&(y.choice=(Il=(pl=y.compData)==null?void 0:pl.find(Ba=>(Ba==null?void 0:Ba.key)==="choice"))==null?void 0:Il.contents),(Qa=y.compData)!=null&&Qa.find(Ba=>(Ba==null?void 0:Ba.key)==="hideContents")&&(y.isHidden=((Ma=(kl=y.compData)==null?void 0:kl.find(Ba=>(Ba==null?void 0:Ba.key)==="hideContents"))==null?void 0:Ma.contents)??!1)}return y});return n=await Promise.all(i),n=n==null?void 0:n.filter(o=>!(o!=null&&o.isHidden)),n};let ff="http://139.196.154.85:20031";function hf(a){return Xa.axios({method:"post",url:ff+"/api/word-report/build-by-upload",responseType:"blob",data:a})}const vf=z.useUnit(z.pinia),{selectTitle:xs}=z.storeToRefs(vf),mf=async a=>{var r;let l=(r=re.analyzerStringToArray(a,[":","@","="]))==null?void 0:r[0];return l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),l=re.analyzeSplitToContent(l,","),l=l==null?void 0:l.map(n=>((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)),l=l==null?void 0:l.map(async n=>{var o,d,c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se;let i=re.analyzeSplitToContent(n,"=");if(n!=null&&n.includes("==")){i=n==null?void 0:n.split("==");let G=i==null?void 0:i[0],fe=i==null?void 0:i[1],we=(x=fe==null?void 0:fe.split("*"))==null?void 0:x[0],_e=(k=fe==null?void 0:fe.split("*"))==null?void 0:k[1];_e=(_=re.analyzeSplitToContent(_e,":"))==null?void 0:_.map(H=>((H==null?void 0:H[(H==null?void 0:H.length)-1])===":"&&(H=H==null?void 0:H.slice(0,(H==null?void 0:H.length)-1)),H));let Ue=_e==null?void 0:_e.filter(H=>(H==null?void 0:H[0])!=="{"),ra=_e==null?void 0:_e.filter(H=>(H==null?void 0:H[0])==="{");if(ra=ra==null?void 0:ra[0],ra=ra==null?void 0:ra.slice(1,(ra==null?void 0:ra.length)-1),ra=(I=re.analyzeSplitToContent(ra,","))==null?void 0:I.map(H=>((H==null?void 0:H[(H==null?void 0:H.length)-1])===","&&(H=H==null?void 0:H.slice(0,(H==null?void 0:H.length)-1)),H)),we!=null&&we.includes("{")){let H=(ae=(R=xs.value)==null?void 0:R.find(De=>(De==null?void 0:De.condition)==="child"))==null?void 0:ae.value;we=we==null?void 0:we.slice(1,we==null?void 0:we.length),we=(me=(X=we==null?void 0:we.replace("{",""))==null?void 0:X.replace("}",""))==null?void 0:me.replace(":","/"),we=we+"/"+H;let Ge=await qr(we,!1);Ge=Ge==null?void 0:Ge.find(De=>(De==null?void 0:De.name)===(Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1]));let Me=(U=(ue=Ge==null?void 0:Ge.compData)==null?void 0:ue.find(De=>(De==null?void 0:De.key)==="tableContents"))==null?void 0:U.contents,Le=(Z=(W=Ge==null?void 0:Ge.compData)==null?void 0:W.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:Z.contents,Ie=re.tableToForm(Me,Le),de=[];Ie==null||Ie.forEach(De=>{let Je=[];ra==null||ra.forEach(Sa=>{var We;Je.push(((We=De==null?void 0:De.find(V=>(V==null?void 0:V.key)===Sa))==null?void 0:We.value)??"")}),de.push(Je)}),de=re.arrayToString(de),n=G+"=="+de}else{we=we==null?void 0:we.slice(1,we==null?void 0:we.length),we=(ve=(Q=we==null?void 0:we.replace("{",""))==null?void 0:Q.replace("}",""))==null?void 0:ve.replace(":","/");let H=await qr(we,!1);H=H==null?void 0:H.find(de=>(de==null?void 0:de.name)===(Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1]));let Ge=(te=(Ae=H==null?void 0:H.compData)==null?void 0:Ae.find(de=>(de==null?void 0:de.key)==="tableContents"))==null?void 0:te.contents,Me=(se=(A=H==null?void 0:H.compData)==null?void 0:A.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:se.contents,Le=re.tableToForm(Ge,Me),Ie=[];Le==null||Le.forEach(de=>{let De=[];ra==null||ra.forEach(Je=>{var Sa;De.push(((Sa=de==null?void 0:de.find(We=>(We==null?void 0:We.key)===Je))==null?void 0:Sa.value)??"")}),Ie.push(De)}),Ie=re.arrayToString(Ie),n=G+"=="+Ie}}else{let G=i==null?void 0:i[0],fe=i==null?void 0:i[1],we=(o=fe==null?void 0:fe.split("*"))==null?void 0:o[0],_e=(d=fe==null?void 0:fe.split("*"))==null?void 0:d[1];_e=(c=re.analyzeSplitToContent(_e,":"))==null?void 0:c.map(H=>((H==null?void 0:H[(H==null?void 0:H.length)-1])===":"&&(H=H==null?void 0:H.slice(0,(H==null?void 0:H.length)-1)),H));let Ue=_e==null?void 0:_e.filter(H=>(H==null?void 0:H[0])!=="{"),ra=_e==null?void 0:_e.filter(H=>(H==null?void 0:H[0])==="{");if(ra=ra==null?void 0:ra[0],ra=ra==null?void 0:ra.slice(1,(ra==null?void 0:ra.length)-1),ra=(u=re.analyzeSplitToContent(ra,":"))==null?void 0:u.map(H=>((H==null?void 0:H[(H==null?void 0:H.length)-1])===":"&&(H=H==null?void 0:H.slice(0,(H==null?void 0:H.length)-1)),H)),we!=null&&we.includes("{")){let H=(b=(y=xs.value)==null?void 0:y.find(Me=>(Me==null?void 0:Me.condition)==="child"))==null?void 0:b.value;we=we==null?void 0:we.slice(1,we==null?void 0:we.length),we=(p=(g=we==null?void 0:we.replace("{",""))==null?void 0:g.replace("}",""))==null?void 0:p.replace(":","/"),we=we+"/"+H;let Ge=await qr(we,!1);Ge=Ge==null?void 0:Ge.find(Me=>(Me==null?void 0:Me.name)===(Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1])),Ge=(m=(D=Ge==null?void 0:Ge.compData)==null?void 0:D.find(Me=>(Me==null?void 0:Me.key)==="formContent"))==null?void 0:m.contents,Ge=(F=Ge==null?void 0:Ge.find(Me=>(Me==null?void 0:Me.prop)===(ra==null?void 0:ra[(ra==null?void 0:ra.length)-1])))==null?void 0:F.value,fe=Ge}else{we=we==null?void 0:we.slice(1,we==null?void 0:we.length),we=(L=(C=we==null?void 0:we.replace("{",""))==null?void 0:C.replace("}",""))==null?void 0:L.replace(":","/");let H=await qr(we,!1);H=H==null?void 0:H.find(Ge=>(Ge==null?void 0:Ge.name)===(Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1])),H=(S=(O=H==null?void 0:H.compData)==null?void 0:O.find(Ge=>(Ge==null?void 0:Ge.key)==="formContent"))==null?void 0:S.contents,H=(E=H==null?void 0:H.find(Ge=>(Ge==null?void 0:Ge.prop)===(ra==null?void 0:ra[(ra==null?void 0:ra.length)-1])))==null?void 0:E.value,fe=H}n=G+fe}return n}),l=await Promise.all(l),l=l==null?void 0:l.join(","),l="{"+l+"}",l},yf=z.useLoginState(z.pinia),{loginUserInfo:Zn}=z.storeToRefs(yf),gf=z.useUnit(z.pinia),{selectTitle:_c}=z.storeToRefs(gf),Gi=z.useMenuState(z.pinia),{localFiles:bf}=z.storeToRefs(Gi),Rt=async(a=[],l="Manual",r=[],n=[])=>{var c;let i=a,o=(c=i==null?void 0:i.filter(u=>{var y;return(u==null?void 0:u.functionName)&&(l==="Manual"&&((y=u==null?void 0:u.calculatorFilter)==null?void 0:y.includes(l))||l!=="Manual")}))==null?void 0:c.map(u=>({prop:u==null?void 0:u.prop,label:u==null?void 0:u.label,methods:u==null?void 0:u.calculatorFilter,functionName:u==null?void 0:u.functionName,functionRelatedWords:u==null?void 0:u.functionRelatedWords}));(n==null?void 0:n.length)>0&&(o=[...n==null?void 0:n.map(y=>({prop:"",label:"",methods:y==null?void 0:y.calculatorFilter,functionName:y==null?void 0:y.functionName,functionRelatedWords:y==null?void 0:y.functionRelatedWords})),...o]),(n==null?void 0:n.length)>0&&(i=[i==null?void 0:i[0]]);let d=i==null?void 0:i.map(async u=>{let y=(n==null?void 0:n.length)>0?n:o==null?void 0:o.filter(b=>(b==null?void 0:b.prop)===(u==null?void 0:u.prop));return u=await No(u,y,i,l,i,r),u});return d=await Promise.all(d),d},Dt=async(a,l,r="Manual",n=[],i=[],o=[])=>{var b;let d=a,c;Array.isArray(l==null?void 0:l[0])?c=re.getColumnChild(l==null?void 0:l[0]):c=l;let u=(b=c==null?void 0:c.filter(g=>{var p;return(g==null?void 0:g.calculatorFilter)&&((p=g==null?void 0:g.calculatorFilter)==null?void 0:p.includes(r))||(g==null?void 0:g.calculatorFilter)===""&&(g==null?void 0:g.functionName)}))==null?void 0:b.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&&(u=[...i==null?void 0:i.map(p=>({prop:"",label:"",methods:p==null?void 0:p.calculatorFilter,functionName:p==null?void 0:p.functionName,functionRelatedWords:p==null?void 0:p.functionRelatedWords})),...u]),(i==null?void 0:i.length)>0&&(d=[d==null?void 0:d[0]]);let y=d==null?void 0:d.map(async g=>(g=await No(g,u,c,r,d,n,o),g));return y=await Promise.all(y),y},kf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=re.getValueToObjectValue(l,re.getColumnContents(i))),r==null||r.forEach(d=>{var c;if(l!=null&&l[d]){let u=l==null?void 0:l[d];o=o?u?Fl.isEqual(u.toString(),o.toString()):void 0:u}else{let u=(c=i==null?void 0:i.find(b=>(b==null?void 0:b.label)===d))==null?void 0:c.prop,y=(l==null?void 0:l[u])??0;o=o?y?Fl.isEqual(y.toString(),o.toString()):void 0:y}}),l[n]=o===void 0?void 0:o?1:0,l},$r=a=>{const[l,r,n]=z.cloneDeep(a).split(":").map(Number);let i=+a;return!a||!(a!=null&&a.includes(":"))?i:(l??0)*3600+(r??0)*60+(n??0)},ii=a=>{const l=o=>o.toString().padStart(2,"0"),r=Math.floor(a/3600),n=Math.floor(a%3600/60),i=a%60;return`${l(r)}:${l(n)}:${parseInt(l(i))}`},xf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,d=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=re.getValueToObjectValue(l,re.getColumnContents(i))),r==null||r.forEach(u=>{var y,b,g,p,D,m,F,C,L;if(l!=null&&l[u]){if(o==="Row")if(!((b=((y=l==null?void 0:l[u])==null?void 0:y.toString())??"")!=null&&b.includes(":"))&&!((g=c==null?void 0:c.toString())!=null&&g.includes(":"))){let O=+(l==null?void 0:l[u]);c=c+O}else c=$r(c.toString())+$r((p=l==null?void 0:l[u])==null?void 0:p.toString()),c=ii(c)}else if(o==="Row"){let O=(D=i==null?void 0:i.find(S=>(S==null?void 0:S.label)===u))==null?void 0:D.prop;if(!((F=Number.isNaN(l==null?void 0:l[O])?"":(m=l==null?void 0:l[O])==null?void 0:m.toString())!=null&&F.includes(":"))&&!((C=c==null?void 0:c.toString())!=null&&C.includes(":"))){let S=+((l==null?void 0:l[O])??0);c=c+S}else c=$r(c==null?void 0:c.toString())+$r((L=(l==null?void 0:l[O])??0)==null?void 0:L.toString()),c=ii(c)}}),o==="Column"){let u=[];r==null||r.forEach(y=>{let b=d==null?void 0:d.map(g=>{var p;return(g==null?void 0:g[y])??(g==null?void 0:g[(p=i==null?void 0:i.find(D=>(D==null?void 0:D.label)===y))==null?void 0:p.prop])});u=[...u,...b]}),c=u.reduce((y,b)=>{let g=0;Number.isNaN(y)||(g=+y);let p=0;return Number.isNaN(b)||(p=+b),g+p},0)}return l[n]=c,l},wf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,d=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=re.getValueToObjectValue(l,re.getColumnContents(i))),r==null||r.forEach(u=>{var y,b,g,p,D,m,F;if(l!=null&&l[u]){if(o==="Row")if(!((b=(y=l==null?void 0:l[u])==null?void 0:y.toString())!=null&&b.includes(":"))&&!((g=c==null?void 0:c.toString())!=null&&g.includes(":"))){let C=+(l==null?void 0:l[u]);c=c===0?c+C:c-C}else c=c===0?$r(c.toString())+$r(l==null?void 0:l[u].toString()):$r(c.toString())-$r(l==null?void 0:l[u].toString()),c=ii(c)}else if(o==="Row"){let C=(p=i==null?void 0:i.find(L=>(L==null?void 0:L.label)===u))==null?void 0:p.prop;if(!((m=Number.isNaN(l==null?void 0:l[C])?"":(D=l==null?void 0:l[C])==null?void 0:D.toString())!=null&&m.includes(":"))&&!((F=c==null?void 0:c.toString())!=null&&F.includes(":"))){let L=+((l==null?void 0:l[C])??0);c=c===0?c+L:c-L}else c=c===0?$r(c.toString())+$r(((l==null?void 0:l[C])??0).toString()):$r(c.toString())-$r(((l==null?void 0:l[C])??0).toString()),c=ii(c)}}),o==="Column"){let u=[];r==null||r.forEach(y=>{let b=d==null?void 0:d.map(g=>{var p;return(g==null?void 0:g[y])??(g==null?void 0:g[(p=i==null?void 0:i.find(D=>(D==null?void 0:D.label)===y))==null?void 0:p.prop])});u=[...u,...b]}),c=u.reduce((y,b)=>{let g=0;Number.isNaN(y)||(g=+y);let p=0;return Number.isNaN(b)||(p=+b),g-p},0)}return l[n]=c,l},_f=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,d=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=re.getValueToObjectValue(l,re.getColumnContents(i))),r==null||r.forEach(u=>{var y,b,g,p,D,m,F;if(l!=null&&l[u]){if(o==="Row")if(!((b=(y=l==null?void 0:l[u])==null?void 0:y.toString())!=null&&b.includes(":"))&&!((g=c==null?void 0:c.toString())!=null&&g.includes(":"))){let C=+(l==null?void 0:l[u]);c=c===0?c+C:c*C}else c=c===0?$r(c.toString())+$r(l==null?void 0:l[u].toString()):$r(c.toString())*$r(l==null?void 0:l[u].toString()),c=ii(c)}else if(o==="Row"){let C=(p=i==null?void 0:i.find(L=>(L==null?void 0:L.label)===u))==null?void 0:p.prop;if(!(l!=null&&l[C]))c=void 0;else if(!((m=Number.isNaN(l==null?void 0:l[C])?"":(D=l==null?void 0:l[C])==null?void 0:D.toString())!=null&&m.includes(":"))&&!((F=c==null?void 0:c.toString())!=null&&F.includes(":"))){let L=+((l==null?void 0:l[C])??0);c=c===0?c+L:c*L}else c=c===0?$r(c.toString())+$r(((l==null?void 0:l[C])??0).toString()):$r(c.toString())*$r(((l==null?void 0:l[C])??0).toString()),c=ii(c)}}),o==="Column"){let u=[];r==null||r.forEach(y=>{let b=d==null?void 0:d.map(g=>{var p;return(g==null?void 0:g[y])??(g==null?void 0:g[(p=i==null?void 0:i.find(D=>(D==null?void 0:D.label)===y))==null?void 0:p.prop])});u=[...u,...b]}),c=u.reduce((y,b)=>{let g=0;Number.isNaN(y)||(g=+y);let p=0;return Number.isNaN(b)||(p=+b),g*p},0)}return l[n]=c,l},Sf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,d=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=re.getValueToObjectValue(l,re.getColumnContents(i))),r==null||r.forEach(u=>{var y,b,g,p,D,m,F;if(l!=null&&l[u]){if(o==="Row")if(!((b=(y=l==null?void 0:l[u])==null?void 0:y.toString())!=null&&b.includes(":"))&&!((g=c==null?void 0:c.toString())!=null&&g.includes(":"))){let C=+(l==null?void 0:l[u]);c=c===0?c+C:c/C}else c=c===0?$r(c.toString())+$r(l==null?void 0:l[u].toString()):$r(c.toString())/$r(l==null?void 0:l[u].toString()),c=ii(c)}else if(o==="Row"){let C=(p=i==null?void 0:i.find(L=>(L==null?void 0:L.label)===u))==null?void 0:p.prop;if(!((m=Number.isNaN(l==null?void 0:l[C])?"":(D=l==null?void 0:l[C])==null?void 0:D.toString())!=null&&m.includes(":"))&&!((F=c==null?void 0:c.toString())!=null&&F.includes(":"))){let L=+((l==null?void 0:l[C])??0);c=c===0?c+L:c/L}else c=c===0?$r(c.toString())+$r(((l==null?void 0:l[C])??0).toString()):$r(c.toString())/$r(((l==null?void 0:l[C])??0).toString()),c=ii(c)}}),o==="Column"){let u=[];r==null||r.forEach(y=>{let b=d==null?void 0:d.map(g=>{var p;return(g==null?void 0:g[y])??(g==null?void 0:g[(p=i==null?void 0:i.find(D=>(D==null?void 0:D.label)===y))==null?void 0:p.prop])});u=[...u,...b]}),c=u.reduce((y,b)=>{let g=0;Number.isNaN(y)||(g=+y);let p=0;return Number.isNaN(b)||(p=+b),g/p},0)}return l[n]=c.toFixed(2),l},Ef=async a=>{var o,d,c,u,y,b,g,p,D,m,F;let l=(o=a==null?void 0:a.valueString)==null?void 0:o[0],r=(d=a==null?void 0:a.contents)==null?void 0:d.calculatorFilter,n=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 C=(u=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:u.replaceAll(":","/"),L=await qr(C,!1),O=(y=l==null?void 0:l.split("*"))==null?void 0:y[1];if(L=(b=L==null?void 0:L.filter(S=>(S==null?void 0:S.name)===O))==null?void 0:b[0],r!==""){let S=L.compData;S=S==null?void 0:S.filter(E=>(E==null?void 0:E.key)!=="filter"),S.push({key:"filter",contents:"("+r+")"}),S=await Vo(S,{}),n=(p=(g=S==null?void 0:S.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:g.contents)==null?void 0:p.length}else n=(F=(m=(D=L==null?void 0:L.compData)==null?void 0:D.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:F.length}return i.value=n,i},Cf=async a=>{var g,p,D,m,F,C,L,O,S;let l=(g=a==null?void 0:a.valueString)==null?void 0:g[0],r=a==null?void 0:a.filter;r=(r==null?void 0:r.find(E=>E==null?void 0:E.includes("@If")))??"",(l==null?void 0:l[0])==="$"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length));let n=(D=(p=l==null?void 0:l.split("*"))==null?void 0:p[0])==null?void 0:D.replaceAll(":","/"),i=(m=l==null?void 0:l.split("*"))==null?void 0:m[1],o=(F=i==null?void 0:i.split("{"))==null?void 0:F[0],d=i==null?void 0:i.replace(o,"");o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1),o=o==null?void 0:o.split(":"),o=o==null?void 0:o[(o==null?void 0:o.length)-1];let c=await qr(n,!1);if(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1),d=d==null?void 0:d.split(":"),d=d==null?void 0:d[(d==null?void 0:d.length)-1],c=c==null?void 0:c.find(E=>(E==null?void 0:E.name)===o),c=(L=(C=c==null?void 0:c.compData)==null?void 0:C.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:L.contents,(r==null?void 0:r.length)>0){r=(S=(O=r==null?void 0:r.replace("(","$R"))==null?void 0:O.split("$R"))==null?void 0:S[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1);let E=re.calculatorAndToOr(r);E==null||E.forEach(x=>{for(let k in x)x[k]!=="!"?c=c==null?void 0:c.filter(_=>{var I;return(_==null?void 0:_[k])===(x==null?void 0:x[k])||(_==null?void 0:_[(I=Object.keys(_))==null?void 0:I.find(R=>R==null?void 0:R.includes("."+k))])===(x==null?void 0:x[k])}):c=c==null?void 0:c.filter(_=>{var I;return(_==null?void 0:_[k])!==(x==null?void 0:x[k])&&(_==null?void 0:_[(I=Object.keys(_))==null?void 0:I.find(R=>R==null?void 0:R.includes("."+k))])!==(x==null?void 0:x[k])})})}c=c==null?void 0:c.map(E=>E==null?void 0:E[d]);let u=[...new Set(c)],y=[],b={};return u==null||u.forEach(E=>{var k;let x=(k=c==null?void 0:c.filter(_=>E===_))==null?void 0:k.length;b[E]=x}),y.push(b),{xAxis:u,yAxis:y}},Df=async a=>{var n,i;let l=a==null?void 0:a.valueString;l=l==null?void 0:l[0];let r={};if((l==null?void 0:l[0])==="{"){l=l==null?void 0:l.slice(1,l.length-1),l=(n=re.analyzeSplitToContent(l,","))==null?void 0:n.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 o=l==null?void 0:l.map(async c=>{var g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me;let u=(p=(g=c==null?void 0:c.replace("=","$R"))==null?void 0:g.split("$R"))==null?void 0:p[0],y=(m=(D=c==null?void 0:c.replace("=","$R"))==null?void 0:D.split("$R"))==null?void 0:m[1],b="";if(y==="LoginUser")b=((F=Zn.value)==null?void 0:F.姓名)||((C=Zn.value)==null?void 0:C.account)||((L=Zn.value)==null?void 0:L.账号);else if((y==null?void 0:y[0])==="$"){let ue=(O=y==null?void 0:y.split("*"))==null?void 0:O[0],U=(S=y==null?void 0:y.split("*"))==null?void 0:S[1],W=U;if((ue==null?void 0:ue[0])==="$"&&(ue=ue==null?void 0:ue.slice(1,ue==null?void 0:ue.length)),ue!=null&&ue.includes("$")){let Q=(E=ue==null?void 0:ue.split("$"))==null?void 0:E[0],ve=(x=ue==null?void 0:ue.split("$"))==null?void 0:x[1],Ae=(k=Q==null?void 0:Q.split(":"))==null?void 0:k[0],te=(R=(I=(_=_c.value)==null?void 0:_.filter(A=>(A==null?void 0:A.condition)==="child"))==null?void 0:I[0])==null?void 0:R.value;ve=ve==null?void 0:ve.replaceAll(":","/"),ue=Ae+"/"+ve+"/"+te}else ue=ue==null?void 0:ue.replaceAll(":","/");U=U==null?void 0:U.split(":"),U=U==null?void 0:U.find((Q,ve)=>ve===(U==null?void 0:U.length)-2),W=W==null?void 0:W.split(":"),W=W==null?void 0:W.find((Q,ve)=>ve===(W==null?void 0:W.length)-1),(W==null?void 0:W[0])==="{"&&(W=W==null?void 0:W.slice(1,(W==null?void 0:W.length)-1));let Z=await qr(ue,!1);Z=Z==null?void 0:Z.find(Q=>(Q==null?void 0:Q.name)===U),Z=(X=(ae=Z==null?void 0:Z.compData)==null?void 0:ae.find(Q=>(Q==null?void 0:Q.key)==="tableContents"))==null?void 0:X.contents,b=(me=Z==null?void 0:Z[0])==null?void 0:me[W]}else b=y;r[u]=b});await Promise.all(o);let d=(i=a==null?void 0:a.valueString)==null?void 0:i[1];r.menuPathContent=d}return r},Tf=async a=>{var y,b,g,p,D,m,F;let l=a==null?void 0:a.valueString,r=l==null?void 0:l.filter(C=>(C==null?void 0:C.includes(".docx"))||(C==null?void 0:C.includes(".doc")));r=r==null?void 0:r[0];let n=l==null?void 0:l.filter(C=>!(C!=null&&C.includes(".docx"))&&!(C!=null&&C.includes(".doc")));n=n==null?void 0:n[0];let i=(b=a==null?void 0:a.compNames)==null?void 0:b[((y=a==null?void 0:a.compNames)==null?void 0:y.length)-1],o=((D=(p=(g=_c.value)==null?void 0:g.filter(C=>(C==null?void 0:C.condition)==="child"))==null?void 0:p[0])==null?void 0:D.value)??"",d=bf.value;o!==""&&(d=(m=d==null?void 0:d.find(C=>(C==null?void 0:C.path)===o))==null?void 0:m.children),d=(F=d==null?void 0:d.find(C=>(C==null?void 0:C.name)===i))==null?void 0:F.children;let c=d==null?void 0:d.find(C=>(C==null?void 0:C.name)===r),u=d==null?void 0:d.find(C=>(C==null?void 0:C.name)===n);u=(u==null?void 0:u.url)??"",u!==""?u=u==null?void 0:u.replace(/^file:\/\//,"file:///").replace(/\\/g,"/"):u="file:///"+(n==null?void 0:n.replaceAll("\\","/")),c=(c==null?void 0:c.url)??"",c!==""?c=c==null?void 0:c.replace(/^file:\/\//,"file:///").replace(/\\/g,"/"):c="file:///"+(r==null?void 0:r.replaceAll("\\","/"));try{const L=await(await fetch(c)).blob();let O=c.split(/[\\/]/).pop();const S=new File([L],O,{type:L.type||"application/octet-stream"}),E=new FormData;E.append("TemplateFile",S);let x=await fetch(u);x=await x.text(),x=await mf(x),E.append("RawContent",x);let k=await hf(E),_=new Blob([k.data],{type:"application/zip"});const I=window.URL.createObjectURL(_),R=document.createElement("a");R.href=I,R.download=r,document.body.appendChild(R),R.click(),document.body.removeChild(R),window.URL.revokeObjectURL(I)}catch{Xa.ElMessage.error("文件路径未找到")}},Bf=async a=>{var i,o;let l=a==null?void 0:a.valueString,r=l==null?void 0:l[0];r=(i=r==null?void 0:r.split("*"))==null?void 0:i[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.replaceAll(":","/"),r=r;let n=await qr(r,!1);if((n==null?void 0:n.length)>0){Gi.setActiveTopMenuPath((o=r==null?void 0:r.split("/"))==null?void 0:o[0]);let d=localStorage.getItem("menus-store");d=JSON.parse(d),d=d==null?void 0:d.menus,d=d==null?void 0:d.find(c=>{var u;return(c==null?void 0:c.path)===((u=r==null?void 0:r.split("/"))==null?void 0:u[0])}),d=d==null?void 0:d.childMenus,Gi.setAsideMenus(d),Gi.setJumpMenuInform(!0),Gi.setActiveMenuPath(r)}else Xa.ElMessage.error("页面不存在");return a},mo={Sum:xf,Substract:wf,Multiple:_f,Divide:Sf,Compare:kf,VecDimCount:Ef,Approval:Df,VecRepCount:Cf,AutoReportGen:Tf,OpenPortal:Bf},No=async(a,l,r,n="Auto",i,o=[],d=[])=>{var g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me,ue,U,W;let c=a,u=[],y=await z.getPageDataApi({platId:parseInt((g=Zn==null?void 0:Zn.value)==null?void 0:g.plat_id),pageName:"menu"});y=(m=(D=(p=y==null?void 0:y.data)==null?void 0:p.result)==null?void 0:D.filter(Z=>(Z==null?void 0:Z.property_name)===""))==null?void 0:m[0];let b=[];if(y!=null&&y.object_name){y=y==null?void 0:y.object_name;let Z=await z.getPageDataApi({platId:parseInt((F=Zn==null?void 0:Zn.value)==null?void 0:F.plat_id),pageName:y});Z=(E=(S=(O=(L=(C=Z==null?void 0:Z.data)==null?void 0:C.result)==null?void 0:L[0])==null?void 0:O.contents)==null?void 0:S.find(Q=>{var ve;return(ve=Q==null?void 0:Q.key)==null?void 0:ve.includes("content")}))==null?void 0:E.value,u=(x=Z==null?void 0:Z.map(Q=>({functionName:Q==null?void 0:Q.函数名称,functionContent:Q==null?void 0:Q.输出值})))==null?void 0:x.filter(Q=>(Q==null?void 0:Q.functionContent)!==""),u==null||u.forEach(Q=>{b.push(Q.functionName),mo[Q.functionName]=new Function("return "+Q.functionContent)()})}if((l==null?void 0:l.length)===0)return c;for(let Z in l){let Q=(k=l==null?void 0:l[Z])==null?void 0:k.functionName;const ve=mo==null?void 0:mo[Q];let Ae=(_=l==null?void 0:l[Z])==null?void 0:_.methods;if(Ae=re.analyzeSplitToContent(Ae,","),(I=Ae==null?void 0:Ae.find(te=>te==null?void 0:te.includes("@Type")))!=null&&I.includes(n)||!(Ae!=null&&Ae.find(te=>te==null?void 0:te.includes("@Type")))&&n==="Manual"||n==="Auto"||(Ae==null?void 0:Ae.length)===0){let te=((X=(ae=(R=Ae==null?void 0:Ae.find(A=>A==null?void 0:A.includes("@Extent")))==null?void 0:R.replace(":","="))==null?void 0:ae.split("="))==null?void 0:X[1])??[];if(await new Function("return ")(),(b==null?void 0:b.length)>0&&b.find(A=>A===Q)){let A="";try{let G=(me=l==null?void 0:l[Z])==null?void 0:me.functionRelatedWords,fe=(o==null?void 0:o.length)>0?o==null?void 0:o.map(_e=>{var Ue;return _e==null?void 0:_e[(Ue=l==null?void 0:l[Z])==null?void 0:Ue.prop]}):["0"];fe=fe==null?void 0:fe.map(_e=>_e==null?void 0:_e.slice((_e==null?void 0:_e.length)-5,_e==null?void 0:_e.length)),fe=fe==null?void 0:fe.map(_e=>re.isNumber(parseInt(_e))&&parseInt(_e)?parseInt(_e):0);let we=Math.max(...fe);G=G==null?void 0:G.map(_e=>{if(_e!=null&&_e.includes("'"))return _e==null?void 0:_e.replaceAll("'","");if(_e!=null&&_e.includes("@"))return we+1;{let Ue=Object.keys(c);return _e=(c==null?void 0:c[_e])??(c==null?void 0:c[Ue==null?void 0:Ue.find(ra=>ra==null?void 0:ra.includes("."+_e))]),_e}}),A=ve(...G)}catch(G){Xa.ElMessage.warning("关联数据出现错误,"+G.message)}let se=(ue=l==null?void 0:l[Z])==null?void 0:ue.prop;c[se]=A}else c=await ve({contents:c,valueString:(U=l==null?void 0:l[Z])==null?void 0:U.functionRelatedWords,prop:(W=l==null?void 0:l[Z])==null?void 0:W.prop,filter:Ae,headers:r,typeString:te,allContents:i,compNames:d})}}return c},Nf=z.useLoginState(z.pinia),{loginUserInfo:wn}=z.storeToRefs(Nf),Af=z.useMenuState(z.pinia),{activeMenuPath:ws,currentMenuPath:yo}=z.storeToRefs(Af),Sc=z.useUnit(z.pinia);let _s="$R";const{selectTitle:Ii}=z.storeToRefs(Sc),Ec=async(a,l)=>{var d,c,u,y,b,g,p,D,m,F,C,L,O;let r=ws.value,n="",i=((d=Ii==null?void 0:Ii.value)==null?void 0:d.find(S=>(S==null?void 0:S.condition)==="child"&&!(S!=null&&S.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(r=l?r:(c=a==null?void 0:a[0])==null?void 0:c.object_name,n=(u=a==null?void 0:a[0])==null?void 0:u.father_name);let o=[];if(n!==""){let S=n;(S==null?void 0:S[(S==null?void 0:S.length)-1])==="/"&&(S=S==null?void 0:S.slice(0,(S==null?void 0:S.length)-1));let E=await qr(S,!1);E=(y=E==null?void 0:E[0])==null?void 0:y.compData;let x=(b=E==null?void 0:E.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:b.contents;x=((g=x==null?void 0:x.find(_=>_==null?void 0:_.isMainKey))==null?void 0:g.prop)??((p=x==null?void 0:x[0])==null?void 0:p.prop);let k=(m=(D=E==null?void 0:E.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:D.contents)==null?void 0:m.map(_=>({label:_==null?void 0:_[x],value:_==null?void 0:_[x]}));o=(F=n==null?void 0:n.split("/"))==null?void 0:F.map(_=>(_===""?i?(i.isShow=!0,_=i):_={value:_,condition:"child",options:k,parentContent:(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"?n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1):n,isShow:!0}:_={condition:"parent",value:_.trim(),isShow:!0},_))}if(r!==""){let S=(C=r==null?void 0:r.split("/"))==null?void 0:C.map(E=>(E={condition:"normal",value:E.trim(),isShow:!0},E));((L=S==null?void 0:S[0])==null?void 0:L.value)===((O=o==null?void 0:o[0])==null?void 0:O.value)&&(S=S==null?void 0:S.filter((E,x)=>x!==0)),o=[...o??[],...S??[]]}n===""&&i&&((i==null?void 0:i.parentContent)!==ws.value&&(i.isShow=!1),(i==null?void 0:i.value)!==""&&o.push(i)),Sc.setSelectTitle(o)},zf=async a=>{var o,d,c,u,y,b,g,p,D;let l=await z.getPageDataApi({platId:parseInt((o=wn==null?void 0:wn.value)==null?void 0:o.plat_id),pageName:"menu"}),r=(d=l==null?void 0:l.data)==null?void 0:d.result,n=(b=(y=(u=(c=a==null?void 0:a.filter(m=>(m==null?void 0:m.comp)==="Table"))==null?void 0:c[0])==null?void 0:u.compData)==null?void 0:y.find(m=>(m==null?void 0:m.key)==="filter"))==null?void 0:b.contents;n=(D=(p=(g=n==null?void 0:n.replace("(",_s))==null?void 0:g.split(_s))==null?void 0:p[0])==null?void 0:D.replaceAll(":","/");let i=r==null?void 0:r.filter(m=>{var F;return(m==null?void 0:m.object_name)===yo.value+"/"||((F=yo.value)==null?void 0:F.includes(n))&&n+"/"===(m==null?void 0:m.object_name)||n===(m==null?void 0:m.object_name)});return(i==null?void 0:i.length)>0&&(a=a==null?void 0:a.map(m=>{var F;return(m==null?void 0:m.comp)==="Table"&&(m.compData=(F=m==null?void 0:m.compData)==null?void 0:F.map(C=>{var L,O,S;return(C==null?void 0:C.key)==="header"&&(Array.isArray((L=C.contents)==null?void 0:L[0])?C.contents[0]=(S=C.contents[0])==null?void 0:S.map((E,x)=>{var k;return x===0&&(E.isExistChild=!0,((k=yo.value)!=null&&k.includes(n)||n)&&(E.fatherPath=n)),E}):C.contents=(O=C.contents)==null?void 0:O.map((E,x)=>{var k;return x===0&&(E.isExistChild=!0,((k=yo.value)!=null&&k.includes(n)||n)&&(E.fatherPath=n)),E})),C})),m})),a},qr=async(a,l,r={})=>{var d,c,u,y,b,g,p,D,m,F,C,L;let n=await z.getPageDataApi({platId:parseInt((d=wn==null?void 0:wn.value)==null?void 0:d.plat_id),pageName:a}),i=(c=n==null?void 0:n.data)==null?void 0:c.result;if((i==null?void 0:i.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==a){let O=await z.getPageDataApi({platId:parseInt((u=wn==null?void 0:wn.value)==null?void 0:u.plat_id),pageName:r==null?void 0:r.originPath});if(((b=(y=O==null?void 0:O.data)==null?void 0:y.result)==null?void 0:b.length)>0){let S=await ks((g=O==null?void 0:O.data)==null?void 0:g.result,r,!1);S=S==null?void 0:S.map(async k=>{var R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We;let _=[],I=(R=Object.keys(k))==null?void 0:R.filter(V=>(V==null?void 0:V.includes("name"))&&V!=="nameContents");for(let V in k)I!=null&&I.find(P=>P===V)&&_.push(k==null?void 0:k[V]);if(_=_.reverse(),(k==null?void 0:k.comp)==="Table"){let V=(me=(X=(ae=k==null?void 0:k.compData)==null?void 0:ae.find(le=>(le==null?void 0:le.key)==="tableContents"))==null?void 0:X.contents)==null?void 0:me.map(le=>{let ce={};for(let he in le)he!=="id"&&he!=="create_time"&&he!=="update_time"&&he!=="sort"&&he!=="create_user_id"&&he!=="update_user_id"&&he!=="department_id"&&he!=="relatedId"&&(ce[he]=le==null?void 0:le[he]);return le=Object.values(ce),le}),P=(U=(ue=k==null?void 0:k.compData)==null?void 0:ue.find(le=>(le==null?void 0:le.key)==="header"))==null?void 0:U.contents;if(Array.isArray(P==null?void 0:P[0])?(P[0].push({label:"排序",prop:"sort"}),P[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(W=P[0])!=null&&W.find(le=>(le==null?void 0:le.prop)==="disabled")&&(P[0]=(Z=P[0])==null?void 0:Z.filter(le=>(le==null?void 0:le.prop)!=="disabled"),P[0].unshift({label:"",prop:"disabled",sortable:!1}))):(P||(P=[]),P.push({label:"排序",prop:"sort"}),P.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),P!=null&&P.find(le=>(le==null?void 0:le.prop)==="disabled")&&(P=P==null?void 0:P.filter(le=>(le==null?void 0:le.prop)!=="disabled"),P.unshift({label:"",prop:"disabled",sortable:!1}))),P!=null&&P.some(le=>{var ce;return(le==null?void 0:le.calculatorFilter)&&((ce=le==null?void 0:le.calculatorFilter)==null?void 0:ce.includes("Auto"))})&&(V=await Dt(V,P,"Auto"),V=V==null?void 0:V.map(le=>Object.values(le))),k!=null&&k.fatherSyncContents){Array.isArray((Q=k==null?void 0:k.fatherSyncContents)==null?void 0:Q[0])&&(k.fatherSyncContents=(ve=k==null?void 0:k.fatherSyncContents)==null?void 0:ve[0]);let le=(Ae=Ii.value)==null?void 0:Ae.find(ce=>(ce==null?void 0:ce.condition)==="child");k.fatherSyncContents=(te=k==null?void 0:k.fatherSyncContents)==null?void 0:te.map(ce=>{var he,ua,ia,Ve,va,Ea;return((ua=ce==null?void 0:ce.menus)==null?void 0:ua[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(le==null?void 0:le.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(le==null?void 0:le.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(le==null?void 0:le.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ea=ce.menus)==null?void 0:Ea.slice(0,((va=ce.menus)==null?void 0:va.length)-1)),ce})}if(k!=null&&k.sonSyncContents){Array.isArray((A=k==null?void 0:k.sonSyncContents)==null?void 0:A[0])&&(k.sonSyncContents=(se=k==null?void 0:k.sonSyncContents)==null?void 0:se[0]);let le=(G=Ii.value)==null?void 0:G.find(ce=>(ce==null?void 0:ce.condition)==="child");k.sonSyncContents=(fe=k==null?void 0:k.sonSyncContents)==null?void 0:fe.map(ce=>{var he,ua,ia,Ve,va,Ea;return((ua=ce==null?void 0:ce.menus)==null?void 0:ua[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(le==null?void 0:le.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(le==null?void 0:le.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(le==null?void 0:le.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ea=ce.menus)==null?void 0:Ea.slice(0,((va=ce.menus)==null?void 0:va.length)-1)),ce})}if(k!=null&&k.relatedQuotes){Array.isArray((we=k==null?void 0:k.relatedQuotes)==null?void 0:we[0])&&(k.relatedQuotes=(_e=k==null?void 0:k.relatedQuotes)==null?void 0:_e[0]);let le=(Ue=Ii.value)==null?void 0:Ue.find(ce=>(ce==null?void 0:ce.condition)==="child");k.relatedQuotes=(ra=k==null?void 0:k.relatedQuotes)==null?void 0:ra.map(ce=>{var he,ua,ia,Ve,va,Ea;return((ua=ce==null?void 0:ce.menus)==null?void 0:ua[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(le==null?void 0:le.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(le==null?void 0:le.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(le==null?void 0:le.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ea=ce.menus)==null?void 0:Ea.slice(0,((va=ce.menus)==null?void 0:va.length)-1)),ce})}k={filter:(Ge=(H=k==null?void 0:k.compData)==null?void 0:H.find(le=>(le==null?void 0:le.key)==="filter"))==null?void 0:Ge.contents,key:k==null?void 0:k.comp,name:_,tableColumns:P,tableContents:V,menuFilter:k==null?void 0:k.menuFilter,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents,calculatorFilters:k==null?void 0:k.calculatorFilters}}else{let V=(Ie=(Le=(Me=k==null?void 0:k.compData)==null?void 0:Me.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:Le.contents)==null?void 0:Ie.map(le=>(le==null?void 0:le.value)??"");V=[V];let P=(Je=(De=(de=k==null?void 0:k.compData)==null?void 0:de.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:De.contents)==null?void 0:Je.map(le=>(le.value="",le));k={contents:V,filter:(We=(Sa=k==null?void 0:k.compData)==null?void 0:Sa.find(le=>(le==null?void 0:le.key)==="filter"))==null?void 0:We.contents,key:k==null?void 0:k.comp,name:_,value:P,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents,calculatorFilters:k==null?void 0:k.calculatorFilters}}return k.isShow=!1,k}),S=await Promise.all(S);let E=[{key:"menuPath",contents:[{path:a,fatherPath:(m=(D=(p=O==null?void 0:O.data)==null?void 0:p.result)==null?void 0:D[0])==null?void 0:m.father_name,isShow:!1}]},{key:a,contents:S}];await z.createPlatFormDataApi({platId:parseInt((F=wn==null?void 0:wn.value)==null?void 0:F.plat_id),changeData:E});let x=await z.getPageDataApi({platId:parseInt((C=wn==null?void 0:wn.value)==null?void 0:C.plat_id),pageName:a});i=(L=x==null?void 0:x.data)==null?void 0:L.result}}l&&await Ec(i,!!(r!=null&&r.originPath));let o=await ks(i,r);return l&&(o=await zf(o)),o==null?void 0:o.filter(O=>O)},Ss=async a=>{var n,i,o,d,c,u,y,b,g,p,D;let l=(n=a==null?void 0:a.menus)==null?void 0:n.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+((o=(i=a.value)==null?void 0:i.split(" "))==null?void 0:o[0]));let r=await qr(l,!1);if(r=(d=r==null?void 0:r.filter(m=>{var F,C;return(m==null?void 0:m.name)===((C=a==null?void 0:a.groups)==null?void 0:C[((F=a==null?void 0:a.groups)==null?void 0:F.length)-1])}))==null?void 0:d[0],(u=(c=r==null?void 0:r.compData)==null?void 0:c.find(m=>(m==null?void 0:m.key)==="tableContents"))!=null&&u.contents){r=(b=(y=r==null?void 0:r.compData)==null?void 0:y.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:b.contents;let m=((g=a==null?void 0:a.words)==null?void 0:g[0])??(a==null?void 0:a.prop);return r=r==null?void 0:r.filter(F=>{var C,L,O,S;return(F==null?void 0:F[a!=null&&a.endChildMenu?m:(C=a==null?void 0:a.words)==null?void 0:C[0]])===(a!=null&&a.relatedWords&&((L=a==null?void 0:a.relatedWords)==null?void 0:L.length)>0?(S=(O=a.value)==null?void 0:O.split(" "))==null?void 0:S[0]:a.value)}),r==null?void 0:r[0]}else{let m=(D=(p=r==null?void 0:r.compData)==null?void 0:p.find(C=>(C==null?void 0:C.key)==="formContent"))==null?void 0:D.contents,F={};return m==null||m.forEach(C=>{F[C.prop]=C.value}),F}},Mf={key:0,class:"extra-button-content"},If={class:"table-operator-wrap"},Of={key:0,class:"extra-button-filter"},Lf={key:1,class:"extra-header"},Rf=["onClick"],$f={class:"table-op-text"},Vf={class:"table-op-text"},Ff={class:"drop-menu",style:{width:"120px"}},Pf=["onClick"],jf={key:0},Hf={key:1},Uf=["onClick"],qf={class:"table-op-text"},Wf={key:1,class:"extra-button-content tabs-button-wrapper"},Gf={class:"table-operator-wrap"},Kf={class:"extra-button-filter"},Yf={key:0,class:"extra-header"},Jf={class:"table-op-action"},Xf={class:"table-op-text"},Zf={class:"drop-menu",style:{width:"120px"}},Qf={key:0},e0={key:1},a0=["onClick"],l0={class:"table-op-text"},r0={__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 r=l,n=a,i=()=>{const I=(n==null?void 0:n.menuFilter)||[];return Array.isArray(I)&&(I==null?void 0:I.some(R=>{const ae=typeof R=="string"?R:JSON.stringify(R);return ae==null?void 0:ae.includes("HideGroup=Yes")}))},o=e.ref(""),d=e.ref(!1),c=e.ref(!1),u=e.ref([]),y=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),b=[{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 g(I,R){return I.map(ae=>{const X={...ae};return R.forEach(me=>{delete X[me]}),X})}function p(I){if(!I||I.t!=="n")return(I==null?void 0:I.v)??"";const R=I.v;if(I.z){const ae=String(I.z).toLowerCase(),X=["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 U of X)if(ae.includes(U))return D(R);const me=/[ymdhms]/.test(ae),ue=/^[0#\.\,\s]+$/.test(ae.replace(/[\\\/\-:]/g,""));if(me&&!ue)return D(R)}if(R>=1&&R<=73050){if(R<5e3)return R;if(R>=5e3&&R<4e4){const ae=Math.floor((R-25569)/365.25)+1970;return ae>=1970&&ae<=2e3&&I.z&&/[ymd]/.test(String(I.z).toLowerCase())?D(R):R}if(R>=4e4)return D(R)}return R}function D(I){if(typeof I!="number")return I;try{const R=new Date((I-25569)*86400*1e3);if(isNaN(R.getTime()))return I;const ae=R.getFullYear(),X=String(R.getMonth()+1).padStart(2,"0"),me=String(R.getDate()).padStart(2,"0");return`${ae}-${X}-${me}`}catch{return I}}const m=I=>{const R=I.raw;if(!R)return;const ae=new FileReader;ae.onload=X=>{try{const me=new Uint8Array(X.target.result),ue=re.readSync(me,{type:"array"}),U=ue.SheetNames[0],W=ue.Sheets[U],Q=re.utils.decode_range(W["!ref"]).e.c+1,ve=new Array(Q).fill(""),Ae=[];for(const fe in W){if(fe[0]==="!")continue;const{r:we,c:_e}=re.utils.decode_cell(fe),Ue=W[fe];let ra=p(Ue);if((ra==null||ra==="")&&(ra=""),we===0)ve[_e]=ra;else{if(!Ae[we-1]){Ae[we-1]={};for(let H=0;H<Q;H++)Ae[we-1][`col_${H}`]=""}Ae[we-1][`col_${_e}`]=ra}}for(let fe=0;fe<Q;fe++)ve[fe]===void 0&&(ve[fe]="");const te=[];for(let fe=0;fe<ve.length;fe++)(!ve[fe]||ve[fe].toString().trim()==="")&&te.push(fe);let A,se;(te==null?void 0:te.length)>0?(Xa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),A=ve.filter((fe,we)=>!te.includes(we)),se=g(Ae,te==null?void 0:te.map(fe=>`col_${fe}`))):(A=ve,se=Ae);const G=Ae==null?void 0:Ae[0];if(!(G!=null&&G.hasOwnProperty("col_0")))return Xa.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",A,se)}catch(me){throw Xa.ElMessage.error(me.message),new Error(me.message)}},ae.readAsArrayBuffer(R)},F=I=>{var ae;const R=(ae=u.value)==null?void 0:ae.reduce((X,me,ue)=>(ue===0?X[me.label]=I:X[me.label]=me==null?void 0:me.value,X),{});r("filter",R,I,!0)},C=(I,R={})=>{r("buttonClick",I,"",R)},L=I=>{var R,ae;u.value=(ae=(R=re.getColumnChild(z.cloneDeep(I)))==null?void 0:R.filter(X=>(X==null?void 0:X.label)!==""&&(X==null?void 0:X.label)!=="操作"))==null?void 0:ae.map(X=>({label:(X==null?void 0:X.label)??"",value:"",name:(X==null?void 0:X.prop)??"",isFormColHidden:X==null?void 0:X.isTableColHidden,width:3,prop:(X==null?void 0:X.prop)??""}))},O=e.ref(!1),S=I=>{var R;if((I==null?void 0:I.buttonName)==="确认"&&(r("filter",I==null?void 0:I.content),O.value=(I==null?void 0:I.content)&&Object.values(I==null?void 0:I.content).length>0),(I==null?void 0:I.buttonName)==="清空"){const ae=z.cloneDeep(I==null?void 0:I.content);for(const X in ae)ae[X]="";u.value=(R=u.value)==null?void 0:R.map(X=>({...X,value:""})),r("filter",ae),O.value=!1}d.value=!1},E=()=>{d.value=!d.value,c.value=!0},x=()=>{var R,ae;u.value=(R=u.value)==null?void 0:R.map(X=>({...X,value:""}));const I=(ae=u.value)==null?void 0:ae.reduce((X,me)=>(X[me.label]=me.value,X),{});r("filter",I)},k=e.ref(null);let _;return _=I=>{var me;if(!d.value)return;const R=(me=k==null?void 0:k.value)==null?void 0:me.$el,ae=R==null?void 0:R.contains(I.target);let X=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(ue=>{ue.contains(I.target)&&(X=!0)}),!ae&&!X&&(d.value=!1)},e.onMounted(()=>{document.addEventListener("click",_),L(n.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",_)}),e.watch(()=>n.columns,()=>{L(n.columns)},{deep:!0,immediate:!0}),(I,R)=>{var W,Z,Q,ve,Ae,te,A,se;const ae=e.resolveComponent("el-icon"),X=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-input"),ue=e.resolveComponent("el-upload"),U=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Mf,[i()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(n==null?void 0:n.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((n==null?void 0:n.level)-1)*12+"px",fontWeight:600-((n==null?void 0:n.level)-1)*100>=400?600-((n==null?void 0:n.level)-1)*100:400,fontSize:17-(n==null?void 0:n.level)>=14?17-(n==null?void 0:n.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",If,[n!=null&&n.filterShow?(e.openBlock(),e.createElementBlock("div",Of,[e.createVNode(sd,{trigger:"contextmenu",ref_key:"popOverRef",ref:k,title:"",width:800,placement:"bottom-start",isVisible:d.value,"onUpdate:isVisible":R[4]||(R[4]=G=>d.value=G)},{reference:e.withCtx(()=>{var G,fe,we,_e;return[e.createVNode(me,{modelValue:o.value,"onUpdate:modelValue":R[0]||(R[0]=Ue=>o.value=Ue),style:{"min-width":"80px"},placeholder:O.value?(we=(fe=(G=a.filterValues)==null?void 0:G.filter(Ue=>Ue))==null?void 0:fe.slice(0,3))==null?void 0:we.join("/"):"搜索","prefix-icon":e.unref(Xa.search_default),clearable:"",onInput:F,disabled:((_e=u.value)==null?void 0:_e.length)===0},{suffix:e.withCtx(()=>{var Ue,ra;return[!o.value&&((ra=(Ue=a.filterValues)==null?void 0:Ue.filter(H=>H))!=null&&ra.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:x},{default:e.withCtx(()=>[e.createVNode(e.unref(Xa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(E,["stop"])},[e.createVNode(X,{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:R[1]||(R[1]=e.withModifiers(()=>{},["stop"])),onKeyup:R[2]||(R[2]=e.withModifiers(()=>{},["stop"])),onKeypress:R[3]||(R[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:u.value,buttonValue:y.value,isEnableWrap:!1,isButtonRow:!1,key:y.value,isStartJustify:!1,onOnButtonClick:S},null,8,["rowContents","buttonValue"]))],32)):e.createCommentVNode("",!0)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((W=a.buttons)==null?void 0:W.length)>0?(e.openBlock(),e.createElementBlock("div",Lf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Z=a.buttons)==null?void 0:Z.filter(G=>a.isDevMode||(G==null?void 0:G.label)!=="修改模板"),(G,fe)=>{var we;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:fe},[(G==null?void 0:G.type)==="upload"?(e.openBlock(),e.createBlock(ue,{key:0,class:"upload-button-wrap","on-change":m,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var _e;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Ue=>C(G==null?void 0:G.label)},[e.createVNode(X,{class:"table-op-icon",name:(_e=b==null?void 0:b.find(Ue=>(Ue==null?void 0:Ue.label)===(G==null?void 0:G.label)))==null?void 0:_e.icon},null,8,["name"]),e.createElementVNode("span",$f,e.toDisplayString(G==null?void 0:G.label),1)],10,Rf)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(G==null?void 0:G.type)==="popover"?(e.openBlock(),e.createBlock(ul._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var _e;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(X,{class:"table-op-icon",name:(_e=b==null?void 0:b.find(Ue=>(Ue==null?void 0:Ue.label)===(G==null?void 0:G.label)))==null?void 0:_e.icon},null,8,["name"]),e.createElementVNode("span",Vf,e.toDisplayString(G==null?void 0:G.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Ff,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G==null?void 0:G.contents,_e=>{var Ue,ra;return e.openBlock(),e.createElementBlock("div",{key:_e==null?void 0:_e.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:H=>!a.lockingPage&&C(_e==null?void 0:_e.label)},[e.createTextVNode(e.toDisplayString(_e==null?void 0:_e.label),1),(Ue=_e==null?void 0:_e.label)!=null&&Ue.includes("选中")?(e.openBlock(),e.createElementBlock("span",jf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(ra=_e==null?void 0:_e.label)!=null&&ra.includes("全部")?(e.openBlock(),e.createElementBlock("span",Hf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,Pf)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(G!=null&&G.type)||(G==null?void 0:G.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:_e=>!a.lockingPage&&C(G==null?void 0:G.label,G)},[e.createVNode(X,{class:"table-op-icon",name:((we=b==null?void 0:b.find(_e=>(_e==null?void 0:_e.label)===(G==null?void 0:G.label)))==null?void 0:we.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",qf,e.toDisplayString(G==null?void 0:G.label),1)],10,Uf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",Wf,[e.createElementVNode("div",Gf,[e.createElementVNode("div",Kf,[e.createVNode(me,{modelValue:o.value,"onUpdate:modelValue":R[5]||(R[5]=G=>o.value=G),style:{"min-width":"80px"},placeholder:O.value?(Ae=(ve=(Q=a.filterValues)==null?void 0:Q.filter(G=>G))==null?void 0:ve.slice(0,3))==null?void 0:Ae.join("/"):"搜索","prefix-icon":e.unref(Xa.search_default),clearable:"",onInput:F,disabled:((te=u.value)==null?void 0:te.length)===0},{suffix:e.withCtx(()=>{var G,fe;return[!o.value&&((fe=(G=a.filterValues)==null?void 0:G.filter(we=>we))!=null&&fe.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:x},{default:e.withCtx(()=>[e.createVNode(e.unref(Xa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(E,["stop"])},[e.createVNode(X,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((A=a.buttons)==null?void 0:A.length)>0?(e.openBlock(),e.createElementBlock("div",Yf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=a.buttons)==null?void 0:se.filter(G=>a.isDevMode||(G==null?void 0:G.label)!=="修改模板"),(G,fe)=>{var we;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:fe},[(G==null?void 0:G.type)==="upload"?(e.openBlock(),e.createBlock(ue,{key:0,class:"upload-button-wrap","on-change":m,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var _e;return[e.createElementVNode("div",Jf,[e.createVNode(X,{class:"table-op-icon",name:(_e=b==null?void 0:b.find(Ue=>(Ue==null?void 0:Ue.label)===(G==null?void 0:G.label)))==null?void 0:_e.icon},null,8,["name"]),e.createElementVNode("span",Xf,e.toDisplayString(G==null?void 0:G.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(G==null?void 0:G.type)==="popover"?(e.openBlock(),e.createBlock(ul._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(G==null?void 0:G.type)==="popover"?(e.openBlock(),e.createBlock(U,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var _e;return[e.createVNode(X,{class:"table-op-icon",name:(_e=b==null?void 0:b.find(Ue=>(Ue==null?void 0:Ue.label)===(G==null?void 0:G.label)))==null?void 0:_e.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(G==null?void 0:G.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Zf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G==null?void 0:G.contents,_e=>(e.openBlock(),e.createBlock(U,{key:_e==null?void 0:_e.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ue=>C(_e==null?void 0:_e.label)},{default:e.withCtx(()=>{var Ue,ra;return[e.createTextVNode(e.toDisplayString(_e==null?void 0:_e.label),1),(Ue=_e==null?void 0:_e.label)!=null&&Ue.includes("选中")?(e.openBlock(),e.createElementBlock("span",Qf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(ra=_e==null?void 0:_e.label)!=null&&ra.includes("全部")?(e.openBlock(),e.createElementBlock("span",e0,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(G!=null&&G.type)||(G==null?void 0:G.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:_e=>!a.lockingPage&&C(G==null?void 0:G.label,G)},[e.createVNode(X,{class:"table-op-icon",name:(we=b==null?void 0:b.find(_e=>(_e==null?void 0:_e.label)===(G==null?void 0:G.label)))==null?void 0:we.icon},null,8,["name"]),e.createElementVNode("span",l0,e.toDisplayString(G==null?void 0:G.label),1)],10,a0)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},n0=fr._export_sfc(r0,[["__scopeId","data-v-c54c7b35"]]),i0={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,r)=>{const n=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,o=>{var d;return e.openBlock(),e.createBlock(n,{key:o==null?void 0:o.prop,label:o==null?void 0:o.label,prop:o==null?void 0:o.prop,fixed:(o==null?void 0:o.prop)==="operate"?"right":o==null?void 0:o.fixed,align:(o==null?void 0:o.align)??"left","show-overflow-tooltip":(o==null?void 0:o.showOverflowTooltip)??!0,width:o==null?void 0:o.width,"min-width":(o==null?void 0:o.minWidth)||((o==null?void 0:o.prop)==="operate"?80:(((d=o==null?void 0:o.label)==null?void 0:d.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(o.children,(u,y)=>(e.openBlock(),e.createBlock(ul._sfc_main$2,{key:y,column:u,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(b,g)=>({name:g,fn:e.withCtx(({row:p,slotData:D,item:m,column:F})=>[e.renderSlot(l.$slots,g,e.mergeProps({ref_for:!0},D??p,{item:m??u,slotData:D??p,row:p,column:F,columnProp:u}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class o0 extends Fl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,r,n,i){const o=this,d=new Fl.FileLoader(o.manager);d.setPath(o.path),d.setResponseType("arraybuffer"),d.setRequestHeader(o.requestHeader),d.setWithCredentials(o.withCredentials),d.load(l,function(c){try{r(o.parse(c))}catch(u){i?i(u):console.error(u),o.manager.itemError(l)}},n,i)}_getDataView(l,r,n,i){switch(n){case"F":return i===8?l.getFloat64(r,this.littleEndian):l.getFloat32(r,this.littleEndian);case"I":return i===1?l.getInt8(r):i===2?l.getInt16(r,this.littleEndian):l.getInt32(r,this.littleEndian);case"U":return i===1?l.getUint8(r):i===2?l.getUint16(r,this.littleEndian):l.getUint32(r,this.littleEndian)}}parse(l){function r(D,m){const F=D.length,C=new Uint8Array(m);let L=0,O=0,S,E,x;do if(S=D[L++],S<32){if(S++,O+S>m)throw new Error("Output buffer is not large enough");if(L+S>F)throw new Error("Invalid compressed data");do C[O++]=D[L++];while(--S)}else{if(E=S>>5,x=O-((S&31)<<8)-1,L>=F)throw new Error("Invalid compressed data");if(E===7&&(E+=D[L++],L>=F))throw new Error("Invalid compressed data");if(x-=D[L++],O+E+2>m)throw new Error("Output buffer is not large enough");if(x<0)throw new Error("Invalid compressed data");if(x>=O)throw new Error("Invalid compressed data");do C[O++]=C[x++];while(--E+2)}while(L<F);return C}function n(D){const m={},F=new Uint8Array(D);let C="",L="",O=0,S=!1;const E=F.length;for(;O<E&&S===!1;){const I=String.fromCharCode(F[O++]);I===`
|
|
2
|
+
`||I==="\r"?(L.trim().toLowerCase().startsWith("data")&&(S=!0),L=""):L+=I,C+=I}const x=C.search(/[\r\n]DATA\s(\S*)\s/i),k=/[\r\n]DATA\s(\S*)\s/i.exec(C.slice(x-1));if(m.data=k[1],m.headerLen=k[0].length+x,m.str=C.slice(0,m.headerLen),m.str=m.str.replace(/#.*/gi,""),m.version=/^VERSION (.*)/im.exec(m.str),m.fields=/^FIELDS (.*)/im.exec(m.str),m.size=/^SIZE (.*)/im.exec(m.str),m.type=/^TYPE (.*)/im.exec(m.str),m.count=/^COUNT (.*)/im.exec(m.str),m.width=/^WIDTH (.*)/im.exec(m.str),m.height=/^HEIGHT (.*)/im.exec(m.str),m.viewpoint=/^VIEWPOINT (.*)/im.exec(m.str),m.points=/^POINTS (.*)/im.exec(m.str),m.version!==null&&(m.version=parseFloat(m.version[1])),m.fields=m.fields!==null?m.fields[1].split(" "):[],m.type!==null&&(m.type=m.type[1].split(" ")),m.width!==null&&(m.width=parseInt(m.width[1])),m.height!==null&&(m.height=parseInt(m.height[1])),m.viewpoint!==null&&(m.viewpoint=m.viewpoint[1]),m.points!==null&&(m.points=parseInt(m.points[1],10)),m.points===null&&(m.points=m.width*m.height),m.size!==null&&(m.size=m.size[1].split(" ").map(function(I){return parseInt(I,10)})),m.count!==null)m.count=m.count[1].split(" ").map(function(I){return parseInt(I,10)});else{m.count=[];for(let I=0,R=m.fields.length;I<R;I++)m.count.push(1)}m.offset={};let _=0;for(let I=0,R=m.fields.length;I<R;I++)m.data==="ascii"?m.offset[m.fields[I]]=I:(m.offset[m.fields[I]]=_,_+=m.size[I]*m.count[I]);return m.rowSize=_,m}const i=n(l),o=[],d=[],c=[],u=[],y=[],b=new Fl.Color;if(i.data==="ascii"){const D=i.offset,C=new TextDecoder().decode(l).slice(i.headerLen).split(`
|
|
3
|
+
`);for(let L=0,O=C.length;L<O;L++){if(C[L]==="")continue;const S=C[L].split(" ");if(D.x!==void 0&&(o.push(parseFloat(S[D.x])),o.push(parseFloat(S[D.y])),o.push(parseFloat(S[D.z]))),D.rgb!==void 0){const E=i.fields.findIndex(X=>X==="rgb"),x=i.type[E],k=parseFloat(S[D.rgb]);let _=k;if(x==="F"){const X=new Float32Array(1);X[0]=k,_=new Int32Array(X.buffer)[0]}const I=(_>>16&255)/255,R=(_>>8&255)/255,ae=(_>>0&255)/255;b.setRGB(I,R,ae,Fl.SRGBColorSpace),c.push(b.r,b.g,b.b)}D.normal_x!==void 0&&(d.push(parseFloat(S[D.normal_x])),d.push(parseFloat(S[D.normal_y])),d.push(parseFloat(S[D.normal_z]))),D.intensity!==void 0&&u.push(parseFloat(S[D.intensity])),D.label!==void 0&&y.push(parseInt(S[D.label]))}}if(i.data==="binary_compressed"){const D=new Uint32Array(l.slice(i.headerLen,i.headerLen+8)),m=D[0],F=D[1],C=r(new Uint8Array(l,i.headerLen+8,m),F),L=new DataView(C.buffer),O=i.offset;for(let S=0;S<i.points;S++){if(O.x!==void 0){const E=i.fields.indexOf("x"),x=i.fields.indexOf("y"),k=i.fields.indexOf("z");o.push(this._getDataView(L,i.points*O.x+i.size[E]*S,i.type[E],i.size[E])),o.push(this._getDataView(L,i.points*O.y+i.size[x]*S,i.type[x],i.size[x])),o.push(this._getDataView(L,i.points*O.z+i.size[k]*S,i.type[k],i.size[k]))}if(O.rgb!==void 0){const E=i.fields.indexOf("rgb"),x=L.getUint8(i.points*O.rgb+i.size[E]*S+2)/255,k=L.getUint8(i.points*O.rgb+i.size[E]*S+1)/255,_=L.getUint8(i.points*O.rgb+i.size[E]*S+0)/255;b.setRGB(x,k,_,Fl.SRGBColorSpace),c.push(b.r,b.g,b.b)}if(O.normal_x!==void 0){const E=i.fields.indexOf("normal_x"),x=i.fields.indexOf("normal_y"),k=i.fields.indexOf("normal_z");d.push(this._getDataView(L,i.points*O.normal_x+i.size[E]*S,i.type[E],i.size[E])),d.push(this._getDataView(L,i.points*O.normal_y+i.size[x]*S,i.type[x],i.size[x])),d.push(this._getDataView(L,i.points*O.normal_z+i.size[k]*S,i.type[k],i.size[k]))}if(O.intensity!==void 0){const E=i.fields.indexOf("intensity");u.push(this._getDataView(L,i.points*O.intensity+i.size[E]*S,i.type[E],i.size[E]))}if(O.label!==void 0){const E=i.fields.indexOf("label");y.push(L.getInt32(i.points*O.label+i.size[E]*S,this.littleEndian))}}}if(i.data==="binary"){const D=new DataView(l,i.headerLen),m=i.offset;for(let F=0,C=0;F<i.points;F++,C+=i.rowSize){if(m.x!==void 0){const L=i.fields.indexOf("x"),O=i.fields.indexOf("y"),S=i.fields.indexOf("z");o.push(this._getDataView(D,C+m.x,i.type[L],i.size[L])),o.push(this._getDataView(D,C+m.y,i.type[O],i.size[O])),o.push(this._getDataView(D,C+m.z,i.type[S],i.size[S]))}if(m.rgb!==void 0){const L=D.getUint8(C+m.rgb+2)/255,O=D.getUint8(C+m.rgb+1)/255,S=D.getUint8(C+m.rgb+0)/255;b.setRGB(L,O,S,Fl.SRGBColorSpace),c.push(b.r,b.g,b.b)}if(m.normal_x!==void 0){const L=i.fields.indexOf("normal_x"),O=i.fields.indexOf("normal_y"),S=i.fields.indexOf("normal_z");d.push(this._getDataView(D,C+m.normal_x,i.type[L],i.size[L])),d.push(this._getDataView(D,C+m.normal_y,i.type[O],i.size[O])),d.push(this._getDataView(D,C+m.normal_z,i.type[S],i.size[S]))}if(m.intensity!==void 0){const L=i.fields.indexOf("intensity");u.push(this._getDataView(D,C+m.intensity,i.type[L],i.size[L]))}m.label!==void 0&&y.push(D.getInt32(C+m.label,this.littleEndian))}}const g=new Fl.BufferGeometry;o.length>0&&g.setAttribute("position",new Fl.Float32BufferAttribute(o,3)),d.length>0&&g.setAttribute("normal",new Fl.Float32BufferAttribute(d,3)),c.length>0&&g.setAttribute("color",new Fl.Float32BufferAttribute(c,3)),u.length>0&&g.setAttribute("intensity",new Fl.Float32BufferAttribute(u,1)),y.length>0&&g.setAttribute("label",new Fl.Int32BufferAttribute(y,1)),g.computeBoundingSphere();const p=new Fl.PointsMaterial({size:.005});return c.length>0&&(p.vertexColors=!0),new Fl.Points(g,p)}}const t0=z.useModelComp(z.pinia),{systemPath:Es}=z.storeToRefs(t0),go=e.ref(),Cs=new WeakMap;function s0(a,l,r,n,i){const o=async p=>{try{const D=await z.platformDownloadFile({url:p});if(D.status!==200)throw new Error(`下载失败: ${D.status}`);return D.data}catch(D){throw console.error("addModelFromUrl失败:",D),D}},d=p=>new Promise((D,m)=>{const F=new FileReader;F.onload=C=>{try{const L=C.target.result,S=new Yn.MTLLoader().parse(L);S.preload(),D(S)}catch(L){m(L)}},F.onerror=()=>{m(new Error("MTL文件读取失败"))},F.readAsText(p)}),c=async p=>{const D={materials:{},create:function(m){return this.materials[m]?this.materials[m]:(console.warn(`Material '${m}' not found, using default material`),new Fl.MeshPhongMaterial({color:8947848,side:Fl.DoubleSide}))},getAsArray:function(){const m=[];for(const F in this.materials)m.push(this.materials[F]);return m},preload:function(){for(const m in this.materials)this.materials[m].map&&(this.materials[m].map.needsUpdate=!0)}};for(const m of p){const F=await d(m);Object.assign(D.materials,F.materials)}return D.preload(),D},u=async(p,D=[])=>new Promise((m,F)=>{const C=new FileReader;C.onload=async L=>{try{const O=L.target.result;let S=null;D&&D.length>0&&(D.length===1?S=await d(D[0]):S=await c(D));const E=new Yn.OBJLoader;S&&E.setMaterials(S);const x=E.parse(O);S||x.traverse(k=>{k.isMesh&&(k.material=new Fl.MeshPhongMaterial({color:8947848,side:Fl.DoubleSide}))}),m(x)}catch(O){F(O)}},C.onerror=()=>{F(new Error("OBJ文件读取失败"))},C.readAsText(p)}),y=async p=>{var D;try{r.value=!0;const{scene:m}=a();if(!m)throw new Error("Scene not initialized");i();const F=[];for(let C=0;C<p.length;C++){const L=p[C];n.value=`正在加载模型 ${C+1}/${p.length}...`;const O=await o(L.objUrl),S=((D=L.objUrl)==null?void 0:D.split("/").pop())||`model_${C}.obj`,E=new File([O],S,{type:O.type});let x=[];if(L.mtlUrls){const _=Array.isArray(L.mtlUrls)?L.mtlUrls:[L.mtlUrls];for(let I=0;I<_.length;I++){const R=_[I],ae=await o(R),X=(R==null?void 0:R.split("/").pop())||`material_${C}_${I}.mtl`,me=new File([ae],X,{type:ae.type});x.push(me)}}const k=await u(E,x);m.add(k),l.value.push(k),F.push(k)}return r.value=!1,F}catch(m){throw console.error("加载模型失败:",m),r.value=!1,m}},b=async(p,D,m=[],F=[])=>{let C;const L=p.toLowerCase();switch(L){case".txt":case".cpt":case".obj":const O=await D.text();if(L===".txt"||L===".cpt"){const H=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Me=[...O.matchAll(H)].map(de=>({x:parseFloat(de[1]),y:parseFloat(de[2]),z:parseFloat(de[3])})),Le=new Fl.BufferGeometry,Ie=Me.flatMap(de=>[de.x,de.y,de.z]);if(Le.setAttribute("position",new Fl.Float32BufferAttribute(Ie,3)),L===".txt"){const de=new Fl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});C=new Fl.Points(Le,de)}else if(L===".cpt"){const de=new Fl.LineBasicMaterial({color:"#5B5C99",linewidth:100});C=new Fl.Line(Le,de)}}else if(L===".obj"){const H=new Yn.OBJLoader;if(m&&m.length>0){const Ge=new Yn.MTLLoader;for(const Me of m){const Le=await Me.text(),Ie=Ge.parse(Le);Ie.preload(),H.setMaterials(Ie);break}}C=H.parse(O),(!m||m.length===0)&&C.traverse(Ge=>{Ge.isMesh&&(Ge.material=new Fl.MeshPhongMaterial({color:"#B3B3D4"})),Ge instanceof Fl.Mesh&&(Ge.material.side=Fl.DoubleSide)})}break;case".stl":const S=await D.arrayBuffer(),x=new Yn.STLLoader().parse(S),k=new Fl.MeshPhongMaterial({color:"#B3B3D4",side:Fl.DoubleSide});C=new Fl.Mesh(x,k);break;case".nc":const _=["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"],I={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},R=new Fl.Group,ae=_.map(H=>new Promise((Ge,Me)=>{new Yn.STLLoader().load(Es.value===""?`/model/${H}`:`${Es.value}\\${H}`,Ie=>{const de=new Fl.MeshPhongMaterial({color:I[H]||"#B3B3D4",side:Fl.DoubleSide}),De=new Fl.Mesh(Ie,de);Ge(De)},void 0,Me)}));try{(await Promise.all(ae)).forEach(Ge=>R.add(Ge)),C=R}catch(H){throw console.error("加载NC文件对应的STL文件失败:",H),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const X=new o0,me=new Fl.Group;try{const H=await Xa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ge=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),Me=await Xa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Le=new Blob([Me.data],{type:"application/octet-stream;charset=UTF-8"}),Ie=await new Promise((De,Je)=>{const Sa=URL.createObjectURL(Ge);X.load(Sa,We=>{const V=new Float32Array(We.geometry.attributes.position.count*3);for(let P=0;P<We.geometry.attributes.position.count;P++)V[P*3]=1,V[P*3+1]=0,V[P*3+2]=0;We.geometry.setAttribute("color",new Fl.BufferAttribute(V,3)),We.material.vertexColors=!0,We.scale.set(.3,.3,.3),URL.revokeObjectURL(Sa),De(We)},void 0,Je)}),de=await new Promise((De,Je)=>{const Sa=URL.createObjectURL(Le);X.load(Sa,We=>{const V=new Float32Array(We.geometry.attributes.position.count*3);for(let P=0;P<We.geometry.attributes.position.count;P++)V[P*3]=0,V[P*3+1]=1,V[P*3+2]=0;We.geometry.setAttribute("color",new Fl.BufferAttribute(V,3)),We.material.vertexColors=!0,We.scale.set(.3,.3,.3),URL.revokeObjectURL(Sa),De(We)},void 0,Je)});me.add(Ie),me.add(de),C=me}catch(H){throw console.error("PCD文件加载失败:",H),new Error("无法加载PCD文件")}break;case".urdf":const ue=URL.createObjectURL(D),U=new nd.URDFLoader,W="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",Z={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},Q=new WeakMap,ve=new WeakMap,Ae=new WeakMap,te=async H=>{if(Q.has(H))return console.log(`从缓存加载: ${H}`),Q.get(H);try{const Ge=await Xa.axios.get(`${W}/${H}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Me=new Blob([Ge.data],{type:"application/octet-stream;charset=UTF-8"});return Z.enableCache&&Q.set(H,Me),Me}catch(Ge){throw console.error(`加载文件失败: ${H}`,Ge),new Error(`无法加载文件: ${H}`)}},A=(H="default")=>{if(ve.has(H))return ve.get(H);const Ge=new Fl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Fl.FrontSide});return ve.set(H,Ge),Ge},se=H=>{try{H.isBufferGeometry&&H.mergeVertices&&H.mergeVertices(),H.computeVertexNormals&&H.computeVertexNormals(),H.computeBoundingSphere&&H.computeBoundingSphere(),H.deleteAttribute&&H.deleteAttribute("uv2")}catch(Ge){console.warn("几何体优化失败,使用原始几何体:",Ge)}return H},G=async(H,Ge,Me)=>{const Le=`stl_${Ge}`;if(Ae.has(Le)){const Je=Ae.get(Le);return new Fl.Mesh(Je,A())}const Ie=await H.arrayBuffer();let De=new Yn.STLLoader(Me).parse(Ie);return De=se(De),Ae.set(Le,De),new Fl.Mesh(De,A())},fe=async(H,Ge,Me)=>{const Le=`obj_${Ge}`;if(Q.has(Le))return Q.get(Le).clone();const Ie=await H.text(),de=new Yn.OBJLoader(Me),De=Ge.replace(".obj",".mtl");try{const We=await(await te(De)).text(),P=new Yn.MTLLoader(Me).parse(We);P.preload(),de.setMaterials(P)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${De}`)}const Je=de.parse(Ie);return Je.traverse(Sa=>{Sa.isMesh&&(Sa.geometry=se(Sa.geometry),Sa.castShadow=!0,Sa.receiveShadow=!0,Sa.renderOrder=1)}),Q.set(Le,Je),Je},we=(H,Ge)=>{const Me=new Fl.LOD;if(Me.addLevel(H,0),H.geometry){const Le=H.geometry.clone(),Ie=new Fl.Mesh(Le,H.material);Me.addLevel(Ie,50)}return Me};let _e=0,Ue=0;const ra=[];U.loadMeshCb=async(H,Ge,Me,Le,Ie)=>{const de=H.split("/").pop(),De=Me||(()=>{});_e++;const Je=new Promise(async(Sa,We)=>{try{const V=await te(de);if(!V||V.size===0)throw new Error(`文件为空: ${de}`);const P=de.split(".").pop().toLowerCase();let le;switch(P){case"stl":le=await G(V,de,Ge);break;case"obj":le=await fe(V,de,Ge);break;default:throw new Error(`不支持的文件格式: ${P}`)}Z.enableLOD&&le.isMesh&&(le=we(le,de)),De(le),Ue++,Le&&Le({loaded:Ue,total:_e,progress:Ue/_e}),Sa(le)}catch(V){console.error(`mesh文件加载失败: ${de}`,V);const P=new Fl.Group;De(P),Sa(P);const le=new Fl.BoxGeometry(.1,.1,.1),ce=new Fl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Fl.Mesh(le,ce)}});ra.push(Je)};try{if(!ue){go.value=void 0;break}if(C=await U.loadAsync(ue),console.log(`URDF文件加载完成,等待${_e}个mesh文件加载...`),ra.length>0)try{await Promise.allSettled(ra),console.log(`所有mesh文件处理完成,成功加载: ${Ue}/${_e}`)}catch(Me){console.warn("部分mesh文件加载失败,但继续显示模型",Me)}C.traverse(Me=>{Me.isMesh&&(Me.castShadow=!0,Me.receiveShadow=!0,Me.renderOrder=1,Me.material&&(Me.material.needsUpdate=!0))}),console.time("计算包围盒");const H=new Fl.Box3;H.expandByObject(C);const Ge=`urdf_${Date.now()}`;C.userData.boundingBox=H.clone(),C.userData.modelId=Ge,Cs.set(Ge,{box:H.clone(),center:H.getCenter(new Fl.Vector3),size:H.getSize(new Fl.Vector3),maxSize:Math.max(...H.getSize(new Fl.Vector3).toArray())}),go.value=C,console.log("URDF模型加载完成并优化")}catch(H){console.error("URDF加载失败:",H),go.value=void 0}finally{ue&&URL.revokeObjectURL(ue)}break;default:throw new Error(`不支持的文件格式: ${p}`)}return C};return{addModelsFromUrls:y,loadModelByDefaultPath:async p=>{console.log(p);try{r.value=!0,n.value="正在加载模型...";const{scene:D}=a();if(!D)throw new Error("Scene not initialized");i(),await new Promise(F=>setTimeout(F,100));const m=[];for(let F=0;F<p.length;F++){const C=p[F],L=await b(C.suffix,C.blob,C.mtlBlobs||[],C.meshFiles||[]);L&&(D.add(L),l.value.push(L),m.push(L))}return r.value=!1,n.value="",m}catch(D){throw console.error("加载模型失败:",D),r.value=!1,n.value="",D}},urdfModel:go,modelBoundingBoxes:Cs}}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=(r=(r=document.getElementsByTagName("script"))[r.length-1]).getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,i,o,d,c,u=function(g,p){p.parentNode.insertBefore(g,p)};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(g){console&&console.log(g)}}n=function(){var g,p=document.createElement("div");p.innerHTML=a._iconfont_svg_string_4827314,(p=p.getElementsByTagName("svg")[0])&&(p.setAttribute("aria-hidden","true"),p.style.position="absolute",p.style.width=0,p.style.height=0,p.style.overflow="hidden",p=p,(g=document.body).firstChild?u(p,g.firstChild):g.appendChild(p))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=n,d=a.document,c=!1,b(),d.onreadystatechange=function(){d.readyState=="complete"&&(d.onreadystatechange=null,y())})}function y(){c||(c=!0,o())}function b(){try{d.documentElement.doScroll("left")}catch{return void setTimeout(b,50)}y()}})(window);const c0=["onClick"],u0=["src"],d0=["src"],p0=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:""},backgroundPosition:{default:"Center"},iconUrl:{default:void 0},calculator:{default:()=>[]},textBackColor:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(null),o=e.ref(null),d=x=>{var _,I,R,ae;let k={};if(x!=null&&x.find(X=>X==null?void 0:X.includes("@TextSize"))){let X=(I=(_=x==null?void 0:x.find(me=>me==null?void 0:me.includes("@TextSize")))==null?void 0:_.split("="))==null?void 0:I[1];k.fontSize=`${X}px`}if(x!=null&&x.find(X=>X==null?void 0:X.includes("@TextRGBA"))){let X=(ae=(R=x==null?void 0:x.find(me=>me==null?void 0:me.includes("@TextRGBA")))==null?void 0:R.split("="))==null?void 0:ae[1];k.color=re.rgbaToColor(X)}return k},c=e.computed(()=>{const x=Number(r==null?void 0:r.textSize),k=re.rgbaToColor(r==null?void 0:r.textColor),_={},I={};return!Number.isNaN(x)&&x&&(_.fontSize=`${x}px`,I.fontSize=`${x}px`),k&&(_.color=k,I.color=k),{label:_,value:I}}),u=e.ref(""),y=e.ref(""),b=e.ref(!1),g=async x=>{if(x){y.value&&(URL.revokeObjectURL(y.value),y.value="");try{const k=await z.platformDownloadFile({url:x}),_=new Blob([k==null?void 0:k.data],{type:(k==null?void 0:k.headers["content-type"])||"image/*"});y.value=URL.createObjectURL(_)}catch{y.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,x=>{x&&(u.value=x)},{immediate:!0}),e.watch(u,x=>{g(x)},{immediate:!0});const p=async()=>{var x,k;((x=r==null?void 0:r.calculator)==null?void 0:x.length)>0&&await Rt(r==null?void 0:r.items,"Auto",[],r==null?void 0:r.calculator),(k=o.value)==null||k.click()},D=async x=>{var I,R,ae;const k=x.target,_=(I=k==null?void 0:k.files)==null?void 0:I[0];if(!_){k.value="";return}b.value=!0;try{const X=new FormData;X.append("file",_);const me=await z.platformUploadFile(X),ue=(ae=(R=me==null?void 0:me.data)==null?void 0:R.result)==null?void 0:ae.url;ue?(u.value=ue,n("update:backGroundImage",ue),g(ue),Xa.ElMessage.success("背景图片上传成功")):Xa.ElMessage.error("背景图片上传失败")}catch{Xa.ElMessage.error("背景图片上传失败")}finally{b.value=!1,k.value=""}},m=e.computed(()=>{var x,k,_,I;return y.value||(r==null?void 0:r.backgroundUrl)!==""?{backgroundImage:`url("${(x=r==null?void 0:r.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundPosition:`${((k=r==null?void 0:r.backgroundPosition)==null?void 0:k.toLowerCase())??"center"} center`,backgroundRepeat:"no-repeat",cursor:((_=r==null?void 0:r.calculator)==null?void 0:_.length)>0?"pointer":"auto"}:{cursor:((I=r==null?void 0:r.calculator)==null?void 0:I.length)>0?"pointer":"auto",background:r!=null&&r.textBackColor?re.rgbaToColor(r==null?void 0:r.textBackColor):void 0}}),F=x=>ul.getComponent(x),C=x=>{if(!x)return;const k=x.querySelector("input, textarea, .el-input__inner");k&&typeof k.focus=="function"&&k.focus()},L=(x,k,_)=>{r.disabled||x.field&&(i.value=k,e.nextTick(()=>{C(_.currentTarget)}))},O=()=>{i.value=null},S=x=>{var _;const k=((_=x==null?void 0:x.field)==null?void 0:_.value)??(x==null?void 0:x.value);return k==null||k===""?"-":k},E=x=>{var ae,X,me,ue;const k=x!=null&&x.width&&x.width>0?x.width:1,I=`calc((100% - ${(k-1)*16}px) / ${k})`;let R;return(ae=x==null?void 0:x.filters)!=null&&ae.find(U=>U==null?void 0:U.includes("@TextBackRGBA"))&&(R=(ue=(me=(X=x==null?void 0:x.filters)==null?void 0:X.find(U=>U==null?void 0:U.includes("@TextBackRGBA")))==null?void 0:me.split("="))==null?void 0:ue[1],R=re.rgbaToColor(R)),{flex:`0 0 ${I}`,maxWidth:I,minWidth:"140px",boxSizing:"border-box",background:R}};return(x,k)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(m.value),onClick:k[1]||(k[1]=_=>p())},[r!=null&&r.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:k[0]||(k[0]=e.withModifiers(_=>p(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:o,type:"file",accept:"image/*",style:{display:"none"},onChange:D},null,544),k[2]||(k[2]=e.createElementVNode("img",{src:ul._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.items,(_,I)=>{var R,ae,X,me,ue,U,W,Z;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:I,style:e.normalizeStyle(E(_))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle({...c.value.label,...d(_==null?void 0:_.filters)})},e.toDisplayString(_==null?void 0:_.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(c.value.value),onClick:Q=>{var ve;return(ve=_.field)!=null&&ve.isNoClick?null:L(_,I,Q)}},[x.iconUrl&&x.backgroundPosition==="Left"?(e.openBlock(),e.createElementBlock("img",{key:0,src:x.iconUrl,class:"bg-upload-icon"},null,8,u0)):e.createCommentVNode("",!0),i.value===I&&_.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(F(((R=_.field)==null?void 0:R.type)??"Input")),{key:1,modelValue:_.field.value,"onUpdate:modelValue":Q=>_.field.value=Q,isEdit:!0,disabled:(ae=_.field)==null?void 0:ae.disabled,content:((X=_.field)==null?void 0:X.contents)??[],optionUrl:_.field,originalValue:(me=_.field)==null?void 0:me.value,config:(ue=_.field)==null?void 0:ue.config,configModel:((U=_.field)==null?void 0:U.prop)??((W=_.field)==null?void 0:W.name),selectedTagList:((Z=_.field)==null?void 0:Z.selectValue)??[],onBlur:O,onBlurChange:O},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(S(_)),1)],64)),x.iconUrl&&x.backgroundPosition==="Right"?(e.openBlock(),e.createElementBlock("img",{key:3,src:x.iconUrl,class:"bg-upload-icon"},null,8,d0)):e.createCommentVNode("",!0)],12,c0)],4)}),128))],4))}}),f0=fr._export_sfc(p0,[["__scopeId","data-v-3e28c1c9"]]),Cc=z.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),h0={class:"calculator-content"},v0={class:"calculator-child"},m0={class:"calculator-child"},y0=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),r=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],r.value=[{type:"Upload",label:"输出",name:"output"}]}),(n,i)=>(e.openBlock(),e.createElementBlock("div",h0,[e.createElementVNode("div",v0,[e.createVNode(ul.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",m0,[e.createVNode(ul.ssForm,{rowContents:r.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),g0=fr._export_sfc(y0,[["__scopeId","data-v-73db0fe7"]]),Tt=(a,l)=>{let r=a,n=l;return Array.isArray(r)&&(r=r==null?void 0:r.map((i,o)=>{if(Array.isArray(i)){let d={};return i=i==null?void 0:i.forEach((c,u)=>{var y;(y=n==null?void 0:n[u])!=null&&y.prop?d[n[u].prop]=c:Array.isArray(c)&&(d.children=Tt(c,n))}),Object.assign(d,{id:o})}else return i})),r},$t=(a,l,r)=>{let n=a,i=l;return n=n==null?void 0:n.map((o,d)=>{var c,u;return!Array.isArray(o)||!((c=i==null?void 0:i[d])!=null&&c.label)&&!r||(o.unshift(((u=i==null?void 0:i[d])==null?void 0:u.label)??""),o.some(y=>Array.isArray(y))&&(o=o==null?void 0:o.map(y=>{var b;return Array.isArray(y)&&(y=$t(y,(b=i==null?void 0:i[d])==null?void 0:b.children,r)),y}))),o}),n},b0=(a,l,r)=>{if(l==="")return a==null?void 0:a.filter(n=>(n==null?void 0:n.id)!==r);{const n=l.split("-");return k0(a,n,r)}},k0=(a,l,r)=>{let n=a,i=l;return(i==null?void 0:i.length)===0?n=n==null?void 0:n.filter(o=>o.id!==r):n=n==null?void 0:n.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Dc(o,i,r)),o)),n},Dc=(a,l,r)=>{var o,d;let n=a,i=l;return(i==null?void 0:i.length)===0?n.children=(o=n.children)==null?void 0:o.filter(c=>c.id!==r):n.children=(d=n.children)==null?void 0:d.map(c=>(c.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),c=Dc(c,i,r)),c)),n},x0=(a,l,r)=>{if(l==="")return r;{const n=l.split("-");return w0(a,n,r)}},w0=(a,l,r)=>{let n=a,i=l;return(i==null?void 0:i.length)===0?n=r:n=n==null?void 0:n.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Tc(o,i,r)),o)),n},Tc=(a,l,r)=>{var o;let n=a,i=l;return(i==null?void 0:i.length)===0?n.children=r:n.children=(o=n.children)==null?void 0:o.map(d=>(d.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),d=Tc(d,i,r)),d)),n};class _0{constructor(l={}){hn(this,"url");hn(this,"heartbeatInterval");hn(this,"socket",null);hn(this,"isConnected",!1);hn(this,"heartTimer",null);hn(this,"canvas",null);hn(this,"ctx",null);hn(this,"mainCamCutMode",0);hn(this,"pMainShowStartX",0);hn(this,"pMainShowStartY",0);hn(this,"onLog");hn(this,"onDevCount");hn(this,"onResolution");hn(this,"onCameraStatus");hn(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,r,n){var d;(d=this.canvas)!=null&&d.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const i=document.createElement("canvas");i.style.border="solid 1px #A0A0A0",i.id="MainCamCanvas",i.width=r,i.height=n;const o=i.getContext("2d");if(!o)throw new Error("无法获取 CanvasRenderingContext2D");l.appendChild(i),this.canvas=i,this.ctx=o}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((l,r)=>{const n=new WebSocket(this.url);n.binaryType="arraybuffer",n.onopen=()=>{this.socket=n,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},n.onerror=i=>{this.isConnected=!1,this.log("socket.onerror"),r(i)},n.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},n.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 r=l.find(i=>i.width===2592&&i.height===1944);return r||[...l].sort((i,o)=>o.width*o.height-i.width*i.height)[0]||null}openCamera(l=0,r=1280,n=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]=r>>8&255,i[9]=r&255,i[10]=n>>8&255,i[11]=n&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 r;(r=this.onLog)==null||r.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,o,d,c,u,y;const r=new Uint8Array(l.data);if(r.length<=0)return;if(r[0]===17&&r[1]===17&&r[2]===17){this.log("heart socket!!!!");return}if(r[0]!==85||r[1]!==102)return;const n=r[2];if(n===80){const b=r[3],g=r.length-4,p=new Uint8Array(g);for(let F=0;F<g;F++)p[F]=r[4+F];const m=decodeURIComponent(this.byteToString(p)).split("|");(i=this.onDevCount)==null||i.call(this,b,m);return}if(n===81){const b=r[3]||0,g=[];for(let p=0;p<b;p++){const D=(r[4+p*4+0]||0)*256+(r[4+p*4+1]||0),m=(r[4+p*4+2]||0)*256+(r[4+p*4+3]||0);g.push({width:D,height:m,text:`${D}*${m}`})}(o=this.onResolution)==null||o.call(this,b,g);return}if(n===1){r[3]===1&&((d=this.onCameraStatus)==null||d.call(this,"opened")),r[3]===3&&((c=this.onCameraStatus)==null||c.call(this,"closed"));return}if(n===16){if(r[3]===1){const g=r[4]*256+r[5],p=r[6]*65536+r[7]*256+r[8];let D="";if(g>0){const C=new Uint8Array(g);for(let L=0;L<g;L++)C[L]=r[9+L];D=decodeURIComponent(this.byteToString(C))}const m=new Uint8Array(p);for(let C=0;C<p;C++)m[C]=r[9+g+C];const F=this.uint8ArrayToString(m);(u=this.onPhoto)==null||u.call(this,{flag:0,imgPath:D,base64:F})}r[3]===2&&((y=this.onPhoto)==null||y.call(this,{flag:2,imgPath:"",base64:""}));return}if(n===204){if(!this.canvas||!this.ctx)return;const b=r[3]*256+r[4],g=r[5]*256+r[6];this.pMainShowStartX=r[7]*256+r[8],this.pMainShowStartY=r[9]*256+r[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const p=this.ctx.createImageData(b,g);let D=11;for(let m=0;m<p.data.length;m+=4)p.data[m+0]=r[D],p.data[m+1]=r[D+1],p.data[m+2]=r[D+2],p.data[m+3]=255,D+=3;this.ctx.putImageData(p,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let r="";for(let n=0;n<l.length;n++)r+=String.fromCharCode(l[n]);return r}byteToString(l){let r="";for(let n=0;n<l.length;n++)r+=String.fromCharCode(l[n]);return r}}const S0={style:{display:"flex",gap:"16px",height:"100%"}},E0={key:0,style:{color:"var(--el-text-color-secondary)"}},C0={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},D0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},T0={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"}},B0={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},N0={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},A0=["src","onClick"],z0=["onClick"],M0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},I0={class:"dialog-footer"},O0=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(null),o=e.ref(!1),d=e.ref([]),c=e.ref(""),u=e.ref(!1),y=e.ref([]),b=new _0({url:"ws://127.0.0.1:22225"});function g(R,ae){var Z;const X=R.split(","),me=((Z=X[0].match(/:(.*?);/))==null?void 0:Z[1])??"image/jpeg",ue=atob(X[1]);let U=ue.length;const W=new Uint8Array(U);for(;U--;)W[U]=ue.charCodeAt(U);return new File([W],ae,{type:me})}function p(){b.onLog=R=>{console.log("[GPY]",R)},b.onDevCount=(R,ae)=>{if(c.value+=`设备数量=${R},设备=${ae.join(",")}
|
|
4
|
+
`,R>0){c.value+=`检测到设备,正在获取分辨率...
|
|
5
|
+
`;try{b.getResolution(0)}catch(X){c.value+=`获取分辨率失败:${(X==null?void 0:X.message)??X}
|
|
6
|
+
`}}else c.value+=`未检测到高拍仪设备!
|
|
7
|
+
`},b.onResolution=(R,ae)=>{if(R<=0||!Array.isArray(ae)||ae.length===0){c.value+=`未获取到可用分辨率,回退使用 1280*720 打开...
|
|
8
|
+
`;try{b.openCamera(0,1280,720)}catch(me){c.value+=`打开摄像头失败:${(me==null?void 0:me.message)??me}
|
|
9
|
+
`}return}const X=b.chooseResolution(ae);if(!X){c.value+=`分辨率选择失败,回退使用 1280*720 打开...
|
|
10
|
+
`;try{b.openCamera(0,1280,720)}catch(me){c.value+=`打开摄像头失败:${(me==null?void 0:me.message)??me}
|
|
11
|
+
`}return}c.value+=`获取分辨率 ${X.text}成功,打开摄像头...
|
|
12
|
+
`;try{b.closeCamera(),setTimeout(()=>{try{b.openCamera(0,X.width,X.height)}catch(me){c.value+=`打开摄像头失败:${(me==null?void 0:me.message)??me}
|
|
13
|
+
`}},100)}catch{try{b.openCamera(0,X.width,X.height)}catch(me){c.value+=`打开摄像头失败:${(me==null?void 0:me.message)??me}
|
|
14
|
+
`}}},b.onCameraStatus=R=>{R==="opened"?(o.value=!0,c.value+=`摄像头已打开
|
|
15
|
+
`):(o.value=!1,c.value+=`摄像头已关闭
|
|
16
|
+
`)},b.onPhoto=R=>{if(R.flag===0&&R.base64){const ae=`data:image/jpeg;base64,${R.base64}`,X=g(ae,`gpy-capture-${Date.now()}.jpg`);d.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:ae,file:X}),c.value+=`拍照完成,已接收图片(当前 ${d.value.length} 张)
|
|
17
|
+
`}else c.value+=`拍照失败 flag=${R.flag}
|
|
18
|
+
`}}const D=async()=>{if(await e.nextTick(),!i.value)return;m(),p();const R=i.value.getBoundingClientRect();b.init(i.value,Math.floor(R.width),Math.floor(R.height)),c.value+=`正在连接设备服务...
|
|
19
|
+
`,await b.connect(),c.value+=`正在获取设备数量...
|
|
20
|
+
`,b.getDevCount()},m=()=>{try{b.destroy()}catch(R){console.error(R)}o.value=!1,d.value=[],c.value="",u.value=!1,y.value=[]};e.watch(()=>r.visible,R=>{R?D():m()});const F=()=>{try{b.bestSize()}catch(R){console.error(R)}},C=()=>{try{b.rotateLeft()}catch(R){console.error(R)}},L=()=>{try{b.rotateRight()}catch(R){console.error(R)}},O=()=>{try{b.focus()}catch(R){console.error(R)}},S=()=>{c.value+=`正在拍照...
|
|
21
|
+
`;try{b.photo()}catch(R){c.value+=`拍照调用失败:${(R==null?void 0:R.message)??R}
|
|
22
|
+
`}},E=()=>{d.value.length>0?n("confirm",d.value.map(R=>R.file)):n("confirm",[])},x=R=>{R<0||R>=d.value.length||(d.value.splice(R,1),c.value+=`已删除一张图片(剩余 ${d.value.length} 张)
|
|
23
|
+
`)},k=R=>{if(!R)return;const ae=`gpy-preview-${Date.now()}.jpg`;y.value=[{name:ae,blobUrl:R}],u.value=!0},_=()=>{u.value=!1},I=()=>{m(),n("cancel")};return(R,ae)=>{const X=e.resolveComponent("el-input"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Vr.ssDialog,{title:"扫描录入",visible:r.visible,onBeforeDestroy:I,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",S0,[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)"}},[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",E0,"初始化摄像头..."))],512),e.createElementVNode("div",C0,[e.createElementVNode("div",D0,[ae[0]||(ae[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",T0,[d.value.length===0?(e.openBlock(),e.createElementBlock("div",B0,"暂无图片")):(e.openBlock(),e.createElementBlock("div",N0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(ue,U)=>(e.openBlock(),e.createElementBlock("div",{key:ue.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:ue.url,onClick:W=>k(ue.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,A0),e.createElementVNode("div",{onClick:W=>x(U),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,z0)]))),128))]))],512)]),e.createElementVNode("div",M0,[ae[1]||(ae[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(X,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",I0,[e.createVNode(me,{onClick:F,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[2]||(ae[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(me,{onClick:C,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(me,{onClick:L,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[4]||(ae[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(me,{onClick:O,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(me,{onClick:S,disabled:!o.value,id:"themeButton"},{default:e.withCtx(()=>ae[6]||(ae[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),ae[9]||(ae[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(me,{onClick:E,disabled:d.value.length===0,id:"themeButton"},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(me,{onClick:I,id:"themeBorderButton"},{default:e.withCtx(()=>ae[8]||(ae[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),u.value?(e.openBlock(),e.createBlock(ul.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:_},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),L0=fr._export_sfc(O0,[["__scopeId","data-v-24a2050a"]]),Ds=z.useMenuState(z.pinia);let Ai="$R";const R0=async a=>{var o,d,c,u,y,b;let l=a==null?void 0:a.导入文件,r=a==null?void 0:a.函数参数,n=(o=l==null?void 0:l[0])==null?void 0:o.url,i="";if(!(n!=null&&n.includes("http"))||!(n!=null&&n.includes("https"))){Ds.setContentLoading(!0);const g=await z.platformDownloadFile({url:n});let p=g==null?void 0:g.data;const D=new FormData;D.append("file",p,((d=l==null?void 0:l[0])==null?void 0:d.name)+"."+((c=n==null?void 0:n.split("."))==null?void 0:c[1])),D.append("query",r);let m=await vc(D);m=(b=(y=(u=m==null?void 0:m.data)==null?void 0:u.data)==null?void 0:y.response)==null?void 0:b.replace("generateResult",a==null?void 0:a.函数名称),i=m,Ds.setContentLoading(!1)}return i},$0=a=>{var r,n;if(a==="")return;let l=a;return l=(n=(r=l==null?void 0:l.replace("(",Ai))==null?void 0:r.split(Ai))==null?void 0:n[1],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1),l=re.analyzeSplitToContent(l,","),l=l==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)),l=l==null?void 0:l.filter(i=>(i==null?void 0:i.includes("If"))&&!(i!=null&&i.includes("@If"))),l=l==null?void 0:l.map(i=>{var c,u,y,b,g;let o=i;o=(u=(c=o==null?void 0:o.replace("=",Ai))==null?void 0:c.split(Ai))==null?void 0:u[1],o=(y=re.analyzeSplitToContent(o,")"))==null?void 0:y[0];let d=i==null?void 0:i.replaceAll(o,"");return(o==null?void 0:o[0])==="("&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),o=(g=(b=o==null?void 0:o.replace("(",Ai))==null?void 0:b.split(Ai))==null?void 0:g[1],o="("+o,o=re.calculatorAndToOr(o),{key:d,content:o}}),l},Ts=(a,l)=>{let r=[l];return a==null||a.forEach(n=>{for(let i in n)n[i]!=="!"?r=r==null?void 0:r.filter(o=>{var d;return(o==null?void 0:o[i])===(n==null?void 0:n[i])||(o==null?void 0:o[(d=Object.keys(o))==null?void 0:d.find(c=>c==null?void 0:c.includes("."+i))])===(n==null?void 0:n[i])}):r=r==null?void 0:r.filter(o=>{var d;return(o==null?void 0:o[i])!==(n==null?void 0:n[i])&&(o==null?void 0:o[(d=Object.keys(o))==null?void 0:d.find(c=>c==null?void 0:c.includes("."+i))])!==(n==null?void 0:n[i])})}),r},Vt=z.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),V0=z.useModelComp(z.pinia),{extraContents:sm}=z.storeToRefs(V0),F0=z.useLoginState(z.pinia),{extraUrl:mi}=z.storeToRefs(F0);let Bc=mi.value===""||!mi.value?"http://139.196.154.85:20015":mi.value;e.watch(()=>mi.value,()=>{Bc=mi.value===""||!mi.value?"http://139.196.154.85:20015":mi.value},{deep:!0,immediate:!0});const Ao={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},Bs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:Bc+"/api/public/paddleOCR"};class P0{constructor(l){hn(this,"config");this.config={...Bs,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const r=this.config.maxSize*1024*1024;return l.size<=r}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=Xa.Local.get(Xa.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,r){return{title:r,form:{OCR图片文件:l}}}async recognize(l,r){const n=this.getAuthorizationToken(),i=this.buildOCRRequest(l,r),o=this.config.apiUrl||Bs.apiUrl||"";return(await Xa.axios.post(o,i,{headers:{"Content-Type":"application/json",Authorization:n}})).data}getFieldAliases(l){return Ao[l]?Ao[l]:[l]}extractTableHeaders(l){const r=[],n=new Set,i=d=>{const c=d==null?void 0:d.label;return!(!c||c==="操作"||c===this.config.columnName||(d==null?void 0:d.type)==="operate"||(d==null?void 0:d.prop)==="operate")},o=d=>{(d||[]).forEach(c=>{if(!c)return;const u=(c==null?void 0:c.children)||(c==null?void 0:c.child)||(c==null?void 0:c.columns);if(Array.isArray(u)&&u.length>0){o(u);return}if(i(c)){const y=c.label;if(!n.has(y)){n.add(y);const b=this.getFieldAliases(y);r.push(b)}}})};return o(l||[]),r}}function Nc(a){return new P0(a)}Nc();const Bt=async(a,l)=>{var d,c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k;let r=(c=(d=z.cloneDeep(a))==null?void 0:d.optionUrl)==null?void 0:c.menuSelect,n=[];r==null||r.forEach(_=>{});let i="",o=await re.menuToParent(r);if(o==null||o.forEach(_=>{var I,R,ae,X;(_==null?void 0:_.name)===(((X=(ae=(R=(I=z.cloneDeep(a))==null?void 0:I.optionUrl)==null?void 0:R.groupSelect)==null?void 0:ae[0])==null?void 0:X.replaceAll("'",""))??"")&&(i=_==null?void 0:_.id)}),l){i=l;const _=await Zr.getInsofDataApi({id:i}),I=(g=(b=(y=(u=_==null?void 0:_.data)==null?void 0:u.result)==null?void 0:y[0])==null?void 0:b.key)==null?void 0:g.pageKey;o=await re.getItemData(I,sessionStorage.getItem("systemKey"),"")}if(i!==""){let _;l?_=(p=o==null?void 0:o.find(ae=>(ae==null?void 0:ae.id)===l))==null?void 0:p.compData:_=(D=o==null?void 0:o.find(ae=>{var X,me,ue,U;return(ae==null?void 0:ae.name)===(((me=(X=a==null?void 0:a.groupSelect)==null?void 0:X.split(":"))==null?void 0:me[0])||((U=(ue=a==null?void 0:a.optionUrl)==null?void 0:ue.groupSelect)==null?void 0:U[0]))}))==null?void 0:D.compData;let I=(F=(m=_==null?void 0:_.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:m.contents)==null?void 0:F.map(ae=>ae==null?void 0:ae.label);(L=(C=_==null?void 0:_.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:C.contents)!=null&&L.every(ae=>Array.isArray(ae))&&(I=(E=re.getColumnChild((S=(O=_==null?void 0:_.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:O.contents)==null?void 0:S[0]))==null?void 0:E.map(ae=>ae==null?void 0:ae.prop));let R=(k=(x=_==null?void 0:_.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:x.contents)==null?void 0:k.map(ae=>{if(Array.isArray(ae))ae=ae==null?void 0:ae.filter(X=>!(X!=null&&X.id));else{let X={};for(let me in ae)me!=="id"&&(X[me]=ae==null?void 0:ae[me]);ae=X}return ae});R==null||R.forEach(ae=>{Array.isArray(ae)?n.push(re.getValueToObjectValue(ae,I)):n.push(ae)})}return n},j0=z.useMenuState(z.pinia),{activeMenuPath:cm}=z.storeToRefs(j0),H0=z.useUnit(z.pinia),{chooseTitle:um}=z.storeToRefs(H0),U0="col-operate",Ac=a=>`${U0}-${a}`,q0=(a,l)=>{const r=new Map;a.forEach(i=>{const{prop:o}=i;r.set(o,i)});const n=i=>{Array.isArray(i)&&i.forEach(o=>{const{prop:d}=o||{},c=r.get(d);W0(c,o),Array.isArray(o==null?void 0:o.children)&&o.children.length>0&&n(o.children)})};return n(l),l},W0=(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),G0=(a,l)=>{const{sortable:r=!1,filterable:n=!1,showSummary:i=!1,operable:o=!1,fixed:d=!1}=l||{};return{prop:a,sortable:r,filterable:n,showSummary:i,operable:o,fixed:d}},K0=async a=>{var o,d;if(!a)return;const l=Ac(a),r=await Zr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),n=(o=r==null?void 0:r.data)==null?void 0:o.code,i=(d=r==null?void 0:r.data)==null?void 0:d.result;if(n==200)return i==null?void 0:i[0]},Y0=async a=>{if(a)return[]},J0=async(a,l)=>{if(!a||!l)return;const r=Ac(a);return await Zr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r},value:{columns:l}})},X0=async(a,l)=>!a||!l?void 0:await Zr.updateInsofDataApi({id:a,value:{columns:l}}),Ns=async(a,l)=>{const r=sessionStorage.getItem("systemKey");if(!a||!l||!r)return;const n=await K0(a);return n?await X0(n==null?void 0:n.id,l):await J0(a,l)};var So={exports:{}},Z0=So.exports,As;function Q0(){return As||(As=1,function(a,l){(function(r,n){n()})(Z0,function(){function r(y,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(y.type)?new Blob(["\uFEFF",y],{type:y.type}):y}function n(y,b,g){var p=new XMLHttpRequest;p.open("GET",y),p.responseType="blob",p.onload=function(){u(p.response,b,g)},p.onerror=function(){console.error("could not download file")},p.send()}function i(y){var b=new XMLHttpRequest;b.open("HEAD",y,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function o(y){try{y.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),y.dispatchEvent(b)}}var d=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof z.commonjsGlobal=="object"&&z.commonjsGlobal.global===z.commonjsGlobal?z.commonjsGlobal:void 0,c=d.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=d.saveAs||(typeof window!="object"||window!==d?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(y,b,g){var p=d.URL||d.webkitURL,D=document.createElement("a");b=b||y.name||"download",D.download=b,D.rel="noopener",typeof y=="string"?(D.href=y,D.origin===location.origin?o(D):i(D.href)?n(y,b,g):o(D,D.target="_blank")):(D.href=p.createObjectURL(y),setTimeout(function(){p.revokeObjectURL(D.href)},4e4),setTimeout(function(){o(D)},0))}:"msSaveOrOpenBlob"in navigator?function(y,b,g){if(b=b||y.name||"download",typeof y!="string")navigator.msSaveOrOpenBlob(r(y,g),b);else if(i(y))n(y,b,g);else{var p=document.createElement("a");p.href=y,p.target="_blank",setTimeout(function(){o(p)})}}:function(y,b,g,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof y=="string")return n(y,b,g);var D=y.type==="application/octet-stream",m=/constructor/i.test(d.HTMLElement)||d.safari,F=/CriOS\/[\d]+/.test(navigator.userAgent);if((F||D&&m||c)&&typeof FileReader<"u"){var C=new FileReader;C.onloadend=function(){var S=C.result;S=F?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=S:location=S,p=null},C.readAsDataURL(y)}else{var L=d.URL||d.webkitURL,O=L.createObjectURL(y);p?p.location=O:location.href=O,p=null,setTimeout(function(){L.revokeObjectURL(O)},4e4)}});d.saveAs=u.saveAs=u,a.exports=u})}(So)),So.exports}Q0();const ti=z.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}}}),e3=z.useLoginState(z.pinia),{loginUserInfo:bt}=z.storeToRefs(e3),a3=async a=>{var n,i,o;let l=await z.getAllTables({platId:parseInt((n=bt==null?void 0:bt.value)==null?void 0:n.plat_id),tableNames:[a]});return l=(o=(i=l==null?void 0:l.data)==null?void 0:i.result)==null?void 0:o[0],await Ec(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}]}]},l3=z.useLoginState(),{loginUserInfo:gl}=z.storeToRefs(l3);let bo="$R";const Kr=z.useModelComp(z.pinia),zc=e.ref(!1),{itemData:r3,itemGridData:hi,curStructureCompIds:zs,isSubmitCurStructure:n3,routeToChildPath:i3,pageMapState:Nt,itemExtendData:ko,refreshTable:Ms,refreshCurrentPageInform:o3}=z.storeToRefs(Kr),Fo=ti(z.pinia),rn=z.useMenuState(z.pinia),xr=e.shallowRef([]),{asideMenus:t3,activeTopMenuPath:s3,activeMenuPath:Cl,platform:dm,buttonTriggerType:c3,currentMenuPath:_n}=z.storeToRefs(rn),Nn=z.useUnit(z.pinia),{selectTitle:ni,chooseTitle:zo}=z.storeToRefs(Nn);e.ref();const Ri=e.ref(!0),oi=e.ref(0),At=e.ref([]);e.ref(!1);const Ft=e.ref(!1),Qi=e.ref(),Mc=e.ref(),Ic=e.ref(),u3=()=>{Kr.setItemGridData([]),Kr.setIsEdit("edit"),Kr.setSubmitCurStructure(Cl.value!=="/平台管理/菜单管理")},d3=()=>{Kr.setIsEdit("view"),Kr.setRefreshCurStructure(!0)},p3=async a=>{var i;let l=ni.value,r=l==null?void 0:l.findIndex(o=>(o==null?void 0:o.value)===(a==null?void 0:a.value)),n=l==null?void 0:l.filter((o,d)=>d<=r);Nn.setSelectTitle(ul.safeClone(n)),n=(i=n==null?void 0:n.map(o=>o==null?void 0:o.value))==null?void 0:i.join("/"),rn.setActiveMenuPath(null),rn.setActiveMenuPath(n)},kt=async(a,l,r,n="contentConfig")=>{var i;try{if(!Array.isArray(a))return;let o,d;l==="create"?(o={dataList:a==null?void 0:a.map(u=>{var y;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r!=null&&r.startsWith("/")?r==null?void 0:r.substring(1):r,type:"structure",structureBelong:n,parentTable:"",version:1},value:{pageData:{...u,compData:(y=u==null?void 0:u.compData)==null?void 0:y.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},d=Zr.batchAddInsofDataApi):l==="update"?(o={dataList:a==null?void 0:a.map(u=>{var y;return{id:u==null?void 0:u.id,value:{pageData:{...u,compData:(y=u==null?void 0:u.compData)==null?void 0:y.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},d=Zr.batchUpdateInsofDataApi):l==="delete"&&(o={ids:a},d=Zr.batchDeleteInsofDataApi);const c=await d(o);if(((i=c==null?void 0:c.data)==null?void 0:i.code)===200)return c.data.result;throw Xa.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Xa.ElMessage.error("保存响应失败")}},Is=async(a,l,r,n)=>{var i,o,d,c,u,y,b,g,p,D,m;try{const F=(o=(i=a==null?void 0:a.results)==null?void 0:i.filter(x=>!(x!=null&&x.id)||typeof(x==null?void 0:x.id)=="string"))==null?void 0:o.map(x=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:r},value:{tableData:x}})),C=(c=(d=a==null?void 0:a.results)==null?void 0:d.filter(x=>(x==null?void 0:x.id)&&typeof(x==null?void 0:x.id)=="number"))==null?void 0:c.map(x=>({id:x==null?void 0:x.id,value:{tableData:x}})),L=JSON.parse(JSON.stringify(a)),O=(u=L==null?void 0:L.results)==null?void 0:u.map(x=>x.id);let S;r?S=(g=(b=(y=Nt.value)==null?void 0:y[Cl.value])==null?void 0:b.filter(x=>{var k,_,I;return((k=x==null?void 0:x.key)==null?void 0:k.type)===l&&((I=(_=x==null?void 0:x.key)==null?void 0:_.relatedInfo)==null?void 0:I.target)===n}))==null?void 0:g.map(x=>x==null?void 0:x.id):S=(m=(D=(p=Nt.value)==null?void 0:p[Cl.value])==null?void 0:D.filter(x=>{var k;return((k=x==null?void 0:x.key)==null?void 0:k.type)===l}))==null?void 0:m.map(x=>x==null?void 0:x.id);const E=S==null?void 0:S.filter(x=>!(O!=null&&O.includes(x))&&typeof x=="number");(F==null?void 0:F.length)>0&&await Zr.batchAddInsofDataApi({dataList:F}),(C==null?void 0:C.length)>0&&await Zr.batchUpdateInsofDataApi({dataList:C}),(E==null?void 0:E.length)>0&&await Zr.batchDeleteInsofDataApi({ids:E})}catch(F){throw new Error(F)}},f3=async a=>{var y,b,g,p,D,m,F,C,L,O;rn.setContentLoading(!0);const l=JSON.parse(JSON.stringify(r3.value));if(!n3.value)return rn.setCacheStructures({key:c3.value,data:l}),Xa.ElMessage.success("已暂存");const r=l==null?void 0:l.map(S=>S.id),n=r.filter(S=>{var E;return!((E=zs.value)!=null&&E.includes(S))}),i=(y=zs.value)==null?void 0:y.filter(S=>!r.includes(S)),o=[...n,...i].filter(S=>typeof S!==null&&typeof S<"u"),d=l==null?void 0:l.filter(S=>!S.id),c=l==null?void 0:l.filter(S=>S.id);let u=[];if(o&&(o==null?void 0:o.length)>0&&u.push(kt(o,"delete",a)),d&&(d==null?void 0:d.length)>0&&u.push(kt(d,"create",a)),c&&(c==null?void 0:c.length)>0&&u.push(kt(c,"update",a)),hi.value&&((b=hi.value)!=null&&b.isDelete&&((p=(g=hi.value)==null?void 0:g.results)==null?void 0:p.length)>0&&((m=(D=hi.value)==null?void 0:D.results)!=null&&m.every(S=>typeof S=="number"))?await Zr.batchDeleteInsofDataApi({ids:(F=hi.value)==null?void 0:F.results}):(console.log("itemGridData.value",hi.value),u.push(await Is(hi.value,"gridLayout")))),ko.value)for(const S in ko.value)u.push(await Is((C=ko.value)==null?void 0:C[S],"extend",{target:S,compId:(O=(L=ko.value)==null?void 0:L[S])==null?void 0:O.compId},S));await Promise.all(u).then(()=>{Xa.ElMessage.success("保存成功"),Kr.setRefreshCurStructure(!0)}).catch(S=>{Xa.ElMessage.success(S)}),rn.setContentLoading(!1)},eo=a=>$i(a),h3=e.computed(()=>{var a;return(a=xr.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Oc=e.computed(()=>{var a;return(a=xr.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),Lc=e.ref(0),Rc=e.ref(null),v3="ocr_committed_temp_ids_v1",m3=(a,l)=>`${v3}:${String(a??"")}:${String(l??"")}`,y3=(a,l,r)=>{try{const n=m3(a,l),i=sessionStorage.getItem(n),o=i?JSON.parse(i):[],d=Array.isArray(o)?o:[],c=Array.from(new Set([...d,...r||[]].map(u=>String(u)))).slice(-200);sessionStorage.setItem(n,JSON.stringify(c))}catch{}},Mo=async(a,l="data",r)=>{var i,o,d,c,u,y,b,g,p,D,m,F,C,L,O,S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We,V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe,Oe,$e,ne,qe,na,fa,ze,Be,Ke,Ee,ye,$a,wl,el,Pl,bl,jl,ll,Hl,Ga,Jl,Xl,ar,Sl,pr;let n=((d=(o=(i=ni.value)==null?void 0:i.filter(ya=>(ya==null?void 0:ya.condition)==="child"))==null?void 0:o[0])==null?void 0:d.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let ya=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(ol=>{let vl={};for(let Bl in ol)Array.isArray(ol==null?void 0:ol[Bl])?vl[Bl]=JSON.stringify(ol==null?void 0:ol[Bl]):vl[Bl]=ol==null?void 0:ol[Bl];return vl});if(ya!=null&&ya.every(ol=>ol==null?void 0:ol.menuPathContent)){let ol=(u=ya==null?void 0:ya[0])==null?void 0:u.menuPathContent;ya=ya==null?void 0:ya.map(oa=>(oa.id="0",oa==null||delete oa.menuPathContent,oa)),(ol==null?void 0:ol[0])==="$"&&(ol=ol==null?void 0:ol.slice(1,ol==null?void 0:ol.length));let vl=(y=re.analyzeSplitToContent(ol,"*"))==null?void 0:y[0],Bl=(b=re.analyzeSplitToContent(ol,"*"))==null?void 0:b[1];vl=vl==null?void 0:vl.slice(0,(vl==null?void 0:vl.length)-1),vl=(g=re.analyzeSplitToContent(vl,":"))==null?void 0:g.map(oa=>{var Ya,pe,wa,Pa,pl;if((oa==null?void 0:oa[(oa==null?void 0:oa.length)-1])===":"&&(oa=oa==null?void 0:oa.slice(0,(oa==null?void 0:oa.length)-1)),(oa==null?void 0:oa[0])==="{"){oa=oa==null?void 0:oa.slice(1,(oa==null?void 0:oa.length)-1),(oa==null?void 0:oa[0])==="*"&&(oa=oa==null?void 0:oa.slice(1,oa==null?void 0:oa.length));let Il=oa==null?void 0:oa.split(":"),Qa=Il==null?void 0:Il[0],kl=Il==null?void 0:Il[1];kl=kl==null?void 0:kl.slice(1,(kl==null?void 0:kl.length)-1);let Ma=(Ya=xr.value)==null?void 0:Ya.filter(ea=>(ea==null?void 0:ea.name)===Qa);Ma=Ma==null?void 0:Ma[0],Ma=(pl=(Pa=(wa=(pe=Ma==null?void 0:Ma.compData)==null?void 0:pe.find(ea=>(ea==null?void 0:ea.key)==="tableContents"))==null?void 0:wa.contents)==null?void 0:Pa[0])==null?void 0:pl[kl],oa=Ma}return oa}),vl=vl==null?void 0:vl.join("/");let Ua=await z.getPageDataApi({platId:parseInt((p=gl==null?void 0:gl.value)==null?void 0:p.plat_id),pageName:"menu"});Ua=(D=Ua==null?void 0:Ua.data)==null?void 0:D.result,Ua=Ua==null?void 0:Ua.find(oa=>(oa==null?void 0:oa.object_name)===vl&&(oa==null?void 0:oa.property_name)===Bl);let _a=(Ua==null?void 0:Ua.object_id)??"";if(_a===""){Xa.ElMessage.warning("添加页面数据不存在");return}let rl=[{tableName:"content_"+_a,tableContents:ya}];await z.pageBatchAddApi({platId:parseInt((m=gl==null?void 0:gl.value)==null?void 0:m.plat_id),changeContents:rl});let Te=[];rl==null||rl.forEach(oa=>{var Ya;(Ya=oa==null?void 0:oa.tableContents)==null||Ya.forEach(pe=>{Te.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(pe),request_result:"{}",is_delete:!1,request_table:oa==null?void 0:oa.tableName,request_type:"add"})})}),await z.pageBatchAddApi({platId:parseInt((F=gl==null?void 0:gl.value)==null?void 0:F.plat_id),changeContents:[{tableName:"log",tableContents:Te}]})}else{let ol=await z.quoteApi({platId:parseInt((C=gl==null?void 0:gl.value)==null?void 0:C.plat_id),type:"fatherSyncs",related:[{menus:n!==""?Cl.value+"/"+n:Cl.value,groups:a==null?void 0:a.name}]});ol=(L=ol==null?void 0:ol.data)==null?void 0:L.result,ol=ol==null?void 0:ol.filter(Te=>{var oa,Ya;return!((Te==null?void 0:Te.fatherPath)!==""&&((Ya=(oa=Te==null?void 0:Te.quote)==null?void 0:oa[0])==null?void 0:Ya.menus)===(Cl==null?void 0:Cl.value))});let vl=ol==null?void 0:ol.map(Te=>{var wa,Pa;let oa={},Ya=ya==null?void 0:ya[0],pe;return Array.isArray((wa=Te==null?void 0:Te.struct)==null?void 0:wa[0])?pe=re.getColumnChild((Pa=Te==null?void 0:Te.struct)==null?void 0:Pa[0]):pe=Te==null?void 0:Te.struct,pe=pe==null?void 0:pe.filter(pl=>(pl==null?void 0:pl.prop)!=="relatedId"),pe==null||pe.forEach(pl=>{var Il,Qa;oa[pl.prop]=((Il=pl==null?void 0:pl.words)!=null&&Il[0]?(Ya==null?void 0:Ya[(Qa=pl==null?void 0:pl.words)==null?void 0:Qa[0]])??(Ya==null?void 0:Ya[pl==null?void 0:pl.prop]):Ya==null?void 0:Ya[pl==null?void 0:pl.prop])??""}),oa.id="1",oa.relatedId=`[${oa.id}]`,delete oa.sort,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[oa]}}),Bl=[{tableName:(O=a==null?void 0:a.relatedContents)==null?void 0:O.find(Te=>Te==null?void 0:Te.includes("content")),tableContents:ya}];Bl=[...Bl,...vl];let Ua=await z.quoteApi({platId:parseInt((S=gl==null?void 0:gl.value)==null?void 0:S.plat_id),type:"sonSyncs",related:[{menus:n!==""?Cl.value+"/"+n:Cl.value,groups:a==null?void 0:a.name}]});Ua=(x=(E=Ua==null?void 0:Ua.data)==null?void 0:E.result)==null?void 0:x.filter(Te=>!(Bl!=null&&Bl.find(oa=>(oa==null?void 0:oa.tableName)==="content_"+(Te==null?void 0:Te.id)))),Ua=Ua==null?void 0:Ua.filter(Te=>{var oa,Ya;return!((Te==null?void 0:Te.fatherPath)!==""&&((Ya=(oa=Te==null?void 0:Te.quote)==null?void 0:oa[0])==null?void 0:Ya.menus)===(Cl==null?void 0:Cl.value))});let _a=Ua==null?void 0:Ua.map(Te=>{var wa,Pa,pl,Il,Qa,kl,Ma;let oa={},Ya=ya==null?void 0:ya[0],pe;return Array.isArray((wa=Te==null?void 0:Te.struct)==null?void 0:wa[0])?pe=re.getColumnChild((Pa=Te==null?void 0:Te.struct)==null?void 0:Pa[0]):pe=Te==null?void 0:Te.struct,pe=pe==null?void 0:pe.filter(ea=>(ea==null?void 0:ea.prop)!=="relatedId"),((Il=(pl=pe==null?void 0:pe[0])==null?void 0:pl.words)!=null&&Il[0]?Ya!=null&&Ya[(kl=(Qa=pe==null?void 0:pe[0])==null?void 0:Qa.words)==null?void 0:kl[0]]:Ya!=null&&Ya[(Ma=pe==null?void 0:pe[0])==null?void 0:Ma.prop])?(pe==null||pe.forEach(ea=>{var ma,Ha;oa[ea.prop]=((ma=ea==null?void 0:ea.words)!=null&&ma[0]?(Ya==null?void 0:Ya[(Ha=ea==null?void 0:ea.words)==null?void 0:Ha[0]])??(Ya==null?void 0:Ya[ea==null?void 0:ea.prop]):Ya==null?void 0:Ya[ea==null?void 0:ea.prop])??""}),oa.id="1",oa.relatedId=`[${oa.id}]`,delete oa.sort):oa=void 0,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[oa]}});_a=_a==null?void 0:_a.filter(Te=>{var oa;return!((oa=Te==null?void 0:Te.tableContents)!=null&&oa.every(Ya=>Ya===void 0))}),Bl=[...Bl,..._a],await z.pageBatchAddApi({platId:parseInt((k=gl==null?void 0:gl.value)==null?void 0:k.plat_id),changeContents:Bl});let rl=[];Bl==null||Bl.forEach(Te=>{var oa;(oa=Te==null?void 0:Te.tableContents)==null||oa.forEach(Ya=>{rl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ya),request_result:"{}",is_delete:!1,request_table:Te==null?void 0:Te.tableName,request_type:"add"})})}),await z.pageBatchAddApi({platId:parseInt((_=gl==null?void 0:gl.value)==null?void 0:_.plat_id),changeContents:[{tableName:"log",tableContents:rl}]})}}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const ya=((a==null?void 0:a.ocrRows)||[]).map(Ua=>Ua==null?void 0:Ua.id).filter(Ua=>Ua!=null),ol=((a==null?void 0:a.ocrRows)||[]).map(Ua=>{const _a={...Ua};return delete _a._isOCRRow,delete _a._ocrTableId,Object.keys(_a).forEach(rl=>{/(^|\.)证书附件$/.test(rl)&&Array.isArray(_a[rl])&&(_a[rl]=JSON.stringify(_a[rl].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)))}),_a});let vl=[{tableName:(I=a==null?void 0:a.relatedContents)==null?void 0:I.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:ol}];await z.pageBatchAddApi({platId:parseInt((R=gl==null?void 0:gl.value)==null?void 0:R.plat_id),changeContents:vl});let Bl=[];vl==null||vl.forEach(Ua=>{var _a;(_a=Ua==null?void 0:Ua.tableContents)==null||_a.forEach(rl=>{Bl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(rl),request_result:"{}",is_delete:!1,request_table:Ua==null?void 0:Ua.tableName,request_type:"ocrBatchAdd"})})}),await z.pageBatchAddApi({platId:parseInt((ae=gl==null?void 0:gl.value)==null?void 0:ae.plat_id),changeContents:[{tableName:"log",tableContents:Bl}]}),y3(a==null?void 0:a.parentTableId,a==null?void 0:a.index,ya)}if((a==null?void 0:a.buttonName)==="编辑"){const ol=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(pe=>{const wa={...pe};return delete wa._isOCRRow,delete wa._ocrTableId,delete wa._isTemp,delete wa.tableEditType,delete wa.index,wa});let vl=ol==null?void 0:ol.map(pe=>{let wa={};for(let Pa in pe)Array.isArray(pe==null?void 0:pe[Pa])?wa[Pa]=JSON.stringify(pe==null?void 0:pe[Pa]):wa[Pa]=pe==null?void 0:pe[Pa];return wa}),Bl=await z.quoteApi({platId:parseInt((X=gl==null?void 0:gl.value)==null?void 0:X.plat_id),type:"fatherSyncs",related:[{menus:n!==""?Cl.value+"/"+n:Cl.value,groups:a==null?void 0:a.name}]});Bl=(me=Bl==null?void 0:Bl.data)==null?void 0:me.result,Bl=Bl==null?void 0:Bl.filter(pe=>{var wa,Pa;return!((pe==null?void 0:pe.fatherPath)!==""&&((Pa=(wa=pe==null?void 0:pe.quote)==null?void 0:wa[0])==null?void 0:Pa.menus)===(Cl==null?void 0:Cl.value))});let Ua=(ue=vl==null?void 0:vl[0])==null?void 0:ue.id,_a=[{tableName:(U=a==null?void 0:a.relatedContents)==null?void 0:U.find(pe=>pe==null?void 0:pe.includes("content")),tableContents:vl}],rl=(W=Bl==null?void 0:Bl.map(pe=>{var Pa,pl,Il,Qa,kl;let wa=(Pa=pe==null?void 0:pe.contents)==null?void 0:Pa.filter(Ma=>{var ea,ma;return JSON.stringify(Ma==null?void 0:Ma.relatedId)!=="{}"&&(Ma==null?void 0:Ma.relatedId)!==""&&(Ma!=null&&Ma.relatedId)?(ea=Ma==null?void 0:Ma.relatedId)==null?void 0:ea.includes(parseInt(Ua)):(Ma==null?void 0:Ma.sort)===((ma=vl==null?void 0:vl[0])==null?void 0:ma.sort)});if((wa==null?void 0:wa.length)>0){let Ma=vl==null?void 0:vl[0];Ma={...Ma,id:(pl=wa==null?void 0:wa[0])==null?void 0:pl.id};let ea={},ma=Ma,Ha;return Array.isArray((Il=pe==null?void 0:pe.struct)==null?void 0:Il[0])?Ha=re.getColumnChild((Qa=pe==null?void 0:pe.struct)==null?void 0:Qa[0]):Ha=pe==null?void 0:pe.struct,Ha=Ha==null?void 0:Ha.filter(ka=>(ka==null?void 0:ka.prop)!=="relatedId"),Ha==null||Ha.forEach(ka=>{var Ul,Gl;ea[ka.prop]=((Ul=ka==null?void 0:ka.words)!=null&&Ul[0]?(ma==null?void 0:ma[(Gl=ka==null?void 0:ka.words)==null?void 0:Gl[0]])??(ma==null?void 0:ma[ka==null?void 0:ka.prop]):ma==null?void 0:ma[ka==null?void 0:ka.prop])??""}),ea.id=(kl=wa==null?void 0:wa[0])==null?void 0:kl.id,delete ea.sort,delete ea.relatedId,{tableName:"content_"+(pe==null?void 0:pe.id),tableContents:[ea]}}else return}))==null?void 0:W.filter(pe=>pe);_a=[..._a,...rl];let Te=await z.quoteApi({platId:parseInt((Z=gl==null?void 0:gl.value)==null?void 0:Z.plat_id),type:"sonSyncs",related:[{menus:n!==""?Cl.value+"/"+n:Cl.value,groups:a==null?void 0:a.name}]});Te=(ve=(Q=Te==null?void 0:Te.data)==null?void 0:Q.result)==null?void 0:ve.filter(pe=>!(_a!=null&&_a.find(wa=>(wa==null?void 0:wa.tableName)==="content_"+(pe==null?void 0:pe.id)))),Te=Te==null?void 0:Te.filter(pe=>{var wa,Pa;return!((pe==null?void 0:pe.fatherPath)!==""&&((Pa=(wa=pe==null?void 0:pe.quote)==null?void 0:wa[0])==null?void 0:Pa.menus)===(Cl==null?void 0:Cl.value))});let oa=(Ae=Te==null?void 0:Te.map(pe=>{var Pa,pl,Il,Qa,kl;let wa=(Pa=pe==null?void 0:pe.contents)==null?void 0:Pa.filter(Ma=>{var ea,ma,Ha;return JSON.stringify(Ma==null?void 0:Ma.relatedId)!=="{}"&&(Ma==null?void 0:Ma.relatedId)!==""&&(Ma!=null&&Ma.relatedId)?(ea=Ma==null?void 0:Ma.relatedId)==null?void 0:ea.includes(parseInt(Ua)):(Ma==null?void 0:Ma.sort)===((ma=vl==null?void 0:vl[0])==null?void 0:ma.sort)||(Ma==null?void 0:Ma.sort)===(parseInt(((Ha=vl==null?void 0:vl[0])==null?void 0:Ha.sort)??"0")+1).toString()});if((wa==null?void 0:wa.length)>0){let Ma=vl==null?void 0:vl[0];Ma={...Ma,id:(pl=wa==null?void 0:wa[0])==null?void 0:pl.id};let ea={},ma=Ma,Ha;return Array.isArray((Il=pe==null?void 0:pe.struct)==null?void 0:Il[0])?Ha=re.getColumnChild((Qa=pe==null?void 0:pe.struct)==null?void 0:Qa[0]):Ha=pe==null?void 0:pe.struct,Ha=Ha==null?void 0:Ha.filter(ka=>(ka==null?void 0:ka.prop)!=="relatedId"),Ha==null||Ha.forEach(ka=>{var Ul,Gl,Ba,Rl;((Ul=ka==null?void 0:ka.words)!=null&&Ul[0]?(ma==null?void 0:ma[(Gl=ka==null?void 0:ka.words)==null?void 0:Gl[0]])??(ma==null?void 0:ma[ka==null?void 0:ka.prop]):ma!=null&&ma[ka==null?void 0:ka.prop])&&(ea[ka.prop]=((Ba=ka==null?void 0:ka.words)!=null&&Ba[0]?(ma==null?void 0:ma[(Rl=ka==null?void 0:ka.words)==null?void 0:Rl[0]])??(ma==null?void 0:ma[ka==null?void 0:ka.prop]):ma==null?void 0:ma[ka==null?void 0:ka.prop])??"")}),ea.id=(kl=wa==null?void 0:wa[0])==null?void 0:kl.id,delete ea.sort,delete ea.relatedId,{tableName:"content_"+(pe==null?void 0:pe.id),tableContents:[ea]}}else return}))==null?void 0:Ae.filter(pe=>pe);_a=[..._a,...oa],await z.pageBatchUpdateApi({platId:parseInt((te=gl==null?void 0:gl.value)==null?void 0:te.plat_id),changeContents:_a});let Ya=[];_a==null||_a.forEach(pe=>{var wa;(wa=pe==null?void 0:pe.tableContents)==null||wa.forEach(Pa=>{Ya.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Pa),request_result:"{}",is_delete:!1,request_table:pe==null?void 0:pe.tableName,request_type:"update"})})}),await z.pageBatchAddApi({platId:parseInt((A=gl==null?void 0:gl.value)==null?void 0:A.plat_id),changeContents:[{tableName:"log",tableContents:Ya}]})}if((a==null?void 0:a.buttonName)==="删除"){let ya=[{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}],ol=await z.quoteApi({platId:parseInt((G=gl==null?void 0:gl.value)==null?void 0:G.plat_id),type:"fatherSyncs",related:[{menus:n!==""?Cl.value+"/"+n:Cl.value,groups:a==null?void 0:a.name}]});ol=(fe=ol==null?void 0:ol.data)==null?void 0:fe.result,ol=ol==null?void 0:ol.filter(Te=>{var oa,Ya;return!((Te==null?void 0:Te.fatherPath)!==""&&((Ya=(oa=Te==null?void 0:Te.quote)==null?void 0:oa[0])==null?void 0:Ya.menus)===(Cl==null?void 0:Cl.value))});let vl=(_e=(we=a==null?void 0:a.fixContent)==null?void 0:we[0])==null?void 0:_e.id,Bl=(Ue=ol==null?void 0:ol.map(Te=>{var Ya,pe,wa,Pa,pl,Il;let oa=(Ya=Te==null?void 0:Te.contents)==null?void 0:Ya.filter(Qa=>{var kl,Ma,ea;return JSON.stringify(Qa==null?void 0:Qa.relatedId)!=="{}"&&(Qa==null?void 0:Qa.relatedId)!==""&&(Qa!=null&&Qa.relatedId)?(kl=Qa==null?void 0:Qa.relatedId)==null?void 0:kl.includes(parseInt(vl)):(Qa==null?void 0:Qa.sort)===((ea=(Ma=a==null?void 0:a.fixContent)==null?void 0:Ma[0])==null?void 0:ea.sort)});if((oa==null?void 0:oa.length)>0){let Qa=(pe=a==null?void 0:a.fixContent)==null?void 0:pe[0];Qa={...Qa,id:(wa=oa==null?void 0:oa[0])==null?void 0:wa.id};let kl={},Ma=Qa,ea;return Array.isArray((Pa=Te==null?void 0:Te.struct)==null?void 0:Pa[0])?ea=re.getColumnChild((pl=Te==null?void 0:Te.struct)==null?void 0:pl[0]):ea=Te==null?void 0:Te.struct,ea=ea==null?void 0:ea.filter(ma=>(ma==null?void 0:ma.prop)!=="relatedId"),ea==null||ea.forEach(ma=>{var Ha,ka;kl[ma.prop]=((Ha=ma==null?void 0:ma.words)!=null&&Ha[0]?(Ma==null?void 0:Ma[(ka=ma==null?void 0:ma.words)==null?void 0:ka[0]])??(Ma==null?void 0:Ma[ma==null?void 0:ma.prop]):Ma==null?void 0:Ma[ma==null?void 0:ma.prop])??""}),kl.id=(Il=oa==null?void 0:oa[0])==null?void 0:Il.id,delete kl.sort,delete kl.relatedId,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[kl]}}else return}))==null?void 0:Ue.filter(Te=>Te);ya=[...ya,...Bl];let Ua=await z.quoteApi({platId:parseInt((ra=gl==null?void 0:gl.value)==null?void 0:ra.plat_id),type:"sonSyncs",related:[{menus:n!==""?Cl.value+"/"+n:Cl.value,groups:a==null?void 0:a.name}]});Ua=(Ge=(H=Ua==null?void 0:Ua.data)==null?void 0:H.result)==null?void 0:Ge.filter(Te=>!(ya!=null&&ya.find(oa=>(oa==null?void 0:oa.tableName)==="content_"+(Te==null?void 0:Te.id)))),Ua=Ua==null?void 0:Ua.filter(Te=>{var oa,Ya;return!((Te==null?void 0:Te.fatherPath)!==""&&((Ya=(oa=Te==null?void 0:Te.quote)==null?void 0:oa[0])==null?void 0:Ya.menus)===(Cl==null?void 0:Cl.value))});let _a=(Me=Ua==null?void 0:Ua.map(Te=>{var Ya,pe,wa,Pa,pl,Il;let oa=(Ya=Te==null?void 0:Te.contents)==null?void 0:Ya.filter(Qa=>{var kl,Ma,ea;return JSON.stringify(Qa==null?void 0:Qa.relatedId)!=="{}"&&(Qa==null?void 0:Qa.relatedId)!==""&&(Qa!=null&&Qa.relatedId)?(kl=Qa==null?void 0:Qa.relatedId)==null?void 0:kl.includes(parseInt(vl)):(Qa==null?void 0:Qa.sort)===((ea=(Ma=a==null?void 0:a.fixContent)==null?void 0:Ma[0])==null?void 0:ea.sort)});if((oa==null?void 0:oa.length)>0){let Qa=(pe=a==null?void 0:a.fixContent)==null?void 0:pe[0];Qa={...Qa,id:(wa=oa==null?void 0:oa[0])==null?void 0:wa.id};let kl={},Ma=Qa,ea;return Array.isArray((Pa=Te==null?void 0:Te.struct)==null?void 0:Pa[0])?ea=re.getColumnChild((pl=Te==null?void 0:Te.struct)==null?void 0:pl[0]):ea=Te==null?void 0:Te.struct,ea=ea==null?void 0:ea.filter(ma=>(ma==null?void 0:ma.prop)!=="relatedId"),ea==null||ea.forEach(ma=>{var Ha,ka;kl[ma.prop]=((Ha=ma==null?void 0:ma.words)!=null&&Ha[0]?(Ma==null?void 0:Ma[(ka=ma==null?void 0:ma.words)==null?void 0:ka[0]])??(Ma==null?void 0:Ma[ma==null?void 0:ma.prop]):Ma==null?void 0:Ma[ma==null?void 0:ma.prop])??""}),kl.id=(Il=oa==null?void 0:oa[0])==null?void 0:Il.id,delete kl.sort,delete kl.relatedId,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[kl]}}else return}))==null?void 0:Me.filter(Te=>Te);ya=[...ya,..._a],await z.pageBatchDeleteApi({platId:parseInt((Le=gl==null?void 0:gl.value)==null?void 0:Le.plat_id),changeContents:ya});let rl=[];ya==null||ya.forEach(Te=>{var oa;(oa=Te==null?void 0:Te.tableContents)==null||oa.forEach(Ya=>{rl.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Ya),request_result:"{}",is_delete:!1,request_table:Te==null?void 0:Te.tableName,request_type:"delete"})})}),await z.pageBatchAddApi({platId:parseInt((Ie=gl==null?void 0:gl.value)==null?void 0:Ie.plat_id),changeContents:[{tableName:"log",tableContents:rl}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let ya=await z.getPageDataApi({platId:parseInt((de=gl==null?void 0:gl.value)==null?void 0:de.plat_id),pageName:"menu"});if(ya=(De=ya==null?void 0:ya.data)==null?void 0:De.result,ya!=null&&ya.find(ol=>(ol==null?void 0:ol.father_name)===Cl.value+"/")){Ic.value=a,Mc.value=ya==null?void 0:ya.filter(Bl=>(Bl==null?void 0:Bl.father_name)===Cl.value+"/");let ol=(Sa=(Je=a==null?void 0:a.columns)==null?void 0:Je.find(Bl=>Bl==null?void 0:Bl.mainKey))==null?void 0:Sa.prop,vl=(V=(We=a==null?void 0:a.fixContent)==null?void 0:We[0])==null?void 0:V[ol];Ft.value=!0,Qi.value=[{prop:ol,label:ol,name:ol,value:vl}]}else{let ol=(P=a==null?void 0:a.fixContent)==null?void 0:P.map(Ua=>{let _a={};for(let rl in Ua)Array.isArray(Ua==null?void 0:Ua[rl])?_a[rl]=JSON.stringify(Ua==null?void 0:Ua[rl]):_a[rl]=Ua==null?void 0:Ua[rl];return _a.relatedId="",_a}),vl=[{tableName:(le=a==null?void 0:a.relatedContents)==null?void 0:le.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:ol}];await z.pageBatchAddApi({platId:parseInt((ce=gl==null?void 0:gl.value)==null?void 0:ce.plat_id),changeContents:vl});let Bl=[];vl==null||vl.forEach(Ua=>{var _a;(_a=Ua==null?void 0:Ua.tableContents)==null||_a.forEach(rl=>{Bl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(rl),request_result:"{}",is_delete:!1,request_table:Ua==null?void 0:Ua.tableName,request_type:"copyAdd"})})}),await z.pageBatchAddApi({platId:parseInt((he=gl==null?void 0:gl.value)==null?void 0:he.plat_id),changeContents:[{tableName:"log",tableContents:Bl}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let ya=((Ve=(ia=(ua=a==null?void 0:a.columns)==null?void 0:ua.map(pe=>pe==null?void 0:pe.filter))==null?void 0:ia.filter(pe=>pe!==""))==null?void 0:Ve[0])??"";ya=re.analyzeSplitToContent(ya,","),ya=(ya==null?void 0:ya.find(pe=>pe==null?void 0:pe.includes("@Filter")))??"";let ol=(va=a==null?void 0:a.fixContent)==null?void 0:va.map(pe=>{let wa={};for(let Pa in pe)Array.isArray(pe==null?void 0:pe[Pa])?wa[Pa]=JSON.stringify(pe==null?void 0:pe[Pa]):wa[Pa]=pe==null?void 0:pe[Pa];return wa}),vl=await z.quoteApi({platId:parseInt((Ea=gl==null?void 0:gl.value)==null?void 0:Ea.plat_id),type:"fatherSyncs",related:[{menus:n!==""?Cl.value+"/"+n:Cl.value,groups:a==null?void 0:a.name}]});vl=(Ce=vl==null?void 0:vl.data)==null?void 0:Ce.result,vl=vl==null?void 0:vl.filter(pe=>{var wa,Pa;return!((pe==null?void 0:pe.fatherPath)!==""&&((Pa=(wa=pe==null?void 0:pe.quote)==null?void 0:wa[0])==null?void 0:Pa.menus)===(Cl==null?void 0:Cl.value))});let Bl=(Da=(Fa=a==null?void 0:a.columns)==null?void 0:Fa[0])==null?void 0:Da.prop,Ua=(da=ol==null?void 0:ol[0])==null?void 0:da[Bl],_a=[{tableName:(ja=a==null?void 0:a.relatedContents)==null?void 0:ja.find(pe=>pe==null?void 0:pe.includes("content")),tableContents:ol}],rl=(sa=vl==null?void 0:vl.map(pe=>{var Pa,pl,Il,Qa,kl;let wa=(Pa=pe==null?void 0:pe.contents)==null?void 0:Pa.filter(Ma=>{var ea;return(ea=Object.values(Ma))==null?void 0:ea.find(ma=>ma===Ua)});if((wa==null?void 0:wa.length)>0){let Ma=ol==null?void 0:ol[0];Ma={...Ma,id:(pl=wa==null?void 0:wa[0])==null?void 0:pl.id};let ea={},ma=Ma,Ha;return Array.isArray((Il=pe==null?void 0:pe.struct)==null?void 0:Il[0])?Ha=re.getColumnChild((Qa=pe==null?void 0:pe.struct)==null?void 0:Qa[0]):Ha=pe==null?void 0:pe.struct,Ha=Ha==null?void 0:Ha.filter(ka=>(ka==null?void 0:ka.prop)!=="relatedId"),Ha==null||Ha.forEach(ka=>{var Ul,Gl;ea[ka.prop]=((Ul=ka==null?void 0:ka.words)!=null&&Ul[0]?(ma==null?void 0:ma[(Gl=ka==null?void 0:ka.words)==null?void 0:Gl[0]])??(ma==null?void 0:ma[ka==null?void 0:ka.prop]):ma==null?void 0:ma[ka==null?void 0:ka.prop])??""}),ea.id=(kl=wa==null?void 0:wa[0])==null?void 0:kl.id,delete ea.sort,{tableName:"content_"+(pe==null?void 0:pe.id),tableContents:[ea]}}else return}))==null?void 0:sa.filter(pe=>pe);_a=[..._a,...rl];let Te=await z.quoteApi({platId:parseInt((Fe=gl==null?void 0:gl.value)==null?void 0:Fe.plat_id),type:"sonSyncs",related:[{menus:n!==""?Cl.value+"/"+n:Cl.value,groups:a==null?void 0:a.name}]});if(Te=(Qe=(ha=Te==null?void 0:Te.data)==null?void 0:ha.result)==null?void 0:Qe.filter(pe=>!(_a!=null&&_a.find(wa=>(wa==null?void 0:wa.tableName)==="content_"+(pe==null?void 0:pe.id)))),Te=Te==null?void 0:Te.filter(pe=>{var wa,Pa;return!((pe==null?void 0:pe.fatherPath)!==""&&((Pa=(wa=pe==null?void 0:pe.quote)==null?void 0:wa[0])==null?void 0:Pa.menus)===(Cl==null?void 0:Cl.value))}),ya&&ya!==""){(ya==null?void 0:ya[(ya==null?void 0:ya.length)-1])===","&&(ya=ya==null?void 0:ya.slice(0,(ya==null?void 0:ya.length)-1)),ya=($e=(Oe=ya==null?void 0:ya.replace("(",bo))==null?void 0:Oe.split(bo))==null?void 0:$e[1],ya=ya==null?void 0:ya.slice(0,(ya==null?void 0:ya.length)-1),(ya==null?void 0:ya[0])==="*"&&(ya="{"+((qe=(ne=ya==null?void 0:ya.replace("{",bo))==null?void 0:ne.split(bo))==null?void 0:qe[1])),ya=(na=ya==null?void 0:ya.replaceAll("{",""))==null?void 0:na.replaceAll("}","");let pe=re.calculatorAndToOr(ya);pe=pe==null?void 0:pe[0];let wa;if((fa=Object.values(pe))!=null&&fa.some(Pa=>(Pa==null?void 0:Pa[0])==="*")){let Pa=(Be=(ze=ni.value)==null?void 0:ze.find(pl=>(pl==null?void 0:pl.condition)==="child"))!=null&&Be.value?(_n==null?void 0:_n.value)+"/"+((Ee=(Ke=ni.value)==null?void 0:Ke.find(pl=>(pl==null?void 0:pl.condition)==="child"))==null?void 0:Ee.value):_n==null?void 0:_n.value;wa=await qr(Pa,!1)}for(let Pa in pe)if(((ye=pe==null?void 0:pe[Pa])==null?void 0:ye[0])==="*"){let pl=(Pl=(el=(wl=pe[Pa])==null?void 0:wl.slice(1,($a=pe[Pa])==null?void 0:$a.length))==null?void 0:el.split(":"))==null?void 0:Pl[0],Il=(jl=(bl=pe[Pa])==null?void 0:bl.split(":"))==null?void 0:jl[1],Qa=(ll=wa==null?void 0:wa.filter(kl=>(kl==null?void 0:kl.name)===pl))==null?void 0:ll[0];Qa=(Ga=(Hl=Qa==null?void 0:Qa.compData)==null?void 0:Hl.find(kl=>(kl==null?void 0:kl.key)==="tableContents"))==null?void 0:Ga.contents,Qa=(Jl=Qa==null?void 0:Qa[0])==null?void 0:Jl[Il],pe[Pa]=Qa}ya=((Xl=Object.values(pe))==null?void 0:Xl[0])??""}let oa=(ar=Te==null?void 0:Te.map(pe=>{var Pa,pl,Il,Qa,kl;let wa=(Pa=pe==null?void 0:pe.contents)==null?void 0:Pa.filter(Ma=>{var ea;return(ea=Object.values(Ma))==null?void 0:ea.find(ma=>ma===(ya===""?Ua:ya))});if((wa==null?void 0:wa.length)>0){let Ma=ol==null?void 0:ol[0];Ma={...Ma,id:(pl=wa==null?void 0:wa[0])==null?void 0:pl.id};let ea={},ma=Ma,Ha;return Array.isArray((Il=pe==null?void 0:pe.struct)==null?void 0:Il[0])?Ha=re.getColumnChild((Qa=pe==null?void 0:pe.struct)==null?void 0:Qa[0]):Ha=pe==null?void 0:pe.struct,Ha=Ha==null?void 0:Ha.filter(ka=>(ka==null?void 0:ka.prop)!=="relatedId"),Ha==null||Ha.forEach(ka=>{var Gl,Ba,Rl,Fr;let Ul=(Gl=a==null?void 0:a.columns)==null?void 0:Gl.find(Br=>{var Ze,La,hl;return((La=(Ze=Br==null?void 0:Br.words)==null?void 0:Ze[0])==null?void 0:La.replaceAll("'",""))===(ka==null?void 0:ka.prop)&&((hl=Br==null?void 0:Br.functionRelatedWords)==null?void 0:hl.length)>0});Ul=(Ba=Ul==null?void 0:Ul.prop)==null?void 0:Ba.replaceAll("'",""),ea[ka.prop]=((Rl=ka==null?void 0:ka.words)!=null&&Rl[0]?(ma==null?void 0:ma[(Fr=ka==null?void 0:ka.words)==null?void 0:Fr[0]])??(ma==null?void 0:ma[ka==null?void 0:ka.prop])??(ma==null?void 0:ma[Ul]):(ma==null?void 0:ma[ka==null?void 0:ka.prop])??(ma==null?void 0:ma[Ul]))??void 0}),ea.id=(kl=wa==null?void 0:wa[0])==null?void 0:kl.id,delete ea.sort,{tableName:"content_"+(pe==null?void 0:pe.id),tableContents:[ea]}}else return}))==null?void 0:ar.filter(pe=>pe);_a=[..._a,...oa],await z.pageBatchUpdateApi({platId:parseInt((Sl=gl==null?void 0:gl.value)==null?void 0:Sl.plat_id),changeContents:_a});let Ya=[];_a==null||_a.forEach(pe=>{var wa;(wa=pe==null?void 0:pe.tableContents)==null||wa.forEach(Pa=>{Ya.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Pa),request_result:"{}",is_delete:!1,request_table:pe==null?void 0:pe.tableName,request_type:"method"})})}),await z.pageBatchAddApi({platId:parseInt((pr=gl==null?void 0:gl.value)==null?void 0:pr.plat_id),changeContents:[{tableName:"log",tableContents:Ya}]})}Kr.setRefreshCurStructure(!0),Kr.setRefreshCurrentPageInform(o3.value++),await Mt(a)},zt=async(a,l,r)=>{var i;let n=a==null?void 0:a.find(o=>(o==null?void 0:o.id)===l);if(n){let o=(i=n.compData)==null?void 0:i.map(d=>{var c;if((d==null?void 0:d.key)==="tableContents"){let u={...d,contents:r};return u.contents=(c=(u==null?void 0:u.contents)??[])==null?void 0:c.map(y=>{let b={};for(let g in y)JSON.stringify(y==null?void 0:y[g])==="{}"?b[g]="":b[g]=y==null?void 0:y[g];return b}),u}return d});return n.compData=await Vo(o,{}),a=a==null?void 0:a.map(d=>((d==null?void 0:d.id)===(n==null?void 0:n.id)&&(d=n),d)),a}else{let o=a==null?void 0:a.filter(c=>{var u;return(c==null?void 0:c.children)&&((u=c==null?void 0:c.children)==null?void 0:u.length)>0||(c==null?void 0:c.comp)==="Tabs"}),d=o==null?void 0:o.map(async c=>{var u;return c!=null&&c.children&&((u=c==null?void 0:c.children)==null?void 0:u.length)>0?c.children=await zt(c==null?void 0:c.children,l,r):c.compData=await zt(c==null?void 0:c.compData,l,r),c});return o=await Promise.all(d),o}},Mt=async a=>{var o,d,c,u,y,b,g;let l=(o=a==null?void 0:a.relatedContents)==null?void 0:o.filter(p=>p==null?void 0:p.includes("content_"));if(!l)return;let r=await z.getAllTables({platId:parseInt((d=gl==null?void 0:gl.value)==null?void 0:d.plat_id),tableNames:l??[]});if(r=(u=(c=r==null?void 0:r.data)==null?void 0:c.result)==null?void 0:u[0],!r||!Array.isArray(r))return;r=r==null?void 0:r.map(p=>{p==null||delete p.source_table;const D={};for(let m in p){const F=p==null?void 0:p[m],C=F&&Object.prototype.toString.call(F)==="[object Object]"&&Object.keys(F).length===0,L=Array.isArray(F)&&F.length===0;F==null||F==="{}"||C||L?D[m]="":D[m]=F}return D});let n=(b=(y=l==null?void 0:l[0])==null?void 0:y.split("_"))==null?void 0:b[1],i=await zt(xr.value,n,r);xr.value=(g=xr.value)==null?void 0:g.map(p=>{var D,m;return(D=i==null?void 0:i[0])!=null&&D.tabInform&&((m=i==null?void 0:i[0])==null?void 0:m.tabInform)===(p==null?void 0:p.tabInform)?p=i==null?void 0:i[0]:(p!=null&&p.name?(p==null?void 0:p.name)===(i==null?void 0:i.name):(p==null?void 0:p.id)===(i==null?void 0:i.id))&&(p=i),p})},g3=a=>{let l=Qi.value;Qi.value=l==null?void 0:l.map(r=>(r.value=a==null?void 0:a[r==null?void 0:r.prop],r))},b3=async()=>{var p,D,m,F,C,L,O,S,E,x;let a=Ic.value,l=Mc.value,r=(D=(p=a==null?void 0:a.columns)==null?void 0:p.find(k=>k==null?void 0:k.mainKey))==null?void 0:D.prop,n=(F=(m=Qi.value)==null?void 0:m[0])==null?void 0:F.value,i=(C=a==null?void 0:a.fixContent)==null?void 0:C.map(k=>{var I;let _={};for(let R in k)Array.isArray(k==null?void 0:k[R])?_[R]=JSON.stringify(k==null?void 0:k[R]):_[R]=k==null?void 0:k[R];return(I=a==null?void 0:a.columns)==null||I.forEach(R=>{(R==null?void 0:R.formType)==="Upload"&&(_==null?void 0:_[R==null?void 0:R.prop])===""&&(_[R==null?void 0:R.prop]="{}")}),_[r]=n,_}),o=[{tableName:(L=a==null?void 0:a.relatedContents)==null?void 0:L.find(k=>k==null?void 0:k.includes("content")),tableContents:i}];await z.pageBatchAddApi({platId:parseInt((O=gl==null?void 0:gl.value)==null?void 0:O.plat_id),changeContents:o}),l=l==null?void 0:l.filter(k=>{var _,I,R;return(R=k==null?void 0:k.object_name)==null?void 0:R.includes((I=(_=a==null?void 0:a.fixContent)==null?void 0:_[0])==null?void 0:I[r])});let d=[],c=new Map;l==null||l.forEach(k=>{d.push(`content_${k==null?void 0:k.object_id}`),d.push(`struct_${k==null?void 0:k.object_id}`),c.set(k==null?void 0:k.object_id,k)});let u=await z.getAllTables({platId:parseInt((S=gl==null?void 0:gl.value)==null?void 0:S.plat_id),tableNames:d??[]});u=(E=u==null?void 0:u.data)==null?void 0:E.result;let y=[],b=[];u=re.chunk(u,2),u==null||u.forEach(k=>{var R,ae,X,me,ue,U,W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra,H;let _=c.get((me=(X=(ae=(R=k==null?void 0:k[1])==null?void 0:R[0])==null?void 0:ae.source_table)==null?void 0:X.split("_"))==null?void 0:me[1]),I=(W=(U=(ue=_==null?void 0:_.object_name)==null?void 0:ue.split("/"))==null?void 0:U.filter((Ge,Me)=>{var Le,Ie;return((Ie=(Le=_==null?void 0:_.object_name)==null?void 0:Le.split("/"))==null?void 0:Ie.length)-1!==Me}))==null?void 0:W.join("/");if(I=I+"/"+n,b!=null&&b.find(Ge=>(Ge==null?void 0:Ge.path)===I)||b.push({fatherPath:_==null?void 0:_.father_name,isShow:_==null?void 0:_.is_show,path:I}),((Q=(Z=k==null?void 0:k[1])==null?void 0:Z[0])==null?void 0:Q.类型)==="Table"){let Ge=((te=(Ae=(ve=k==null?void 0:k[1])==null?void 0:ve[0])==null?void 0:Ae.结构)==null?void 0:te.contents)??[],Me=ul.safeClone(Ge);Array.isArray(Me==null?void 0:Me[0])&&(Me=re.getColumnChild(Me==null?void 0:Me[0]));let Le=[];if(((A=k==null?void 0:k[0])==null?void 0:A.length)>0&&(Le=(se=k==null?void 0:k[0])==null?void 0:se.map(Ie=>Me==null?void 0:Me.map(De=>(De=(Ie==null?void 0:Ie[De==null?void 0:De.prop])??"",De)))),y!=null&&y.find(Ie=>(Ie==null?void 0:Ie.key)===I)){let Ie=(G=y==null?void 0:y.find(De=>(De==null?void 0:De.key)===I))==null?void 0:G.contents;Ie.push({isShow:_==null?void 0:_.is_show,filter:((_e=(we=(fe=k==null?void 0:k[1])==null?void 0:fe[0])==null?void 0:we.引用)==null?void 0:_e.contents)??"",key:"Table",name:Object.values(_==null?void 0:_.name),tableColumns:Ge,tableContents:Le});let de=y==null?void 0:y.findIndex(De=>(De==null?void 0:De.key)===I);y[de].contents=Ie}else y.push({key:I,contents:[{isShow:_==null?void 0:_.is_show,filter:((H=(ra=(Ue=k==null?void 0:k[1])==null?void 0:Ue[0])==null?void 0:ra.引用)==null?void 0:H.contents)??"",key:"Table",name:Object.values(_==null?void 0:_.name),tableColumns:Ge,tableContents:Le}]})}});let g=[];g.push({key:"menuPath",contents:b}),g=[...g,...y],await z.createPlatFormDataApi({platId:parseInt((x=gl==null?void 0:gl.value)==null?void 0:x.plat_id),changeData:g}),Ft.value=!1,Kr.setRefreshTable(!0)},Io=async(a,l)=>{},Oo=async a=>{xr.value=await re.getDeepDiffItems(a),Kr.setItemData(xr.value),Kr.setOriginalData(xr.value)};e.ref();const k3=e.ref(null),x3=()=>{var a,l;console.log("倒计时结束时"),z.ElMessageBox.alert(`超时未提交,【${(l=(a=Cl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},$c=e.ref([]),w3=e.computed(()=>{var a,l;return(l=(a=Nt.value)==null?void 0:a[Cl.value])==null?void 0:l.filter(r=>{var n;return((n=r==null?void 0:r.key)==null?void 0:n.type)==="gridLayout"})});e.watch(()=>[s3.value],()=>{Nn.setSelectTitle([]),Nn.setChooseTitle([])},{deep:!0});e.watch(()=>zo.value,async(a,l)=>{var n,i,o,d,c,u;let r=(n=zo.value)==null?void 0:n.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==_n.value);if((r==null?void 0:r.length)>0){rn.setContentLoading(!0);let y=((i=r==null?void 0:r[0])==null?void 0:i.relatedContent)??(Cl==null?void 0:Cl.value),b=y+"/"+((o=r==null?void 0:r[0])==null?void 0:o.value),g=!!((d=r==null?void 0:r[0])!=null&&d.parentContent),p=await qr(b,g,{originPath:y});p=(c=p==null?void 0:p.filter(F=>F))==null?void 0:c.map(F=>(F.isShow=!0,F)),console.log(p,"loadingContents");let D=await re.getDeepDiffItems(p),m=D==null?void 0:D.filter(F=>F==null?void 0:F.choice);Fo.setSelectTab((u=m==null?void 0:m[0])==null?void 0:u.choiceName),D=D==null?void 0:D.filter(F=>{var C;return!(F!=null&&F.choiceName)||(F==null?void 0:F.choiceName)===((C=m==null?void 0:m[0])==null?void 0:C.choiceName)}),xr.value=D,rn.setContentLoading(!1)}});const _3=(a,l)=>{setTimeout(async()=>{var c,u,y;let r=(c=zo.value)==null?void 0:c.filter(b=>(b==null?void 0:b.condition)==="child"&&(b==null?void 0:b.value)!==""&&(b==null?void 0:b.parentContent)!==_n.value),n=Cl==null?void 0:Cl.value,i=Cl==null?void 0:Cl.value;(r==null?void 0:r.length)>0&&(i=((u=r==null?void 0:r[0])==null?void 0:u.relatedContent)??(Cl==null?void 0:Cl.value),n=i+"/"+((y=r==null?void 0:r[0])==null?void 0:y.value));let o=await qr(n,!1,{originPath:i});o=o==null?void 0:o.map(b=>(b.isShow=!0,b));let d=await re.getDeepDiffItems(o);xr.value=d==null?void 0:d.filter(b=>!(b!=null&&b.step)||(b==null?void 0:b.step)===(a==null?void 0:a.title))},10)},S3=a=>{setTimeout(async()=>{var d,c,u;let l=(d=zo.value)==null?void 0:d.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==_n.value),r=Cl==null?void 0:Cl.value,n=Cl==null?void 0:Cl.value;(l==null?void 0:l.length)>0&&(n=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(Cl==null?void 0:Cl.value),r=n+"/"+((u=l==null?void 0:l[0])==null?void 0:u.value));let i=await qr(r,!1,{originPath:n});i=i==null?void 0:i.map(y=>(y.isShow=!0,y)),Fo.setSelectTab(a);let o=await re.getDeepDiffItems(i);xr.value=o==null?void 0:o.filter(y=>!(y!=null&&y.choiceName)||(y==null?void 0:y.choiceName)===a)},10)};e.watch(()=>t3.value,a=>{a!=null&&a.length||(xr.value=[])},{immediate:!0});e.watch(()=>[Cl.value],async a=>{var o,d,c,u;if(!Cl.value)return;if(Cl.value==="/"){xr.value=[];return}rn.setCurrentMenuPath(Cl.value),Kr.setLockingPage(""),xr.value=[];let l=e.getCurrentInstance();(o=l==null?void 0:l.scope)==null||o.stop(),l=null,Ri.value=!1,rn.setContentLoading(!0),zc.value=!0;let r=a==null?void 0:a[0],n=r,i=(d=ni.value)==null?void 0:d.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==Cl.value&&!(y!=null&&y.relatedContent));if((i==null?void 0:i.length)>0&&(r=r+"/"+((c=i==null?void 0:i[0])==null?void 0:c.value)),r==="系统管理/日志管理")xr.value=await a3("log");else{let y=await qr(r,!0,{originPath:n});y=y==null?void 0:y.map(p=>(p.isShow=!0,p));let b=await re.getDeepDiffItems(y),g=b==null?void 0:b.filter(p=>p==null?void 0:p.choice);Fo.setSelectTab((u=g==null?void 0:g[0])==null?void 0:u.choiceName),xr.value=b==null?void 0:b.filter(p=>{var D;return!(p!=null&&p.choiceName)||(p==null?void 0:p.choiceName)===((D=g==null?void 0:g[0])==null?void 0:D.choiceName)})}rn.setContentLoading(!1),Kr.setExtraContents([]),Nn.setSelectIndex(""),Nn.setSelectMenu(""),Kr.setItemData(xr.value),Kr.setOriginalData(xr.value),Kr.setRefreshTable(!1),e.nextTick(()=>{oi.value=oi.value++,Ri.value=!0})},{immediate:!0});e.watch(()=>[Ms.value],async()=>{var a,l,r,n;if(Ms.value){xr.value=[];let i=e.getCurrentInstance();(a=i==null?void 0:i.scope)==null||a.stop(),i=null,Ri.value=!1,rn.setContentLoading(!0),zc.value=!0;let o=_n==null?void 0:_n.value,d=o,c=(l=ni.value)==null?void 0:l.filter(g=>(g==null?void 0:g.condition)==="child"&&(g==null?void 0:g.value)!==""&&(g==null?void 0:g.parentContent)!==(_n==null?void 0:_n.value));(c==null?void 0:c.length)>0&&(o=o+"/"+((r=c==null?void 0:c[0])==null?void 0:r.value));let u=await qr(o,!0,{originPath:d});u=u==null?void 0:u.map(g=>(g.isShow=!0,g));let y=await re.getDeepDiffItems(u),b=y==null?void 0:y.filter(g=>g==null?void 0:g.choice);if(Fo.setSelectTab((n=b==null?void 0:b[0])==null?void 0:n.choiceName),xr.value=y==null?void 0:y.filter(g=>{var p;return!(g!=null&&g.choiceName)||(g==null?void 0:g.choiceName)===((p=b==null?void 0:b[0])==null?void 0:p.choiceName)}),rn.setContentLoading(!1),Kr.setExtraContents([]),Nn.setSelectIndex(""),Nn.setSelectMenu(""),Kr.setItemData(xr.value),Kr.setOriginalData(xr.value),Kr.setRefreshTable(!1),(c==null?void 0:c.length)>0){let g=[...ni.value,...c];Nn.setSelectTitle(g)}e.nextTick(()=>{oi.value=oi.value++,Ri.value=!0})}},{immediate:!0,deep:!0});const E3=async()=>{rn.setLinkMenuInfo(null),rn.setActiveMenuPath(i3.value),xr.value=null,Kr.setRouteToChildPath(""),rn.setChildMenu("")},C3=a=>new RegExp("button","i").test(a),D3=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Vc=a=>{if(D3(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&rn.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Fc=async(a,l,r)=>{var p,D,m,F,C,L,O,S,E,x,k,_;let n="",i="";for(let I in l)(l==null?void 0:l[I])===a&&(i=I);r==null||r.forEach(I=>{(I==null?void 0:I.prop)===i&&(n=I==null?void 0:I.fatherPath)});let o=n===""?Cl.value:n;n!==""&&rn.setCurrentMenuPath(o),rn.setCurrentMenuPath(o+"/"+a),rn.setContentLoading(!0),xr.value=await qr(o+"/"+a,!0,{originPath:o+"/",row:l});let d=await qr(o,!1),c=(p=d==null?void 0:d.filter(I=>(I==null?void 0:I.comp)==="Table"))==null?void 0:p[0],u=((C=(F=(m=(D=c==null?void 0:c.compData)==null?void 0:D.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:m.contents)==null?void 0:F[0])==null?void 0:C.prop)??((x=(E=(S=(O=(L=c==null?void 0:c.compData)==null?void 0:L.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:O.contents)==null?void 0:S[0])==null?void 0:E[0])==null?void 0:x.prop),y=(_=(k=c==null?void 0:c.compData)==null?void 0:k.find(I=>(I==null?void 0:I.key)==="tableContents"))==null?void 0:_.contents;y=y==null?void 0:y.map(I=>({label:I==null?void 0:I[u],value:I==null?void 0:I[u]}));let b=ni.value,g={value:a,condition:"child",options:y,relatedContent:o,isShow:!0};b=b==null?void 0:b.filter(I=>(I==null?void 0:I.condition)!=="child"),b.push(g),Nn.setSelectTitle(b),Nn.setChooseTitle([g]),rn.setContentLoading(!1),Kr.setExtraContents([]),Nn.setSelectIndex(""),Nn.setSelectMenu(""),Kr.setItemData(xr.value),Kr.setOriginalData(xr.value)},T3=a=>{Lc.value=a},Mi=e.reactive({index:0,comp:null}),B3=e.computed(()=>{var a;return(a=xr.value)==null?void 0:a.map((l,r)=>({id:l.id,name:l.name,status:N3(l,r)}))}),Pc=(a,l)=>{var u,y,b,g,p;const r=l?a:a-2,n=(u=xr.value)==null?void 0:u[r],i=(b=(y=n==null?void 0:n.compData)==null?void 0:y.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:b.contents,o=i==null?void 0:i.findIndex(D=>(D==null?void 0:D.isMainKey)&&(D==null?void 0:D.label)!=="操作"),d=o===-1?0:o,c=(p=(g=n==null?void 0:n.compData)==null?void 0:g.find(D=>(D==null?void 0:D.key)==="tableContents"))==null?void 0:p.contents;return{valid:c==null?void 0:c.every(D=>D==null?void 0:D[d+1]),length:(c==null?void 0:c.length)||0}},N3=(a,l)=>{var n;let r="process";if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){const{valid:i,length:o}=Pc(l,!0);Mi.index===l?r="process":o===0?r="wait":r=i?"success":"error"}return r},jc=a=>{var r,n,i,o,d;const l=a+1;if(l>1&&((i=(n=(r=xr.value)==null?void 0:r[a])==null?void 0:n.comp)==null?void 0:i.toUpperCase())==="TABLE"){const{valid:c}=Pc(l);c?(Mi.index=l,Mi.comp=(o=xr.value)==null?void 0:o[a]):Xa.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Mi.index=l,Mi.comp=(d=xr.value)==null?void 0:d[a]},Hc=e.computed(()=>{var a,l;return(l=(a=Oc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Hc.value,a=>{a&&jc(0)},{immediate:!0});const Lo=e.ref(0),Uc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=z.cloneDeep(a))==null?void 0:l.map(n=>(Lo.value++,n={label:(n==null?void 0:n.label)??"",prop:(n==null?void 0:n.label)==="操作"?"operate":n==null?void 0:n.prop,width:n!=null&&n.width?parseInt(n.width):"",fixed:(n==null?void 0:n.fixed)??void 0,sortable:(n==null?void 0:n.sortable)??!1,align:(n==null?void 0:n.align)??"left",showOverflowTooltip:(n==null?void 0:n.showOverflowTooltip)??!0,isNotDrag:(n==null?void 0:n.isNotDrag)??!1,isEditCol:(n==null?void 0:n.isEditCol)??!1,isOperate:(n==null?void 0:n.isOperate)??!1,id:(n==null?void 0:n.id)??Lo.value,children:Uc(n==null?void 0:n.children)},n))},A3=a=>{var r;return(r=z.cloneDeep(a))==null?void 0:r.map(n=>(Lo.value++,n={label:(n==null?void 0:n.label)??"",prop:(n==null?void 0:n.label)==="操作"?"operate":n==null?void 0:n.prop,width:n!=null&&n.width?parseInt(n.width):"",fixed:(n==null?void 0:n.fixed)??void 0,sortable:(n==null?void 0:n.sortable)??!1,align:(n==null?void 0:n.align)??"left",showOverflowTooltip:(n==null?void 0:n.showOverflowTooltip)??!0,isNotDrag:(n==null?void 0:n.isNotDrag)??!1,isEditCol:(n==null?void 0:n.isEditCol)??!1,isOperate:(n==null?void 0:n.isOperate)??!1,id:(n==null?void 0:n.id)??Lo.value,children:Uc(n==null?void 0:n.children)},n))},qc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===l)?(r=z.cloneDeep(a))==null?void 0:r.filter(i=>(i==null?void 0:i.id)!==l):(a=a==null?void 0:a.map(n=>(n.children=qc(n==null?void 0:n.children,l),n)),a)},Wc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=z.cloneDeep(a))==null?void 0:r.map(i=>((i==null?void 0:i.id)===(l==null?void 0:l.id)&&(i=l),i)):(a=a==null?void 0:a.map(n=>(n.children=Wc(n==null?void 0:n.children,l),n)),a)},Gc=(a,l)=>{var r;return a!=null&&a.find(n=>{var i;return(n==null?void 0:n.id)===((i=l==null?void 0:l.contents)==null?void 0:i.id)})?(r=z.cloneDeep(a))==null?void 0:r.map(i=>{var o;return(i==null?void 0:i.id)===((o=l==null?void 0:l.contents)==null?void 0:o.id)&&(i=l==null?void 0:l.contents),i}):(a=a==null?void 0:a.map(n=>(n.children=Gc(n==null?void 0:n.children,l),n)),a)},Kc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=z.cloneDeep(a))==null?void 0:r.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(n=>(n.children=Kc(n==null?void 0:n.children,l),n)),a)},_r=[{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"}],z3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],M3=[{label:"新增",value:"add"}],Jn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:M3},{key:"background",label:"按钮背景色",type:"Color"}],Xn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:z3},{key:"textColor",label:"按钮颜色",type:"Color"}],I3={class:"table-content"},O3={class:"menu-config-wrap"},L3=["onClick"],R3={key:0,class:"viewport-wrap"},$3=["onClick"],V3={title:"选择显示列信息"},F3={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"}},P3=["title"],j3={class:"col-operate-wrap"},H3={key:0,class:"col-operate-radio-wrapper"},U3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},q3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},W3={class:"pop-view"},G3={class:"pop-wrapper"},K3={class:"file-list-pop"},Y3=["title","onClick"],J3=["onClick"],X3=["onClick"],Z3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},Q3={class:"form-content"},eh={key:0,class:"dialog-footer"},ah={class:"dialog-footer"},lh={class:"ocr-dialog-content"},rh={class:"ocr-steps"},nh={key:0,class:"ocr-action-buttons"},ih={key:1,class:"ocr-preview-area"},oh={class:"ocr-file-grid"},th={class:"file-thumbnail"},sh=["src"],ch={key:1,class:"thumbnail-placeholder"},uh={class:"progress-svg",viewBox:"0 0 36 36"},dh=["stroke","stroke-width","stroke-dasharray"],ph={key:0,class:"progress-icon"},fh={key:1,class:"progress-icon"},hh=["onClick"],vh={class:"file-name"},mh={key:0,class:"ocr-recognize-button"},yh={key:2,class:"ocr-progress-section"},gh={key:3,class:"ocr-confirm-area"},bh={class:"ocr-preview-tip"},kh={class:"ocr-preview-table"},xh={style:{display:"flex","align-items":"center",gap:"8px"}},wh={key:0},_h={key:4,class:"ocr-success-area"},Sh={key:0,class:"ocr-dialog-footer"},Eh={class:"form-content"},Ch={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},Dh={style:{display:"flex","justify-content":"space-between",gap:"8px"}},Th={style:{display:"flex"}},Os="ss-ocr-upload-history",Bh="ss-ocr-cert-history-v1",Nh={__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 Zt;const r=e.ref([]),n=Vt(z.pinia),i=e.ref(null),o=e.ref(new Set),d=e.ref(new Map),c=e.ref(!1),u=e.ref([]),y=e.ref(new Map),b=new Map,g=e.ref(new Map),p=a,D=e.ref((p==null?void 0:p.allowSelect)??!0),m=e.ref(((Zt=p==null?void 0:p.config)==null?void 0:Zt.showIndex)??!0),F=e.ref(),C=e.ref(!0),L=e.ref(!1),O=e.ref([]),S={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},E=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=re.useOriginalState(z.pinia);let k="$R";const{originalPath:_}=z.storeToRefs(x),I=_.value,R=e.computed(()=>{var v;const f=(v=re.getAllLeafNodes(W.value)||[])==null?void 0:v.filter(M=>(M==null?void 0:M.type)!=="operate"&&(M==null?void 0:M.label)!=="操作"&&(M==null?void 0:M.prop)!=="operate");return f.length>0?f.every(M=>!!(M!=null&&M.sortable)):!1});e.computed(()=>{var v;return(v=W.value)==null?void 0:v.every(M=>M==null?void 0:M.filterable)}),e.computed(()=>{var v;return(v=W.value)==null?void 0:v.every(M=>M==null?void 0:M.operable)});const ae=e.ref(!0),X=e.ref([]),me=e.reactive({column:{},status:!1,text:"合计"}),ue=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),U=l,W=e.ref([]),Z=e.ref([]),Q=e.ref([]),ve=e.reactive({prop:"",order:null}),Ae=e.ref([]),te=e.ref(!1),A=e.ref(!1),se=e.ref(null),{isUseBackdrop:G,initTrackFileType:fe,getFileExtension:we,setData:_e,getFileInfo:Ue,getFilesInfo:ra}=Do.useThreeSystem(),H=e.ref([]),Ge=e.ref(!1),Me=e.ref(),Le=z.useMenuState(),{importLoading:Ie,activeMenuPath:de,contentLoading:De,linkMenuInfo:Je}=z.storeToRefs(Le),Sa=re.useTableComp(z.pinia),We=z.useModelComp(z.pinia),V=ti(z.pinia),{extraContents:P,cacheUpdatingData:le,tableViewContents:ce,tableLoading:he,pageMapState:ua,lockingPage:ia}=z.storeToRefs(We),{selectTab:Ve}=z.storeToRefs(V),{compType:va,hasEditable:Ea}=dc.useRole(),Ce=e.ref([]),Fa=e.ref([]),Da=e.ref(new Map);e.ref(!1);const da=e.ref("");e.ref();const ja=e.ref(!0),sa=e.ref(0),Fe=e.ref(!0),ha=e.ref(""),Qe=e.ref(!1),Oe=e.ref(null);e.ref([]);const $e=e.ref({label:"查看三维模型"}),ne=e.ref(!1),qe=e.ref(),na=e.ref([]),fa=e.ref([]),ze=e.ref(!1),Be=e.ref([]),Ke=e.ref([]),Ee=e.ref([]),ye=e.ref([]),$a=e.ref({dialogShow:!1,dialogTitle:""}),wl=()=>{$a.value.dialogShow=!1,$a.value.dialogTitle=""},el=f=>{console.log("Received signature data:",f),$a.value.dialogShow=!1},Pl=e.ref([]),bl=()=>{try{const f=localStorage.getItem(Os),v=f?JSON.parse(f):[];Pl.value=Array.isArray(v)?v:[]}catch{Pl.value=[]}},jl=()=>{try{localStorage.setItem(Os,JSON.stringify(Pl.value||[]))}catch{}},ll=f=>{var ie,oe,K;if(!f)return;const v=f.url||((ie=f==null?void 0:f.uploadResult)==null?void 0:ie.url)||"",M=f.name||((oe=f==null?void 0:f.uploadResult)==null?void 0:oe.name)||((K=f==null?void 0:f.uploadResult)==null?void 0:K.fileName)||"";if(!v&&!M)return;const $={name:M,url:v,ts:Date.now()},q=String($.name||"").trim().toLowerCase(),B=(Pl.value||[]).findIndex(ke=>String((ke==null?void 0:ke.name)||"").trim().toLowerCase()===q);B>-1&&Pl.value.splice(B,1),Pl.value.unshift($),Pl.value.length>20&&(Pl.value=Pl.value.slice(0,20)),jl()};bl();const Hl=(f,v)=>`${Bh}:${String(f??"")}:${String(v??"")}`,Ga=(f,v)=>{try{const M=sessionStorage.getItem(Hl(f,v)),$=M?JSON.parse(M):[];return Array.isArray($)?$:[]}catch{return[]}},Jl=(f,v,M)=>{try{sessionStorage.setItem(Hl(f,v),JSON.stringify(Array.isArray(M)?M:[]))}catch{}},Xl=(f,v,M)=>{if(!v)return;const $=Ga(f,v),q=[M,...$||[]].filter(Boolean).slice(0,1);return Jl(f,v,q),q},ar=(f,v,M)=>{if(!v||!M)return;const $=Hl(f,v),q=Hl(f,M);try{const B=sessionStorage.getItem($);if(!B)return;const ie=(()=>{try{const ke=JSON.parse(B);return Array.isArray(ke)?ke:[]}catch{return[]}})(),oe=Ga(f,M),K=[...ie,...oe||[]].filter(Boolean).sort((ke,ge)=>Number((ge==null?void 0:ge.ts)||0)-Number((ke==null?void 0:ke.ts)||0)).slice(0,1);sessionStorage.setItem(q,JSON.stringify(K)),sessionStorage.removeItem($)}catch{}},Sl=e.ref(!1),pr=e.ref(!1),ya=e.ref([]),ol=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const vl=e.ref(!1),Bl=e.ref([]),Ua=e.ref(1),_a=e.ref(new Map),rl=e.ref(new Map),Te=e.ref(0),oa=e.ref(!1),Ya=e.ref([]),pe=e.ref([]),wa=f=>{var v;try{const M=(v=re.getAllLeafNodes(W.value)||[])==null?void 0:v.filter($=>($==null?void 0:$.type)!=="operate"&&($==null?void 0:$.label)!=="操作"&&($==null?void 0:$.prop)!=="operate");return(M==null?void 0:M.find($=>($==null?void 0:$.prop)===f||($==null?void 0:$.label)===f))||null}catch{return null}},Pa=f=>{const v=wa(f),M=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return ul.getComponent(M)||ul.getComponent("Input")},pl=e.ref([]),Il=e.ref(null),Qa=e.ref([]),kl=e.ref(null),Ma=e.ref(""),ea=e.ref(!1),ma=e.ref([]),Ha=e.ref(""),ka=e.ref(!1),Ul=e.ref([]),Gl=e.ref([]),Ba=e.ref([]),Rl=e.ref(null),Fr=e.ref([]),Br=e.ref("");e.computed(()=>{var f;try{const v=(f=re.getAllLeafNodes(W.value)||[])==null?void 0:f.filter($=>($==null?void 0:$.type)!=="operate"&&($==null?void 0:$.label)!=="操作"&&($==null?void 0:$.prop)!=="operate"),M=new Map;return v==null||v.forEach($=>{$!=null&&$.label&&($!=null&&$.prop)&&M.set($.label,$.prop)}),M.get("编号")||""}catch{return""}});const Ze=e.computed(()=>{var f;try{const v=(f=re.getAllLeafNodes(W.value)||[])==null?void 0:f.filter($=>($==null?void 0:$.type)!=="operate"&&($==null?void 0:$.label)!=="操作"&&($==null?void 0:$.prop)!=="operate"),M=new Map;return v==null||v.forEach($=>{$!=null&&$.label&&($!=null&&$.prop)&&M.set($.label,$.prop)}),M.get("名称")||""}catch{return""}}),La=e.computed(()=>{var f;try{const v=(f=re.getAllLeafNodes(W.value)||[])==null?void 0:f.filter($=>($==null?void 0:$.type)!=="operate"&&($==null?void 0:$.label)!=="操作"&&($==null?void 0:$.prop)!=="operate"),M=new Map;return v==null||v.forEach($=>{$!=null&&$.label&&($!=null&&$.prop)&&M.set($.label,$.prop)}),M.get("制造厂")||""}catch{return""}}),hl=()=>{ka.value=!1,Ul.value=[],Gl.value=[],Ba.value=[],Rl.value=null,Fr.value=[],Br.value=""},Ll=f=>f==null?!1:typeof f=="string"?f.trim()!=="":Array.isArray(f)?f.length>0:!0,Ta=(f,v)=>{const M=(f==null?void 0:f.ocrRow)||{};for(const q of Object.keys(M))q==="id"||q==="_isOCRRow"||q==="_ocrTableId"||Ll(M[q])&&(v[q]=M[q]);const $=Fa.value.find(q=>q.id===v.id);if($)for(const q of Object.keys(M))q==="id"||q==="_isOCRRow"||q==="_ocrTableId"||Ll(M[q])&&($[q]=M[q]);Da.value&&Da.value.set(v.id,v),Xl(p==null?void 0:p.index,v.id,f==null?void 0:f.versionItem),Gl.value=[...Gl.value||[],JSON.parse(JSON.stringify(v))]},Yr=async(f,v=null)=>{var M,$,q,B,ie,oe,K;try{const ke=(M=re.getAllLeafNodes(W.value)||[])==null?void 0:M.filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),ge=new Map;ke==null||ke.forEach(ba=>{ba!=null&&ba.label&&(ba!=null&&ba.prop)&&ge.set(ba.label,ba.prop)});const Ye=ge.get("系统编号")||ge.get("编号");if(!Ye){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const He=v||Rl.value;if((Array.isArray(He==null?void 0:He.result)?He.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ba=0;ba<f.length;ba++){const Na=f[ba],Aa=Na[Ye];if(!Aa){console.warn(`第 ${ba+1} 条匹配行缺少系统编号,跳过`);continue}const la=`设备管理/试验设备/${Aa}`,tl=await z.getPageDataApi({platId:parseInt(($=Nl.value)==null?void 0:$.plat_id),pageName:la});if(!((q=tl==null?void 0:tl.data)!=null&&q.result)||!Array.isArray(tl.data.result)){console.warn(`未找到详情页数据: ${la}`);continue}const xa=tl.data.result.find(pa=>(pa==null?void 0:pa.property_name)==="校检记录");if(!xa){console.warn(`详情页 ${la} 中未找到校检记录表`);continue}const sl=(B=xa.contents)==null?void 0:B.find(pa=>(pa==null?void 0:pa.key)&&pa.key.startsWith("content_"));if(!sl||!sl.key){console.warn("校检记录表中未找到 content item");continue}const be=sl.key,Va=Array.isArray(sl.value)?sl.value:[];if(Va.length>=5){const N=[...Va].sort((za,qa)=>{const cl=Number((za==null?void 0:za.create_time)||0),Ka=Number((qa==null?void 0:qa.create_time)||0);return cl-Ka})[0];N!=null&&N.id&&await z.pageBatchDeleteApi({platId:parseInt((ie=Nl.value)==null?void 0:ie.plat_id),changeContents:[{tableName:be,tableContents:[{id:N.id}]}]})}const ga=(oe=ke==null?void 0:ke.find(pa=>(pa==null?void 0:pa.label)==="证书附件"))==null?void 0:oe.prop,Ja=String(Date.now()),Oa={id:Ja},Ne=Va[0]||{},ee=new Date().toISOString().split("T")[0];if(Object.keys(Ne||{}).forEach(pa=>{if(pa!=="id"){if(pa==="证书附件"){Oa[pa]="";return}if(pa==="校检日期"||pa==="检校日期"){Oa[pa]=Na[pa]||Na.校检日期||Na.检校日期||ee;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(pa)){Oa[pa]=Na[pa]??"";return}Oa[pa]=Na[pa]??""}}),ga&&Na[ga]){const pa=Na[ga];if(Array.isArray(pa)&&pa.length>0)Oa.证书附件=JSON.stringify(pa.map(N=>({url:(N==null?void 0:N.url)||"",name:(N==null?void 0:N.name)||(N==null?void 0:N.fileName)||"",fileName:(N==null?void 0:N.fileName)||(N==null?void 0:N.name)||""})).filter(N=>N.url||N.name));else if(typeof pa=="string")try{const N=JSON.parse(pa);Oa.证书附件=pa}catch{Oa.证书附件=JSON.stringify([{url:pa,name:pa,fileName:pa}])}}console.log(be,"tableName","inspectionRecordRow",Oa),await z.pageBatchAddApi({platId:parseInt((K=Nl.value)==null?void 0:K.plat_id),changeContents:[{tableName:be,tableContents:[Oa]}]});const Pe=xa==null?void 0:xa.object_id;if(Pe&&Ja){const pa=ga&&Na[ga]?Na[ga]:null;let N=[],za="",qa=!1;if(Array.isArray(pa)&&pa.length>0){N=pa.map(fl=>({name:(fl==null?void 0:fl.name)||(fl==null?void 0:fl.fileName)||"",url:(fl==null?void 0:fl.url)||""})).filter(fl=>fl.url||fl.name);const Ka=pa[0];za=(Ka==null?void 0:Ka.url)||"";const Ca=(Ka==null?void 0:Ka.name)||(Ka==null?void 0:Ka.fileName)||"";qa=String(Ca).toLowerCase().endsWith(".pdf")||String(za).toLowerCase().endsWith(".pdf")}else if(typeof pa=="string")try{const Ka=JSON.parse(pa);Array.isArray(Ka)?(N=Ka.map(Ca=>({name:(Ca==null?void 0:Ca.name)||(Ca==null?void 0:Ca.fileName)||"",url:(Ca==null?void 0:Ca.url)||""})).filter(Ca=>Ca.url||Ca.name),N.length>0&&(za=N[0].url||"",qa=String(N[0].name).toLowerCase().endsWith(".pdf")||String(za).toLowerCase().endsWith(".pdf"))):(za=pa,qa=String(pa).toLowerCase().endsWith(".pdf"))}catch{za=pa,qa=String(pa).toLowerCase().endsWith(".pdf")}const cl={ts:Date.now(),versionId:String(Date.now())+"_"+String(ba),label:new Date().toLocaleString(),certType:Na.证书类型||"",certNo:Na.证书编号||"",fileType:qa?"pdf":"image",sourceUrl:qa?za:"",images:N};Xl(Pe,Ja,cl)}}}catch(ke){console.error("向校检记录表插入OCR识别结果失败:",ke),Xa.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},ln=f=>{const v=Array.isArray(f)?f:Ul.value||[];if(v.length===0){hl();return}if(v.find(B=>(B==null?void 0:B.__decision)==="replace"&&!(B!=null&&B.selectedTargetId))){Xa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(B=>{var oe;const ie=B==null?void 0:B.__decision;if(!(!ie||ie==="skip")){if(ie==="add"){Xl(p==null?void 0:p.index,(oe=B==null?void 0:B.ocrRow)==null?void 0:oe.id,B==null?void 0:B.versionItem),Ba.value=[...Ba.value||[],B.ocrRow];return}if(ie==="replace"){const K=B==null?void 0:B.selectedTargetId,ke=(Ce.value||[]).find(ge=>String(ge==null?void 0:ge.id)===String(K));if(!ke)return;Ta(B,ke)}}}),(Gl.value||[]).length>0&&(Ce.value=[...Ce.value||[]]),(Ba.value||[]).length>0&&(Ce.value=[...Ce.value||[],...Ba.value||[]],Fa.value=[...Fa.value||[],...Ba.value||[]],(Ba.value||[]).forEach(B=>{var ie,oe;return(oe=(ie=Da.value)==null?void 0:ie.set)==null?void 0:oe.call(ie,B.id,B)})),Sr.value=Ce.value;const $=Gl.value||[],q=Ba.value||[];if($.length>0&&(U("change",{buttonName:"编辑",singleContent:$,content:Ce.value,relatedContents:p==null?void 0:p.related,index:p==null?void 0:p.index,parentTableId:p==null?void 0:p.parentTableId,columns:W.value,name:p==null?void 0:p.compName}),Yr($)),q.length>0){const B=Rl.value;U("change",{buttonName:"OCR批量新增",content:Ce.value,index:p==null?void 0:p.index,parentTableId:p==null?void 0:p.parentTableId,column:W.value,ocrRows:q,relatedContents:p==null?void 0:p.related,uploadedFiles:(Array.isArray(B==null?void 0:B.result)?B.result:[]).map(ie=>(Array.isArray(ie==null?void 0:ie.图片信息)?ie.图片信息:[]).map(oe=>({url:(oe==null?void 0:oe.url)||"",name:(oe==null?void 0:oe.name)||"",fileName:(oe==null?void 0:oe.name)||""})).filter(oe=>oe.url)),ocrResult:B,matchedCount:($||[]).length,newCount:(q||[]).length})}Xa.ElMessage.success("已提交候选处理结果"),hl()},zr=Nc(),Re=e.computed(()=>zr.getConfig()),Zl=e.ref(),ql=e.ref(),Jr=Cc(z.pinia),Sr=e.ref(),Ql=e.ref(0),Er=z.useUnit(z.pinia),{selectIndex:er,selectMenu:$l,selectTitle:or}=z.storeToRefs(Er),{selectString:lr}=z.storeToRefs(Jr),Wl=z.useLoginState(z.pinia),{loginUserInfo:Nl}=z.storeToRefs(Wl),Pr=e.ref(720),rr=e.ref(!1),Wr=e.ref(!1),Nr=e.ref([]),Tr=e.ref(),gn=e.ref(!0),Sn=e.ref(!0);e.ref([]);const Cn=e.inject("contentRef");e.provide("contentRef",Cn),e.provide("getSuggestListForCell",Yu),e.provide("getSuggestLoadingForCell",(f,v)=>{const M=`${f==null?void 0:f.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return g.value.get(M)||!1}),e.watch(()=>{var f;return(f=Ce.value)==null?void 0:f.length},f=>{ue.total=f}),e.watch(()=>ce.value,async()=>{var v,M,$,q,B,ie,oe,K,ke,ge,Ye,He,aa,ba,Na,Aa,la;if(((v=ce.value)==null?void 0:v.length)===0||!((M=p==null?void 0:p.itemData)!=null&&M.find(tl=>(tl==null?void 0:tl.key)==="columnPath"))||!(($=p==null?void 0:p.itemData)!=null&&$.find(tl=>(tl==null?void 0:tl.key)==="pageColumn")))return;let f=(ke=(K=(oe=(ie=(B=(q=p==null?void 0:p.itemData)==null?void 0:q.find(tl=>(tl==null?void 0:tl.key)==="pageColumn"))==null?void 0:B.contents)==null?void 0:ie.split("["))==null?void 0:oe[1])==null?void 0:K.split("]"))==null?void 0:ke[0];((aa=(He=(Ye=(ge=p==null?void 0:p.itemData)==null?void 0:ge.find(tl=>(tl==null?void 0:tl.key)==="pageColumn"))==null?void 0:Ye.contents)==null?void 0:He.split("["))==null?void 0:aa[0])+((Na=(ba=ce.value)==null?void 0:ba.find(tl=>(tl==null?void 0:tl.key)===f))==null?void 0:Na.value),(la=(Aa=p==null?void 0:p.itemData)==null?void 0:Aa.find(tl=>(tl==null?void 0:tl.key)==="pageGroup"))==null||la.contents,Xt(compData,p.allMapContents)},{deep:!0});const mn=f=>{var M,$,q,B,ie;const v=($=(M=W.value)==null?void 0:M.filter(oe=>oe==null?void 0:oe.mainKey))==null?void 0:$.map(oe=>oe==null?void 0:oe.prop);if(v.length===0){const oe=(q=W.value)==null?void 0:q.map(K=>K==null?void 0:K.prop);return(B=oe==null?void 0:oe.map(K=>f==null?void 0:f[K]))==null?void 0:B.join("|")}return(ie=v==null?void 0:v.map(oe=>f==null?void 0:f[oe]))==null?void 0:ie.join("|")},On=f=>{var oe,K,ke,ge,Ye;const v=(K=(oe=W.value)==null?void 0:oe.filter(He=>He==null?void 0:He.required))==null?void 0:K.map(He=>He==null?void 0:He.prop),M=[];if(f==null||f.forEach(He=>{v==null||v.forEach(aa=>{const ba=He[aa];(ba==null||ba==="")&&(M.includes(aa)||M.push(aa))})}),M.length>0)return Xa.ElMessage.warning(`请填写必填项:${M.join("、")}`);const $=new Map,q=new Map;(ke=Ce.value)==null||ke.forEach(He=>{const aa=mn(He);$.set(aa,He)}),f==null||f.forEach(He=>{const aa=mn(He);q.set(aa,He)});const B=f==null?void 0:f.filter(He=>$.has(mn(He))),ie=(ge=Ce.value)==null?void 0:ge.filter(He=>q.has(mn(He)));return(B==null?void 0:B.length)>0&&(J.columns=(Ye=W.value)==null?void 0:Ye.filter(He=>(He==null?void 0:He.label)!=="操作"),J.existRows=ie,J.tableData=B,J.show=!0),J.newRows=f==null?void 0:f.filter(He=>{const aa=mn(He);return!$.has(aa)}),J.newRows},nn=e.ref(""),Dn=e.ref(null),Vn=async()=>{var f,v,M,$,q,B;try{const ie=await z.quoteApi({related:[{menus:de.value,groups:p==null?void 0:p.compName}],platId:parseInt((f=Nl.value)==null?void 0:f.plat_id)});if(((v=ie==null?void 0:ie.data)==null?void 0:v.code)===200){Dn.value=(M=ie==null?void 0:ie.data)==null?void 0:M.result;const oe=($=W.value)==null?void 0:$.map(ge=>(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label)),K=on(oe,(q=ie==null?void 0:ie.data)==null?void 0:q.result),ke=K==null?void 0:K.flatMap(ge=>ge==null?void 0:ge.quote);(ke==null?void 0:ke.length)>0&&(nn.value=(B=ke==null?void 0:ke.map(ge=>ge==null?void 0:ge.menus))==null?void 0:B.join("、"))}}catch(ie){throw new Error(ie)}};function on(f,v){var M;return(M=v.filter($=>$.struct&&Array.isArray($.struct)?$.struct.some(q=>q.words&&Array.isArray(q.words)?q.words.some(B=>f.includes(B)):!1):!1))==null?void 0:M.map($=>{const q={...$};return q.struct&&Array.isArray(q.struct)&&(q.struct=q.struct.filter(B=>B.words&&Array.isArray(B.words)?B.words.some(ie=>f.includes(ie)):!1)),q})}const Fn=async(f,v)=>{var M,$;try{Dn.value||await Vn();const q=v==null?void 0:v.map(ie=>{const oe=Object.keys(ie),K={};return oe.forEach((ke,ge)=>{K[f[ge]]=ie[ke]}),K}),B=On(q);if(!B||(B==null?void 0:B.length)===0)return;J.show||await je(B)}catch(q){throw Xa.ElMessage.error("数据导入处理失败"),await z.pageBatchAddApi({platId:parseInt((M=Nl==null?void 0:Nl.value)==null?void 0:M.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(q),is_delete:!1,request_table:($=p==null?void 0:p.related)==null?void 0:$.find(B=>B==null?void 0:B.includes("content")),request_type:"error"}]}]}),new Error(q)}},Mr=async f=>{var B,ie,oe,K,ke,ge,Ye;let v=Q.value;v!=null&&v.find(He=>(f==null?void 0:f.key)===(He==null?void 0:He.key))&&(v=v==null?void 0:v.filter(He=>(f==null?void 0:f.key)!==(He==null?void 0:He.key))),v.push({key:f==null?void 0:f.key,value:[(ie=f==null?void 0:f.value)==null?void 0:ie[((B=f==null?void 0:f.value)==null?void 0:B.length)-1]]});let M=ye.value;M=M==null?void 0:M.map(He=>{var aa,ba;return(He==null?void 0:He.type)==="Select"&&(f==null?void 0:f.key)===(He==null?void 0:He.prop)&&Array.isArray(He.value)&&(aa=He.value)!=null&&aa.every(Na=>typeof Na=="string")&&(He.selectValue=(ba=v==null?void 0:v.find(Na=>(Na==null?void 0:Na.key)===(He==null?void 0:He.prop)))==null?void 0:ba.value),He});let $=(K=(oe=M==null?void 0:M.find(He=>(He==null?void 0:He.prop)===(f==null?void 0:f.key)))==null?void 0:oe.optionUrl)==null?void 0:K.menuId,q=M==null?void 0:M.find(He=>(He==null?void 0:He.prop)===(f==null?void 0:f.key));if($){let He=await Bt(q==null?void 0:q.optionUrl,$),aa,ba=X.value,Na=(Ye=(ge=(ke=ye.value)==null?void 0:ke.find(Aa=>{var la;return(la=q==null?void 0:q.optionUrl)==null?void 0:la.menuId}))==null?void 0:ge.selectValue)==null?void 0:Ye[0];if(He==null||He.forEach(Aa=>{var la,tl,xa,sl,be,Va,ga,Ja,Oa,Ne;if($){let ee=(tl=(la=ye.value)==null?void 0:la.find(pa=>{var N,za;return((N=q==null?void 0:q.optionUrl)==null?void 0:N.menuId)===((za=pa==null?void 0:pa.optionUrl)==null?void 0:za.menuId)}))==null?void 0:tl.prop,Pe=(sl=(xa=M==null?void 0:M.find(pa=>(pa==null?void 0:pa.prop)===ee))==null?void 0:xa.selectValue)==null?void 0:sl[0];ee!=null&&ee.includes("·")&&(ee=(be=ee==null?void 0:ee.split("·"))==null?void 0:be[0],Pe=(Oa=(Ja=(ga=f==null?void 0:f.value)==null?void 0:ga[((Va=f==null?void 0:f.value)==null?void 0:Va.length)-1])==null?void 0:Ja.split(" "))==null?void 0:Oa[0]),ba!=null&&ba.find(pa=>(pa==null?void 0:pa.value)===Na)?aa=(Ne=ba==null?void 0:ba.find(pa=>(pa==null?void 0:pa.value)===Na))==null?void 0:Ne.objectValue:Aa[ee]===Pe&&(aa=Aa)}}),aa){let Aa=M;Aa=Aa==null?void 0:Aa.map(la=>{var tl,xa,sl,be,Va,ga;return $&&(aa!=null&&aa[la==null?void 0:la.prop])&&ha.value==="新增"&&(la==null?void 0:la.prop)!==(q==null?void 0:q.prop)?la.value=(aa==null?void 0:aa[la==null?void 0:la.prop])||(aa==null?void 0:aa[(be=(sl=(xa=(tl=la==null?void 0:la.optionUrl)==null?void 0:tl.groupSelect)==null?void 0:xa[1])==null?void 0:sl.replaceAll("[",""))==null?void 0:be.replaceAll("]","")]):la.value=(ga=(Va=ye.value)==null?void 0:Va.find(Ja=>(Ja==null?void 0:Ja.prop)===(la==null?void 0:la.prop)))==null?void 0:ga.value,la}),ye.value=Aa}}Q.value=v},An=async(f,v)=>{var M,$,q,B,ie;if((M=f==null?void 0:f.toString())!=null&&M.includes(".txt")||($=f==null?void 0:f.toString())!=null&&$.includes(".cpt")||(q=f==null?void 0:f.toString())!=null&&q.includes(".cyd")){const oe=await Xa.axios.get(f,{responseType:"blob",headers:{"Content-Type":"application/json"}}),K=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"});let ke=URL.createObjectURL(K);Me.value=[{name:(ie=f==null?void 0:f.split("/"))==null?void 0:ie[((B=f==null?void 0:f.split("/"))==null?void 0:B.length)-1],blobUrl:ke}],Ge.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&U("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{Sn.value=!1;let f=Ql.value;Ql.value=f+1});const Tn=e.reactive({prop:"",order:null}),Po=e.computed(()=>{const f=(Ce.value??[]).slice(),v=Tn.prop||ve.prop,M=Tn.order||ve.order;if(!v||!M)return f;const $=M==="ascending",q=ie=>{if(v)return ie&&Object.prototype.hasOwnProperty.call(ie,v)?ie[v]:v.includes(".")?v.split(".").reduce((oe,K)=>oe==null?oe:oe[K],ie):ie==null?void 0:ie[v]},B=ie=>{if(ie==null)return{ok:!1,value:NaN};if(typeof ie=="number")return{ok:Number.isFinite(ie),value:ie};const oe=String(ie).trim();if(oe==="")return{ok:!1,value:NaN};const K=oe.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(K))return{ok:!1,value:NaN};const ke=Number(K);return{ok:Number.isFinite(ke),value:ke}};return f.sort((ie,oe)=>{const K=q(ie),ke=q(oe);if(K==null&&ke==null)return 0;if(K==null)return $?-1:1;if(ke==null)return $?1:-1;const ge=B(K),Ye=B(ke);if(ge.ok&&Ye.ok)return $?ge.value-Ye.value:Ye.value-ge.value;const He=be=>{if(be==null)return{ok:!1,value:NaN};const Va=String(be).trim();if(Va==="")return{ok:!1,value:NaN};const ga=Va.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ga)return{ok:!1,value:NaN};const Ja=ga[1]?-1:1,Oa=Number(ga[2]),Ne=Number(ga[3]),ee=Number(ga[4]);return[Oa,Ne,ee].some(Pe=>Number.isNaN(Pe))?{ok:!1,value:NaN}:Ne>=60||ee>=60?{ok:!1,value:NaN}:{ok:!0,value:Ja*(Oa*3600+Ne*60+ee)}},aa=He(K),ba=He(ke);if(aa.ok&&ba.ok)return $?aa.value-ba.value:ba.value-aa.value;const Na=new Date(K).getTime(),Aa=new Date(ke).getTime(),la=!Number.isNaN(Na),tl=!Number.isNaN(Aa);if(la&&tl)return $?Na-Aa:Aa-Na;const xa=String(K),sl=String(ke);return $?xa.localeCompare(sl):sl.localeCompare(xa)})}),Ln=e.computed(()=>{var M;const f=(ue.currentPage-1)*ue.pageSize,v=f+ue.pageSize;return U("getSliceContLength",ue),(M=Po.value)==null?void 0:M.slice(f,v)}),jo=f=>{ue.currentPage=f,U("getSliceContLength",ue)},Ho=f=>{var $;ue.pageSize=f;const v=(($=Ce.value)==null?void 0:$.length)??0,M=f>0?Math.ceil(v/f):1;ue.currentPage>M&&(ue.currentPage=M||1,Xa.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),U("getSliceContLength",ue)},Uo=({prop:f,order:v})=>{Tn.prop=f,Tn.order=v,ue.currentPage=1};function lo(f){const v=[];function M($,q=""){$.forEach(B=>{B.children&&B.children.length>0?M(B.children,B.prop):v.push(B.prop)})}return M(f),v}const ro=(f,v)=>{var oe,K,ke,ge;let M=(K=(oe=W.value)==null?void 0:oe.map(Ye=>Ye==null?void 0:Ye.prop))==null?void 0:K.filter(Ye=>Ye!=="operate");((ke=W.value)==null?void 0:ke.some(Ye=>{var He;return((He=Ye==null?void 0:Ye.children)==null?void 0:He.length)>0}))&&(M=lo((ge=W.value)==null?void 0:ge.filter(Ye=>(Ye==null?void 0:Ye.prop)!=="operate")));let q;if(q=(f==null?void 0:f.length)===(M==null?void 0:M.length)?f:f.slice(0,M==null?void 0:M.length),!(q==null?void 0:q.every(Ye=>M==null?void 0:M.find(He=>Ye===He))))return Xa.ElMessage.error("导入的数据表头不匹配");Fn(q,v)},dn=(f,v)=>{var q;const M=f==null?void 0:f.filter(B=>B!=="序号"),$=v==null?void 0:v.map(B=>{const ie=Object.entries(B);return ie.shift(),Object.fromEntries(ie)});We.setRefreshCurStructure(!1),((q=W.value)==null?void 0:q.length)===0||ro(M,$)},qo=(f,v,M,$)=>{const q=[],B=[],ie=ke=>Object.keys(ke).length;for(const ke in f)if(f[ke]!==void 0){const ge=f[ke],Ye=[];for(const[He,aa]of Object.entries(ge))Ye.push(aa),B.length<ie(ge)&&B.push(He);q.push(Ye)}q.unshift(B);const oe=re.utils.aoa_to_sheet(q),K=re.utils.book_new();re.utils.book_append_sheet(K,oe,$),re.writeFileSync(K,`${v}.xlsx`),Nr.value=[]},no=async(f,v,M,$=!1,q)=>{try{We.setRefreshCurStructure(!1)}catch(B){Xa.ElMessage.error(B)}},Wo=async(f,v)=>{await no()},Go=async(f,v)=>{await no("columnType",v,f,!1)},Ko=async({newRow:f,targetIndex:v})=>{var q;if(!Ea(p.config,{type:va.TABLE}))return;const $=(ue.currentPage-1)*ue.pageSize+(v??0);f._isTemp=!0;try{(f.sort===void 0||f.sort===null||String(f.sort).trim()==="")&&(f.sort=ui($,Ce.value||[]))}catch{}Ce.value.splice($,0,f),await e.nextTick(),d.value.has(f.id)||d.value.set(f.id,z.cloneDeep(f)),Ce.value=(q=Ce.value)==null?void 0:q.map(B=>({...B,tableEditType:(B==null?void 0:B.id)===f.id?"edit":(B==null?void 0:B.tableEditType)??"text"})),o.value.add(f.id),rr.value=!0},Yo=(f,v,M,$=[])=>(!Array.isArray(v)||v.length===0||v.forEach(q=>{const B=q==null?void 0:q.prop;if(!B)return;let ie=f==null?void 0:f[B];if(ie==null||String(ie).trim()==="")return;ie=String(ie);const oe=new Set([...(Array.isArray(M)?M:[]).filter(ge=>(ge==null?void 0:ge.id)!==(f==null?void 0:f.id)).map(ge=>ge==null?void 0:ge[B]).filter(ge=>ge!=null).map(ge=>String(ge)),...(Array.isArray($)?$:[]).map(ge=>ge==null?void 0:ge[B]).filter(ge=>ge!=null).map(ge=>String(ge))]);if(!oe.has(ie))return;let K=1,ke="";for(;ke=`${ie}(${K})`,!!oe.has(ke);)K++;f[B]=ke}),f),Vi=async()=>{var q,B,ie,oe,K,ke,ge,Ye;const f=Array.from(o.value||[]);if(f.length===0)return;const v=(B=re.getColumnChild((q=z.cloneDeep(W.value))==null?void 0:q.filter(He=>(He==null?void 0:He.label)!=="操作")))==null?void 0:B.filter(He=>(He==null?void 0:He.required)===!0);if((v==null?void 0:v.length)>0)for(let He=0;He<f.length;He++){const aa=f[He],ba=(ie=Ce.value)==null?void 0:ie.find(Na=>(Na==null?void 0:Na.id)===aa);if(ba)for(let Na=0;Na<v.length;Na++){const Aa=v[Na],la=Aa==null?void 0:Aa.prop,tl=(Aa==null?void 0:Aa.label)??la,xa=ba==null?void 0:ba[la];if(xa===""||xa===null||xa===void 0||Array.isArray(xa)&&xa.length===0){Xa.ElMessage.error(`${tl}不能为空`);let be={};be.id=ba==null?void 0:ba.id;const Va={fixContent:[be],buttonName:"修改",relatedContents:p==null?void 0:p.related,name:p==null?void 0:p.compName,columns:W.value};U("change",Va);return}}}const M=[],$=[];if(f.forEach(He=>{var tl;const aa=(tl=Ce.value)==null?void 0:tl.find(xa=>(xa==null?void 0:xa.id)===He);if(!aa)return;if(aa!=null&&aa._isTemp){const sl=(re.getAllLeafNodes(W.value)||[]).filter(Ne=>(Ne==null?void 0:Ne.mainKey)===!0||(Ne==null?void 0:Ne.isMainKey)===!0),be=Ce.value.findIndex(Ne=>(Ne==null?void 0:Ne.id)===He),Va=be>=0?be+1:Ce.value.length+1;Yo(aa,sl,Ce.value,M);const ga={id:Va.toString()};(aa==null?void 0:aa.sort)!==void 0&&(aa==null?void 0:aa.sort)!==null&&String(aa.sort).trim()!==""?ga.sort=String(aa.sort):ga.sort=ui(be>=0?be:Ce.value.length-1,Ce.value||[]),(re.getAllLeafNodes(W.value)||[]).filter(Ne=>(Ne==null?void 0:Ne.type)!=="operate"&&(Ne==null?void 0:Ne.label)!=="操作"&&(Ne==null?void 0:Ne.prop)!=="operate").forEach(Ne=>{const ee=Ne==null?void 0:Ne.prop;if(ee){const Pe=aa[ee];Pe!==void 0?ga[ee]=Pe??"":ga[ee]=""}}),M.push(ga);return}const Na=(re.getAllLeafNodes(W.value)||[]).filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),Aa=new Set(Na.map(xa=>xa==null?void 0:xa.prop).filter(Boolean)),la={};for(const xa of Aa)Object.prototype.hasOwnProperty.call(aa,xa)&&(la[xa]=aa[xa]);$.push({id:aa.id,value:{tableData:la}})}),We.setTableLoading(p==null?void 0:p.index),$.length>0){const He=$.map(ba=>{const Na={id:ba.id,...ba.value.tableData};return delete Na._isOCRRow,delete Na._ocrTableId,delete Na._isTemp,delete Na.tableEditType,delete Na.index,Na}),aa=[{tableName:((oe=p==null?void 0:p.related)==null?void 0:oe.find(ba=>ba==null?void 0:ba.includes("content")))??"content_"+(p==null?void 0:p.index),tableContents:He}];try{await z.pageBatchUpdateApi({platId:parseInt((K=Nl.value)==null?void 0:K.plat_id),changeContents:aa})}catch(ba){Xa.ElMessage.error(((ge=(ke=ba==null?void 0:ba.response)==null?void 0:ke.data)==null?void 0:ge.message)||(ba==null?void 0:ba.message)||"保存失败"),We.setTableLoading(!1);return}}if(M.length>0){const He={fixContent:M,buttonName:"新增",relatedContents:p==null?void 0:p.related,name:p==null?void 0:p.compName,columns:W.value};U("change",He)}Xa.ElMessage.success("保存成功"),o.value.clear(),d.value.clear(),Ce.value=(Ye=Ce.value)==null?void 0:Ye.map(He=>({...He,tableEditType:"text"})),rr.value=!1,We.setRefreshCurStructure(!0)},Jo=()=>{var v;const f=Array.from(o.value||[]);if(f.length===0){rr.value=!1;return}f.forEach(M=>{var B,ie;const $=d.value.get(M),q=(B=Ce.value)==null?void 0:B.find(oe=>(oe==null?void 0:oe.id)===M);if(q!=null&&q._isTemp){Ce.value=Ce.value.filter(oe=>(oe==null?void 0:oe.id)!==q.id);return}if($){const oe=(ie=Ce.value)==null?void 0:ie.findIndex(K=>(K==null?void 0:K.id)===M);oe!==-1&&(Ce.value[oe]={...Ce.value[oe],...$})}}),o.value.clear(),d.value.clear(),Ce.value=(v=Ce.value)==null?void 0:v.map(M=>({...M,tableEditType:"text"})),rr.value=!1},ki=e.ref(!1),si=async f=>{var q,B,ie,oe;if(!rr.value||f!=null&&f.isComposing||(f==null?void 0:f.key)!=="Enter")return;const v=f==null?void 0:f.target;if(((B=(q=v==null?void 0:v.tagName)==null?void 0:q.toLowerCase)==null?void 0:B.call(q))==="textarea")return;const $=document.getElementById("excel-table");$&&!$.contains(v)||((ie=v==null?void 0:v.blur)==null||ie.call(v),(oe=f.preventDefault)==null||oe.call(f),await e.nextTick(),await Pn())},Pn=async()=>{if(le.value){rr.value=!1;return}if(!ki.value){ki.value=!0;try{Array.from(o.value||[]).length>0?await Vi():rr.value=!1}finally{Promise.resolve().then(()=>{ki.value=!1})}}},xi=f=>{Nr.value=f},Xo=(f,v)=>{Tr.value===v?gn.value=!1:gn.value=!0,Tr.value=v==null?void 0:v.changeProp},io=f=>{if(!f)return;const{item:v,value:M}=f,$=ye.value.find(q=>q.prop==v.prop);$&&$.contents.push({label:M,value:M})},Qn=e.computed(()=>{var M,$,q;const f=(M=W.value)==null?void 0:M.some(B=>B==null?void 0:B.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",f?"inline-block":"none"),(q=($=W.value)==null?void 0:$.filter(B=>(B==null?void 0:B.label)!=="操作"))==null?void 0:q.map(B=>({...B,filterable:!!(B!=null&&B.filterable),showSummary:!!(B!=null&&B.showSummary),operable:!!(B!=null&&B.operable),fixed:B==null?void 0:B.fixed}))}),Fi=async(f,v,M)=>{const $=z.cloneDeep(W.value);await e.nextTick();const q=$==null?void 0:$.map(ie=>(M==null?void 0:M.label)===(ie==null?void 0:ie.label)?{...ie,[v]:f}:ie),B=Wn(q);await Ns(p.index,B),W.value=q,Z.value=B},Wn=f=>{var q;const v=f||[];return((q=re.getAllLeafNodes(v)||[])==null?void 0:q.filter(B=>(B==null?void 0:B.prop)&&(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate")).map(B=>{const{prop:ie}=B;return G0(ie,B)})},Zo=async f=>{let v=await Y0(p.index);v||(v=Wn(f)),Z.value=v},Qo=async(f,v)=>{const M=z.cloneDeep(W.value),$=ie=>Array.isArray(ie)?ie.map(oe=>{const K=Array.isArray(oe==null?void 0:oe.children)&&oe.children.length>0,ke={...oe};return(ke==null?void 0:ke.prop)==="operate"||(ke==null?void 0:ke.label)==="操作"||(ke==null?void 0:ke.type)==="operate"?(ke.sortable=!1,ke.filterable=!1,ke.operable=!1):ke.sortable=K?!1:!!f,K&&(ke.children=$(ke.children)),ke}):ie,q=$(M),B=Wn(q);await Ns(p.index,B),W.value=q,Z.value=B,await e.nextTick(),Ql.value=Ql.value+1},et=()=>{Qe.value=!1},at=f=>{U("clickTrigger",f)},oo=async f=>{var B,ie,oe,K,ke,ge,Ye,He,aa,ba,Na,Aa,la,tl,xa;const v=f==null?void 0:f.row,M=f==null?void 0:f.rowData,$=f==null?void 0:f.suffix;if((B=v==null?void 0:v.toString())!=null&&B.includes(".urdf")||f!=null&&f.isUrdf||$!=null&&$.includes(".urdf")){if(v.includes(",")){Xa.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(G(v)){const be={files:[Ue(v)],data:{}};_e(be);return}Be.value=[{url:v,extension:we(v)}],A.value=!0,se.value={data:z.cloneDeep(M)},te.value=!0;return}let q=[];if((ie=v==null?void 0:v.toString())!=null&&ie.includes(".stl")||(oe=v==null?void 0:v.toString())!=null&&oe.includes(".STL")||(K=v==null?void 0:v.toString())!=null&&K.includes(".obj")||(ke=v==null?void 0:v.toString())!=null&&ke.includes(".mtl")){const sl=(ge=v==null?void 0:v.toString())==null?void 0:ge.split(","),be=ra(sl),Va=be==null?void 0:be[0];if(G(Va==null?void 0:Va.extension)){_e({files:be,data:{}});return}Be.value=be,A.value=!1,te.value=!0;return}if((Ye=v==null?void 0:v.toString())!=null&&Ye.includes(".stl")||(He=v==null?void 0:v.toString())!=null&&He.includes(".STL")||(aa=v==null?void 0:v.toString())!=null&&aa.includes(".obj")||(ba=v==null?void 0:v.toString())!=null&&ba.includes(".mtl")||$!=null&&$.includes(".stl")||$!=null&&$.includes(".STL")||$!=null&&$.includes(".obj")||$!=null&&$.includes(".mtl")){let sl,be=[],Va={};if(Array.isArray(v)?sl=v:sl=v==null?void 0:v.split(","),sl==null||sl.forEach(ga=>{ga.includes(".mtl")?be.push(ga):Va.blob=Va.blob?Va.blob+","+ga:ga}),(be==null?void 0:be.length)>0&&(Va.mtlBlobs=be),$&&(Va.suffix=$),(Aa=(Na=Object.values(Va))==null?void 0:Na[0])!=null&&Aa.includes("http:"))q.push(Va);else{const ga=new Blob([Va.blob],{type:"application/octet-stream;charset=UTF-8"});let Ja=URL.createObjectURL(ga),Oa="";(la=v==null?void 0:v.split("/"))==null||la.forEach((Ne,ee)=>{var Pe;ee===((Pe=v==null?void 0:v.split("/"))==null?void 0:Pe.length)-1&&(Oa=Ne)}),(tl=Va.blob)!=null&&tl.includes(".stl")&&(Oa=(Oa==null?void 0:Oa.replaceAll(">",""))+".urdf"),Me.value=[{name:Oa,blobUrl:Ja}],Ge.value=!0}}else{const sl=await Xa.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),be=new Blob([sl.data],{type:"application/octet-stream;charset=UTF-8"});let Va=URL.createObjectURL(be),ga="";if((xa=v==null?void 0:v.split("/"))==null||xa.forEach((Ja,Oa)=>{var Ne;Oa===((Ne=v==null?void 0:v.split("/"))==null?void 0:Ne.length)-1&&(ga=Ja)}),G(ga)){const Ja=fe(ga),Oa=Ue(v);_e({files:[Oa],data:{trackFileType:Ja}});return}Me.value=[{name:ga,blobUrl:Va}],Ge.value=!0}(q==null?void 0:q.length)>0&&n.setBlobUrls(q)},ci=f=>{var $,q,B,ie;if(f!=null&&f.downloadUrl)return f==null?void 0:f.name;const v=(ie=($=f==null?void 0:f.url)==null?void 0:$.split("."))==null?void 0:ie[((B=(q=f==null?void 0:f.url)==null?void 0:q.split("."))==null?void 0:B.length)-1];return(f==null?void 0:f.name)+"."+v},wi=f=>{if(!f)return"未知文件";try{const $=ci(f);if(typeof $=="string"&&$.includes("."))return $}catch{}const v=(f==null?void 0:f.fileName)||(f==null?void 0:f.name)||"未知文件",M=(f==null?void 0:f.suffix)||"";return v.includes(".")?v:`${v}${M}`},to=f=>{if(f==null||typeof f=="number"||typeof f!="string")return f;const v=f.match(/^(\d+)\_(\d+)$/);if(!v)return f;const M=Number(v[1]),$=Number(v[2]);return!Number.isFinite(M)||!Number.isFinite($)?f:String(M*1e3+$)},jn=f=>{if(f==null)return null;const v=String(f).trim();if(!v)return null;const M=Number(v);return Number.isFinite(M)?M:null},lt=f=>{if(f==null)return null;const v=String(f).trim();if(!v)return null;if(/^\d+$/.test(v)){const q=Number(v);return Number.isFinite(q)?v.length<=10?q*1e3:q:null}const M=v.includes("T")?v:v.replace(" ","T"),$=Date.parse(M);return Number.isFinite($)?$:null},_i=(f,v=[])=>{const M=Array.isArray(f)?f.slice():[];if(M.length<=1)return M;const $=new Map((v||[]).map((ie,oe)=>[String(ie),oe])),q=M.some(ie=>jn(ie==null?void 0:ie.sort)!==null),B=M.map((ie,oe)=>({r:ie,idx:oe,id:String((ie==null?void 0:ie.id)??""),sortVal:jn(ie==null?void 0:ie.sort),createTimeMs:lt(ie==null?void 0:ie.create_time),prevIdx:$.has(String(ie==null?void 0:ie.id))?$.get(String(ie==null?void 0:ie.id)):Number.POSITIVE_INFINITY}));return B.sort((ie,oe)=>{if(q){const ge=ie.sortVal,Ye=oe.sortVal;if(ge===null&&Ye!==null)return 1;if(ge!==null&&Ye===null)return-1;if(ge!==null&&Ye!==null&&ge!==Ye)return ge-Ye}const K=ie.createTimeMs,ke=oe.createTimeMs;return K!==null&&ke!==null&&K!==ke?ke-K:K!==null&&ke===null?-1:K===null&&ke!==null?1:ie.prevIdx!==oe.prevIdx?ie.prevIdx-oe.prevIdx:ie.idx-oe.idx}),B.map(ie=>ie.r)},ui=(f,v=[])=>{const M=v==null?void 0:v[f-1],$=v==null?void 0:v[f],q=jn(M==null?void 0:M.sort),B=jn($==null?void 0:$.sort);let ie=null;q!==null&&B!==null&&B>q?ie=(q+B)/2:q!==null?ie=q+1:B!==null?ie=Math.max(B-1,0):ie=(f??0)+1;const oe=Number(ie.toFixed(6));return String(Number.isFinite(oe)?oe:ie)},rt=async f=>{let v=null,M=null;if(f!=null&&f.id){const q=z.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const B=await z.platformDownloadFile(f);v=URL.createObjectURL(B.data),M=wi(f)}finally{q.close()}}else if(f!=null&&f.downloadUrl){const q=await Si(),B=z.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ie=await Xa.axios.post(f==null?void 0:f.url,null,{responseType:"blob",headers:{Authorization:q,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{B.close()}),oe=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(oe),M=f==null?void 0:f.name}else{const q=await z.platformDownloadFile({url:f==null?void 0:f.url});!f.url.toUpperCase().includes(".OBJ")&&!f.url.toUpperCase().includes(".STL")&&!f.url.toUpperCase().includes(".MTL")&&!f.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(q.data),M=ci(f)):v=f==null?void 0:f.url}if(G(v)){const q={row:`${v}`,suffix:we(M)};oo(q);return}const $={name:M,blobUrl:v};Me.value=[$],Ge.value=!0},so=async f=>{let v=null,M=null;if(f!=null&&f.id){const B=await z.platformDownloadFile(f);v=URL.createObjectURL(B.data),M=wi(f)}else if(f!=null&&f.downloadUrl){const B=await Si(),ie=await Xa.axios.post(f==null?void 0:f.url,null,{responseType:"blob",headers:{Authorization:B,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),oe=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(oe),M=f==null?void 0:f.name}else{const B=await z.platformDownloadFile({url:f==null?void 0:f.url});v=URL.createObjectURL(B.data),M=ci(f)}const $={name:M,blobUrl:v},q=document.createElement("a");q.href=$.blobUrl,q.download=$.name,q.style.display="none",document.body.appendChild(q),q.click(),setTimeout(()=>{document.body.removeChild(q)},100)},di=(f,v)=>{var $;if(Object.values(v).length===0)return;let M=f;return Object.values(v).find(q=>{var B,ie,oe;return((B=q==null?void 0:q.toString())==null?void 0:B.includes(".txt"))||((ie=q==null?void 0:q.toString())==null?void 0:ie.includes(".cpt"))||((oe=q==null?void 0:q.toString())==null?void 0:oe.includes(".obj"))})?M=[...f,$e.value]:($=p==null?void 0:p.config)!=null&&$.allowMove&&(M=[...f,{label:"迁移"}]),M},Hn=()=>{L.value=!0},co=e.ref([]),Pi=async(f,v,M=!1)=>{var ie,oe,K,ke;if(!f)return;if(M){Ce.value=[...Da.value.values()].filter(ge=>Object.values(ge).some(Ye=>typeof Ye=="string"?Ye==null?void 0:Ye.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let $={};for(let ge in f)(f==null?void 0:f[ge])!==""&&($[ge]=f==null?void 0:f[ge]);if(JSON.stringify($)==="{}"){Ce.value=Array.from(((ie=Da.value)==null?void 0:ie.values())??[]);return}let q=(oe=p==null?void 0:p.related)==null?void 0:oe.find(ge=>ge==null?void 0:ge.includes("content_")),B=await z.getFillFind({platId:parseInt((K=Nl==null?void 0:Nl.value)==null?void 0:K.plat_id),tableName:q,params:$});B=(ke=B==null?void 0:B.data)==null?void 0:ke.result,Ce.value=B,We.setTableLoading(!1)},nt=e.computed(()=>{var v,M;return((M=(v=p==null?void 0:p.itemData)==null?void 0:v.find($=>($==null?void 0:$.key)==="isEdit"))==null?void 0:M.contents)??!0}),it=async f=>{var q,B,ie,oe,K,ke;if(!Ea(p.config,{type:va.TABLE})||!(((B=(q=p==null?void 0:p.itemData)==null?void 0:q.find(ge=>(ge==null?void 0:ge.key)==="isEdit"))==null?void 0:B.contents)??!0))return;let M=(oe=(ie=u.value)==null?void 0:ie.find(ge=>{var Ye;return(Ye=ge==null?void 0:ge.key)==null?void 0:Ye.includes("@EditRead")}))==null?void 0:oe.content;if((M==null?void 0:M.length)>0){let ge=Ts(M,f);if((ge==null?void 0:ge.length)>0)return}if(!f)return;((K=Array.from(o.value))==null?void 0:K.length)>0&&await Vi();const $=f==null?void 0:f.id;$!=null&&(o.value.clear(),d.value.clear(),d.value.has($)||d.value.set($,z.cloneDeep(f)),Ce.value=(ke=Ce.value)==null?void 0:ke.map(ge=>({...ge,tableEditType:(ge==null?void 0:ge.id)===$?"edit":"text"})),o.value.add($),rr.value=!0)},uo=async(f,v,M,$)=>{$!=null&&$.isExistChild&&U("clickMainKey",f,M,W.value)},ot=()=>{Ge.value=!1},tt=f=>{U("rowClick",f)};e.watch(()=>p.changedContent,()=>{var M,$;if(!p.changedContent)return;let f=(M=Ce.value)==null?void 0:M.map(q=>{var B;return q.id===((B=p.changedContent)==null?void 0:B.id)&&(q={...p.changedContent,id:p.changedContent.newId?p.changedContent.newId:p.changedContent.id},delete q.newId),q});const v=($=p.itemData)==null?void 0:$.map(q=>((q==null?void 0:q.key)==="tableContents"&&(q.contents=f),q));Ce.value=f,U("contentChange",{contents:v,index:p.index}),U("change",{content:f,index:p==null?void 0:p.index,buttonName:"",id:p==null?void 0:p.index})},{deep:!0,immediate:!0});const st=()=>{},ct=async()=>{const f=de.value,v=sessionStorage.getItem("systemKey"),M=await re.getItemData(f,v,""),$=(M==null?void 0:M.find(oe=>(oe==null?void 0:oe.name)==="方法明细"))||(M==null?void 0:M[0]),q=($==null?void 0:$.compData)||[],B=q==null?void 0:q.find(oe=>{const K=oe==null?void 0:oe.key;return K==="formContent"||K==="tableContents"});return B==null?void 0:B.contents},Si=async()=>{const v=Xa.Local.get("access-token");return v?`Bearer ${v}`:""},ut=async(f,{token:v,inputData:M}={})=>await Xa.axios.post(f,M,{headers:{Authorization:v}}).catch(q=>(Le.setImportLoading(!1),Promise.reject(q))),dt=f=>{var $;let v={};const M=[];return v.form={},($=z.cloneDeep(f))==null||$.forEach((q,B)=>{var ie,oe,K,ke,ge,Ye,He,aa,ba,Na,Aa,la,tl,xa;if((q==null?void 0:q.comp)==="Table"){(oe=(ie=q==null?void 0:q.compData)==null?void 0:ie.find(ga=>(ga==null?void 0:ga.key)==="header"))==null||oe.contents;let sl=(ge=(ke=(K=q==null?void 0:q.compData)==null?void 0:K.find(ga=>(ga==null?void 0:ga.key)==="tableContents"))==null?void 0:ke.contents)==null?void 0:ge.map(ga=>ga.slice(1));(Na=(ba=(aa=(He=(Ye=q==null?void 0:q.compData)==null?void 0:Ye.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:He.contents)==null?void 0:aa[0])==null?void 0:ba[0])==null||Na.label;let be=(la=(Aa=q==null?void 0:q.compData)==null?void 0:Aa.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:la.contents,Va=[];sl==null||sl.forEach(ga=>{let Ja=[];ga==null||ga.forEach((Oa,Ne)=>{var Pe;let ee={};((Pe=be[Ne])==null?void 0:Pe.label)!=="操作"&&(ee[be[Ne].label]=Oa,Ja.push(ee))}),Va.push(Ja)}),v[q.name]=Va}else{const sl=(xa=(tl=q.compData)==null?void 0:tl.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:xa.contents;sl==null||sl.forEach(be=>{var Va,ga;if(be.prop!==""){let Ja=be==null?void 0:be.value;Array.isArray(Ja)?Ja=((Va=Ja==null?void 0:Ja[0])==null?void 0:Va.oldUrl)||"http://222.92.178.198:62001/"+((ga=Ja==null?void 0:Ja[0])==null?void 0:ga.url):Ja=Ja.toString(),be={key:(be==null?void 0:be.prop)??(be==null?void 0:be.label),value:Ja},M.push(be)}})}}),v.form=re.getFormContents(M),v},s=f=>{const v=[],M=$=>{$&&typeof $=="object"&&!Array.isArray($)?Object.values($).forEach(M):v.push($)};return M(f),v},t=async(f,v,M)=>{var be,Va,ga,Ja,Oa,Ne,ee,Pe,pa,N,za,qa,cl,Ka,Ca,fl,Yl;Le.setImportLoading(!0),We.setFreshContent(!1);let $=await ct().catch(Wa=>(Le.setImportLoading(!1),Promise.reject(Wa)));$=$==null?void 0:$.filter(Wa=>{var Tl;return((Tl=Wa==null?void 0:Wa.find(Ra=>Ra==null?void 0:Ra.id))==null?void 0:Tl.id)===(v==null?void 0:v.id)});let q=re.getEqualChild([(be=W.value)==null?void 0:be.filter(Wa=>(Wa==null?void 0:Wa.label)!=="操作")]);const B=(ga=(Va=re.tableToForm($,q))==null?void 0:Va[0])==null?void 0:ga.find(Wa=>{const Tl=Wa==null?void 0:Wa.key;return Tl==="Interface"||Tl==="方法体"}),ie=B==null?void 0:B.value;if(!ie){console.log("未搜索到isMain, 缺少算法执行接口"),Le.setImportLoading(!1);return}const oe=W.value?re.getEqualChild([W.value]):[],K=oe.find(Wa=>{const Tl=Wa==null?void 0:Wa.prop;return Tl==="Input1"||Tl==="输入数据.输入1"||Tl==="样本输入数据"}),ke=K==null?void 0:K.prop;let ge=v==null?void 0:v[ke];const Ye=await Si().catch(Wa=>(Le.setImportLoading(!1),Promise.reject(Wa)));let He=!0,aa="";(Ja=W.value)==null||Ja.forEach(Wa=>{(Wa==null?void 0:Wa.prop)===ke&&(He=!!(Wa!=null&&Wa.childPath),aa=Wa==null?void 0:Wa.childPath)});let ba="";if(He){let Wa=(Ne=(Oa=W.value)==null?void 0:Oa.find(ml=>(ml==null?void 0:ml.isMainKey)===!0))==null?void 0:Ne.prop;ba=v==null?void 0:v[Wa];let Tl=aa==null?void 0:aa.split(I),Ra=[];Tl==null||Tl.forEach((ml,zl)=>{(Tl==null?void 0:Tl.length)-1===zl&&Ra.push(ba),Ra.push(ml)}),Ra=Ra==null?void 0:Ra[0];let Ol=await re.getItemData(Ra,sessionStorage.getItem("systemKey"),""),il=Ol==null?void 0:Ol.filter(ml=>(ml==null?void 0:ml.name)===ke);il=il==null?void 0:il.map(ml=>{var zl;return ml.compData=(zl=ml==null?void 0:ml.compData)==null?void 0:zl.map(xl=>{var Cr;return(xl==null?void 0:xl.key)==="tableContents"&&(xl.contents=(Cr=xl==null?void 0:xl.contents)==null?void 0:Cr.filter(vr=>(vr==null?void 0:vr[1])===(v==null?void 0:v[ke]))),xl}),ml}),(!il||(il==null?void 0:il.length)===0)&&(il=Ol,il=il==null?void 0:il.map(ml=>{var zl;return ml.compData=(zl=ml==null?void 0:ml.compData)==null?void 0:zl.map(xl=>{var Cr;return(xl==null?void 0:xl.key)==="tableContents"&&(xl.contents=(Cr=xl==null?void 0:xl.contents)==null?void 0:Cr.filter(vr=>{var ur,_l;return(vr==null?void 0:vr[1])===(v==null?void 0:v[(_l=(ur=W==null?void 0:W.value)==null?void 0:ur[0])==null?void 0:_l.prop])})),xl}),ml})),ge=dt(il)}const Na=await ut(ie,{token:Ye,inputData:ge}).catch(Wa=>(Le.setImportLoading(!1),Promise.reject(Wa))),Aa=(ee=Na==null?void 0:Na.data)==null?void 0:ee.data,la=oe.find(Wa=>(Wa==null?void 0:Wa.prop)==="Output1"),tl=la==null?void 0:la.prop;let xa=[],sl=[];if(Aa&&((Pe=Object.values(Aa))==null?void 0:Pe.length)>0){let Wa=[];const Tl=new FormData,Ra=(pa=s(Aa))==null?void 0:pa.map(async il=>{var ml,zl;if(!Array.isArray(il)&&(il!=null&&il.includes("http"))){let xl=await Xa.axios.get(il,{responseType:"blob"}),Cr=(zl=il==null?void 0:il.split("/"))==null?void 0:zl[((ml=il==null?void 0:il.split("/"))==null?void 0:ml.length)-1];Tl.append("files",xl.data,Cr)}else Wa.push(il)});if(await Promise.all(Ra),!re.isFormDataEmpty(Tl)){let il=await ul.uploadAmountApi(Tl),ml=(za=(N=il==null?void 0:il.data)==null?void 0:N.result)==null?void 0:za.map(zl=>{var xl,Cr,vr,ur,_l,ir;return{name:(ir=(_l=(ur=(xl=zl==null?void 0:zl.url)==null?void 0:xl.split("/"))==null?void 0:ur[((vr=(Cr=zl==null?void 0:zl.url)==null?void 0:Cr.split("/"))==null?void 0:vr.length)-1])==null?void 0:_l.split("."))==null?void 0:ir[0],url:zl==null?void 0:zl.url}});Wa=[...Wa,...ml]}let Ol={};for(let il in v)il!=="id"&&(Ol[il]=v[il]);Ol[tl]=Wa,sl.push({id:v==null?void 0:v.id,value:{tableData:Ol}})}if((sl==null?void 0:sl.length)>0){const Wa=sl.map(Ra=>{const Ol={id:Ra.id,...Ra.value.tableData};return delete Ol._isOCRRow,delete Ol._ocrTableId,delete Ol._isTemp,delete Ol.tableEditType,delete Ol.index,Ol}),Tl=[{tableName:(qa=p==null?void 0:p.related)==null?void 0:qa.find(Ra=>Ra==null?void 0:Ra.includes("content")),tableContents:Wa}];await z.pageBatchUpdateApi({platId:parseInt((cl=Nl.value)==null?void 0:cl.plat_id),changeContents:Tl})}if((xa==null?void 0:xa.length)>0)try{await z.pageBatchAddApi({platId:parseInt((Ka=Nl.value)==null?void 0:Ka.plat_id),changeContents:[{tableName:(Ca=p==null?void 0:p.related)==null?void 0:Ca.find(Wa=>Wa==null?void 0:Wa.includes("content")),tableContents:xa.map(Wa=>{var Ra,Ol,il;const Tl={id:((Ra=Wa==null?void 0:Wa.key)==null?void 0:Ra.id)??((Ol=Wa==null?void 0:Wa.key)==null?void 0:Ol.rowId)??(Wa==null?void 0:Wa.id),...((il=Wa==null?void 0:Wa.value)==null?void 0:il.tableData)||{}};return delete Tl._isOCRRow,delete Tl._ocrTableId,delete Tl._isTemp,delete Tl.tableEditType,delete Tl.index,Object.keys(Tl).forEach(ml=>{ml==="证书附件"&&Array.isArray(Tl[ml])&&(Tl[ml]=JSON.stringify(Tl[ml]))}),Tl})}]})}catch(Wa){Xa.ElMessage.error(((Yl=(fl=Wa==null?void 0:Wa.response)==null?void 0:fl.data)==null?void 0:Yl.message)||(Wa==null?void 0:Wa.message)||"保存失败"),We.setTableLoading(!1);return}Ui(!0),Le.setImportLoading(!1),We.setFreshContent(!0)},h=(f,v)=>(f=f==null?void 0:f.map(M=>{var $,q;return M!=null&&M.children&&(($=M.children)!=null&&$.find(B=>B.id===(v==null?void 0:v.id))?M.children=(q=M.children)==null?void 0:q.filter(B=>(B==null?void 0:B.id)!==(v==null?void 0:v.id)):M.children=h(M.children,v)),M}),f),w=e.ref(!1),T=()=>{w.value=!0},j=async f=>{var M,$,q,B;w.value=!1;const v=Array.isArray(f)?f:f?[f]:[];if(v.length!==0)for(const ie of v){const oe={name:ie.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(ie),raw:ie,uid:Date.now()+Math.random()};ya.value.push(oe),yn(oe,"uploading"),Qr(oe,0);try{const K=new FormData;K.append("file",ie,oe.name);const ke=await z.platformUploadFile(K);oe.uploadResult=((M=ke==null?void 0:ke.data)==null?void 0:M.result)||{name:oe.name,url:"",fileName:oe.name},ll({name:(($=oe.uploadResult)==null?void 0:$.name)||oe.name,url:((q=oe.uploadResult)==null?void 0:q.url)||"",id:(B=oe.uploadResult)==null?void 0:B.id}),yn(oe,"uploaded"),Qr(oe,100)}catch(K){console.error("文件上传失败:",K),Xa.ElMessage.error(`文件 ${oe.name} 上传失败,请重试`),yn(oe,"pending"),Qr(oe,0);const ke=ya.value.findIndex(ge=>ge.uid===oe.uid);ke>-1&&ya.value.splice(ke,1)}}},Y=e.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:p==null?void 0:p.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(f,v,M)=>{v===(p==null?void 0:p.index)?M(new Error("选择源不能和目标源一致")):M()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),J=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:""}),xe=()=>{J.show=!1},je=async f=>{var v,M,$,q,B,ie,oe,K;try{const ke=[];let ge=(v=Ce.value||[])==null?void 0:v.slice();(f||[]).forEach(Na=>{const Aa={...Na};try{Aa.sort=ui(0,ge)}catch{}ke.push(Aa),ge.unshift(Aa)});let Ye=await z.quoteApi({platId:parseInt((M=Nl==null?void 0:Nl.value)==null?void 0:M.plat_id),type:"fatherSyncs",related:[{menus:de.value,groups:""},{menus:de.value,groups:p==null?void 0:p.compName}]});Ye=($=Ye==null?void 0:Ye.data)==null?void 0:$.result;let He=Ye==null?void 0:Ye.map(Na=>({tableName:"content_"+(Na==null?void 0:Na.id),tableContents:ke==null?void 0:ke.map((Aa,la)=>({id:la,...Aa}))})),aa=[{tableName:(q=p==null?void 0:p.related)==null?void 0:q.find(Na=>Na==null?void 0:Na.includes("content")),tableContents:ke==null?void 0:ke.map((Na,Aa)=>({id:Aa,...Na}))}];aa=[...aa,...He];const ba=await z.pageBatchAddApi({platId:parseInt((B=Nl.value)==null?void 0:B.plat_id),changeContents:aa});if(((ie=ba==null?void 0:ba.data)==null?void 0:ie.code)===200){const Na={buttonName:"新增",columns:W.value,fixContent:ke==null?void 0:ke.map((la,tl)=>({id:tl,...la})),relatedContents:p==null?void 0:p.related};await Mt(Na),Xa.ElMessage.success("数据导入成功");let Aa=[];aa==null||aa.forEach(la=>{var tl;(tl=la==null?void 0:la.tableContents)==null||tl.forEach(xa=>{Aa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(xa),request_result:"{}",is_delete:!1,request_table:la==null?void 0:la.tableName,request_type:"export"})})}),await z.pageBatchAddApi({platId:parseInt((oe=Nl==null?void 0:Nl.value)==null?void 0:oe.plat_id),changeContents:[{tableName:"log",tableContents:Aa}]})}else{let Na=[];aa==null||aa.forEach(Aa=>{var la;(la=Aa==null?void 0:Aa.tableContents)==null||la.forEach(tl=>{Na.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(tl),request_result:"{}",is_delete:!1,request_table:Aa==null?void 0:Aa.tableName,request_type:"error"})})}),await z.pageBatchAddApi({platId:parseInt((K=Nl==null?void 0:Nl.value)==null?void 0:K.plat_id),changeContents:[{tableName:"log",tableContents:Na}]}),Xa.ElMessage.error("数据导入响应失败")}}catch(ke){throw new Error(ke)}},Se=async f=>{var v,M,$,q,B,ie,oe,K,ke,ge;try{if(f==="cancel"&&(J.show=!1),f==="replace"&&((v=J==null?void 0:J.existRows)==null?void 0:v.length)>0){await z.pageBatchDeleteApi({platId:parseInt((M=Nl.value)==null?void 0:M.plat_id),changeContents:[{tableName:(($=p==null?void 0:p.related)==null?void 0:$.find(He=>He==null?void 0:He.includes("content_")))||((q=p==null?void 0:p.related)==null?void 0:q.find(He=>He==null?void 0:He.includes("content"))),tableContents:J==null?void 0:J.existRows}]});const Ye=await z.pageBatchAddApi({platId:parseInt((B=Nl.value)==null?void 0:B.plat_id),changeContents:[{tableName:(ie=p==null?void 0:p.related)==null?void 0:ie.find(He=>He==null?void 0:He.includes("content")),tableContents:(()=>{const He=(Ce.value||[]).filter(Aa=>!((J==null?void 0:J.existRows)||[]).some(la=>String(la==null?void 0:la.id)===String(Aa==null?void 0:Aa.id))),aa=(J==null?void 0:J.tableData)||[],ba=[];let Na=He.slice();return aa.forEach(Aa=>{const la={...Aa};try{la.sort=ui(0,Na)}catch{}ba.push(la),Na.unshift(la)}),ba.map((Aa,la)=>({id:la,...Aa}))})()}]});if(((oe=Ye==null?void 0:Ye.data)==null?void 0:oe.code)!==200)return;(K=J.newRows)!=null&&K.length&&await je(J.newRows),await Mt({buttonName:"新增",columns:W.value,fixContent:(ke=J==null?void 0:J.tableData)==null?void 0:ke.map((He,aa)=>({id:aa,...He})),relatedContents:p==null?void 0:p.related}),(ge=J.newRows)!=null&&ge.length||Xa.ElMessage.success("数据导入成功")}}catch(Ye){throw new Error(Ye)}finally{J.show=!1,J.columns=[],J.tableData=[],J.existRows=[]}},ca=()=>{Y.show=!1},Ia=f=>{var v,M;if((f==null?void 0:f.buttonName)==="取消")return Y.show=!1;Y.to=f==null?void 0:f.content,!(!(p!=null&&p.index)||!((v=Y.to)!=null&&v.groupName))&&(p==null?void 0:p.index)!==((M=Y.to)==null?void 0:M.groupName)&&(U("change",{buttonName:"迁移",value:{from:Y.from,to:Y.to,data:Y.selectRow}}),Y.show=!1)},nl=async f=>{var v,M,$,q;if(f){if(!zr.validateFileSize(f.raw)){Xa.ElMessage.warning(`文件大小不能超过 ${Re.value.maxSize}MB`);const B=ya.value.findIndex(ie=>ie.uid===f.uid);B>-1&&ya.value.splice(B,1),al();return}if(!zr.validateFileType(f.raw)){Xa.ElMessage.warning("请上传图片文件");const B=ya.value.findIndex(ie=>ie.uid===f.uid);B>-1&&ya.value.splice(B,1),al();return}yn(f,"uploading"),Qr(f,0);try{const B=new FormData;B.append("file",f.raw,f.name);const ie=await z.platformUploadFile(B);f.uploadResult=((v=ie==null?void 0:ie.data)==null?void 0:v.result)||{name:f.name,url:"",fileName:f.name},ll({name:((M=f.uploadResult)==null?void 0:M.name)||f.name,url:(($=f.uploadResult)==null?void 0:$.url)||"",id:(q=f.uploadResult)==null?void 0:q.id}),yn(f,"uploaded"),Qr(f,100)}catch(B){console.error("文件上传失败:",B),Xa.ElMessage.error(`文件 ${f.name} 上传失败,请重试`),yn(f,"pending"),Qr(f,0);const ie=ya.value.findIndex(oe=>oe.uid===f.uid);ie>-1&&ya.value.splice(ie,1)}finally{al()}}},al=()=>{e.nextTick(()=>{const f=document.querySelector('.ocr-upload-input input[type="file"]');f&&(f.value="")})},dl=async()=>{var M,$;if(sessionStorage.setItem("ocr_root_table_id",String((p==null?void 0:p.index)??"")),ya.value.length===0){Xa.ElMessage.warning("请先选择要上传的图片");return}if(ya.value.filter(q=>{const B=nr(q);return B!=="uploaded"&&B!=="completed"&&B!=="failed"}).length>0){Xa.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}pr.value=!0,Te.value=0;let v=null;try{ya.value.forEach(la=>{yn(la,"processing")});const q=Math.floor(Math.random()*10)+90;v=setInterval(()=>{Te.value<q?Te.value+=1:clearInterval(v)},50);const B=ya.value.map(la=>{var tl,xa,sl;return{name:((tl=la.uploadResult)==null?void 0:tl.name)||la.name,url:((xa=la.uploadResult)==null?void 0:xa.url)||"",fileName:((sl=la.uploadResult)==null?void 0:sl.fileName)||la.name}}),ie=zr.extractTableHeaders(W.value),oe=B.map(la=>({name:(la==null?void 0:la.fileName)||(la==null?void 0:la.name),url:(la==null?void 0:la.url)||""})),K=await zr.recognize(oe,ie);if(console.log(K,"ocrResult"),clearInterval(v),v=null,(K==null?void 0:K.code)===500||(K==null?void 0:K.type)==="error"||!(K!=null&&K.result)){Te.value=0,ya.value.forEach(la=>{yn(la,"failed"),Qr(la,0)}),Xa.ElMessage.error((K==null?void 0:K.message)||"OCR识别失败,请重试"),pr.value=!1;return}Te.value=q;const ke=Array.isArray(K==null?void 0:K.result)?K.result:[];if(ke.length===0){Te.value=0,ya.value.forEach(la=>{yn(la,"failed"),Qr(la,0)}),Xa.ElMessage.warning("OCR识别未返回有效数据"),pr.value=!1;return}const ge=new Set,Ye=[];ke.forEach((la,tl)=>{const xa=la!=null&&la.数据&&typeof(la==null?void 0:la.数据)=="object"?la.数据:{},sl=Array.isArray(la==null?void 0:la.图片信息)?la.图片信息:[],be=new Map;sl.forEach(ga=>{ga!=null&&ga.name&&be.set(ga.name,ga.url||"")});const Va={_index:tl,_certType:(la==null?void 0:la.证书类型)||"",_certNo:(la==null?void 0:la.证书编号)||"",_ocrImages:sl,__ocrFieldMeta:{}};Object.entries(xa).forEach(([ga,Ja])=>{let Oa="",Ne=0,ee=[],Pe="";Ja&&typeof Ja=="object"&&!Array.isArray(Ja)?(Oa=(Ja==null?void 0:Ja.value)??"",Ne=(Ja==null?void 0:Ja.score)??0,ee=Array.isArray(Ja==null?void 0:Ja.bboxNorm)?Ja==null?void 0:Ja.bboxNorm:[],Pe=(Ja==null?void 0:Ja.imageName)||""):Array.isArray(Ja)&&Ja.length>=2?(Oa=Ja[0]??"",Ne=Ja[1]??0):(Oa=Ja??"",Ne=0),Va[ga]=Oa,Va[`${ga}_accuracy`]=Ne,ge.add(ga),Va.__ocrFieldMeta[ga]={value:Oa,score:Ne,bboxNorm:ee,imageName:Pe,imageUrl:Pe&&be.get(Pe)||"",images:sl}}),Ye.push(Va)});const He=[],aa=new Set;Ye.forEach(la=>{la&&ge.forEach(tl=>{const xa=la[`${tl}_accuracy`];(typeof xa=="number"?xa>0:xa!=null&&String(xa).trim()!==""&&String(xa)!=="0")&&aa.add(tl)})}),ge.forEach(la=>{He.push({prop:la,label:la,editable:!0,minWidth:230}),aa.has(la)&&He.push({prop:`${la}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),ya.value.forEach(la=>{yn(la,"completed")}),Te.value=100,pe.value=He,Ya.value=Ye,pl.value=B,Il.value=K;const ba=["出厂编号","设备名称","制造厂"],Na=He.filter(la=>la&&!la.isAccuracy&&typeof la.prop=="string").map(la=>la.prop),Aa=["出厂编号","设备名称","制造厂"];Qa.value=Na.filter(la=>Aa.includes(la)),console.log("[OCR] 默认勾选字段 props:",Qa.value),Ua.value=2,pr.value=!1,oa.value=!1}catch(q){console.error("OCR处理失败:",q),v&&(clearInterval(v),v=null),Xa.ElMessage.error((($=(M=q==null?void 0:q.response)==null?void 0:M.data)==null?void 0:$.message)||"OCR识别失败,请重试"),pr.value=!1,Te.value=0,ya.value.forEach(B=>{yn(B,"pending"),Qr(B,0)})}},Dl=f=>{if(f==null)return"";let v=String(f);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,M=>String.fromCharCode(M.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},El=()=>{var la,tl;const f=pl.value,v=Il.value,M=Ya.value;if(!M||M.length===0){Xa.ElMessage.warning("暂无数据可添加");return}const $=(la=re.getAllLeafNodes(W.value)||[])==null?void 0:la.filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),q=new Map,B=new Map,ie=(tl=$==null?void 0:$.find(xa=>(xa==null?void 0:xa.label)==="证书附件"))==null?void 0:tl.prop;$==null||$.forEach(xa=>{xa!=null&&xa.label&&(xa!=null&&xa.prop)&&(q.set(xa.label,xa.prop),B.set(xa.prop,xa.label))});const oe=Date.now(),K=xa=>String(oe*1e3+xa),ke=[],ge=[],Ye=xa=>{const sl=Ao&&Ao[xa]||[xa];for(const be of sl){const Va=q.get(be);if(Va)return Va}return""},He=Ye("出厂编号"),aa=Ye("设备名称"),ba=Ye("制造厂"),Na=[],Aa=xa=>{var Oa,Ne;if(!ie)return[];const sl=(Array.isArray(f)?f[xa]:null)||null,be=(sl==null?void 0:sl.url)||"",Va=(sl==null?void 0:sl.fileName)||(sl==null?void 0:sl.name)||"";return(String(Va).toLowerCase().endsWith(".pdf")||String(be).toLowerCase().endsWith(".pdf"))&&be?[{url:be,name:Va,fileName:Va}]:(Array.isArray((Ne=(Oa=v==null?void 0:v.result)==null?void 0:Oa[xa])==null?void 0:Ne.图片信息)?v.result[xa].图片信息:[]).map(ee=>({url:(ee==null?void 0:ee.url)||"",name:(ee==null?void 0:ee.name)||"",fileName:(ee==null?void 0:ee.name)||""})).filter(ee=>ee.url)};if(M.forEach((xa,sl)=>{var cl;const be={id:K(sl),_isOCRRow:!0,_ocrTableId:p==null?void 0:p.index};for(const[Ka,Ca]of q.entries())Object.prototype.hasOwnProperty.call(xa,Ka)&&(be[Ca]=xa[Ka]);ie&&(be[ie]=Aa(sl));const Va=(Array.isArray(v==null?void 0:v.result)?v.result[sl]:null)||null,ga=(Array.isArray(f)?f[sl]:null)||null,Ja=(ga==null?void 0:ga.url)||"",Oa=(ga==null?void 0:ga.fileName)||(ga==null?void 0:ga.name)||"",Ne=String(Oa).toLowerCase().endsWith(".pdf")||String(Ja).toLowerCase().endsWith(".pdf"),ee={ts:Date.now(),versionId:String(Date.now())+"_"+String(sl),label:new Date().toLocaleString(),certType:(Va==null?void 0:Va.证书类型)||"",certNo:(Va==null?void 0:Va.证书编号)||"",fileType:Ne?"pdf":"image",sourceUrl:Ne?Ja:"",images:Array.isArray(Va==null?void 0:Va.图片信息)?Va.图片信息.map(Ka=>({name:(Ka==null?void 0:Ka.name)||"",url:(Ka==null?void 0:Ka.url)||""})).filter(Ka=>Ka.url):[]},Pe=Ka=>Dl(Ka?be==null?void 0:be[Ka]:""),pa=Pe(He),N=Pe(aa),za=Pe(ba);if(!!(He&&aa&&ba&&pa&&N&&za)){const Ka=(Ce.value||[]).find(Ca=>{const fl=Dl(He?Ca==null?void 0:Ca[He]:""),Yl=Dl(aa?Ca==null?void 0:Ca[aa]:""),Wa=Dl(ba?Ca==null?void 0:Ca[ba]:"");return fl&&Yl&&Wa&&fl===pa&&Yl===N&&Wa===za});if(Ka){Na.push({idx:sl,ocrRow:be,versionItem:ee,ocrNo:pa,candidates:[Ka],selectedTargetId:String((Ka==null?void 0:Ka.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(pa&&He){const Ka=(Ce.value||[]).filter(Ca=>{const fl=Dl(He?Ca==null?void 0:Ca[He]:"");return fl&&fl===pa});if(Ka.length>0){Na.push({idx:sl,ocrRow:be,versionItem:ee,ocrNo:pa,candidates:Ka,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(be.sort===void 0||be.sort===null||String(be.sort).trim()===""){const Ka=(Ce.value||[]).map(fl=>jn(fl==null?void 0:fl.sort)).filter(fl=>fl!==null),Ca=Ka.length>0?Math.max(...Ka):((cl=Ce.value)==null?void 0:cl.length)??0;be.sort=String(Number((Ca+1).toFixed(6)))}}catch{}Xl(p==null?void 0:p.index,be.id,ee),Na.push({idx:sl,ocrRow:be,versionItem:ee,ocrNo:pa,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Na||[]).length>0){Ul.value=(Na||[]).map(xa=>({...xa,selectedTargetId:(xa==null?void 0:xa.selectedTargetId)||""})),ka.value=!0,Gl.value=ge,Ba.value=ke,Rl.value=v,Fr.value=f,Br.value=ie||"";return}},Vl=(f,v,M)=>{Ya.value[f]&&(Ya.value[f][v]=M)},tr=f=>f==null||f===0?"-":`${(Number(f)*100).toFixed(1)}%`,hr=f=>{if(f==null||f===0)return"#909399";const v=Number(f);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},Kl=f=>{var M,$,q,B;if(kl.value===f){kl.value=null,ea.value=!1,Ma.value="";return}kl.value=f,Ma.value="";const v=(M=Ya.value)==null?void 0:M[f];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){ma.value=v._ocrImages.map(K=>({name:(K==null?void 0:K.name)||"",url:(K==null?void 0:K.url)||""})).filter(K=>K.name||K.url);const ie=v.__ocrFieldMeta||{},oe=($=Object.values(ie))==null?void 0:$.find(K=>K==null?void 0:K.imageName);Ha.value=(oe==null?void 0:oe.imageName)||((B=(q=ma.value)==null?void 0:q[0])==null?void 0:B.name)||"",ea.value=ma.value.length>0}else ma.value=[],ea.value=!1,Ha.value=""},cr=()=>{Sl.value=!1,ya.value=[],ol.value=null,Ua.value=1,_a.value.clear(),rl.value.clear(),Te.value=0,ea.value=!1},pn=f=>f.raw?URL.createObjectURL(f.raw):f.url?f.url:"",nr=f=>{const v=f.uid||f.name;return _a.value.get(v)||"pending"},bn=f=>{const v=f.uid||f.name;return rl.value.get(v)||0},Qr=(f,v)=>{const M=f.uid||f.name;rl.value.set(M,Math.min(100,Math.max(0,v)))},Rn=f=>{const v=nr(f),M=100.53;if(v==="completed"||v==="uploaded")return`${M} ${M}`;if(v==="failed")return`${M} ${M}`;if(v==="uploading"){const $=bn(f);return`${M*($/100)} ${M}`}else if(v==="processing")return`${M*.5} ${M}`;return`0 ${M}`},yn=(f,v)=>{const M=f.uid||f.name;_a.value.set(M,v),(v==="completed"||v==="uploaded")&&Qr(f,100)},pi=()=>{e.nextTick(()=>{const f=document.querySelector('.ocr-upload-input input[type="file"]');if(f)f.value="",f.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 M=>{const $=Array.from(M.target.files||[]);for(const q of $){const B={name:q.name,raw:q,uid:Date.now()+Math.random()};ya.value.push(B),await nl(B)}M.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},Cu=()=>{Ua.value>1&&Ua.value--},Du=()=>{Ua.value===1?ya.value.length>0&&!pr.value&&dl():Ua.value===2&&(El(),Ua.value=3)},Tu=async f=>{await jt(f==null?void 0:f.row)},Bu=async({row:f,prop:v})=>{!f||!v||await jt(f,v)},jt=async(f,v)=>{var q,B;const M=f==null?void 0:f.id;if(!M){Xa.ElMessage.warning("暂无可预览数据");return}let $=Ga(p==null?void 0:p.index,M);if(!$||$.length===0){const ie=sessionStorage.getItem("ocr_root_table_id"),oe=ie!==null?Number(ie):null;if(oe!=null&&oe!==""&&!Number.isNaN(oe)){const K=Ga(oe,M);Array.isArray(K)&&K.length>0&&(Jl(p==null?void 0:p.index,M,K),$=K)}}if(!$||$.length===0){const ie=(q=re.getAllLeafNodes(W.value)||[])==null?void 0:q.filter(K=>(K==null?void 0:K.type)!=="operate"&&(K==null?void 0:K.label)!=="操作"&&(K==null?void 0:K.prop)!=="operate"),oe=v||((B=ie==null?void 0:ie.find(K=>(K==null?void 0:K.label)==="证书附件"))==null?void 0:B.prop);if(oe&&f[oe]){const K=f[oe];let ke=[],ge="",Ye=!1;if(typeof K=="string")try{const He=JSON.parse(K);Array.isArray(He)&&(ke=He.map(aa=>({name:(aa==null?void 0:aa.name)||(aa==null?void 0:aa.fileName)||"",url:(aa==null?void 0:aa.url)||""})).filter(aa=>aa.url||aa.name),ke.length>0&&(ge=ke[0].url||"",Ye=String(ke[0].name).toLowerCase().endsWith(".pdf")||String(ge).toLowerCase().endsWith(".pdf")))}catch{ge=K,Ye=String(K).toLowerCase().endsWith(".pdf"),ke=[{name:K,url:K}]}else Array.isArray(K)&&(ke=K.map(He=>({name:(He==null?void 0:He.name)||(He==null?void 0:He.fileName)||"",url:(He==null?void 0:He.url)||""})).filter(He=>He.url||He.name),ke.length>0&&(ge=ke[0].url||"",Ye=String(ke[0].name).toLowerCase().endsWith(".pdf")||String(ge).toLowerCase().endsWith(".pdf")));if(ke.length>0||ge){const He={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:f.证书类型||"",certNo:f.证书编号||"",fileType:Ye?"pdf":"image",sourceUrl:Ye?ge:"",images:ke};$=[He],Xl(p==null?void 0:p.index,M,He)}}}if(!$||$.length===0){Xa.ElMessage.warning("暂无可预览数据");return}Bl.value=$,vl.value=!0},Nu=f=>{ya.value=ya.value.filter((v,M)=>M!==f)},pt=async(f,v,M)=>{var $,q,B,ie,oe,K,ke,ge,Ye,He,aa,ba,Na,Aa,la,tl,xa,sl,be,Va,ga,Ja;if(Ea(p.config,{type:va.TABLE,tableOperate:f})){if(da.value="",ze.value=!0,ja.value=!0,U("onButtonClick",f,v),X.value=[],f==="删除")z.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Oa,Ne,ee,Pe;(Oa=Ce.value)!=null&&Oa.find(pa=>(pa==null?void 0:pa.id)===(v==null?void 0:v.id))?Ce.value=(Ne=z.cloneDeep(Ce.value))==null?void 0:Ne.filter(pa=>(pa==null?void 0:pa.id)!==(v==null?void 0:v.id)):Ce.value=h(z.cloneDeep(Ce.value),v);try{v!=null&&v.id&&((Pe=(ee=Da.value)==null?void 0:ee.has)!=null&&Pe.call(ee,v==null?void 0:v.id))&&Da.value.delete(v.id)}catch{}b0(Sr.value,$l.value,v==null?void 0:v.id),We.setTableLoading(p==null?void 0:p.index),U("change",{content:Ce.value,fixContent:[v],index:p==null?void 0:p.index,type:"delete",name:p==null?void 0:p.groupNames,buttonName:f,columns:W.value,relatedContents:p==null?void 0:p.related}),console.log(v,"item")});else if(f==="批量删除"){if((($=Nr.value)==null?void 0:$.length)===0)return Xa.ElMessage.warning("请先勾选操作的数据");z.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var ee,Pe,pa,N,za;const Oa=(ee=Nr.value)==null?void 0:ee.map(qa=>qa.id);Ce.value=(Pe=z.cloneDeep(Ce.value))==null?void 0:Pe.filter(qa=>!(Oa!=null&&Oa.includes(qa.id))),We.setTableLoading(p==null?void 0:p.index),U("change",{content:Ce.value,fixContent:Nr.value,index:p==null?void 0:p.index,type:"delete",name:p==null?void 0:p.compName,buttonName:f,relatedContents:p==null?void 0:p.related,columns:W.value});const Ne=(Oa||[]).filter(Boolean);if(Ne.length>0&&Ne.every(qa=>qa!=null&&qa!=="")){const qa=(Nr.value||[]).map(cl=>{const Ka={...cl};return delete Ka._isOCRRow,delete Ka._ocrTableId,delete Ka._isTemp,delete Ka.tableEditType,delete Ka.index,Ka});await z.pageBatchDeleteApi({platId:parseInt((pa=Nl.value)==null?void 0:pa.plat_id),changeContents:[{tableName:((N=p==null?void 0:p.related)==null?void 0:N.find(cl=>cl==null?void 0:cl.includes("content_")))||((za=p==null?void 0:p.related)==null?void 0:za.find(cl=>cl==null?void 0:cl.includes("content"))),tableContents:qa}]})}})}else if(f==="复制新增"){ha.value="复制新增",z.cloneDeep(v);const Oa=(q=W.value)==null?void 0:q.find(Ne=>Ne==null?void 0:Ne.isMainKey);Oa||((B=W.value)==null||B[0]),ql.value=v,Ui(!0)}else if(f==="新增")ha.value="新增",ji(""),Qe.value=!0;else if(f==="编辑")ha.value="编辑",ji(v),Qe.value=!0;else if(f==="查看")ha.value="查看",ji(v),ze.value=!1,ja.value=!1,Qe.value=!0;else if(f==="查看三维模型"){const Oa={};for(let ee in v)ee!=="id"&&(Oa[ee]=v[ee]);let Ne=(ie=Object.values(Oa))==null?void 0:ie[1];Sa.setTableShowThree(Ne)}else if(f==="切换视图")Hu();else if(((oe=M==null?void 0:M.extra)==null?void 0:oe.type)==="modelExample")ha.value=f,ne.value=!0;else if(f==="新建"){let Oa=ua.value,Ne=[];for(let za in Oa)za!=null&&za.includes(`loading${((K=Nl.value)==null?void 0:K.account)||((ke=Nl.value)==null?void 0:ke.账号)}`)&&(Ne=[...Ne,...za]);let ee=[];for(let za in Oa)za!=null&&za.includes(`updateLoading${((ge=Nl.value)==null?void 0:ge.account)||((Ye=Nl.value)==null?void 0:Ye.账号)}`)&&(ee=[...ee,...za]);let Pe=Ne==null?void 0:Ne.map(za=>za==null?void 0:za.id);const pa=ee==null?void 0:ee.map(za=>za==null?void 0:za.id);Pe=[...z.cloneDeep(Pe),...pa],(Pe==null?void 0:Pe.length)>0&&(Pe!=null&&Pe.every(za=>za!==null&&za))&&await Zr.batchDeleteInsofDataApi({ids:Pe});const N=(He=Ee.value)==null?void 0:He.find(za=>(za==null?void 0:za.label)==="新建");await Mu(!1,N)}else if(f==="修改模板"){let Oa=z.cloneDeep(de).value;We.setRouteToChildPath(Oa),Le.setActiveMenuPath(Oa+I)}else if(f==="执行")t(f,v);else if(f==="导出paraform"){const Oa=z.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Ne=["推力","真空","压力","温度","流量"],ee=_l=>{var ir,yr,Ml;return _l?typeof(_l==null?void 0:_l.value)=="string"?_l.value:((Ml=(yr=(ir=_l==null?void 0:_l._custom)==null?void 0:ir.value)==null?void 0:yr.value)==null?void 0:Ml.value)||"":""},Pe=Array.isArray(or.value)?or.value:[],pa=ee(Pe.find(_l=>(_l==null?void 0:_l.condition)==="child")),N=String(pa||"").slice(0,8),za=_l=>{if(_l==null)return"";const ir=String(_l).trim();if(!ir)return"";if(/^\d{8}$/.test(ir))return ir;const yr=ir.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(yr){const gr=yr[1],Dr=yr[2].padStart(2,"0"),br=yr[3].padStart(2,"0");return`${gr}${Dr}${br}`}const Ml=ir.replace(/\D/g,"");return Ml.length>=8?Ml.slice(0,8):""},qa=async _l=>{var ir,yr;if(!_l)return"";try{const Ml=await qr("试验任务/任务管理",!1),gr=(mr,Lr=[])=>{if(!Array.isArray(mr))return Lr;for(const jr of mr)(jr==null?void 0:jr.comp)==="Table"&&(jr!=null&&jr.name)&&Lr.push(jr),Array.isArray(jr==null?void 0:jr.children)&&gr(jr.children,Lr),Array.isArray(jr==null?void 0:jr.tab)&&gr(jr.tab,Lr),Array.isArray(jr==null?void 0:jr.choice)&&gr(jr.choice,Lr);return Lr},br=gr(Ml||[]).find(mr=>(mr==null?void 0:mr.name)==="任务列表"),Ir=((yr=(ir=br==null?void 0:br.compData)==null?void 0:ir.find(mr=>(mr==null?void 0:mr.key)==="tableContents"))==null?void 0:yr.contents)||[];if(!Array.isArray(Ir)||Ir.length===0)return"";const sn=Ir.find(mr=>String((mr==null?void 0:mr["试验代号(名称)"])||"").slice(0,8)===_l);return za(sn==null?void 0:sn.计划试验时间)}catch(Ml){return console.warn("获取任务列表计划试验时间失败:",Ml),""}},cl=(de.value||"").replace(/\/+$/,""),Ka=pa?`${cl}/${pa}`:cl,Ca=await qr(Ka||de.value,!1),fl=String(Ve.value||"").trim(),Yl=_l=>String(_l||"").trim(),Wa=(_l,ir=[],yr="")=>{if(!Array.isArray(_l))return ir;for(const Ml of _l){const gr=Yl((Ml==null?void 0:Ml.choiceName)||(Ml==null?void 0:Ml.name0)||yr);(Ml==null?void 0:Ml.comp)==="Table"&&(Ml==null?void 0:Ml.name)&&Ne.includes(Ml.name)&&(!fl||gr===fl)&&ir.push(Ml),Array.isArray(Ml==null?void 0:Ml.children)&&Wa(Ml.children,ir,gr),Array.isArray(Ml==null?void 0:Ml.tab)&&Wa(Ml.tab,ir,gr),Array.isArray(Ml==null?void 0:Ml.choice)&&Wa(Ml.choice,ir,gr)}return ir},Tl=Wa(Ca||[]),Ra=new Map;for(const _l of Tl)_l!=null&&_l.name&&!Ra.has(_l.name)&&Ra.set(_l.name,_l);const Ol=Ne.map(_l=>Ra.get(_l)).filter(Boolean);if(!Ol||Ol.length===0)return Xa.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const il=_l=>{const ir=new Map,yr=(Ml,gr=[])=>{if(Array.isArray(Ml))for(const Dr of Ml){const br=((Dr==null?void 0:Dr.label)??"").toString().trim(),Ir=br?[...gr,br]:[...gr];if(Array.isArray(Dr==null?void 0:Dr.children)&&Dr.children.length>0)yr(Dr.children,Ir);else{const mr=((Dr==null?void 0:Dr.prop)??"").toString();if(!mr)continue;const Lr=br||mr,jr=(Ir.length>0?[...gr,Lr]:[Lr]).join(".");ir.set(mr,jr)}}};return yr(_l,[]),ir},ml=(_l,ir)=>{const yr=il(_l||[]),gr=(re.getAllLeafNodes(_l||[])||[]).filter(br=>(br==null?void 0:br.prop)&&(br==null?void 0:br.type)!=="operate"&&(br==null?void 0:br.label)!=="操作"&&(br==null?void 0:br.prop)!=="operate"),Dr=Array.isArray(ir)?ir:[];return Dr.length===0?[]:Dr.map(br=>{const Ir={};return gr.forEach(sn=>{const mr=String(sn.prop),Lr=yr.get(mr)||String(sn.label||sn.prop);Ir[Lr]=(br==null?void 0:br[mr])??""}),Ir})},zl=Ol.map(_l=>{var Dr,br;const ir=(_l==null?void 0:_l.compData)||[];let yr=(Dr=ir==null?void 0:ir.find(Ir=>(Ir==null?void 0:Ir.key)==="header"))==null?void 0:Dr.contents;Array.isArray(yr==null?void 0:yr[0])&&(yr=yr[0]);const Ml=((br=ir==null?void 0:ir.find(Ir=>(Ir==null?void 0:Ir.key)==="tableContents"))==null?void 0:br.contents)||[];if(!Array.isArray(yr)||yr.length===0||!Array.isArray(Ml)||Ml.length===0)return null;const gr=ml(yr||[],Ml||[]);return!Array.isArray(gr)||gr.length===0?null:{类型:_l==null?void 0:_l.name,数据:gr}}).filter(Boolean);if(!zl||zl.length===0)return Xa.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const xl=await qa(N),Cr={试验代号:N,试验日期:xl,ParaForm:zl},vr=await Si().catch(()=>""),ur=await z.exportParaformApi(Cr,vr);if(((aa=ur==null?void 0:ur.data)==null?void 0:aa.code)===200&&((Na=(ba=ur==null?void 0:ur.data)==null?void 0:ba.result)!=null&&Na.Excel文件)){const _l=ur.data.result.Excel文件,ir=await z.platformDownloadFile({url:_l}),yr=new Blob([ir.data],{type:"application/vnd.ms-excel"}),Ml=URL.createObjectURL(yr),gr=z.dayjs().format("YYYYMMDD"),br=`${(N||"UNKNOWN").trim()||"UNKNOWN"}_${gr}_paraform.xls`,Ir=document.createElement("a");Ir.href=Ml,Ir.download=br,Ir.style.display="none",document.body.appendChild(Ir),Ir.click(),setTimeout(()=>{document.body.removeChild(Ir),URL.revokeObjectURL(Ml)},100);const sn=Array.isArray((la=(Aa=ur==null?void 0:ur.data)==null?void 0:Aa.result)==null?void 0:la.warnings)?ur.data.result.warnings:[];if(sn.length>0){const mr=sn.map((Lr,jr)=>`${jr+1}. ${(Lr==null?void 0:Lr.field)||"未知字段"}:${(Lr==null?void 0:Lr.message)||""}`).join(`
|
|
24
|
+
`);Xa.ElMessage.warning({message:`导出成功,但存在以下提示:
|
|
25
|
+
${mr}`,duration:5e3,showClose:!0})}else Xa.ElMessage.success("导出成功")}else Xa.ElMessage.error(((tl=ur==null?void 0:ur.data)==null?void 0:tl.message)||"导出失败")}catch(Ne){console.error("导出paraform失败:",Ne),Xa.ElMessage.error("导出失败:"+((Ne==null?void 0:Ne.message)||"未知错误"))}finally{Oa.close()}}else if(f!=null&&f.includes("导出")&&f!=="导出paraform"){if(f==="导出选中"&&((xa=Nr.value)==null?void 0:xa.length)===0)return Xa.ElMessage.warning(`请先勾选${f}的数据`);if(f==="导出全部"&&((sl=Ce.value)==null?void 0:sl.length)===0)return Xa.ElMessage.warning("暂无数据导出");let Oa=["序号",...(Va=(be=W.value)==null?void 0:be.map(pa=>pa==null?void 0:pa.prop))==null?void 0:Va.filter(pa=>pa!=="操作")],Ne=f==="导出全部"?Ce.value:Nr.value;const ee=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Ne=Ne==null?void 0:Ne.map(pa=>Object.fromEntries(Object.entries(pa).filter(([N])=>!ee.includes(N)))),Oa=["序号",...Oa],Ne=Ne==null?void 0:Ne.map((pa,N)=>({序号:N+1,...pa}));let Pe=(p==null?void 0:p.compName)||"表格信息";qo(Ne,Pe,Oa,Pe)}else if(f==="OCR识别")Sl.value=!0,ya.value=[],Ua.value=1,_a.value.clear(),rl.value.clear(),Te.value=0;else if(f==="迁移")Y.selectRow=v,Y.show=!0;else if(f==="生成方法"){let Oa=await R0(v),Ne;v!==""?Ne=[v]:Ne=z.cloneDeep(Ce.value),Ne=Ne==null?void 0:Ne.map(Pe=>(Pe.输出值=Oa,Pe));const ee={fixContent:Ne,buttonName:"编辑",relatedContents:p==null?void 0:p.related,columns:W.value,name:p==null?void 0:p.groupNames};U("change",ee)}else if(f==="签字板"||f==="触控笔")$a.value.dialogShow=!0,$a.value.dialogTitle=f;else if(((ga=M==null?void 0:M.extra)==null?void 0:ga.type)==="methodButton"){let Oa;v!==""?Oa=[v]:Oa=z.cloneDeep(Ce.value);const Ne=await Dt(Oa,W==null?void 0:W.value,"Manual",Ce.value,p==null?void 0:p.calculator,p==null?void 0:p.compNames);let ee;(Ja=Ne==null?void 0:Ne[0])!=null&&Ja.menuPathContent?ee={fixContent:Ne,buttonName:"新增",relatedContents:p==null?void 0:p.related,columns:W.value,name:p==null?void 0:p.groupNames}:ee={fixContent:Ne,buttonName:"methodButton",relatedContents:p==null?void 0:p.related,columns:W.value,name:p==null?void 0:p.groupNames},U("change",ee)}}},Au=async(f,v)=>{var M,$,q,B,ie,oe,K,ke,ge,Ye,He,aa,ba,Na,Aa,la,tl,xa,sl,be;try{let Va,ga;const Ja=(M=ua.value[de.value+I])==null?void 0:M.filter(qa=>{var cl;return((cl=qa==null?void 0:qa.key)==null?void 0:cl.type)==="structureMethod"}),Oa=($=ua.value[de.value+I])==null?void 0:$.filter(qa=>{var cl;return((cl=qa==null?void 0:qa.key)==null?void 0:cl.type)==="structure"}),Ne=Ja==null?void 0:Ja.find(qa=>{var cl,Ka;return((Ka=(cl=qa==null?void 0:qa.value)==null?void 0:cl.pageData)==null?void 0:Ka.method)==="保存"});if(!Ne)return;const ee=(oe=(ie=ua.value[(B=(q=Ne==null?void 0:Ne.value)==null?void 0:q.pageData)==null?void 0:B.path])==null?void 0:ie.filter(qa=>{var cl;return((cl=qa==null?void 0:qa.key)==null?void 0:cl.type)==="data"}))==null?void 0:oe.find(qa=>{var cl,Ka,Ca,fl;return((Ka=(cl=qa==null?void 0:qa.value)==null?void 0:cl.tableData)==null?void 0:Ka.算法名称)===((fl=(Ca=Ne==null?void 0:Ne.value)==null?void 0:Ca.pageData)==null?void 0:fl.method)});if(!ee)return;const Pe={buttonName:(ke=(K=Ne==null?void 0:Ne.value)==null?void 0:K.pageData)==null?void 0:ke.method,api:(Ye=(ge=ee==null?void 0:ee.value)==null?void 0:ge.tableData)==null?void 0:Ye.算法体,content:Oa==null?void 0:Oa.map(qa=>{var cl;return(cl=qa==null?void 0:qa.value)==null?void 0:cl.pageData}),extraContent:[],extraValues:(aa=(He=Ne==null?void 0:Ne.value)==null?void 0:He.pageData)==null?void 0:aa.data,methodName:(Na=(ba=Ne==null?void 0:Ne.value)==null?void 0:ba.pageData)==null?void 0:Na.path};if(!f)return;const pa={...f,compData:(Aa=f==null?void 0:f.compData)==null?void 0:Aa.map(qa=>{var cl;return(qa==null?void 0:qa.key)==="formContent"?{...qa,contents:(cl=qa==null?void 0:qa.contents)==null?void 0:cl.map(Ka=>(Ka==null?void 0:Ka.prop)===v?{...Ka,value:""}:Ka)}:qa})},N={key:{pageKey:de.value+I,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:pa}},za=await Xa.axios.post(Pe.api,N,{headers:{"Content-Type":"application/json"}});return((la=za==null?void 0:za.data)==null?void 0:la.code)===200&&(Va=(xa=(tl=za==null?void 0:za.data)==null?void 0:tl.result)==null?void 0:xa.latestReportCode,ga=(be=(sl=za==null?void 0:za.data)==null?void 0:sl.result)==null?void 0:be.status),{newMainKeyValue:Va,newStatus:ga}}catch(Va){throw Xa.ElMessage.error(Va),new Error(Va)}},Ht=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const zu=async(f,v,M)=>{var K,ke;let $=f==null?void 0:f[v==null?void 0:v.prop],q=1,B,ie;const oe=z.cloneDeep(de).value+I+$;if(oe){Ht.value="",B=(K=ua.value[oe])==null?void 0:K.filter(He=>{var aa;return((aa=He==null?void 0:He.key)==null?void 0:aa.type)==="structure"});const ge=B==null?void 0:B.find(He=>{var aa,ba,Na;return((Na=(ba=(aa=He==null?void 0:He.value)==null?void 0:aa.pageData)==null?void 0:ba.comp)==null?void 0:Na.toUpperCase())==="FORM"});ie={...(ke=ge==null?void 0:ge.value)==null?void 0:ke.pageData,id:ge==null?void 0:ge.id};const Ye=await Au(ie,v==null?void 0:v.prop);if(Ht.value=Ye==null?void 0:Ye.newStatus,Ye!=null&&Ye.newMainKeyValue)return Ye==null?void 0:Ye.newMainKeyValue}if(Ce.value.some(ge=>(ge==null?void 0:ge[v==null?void 0:v.prop])===$)){const ge=$;for(;Ce.value.some(Ye=>(Ye==null?void 0:Ye[v==null?void 0:v.prop])===`${ge}(${q})`);)q++;$=`${ge}(${q})`}return $},Mu=async(f,v,M)=>{var B,ie,oe,K;let $,q;if(await zu(M==null?void 0:M.data,M==null?void 0:M.firstCol),$=z.cloneDeep(de).value+I,q=z.cloneDeep($)+`loading${((B=Nl.value)==null?void 0:B.account)||((ie=Nl.value)==null?void 0:ie.账号)}`,v){const ke=(K=(oe=ua.value[q])==null?void 0:oe.filter(ge=>{var Ye;return((Ye=ge==null?void 0:ge.key)==null?void 0:Ye.parentTable)===""}))==null?void 0:K.map(ge=>{var Ye;return{id:ge==null?void 0:ge.id,...(Ye=ge==null?void 0:ge.value)==null?void 0:Ye.pageData}});(ke==null?void 0:ke.length)>0||await re.loadingConstruct($,q,null,null,null),We.setRouteToChildPath(z.cloneDeep(de).value),Le.setActiveMenuPath(q)}else We.setRouteToChildPath(z.cloneDeep(de).value),Le.setActiveMenuPath(q)},Iu=()=>{te.value=!1,Be.value=[],A.value=!1},ji=f=>{var oe,K,ke,ge,Ye,He,aa,ba,Na,Aa,la,tl,xa,sl,be,Va,ga,Ja,Oa,Ne,ee,Pe,pa;const v=[];Ae.value=z.cloneDeep(W.value);let M=(K=(oe=u.value)==null?void 0:oe.find(N=>{var za;return(za=N==null?void 0:N.key)==null?void 0:za.includes("@EditRead")}))==null?void 0:K.content,$=!1;(M==null?void 0:M.length)>0&&($=Ts(M,f),($==null?void 0:$.length)>0?$=!0:$=!1),(ge=re.getColumnChild((ke=z.cloneDeep(W.value))==null?void 0:ke.filter(N=>(N==null?void 0:N.label)!=="操作")))==null||ge.forEach((N,za)=>{var qa,cl,Ka;N!=null&&N.formType&&((qa=N==null?void 0:N.formType)==null?void 0:qa.toUpperCase())==="SELECT"||N!=null&&N.menuId?v.push({label:(cl=N==null?void 0:N.prop)!=null&&cl.includes(".")?N==null?void 0:N.prop:(N==null?void 0:N.label)??(N==null?void 0:N.prop)??"",name:(N==null?void 0:N.prop)??"t"+za,prop:N==null?void 0:N.prop,type:"Select",value:(f==null?void 0:f[N==null?void 0:N.prop])??(N==null?void 0:N.value)??"",id:(N==null?void 0:N.id)??za,contents:(N==null?void 0:N.options)??[],multiple:(N==null?void 0:N.multiple)??!1,multipleLimit:N==null?void 0:N.multipleLimit,width:2,isFormColHidden:N==null?void 0:N.isFormColHidden,relatedValueId:N==null?void 0:N.relatedValueId,menus:N==null?void 0:N.menus,groups:N==null?void 0:N.groups,words:N==null?void 0:N.words,allSelectionContents:(N==null?void 0:N.allSelectionContents)??[],filterContent:N==null?void 0:N.filterContent,disabled:(N==null?void 0:N.prop)==="disabled"?!0:$||(N==null?void 0:N.disabled),filter:N==null?void 0:N.filter,bindMenus:N==null?void 0:N.bindMenus,isMainPath:N==null?void 0:N.isMainPath,required:(N==null?void 0:N.required)??!1,relatedContents:N==null?void 0:N.relatedContents,mainKey:N==null?void 0:N.mainKey,relatedContents:N==null?void 0:N.relatedContents,functionName:N==null?void 0:N.functionName,functionRelatedWords:N==null?void 0:N.functionRelatedWords,calculatorFilter:N==null?void 0:N.calculatorFilter,isReadonly:N==null?void 0:N.isReadonly}):v.push({label:(Ka=N==null?void 0:N.prop)!=null&&Ka.includes(".")?N==null?void 0:N.prop:(N==null?void 0:N.label)??(N==null?void 0:N.prop)??"",prop:N==null?void 0:N.prop,name:(N==null?void 0:N.prop)??"t"+za,type:!(N!=null&&N.formType)||(N==null?void 0:N.formType)===""?"Input":N==null?void 0:N.formType,value:(N==null?void 0:N.formType)==="Upload"?(f==null?void 0:f[N==null?void 0:N.prop])??"{}":(f==null?void 0:f[N==null?void 0:N.prop])??(N==null?void 0:N.value)??"",id:(N==null?void 0:N.id)??za,contents:(N==null?void 0:N.options)??[],multiple:(N==null?void 0:N.multiple)??!1,width:2,isFormColHidden:N==null?void 0:N.isFormColHidden,disabled:(N==null?void 0:N.prop)==="disabled"?!0:$||(N==null?void 0:N.disabled),relatedValueId:N==null?void 0:N.relatedValueId,menus:N==null?void 0:N.menus,groups:N==null?void 0:N.groups,words:N==null?void 0:N.words,filter:N==null?void 0:N.filter,bindMenus:N==null?void 0:N.bindMenus,isMainPath:N==null?void 0:N.isMainPath,required:(N==null?void 0:N.required)??!1,relatedContents:N==null?void 0:N.relatedContents,mainKey:N==null?void 0:N.mainKey,relatedContents:N==null?void 0:N.relatedContents,functionName:N==null?void 0:N.functionName,functionRelatedWords:N==null?void 0:N.functionRelatedWords,calculatorFilter:N==null?void 0:N.calculatorFilter,isReadonly:N==null?void 0:N.isReadonly})}),f===""||!f||(da.value=(f==null?void 0:f.id)??"");let q=re.getColumnChild((Ye=z.cloneDeep(W.value))==null?void 0:Ye.filter(N=>(N==null?void 0:N.label)!=="操作"));na.value&&((He=na.value)==null?void 0:He.length)>0&&(na.value=(aa=z.cloneDeep(na).value)==null?void 0:aa.map(N=>{var qa;let za=(N==null?void 0:N.prop)||((qa=q==null?void 0:q.find(cl=>(cl==null?void 0:cl.label)===(N==null?void 0:N.label)))==null?void 0:qa.prop);return za&&(N.value=f[za]),N})),ye.value=na.value&&((ba=na.value)==null?void 0:ba.length)>0?re.getTableFormToForm(na.value):v,ye.value=((Na=ye.value)==null?void 0:Na.map(N=>({...N,disabled:(N==null?void 0:N.prop)==="disabled"?!0:N==null?void 0:N.disabled})))??ye.value;let B=[],ie=((tl=(la=(Aa=p.itemData)==null?void 0:Aa.filter(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:la[0])==null?void 0:tl.contents)??"";if(ie=re.analyzeSplitToContent(ie,","),(ie==null?void 0:ie.length)>0&&(B=ie.flat()),(B==null?void 0:B.length)>0){let N=B==null?void 0:B.filter(Ca=>Ca==null?void 0:Ca.includes("@Type"));if(N=N==null?void 0:N[(N==null?void 0:N.length)-1],(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){let Ca=(sl=(xa=N==null?void 0:N.replace("=",k))==null?void 0:xa.split(k))==null?void 0:sl[1];((be=Ca==null?void 0:Ca.trim())==null?void 0:be.toUpperCase())==="MANUAL"&&(p==null||p.index,ye.value=(Va=ye.value)==null?void 0:Va.map((fl,Yl)=>fl))}let za=(ga=ye.value)==null?void 0:ga.filter(Ca=>Ca==null?void 0:Ca.mainKey),qa;za==null||za.forEach(Ca=>{var Yl;if(qa!==void 0)return;let fl=Ca==null?void 0:Ca.menus;((Yl=za==null?void 0:za.filter(Wa=>Wa==null?void 0:Wa.mainKey))==null?void 0:Yl.length)>1&&(qa=fl,Ca==null||Ca.groups)});let cl=[],Ka=new Map;if(za==null||za.forEach(Ca=>{var fl,Yl,Wa,Tl,Ra,Ol,il,ml,zl,xl,Cr,vr,ur;if((fl=Ca==null?void 0:Ca.prop)!=null&&fl.includes(".")){let _l=[];Ka.get(((Wa=(Yl=Ca==null?void 0:Ca.prop)==null?void 0:Yl.split("."))==null?void 0:Wa[0])+(Ca!=null&&Ca.isMainPath?0:1)+((Tl=Ca==null?void 0:Ca.groups)==null?void 0:Tl[0]))&&(_l=Ka.get(((Ol=(Ra=Ca==null?void 0:Ca.prop)==null?void 0:Ra.split("."))==null?void 0:Ol[0])+(Ca!=null&&Ca.isMainPath?0:1)+((il=Ca==null?void 0:Ca.groups)==null?void 0:il[0]))),_l.push(Ca),Ka.set(((zl=(ml=Ca==null?void 0:Ca.prop)==null?void 0:ml.split("."))==null?void 0:zl[0])+(Ca!=null&&Ca.isMainPath?0:1)+((xl=Ca==null?void 0:Ca.groups)==null?void 0:xl[0]),_l)}else{let _l=[];Ka.get("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((Cr=Ca==null?void 0:Ca.groups)==null?void 0:Cr[0]))&&(_l=Ka.get("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((vr=Ca==null?void 0:Ca.groups)==null?void 0:vr[0]))),_l.push(Ca),Ka.set("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((ur=Ca==null?void 0:Ca.groups)==null?void 0:ur[0]),_l)}}),cl=Array.from(Ka.values()),(cl==null?void 0:cl.length)>0)for(let Ca in cl){let fl=cl==null?void 0:cl[Ca];if((fl==null?void 0:fl.length)!==1){if((fl==null?void 0:fl.length)>1){let Yl=fl==null?void 0:fl.map(xl=>xl==null?void 0:xl.prop),Wa=fl==null?void 0:fl.map(xl=>xl==null?void 0:xl.label),Tl=fl==null?void 0:fl.map(xl=>xl==null?void 0:xl.value),Ra=(Ja=z.cloneDeep(fl))==null?void 0:Ja[0],Ol=(Oa=ye.value)==null?void 0:Oa.findIndex(xl=>(xl==null?void 0:xl.prop)===(Ra==null?void 0:Ra.prop)),il=(Ne=ye.value)==null?void 0:Ne.slice(0,Ol),ml=(Pe=ye.value)==null?void 0:Pe.slice(Ol,(ee=ye.value)==null?void 0:ee.length);Ra.label=Wa==null?void 0:Wa.join("·"),Ra.value=Tl==null?void 0:Tl.join(" "),Ra.value.trim()===""&&(Ra.value=""),Ra.prop=Yl==null?void 0:Yl.join("·");let zl=fl==null?void 0:fl.map(xl=>{var Cr;return(Cr=xl==null?void 0:xl.words)==null?void 0:Cr.join(".")});Ra.relatedWords=zl,Ra.usingType="parent",ml.unshift(Ra),ye.value=[...il,...ml],ye.value=(pa=ye.value)==null?void 0:pa.map(xl=>(Yl!=null&&Yl.find(Cr=>Cr===(xl==null?void 0:xl.prop))&&(xl.isFormColHidden=!0,xl.relatedWords=zl),xl))}}}}},Ou=()=>{var v;const f=(v=i.value)==null?void 0:v.$el;f&&Fl.Sortable.create(f,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:M=>{var ie;const{oldIndex:$,newIndex:q}=M;if($===q)return;const B=Qn.value.splice($,1)[0];Qn.value.splice(q,0,B),W.value=(ie=W.value)==null?void 0:ie.slice().sort((oe,K)=>{if(oe.label==="操作")return 1;if(K.label==="操作")return-1;const ke=Qn.value.findIndex(Ye=>Ye.label===oe.label),ge=Qn.value.findIndex(Ye=>Ye.label===K.label);return ke-ge})}})};e.onMounted(()=>{qe.value=window.innerWidth-240*2,window.addEventListener("keydown",si)});const Lu=()=>{e.nextTick(()=>{Ou()})},Ru=()=>{c.value=!0},ft=(f,v)=>{var $;if(!f&&!(f!=null&&f.children))return{contents:f,currentSelectContents:void 0};let M;return f.children=($=f.children)==null?void 0:$.map(q=>{var B,ie;if((q==null?void 0:q.id)===da.value){let oe={};for(let K in q){let ke=(B=v==null?void 0:v.find(ge=>(ge==null?void 0:ge.prop)===K))==null?void 0:B.label;ke?oe[K]=(ie=ql.value)==null?void 0:ie[ke]:oe[K]=q[K]??""}q=Object.assign(oe,ql.value),M=q}else{let oe=ft(q,v);q=oe==null?void 0:oe.contents,M=oe==null?void 0:oe.currentSelectContents}return q}),{contents:f,currentSelectContents:M}},Ut=(f,v)=>{let M,$;return f!=null&&f.find(q=>(q==null?void 0:q.id)===da.value)?M=f==null?void 0:f.map(q=>{var B,ie,oe;if((q==null?void 0:q.id)===da.value){let K={};for(let ge in q){let Ye=(B=v==null?void 0:v.find(He=>(He==null?void 0:He.prop)===ge))==null?void 0:B.label;Ye?K[ge]=((ie=ql.value)==null?void 0:ie[Ye])??"":K[ge]=q[ge]??""}let ke=ql.value;for(let ge in K)(oe=ql.value)!=null&&oe[ge]||(ke[ge]=(K==null?void 0:K[ge])??"");q=ke,$=q}return q}):M=f==null?void 0:f.map(q=>{var B,ie,oe,K;if((q==null?void 0:q.id)===da.value){let ke={};for(let ge in q){let Ye=(B=v==null?void 0:v.find(He=>(He==null?void 0:He.prop)===ge))==null?void 0:B.label;Ye?ke[ge]=(ie=ql.value)==null?void 0:ie[Ye]:ke[ge]=q[ge]??""}q=Object.assign(ke,ql.value),$=q}else q=(oe=ft(q,v))==null?void 0:oe.contents,$=(K=ft(q,v))==null?void 0:K.currentSelectContents;return q}),{newContents:M,currentSelectContents:$}},qt=(f,v,M)=>{var $,q;return f[v==null?void 0:v.prop]=M,typeof f.id=="number"&&(f.id=($=f.id)==null?void 0:$.toString()),f.children&&((q=f.children)==null?void 0:q.length)>0&&(f.children=f.children.map(qt)),f},Wt=f=>{var M;const v=[];return v.push({...f}),f!=null&&f.children&&Array.isArray(f.children)&&((M=f.children)==null||M.forEach($=>{v.push(...Wt($))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map($=>{const q={...$};return delete q.children,q}):[]},po=["Pacific6000数据采集装置.通道号","通道号"],Hi=f=>{if(!f)return"";const v=po.map(M=>f==null?void 0:f[M]).find(M=>M!=null&&String(M).trim()!=="");return v==null?"":String(v).trim()},ht=async(f,v=void 0)=>{if(!f)return!1;try{const M=aa=>{var ba,Na,Aa;return aa?typeof(aa==null?void 0:aa.value)=="string"?aa.value:((Aa=(Na=(ba=aa==null?void 0:aa._custom)==null?void 0:ba.value)==null?void 0:Na.value)==null?void 0:Aa.value)||"":""},$=Array.isArray(or.value)?or.value:[],q=M($.find(aa=>(aa==null?void 0:aa.condition)==="child")),B=(de.value||"").replace(/\/+$/,""),ie=q?`${B}/${q}`:B,oe=await qr(ie||de.value,!1),K=String(Ve.value||"").trim(),ke=aa=>String(aa||"").trim(),ge=(aa,ba=[],Na="")=>{if(!Array.isArray(aa))return ba;for(const Aa of aa){const la=ke((Aa==null?void 0:Aa.choiceName)||(Aa==null?void 0:Aa.name0)||Na);(Aa==null?void 0:Aa.comp)==="Table"&&(!K||la===K)&&ba.push(Aa),Array.isArray(Aa==null?void 0:Aa.children)&&ge(Aa.children,ba,la),Array.isArray(Aa==null?void 0:Aa.tab)&&ge(Aa.tab,ba,la),Array.isArray(Aa==null?void 0:Aa.choice)&&ge(Aa.choice,ba,la)}return ba},Ye=ge(oe||[]),He=String((p==null?void 0:p.compName)||"");return Ye.some(aa=>{var Na,Aa;const ba=((Aa=(Na=aa==null?void 0:aa.compData)==null?void 0:Na.find(la=>(la==null?void 0:la.key)==="tableContents"))==null?void 0:Aa.contents)||[];return!Array.isArray(ba)||ba.length===0?!1:ba.some(la=>{if(String((aa==null?void 0:aa.name)||"")===He&&(la==null?void 0:la.id)===v)return!1;const xa=Hi(la);return!!xa&&xa===f})})}catch{return(Ce.value||[]).some($=>{if(($==null?void 0:$.id)===v)return!1;const q=Hi($);return!!q&&q===f})}},Ui=async(f=!0,v,M)=>{var ke,ge,Ye,He,aa,ba,Na,Aa,la,tl,xa,sl,be,Va,ga,Ja,Oa,Ne,ee,Pe,pa,N,za,qa,cl,Ka,Ca,fl,Yl,Wa,Tl;if(ql.value){const Ra=(ge=re.getColumnChild((ke=z.cloneDeep(W.value))==null?void 0:ke.filter(il=>(il==null?void 0:il.label)!=="操作")))==null?void 0:ge.filter(il=>(il==null?void 0:il.required)===!0);for(let il=0;il<((Ra==null?void 0:Ra.length)??0);il++){const ml=Ra[il],zl=ml==null?void 0:ml.prop,xl=(ml==null?void 0:ml.label)??zl,Cr=(Ye=ql.value)==null?void 0:Ye[zl];if(Cr===""||Cr===null||Cr===void 0||Array.isArray(Cr)&&Cr.length===0){Xa.ElMessage.error(`${xl}不能为空`);return}}const Ol=Hi(ql.value);if(Ol&&await ht(Ol,da.value||void 0)){Xa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let $=re.getColumnChild((He=z.cloneDeep(W.value))==null?void 0:He.filter(Ra=>(Ra==null?void 0:Ra.label)!=="操作")),q,B=z.cloneDeep(Ce.value);if(!ql.value){Qe.value=!1;return}if(da.value===""){sa.value++;let Ra;Ra={id:sa.value.toString()};try{Ra.sort=ui(0,Ce.value||[])}catch{}Ra!=null&&Ra.children&&(Ra={...Ra,children:(aa=Ra.children)==null?void 0:aa.map(il=>qt(il,v,M))});const Ol=Object.assign(ql.value,Ra);B.unshift(Ol),q=Ol}else B=(ba=Ut(B,$))==null?void 0:ba.newContents,q=(Na=Ut(B,$))==null?void 0:Na.currentSelectContents;const ie=(Aa=p.itemData)==null?void 0:Aa.filter(Ra=>(Ra==null?void 0:Ra.key)==="childTree")[0];if(((la=ie==null?void 0:ie.contents)==null?void 0:la.length)>0){ha.value="编辑";const Ra=[];B==null||B.forEach((ml,zl)=>{var Cr;let xl={};if(Array.isArray(ml)){let vr=[];ml==null||ml.filter(ur=>!(ur!=null&&ur.id)).forEach((ur,_l)=>{var ir,yr,Ml,gr,Dr,br,Ir;if((yr=(ir=Zl.value)==null?void 0:ir[_l])!=null&&yr.prop&&!Array.isArray(ur)){let sn={};sn[Zl.value[_l].column]=ur,P!=null&&P.value&&((Ml=P==null?void 0:P.value)==null?void 0:Ml.length)>0&&((gr=P==null?void 0:P.value)!=null&&gr.find(mr=>JSON.stringify(mr==null?void 0:mr[0])===JSON.stringify(sn)))&&(vr=(Dr=P==null?void 0:P.value)==null?void 0:Dr.find(mr=>JSON.stringify(mr==null?void 0:mr[0])===JSON.stringify(sn))),vr&&vr.length>0?xl[Zl.value[_l].prop]=vr!=null&&vr.find(mr=>{var Lr;return((Lr=Object.keys(mr))==null?void 0:Lr[0])===Zl.value[_l].column})?(br=vr==null?void 0:vr.find(mr=>{var Lr;return((Lr=Object.keys(mr))==null?void 0:Lr[0])===Zl.value[_l].column}))==null?void 0:br[Zl.value[_l].column]:ur:xl[Zl.value[_l].prop]=ur}else Array.isArray(ur)&&((Ir=Zl.value[_l])!=null&&Ir.prop?xl[Zl.value[_l].prop]=ur:xl.children=Tt(ur,Zl.value))})}else xl=ml;if(Array.isArray(ml)&&ml.some(vr=>vr==null?void 0:vr.id)){const vr=(Cr=ml==null?void 0:ml.find(ur=>ur.id))==null?void 0:Cr.id;Ra.push(Object.assign(xl,{id:to(vr)}))}else xl.id?Ra.push(xl):Ra.push(Object.assign(xl,{id:zl.toString()}))});const Ol=(Ce.value||[]).map(ml=>String(ml==null?void 0:ml.id)),il=_i(Ra,Ol);Ce.value=Jt(il,ie,W.value)}Kt(Ce.value),Sr.value=Ce.value;const oe=x0(Sr.value,$l.value,B);let K=[];if(le.value?(K=(tl=z.cloneDeep(le).value.singleContent)==null?void 0:tl.filter(Ra=>(Ra==null?void 0:Ra.id)!==(q==null?void 0:q.id)),K.push(q)):K=[q],rr.value){const Ra={content:oe,singleContent:((xa=ie==null?void 0:ie.contents)==null?void 0:xa.length)>0?K==null?void 0:K.flatMap(Wt):K,index:p==null?void 0:p.index,buttonName:"编辑",column:W.value,parentTableId:p==null?void 0:p.parentTableId};We.setCacheUpdatingData(Ra)}if((sl=W.value)==null||sl.forEach(Ra=>{(Ra==null?void 0:Ra.formType)==="Upload"&&(q[Ra.prop]=q[Ra.prop]===""?"{}":typeof q[Ra.prop]!="string"?JSON.stringify(q[Ra.prop]):q[Ra.prop])}),f){(Ja=(ga=(Va=(be=p.itemData)==null?void 0:be.find(il=>(il==null?void 0:il.key)==="filterAllType"))==null?void 0:Va.value)==null?void 0:ga.find(il=>(il==null?void 0:il.value)==="onConditionContents"))==null||Ja.content;let Ra=(Oa=p.itemData)==null?void 0:Oa.filter(il=>(il==null?void 0:il.key)==="filterAllType");Ra=Array.from(new Map(Ra.filter(Boolean).map((il,ml)=>[il.value,{...il,_idx:ml}])).values()).sort((il,ml)=>il._idx-ml._idx).map(({_idx:il,...ml})=>ml),Ra=(Ne=Ra==null?void 0:Ra[(Ra==null?void 0:Ra.length)-1])==null?void 0:Ne.value;const Ol={fixContent:[q],buttonName:ha.value,relatedContents:p==null?void 0:p.related,columns:W.value,name:p==null?void 0:p.groupNames};We.setTableLoading(p==null?void 0:p.index),Qe.value=!1,ql.value=void 0,U("change",Ol)}if((pa=(Pe=(ee=ye.value)==null?void 0:ee[0])==null?void 0:Pe.optionUrl)!=null&&pa.menuId){Qe.value=!1;let Ra=(N=p.itemData)==null?void 0:N.filter(Ol=>(Ol==null?void 0:Ol.key)==="filterAllType");if((Ra==null?void 0:Ra.length)>0){let Ol=Ra==null?void 0:Ra.map(zl=>zl==null?void 0:zl.value),il=(cl=(qa=(za=Ol.flat().find(zl=>{var xl;return(xl=zl==null?void 0:zl.content)==null?void 0:xl.includes("@Num")}))==null?void 0:za.content)==null?void 0:qa.split(":"))==null?void 0:cl[1];((fl=(Ca=(Ka=Ol.flat().find(zl=>{var xl;return(xl=zl==null?void 0:zl.content)==null?void 0:xl.includes("@Type:")}))==null?void 0:Ka.content)==null?void 0:Ca.split(":"))==null?void 0:fl[1])!=="Manual"&&(il=parseInt(il),Ce.value=(Tl=Ce.value)==null?void 0:Tl.slice(((Yl=Ce.value)==null?void 0:Yl.length)-il,(Wa=Ce.value)==null?void 0:Wa.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",si),W.value=[],Ce.value=[],Ae.value=[],H.value=[],na.value=[],fa.value=[],Be.value=[],Ke.value=[],ye.value=[],Nr.value=[],i.value=null,nn.value=""});const fo=async(f,v,M)=>{var aa,ba,Na,Aa,la,tl,xa,sl,be,Va,ga,Ja,Oa;Tr.value=(M==null?void 0:M.prop)??(M==null?void 0:M.property);const $=z.cloneDeep(p.itemData),q=((aa=$==null?void 0:$.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:aa.contents)??[];let B=q==null?void 0:q.find((Ne,ee)=>{var Pe,pa,N;return(Ne==null?void 0:Ne.prop)===Tr.value||(Ne==null?void 0:Ne.label)===Tr.value||(ee==null?void 0:ee.toString())===((N=(pa=(Pe=Tr.value)==null?void 0:Pe.split("a"))==null?void 0:pa[1])==null?void 0:N.toString())});const ie=re.getColumnChild((ba=z.cloneDeep(W.value))==null?void 0:ba.filter(Ne=>(Ne==null?void 0:Ne.label)!=="操作"));if(B||(B=ie==null?void 0:ie.find(Ne=>(Ne==null?void 0:Ne.prop)===Tr.value||(Ne==null?void 0:Ne.label)===Tr.value)),B&&!((Na=B==null?void 0:B.menus)!=null&&Na.length)&&!((Aa=B==null?void 0:B.groups)!=null&&Aa.length)&&!((la=B==null?void 0:B.words)!=null&&la.length)){const Ne=(tl=ye.value)==null?void 0:tl.find(ee=>(ee==null?void 0:ee.prop)===Tr.value);Ne&&(B={...B,menus:(Ne==null?void 0:Ne.menus)??(B==null?void 0:B.menus),groups:(Ne==null?void 0:Ne.groups)??(B==null?void 0:B.groups),words:(Ne==null?void 0:Ne.words)??(B==null?void 0:B.words),bindMenus:(Ne==null?void 0:Ne.bindMenus)??(B==null?void 0:B.bindMenus),isMainPath:(Ne==null?void 0:Ne.isMainPath)??(B==null?void 0:B.isMainPath),relatedContents:(Ne==null?void 0:Ne.relatedContents)??(B==null?void 0:B.relatedContents),endChildMenu:(Ne==null?void 0:Ne.endChildMenu)??(B==null?void 0:B.endChildMenu)})}if(B&&((xa=ye==null?void 0:ye.value)==null||xa.forEach(Ne=>{var ee,Pe,pa,N,za;(Ne==null?void 0:Ne.prop)===(B==null?void 0:B.prop)&&(Ne!=null&&Ne.endChildMenu)&&((ee=B==null?void 0:B.prop)!=null&&ee.includes(".")&&((pa=(Pe=B==null?void 0:B.prop)==null?void 0:Pe.split("."))==null?void 0:pa[0])!==((za=(N=Ne==null?void 0:Ne.prop)==null?void 0:N.split("."))==null?void 0:za[0])?B.endChildMenu=Ne==null?void 0:Ne.value:B.endChildMenu=Ne==null?void 0:Ne.endChildMenu)})),!B)return;const oe=Tr.value,K=(sl=Ce.value)==null?void 0:sl.findIndex(Ne=>(Ne==null?void 0:Ne.id)===(v==null?void 0:v.id));K!==-1&&oe&&(Ce.value[K]={...Ce.value[K],[oe]:f});const ke=Ne=>{Array.isArray(Ne)&&Ne.forEach(ee=>{Array.isArray(ee==null?void 0:ee.allSelectionContents)&&ee.allSelectionContents.length>0&&(ee.contactValue=Ce.value[K]??v),Array.isArray(ee==null?void 0:ee.children)&&ee.children.length>0&&ke(ee.children)})};ke(W.value),B.value=f,B.endChildMenu=B.endChildMenu||"";let ge=B!=null&&B.isMainPath&&(B!=null&&B.mainKey)?B==null?void 0:B.value:"";const Ye=Ne=>{Array.isArray(Ne)&&Ne.forEach(ee=>{var pa,N;if(((ee==null?void 0:ee.type)==="Select"||(ee==null?void 0:ee.formType)&&ee.formType.toUpperCase()==="SELECT"||(ee==null?void 0:ee.columnType)&&ee.columnType.toUpperCase()==="SELECT")&&Array.isArray(ee==null?void 0:ee.menus)&&ee.menus.length>0&&ee.menus[ee.menus.length-1]===""&&(B!=null&&B.isMainPath)&&(B!=null&&B.mainKey)){const za=(pa=ee==null?void 0:ee.prop)!=null&&pa.includes(".")?ee.prop.split(".")[0]:null,qa=(N=B==null?void 0:B.prop)!=null&&N.includes(".")?B.prop.split(".")[0]:null;(!za||!qa||za===qa)&&(ee.endChildMenu=ge)}Array.isArray(ee==null?void 0:ee.children)&&ee.children.length>0&&Ye(ee.children)})};if(Ye(W.value),!!(B!=null&&B.mainKey)&&Array.isArray(B==null?void 0:B.menus)&&(B==null?void 0:B.menus.length)>0&&(B!=null&&B.value)&&(B==null?void 0:B.value)!==""){let Ne=B!=null&&B.relatedContents&&((be=B==null?void 0:B.relatedContents)==null?void 0:be.length)>0?(Va=B==null?void 0:B.relatedContents)==null?void 0:Va.find(ee=>{var Pe,pa,N,za;return(ee==null?void 0:ee[(za=(Pe=B==null?void 0:B.prop)==null?void 0:Pe.split("."))==null?void 0:za[((N=(pa=B==null?void 0:B.prop)==null?void 0:pa.split("."))==null?void 0:N.length)-1]])===(B==null?void 0:B.value)}):await Ss(B);if(Ne){const ee={...v};ie==null||ie.forEach(Pe=>{var pa,N,za,qa,cl,Ka,Ca,fl,Yl,Wa,Tl,Ra,Ol,il,ml,zl;(Pe==null?void 0:Pe.prop)!==(B==null?void 0:B.prop)&&(B!=null&&B.relatedContents&&((pa=B==null?void 0:B.relatedContents)==null?void 0:pa.length)>0?(N=Pe==null?void 0:Pe.prop)!=null&&N.includes(".")&&((qa=(za=Pe==null?void 0:Pe.prop)==null?void 0:za.split("."))==null?void 0:qa[0])===((Ka=(cl=B==null?void 0:B.prop)==null?void 0:cl.split("."))==null?void 0:Ka[0])?ee[Pe.prop]=Ne[(Wa=(Ca=Pe==null?void 0:Pe.prop)==null?void 0:Ca.split("."))==null?void 0:Wa[((Yl=(fl=Pe==null?void 0:Pe.prop)==null?void 0:fl.split("."))==null?void 0:Yl.length)-1]]??ee[Pe.prop]:ee[Pe.prop]=(Ne==null?void 0:Ne[Pe.prop])??ee[Pe.prop]:re.same((B==null?void 0:B.menus)??[],(Pe==null?void 0:Pe.menus)??[])&&re.same((B==null?void 0:B.groups)??[],(Pe==null?void 0:Pe.groups)??[])&&!re.same((B==null?void 0:B.words)??[],(Pe==null?void 0:Pe.words)??[])?(Tl=Pe==null?void 0:Pe.prop)!=null&&Tl.includes(".")&&((Ol=(Ra=Pe==null?void 0:Pe.prop)==null?void 0:Ra.split("."))==null?void 0:Ol[0])!==((ml=(il=B==null?void 0:B.prop)==null?void 0:il.split("."))==null?void 0:ml[0])||(ee[Pe.prop]=(Ne==null?void 0:Ne[(zl=Pe==null?void 0:Pe.words)==null?void 0:zl.join(".")])??(Ne==null?void 0:Ne[Pe.prop])??ee[Pe.prop]):(!(Pe!=null&&Pe.isMainPath)&&re.same((B==null?void 0:B.bindMenus)??[],(Pe==null?void 0:Pe.bindMenus)??[]),ee[Pe.prop]=(Ne==null?void 0:Ne[Pe.prop])??ee[Pe.prop]))}),Ce.value=(ga=z.cloneDeep(Ce.value))==null?void 0:ga.map(Pe=>(Pe==null?void 0:Pe.id)===(v==null?void 0:v.id)?{...ee,id:Pe==null?void 0:Pe.id}:Pe)}}if((Ja=B==null?void 0:B.optionUrl)!=null&&Ja.menuSelect){let Ne="";ie==null||ie.forEach(pa=>{var N,za,qa,cl,Ka;Ne===""&&((qa=(za=(N=pa==null?void 0:pa.optionUrl)==null?void 0:N.groupSelect)==null?void 0:za[1])!=null&&qa.includes("["))&&(Ne=(Ka=(cl=pa==null?void 0:pa.optionUrl)==null?void 0:cl.groupSelect)==null?void 0:Ka[1])});let ee=await Bt(B),Pe;if(ee==null||ee.forEach(pa=>{var N,za,qa,cl,Ka,Ca,fl,Yl,Wa,Tl;Ne===((za=(N=B==null?void 0:B.optionUrl)==null?void 0:N.groupSelect)==null?void 0:za[1])&&((Ka=(cl=(qa=B==null?void 0:B.optionUrl)==null?void 0:qa.groupSelect)==null?void 0:cl[1])!=null&&Ka.includes("["))&&((Tl=z.cloneDeep(pa))==null?void 0:Tl[(Wa=(Yl=(fl=(Ca=B==null?void 0:B.optionUrl)==null?void 0:Ca.groupSelect)==null?void 0:fl[1])==null?void 0:Yl.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])===(B==null?void 0:B.value)&&(Pe=pa)}),Pe){const pa={...v};ie==null||ie.forEach(N=>{var za,qa,cl,Ka,Ca,fl,Yl,Wa,Tl,Ra,Ol;(Pe!=null&&Pe[N==null?void 0:N.label]||Pe!=null&&Pe[(Ka=(cl=(qa=(za=N==null?void 0:N.optionUrl)==null?void 0:za.groupSelect)==null?void 0:qa[1])==null?void 0:cl.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])&&((Yl=(fl=(Ca=N==null?void 0:N.optionUrl)==null?void 0:Ca.groupSelect)==null?void 0:fl[1])!=null&&Yl.includes("["))&&(pa[N.prop]=(Pe==null?void 0:Pe[N==null?void 0:N.label])||(Pe==null?void 0:Pe[(Ol=(Ra=(Tl=(Wa=N==null?void 0:N.optionUrl)==null?void 0:Wa.groupSelect)==null?void 0:Tl[1])==null?void 0:Ra.replaceAll("[",""))==null?void 0:Ol.replaceAll("]","")]))}),Ce.value=(Oa=z.cloneDeep(Ce.value))==null?void 0:Oa.map(N=>(N==null?void 0:N.id)===(v==null?void 0:v.id)?{...pa,id:N==null?void 0:N.id}:N)}}},$u=async f=>{var aa,ba,Na,Aa,la,tl,xa,sl,be,Va,ga,Ja,Oa,Ne;if(!f)return;const v=z.cloneDeep(ql.value||{});ql.value=f;const M=Hi(v),$=Hi(ql.value);if($&&$!==M&&await ht($,da.value||void 0)){Xa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),po.forEach(Pe=>{if(Object.prototype.hasOwnProperty.call(ql.value||{},Pe)||Object.prototype.hasOwnProperty.call(v||{},Pe)){const pa=(v==null?void 0:v[Pe])??"";ql.value[Pe]=pa,f[Pe]=pa}}),ye.value=(ye.value||[]).map(Pe=>{if(!(Pe!=null&&Pe.prop)||!po.includes(Pe.prop))return Pe;const pa=(v==null?void 0:v[Pe.prop])??"";return{...Pe,value:pa,selectValue:pa===""?[]:[pa]}});return}let q=z.cloneDeep(p.itemData);q==null||q.map(ee=>{var Pe,pa,N,za;return(ee==null?void 0:ee.key)==="header"&&(Array.isArray((Pe=ee.contents)==null?void 0:Pe[0])?ee.contents=(N=re.getColumnChild((pa=ee.contents)==null?void 0:pa[0]))==null?void 0:N.map((qa,cl)=>{var Ka,Ca,fl,Yl,Wa,Tl;return((fl=(Ca=(Ka=ye.value)==null?void 0:Ka.find(Ra=>(Ra==null?void 0:Ra.prop)===(qa==null?void 0:qa.prop)))==null?void 0:Ca.optionUrl)==null?void 0:fl.multiple)===!0&&!Array.isArray((Yl=Object.values(f))==null?void 0:Yl[cl])?qa.value=[(Wa=Object.values(f))==null?void 0:Wa[cl]]:qa.value=(Tl=Object.values(f))==null?void 0:Tl[cl],qa}):ee.contents=(za=ee.contents)==null?void 0:za.map((qa,cl)=>{var Ka,Ca,fl,Yl,Wa,Tl;return((fl=(Ca=(Ka=ye.value)==null?void 0:Ka.find(Ra=>(Ra==null?void 0:Ra.prop)===(qa==null?void 0:qa.prop)))==null?void 0:Ca.optionUrl)==null?void 0:fl.multiple)===!0&&!Array.isArray((Yl=Object.values(f))==null?void 0:Yl[cl])?qa.value=[(Wa=Object.values(f))==null?void 0:Wa[cl]]:qa.value=(Tl=Object.values(f))==null?void 0:Tl[cl],qa})),ee});let B=ye.value,ie=(aa=q==null?void 0:q.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:aa.contents;if(Tr.value||(B=B==null?void 0:B.map(ee=>{var Pe;return ee.value=ee.value??((Pe=ie==null?void 0:ie.find((pa,N)=>(pa==null?void 0:pa.prop)===(ee==null?void 0:ee.name)))==null?void 0:Pe.value),ee})),!gn.value)return;let oe=z.cloneDeep(Tr.value);(ba=Tr.value)!=null&&ba.includes("·")&&(Tr.value=(Aa=(Na=Tr.value)==null?void 0:Na.split("·"))==null?void 0:Aa[0]);let K=(tl=(la=q==null?void 0:q.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:la.contents)==null?void 0:tl.find((ee,Pe)=>(ee==null?void 0:ee.prop)===Tr.value);(xa=ye==null?void 0:ye.value)==null||xa.forEach(ee=>{var Pe,pa,N,za,qa,cl,Ka,Ca,fl;(ee==null?void 0:ee.prop)===(K==null?void 0:K.prop)&&(ee!=null&&ee.endChildMenu)&&((Pe=K==null?void 0:K.prop)!=null&&Pe.includes(".")&&((N=(pa=K==null?void 0:K.prop)==null?void 0:pa.split("."))==null?void 0:N[0])!==((qa=(za=ee==null?void 0:ee.prop)==null?void 0:za.split("."))==null?void 0:qa[0])?K.endChildMenu=(Ka=(cl=ee==null?void 0:ee.value)==null?void 0:cl.split(" "))==null?void 0:Ka[0]:K.endChildMenu=(fl=(Ca=ee==null?void 0:ee.endChildMenu)==null?void 0:Ca.split(" "))==null?void 0:fl[0])});let ke=K!=null&&K.isMainPath&&(K!=null&&K.mainKey)?K==null?void 0:K.value:"",ge=B,Ye=Q.value;if(Ye!=null&&Ye.find(ee=>(K==null?void 0:K.prop)===(ee==null?void 0:ee.key))&&(Ye=Ye==null?void 0:Ye.filter(ee=>(K==null?void 0:K.prop)!==(ee==null?void 0:ee.key))),Ye!=null&&Ye.find(ee=>oe===(ee==null?void 0:ee.key))&&(Ye=Ye==null?void 0:Ye.filter(ee=>oe!==(ee==null?void 0:ee.key))),(K==null?void 0:K.formType)==="Select"?ge=ge==null?void 0:ge.map(ee=>{var Pe,pa,N,za,qa,cl,Ka,Ca,fl,Yl,Wa,Tl,Ra,Ol,il,ml;return(ee==null?void 0:ee.type)==="Select"&&(((Pe=ee==null?void 0:ee.allSelectionContents)==null?void 0:Pe.length)>0&&(ee.contactValue=f),((K==null?void 0:K.prop)===(ee==null?void 0:ee.prop)||oe===(ee==null?void 0:ee.prop))&&K&&(Array.isArray(K.value)&&((pa=K.value)==null?void 0:pa.length)>0&&((N=K.value)!=null&&N.every(zl=>typeof zl=="string"))?(Ye.push({key:ee==null?void 0:ee.prop,value:[(qa=K.value)==null?void 0:qa[((za=K.value)==null?void 0:za.length)-1]]}),ee.selectValue=(cl=Ye==null?void 0:Ye.find(zl=>(zl==null?void 0:zl.key)===(ee==null?void 0:ee.prop)))==null?void 0:cl.value):Array.isArray(K.value)&&((Ka=K.value)==null?void 0:Ka.length)===0?(Ye=[],ee.selectValue=[],f[ee==null?void 0:ee.prop]=""):Array.isArray(ee.value)&&Ye.push({key:ee==null?void 0:ee.prop,value:[(Ca=ee.value)==null?void 0:Ca[(ee==null?void 0:ee.length)-1]]})),((Yl=ee==null?void 0:ee.menus)==null?void 0:Yl[((fl=ee==null?void 0:ee.menus)==null?void 0:fl.length)-1])===""&&(K!=null&&K.isMainPath)&&(K!=null&&K.mainKey)&&((Wa=ee==null?void 0:ee.prop)!=null&&Wa.includes(".")&&((Ra=(Tl=ee==null?void 0:ee.prop)==null?void 0:Tl.split("."))==null?void 0:Ra[0])!==((il=(Ol=K==null?void 0:K.prop)==null?void 0:Ol.split("."))==null?void 0:il[0])||(ee.endChildMenu=(ml=ke==null?void 0:ke.split(" "))==null?void 0:ml[0]))),ee.value=(f==null?void 0:f[ee==null?void 0:ee.prop])??(ee==null?void 0:ee.value),ee}):(K==null?void 0:K.formType)!=="Input"&&(ge=ge==null?void 0:ge.map(ee=>(ee.value=(f==null?void 0:f[ee==null?void 0:ee.prop])??(ee==null?void 0:ee.value),ee))),Q.value=Ye,ge!=null&&ge.some(ee=>(ee==null?void 0:ee.functionName)&&(ee==null?void 0:ee.functionName)!=="")){let ee=await Dt([f],W==null?void 0:W.value,"Auto",Ce.value),Pe=[];(sl=ge==null?void 0:ge.filter(N=>(N==null?void 0:N.functionName)&&(N==null?void 0:N.functionName)!==""))==null||sl.forEach(N=>{var za;((za=N==null?void 0:N.functionRelatedWords)==null?void 0:za.length)>0&&(Pe=[...Pe,...N==null?void 0:N.functionRelatedWords])}),Pe=Pe==null?void 0:Pe.filter(N=>(N==null?void 0:N[0])!=="@");let pa=[];for(let N in ee==null?void 0:ee[0])Pe!=null&&Pe.find(za=>N===za||(N==null?void 0:N.includes("."+za)))&&pa.push(((be=ee==null?void 0:ee[0])==null?void 0:be[N])!=="");(ee==null?void 0:ee.length)>0&&pa.every(N=>N)&&(ge=ge==null?void 0:ge.map(N=>{var za;return N.value=((za=ee==null?void 0:ee[0])==null?void 0:za[N==null?void 0:N.prop])??N.value,N})),ql.value=ee==null?void 0:ee[0]}if(ye.value=ge,K=Object.assign({},K??{},{relatedWords:(ga=(Va=ye==null?void 0:ye.value)==null?void 0:Va.find(ee=>(ee==null?void 0:ee.prop)===(K==null?void 0:K.prop)))==null?void 0:ga.relatedWords}),(K==null?void 0:K.mainKey)&&(K!=null&&K.value)&&(K==null?void 0:K.value)!==""){let ee=K!=null&&K.relatedContents&&((Ja=K==null?void 0:K.relatedContents)==null?void 0:Ja.length)>0?(Oa=K==null?void 0:K.relatedContents)==null?void 0:Oa.find(Pe=>{var pa,N,za,qa;return(Pe==null?void 0:Pe[(qa=(pa=K==null?void 0:K.prop)==null?void 0:pa.split("."))==null?void 0:qa[((za=(N=K==null?void 0:K.prop)==null?void 0:N.split("."))==null?void 0:za.length)-1]])===(K==null?void 0:K.value)}):await Ss(K);if(ee&&JSON.stringify(ee)!=="{}"){let Pe=ge;Pe=Pe==null?void 0:Pe.map(N=>{var za,qa,cl,Ka,Ca,fl,Yl,Wa,Tl,Ra,Ol,il,ml,zl,xl,Cr,vr,ur,_l,ir,yr;if((K==null?void 0:K.prop)===(N==null?void 0:N.prop))N.value=(ee==null?void 0:ee[(za=N==null?void 0:N.words)==null?void 0:za.join(".")])??(ee==null?void 0:ee[N==null?void 0:N.prop])??ee[(Ca=(qa=N==null?void 0:N.prop)==null?void 0:qa.split("."))==null?void 0:Ca[((Ka=(cl=N==null?void 0:N.prop)==null?void 0:cl.split("."))==null?void 0:Ka.length)-1]];else if(K!=null&&K.relatedContents&&((fl=K==null?void 0:K.relatedContents)==null?void 0:fl.length)>0)N.value=(Yl=N==null?void 0:N.prop)!=null&&Yl.includes(".")&&((Tl=(Wa=N==null?void 0:N.prop)==null?void 0:Wa.split("."))==null?void 0:Tl[0])===((Ol=(Ra=K==null?void 0:K.prop)==null?void 0:Ra.split("."))==null?void 0:Ol[0])?ee[(xl=(il=N==null?void 0:N.prop)==null?void 0:il.split("."))==null?void 0:xl[((zl=(ml=N==null?void 0:N.prop)==null?void 0:ml.split("."))==null?void 0:zl.length)-1]]:(ee==null?void 0:ee[N==null?void 0:N.prop])??(N==null?void 0:N.value);else if(re.same((K==null?void 0:K.menus)??[],(N==null?void 0:N.menus)??[])&&re.same((K==null?void 0:K.groups)??[],(N==null?void 0:N.groups)??[])&&!re.same((K==null?void 0:K.words)??[],(N==null?void 0:N.words)??[]))if((Cr=N==null?void 0:N.prop)!=null&&Cr.includes(".")&&((ur=(vr=N==null?void 0:N.prop)==null?void 0:vr.split("."))==null?void 0:ur[0])!==((ir=(_l=K==null?void 0:K.prop)==null?void 0:_l.split("."))==null?void 0:ir[0])){let Ml=Object.keys(ee);Ml=Ml==null?void 0:Ml.find(gr=>{var Dr;return gr==null?void 0:gr.includes("."+((Dr=N==null?void 0:N.words)==null?void 0:Dr.join(".")))}),N.value=(ee==null?void 0:ee[Ml])??(ee==null?void 0:ee[N==null?void 0:N.prop])??N.value}else{let Ml=Object.keys(ee);Ml=Ml==null?void 0:Ml.find(gr=>{var Dr;return gr==null?void 0:gr.includes("."+((Dr=N==null?void 0:N.words)==null?void 0:Dr.join(".")))}),N.value=(ee==null?void 0:ee[(yr=N==null?void 0:N.words)==null?void 0:yr.join(".")])??(ee==null?void 0:ee[Ml])??(ee==null?void 0:ee[N==null?void 0:N.prop])??N.value}else!(N!=null&&N.isMainPath)&&re.same((K==null?void 0:K.bindMenus)??[],(N==null?void 0:N.bindMenus)??[]),N.value=(ee==null?void 0:ee[N==null?void 0:N.prop])??N.value;return N}),ye.value=Pe;let pa={};(Ne=ye.value)==null||Ne.forEach(N=>{pa[N.prop]=N==null?void 0:N.value}),ql.value=pa}}gn.value=!0,L.value=!1},Vu=f=>f?(f==null?void 0:f.toUpperCase())==="INPUT"?"TEXTAREA":f:"TEXTAREA",Fu=f=>{var B,ie;const v=(ie=(B=na.value)==null?void 0:B.find(oe=>(oe==null?void 0:oe.label)===(f==null?void 0:f.label)))==null?void 0:ie.multiple,M=f==null?void 0:f.prop;if((f==null?void 0:f.formType)!="Select")return;Ce.value.forEach(oe=>{const K=oe==null?void 0:oe[M];v&&To.isString(K)&&(oe[M]=[K]),!v&&!To.isString(K)&&(oe[M]="")})},Gt=(f,v)=>{var M;return v==null||v.forEach($=>{f[$==null?void 0:$.prop]=$==null?void 0:$.value}),f.children&&((M=f.children)==null?void 0:M.length)>0&&(f.children=f.children.map($=>Gt($,v))),f},vt=f=>{var M,$,q,B,ie,oe;ji("");const v=(M=ye.value)==null?void 0:M.reduce((K,ke)=>(K[ke.name]=ke.value,K),{});if((($=Object.keys(v))==null?void 0:$.length)>0){ql.value=v,da.value="",sa.value=(q=Ce.value)==null?void 0:q.length,Ke.value=(B=Ee.value)==null?void 0:B.filter(ke=>(ke==null?void 0:ke.label)!=="新增");const K=(oe=(ie=Ae.value)==null?void 0:ie.filter(ke=>(ke==null?void 0:ke.label)!=="操作"))==null?void 0:oe.map(ke=>{var Ye,He,aa;const ge=(He=(Ye=na.value)==null?void 0:Ye.find(ba=>(ba==null?void 0:ba.label)===(ke==null?void 0:ke.label)))==null?void 0:He.multiple;return Fu(ke),{...ke,contents:(ke==null?void 0:ke.options)??[],optionUrl:ke!=null&&ke.formMenuSelect&&((aa=ke==null?void 0:ke.formMenuSelect)==null?void 0:aa.length)>0?{groupSelect:ke==null?void 0:ke.groupSelect,menuSelect:ke==null?void 0:ke.formMenuSelect,selectRelateType:"",type:ke==null?void 0:ke.formType,multiple:ge}:null}});W.value=K==null?void 0:K.map(ke=>Gt(ke,[{prop:"type",value:"edit"},{prop:"columnType",value:Vu(ke==null?void 0:ke.formType)||(ke==null?void 0:ke.columnType)}])),f==="createClick"&&(ha.value="新增",Ui(!0))}},Ei={START:"开始时间",END:"结束时间",HOURS:"工时"},Pu=(f,v)=>Number(z.dayjs(v).diff(z.dayjs(f),"day",!0).toFixed(1)),Kt=f=>{var B;const v=p.itemData,M=(B=v==null?void 0:v.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:B.contents,$=new Map;return M==null||M.forEach((ie,oe)=>{const{label:K}=ie;$.set(K,oe)}),!$.has(Ei.START)||!$.has(Ei.END)||!$.has(Ei.HOURS)?f:f==null?void 0:f.map(ie=>{const oe=ie==null?void 0:ie[Ei.START],K=ie==null?void 0:ie[Ei.END],ke=Pu(oe,K);return oe&&K&&(ie[Ei.HOURS]=`${ke}天`),ie})},Yt=(f,v,M=0)=>{if(M>((v==null?void 0:v.length)??""))return f;const $=v==null?void 0:v[M],q=new Map;for(const ie of f){const oe=ie[$];q.has(oe)||q.set(oe,[]),q.get(oe)&&q.get(oe).push(ie)}const B=[];for(const[ie,oe]of q){const[K,...ke]=oe,ge={...K};M+1===((v==null?void 0:v.length)??"")?ge.children=oe==null?void 0:oe.map(Ye=>(Ye.level=z.cloneDeep(M)+1,Ye)).filter((Ye,He)=>He!==0):ke.length>0&&(ge.children=Yt(ke,v,M+1)),ge.level=M,B.push(ge)}return B},Jt=(f,v,M)=>{var q;if(!(v!=null&&v.contents)||((q=v==null?void 0:v.contents)==null?void 0:q.length)===0)return f;let $=[];return $=Yt(f,v==null?void 0:v.contents,0),$},Xt=async(f,v)=>{var tl,xa,sl,be,Va,ga,Ja,Oa,Ne,ee,Pe,pa,N,za,qa,cl,Ka,Ca,fl,Yl,Wa,Tl,Ra,Ol,il,ml,zl,xl,Cr,vr,ur,_l,ir,yr,Ml,gr,Dr,br,Ir,sn,mr,Lr,jr,Qt,es,as,ls,rs,ns;const M=f==null?void 0:f.filter(ta=>(ta==null?void 0:ta.key)==="header");f==null||f.filter(ta=>(ta==null?void 0:ta.key)==="tableIndexColumn")[0];const $=f==null?void 0:f.filter(ta=>(ta==null?void 0:ta.key)==="childTree")[0];let q=!0;if((sl=(xa=(tl=f==null?void 0:f.find(ta=>(ta==null?void 0:ta.key)==="filterAllType"))==null?void 0:tl.value)==null?void 0:xa.find(ta=>(ta==null?void 0:ta.value)==="onPamButtonContents"))!=null&&sl.content){let ta=(ga=(Va=(be=f==null?void 0:f.find(Al=>(Al==null?void 0:Al.key)==="filterAllType"))==null?void 0:be.value)==null?void 0:Va.find(Al=>(Al==null?void 0:Al.value)==="onPamButtonContents"))==null?void 0:ga.content;ta=(Ja=ta==null?void 0:ta.split(":"))==null?void 0:Ja[1],ta=(Oa=ta.slice(1,(ta==null?void 0:ta.length)-1))==null?void 0:Oa.split(","),q=!!(ta!=null&&ta.find(Al=>Al==="操作"))}const B=f==null?void 0:f.find(ta=>(ta==null?void 0:ta.key)==="page"),ie=f==null?void 0:f.find(ta=>(ta==null?void 0:ta.key)==="rowButton"),oe=f==null?void 0:f.find(ta=>(ta==null?void 0:ta.key)==="extraButton"),K=f==null?void 0:f.filter(ta=>(ta==null?void 0:ta.key)==="tableContents"),ke=f==null?void 0:f.filter(ta=>(ta==null?void 0:ta.key)==="bottomButton");let ge=[],Ye=(Ne=f==null?void 0:f.filter(ta=>(ta==null?void 0:ta.key)==="filter"))==null?void 0:Ne[0];Ye=(Ye==null?void 0:Ye.contents)??"",Ye=$0(Ye),(Ye==null?void 0:Ye.length)>0&&(u.value=Ye);const He=f==null?void 0:f.filter(ta=>(ta==null?void 0:ta.key)==="tableIndex");na.value=(Pe=(ee=f==null?void 0:f.filter(ta=>(ta==null?void 0:ta.key)==="tableToForm"))==null?void 0:ee[0])==null?void 0:Pe.contents,Fe.value=(B==null?void 0:B.contents)??!0;let aa=[];lr.value===""?aa=M==null?void 0:M[0]:aa=(M==null?void 0:M.find(ta=>(ta==null?void 0:ta.selectLabel)==="("+lr.value+")"))??(M==null?void 0:M.find(ta=>!(ta!=null&&ta.selectLabel)));let ba=[];lr.value===""?ba=He==null?void 0:He[0]:ba=(He==null?void 0:He.find(ta=>(ta==null?void 0:ta.selectLabel)==="("+lr.value+")"))??(He==null?void 0:He.find(ta=>!(ta!=null&&ta.selectLabel)));let Na=[],Aa=[];if(((pa=aa==null?void 0:aa.contents)==null?void 0:pa.length)>0){let ta=[],Al=aa==null?void 0:aa.contents;if(Array.isArray(Al==null?void 0:Al[0])&&((N=Al==null?void 0:Al[0])!=null&&N.every(Za=>!(Za!=null&&Za.children)))&&(Al=Al==null?void 0:Al[0]),Al.some(Za=>Array.isArray(Za)&&(Za==null?void 0:Za.find(Xe=>Xe.children))))ta=(za=re.getGradeColumns(Al,q))==null?void 0:za[0],ta!=null&&ta.find(Za=>(Za==null?void 0:Za.label)==="操作")||ta.push({label:"操作",prop:"operate",type:"operate"});else{let Za=Al.some(Xe=>Array.isArray(Xe))?Al==null?void 0:Al[0]:Al;Za!=null&&Za.find(Xe=>(Xe==null?void 0:Xe.label)==="操作")||Za.push({label:"操作",prop:"operate",type:"operate"}),Za==null||Za.forEach((Xe,kr)=>{var an,tn,Gr,fi,Ci,Di,Rr,$n,ai,Ti,En,li,is,os,ts,ss,cs,us,ds,ps,fs;if((tn=(an=de.value)==null?void 0:an.split("/"))==null||tn.forEach(wr=>{var Or,Un,hs;wr!==""&&((hs=(Un=(Or=wr==null?void 0:wr.split(I+"updateLoading"))==null?void 0:Or[0])==null?void 0:Un.split(I+"loading"))==null||hs[0])}),Xe!=null&&Xe.methodContent){let wr=(Ci=(fi=(Gr=Xe==null?void 0:Xe.methodContent)==null?void 0:Gr.replace("@","%%#"))==null?void 0:fi.split("%%#"))==null?void 0:Ci[1];if(wr=wr==null?void 0:wr.slice(0,(wr==null?void 0:wr.length)-1),wr=re.contentTransArrayToAllNoExtra(wr??"",","),(Di=wr==null?void 0:wr.find(Or=>Or==null?void 0:Or.includes("@Button")))!=null&&Di.includes("Prop")&&((Rr=wr==null?void 0:wr.find(Or=>Or==null?void 0:Or.includes("Type")))!=null&&Rr.includes("Manual"))){let Or=(ai=($n=wr==null?void 0:wr.find(Un=>Un==null?void 0:Un.includes("@Button")))==null?void 0:$n.split(":"))==null?void 0:ai[1];Or=((li=(En=(Ti=Or==null?void 0:Or.replaceAll("[",""))==null?void 0:Ti.replaceAll("]",""))==null?void 0:En.split(","))==null?void 0:li[1])??"算法执行",Na.push(Or)}else if((is=wr==null?void 0:wr.find(Or=>Or==null?void 0:Or.includes("@Button")))!=null&&is.includes("Row")&&((os=wr==null?void 0:wr.find(Or=>Or==null?void 0:Or.includes("Type")))!=null&&os.includes("Manual"))){let Or=(ss=(ts=wr==null?void 0:wr.find(Un=>Un==null?void 0:Un.includes("@Button")))==null?void 0:ts.split(":"))==null?void 0:ss[1];Or=((ds=(us=(cs=Or==null?void 0:Or.replaceAll("[",""))==null?void 0:cs.replaceAll("]",""))==null?void 0:us.split(","))==null?void 0:ds[1])??"算法执行",Aa.push(Or)}}(ps=na.value)==null||ps.find(wr=>(wr==null?void 0:wr.prop)===(Xe==null?void 0:Xe.prop));let un=((fs=Xe==null?void 0:Xe.filter)==null?void 0:fs.includes("@EditRead=Read"))??!1;ta.push({label:(Xe==null?void 0:Xe.label)==="操作"?q?"操作":"":(Xe==null?void 0:Xe.label)??"",prop:(Xe==null?void 0:Xe.label)==="操作"?"operate":(Xe==null?void 0:Xe.prop)??"a"+kr,width:Xe!=null&&Xe.width?parseInt(Xe.width):"",fixed:(Xe==null?void 0:Xe.fixed)??void 0,sortable:(Xe==null?void 0:Xe.sortable)??!1,filterable:(Xe==null?void 0:Xe.filterable)??!1,operable:(Xe==null?void 0:Xe.operable)??!1,showSummary:(Xe==null?void 0:Xe.showSummary)??!1,align:(Xe==null?void 0:Xe.align)??"left",showOverflowTooltip:(Xe==null?void 0:Xe.showOverflowTooltip)??!0,isNotDrag:(Xe==null?void 0:Xe.isNotDrag)??!1,isEditCol:(Xe==null?void 0:Xe.isEditCol)??!1,isOperate:(Xe==null?void 0:Xe.isOperate)??!1,id:(Xe==null?void 0:Xe.id)??kr,type:(Xe==null?void 0:Xe.label)==="操作"?"operate":void 0,formType:(Xe==null?void 0:Xe.formType)??(Xe!=null&&Xe.groupSelect?"Select":""),disabled:Xe==null?void 0:Xe.disabled,options:(Xe==null?void 0:Xe.options)??[],value:(Xe==null?void 0:Xe.value)??"",isExistChild:(Xe==null?void 0:Xe.isExistChild)??!1,mainKey:(Xe==null?void 0:Xe.mainKey)??kr===0,allSelectionContents:(Xe==null?void 0:Xe.allContents)??[],filterContent:Xe==null?void 0:Xe.filterContents,menus:Xe==null?void 0:Xe.menus,groups:Xe==null?void 0:Xe.groups,words:Xe==null?void 0:Xe.words,filter:Xe==null?void 0:Xe.filter,bindMenus:Xe==null?void 0:Xe.bindMenus,fatherPath:Xe==null?void 0:Xe.fatherPath,isMainPath:Xe==null?void 0:Xe.isMainPath,required:(Xe==null?void 0:Xe.required)??!1,relatedContents:Xe==null?void 0:Xe.relatedContents,functionName:Xe==null?void 0:Xe.functionName,functionRelatedWords:Xe==null?void 0:Xe.functionRelatedWords,calculatorFilter:Xe==null?void 0:Xe.calculatorFilter,relatedPages:Xe==null?void 0:Xe.relatedPages,multiple:(Xe==null?void 0:Xe.multiple)??!1,multipleLimit:Xe==null?void 0:Xe.multipleLimit,isReadonly:un})})}ta=ta==null?void 0:ta.filter(Za=>{var Xe;return!((Xe=Za==null?void 0:Za.filter)!=null&&Xe.includes("@ShowHide=Hide"))}),O.value=(qa=ke==null?void 0:ke[0])==null?void 0:qa.contents;const cn=re.getNewColumnChild(ta);ge=re.getColumnChild(cn);const ei=Za=>Array.isArray(Za)?Za.map(Xe=>(Array.isArray(Xe==null?void 0:Xe.children)&&Xe.children.length>0?(Xe.sortable=!1,ei(Xe.children)):(Xe==null?void 0:Xe.prop)==="operate"||(Xe==null?void 0:Xe.label)==="操作"||(Xe==null?void 0:Xe.type)==="operate"||(Xe.sortable=!1),Xe)):Za;ei(cn),await Zo(cn),q0(Z.value,cn),W.value=cn,H.value=cn,r.value=(cl=W.value)==null?void 0:cl.map(Za=>Za==null?void 0:Za.label);let Hr=(Ca=(Ka=re.getAllLeafNodes(W.value))==null?void 0:Ka.filter(Za=>(Za==null?void 0:Za.type)!=="operate"))==null?void 0:Ca.map((Za,Xe)=>({prop:(Za==null?void 0:Za.prop)??"a"+Xe,column:Za.label}));Zl.value=Hr;let Xr=[];lr.value===""?Xr=K==null?void 0:K[0]:Xr=(K==null?void 0:K.find(Za=>(Za==null?void 0:Za.selectLabel)==="("+lr.value+")"))??(K==null?void 0:K.find(Za=>!(Za!=null&&Za.selectLabel)));let Ur=Array.isArray((fl=Xr==null?void 0:Xr.contents)==null?void 0:fl[0])&&((Yl=Xr==null?void 0:Xr.contents)!=null&&Yl[0].every(Za=>Array.isArray(Za)))?(Wa=Xr==null?void 0:Xr.contents)==null?void 0:Wa[0]:Xr==null?void 0:Xr.contents;ba!=null&&ba.contents&&((Tl=ba==null?void 0:ba.contents)==null?void 0:Tl.length)!==0&&(Ur=(Ra=z.cloneDeep(Ur))==null?void 0:Ra.map((Za,Xe)=>{if(!Array.isArray(Za)){let kr={};for(let un in Za)un!=="id"&&un!=="index"&&(kr[un]=Za[un]);Za=Object.values(kr)}return Za}));const ho=!!((Ol=W.value)!=null&&Ol.find(Za=>Za.prop==="index"));Ur=$t(Ur,ba==null?void 0:ba.contents,ho);const Gn=[];Ur==null||Ur.forEach((Za,Xe)=>{var un;let kr={};if(Array.isArray(Za)){let an=[];Za==null||Za.filter(tn=>!(tn!=null&&tn.id)).forEach((tn,Gr)=>{var fi,Ci,Di,Rr,$n,ai;if((fi=Hr==null?void 0:Hr[Gr])!=null&&fi.prop&&!Array.isArray(tn)){let Ti={};Ti[Hr[Gr].column]=tn,P!=null&&P.value&&((Ci=P==null?void 0:P.value)==null?void 0:Ci.length)>0&&((Di=P==null?void 0:P.value)!=null&&Di.find(En=>JSON.stringify(En==null?void 0:En[0])===JSON.stringify(Ti)))&&(an=(Rr=P==null?void 0:P.value)==null?void 0:Rr.find(En=>JSON.stringify(En==null?void 0:En[0])===JSON.stringify(Ti))),an&&an.length>0?kr[Hr[Gr].prop]=an!=null&&an.find(En=>{var li;return((li=Object.keys(En))==null?void 0:li[0])===Hr[Gr].column})?($n=an==null?void 0:an.find(En=>{var li;return((li=Object.keys(En))==null?void 0:li[0])===Hr[Gr].column}))==null?void 0:$n[Hr[Gr].column]:tn:kr[Hr[Gr].prop]=tn}else Array.isArray(tn)&&((ai=Hr[Gr])!=null&&ai.prop?kr[Hr[Gr].prop]=tn:kr.children=Tt(tn,Hr))})}else kr=Za;if(Array.isArray(Za)&&Za.some(an=>an==null?void 0:an.id)){const an=(un=Za==null?void 0:Za.find(tn=>tn.id))==null?void 0:un.id;Gn.push(Object.assign(kr,{id:to(an)}))}else kr.id?Gn.push(kr):Gn.push(Object.assign(kr,{id:Xe.toString()}))});try{const Za=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Xe=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),kr=Za==null?void 0:Za.tableId,un=Za==null?void 0:Za.compIndex;if(kr&&Array.isArray(Xe)&&Xe.length>0&&String(kr)===String(p==null?void 0:p.parentTableId)&&String(un)===String(p==null?void 0:p.index)){const an=new Set(Gn.map(Gr=>String(Gr==null?void 0:Gr.id))),tn=Xe.filter(Gr=>!an.has(String(Gr)));if(tn.length>0){const Gr=Za==null?void 0:Za.pageKey,fi=Gr!=null&&Gr.startsWith("/")?Gr.substring(1):Gr;((v==null?void 0:v[Gr])||(v==null?void 0:v[fi])||[]).filter(Rr=>{var $n,ai;return(($n=Rr==null?void 0:Rr.key)==null?void 0:$n.type)==="data"&&String((ai=Rr==null?void 0:Rr.key)==null?void 0:ai.tableId)===String(kr)&&tn.includes(Rr==null?void 0:Rr.id)}).forEach(Rr=>{var $n;an.has(String(Rr==null?void 0:Rr.id))||(Gn.push({id:Rr==null?void 0:Rr.id,...(($n=Rr==null?void 0:Rr.value)==null?void 0:$n.tableData)||{}}),an.add(String(Rr==null?void 0:Rr.id)))})}}}catch{}let Kn=null;try{const Za=`ocr_committed_temp_ids_v1:${String((p==null?void 0:p.parentTableId)??"")}:${String((p==null?void 0:p.index)??"")}`,Xe=JSON.parse(sessionStorage.getItem(Za)||"null");Array.isArray(Xe)&&Xe.length>0&&(Kn=new Set(Xe.map(kr=>String(kr))))}catch{}const qi=Array.from(((il=Da.value)==null?void 0:il.values())||[]).filter(Za=>!(!(Za!=null&&Za._isOCRRow&&(Za==null?void 0:Za._ocrTableId)===(p==null?void 0:p.index))||Kn&&Kn.has(String(Za==null?void 0:Za.id)))),vo=(Ce.value||[]).map(Za=>String(Za==null?void 0:Za.id)),sr=_i(Gn,vo);if(Ce.value=Jt(sr,$,W.value),Fa.value=sr,(ml=Fa.value)==null||ml.forEach(Za=>{var Xe;(Xe=Da.value)==null||Xe.set(Za.id,Za)}),Kn&&Kn.size>0)try{const Za=new Set(Array.from(Kn.values()));Ce.value=(Ce.value||[]).filter(Xe=>!Za.has(String(Xe==null?void 0:Xe.id))),Fa.value=(Fa.value||[]).filter(Xe=>!Za.has(String(Xe==null?void 0:Xe.id))),Za.forEach(Xe=>{var kr,un;try{(un=(kr=Da.value)==null?void 0:kr.delete)==null||un.call(kr,Xe)}catch{}})}catch{}const en=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),mt=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(en&&Array.isArray(mt)&&mt.length>0&&String(en==null?void 0:en.compIndex)===String(p==null?void 0:p.index)){const Za=new Set((Fa.value||[]).map(Xe=>String(Xe==null?void 0:Xe.id)));mt.filter(Xe=>!Za.has(String(Xe)))}if(qi.length>0){const Za=new Set((Ce.value||[]).map(kr=>kr==null?void 0:kr.id)),Xe=qi.filter(kr=>!Za.has(kr.id));Xe.length>0&&(Ce.value=[...Ce.value||[],...Xe],Fa.value=[...Fa.value||[],...Xe],Xe.forEach(kr=>{var un;return(un=Da.value)==null?void 0:un.set(kr.id,kr)}))}}else W.value=[],Ae.value=[],Ce.value=[],Fa.value=[],Da.value=new Map;if(Aa=[...new Set(Aa)],Aa=Aa==null?void 0:Aa.map(ta=>({label:ta,type:"methodButton"})),((zl=ie==null?void 0:ie.contents)==null?void 0:zl.length)>0?fa.value=ie==null?void 0:ie.contents:fa.value=[],fa.value=[...fa.value,...Aa],Na=[...new Set(Na)],Na=Na==null?void 0:Na.map(ta=>({label:ta,type:"methodButton"})),((xl=oe==null?void 0:oe.contents)==null?void 0:xl.length)>0)if((ur=(vr=(Cr=f==null?void 0:f.find(ta=>(ta==null?void 0:ta.key)==="filterAllType"))==null?void 0:Cr.value)==null?void 0:vr.find(ta=>(ta==null?void 0:ta.value)==="onButtonContents"))!=null&&ur.content){let ta=(yr=(ir=(_l=f==null?void 0:f.find(Al=>(Al==null?void 0:Al.key)==="filterAllType"))==null?void 0:_l.value)==null?void 0:ir.find(Al=>(Al==null?void 0:Al.value)==="onButtonContents"))==null?void 0:yr.content;if(ta=(Ml=ta==null?void 0:ta.split(":"))==null?void 0:Ml[1],ta=(gr=ta.slice(1,(ta==null?void 0:ta.length)-1))==null?void 0:gr.split(","),Ke.value=(Dr=oe==null?void 0:oe.contents)==null?void 0:Dr.filter(Al=>ta==null?void 0:ta.find(cn=>cn===(Al==null?void 0:Al.label))),Ee.value=(br=oe==null?void 0:oe.contents)==null?void 0:br.filter(Al=>ta==null?void 0:ta.find(cn=>cn===(Al==null?void 0:Al.label))),(Ir=oe==null?void 0:oe.contents)!=null&&Ir.some(Al=>(Al==null?void 0:Al.label)==="OCR识别")&&!((sn=Ke.value)!=null&&sn.some(Al=>(Al==null?void 0:Al.label)==="OCR识别"))){const Al=(mr=oe==null?void 0:oe.contents)==null?void 0:mr.find(cn=>(cn==null?void 0:cn.label)==="OCR识别");Ke.value=[...Ke.value,Al],Ee.value=[...Ee.value,Al]}C.value=!!(ta!=null&&ta.find(Al=>Al==="搜索")),ae.value=!!(ta!=null&&ta.find(Al=>Al==="块状显示"))}else Ke.value=oe==null?void 0:oe.contents,Ee.value=oe==null?void 0:oe.contents;else Ke.value=[],Ee.value=[];if(Ke.value=[...Ke.value,...Na],Ee.value=[...Ee.value,...Na],typeof de.value=="string"&&de.value==="设备管理/试验设备"&&(p==null?void 0:p.compName)==="设备列表"?((Lr=Ke.value)!=null&&Lr.some(ta=>(ta==null?void 0:ta.label)==="OCR识别")||(Ke.value=[...Ke.value||[],{label:"OCR识别"}]),(jr=Ee.value)!=null&&jr.some(ta=>(ta==null?void 0:ta.label)==="OCR识别")||(Ee.value=[...Ee.value||[],{label:"OCR识别"}])):(Ke.value=(Ke.value||[]).filter(ta=>(ta==null?void 0:ta.label)!=="OCR识别"),Ee.value=(Ee.value||[]).filter(ta=>(ta==null?void 0:ta.label)!=="OCR识别")),(Qt=Ke.value)!=null&&Qt.some(ta=>(ta==null?void 0:ta.label)==="切换视图")||(Ke.value=[...Ke.value||[],{label:"切换视图"}]),(es=Ee.value)!=null&&es.some(ta=>(ta==null?void 0:ta.label)==="切换视图")||(Ee.value=[...Ee.value||[],{label:"切换视图"}]),ge!=null&&ge.some(ta=>{var Al;return(ta==null?void 0:ta.calculatorFilter)&&((Al=ta==null?void 0:ta.calculatorFilter)==null?void 0:Al.includes("@Button"))})){let ta=(as=ge==null?void 0:ge.filter(Hr=>{var Xr;return(Hr==null?void 0:Hr.calculatorFilter)&&((Xr=Hr==null?void 0:Hr.calculatorFilter)==null?void 0:Xr.includes("@Button"))}))==null?void 0:as.map(Hr=>Hr==null?void 0:Hr.calculatorFilter),Al=[],cn=[],ei=[];ta==null||ta.forEach(Hr=>{var ho,Gn,Kn,qi,vo;let Xr=(ho=re.analyzeSplitToContent(Hr,","))==null?void 0:ho.map(sr=>((sr==null?void 0:sr[(sr==null?void 0:sr.length)-1])===","&&(sr=sr==null?void 0:sr.slice(0,(sr==null?void 0:sr.length)-1)),sr)),Ur=Xr==null?void 0:Xr.find(sr=>sr==null?void 0:sr.includes("@Button"));if(Xr!=null&&Xr.find(sr=>sr==null?void 0:sr.includes("Manual"))){Ur=(Kn=(Gn=Ur==null?void 0:Ur.replace("=","$R"))==null?void 0:Gn.split("$R"))==null?void 0:Kn[1],Ur=Ur==null?void 0:Ur.slice(1,(Ur==null?void 0:Ur.length)-1);let sr=(qi=re.analyzeSplitToContent(Ur,","))==null?void 0:qi.map(en=>((en==null?void 0:en[(en==null?void 0:en.length)-1])===","&&(en=en==null?void 0:en.slice(0,(en==null?void 0:en.length)-1)),en));sr=sr==null?void 0:sr[0],sr=sr==null?void 0:sr.slice(1,(sr==null?void 0:sr.length)-1),sr=(vo=sr==null?void 0:sr.split(","))==null?void 0:vo.map(en=>({label:en,prop:en})),Ur!=null&&Ur.includes("Up")?Al=[...Al,...sr??[]]:Ur!=null&&Ur.includes("Line")?cn=[...cn,...sr??[]]:ei=[...ei,...sr??[]]}}),Ke.value=[...Al,...Ke.value??[]],fa.value=[...cn,...fa.value??[]],ei.value=[...ei,...ei.value??[]]}sa.value=((ls=Ce==null?void 0:Ce.value)==null?void 0:ls.length)??0,Kt(Ce.value),Sr.value=Ce.value,rr.value&&(W.value=(ns=(rs=Ae.value)==null?void 0:rs.filter(ta=>(ta==null?void 0:ta.label)!=="操作"))==null?void 0:ns.map(ta=>{var Al;return{...ta,type:"edit",optionUrl:ta!=null&&ta.formMenuSelect&&((Al=ta==null?void 0:ta.formMenuSelect)==null?void 0:Al.length)>0?{groupSelect:ta==null?void 0:ta.groupSelect,menuSelect:ta==null?void 0:ta.formMenuSelect,selectRelateType:"",type:ta==null?void 0:ta.formType}:null}}),vt())};e.watch(()=>[p.itemData,lr.value,er.value,$l.value,P==null?void 0:P.value],async()=>{var f,v,M,$,q,B;if((f=p==null?void 0:p.itemData)!=null&&f.find(ie=>(ie==null?void 0:ie.key)==="columnPath")&&!((v=ce.value)!=null&&v.find(ie=>{var oe,K;return(ie==null?void 0:ie.key)===((K=(oe=p==null?void 0:p.itemData)==null?void 0:oe.find(ke=>(ke==null?void 0:ke.key)==="columnPath"))==null?void 0:K.contents)}))){let ie=ce.value,oe={key:($=(M=p==null?void 0:p.itemData)==null?void 0:M.find(K=>(K==null?void 0:K.key)==="columnPath"))==null?void 0:$.contents,value:(B=(q=p==null?void 0:p.itemData)==null?void 0:q.find(K=>(K==null?void 0:K.key)==="columnUsingPath"))==null?void 0:B.contents};ie!=null&&ie.find(K=>(K==null?void 0:K.key)===(oe==null?void 0:oe.key))?ie=ie==null?void 0:ie.map(K=>((K==null?void 0:K.key)===(oe==null?void 0:oe.key)&&(K.value=oe.value),K)):ie.push(oe),We.setTableViewContents(ie)}await Xt(p.itemData,p.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>p==null?void 0:p.operatingForm,f=>{f!=null&&f.form&&(ji(f==null?void 0:f.form),ha.value=f==null?void 0:f.dialogTitle,ze.value=!0,Qe.value=!0)},{immediate:!0,deep:!0});const ju=()=>{var f;(f=F.value)!=null&&f.includes("read")&&(rr.value=!rr.value)},Hu=()=>{Wr.value=!Wr.value};e.watch(()=>{var f;return(f=p==null?void 0:p.config)==null?void 0:f.viewport},f=>{var v;F.value=f,(f==null?void 0:f.length)===0?rr.value=!1:(f!=null&&f.includes("read")||(rr.value=!0),f!=null&&f.includes("edit")||(rr.value=!1)),m.value=((v=p==null?void 0:p.config)==null?void 0:v.showIndex)||rr.value},{immediate:!0}),e.watch(()=>rr.value,f=>{var v;f?(vt("viewChange"),We.setCacheUpdatingData(null)):(Ke.value=Ee.value,W.value=H.value,le.value&&(We.setTableLoading(p==null?void 0:p.index),U("change",le.value))),m.value=f||((v=p==null?void 0:p.config)==null?void 0:v.showIndex),Nr.value=[]},{immediate:!0}),e.watch(()=>{var f;return(f=Ln.value)==null?void 0:f.length},f=>{f===0&&(ue.currentPage=1)}),e.watch(()=>p==null?void 0:p.compNames,f=>{Y.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:f||[],width:1}]},{immediate:!0}),e.ref(!1);const Uu=(f,v)=>{var M;vt("createClick"),v===ue.pageSize&&(ue.currentPage=Math.ceil(((M=Ce.value)==null?void 0:M.length)/ue.pageSize))},qu=async(f,v,M)=>{var q,B,ie,oe,K;const $=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if($&&po.includes($)&&M!==void 0&&M!==null&&String(M).trim()!==""){const ke=String(M).trim();if(await ht(ke,f==null?void 0:f.id)){Xa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ye=(q=Ce.value)==null?void 0:q.findIndex(aa=>(aa==null?void 0:aa.id)===(f==null?void 0:f.id)),He=Ye!==-1?(ie=(B=Ce.value)==null?void 0:B[Ye])==null?void 0:ie[$]:void 0;$&&(f[$]=He??"");return}}if(rr.value){const ke=f==null?void 0:f.id;ke!=null&&(d.value.has(ke)||d.value.set(ke,z.cloneDeep(f)),o.value.add(ke));const ge=(oe=Ce.value)==null?void 0:oe.findIndex(Ye=>(Ye==null?void 0:Ye.id)===(f==null?void 0:f.id));ge!==-1&&$&&(Ce.value[ge]={...Ce.value[ge],[$]:M}),fo(M,f,v);return}fo(M,f,v),ql.value=z.cloneDeep(f),da.value=f==null?void 0:f.id,sa.value=(K=Ce.value)==null?void 0:K.length,ha.value=f!=null&&f._isTemp?"新增":"编辑",Ui(!1)},Wu=async()=>{var f,v;try{const M=[];if(p!=null&&p.related&&Array.isArray(p.related)&&(console.log("props.related",p.related),p.related.forEach($=>{if(typeof $=="string"&&$.includes("content_")){const q=$.split("_")[1];q&&(M.push(`content_${q}`),M.push(`struct_${q}`))}})),M.length===0&&(p!=null&&p.itemData)){const $=(v=(f=p.itemData)==null?void 0:f.find(q=>(q==null?void 0:q.key)==="contentTableId"))==null?void 0:v.contents;$&&(M.push(`content_${$}`),M.push(`struct_${$}`))}return M}catch(M){return console.error("获取 tableNames 失败:",M),[]}},Gu=async(f,v,M)=>{var B,ie;if(!M||typeof M!="string"||M.trim()===""){const oe=(v==null?void 0:v.property)??(v==null?void 0:v.prop),K=`${f==null?void 0:f.id}:${oe}`;y.value.delete(K),g.value.set(K,!1);return}const $=(v==null?void 0:v.property)??(v==null?void 0:v.prop),q=`${f==null?void 0:f.id}:${$}`;g.value.set(q,!0);try{const oe=await Wu();if(oe.length===0){console.warn("未找到同名表,跳过全局搜索"),y.value.delete(q),g.value.set(q,!1);return}const K=parseInt((B=Nl.value)==null?void 0:B.plat_id);if(!K){console.warn("platId 无效,跳过全局搜索"),y.value.delete(q),g.value.set(q,!1);return}const ke=await z.getAllTables({platId:K,tableNames:oe??[]}),ge=((ie=ke==null?void 0:ke.data)==null?void 0:ie.result)||[],Ye=[],He=[];for(let aa=0;aa<ge.length;aa+=2)aa+1<ge.length&&He.push([ge[aa],ge[aa+1]]);He.forEach(([aa,ba])=>{var sl;if(!Array.isArray(aa)||aa.length===0||!Array.isArray(ba)||ba.length===0)return;const Na=ba[0];let Aa=((sl=Na==null?void 0:Na.结构)==null?void 0:sl.contents)??[];if(!Array.isArray(Aa)||Aa.length===0)return;let la=z.cloneDeep(Aa);if(Array.isArray(la==null?void 0:la[0])&&(la=re.getColumnChild(la[0])),!Array.isArray(la)||la.length===0||!la.some(be=>(be==null?void 0:be.prop)===$))return;[...aa].sort((be,Va)=>{const ga=Number((be==null?void 0:be.update_time)??0);return Number((Va==null?void 0:Va.update_time)??0)-ga}).slice(0,20).forEach(be=>{const Va=be[$];if(Va!=null){const ga=String(Va);ga.toLowerCase().includes(M.toLowerCase())&&Ye.findIndex(Oa=>{var Ne;return be.id&&((Ne=Oa.rowData)==null?void 0:Ne.id)===be.id?!0:Oa.label===ga})===-1&&Ye.push({label:ga,rowData:z.cloneDeep(be),sourceTable:(Na==null?void 0:Na.source_table)||""})}})}),y.value.set(q,Ye)}catch(oe){console.error("全局搜索建议失败:",oe),y.value.delete(q)}finally{g.value.set(q,!1)}},Ku=(f,v,M)=>{if(!rr.value)return;const $=(v==null?void 0:v.property)??(v==null?void 0:v.prop),q=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(q&&q.toUpperCase()!=="INPUT"&&q!=="")return;const B=`${f==null?void 0:f.id}:${$}`;if(b.has(B)&&clearTimeout(b.get(B)),!M||M.trim()===""){y.value.delete(B),g.value.set(B,!1);return}const ie=setTimeout(()=>{Gu(f,{prop:$,property:$},M),b.delete(B)},300);b.set(B,ie)};function Yu(f,v){const M=`${f==null?void 0:f.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return y.value.get(M)||[]}const Ju=(f,v,M)=>{var ke;if(!M||!M.rowData)return;const $=M.rowData,q=f==null?void 0:f.id,B=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(re.getAllLeafNodes(W.value)||[]).filter(ge=>(ge==null?void 0:ge.type)!=="operate"&&(ge==null?void 0:ge.label)!=="操作"&&(ge==null?void 0:ge.prop)!=="operate").forEach(ge=>{const Ye=ge==null?void 0:ge.prop;Ye&&$[Ye]!==void 0&&(f[Ye]=$[Ye])}),(ke=Ce.value)==null||ke.findIndex(ge=>(ge==null?void 0:ge.id)===q),q!=null&&(d.value.has(q)||d.value.set(q,z.cloneDeep(f)),o.value.add(q));const K=`${q}:${B}`;y.value.delete(K),g.value.set(K,!1),fo(f[B],f,v)},fn=f=>{var K,ke,ge,Ye,He,aa,ba,Na,Aa,la,tl;const{row:v,column:M,item:$,slotData:q}=f;let B=v!=null&&v[M==null?void 0:M.prop]||(v==null?void 0:v[M==null?void 0:M.prop])===0?((ke=(K=v==null?void 0:v[M==null?void 0:M.prop])==null?void 0:K[0])==null?void 0:ke.contents)??((v==null?void 0:v[M==null?void 0:M.prop])===0?"0":v==null?void 0:v[M==null?void 0:M.prop]):((Ye=(ge=v==null?void 0:v[$==null?void 0:$.prop])==null?void 0:ge[0])==null?void 0:Ye.contents)??(v==null?void 0:v[$==null?void 0:$.prop])??((aa=(He=q==null?void 0:q[$==null?void 0:$.prop])==null?void 0:He[0])==null?void 0:aa.contents)??(q==null?void 0:q[$==null?void 0:$.prop])??((Aa=(Na=v==null?void 0:v[(ba=$==null?void 0:$.child)==null?void 0:ba.prop])==null?void 0:Na[0])==null?void 0:Aa.contents)??(v==null?void 0:v[(la=$==null?void 0:$.child)==null?void 0:la.prop]),oe=Array.isArray(B)&&!(B!=null&&B.every(xa=>typeof xa=="string"||typeof xa=="number"))?"查看":B;if(oe=Array.isArray(oe)?oe.join(","):oe,(M==null?void 0:M.formType)==="Date")if(!oe||oe===""||oe===null||oe===void 0)oe="";else{const xa=z.dayjs(oe,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);oe=xa.isValid()?xa.format("YYYYMMDD"):oe??""}return Array.isArray(M==null?void 0:M.relatedPages)&&((tl=M==null?void 0:M.relatedPages)==null?void 0:tl.length)>0&&(oe="详情页"),oe},Xu=f=>{var ke,ge,Ye,He,aa,ba,Na,Aa,la,tl;const{row:v,column:M,item:$,slotData:q}=f;let B=v!=null&&v[M==null?void 0:M.prop]?((ge=(ke=v==null?void 0:v[M==null?void 0:M.prop])==null?void 0:ke[0])==null?void 0:ge.contents)??(v==null?void 0:v[M==null?void 0:M.prop]):((He=(Ye=v==null?void 0:v[$==null?void 0:$.prop])==null?void 0:Ye[0])==null?void 0:He.contents)??(v==null?void 0:v[$==null?void 0:$.prop])??((ba=(aa=q==null?void 0:q[$==null?void 0:$.prop])==null?void 0:aa[0])==null?void 0:ba.contents)??(q==null?void 0:q[$==null?void 0:$.prop])??((la=(Aa=v==null?void 0:v[(Na=$==null?void 0:$.child)==null?void 0:Na.prop])==null?void 0:Aa[0])==null?void 0:la.contents)??(v==null?void 0:v[(tl=$==null?void 0:$.child)==null?void 0:tl.prop]);const oe=Array.isArray(B)&&!(B!=null&&B.every(xa=>typeof xa=="string"||typeof xa=="number")),K=Array.isArray(B)&&(B==null?void 0:B.find(xa=>xa==null?void 0:xa.url));return oe&&K},Zu=f=>{var M,$,q,B;return f!=null&&f.column?(de.value,p==null||p.compName,(($=(M=f==null?void 0:f.column)==null?void 0:M.filter)==null?void 0:$.includes("@TextRGBA"))||((B=(q=f==null?void 0:f.column)==null?void 0:q.filter)==null?void 0:B.includes("@TextBackRGBA"))):!1},Qu=(f,v)=>f.find(M=>Object.values(M).some($=>$===v));return e.watch(()=>Je.value,async f=>{if(f){Le.setContentLoading(!0),await e.nextTick();const v=Qu(Ce.value,f==null?void 0:f.data);if(!v)return Le.setContentLoading(!1);await uo(f==null?void 0:f.data,null,v,{data:f==null?void 0:f.data}),Le.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>p==null?void 0:p.cacheNewData,f=>{var v;f&&(Array.isArray(f)?f.forEach(M=>{var $,q,B,ie,oe;if(换,String(M==null?void 0:M.compId)===String(p==null?void 0:p.index)&&(M!=null&&M.resId)&&(($=M==null?void 0:M.data)!=null&&$.id)){const K=(q=M==null?void 0:M.data)==null?void 0:q.id,ke=M==null?void 0:M.resId;if(Ce.value=(B=Ce.value)==null?void 0:B.map(ge=>{if((ge==null?void 0:ge.id)===K){const Ye={...ge,id:ke};return delete Ye._isOCRRow,delete Ye._ocrTableId,Ye}return ge}),(oe=(ie=Da.value)==null?void 0:ie.has)!=null&&oe.call(ie,K)){const Ye={...Da.value.get(K)||{},id:ke};delete Ye._isOCRRow,delete Ye._ocrTableId,Da.value.delete(K),Da.value.set(ke,Ye)}ar(p==null?void 0:p.index,K,ke)}}):String(f==null?void 0:f.compId)===String(p==null?void 0:p.index)&&(Ce.value=(v=Ce.value)==null?void 0:v.map(M=>{var $;if((M==null?void 0:M.id)===(($=f==null?void 0:f.data)==null?void 0:$.id)){const q={...M,id:f==null?void 0:f.resId};return delete q._isOCRRow,delete q._ocrTableId,q}return M})))},{immediate:!0,deep:!0}),(f,v)=>{var la,tl,xa,sl;const M=e.resolveComponent("svg-icon"),$=e.resolveComponent("el-popover"),q=e.resolveComponent("el-switch"),B=e.resolveComponent("el-checkbox"),ie=e.resolveComponent("el-radio"),oe=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-checkbox-group"),ke=e.resolveComponent("el-button"),ge=e.resolveComponent("el-icon"),Ye=e.resolveComponent("el-progress"),He=e.resolveComponent("el-alert"),aa=e.resolveComponent("el-table-column"),ba=e.resolveComponent("el-table"),Na=e.resolveComponent("el-upload"),Aa=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",I3,[Sn.value?(e.openBlock(),e.createBlock(ul.ssTable,{id:"excel-table",pageObj:ue,showIndex:m.value,isTree:(la=a.compItem)==null?void 0:la.isTree,summaryInfo:me,columns:W.value,defaultSort:ve,isCardViewport:Wr.value,checkedColumns:r.value,key:Ql.value+JSON.stringify(W.value),tableData:Ln.value,isEditViewport:rr.value,isShowPagination:Fe.value,isShowEdit:!1,isShowDelete:!1,allowSelect:D.value,onDbClickRow:it,extraButton:Ke.value,rowButton:fa.value,cacheExtraButtons:Ee.value,isClearSelection:((tl=Nr.value)==null?void 0:tl.length)===0,onDoCurrentChange:jo,onDoSizeChange:Ho,onSortChange:Uo,onContentClick:uo,onRowClick:tt,onSelectChange:xi,onCellChange:qu,onCellInput:Ku,onSelectSuggest:Ju,onChange:fo,onPreview:oo,onSubmitEditingTable:Pn,onHandleColEditChange:Wo,onHandleColTypeChange:Go,onClickButton:pt,onAddNewRow:Ko,bottomButton:O.value,allowRowAddOrDelete:nt.value},e.createSlots({headerButton:e.withCtx(be=>{var Va,ga,Ja,Oa;return[a.showHeader?(e.openBlock(),e.createBlock(n0,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(ia)===e.unref(de),filterValues:co.value,selectNums:(Va=Nr.value)==null?void 0:Va.length,dataNums:(ga=Ce.value)==null?void 0:ga.length,compName:a.compName,isDevMode:a.isDevMode,buttons:be.buttons,menuFilter:(Oa=(Ja=a.compItem)==null?void 0:Ja.component)==null?void 0:Oa.menuFilter,onButtonClick:v[1]||(v[1]=(Ne,ee,Pe)=>pt(Ne,ee,{extra:Pe})),columns:W.value,onFilter:Pi,onGetImportData:dn,level:a.level,filterShow:C.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var be,Va,ga,Ja;return[((be=Ce.value)==null?void 0:be.length)>0&&a.allowOperate&&ae.value?(e.openBlock(),e.createElementBlock("div",R3,[(Va=F.value)!=null&&Va.includes("read")&&((ga=F.value)!=null&&ga.includes("edit"))&&((Ja=fa.value)!=null&&Ja.some(Oa=>(Oa==null?void 0:Oa.label)==="编辑"))&&!Wr.value&&e.unref(ia)!==e.unref(de)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:ju},[e.createVNode(M,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:be,index:Va})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ga=>Uu(be,Va)},[e.createVNode(M,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,$3)]),operateCol:e.withCtx(()=>[e.createVNode($,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Lu,onBeforeEnter:Ru},{reference:e.withCtx(()=>[e.createElementVNode("span",V3,[e.createVNode(M,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",F3,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(q,{"model-value":R.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=be=>Qo(be))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(K,{modelValue:r.value,"onUpdate:modelValue":v[3]||(v[3]=be=>r.value=be),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Qn.value,be=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:be.label},[e.createVNode(B,{value:be.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:be.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(be.label),9,P3)]),_:2},1032,["value"]),e.createVNode($,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(M,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Va;return[e.createElementVNode("div",j3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Va=Object.keys(be))==null?void 0:Va.filter(ga=>{var Ja;return(Ja=E.value)==null?void 0:Ja.find(Oa=>(Oa==null?void 0:Oa.value)===ga)}),ga=>{var Ja,Oa;return e.openBlock(),e.createElementBlock("div",{key:ga},[S[ga]=="radio"?(e.openBlock(),e.createElementBlock("div",H3,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(oe,{"model-value":be==null?void 0:be[ga],onChange:Ne=>Fi(Ne,ga,be)},{default:e.withCtx(()=>{var Ne,ee;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ee=(Ne=E.value)==null?void 0:Ne.find(Pe=>(Pe==null?void 0:Pe.value)===ga))==null?void 0:ee.options,Pe=>(e.openBlock(),e.createBlock(ie,{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),S[ga]=="switch"?(e.openBlock(),e.createBlock(q,{key:1,"model-value":be==null?void 0:be[ga],"active-text":(Oa=(Ja=E.value)==null?void 0:Ja.find(Ne=>(Ne==null?void 0:Ne.value)===ga))==null?void 0:Oa.label,onChange:Ne=>Fi(Ne,ga,be)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",U3,[e.createVNode(M,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(be=>{var Va,ga,Ja,Oa,Ne,ee,Pe,pa,N,za,qa,cl,Ka,Ca,fl,Yl,Wa,Tl,Ra,Ol;return[((Va=be==null?void 0:be.column)==null?void 0:Va.label)==="证书附件"||((ga=be==null?void 0:be.column)==null?void 0:ga.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",q3,[e.createVNode(M,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(il=>Tu(be),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Xu(be)?(e.openBlock(),e.createBlock($,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",W3,e.toDisplayString(fn(be)),1)]),default:e.withCtx(()=>{var il,ml;return[e.createElementVNode("div",G3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ml=be==null?void 0:be.row)==null?void 0:ml[(il=be==null?void 0:be.column)==null?void 0:il.prop],zl=>(e.openBlock(),e.createElementBlock("div",K3,[e.createElementVNode("div",{class:"prop-url",title:ci(zl),onClick:xl=>rt(zl)},e.toDisplayString(ci(zl)),9,Y3),e.createElementVNode("div",{class:"prop-download",onClick:xl=>so(zl)}," 下载 ",8,J3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Zu(be)?(e.openBlock(),e.createBlock(hc,{key:0,value:fn(be),columnContent:be==null?void 0:be.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(fn(be))&&((Oa=(Ja=fn(be))==null?void 0:Ja.toString())!=null&&Oa.includes(".txt")||(ee=(Ne=fn(be))==null?void 0:Ne.toString())!=null&&ee.includes(".cpt")||(pa=(Pe=fn(be))==null?void 0:Pe.toString())!=null&&pa.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(fn(be))&&((za=(N=fn(be))==null?void 0:N.toString())!=null&&za.includes(".txt")||(cl=(qa=fn(be))==null?void 0:qa.toString())!=null&&cl.includes(".cpt")||(Ca=(Ka=fn(be))==null?void 0:Ka.toString())!=null&&Ca.includes(".cyd"))?"underline":"",cursor:!Array.isArray(fn(be))&&((Yl=(fl=fn(be))==null?void 0:fl.toString())!=null&&Yl.includes(".txt")||(Tl=(Wa=fn(be))==null?void 0:Wa.toString())!=null&&Tl.includes(".cpt")||(Ol=(Ra=fn(be))==null?void 0:Ra.toString())!=null&&Ol.includes(".cyd"))?"pointer":"",marginLeft:(be==null?void 0:be.colIndex)===0?`${((be==null?void 0:be.level)??0)*20}px`:0}),onClick:il=>{var ml;return An(fn(be),((ml=be==null?void 0:be.column)==null?void 0:ml.relatedPages)??[])}},e.toDisplayString(fn(be)===0?"0":fn(be)),13,X3))],64))]}),_:2},[((xa=fa.value)==null?void 0:xa.length)>0?{name:"actions",fn:e.withCtx(({item:be,fIndex:Va})=>[e.createVNode($,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(M,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",O3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(di(fa.value,be),(ga,Ja)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ja,onClick:e.withModifiers(Oa=>pt(ga==null?void 0:ga.label,be,{extra:ga}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:ga==null?void 0:ga.textColor}),class:"extra-button-label"},e.toDisplayString(ga==null?void 0:ga.label),5)],8,L3))),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),rr.value?(e.openBlock(),e.createElementBlock("div",Z3,[e.createVNode(ke,{id:"themeBorderButton",onClick:Jo},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(ke,{class:"ok-button",id:"themeButton",onClick:Vi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(Vr.ssDialog,{title:ha.value,visible:Qe.value,width:Pr.value,onBeforeDestroy:et,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Q3,[e.createVNode(ul.ssForm,{ref_key:"formRef",ref:Oe,rowContents:ye.value,showOperator:!1,onChange:$u,isEnableWrap:!1,layer:!0,onFixChangeValue:Hn,onClickTrigger:at,isEdit:ja.value,onBlurChange:Xo,onCreate:io,onTagChange:Mr},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[ze.value?(e.openBlock(),e.createElementBlock("div",eh,[e.createVNode(ke,{onClick:v[4]||(v[4]=be=>Qe.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(ke,{class:"ok-button",onClick:v[5]||(v[5]=be=>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(Vr.ssDialog,{title:ha.value,visible:ne.value,width:qe.value,onBeforeDestroy:v[7]||(v[7]=be=>ne.value=!1)},{default:e.withCtx(()=>[e.createVNode(g0)]),footer:e.withCtx(()=>[e.createElementVNode("div",ah,[e.createVNode(ke,{onClick:v[6]||(v[6]=be=>ne.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(ke,{class:"ok-button",onClick:st,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),Ge.value?(e.openBlock(),e.createBlock(ul.ssFilePreview,{key:2,fileDataList:Me.value,onDestroy:ot},null,8,["fileDataList"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createBlock(Vr.ssDialog,{key:3,visible:te.value,onBeforeDestroy:Iu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Do.ThreeViewerHost,{files:Be.value,threeData:se.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Vr.ssDialog,{title:"OCR扫描录入",visible:Sl.value,"close-on-click-modal":!1,onBeforeDestroy:cr,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",lh,[e.createElementVNode("div",rh,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ua.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:Ua.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:Ua.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)]),Ua.value===1?(e.openBlock(),e.createElementBlock("div",nh,[e.createVNode(ke,{onClick:T,class:"ocr-action-btn",disabled:pr.value,size:"default"},{default:e.withCtx(()=>v[33]||(v[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(ke,{onClick:pi,class:"ocr-action-btn",disabled:pr.value,size:"default"},{default:e.withCtx(()=>v[34]||(v[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),Ua.value===1?(e.openBlock(),e.createElementBlock("div",ih,[e.createElementVNode("div",oh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ya.value,(be,Va)=>{var ga;return e.openBlock(),e.createElementBlock("div",{key:Va,class:"ocr-file-item"},[e.createElementVNode("div",th,[be.raw&&((ga=be.raw.type)!=null&&ga.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:pn(be),alt:"预览",class:"thumbnail-image"},null,8,sh)):(e.openBlock(),e.createElementBlock("div",ch,[e.createVNode(ge,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Xa.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:nr(be)==="uploading",processing:nr(be)==="processing",completed:nr(be)==="completed"||nr(be)==="uploaded",failed:nr(be)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",uh,[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:nr(be)==="completed"||nr(be)==="uploaded",uploading:nr(be)==="uploading",processing:nr(be)==="processing",failed:nr(be)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:nr(be)==="failed"?"#f56c6c":nr(be)==="completed"||nr(be)==="uploaded"?"#67c23a":"#409eff","stroke-width":nr(be)==="completed"||nr(be)==="uploaded"||nr(be)==="failed"?3:2,"stroke-dasharray":Rn(be),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,dh)])),nr(be)==="completed"||nr(be)==="uploaded"?(e.openBlock(),e.createElementBlock("div",ph,[e.createVNode(ge,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Xa.check_default))]),_:1})])):e.createCommentVNode("",!0),nr(be)==="failed"?(e.openBlock(),e.createElementBlock("div",fh,[e.createVNode(ge,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Xa.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ja=>Nu(Va)},[e.createVNode(ge,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Xa.close_default))]),_:1})],8,hh)]),e.createElementVNode("div",vh,e.toDisplayString(be.name||"文件名123"),1)])}),128))]),ya.value.length>0?(e.openBlock(),e.createElementBlock("div",mh,[e.createVNode(ke,{onClick:dl,class:"ocr-start-recognize-btn",disabled:pr.value||ya.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ua.value===1?(e.openBlock(),e.createElementBlock("div",yh,[e.createVNode(Ye,{percentage:Te.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),Ua.value===2?(e.openBlock(),e.createElementBlock("div",gh,[e.createElementVNode("div",bh,[e.createVNode(He,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",kh,[e.createVNode(ba,{data:Ya.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(aa,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe.value,be=>(e.openBlock(),e.createBlock(aa,{key:be.prop,prop:be.prop,"min-width":be.minWidth||230,"class-name":be.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",xh,[e.createElementVNode("span",null,e.toDisplayString(be.label),1)])]),default:e.withCtx(({row:Va,$index:ga})=>{var Ja,Oa,Ne;return[be.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:hr(Va[be.prop]),fontWeight:500})},e.toDisplayString(tr(Va[be.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[kl.value!==ga?(e.openBlock(),e.createElementBlock("span",wh,e.toDisplayString(Va[be.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Pa(be.prop)),{key:1,modelValue:Va[be.prop],"onUpdate:modelValue":ee=>Va[be.prop]=ee,size:"small",placeholder:"请输入"+be.label,content:((Ja=wa(be.prop))==null?void 0:Ja.contents)??((Oa=wa(be.prop))==null?void 0:Oa.options)??[],optionUrl:(Ne=wa(be.prop))==null?void 0:Ne.optionUrl,onChange:ee=>Vl(ga,be.prop,ee),onFocus:ee=>Ma.value=be.prop,onBlur:v[8]||(v[8]=ee=>Ma.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(aa,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:be})=>[kl.value===be?(e.openBlock(),e.createBlock(ge,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Va=>Kl(be),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Xa.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(M,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers(Va=>Kl(be),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),Ua.value===3?(e.openBlock(),e.createElementBlock("div",_h,[e.createVNode(ge,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Xa.check_default))]),_:1}),v[37]||(v[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(Na,{ref:"ocrUploadRef","file-list":ya.value,"onUpdate:fileList":v[9]||(v[9]=be=>ya.value=be),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":nl,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[Ua.value!==3?(e.openBlock(),e.createElementBlock("div",Sh,[e.createVNode(ke,{onClick:Cu,class:"ocr-start-recognize-btn",disabled:Ua.value===1||pr.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(ke,{onClick:Du,class:"ocr-start-recognize-btn",disabled:pr.value},{default:e.withCtx(()=>v[40]||(v[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(L0,{visible:w.value,onConfirm:j,onCancel:v[10]||(v[10]=be=>w.value=!1)},null,8,["visible"]),e.createVNode(Ud,{visible:vl.value,"onUpdate:visible":v[11]||(v[11]=be=>vl.value=be),versions:Bl.value},null,8,["visible","versions"]),e.createVNode(Nd,{visible:ea.value,"onUpdate:visible":v[12]||(v[12]=be=>ea.value=be),images:ma.value,"default-image-name":Ha.value,"field-meta":kl.value!==null?((sl=Ya.value[kl.value])==null?void 0:sl.__ocrFieldMeta)||{}:{},"focused-field-name":Ma.value,onClose:v[13]||(v[13]=be=>ea.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(rp,{visible:ka.value,"onUpdate:visible":v[14]||(v[14]=be=>ka.value=be),candidates:Ul.value,"name-prop":Ze.value,"mfr-prop":La.value,columns:W.value,onSubmit:ln,onPreviewFile:Bu},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(up,{visible:oa.value,"onUpdate:visible":v[15]||(v[15]=be=>oa.value=be),ocrPreviewData:Ya.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=be=>Ya.value=be),ocrSelectedFields:Qa.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=be=>Qa.value=be),ocrPreviewColumns:pe.value,onConfirm:El,onFieldChange:v[18]||(v[18]=({rowIndex:be,prop:Va,value:ga})=>Vl(be,Va,ga))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(Vr.ssDialog,{title:Y.title,visible:Y.show,width:Y.width,onBeforeDestroy:ca},{default:e.withCtx(()=>[e.createElementVNode("div",Eh,[e.createVNode(ul.ssForm,{rowContents:Y==null?void 0:Y.contents,formRules:Y==null?void 0:Y.formRules,showOperator:!1,buttonValue:Y.buttonValue,isEdit:ja.value,isStartJustify:!1,onOnButtonClick:Ia},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(Vr.ssDialog,{title:"",visible:J.show,width:J.width,alignCenter:!0,onBeforeDestroy:xe},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",Ch,e.toDisplayString(J.title),1),e.createVNode(Aa,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",Dh,[e.createVNode(Aa,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(nn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",Th,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J==null?void 0:J.buttonValue,be=>(e.openBlock(),e.createBlock(ke,{key:be==null?void 0:be.label,style:e.normalizeStyle({background:be==null?void 0:be.background,color:be==null?void 0:be.color}),onClick:Va=>Se(be==null?void 0:be.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(be==null?void 0:be.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(i0,{columns:J==null?void 0:J.columns,tableData:J==null?void 0:J.tableData},{content:e.withCtx(({row:be,item:Va,slotData:ga,scope:Ja,column:Oa,columnProp:Ne,$index:ee})=>[e.createTextVNode(e.toDisplayString((be==null?void 0:be[Oa==null?void 0:Oa.prop])||(be==null?void 0:be[Oa==null?void 0:Oa.label])||(be==null?void 0:be[Oa==null?void 0:Oa.property])||(ga==null?void 0:ga[Oa==null?void 0:Oa.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"]),e.createVNode(ul.Signature,{signPadInfo:$a.value,onBeforeDestroy:wl,onClickSubmitSign:el},null,8,["signPadInfo"])])}}},Yc=fr._export_sfc(Nh,[["__scopeId","data-v-12c76af6"]]),Ah={key:1,class:"static-form-body"},zh=["onClick"],Mh=["src"],Ih={key:1},Oh=["src"],Lh=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},backgroundPosition:{default:"Center"},iconUrl:{default:void 0},calculator:{default:()=>[]},textBackColor:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,i=x=>{switch(x){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},o=e.computed(()=>{var I;const x=(I=r.itemData)==null?void 0:I.find(R=>(R==null?void 0:R.key)==="formContent"),k=(x==null?void 0:x.contents)||[];return(r.fields&&r.fields.length>0?r.fields:k).filter(R=>(R==null?void 0:R.label)||(R==null?void 0:R.isHideInForm)).map(R=>{let ae=R==null?void 0:R.value;Array.isArray(ae)&&(ae=ae.map(U=>U==null?"":typeof U=="object"?U.label??U.value??U.name??JSON.stringify(U):String(U)).filter(Boolean).join(",")),ae!=null&&typeof ae=="object"&&(ae=ae.label??ae.value??ae.name??JSON.stringify(ae));const X=R.isHideInForm?"":R.label??"",me=ae==null||ae===""?"-":String(ae),ue=X==="使用状态";return{label:X,value:me,isStatus:ue,tagType:ue?i(me):"",width:R.width??1,field:R}})}),d=e.ref(null),c=e.ref(null),u=e.computed(()=>{const x=Number(r==null?void 0:r.textSize),k=re.rgbaToColor(r==null?void 0:r.textColor),_={},I={},R={},ae={};return!Number.isNaN(x)&&x&&(_.fontSize=`${x}px`,I.fontSize=`${x+1}px`,R.fontSize=`${x}px`,ae.fontSize=`${x}px`),k&&(I.color=k,R.color=k,ae.color=k),{item:_,label:I,value:R,empty:ae}}),y=e.ref(""),b=e.ref(""),g=e.ref(!1),p=async x=>{if(x){b.value&&(URL.revokeObjectURL(b.value),b.value="");try{const k=await z.platformDownloadFile({url:x}),_=new Blob([k==null?void 0:k.data],{type:(k==null?void 0:k.headers["content-type"])||"image/*"});b.value=URL.createObjectURL(_)}catch{b.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,x=>{x&&(y.value=x)},{immediate:!0}),e.watch(y,x=>{p(x)},{immediate:!0});const D=async()=>{var x,k;((x=r==null?void 0:r.calculator)==null?void 0:x.length)>0&&await Rt(o.value,"Auto",[],r==null?void 0:r.calculator),(k=c.value)==null||k.click()},m=async x=>{var I,R,ae;const k=x.target,_=(I=k==null?void 0:k.files)==null?void 0:I[0];if(!_){k.value="";return}g.value=!0;try{const X=new FormData;X.append("file",_);const me=await z.platformUploadFile(X),ue=(ae=(R=me==null?void 0:me.data)==null?void 0:R.result)==null?void 0:ae.url;ue?(y.value=ue,n("update:backGroundImage",ue),p(ue),Xa.ElMessage.success("背景图片上传成功")):Xa.ElMessage.error("背景图片上传失败")}catch{Xa.ElMessage.error("背景图片上传失败")}finally{g.value=!1,k.value=""}},F=e.computed(()=>{var x,k,_,I;return b.value||(r==null?void 0:r.backgroundUrl)!==""?{backgroundImage:`url("${(x=r==null?void 0:r.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundPosition:`${((k=r==null?void 0:r.backgroundPosition)==null?void 0:k.toLowerCase())??"center"} center`,backgroundRepeat:"no-repeat",cursor:((_=r==null?void 0:r.calculator)==null?void 0:_.length)>0?"pointer":"auto"}:{cursor:((I=r==null?void 0:r.calculator)==null?void 0:I.length)>0?"pointer":"auto",background:r!=null&&r.textBackColor?re.rgbaToColor(r==null?void 0:r.textBackColor):void 0}}),C=x=>ul.getComponent(x),L=x=>{if(!x)return;const k=x.querySelector("input, textarea, .el-input__inner");k&&typeof k.focus=="function"&&k.focus()},O=(x,k,_)=>{r.disabled||(d.value=k,e.nextTick(()=>{L(_.currentTarget)}))},S=()=>{d.value=null},E=x=>{const k=x!=null&&x.width&&x.width>0?x.width:1,I=`calc((100% - ${(k-1)*48}px) / ${k})`;return{flex:`0 0 ${I}`,maxWidth:I,minWidth:"0",boxSizing:"border-box"}};return(x,k)=>{const _=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(F.value),onClick:k[1]||(k[1]=I=>D())},[(r==null?void 0:r.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:k[0]||(k[0]=e.withModifiers(I=>D(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:m},null,544),k[2]||(k[2]=e.createElementVNode("img",{src:ul._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),o.value.length?(e.openBlock(),e.createElementBlock("div",Ah,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(I,R)=>{var ae,X,me,ue,U,W,Z,Q,ve;return e.openBlock(),e.createElementBlock("div",{key:R,class:"static-form-item",style:e.normalizeStyle({...E(I),...u.value.item})},[I.label&&!((ae=I==null?void 0:I.field)!=null&&ae.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(u.value.label)},e.toDisplayString(I.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(u.value.value),onClick:Ae=>{var te;return(te=I.field)!=null&&te.isNoClick?null:O(I,R,Ae)}},[x.iconUrl&&x.backgroundPosition==="Left"?(e.openBlock(),e.createElementBlock("img",{key:0,src:x.iconUrl,class:"bg-upload-icon"},null,8,Mh)):e.createCommentVNode("",!0),d.value===R&&I.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C(((X=I.field)==null?void 0:X.type)??"Input")),{key:1,modelValue:I.field.value,"onUpdate:modelValue":Ae=>I.field.value=Ae,isEdit:!0,disabled:(me=I.field)==null?void 0:me.disabled,content:((ue=I.field)==null?void 0:ue.contents)??[],optionUrl:I.field,originalValue:(U=I.field)==null?void 0:U.value,config:(W=I.field)==null?void 0:W.config,configModel:((Z=I.field)==null?void 0:Z.prop)??((Q=I.field)==null?void 0:Q.name),selectedTagList:((ve=I.field)==null?void 0:ve.selectValue)??[],onBlur:S,onBlurChange:S},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[I.isStatus?(e.openBlock(),e.createBlock(_,{key:0,type:I.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",Ih,e.toDisplayString(I.value??"-"),1))],64)),x.iconUrl&&x.backgroundPosition==="Right"?(e.openBlock(),e.createElementBlock("img",{key:3,src:x.iconUrl,class:"bg-upload-icon"},null,8,Oh)):e.createCommentVNode("",!0)],12,zh)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(u.value.empty)}," 暂无数据 ",4))],4)}}}),Jc=fr._export_sfc(Lh,[["__scopeId","data-v-f6c4a15a"]]),Rh={class:"form-content"},$h={title:"选择标签"},Vh={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Fh={class:"col-operate-wrap"},Ph={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},jh={__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:()=>{}},calculator:{type:Array,default:()=>[]}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:l}){const r=()=>{y.value=!1,b.value=!1,g.value=[]},n=a;e.computed(()=>{var na;const ne=(na=Me.value)==null?void 0:na.split("/");return(ne==null?void 0:ne.some(fa=>(fa==null?void 0:fa.includes("updateLoading"))||(fa==null?void 0:fa.includes("loading"))))?!1:se.value==="view"});const i=l,o=e.ref(""),d=e.ref(""),c=e.ref("Center"),u=e.ref([]),y=e.ref(!1),b=e.ref(!1),g=e.ref([]),{getFileExtension:p}=Do.useThreeSystem(),D=e.ref(),m=e.ref(!1),F=e.ref(!1),C=z.useUnit(z.pinia),{chooseTitle:L}=z.storeToRefs(C),O=e.ref([]),S=e.ref(),E=e.ref(!1),x=e.ref([]),k=Cc(z.pinia),_=Vt(z.pinia),I=e.ref(!1),R=e.ref(),ae=e.ref(),X=e.ref(),me=e.ref(),ue=e.ref(),U=e.ref(),W=z.useLoginState(z.pinia),{loginUserInfo:Z}=z.storeToRefs(W),Q=e.ref(),ve=e.ref(!0),Ae=z.useModelComp(z.pinia),{tableViewContents:te,itemData:A,isEdit:se,routeToChildPath:G,lockingPage:fe,homepageBackgroundTableId:we,refreshCurrentPageInform:_e}=z.storeToRefs(Ae),Ue=e.ref(null),ra=e.ref(!1),H=e.ref(!1),Ge=z.useMenuState(),{activeMenuPath:Me}=z.storeToRefs(Ge),Le=re.useOriginalState(z.pinia),{originalPath:Ie}=z.storeToRefs(Le),{compType:de,hasEditable:De}=dc.useRole(),Je=()=>!De(n.config,{type:de.FORM});e.computed(()=>Me.value==="设备管理/试验设备"&&n.compName==="设备概要");const Sa=async()=>{var na,fa,ze;const ne=we==null?void 0:we.value,qe=(na=Z==null?void 0:Z.value)==null?void 0:na.plat_id;if(!(!ne||!qe))try{const Be=await z.getAllTables({platId:parseInt(qe),tableNames:[`content_${ne}`,`struct_${ne}`],user_unique_id:"0"}),Ke=((ze=(fa=Be==null?void 0:Be.data)==null?void 0:fa.result)==null?void 0:ze[0])??[],Ee=String((n==null?void 0:n.index)??""),ye=Ke==null?void 0:Ke.find($a=>String($a==null?void 0:$a.relatedForm_id)===Ee);ye!=null&&ye.backgroundImg_url&&(ue.value=ye.backgroundImg_url)}catch(Be){console.error("获取首页背景图片表数据失败:",Be)}},We=e.ref([]),V=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),P=async ne=>{H.value=ne,await va("disabled",null,ne,!0)},le=async ne=>{await va("operable",null,ne,!0)};e.watch(()=>Me.value,async()=>{u.value=[],g.value=[]},{deep:!0,immediate:!0});const ce=()=>{e.nextTick(()=>{Ve()})},he=ne=>{var qe;u.value=(qe=u.value)==null?void 0:qe.map(na=>({...na,isFormColHidden:!(ne!=null&&ne.includes(na.label))}))};e.onUnmounted(()=>{Ue.value=null});const ua=ne=>{i("clickTrigger",ne)},ia=async ne=>{var qe,na,fa,ze,Be,Ke;if(ne===""){let Ee="";(qe=u.value)==null||qe.forEach(el=>{el!=null&&el.isMain&&(Ee=el==null?void 0:el.value)});let ye=await re.getItemData(G.value,sessionStorage.getItem("systemKey"),"");Ee=((Ke=(Be=(ze=(fa=(na=ye==null?void 0:ye[0])==null?void 0:na.compData)==null?void 0:fa.find(el=>(el==null?void 0:el.key)==="mainRouters"))==null?void 0:ze.contents)==null?void 0:Be[0])==null?void 0:Ke.routerContent)+Ie.value+Ee;let wl=await re.getItemData(Ee,sessionStorage.getItem("systemKey"),"");E.value=!0,x.value=wl==null?void 0:wl.filter(el=>(el==null?void 0:el.comp)!=="methodButton"),i("routeUrl",x.value)}},Ve=()=>{var qe;const ne=(qe=Ue.value)==null?void 0:qe.$el;ne&&Fl.Sortable.create(ne,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:na=>{const{oldIndex:fa,newIndex:ze}=na;if(fa===ze)return;const Be=u.value.splice(fa,1)[0];u.value.splice(ze,0,Be)}})},va=async(ne,qe,na,fa=!1)=>{try{Ae.setRefreshCurStructure(!1)}catch{Xa.ElMessage.error("编辑处理失败")}},Ea=async(ne,qe)=>{await va()},Ce=async(ne,qe)=>{ne&&await va()},Fa=async(ne,qe,na)=>{await va(qe,na,ne,!1)},Da=(ne,qe)=>{Q.value===qe?ve.value=!1:ve.value=!0,Q.value=qe==null?void 0:qe.changeProp},da=async ne=>{var Ke;ue.value=ne;const qe=n.itemData,na=qe==null?void 0:qe.find(Ee=>(Ee==null?void 0:Ee.key)==="backGroundImage");na?na.contents=ne:qe==null||qe.push({key:"backGroundImage",contents:ne}),i("change",{key:"backGroundImage",contents:ne});const fa=we==null?void 0:we.value,ze=n==null?void 0:n.index,Be=(Ke=Z==null?void 0:Z.value)==null?void 0:Ke.plat_id;if(!(!fa||!Be||!ze||!ne))try{await z.pageBatchAddApi({platId:parseInt(Be),changeContents:[{tableName:`content_${fa}`,tableContents:[{backgroundImg_url:ne,relatedForm_id:String(ze)}]}],user_unique_id:"0"})}catch(Ee){console.error("保存背景图片记录失败:",Ee),Xa.ElMessage.error("背景图片记录保存失败")}},ja=async ne=>{var na,fa,ze,Be,Ke,Ee,ye,$a,wl,el,Pl,bl,jl,ll,Hl;let qe=[];if((na=ne==null?void 0:ne.toString())!=null&&na.includes(".urdf")){if(ne.includes(",")){Xa.ElMessage.error("当前版本仅允许单个urdf预览!");return}g.value=[{url:ne,extension:p(ne)}],b.value=!0,y.value=!0;return}if((fa=ne==null?void 0:ne.toString())!=null&&fa.includes(".stl")||(ze=ne==null?void 0:ne.toString())!=null&&ze.includes(".STL")||(Be=ne==null?void 0:ne.toString())!=null&&Be.includes(".obj")||(Ke=ne==null?void 0:ne.toString())!=null&&Ke.includes(".mtl")){const Jl=((Ee=ne==null?void 0:ne.toString())==null?void 0:Ee.split(",")).map(Xl=>({url:Xl,extension:p(Xl)}));g.value=Jl,b.value=!1,y.value=!0;return}if((ye=ne==null?void 0:ne.toString())!=null&&ye.includes(".stl")||($a=ne==null?void 0:ne.toString())!=null&&$a.includes(".STL")||(wl=ne==null?void 0:ne.toString())!=null&&wl.includes(".obj")||(el=ne==null?void 0:ne.toString())!=null&&el.includes(".mtl")){let Ga,Jl=[],Xl={};if(Array.isArray(ne)?Ga=ne:Ga=ne==null?void 0:ne.split(","),Ga==null||Ga.forEach(ar=>{ar.includes(".mtl")?Jl.push(ar):Xl.blob=Xl.blob?Xl.blob+","+ar:ar}),(Jl==null?void 0:Jl.length)>0&&(Xl.mtlBlobs=Jl),(bl=(Pl=Object.values(Xl))==null?void 0:Pl[0])!=null&&bl.includes("http:"))qe.push(Xl);else{const ar=new Blob([Xl.blob],{type:"application/octet-stream;charset=UTF-8"});let Sl=URL.createObjectURL(ar),pr="";(jl=ne==null?void 0:ne.split("/"))==null||jl.forEach((ya,ol)=>{var vl;ol===((vl=ne==null?void 0:ne.split("/"))==null?void 0:vl.length)-1&&(pr=ya)}),(ll=Xl.blob)!=null&&ll.includes(".stl")&&(pr=(pr==null?void 0:pr.replaceAll(">",""))+".urdf"),S.value=[{name:pr,blobUrl:Sl}],F.value=!0}}else{const Ga=z.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Jl=await Xa.axios.get(ne,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ga.close()}),Xl=new Blob([Jl.data],{type:"application/octet-stream;charset=UTF-8"});let ar=URL.createObjectURL(Xl),Sl="";(Hl=ne==null?void 0:ne.split("/"))==null||Hl.forEach((pr,ya)=>{var ol;ya===((ol=ne==null?void 0:ne.split("/"))==null?void 0:ol.length)-1&&(Sl=pr)}),S.value=[{name:Sl,blobUrl:ar}],F.value=!0}(qe==null?void 0:qe.length)>0&&_.setBlobUrls(qe)},sa=()=>{F.value=!1},Fe=ne=>{var Be,Ke,Ee,ye;const qe=(Ke=(Be=ul.safeClone(n.itemData))==null?void 0:Be.find($a=>($a==null?void 0:$a.key)==="formContent"))==null?void 0:Ke.contents,na=ul.safeClone(ne.content);let fa={};na&&((Ee=Object.values(na))==null?void 0:Ee.length)>0&&((ye=Object.values(na))==null||ye.forEach(($a,wl)=>{fa[qe[wl].key]=$a}));const ze={content:fa,index:n==null?void 0:n.index,buttonName:ne==null?void 0:ne.buttonName};i("change",ze)};e.computed(()=>"http://222.92.178.198:62001");const ha=async ne=>{var Pl,bl,jl,ll,Hl,Ga,Jl,Xl,ar,Sl,pr,ya,ol,vl,Bl,Ua;if(!ne)return;(bl=(Pl=n==null?void 0:n.itemData)==null?void 0:Pl.find(_a=>(_a==null?void 0:_a.key)==="parentFormPath"))==null||bl.contents;let qe=te.value;(qe==null?void 0:qe.length)>0&&(qe=qe==null?void 0:qe.map(_a=>{var Te,oa,Ya,pe;let rl=(Te=_a==null?void 0:_a.key)==null?void 0:Te.split("/");return(n==null?void 0:n.compName)===(rl==null?void 0:rl[0])&&(oa=u.value)!=null&&oa.find(wa=>(wa==null?void 0:wa.prop)===(rl==null?void 0:rl[1]))&&(_a.value=(pe=(Ya=u.value)==null?void 0:Ya.find(wa=>(wa==null?void 0:wa.prop)===(rl==null?void 0:rl[1])))==null?void 0:pe.value),_a}),Ae.setTableViewContents(qe));const na=ul.safeClone(n.itemData);let fa=na==null?void 0:na.map(_a=>{var rl;return(_a==null?void 0:_a.key)==="formContent"&&((rl=_a.contents)==null||rl.map((Te,oa)=>{var Ya,pe,wa,Pa,pl,Il,Qa,kl,Ma,ea,ma,Ha,ka,Ul,Gl,Ba,Rl,Fr,Br,Ze,La;return Te.type=(pe=(Ya=u.value)==null?void 0:Ya.find(hl=>(hl==null?void 0:hl.prop)===(Te==null?void 0:Te.prop)))==null?void 0:pe.type,Te.options=Te!=null&&Te.options?Te.options:((pl=(Pa=(wa=Te==null?void 0:Te.key)==null?void 0:wa.split("$"))==null?void 0:Pa[1])==null?void 0:pl.length)>0?(Ma=(kl=td((Qa=(Il=Te==null?void 0:Te.key)==null?void 0:Il.split("$"))==null?void 0:Qa[1]))==null?void 0:kl.split(","))==null?void 0:Ma.map(hl=>({label:hl,value:hl})):[],(ea=Te==null?void 0:Te.key)!=null&&ea.includes("$")&&(Te.key=(Ha=(ma=Te==null?void 0:Te.key)==null?void 0:ma.split("$"))==null?void 0:Ha[0]),Te.signature=(Ul=(ka=u.value)==null?void 0:ka.find(hl=>(hl==null?void 0:hl.prop)===(Te==null?void 0:Te.prop)))==null?void 0:Ul.signature,Te.isLoginUser=(Ba=(Gl=u.value)==null?void 0:Gl.find(hl=>(hl==null?void 0:hl.prop)===(Te==null?void 0:Te.prop)))==null?void 0:Ba.isLoginUser,Te.value=(Rl=Object.values(ne))==null?void 0:Rl[oa],Te.isFormColHidden=(Br=(Fr=u.value)==null?void 0:Fr.find(hl=>(hl==null?void 0:hl.prop)===(Te==null?void 0:Te.prop)))==null?void 0:Br.isFormColHidden,Te.isHideInForm=(La=(Ze=u.value)==null?void 0:Ze.find(hl=>(hl==null?void 0:hl.prop)===(Te==null?void 0:Te.prop)))==null?void 0:La.isHideInForm,Te})),_a}),ze=u.value,Be=(ll=(jl=ul.safeClone(fa))==null?void 0:jl.find(_a=>(_a==null?void 0:_a.key)==="formContent"))==null?void 0:ll.contents;if(ze=ze==null?void 0:ze.map(_a=>{var rl,Te;return(_a==null?void 0:_a.type)==="Select"&&((rl=_a==null?void 0:_a.allSelectionContents)==null?void 0:rl.length)>0&&(_a.contactValue=ne),_a.value=(Te=Be==null?void 0:Be.find((oa,Ya)=>((oa==null?void 0:oa.id)??Ya)===(_a==null?void 0:_a.id)))==null?void 0:Te.value,_a}),!ve.value){i("contentChange",{contents:fa,index:n.index});return}let Ke="",Ee=(Jl=(Ga=(Hl=ul.safeClone(fa))==null?void 0:Hl.find(_a=>(_a==null?void 0:_a.key)==="formContent"))==null?void 0:Ga.contents)==null?void 0:Jl.find((_a,rl)=>{var Te,oa,Ya;return(_a==null?void 0:_a.label)===Q.value||rl.toString()===((Ya=(oa=(Te=Q.value)==null?void 0:Te.split("t"))==null?void 0:oa[1])==null?void 0:Ya.toString())}),ye=(Xl=Ee==null?void 0:Ee.optionUrl)==null?void 0:Xl.menuSelect,$a=!0;if((pr=(Sl=(ar=ul.safeClone(fa))==null?void 0:ar.find(_a=>(_a==null?void 0:_a.key)==="formContent"))==null?void 0:Sl.contents)==null||pr.forEach(_a=>{var rl,Te,oa,Ya,pe,wa;$a&&((oa=(Te=(rl=_a==null?void 0:_a.optionUrl)==null?void 0:rl.groupSelect)==null?void 0:Te[1])!=null&&oa.includes("["))&&(Ke=(pe=(Ya=_a==null?void 0:_a.optionUrl)==null?void 0:Ya.groupSelect)==null?void 0:pe[1],JSON.stringify(ye)===JSON.stringify((wa=_a==null?void 0:_a.optionUrl)==null?void 0:wa.menuSelect)&&($a=!1))}),(ya=Ee==null?void 0:Ee.optionUrl)!=null&&ya.menuSelect&&ve.value){let _a=await Bt(Ee),rl,Te=(ol=Ee==null?void 0:Ee.optionUrl)==null?void 0:ol.menuSelect;if(_a==null||_a.forEach(oa=>{var Ya,pe,wa,Pa,pl,Il,Qa,kl,Ma,ea;Ke===((pe=(Ya=Ee==null?void 0:Ee.optionUrl)==null?void 0:Ya.groupSelect)==null?void 0:pe[1])&&((pl=(Pa=(wa=Ee==null?void 0:Ee.optionUrl)==null?void 0:wa.groupSelect)==null?void 0:Pa[1])!=null&&pl.includes("["))&&((ea=ul.safeClone(oa))==null?void 0:ea[(Ma=(kl=(Qa=(Il=Ee==null?void 0:Ee.optionUrl)==null?void 0:Il.groupSelect)==null?void 0:Qa[1])==null?void 0:kl.replaceAll("[",""))==null?void 0:Ma.replaceAll("]","")])===(Ee==null?void 0:Ee.value)&&(rl=oa)}),rl){let oa=ul.safeClone(ze);oa=oa==null?void 0:oa.map(pe=>{var wa,Pa,pl,Il,Qa,kl,Ma,ea,ma,Ha,ka;return(rl!=null&&rl[pe==null?void 0:pe.label]||rl!=null&&rl[(Il=(pl=(Pa=(wa=pe==null?void 0:pe.optionUrl)==null?void 0:wa.groupSelect)==null?void 0:Pa[1])==null?void 0:pl.replaceAll("[",""))==null?void 0:Il.replaceAll("]","")])&&((Ma=(kl=(Qa=pe==null?void 0:pe.optionUrl)==null?void 0:Qa.groupSelect)==null?void 0:kl[1])!=null&&Ma.includes("["))&&Te!=null&&Te.every(Ul=>{var Gl,Ba;return(Ba=(Gl=pe==null?void 0:pe.optionUrl)==null?void 0:Gl.menuSelect)==null?void 0:Ba.includes(Ul)})&&(pe.value=(rl==null?void 0:rl[pe==null?void 0:pe.label])||(rl==null?void 0:rl[(ka=(Ha=(ma=(ea=pe==null?void 0:pe.optionUrl)==null?void 0:ea.groupSelect)==null?void 0:ma[1])==null?void 0:Ha.replaceAll("[",""))==null?void 0:ka.replaceAll("]","")]),Array.isArray(pe.value)&&pe.value.every(Ul=>(Ul==null?void 0:Ul.url)&&(Ul==null?void 0:Ul.name))&&(pe.type="Upload")),pe}),oa=oa==null?void 0:oa.map(pe=>{var wa,Pa,pl;return(wa=pe==null?void 0:pe.optionUrl)!=null&&wa.oldMenuSelect&&(pe.optionUrl.menuSelect=(pl=(Pa=ul.safeClone(pe))==null?void 0:Pa.optionUrl)==null?void 0:pl.oldMenuSelect),pe}),u.value=ul.safeClone(oa);let Ya=ul.safeClone(oa);Ya=Ya==null?void 0:Ya.map(pe=>{var wa,Pa,pl,Il,Qa,kl;return(Pa=(wa=pe==null?void 0:pe.optionUrl)==null?void 0:wa.menuSelect)!=null&&Pa.some(Ma=>Ma==null?void 0:Ma.includes("["))&&(pe.optionUrl.oldMenuSelect=(Il=(pl=ul.safeClone(pe))==null?void 0:pl.optionUrl)==null?void 0:Il.menuSelect,pe.optionUrl.menuSelect=(kl=(Qa=pe==null?void 0:pe.optionUrl)==null?void 0:Qa.menuSelect)==null?void 0:kl.map(Ma=>{var ea,ma,Ha,ka;if(Ma!=null&&Ma.includes("[")){let Ul=(ma=(ea=Ma==null?void 0:Ma.replaceAll("[","").replaceAll("]",""))==null?void 0:ea.split(":"))==null?void 0:ma[1];Ma=(ka=(Ha=ul.safeClone(oa))==null?void 0:Ha.find(Gl=>(Gl==null?void 0:Gl.label)===Ul))==null?void 0:ka.value}return Ma})),pe}),u.value=Ya}else u.value=ze;fa=fa==null?void 0:fa.map(oa=>{var Ya;return(oa==null?void 0:oa.key)==="formContent"&&(oa.contents=(Ya=oa.contents)==null?void 0:Ya.map(pe=>{var wa,Pa,pl,Il;return pe.value=((Pa=(wa=u.value)==null?void 0:wa.find(Qa=>(Qa==null?void 0:Qa.label)===(pe==null?void 0:pe.key)))==null?void 0:Pa.value)??(pe==null?void 0:pe.value),pe.type=((Il=(pl=u.value)==null?void 0:pl.find(Qa=>(Qa==null?void 0:Qa.prop)===(pe==null?void 0:pe.key)))==null?void 0:Il.type)??(pe==null?void 0:pe.type),pe})),oa})}ve.value=!1,i("contentChange",{contents:fa,index:n.index});let wl=[],el=[];if((Bl=ul.safeClone((vl=fa==null?void 0:fa.find(_a=>(_a==null?void 0:_a.key)==="formContent"))==null?void 0:vl.contents))==null||Bl.forEach(_a=>{var rl;Array.isArray(_a==null?void 0:_a.value)&&((rl=_a==null?void 0:_a.value)!=null&&rl.find(Te=>{var oa;return(oa=Te==null?void 0:Te.url)==null?void 0:oa.includes(".obj")}))&&(el=_a==null?void 0:_a.value)}),(el==null?void 0:el.length)>0){const _a=(Ua=ul.safeClone(el))==null?void 0:Ua.filter(rl=>{var Te;return(Te=rl==null?void 0:rl.url)==null?void 0:Te.includes(".obj")});_a==null||_a.forEach(rl=>{var oa,Ya,pe,wa;const Te=(oa=el==null?void 0:el.filter(Pa=>{var pl;return(Pa==null?void 0:Pa.name)===(rl==null?void 0:rl.name)&&((pl=Pa==null?void 0:Pa.url)==null?void 0:pl.includes(".mtl"))}))==null?void 0:oa.map(Pa=>Pa==null?void 0:Pa.url);wl.push({objUrl:rl==null?void 0:rl.url,mtlUrls:((Ya=el==null?void 0:el.filter(Pa=>{var pl;return(Pa==null?void 0:Pa.name)===(rl==null?void 0:rl.name)&&((pl=Pa==null?void 0:Pa.url)==null?void 0:pl.includes(".mtl"))}))==null?void 0:Ya.length)===1?(wa=(pe=el==null?void 0:el.filter(Pa=>{var pl;return(Pa==null?void 0:Pa.name)===(rl==null?void 0:rl.name)&&((pl=Pa==null?void 0:Pa.url)==null?void 0:pl.includes(".mtl"))}))==null?void 0:pe[0])==null?void 0:wa.url:Te})}),_.setObjUrl(wl)}},Qe=(ne,qe,na)=>{let fa="";const ze=qe==null?void 0:qe.map(Be=>{var Ke;return(Ke=Be==null?void 0:Be.value)==null?void 0:Ke.pageData});return ze==null||ze.forEach(Be=>{var Ke;(Be==null?void 0:Be.name)===(ne==null?void 0:ne[0])&&((Ke=Be==null?void 0:Be.compData)==null||Ke.forEach(Ee=>{var ye;(Ee==null?void 0:Ee.key)==="formContent"&&((ye=Ee==null?void 0:Ee.contents)==null||ye.forEach($a=>{var wl;($a==null?void 0:$a.prop)===(ne==null?void 0:ne[1])&&(fa=($a==null?void 0:$a.value)===""?re.judgeContents((wl=ul.safeClone($a))==null?void 0:wl.optionUrl,na):$a==null?void 0:$a.value)}))}))}),fa},Oe=(ne,qe,na,fa)=>{var Ee,ye;let ze="",Be="";(Ee=ul.safeClone(qe))==null||Ee.forEach(($a,wl)=>{$a!=null&&$a.includes("[")?Be=Be+Ie.value+ne[wl]:Be=Be===""?Be+$a:Be+"/"+$a});let Ke=(ye=fa[Be])==null?void 0:ye.map($a=>{var wl;return(wl=$a==null?void 0:$a.value)==null?void 0:wl.pageData});return Ke==null||Ke.forEach($a=>{var wl;($a==null?void 0:$a.name)===(na==null?void 0:na[0])&&((wl=$a==null?void 0:$a.compData)==null||wl.forEach(el=>{var Pl;(el==null?void 0:el.key)==="formContent"&&((Pl=el==null?void 0:el.contents)==null||Pl.forEach(bl=>{(bl==null?void 0:bl.prop)===(na==null?void 0:na[1])&&(ze=bl==null?void 0:bl.value)}))}))}),ze};e.watch(()=>we==null?void 0:we.value,async()=>{await Sa()},{immediate:!0});const $e=async ne=>await Rt(ne,"Auto");return e.watch(()=>_e.value,async()=>{var ne;(ne=u.value)!=null&&ne.some(qe=>(qe==null?void 0:qe.functionName)&&(qe==null?void 0:qe.functionName)!=="")&&(u.value=await $e(u.value))},{immediate:!0,deep:!0}),e.watch(()=>n.itemData,async()=>{var jl,ll,Hl,Ga,Jl,Xl,ar,Sl,pr,ya,ol,vl,Bl,Ua,_a,rl,Te,oa,Ya,pe,wa,Pa,pl,Il,Qa,kl,Ma,ea,ma,Ha,ka,Ul,Gl,Ba,Rl,Fr,Br;const ne=(jl=n.itemData)==null?void 0:jl.find(Ze=>(Ze==null?void 0:Ze.key)==="formContent");let qe=(ll=n.itemData)==null?void 0:ll.find(Ze=>(Ze==null?void 0:Ze.key)==="backGround");qe&&((Hl=qe==null?void 0:qe.contents)==null?void 0:Hl.length)>0&&(((Jl=(Ga=qe==null?void 0:qe.contents)==null?void 0:Ga[0])==null?void 0:Jl.fileType)==="Picture"&&(o.value=((ar=(Xl=qe==null?void 0:qe.contents)==null?void 0:Xl[0])==null?void 0:ar.url)??""),((pr=(Sl=qe==null?void 0:qe.contents)==null?void 0:Sl[0])==null?void 0:pr.fileType)==="Icon"&&(d.value=((ol=(ya=qe==null?void 0:qe.contents)==null?void 0:ya[0])==null?void 0:ol.url)??""),c.value=((Bl=(vl=qe==null?void 0:qe.contents)==null?void 0:vl[0])==null?void 0:Bl.position)??"");const na=(Ua=ul.safeClone(n.itemData))==null?void 0:Ua.find(Ze=>(Ze==null?void 0:Ze.key)==="formButton"),fa=(_a=ul.safeClone(n.itemData))==null?void 0:_a.find(Ze=>(Ze==null?void 0:Ze.key)==="formFlex"),ze=(rl=ul.safeClone(n.itemData))==null?void 0:rl.find(Ze=>(Ze==null?void 0:Ze.key)==="formWrap"),Be=(Te=ul.safeClone(n.itemData))==null?void 0:Te.find(Ze=>(Ze==null?void 0:Ze.key)==="enableWrap"),Ke=(oa=ul.safeClone(n.itemData))==null?void 0:oa.find(Ze=>(Ze==null?void 0:Ze.key)==="textSize"),Ee=(Ya=ul.safeClone(n.itemData))==null?void 0:Ya.find(Ze=>(Ze==null?void 0:Ze.key)==="textRGBA"),ye=(pe=ul.safeClone(n.itemData))==null?void 0:pe.find(Ze=>(Ze==null?void 0:Ze.key)==="textBackRGBA"),$a=(wa=ul.safeClone(n.itemData))==null?void 0:wa.find(Ze=>(Ze==null?void 0:Ze.key)==="backGround"),wl=(Pa=ul.safeClone(n.itemData))==null?void 0:Pa.find(Ze=>(Ze==null?void 0:Ze.key)==="backGroundImage");(ze==null?void 0:ze.contents)==="纵向"?m.value=!1:m.value=!0;const el=Number(Ke==null?void 0:Ke.contents);R.value=Number.isNaN(el)?void 0:el,ae.value=Ee==null?void 0:Ee.contents,X.value=ye==null?void 0:ye.contents,me.value=$a==null?void 0:$a.contents,ue.value=wl==null?void 0:wl.contents;const Pl=Be==null?void 0:Be.contents;if(Pl===void 0?I.value=vi.BLOCK:typeof Pl=="boolean"?I.value=Pl?vi.ORDINARY:vi.BLOCK:I.value=Pl,U.value=typeof(fa==null?void 0:fa.contents)!="boolean"?!(!(fa!=null&&fa.contents)===""||((pl=fa==null?void 0:fa.contents)==null?void 0:pl.toUpperCase())==="VERTICAL"):fa==null?void 0:fa.contents,((Il=ne==null?void 0:ne.contents)==null?void 0:Il.length)>0&&Array.isArray(ne==null?void 0:ne.contents)){let Ze=n.allMapContents;const La=(kl=(Qa=ul.safeClone(ne))==null?void 0:Qa.contents)==null?void 0:kl.map((Re,Zl)=>{var Wr,Nr,Tr,gn,Sn,Cn,mn,On,nn,Dn,Vn,on,Fn;let ql=(Re==null?void 0:Re.label)??(Re==null?void 0:Re.key)??"";Re==null||Re.type;let Jr=(Re==null?void 0:Re.options)??[];if((Wr=Re==null?void 0:Re.key)!=null&&Wr.includes("$")&&(ql=(Nr=ul.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Nr[0],((gn=(Tr=ul.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Tr[1])==null?void 0:gn.length)>0)){const[Mr,An]=(Cn=(Sn=ul.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Sn[1])==null?void 0:Cn.split(/[()]/);(mn=re.FormType.find(Tn=>(Tn==null?void 0:Tn.key)===Mr))==null||mn.value,((On=An==null?void 0:An.split(","))==null?void 0:On.length)>0&&(Jr=(nn=An==null?void 0:An.split(","))==null?void 0:nn.map(Tn=>({label:Tn,value:Tn})))}let Sr=Re==null?void 0:Re.options;((Dn=Re==null?void 0:Re.optionUrl)==null?void 0:Dn.selectRelateType)==="自定义绑定"&&(Sr=(on=(Vn=Re==null?void 0:Re.optionUrl)==null?void 0:Vn.defaultSelect)==null?void 0:on.map(Mr=>({label:Mr,value:Mr})));let Ql=(Re==null?void 0:Re.menuPath)??[],Er=(Re==null?void 0:Re.groups)??[],er=(Re==null?void 0:Re.columns)??[],$l=!1,or=(Re==null?void 0:Re.isFormColHidden)??!1,lr="",Wl=Re!=null&&Re.value?Re.value:(Sr==null?void 0:Sr.length)>0?(Fn=Sr==null?void 0:Sr[0])==null?void 0:Fn.value:(Re==null?void 0:Re.value)??"",Nl=!1,Pr="Input";return((Sr==null?void 0:Sr.length)>0||(Ql==null?void 0:Ql.length)>0)&&(Pr="Select"),(Array.isArray(lr)&&(lr!=null&&lr.every(Mr=>(Mr==null?void 0:Mr.name)&&(Mr==null?void 0:Mr.url)))||Array.isArray(Wl)&&(Wl!=null&&Wl.every(Mr=>(Mr==null?void 0:Mr.name)&&(Mr==null?void 0:Mr.url))))&&(Pr="upload"),Re!=null&&Re.isMainUrl&&(Pr="Url"),{label:ql??"",name:ql??"t"+Zl,prop:ql??ul.safeClone(Re==null?void 0:Re.key),type:(Re==null?void 0:Re.type)??Pr,value:(Re==null?void 0:Re.type)==="Date"&&Wl===""?new Date:Wl,id:(Re==null?void 0:Re.id)??Zl,contents:(Sr==null?void 0:Sr.length)>0?Sr:Jr??[],width:(Re==null?void 0:Re.width)??1,isLoginUser:$l,config:Re==null?void 0:Re.config,optionUrl:(Re==null?void 0:Re.optionUrl)??Re,isFormColHidden:or,isHideInForm:(Re==null?void 0:Re.isHideInForm)??!1,signature:Nl,isMain:Re==null?void 0:Re.isMain,required:(Re==null?void 0:Re.required)??!1,isMainUrl:Re==null?void 0:Re.isMainUrl,operable:(Re==null?void 0:Re.operable)??!1,disabled:(Re==null?void 0:Re.disabled)??!1,isSync:Re==null?void 0:Re.isSync,menus:Ql,groups:Er,words:er,allSelectionContents:Re==null?void 0:Re.allContents,filterContent:Re==null?void 0:Re.filterContents,isNoClick:(Re==null?void 0:Re.isNoClick)??!1,functionName:Re==null?void 0:Re.functionName,functionRelatedWords:Re==null?void 0:Re.functionRelatedWords,calculatorFilter:Re==null?void 0:Re.calculatorFilter,filters:Re==null?void 0:Re.filters}}),hl=La==null?void 0:La.map(Re=>Re==null?void 0:Re.value);let Ll="";hl==null||hl.forEach(Re=>{Re!==""&&Re!==void 0&&(Ll=Ll===""?Re:Ll+"/"+Re)}),k.setSelectArray(hl),k.setSelectString(Ll);let Ta=(Ma=ul.safeClone(La))==null?void 0:Ma.map(Re=>(Re!=null&&Re.value&&re.IsJson(Re==null?void 0:Re.value)&&Array.isArray(JSON.parse(Re==null?void 0:Re.value))&&(Re.value=JSON.parse(Re.value)),Re)),Yr={};Ta==null||Ta.forEach(Re=>{Yr[Re.label]=Re==null?void 0:Re.value}),Ta=Ta==null?void 0:Ta.map(Re=>{var Zl,ql,Jr,Sr,Ql,Er,er,$l,or;if((Re==null?void 0:Re.type)==="Select"&&((Zl=Re==null?void 0:Re.allSelectionContents)==null?void 0:Zl.length)>0&&(Re.contactValue=Yr),(Jr=(ql=Re==null?void 0:Re.optionUrl)==null?void 0:ql.menuSelect)!=null&&Jr.some(lr=>lr==null?void 0:lr.includes("["))){let lr="";Re.optionUrl.oldMenuSelect=(Ql=(Sr=ul.safeClone(Re))==null?void 0:Sr.optionUrl)==null?void 0:Ql.menuSelect,Re.optionUrl.menuSelect=(er=(Er=Re==null?void 0:Re.optionUrl)==null?void 0:Er.menuSelect)==null?void 0:er.map(Wl=>{var Nl,Pr,rr,Wr,Nr,Tr;if(Wl!=null&&Wl.includes("[")){let gn=(Pr=(Nl=Wl==null?void 0:Wl.replaceAll("[","").replaceAll("]",""))==null?void 0:Nl.split(":"))==null?void 0:Pr[1];lr=Qe((rr=Wl==null?void 0:Wl.replaceAll("[","").replaceAll("]",""))==null?void 0:rr.split(":"),Ze==null?void 0:Ze[Me.value],Ze),Wl=((Nr=(Wr=ul.safeClone(Ta))==null?void 0:Wr.find(Sn=>(Sn==null?void 0:Sn.label)===gn))==null?void 0:Nr.value)||Qe((Tr=Wl==null?void 0:Wl.replaceAll("[","").replaceAll("]",""))==null?void 0:Tr.split(":"),Ze==null?void 0:Ze[Me.value],Ze)}return Wl}),lr!==""&&Re.value===""&&(Re.value=Oe(Re.optionUrl.menuSelect,Re.optionUrl.oldMenuSelect,($l=Re==null?void 0:Re.optionUrl)==null?void 0:$l.groupSelect,Ze),Array.isArray(Re.value)&&((or=Re.value)!=null&&or.every(Wl=>Wl==null?void 0:Wl.url))&&(Re.type="UPLOAD"))}return Re}),u.value=Ta,H.value=((ea=u.value)==null?void 0:ea.every(Re=>Re==null?void 0:Re.disabled))||fe.value===Me.value,ra.value=(ma=u.value)==null?void 0:ma.every(Re=>Re==null?void 0:Re.operable),We.value=(Ha=u.value)==null?void 0:Ha.map(Re=>Re==null?void 0:Re.label);let ln=[],zr=[];if((ka=ul.safeClone(u.value))==null||ka.forEach(Re=>{var Zl;Array.isArray(Re==null?void 0:Re.value)&&((Zl=Re==null?void 0:Re.value)!=null&&Zl.find(ql=>{var Jr;return(Jr=ql==null?void 0:ql.url)==null?void 0:Jr.includes(".obj")}))&&(zr=Re==null?void 0:Re.value)}),(zr==null?void 0:zr.length)>0){const Re=(Ul=ul.safeClone(zr))==null?void 0:Ul.filter(Zl=>{var ql;return(ql=Zl==null?void 0:Zl.url)==null?void 0:ql.includes(".obj")});Re==null||Re.forEach(Zl=>{var Jr,Sr,Ql,Er;const ql=(Jr=zr==null?void 0:zr.filter(er=>{var $l;return(er==null?void 0:er.name)===(Zl==null?void 0:Zl.name)&&(($l=er==null?void 0:er.url)==null?void 0:$l.includes(".mtl"))}))==null?void 0:Jr.map(er=>er==null?void 0:er.url);ln.push({objUrl:Zl==null?void 0:Zl.url,mtlUrls:((Sr=zr==null?void 0:zr.filter(er=>{var $l;return(er==null?void 0:er.name)===(Zl==null?void 0:Zl.name)&&(($l=er==null?void 0:er.url)==null?void 0:$l.includes(".mtl"))}))==null?void 0:Sr.length)===1?(Er=(Ql=zr==null?void 0:zr.filter(er=>{var $l;return(er==null?void 0:er.name)===(Zl==null?void 0:Zl.name)&&(($l=er==null?void 0:er.url)==null?void 0:$l.includes(".mtl"))}))==null?void 0:Ql[0])==null?void 0:Er.url:ql})}),_.setObjUrl(ln)}(Gl=ul.safeClone(u.value))==null||Gl.forEach(Re=>{var Zl,ql,Jr,Sr,Ql,Er,er,$l,or,lr,Wl,Nl,Pr;if((ql=(Zl=Re==null?void 0:Re.value)==null?void 0:Zl.toString())!=null&&ql.includes(".stl")||(Sr=(Jr=Re==null?void 0:Re.value)==null?void 0:Jr.toString())!=null&&Sr.includes(".STL")||(Er=(Ql=Re==null?void 0:Re.value)==null?void 0:Ql.toString())!=null&&Er.includes(".obj")||($l=(er=Re==null?void 0:Re.value)==null?void 0:er.toString())!=null&&$l.includes(".mtl")||(lr=(or=Re==null?void 0:Re.value)==null?void 0:or.toString())!=null&&lr.includes(".urdf")){let rr={},Wr=[],Nr;Array.isArray(Re==null?void 0:Re.value)?Nr=Re==null?void 0:Re.value:Nr=(Wl=Re==null?void 0:Re.value)==null?void 0:Wl.split(","),Nr==null||Nr.forEach(Tr=>{Tr.includes(".mtl")?Wr.push(Tr):rr.blob=rr.blob==="undefined"?Tr:rr.blob+","+Tr}),(Wr==null?void 0:Wr.length)>0&&(rr.mtlBlobs=Wr),(Pr=(Nl=Object.values(rr))==null?void 0:Nl[0])!=null&&Pr.includes("http:")}})}else u.value=[];let bl=te.value;if((bl==null?void 0:bl.length)>0&&(bl=bl==null?void 0:bl.map(Ze=>{var hl,Ll,Ta,Yr;let La=(hl=Ze==null?void 0:Ze.key)==null?void 0:hl.split("/");return(n==null?void 0:n.compName)===(La==null?void 0:La[0])&&(Ll=u.value)!=null&&Ll.find(ln=>(ln==null?void 0:ln.prop)===(La==null?void 0:La[1]))&&(Ze.value=(Yr=(Ta=u.value)==null?void 0:Ta.find(ln=>(ln==null?void 0:ln.prop)===(La==null?void 0:La[1])))==null?void 0:Yr.value),Ze}),Ae.setTableViewContents(bl)),n!=null&&n.formRules)D.value=n==null?void 0:n.formRules;else{let Ze={};(Ba=ul.safeClone(u).value)==null||Ba.forEach(La=>{((La==null?void 0:La.isMain)===!0||(La==null?void 0:La.required)===!0)&&(Ze[(La==null?void 0:La.prop)??(La==null?void 0:La.name)]=[{required:!0,message:`${(La==null?void 0:La.label)||(La==null?void 0:La.prop)||(La==null?void 0:La.name)}不能为空`}])}),D.value=Ze}if(((Rl=na==null?void 0:na.contents)==null?void 0:Rl.length)>0){const Ze=[];(Fr=na==null?void 0:na.contents)==null||Fr.forEach((La,hl)=>{(La==null?void 0:La.label)!==""&&Ze.push({label:(La==null?void 0:La.label)??"",id:(La==null?void 0:La.id)??hl,type:(La==null?void 0:La.type)??"",background:La==null?void 0:La.background})}),O.value=Ze}else O.value=[];(Br=u.value)!=null&&Br.some(Ze=>(Ze==null?void 0:Ze.functionName)&&(Ze==null?void 0:Ze.functionName)!=="")&&(u.value=await $e(u.value))},{deep:!0,immediate:!0}),e.watch(()=>fe.value,ne=>{H.value=ne===Me.value},{immediate:!0}),(ne,qe)=>{var Ee;const na=e.resolveComponent("svg-icon"),fa=e.resolveComponent("el-switch"),ze=e.resolveComponent("el-checkbox"),Be=e.resolveComponent("el-popover"),Ke=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Rh,[I.value===e.unref(vi).TEXT?(e.openBlock(),e.createBlock(Jc,{key:0,itemData:a.itemData,compName:a.compName,calculator:a.calculator,fields:u.value,textSize:R.value,textColor:ae.value,backGround:me.value,textBackColor:X.value,backGroundImage:ue.value,disabled:H.value||Je(),iconUrl:d.value,"onUpdate:backGroundImage":da,backgroundUrl:o.value,backgroundPosition:c.value},null,8,["itemData","compName","calculator","fields","textSize","textColor","backGround","textBackColor","backGroundImage","disabled","iconUrl","backgroundUrl","backgroundPosition"])):I.value===e.unref(vi).BLOCK?(e.openBlock(),e.createBlock(f0,{key:1,items:(Ee=u.value)==null?void 0:Ee.map(ye=>({label:ye!=null&&ye.isHideInForm?"":ye==null?void 0:ye.label,value:ye==null?void 0:ye.value,width:(ye==null?void 0:ye.width)??1,field:ye,filters:ye==null?void 0:ye.filters})),textSize:R.value,textColor:ae.value,backGround:me.value,iconUrl:d.value,textBackColor:X.value,backGroundImage:ue.value,disabled:H.value||Je(),calculator:a.calculator,"onUpdate:backGroundImage":da,backgroundUrl:o.value,backgroundPosition:c.value},null,8,["items","textSize","textColor","backGround","iconUrl","textBackColor","backGroundImage","disabled","calculator","backgroundUrl","backgroundPosition"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":I.value===e.unref(vi).ORDINARY})},[e.createVNode(ul.ssForm,{rowContents:u.value,formRules:D.value,buttonValue:O.value,isRowFlex:!1,isEnableWrap:!0,textSize:R.value,textColor:ae.value,backGround:me.value,backGroundImage:ue.value,onOnButtonClick:Fe,onChange:ha,formDisabled:H.value||Je(),formLabelsOperable:ra.value,isButtonRow:m.value,onPreview:ja,onBlurChange:Da,style:e.normalizeStyle({backGroundImage:o.value!==""?`url("${o.value}")`:void 0}),onHandleColEditChange:Ea,onHandleColTypeChange:Ce,onRouteUrl:ia,onClickTrigger:ua,"onUpdate:backGroundImage":da},{operateCol:e.withCtx(({renderColumns:ye,formDisabled:$a,formLabelsOperable:wl})=>[e.createVNode(Be,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:ce},{reference:e.withCtx(()=>[e.createElementVNode("span",$h,[e.createVNode(na,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Vh,[qe[1]||(qe[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(fa,{"model-value":$a,"active-text":"禁用","inactive-text":"",onChange:P,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(fa,{"model-value":wl,"active-text":"编辑所有标签","inactive-text":"",onChange:le},null,8,["model-value"]),qe[2]||(qe[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ke,{modelValue:We.value,"onUpdate:modelValue":qe[0]||(qe[0]=el=>We.value=el),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:Ue,onChange:he},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye,el=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:el.label},[e.createVNode(ze,{value:el.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(el.label),1)]),_:2},1032,["value"]),e.createVNode(Be,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(na,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Pl;return[e.createElementVNode("div",Fh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Pl=Object.keys(el))==null?void 0:Pl.filter(bl=>{var jl;return(jl=V.value)==null?void 0:jl.find(ll=>(ll==null?void 0:ll.value)===bl)}),bl=>{var jl,ll;return e.openBlock(),e.createElementBlock("div",{key:bl},[e.createVNode(ul._sfc_main$1,{value:el==null?void 0:el[bl],"active-text":(ll=(jl=V.value)==null?void 0:jl.find(Hl=>(Hl==null?void 0:Hl.value)===bl))==null?void 0:ll.label,inactiveText:"",onChange:Hl=>Fa(Hl,bl,el)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Ph,[e.createVNode(na,{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)),F.value?(e.openBlock(),e.createBlock(ul.ssFilePreview,{key:3,fileDataList:S.value,onDestroy:sa},null,8,["fileDataList"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(Vr.ssDialog,{key:4,visible:y.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Do.ThreeViewerHost,{files:g.value,onGetAnimationData:ne.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Ls=fr._export_sfc(jh,[["__scopeId","data-v-6e8f9fb6"]]),Hh={class:"table-header-child"},Uh={class:"table-header-child-main"},qh={class:"table-header-child-content"},Wh={class:"table-header-child-content-item"},Gh={class:"fix-button"},Kh={key:0},Yh={class:"form-content"},Jh={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref(""),d=re.useTableComp(z.pinia),{tableIndex:c}=z.storeToRefs(d);e.ref(0);const u=e.ref(""),y=e.ref([]),b=e.ref([]),g=S=>{var x;i.value=!0;let E=[];_r==null||_r.forEach(k=>{let _=z.cloneDeep(c.value)+1;d.setTableIndex(_),E.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:S[k.key],id:c.value,contents:k==null?void 0:k.options})}),S!=null&&S.children&&((x=S==null?void 0:S.children)==null?void 0:x.length)>0&&E.push({children:S==null?void 0:S.children,isFormColHidden:!0}),u.value=S==null?void 0:S.id,y.value=E,b.value=E},p=S=>{n("fixChange",z.cloneDeep(S))},D=S=>{n("deleteChange",z.cloneDeep(S))},m=S=>{i.value=!0;let E=[];_r==null||_r.forEach(x=>{let k=z.cloneDeep(c.value)+1;d.setTableIndex(k),E.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:c.value,contents:x==null?void 0:x.options})}),o.value=S==null?void 0:S.id,y.value=E,b.value=E},F=S=>{let E=z.cloneDeep(b.value);E=E==null?void 0:E.map(x=>(x.children||(x.value=S==null?void 0:S[x.name]),x)),b.value=E},C=()=>{var E,x;y.value=b.value;let S={};if(u.value!=="")S.id=u.value,(E=y.value)==null||E.forEach(k=>{const _=_r==null?void 0:_r.find(I=>(I==null?void 0:I.label)===(k==null?void 0:k.label));_?S[_.key]=k.value:k!=null&&k.children&&k.children.length>0&&(S.children=k.children)}),i.value=!1,n("fixChange",{contents:z.cloneDeep(S),id:o.value,type:"fix"});else{let k=z.cloneDeep(c.value)+1;d.setTableIndex(k),S.id="id"+c.value,(x=y.value)==null||x.forEach(_=>{const I=_r==null?void 0:_r.find(R=>(R==null?void 0:R.label)===(_==null?void 0:_.label));I?S[I.key]=_.value:_!=null&&_.children&&_.children.length>0&&(S.children=_.children)}),i.value=!1,n("fixChange",{contents:z.cloneDeep(S),id:o.value,type:"add"})}u.value="",y.value=[],b.value=[]},L=()=>{i.value=!1,u.value="",o.value="",y.value=[],b.value=[]},O=S=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",S),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(S,E)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Hh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(k,_)=>(e.openBlock(),e.createElementBlock("div",Uh,[e.createElementVNode("div",qh,[e.createElementVNode("div",Wh,e.toDisplayString(k.label),1),e.createElementVNode("div",Gh,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>m(k)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>g(k)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>O(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(e.openBlock(),e.createElementBlock("div",Kh,[e.createVNode(Xc,{tableChildContents:k==null?void 0:k.children,onDeleteChange:D,onFixChange:p},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Vr.ssDialog,{visible:i.value,onBeforeDestroy:L,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yh,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:F},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:L,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:C},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Xh=fr._export_sfc(Jh,[["__scopeId","data-v-e0fef72d"]]),Zh={class:"table-header-child"},Qh={class:"table-header-child-main"},e6={class:"table-header-child-content"},a6={class:"table-header-child-content-item"},l6={class:"fix-button"},r6={key:0},n6={class:"form-content"},i6={class:"dialog-footer"},o6={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref(""),d=re.useTableComp(z.pinia),{tableIndex:c}=z.storeToRefs(d),u=e.ref(""),y=e.ref([]),b=e.ref([]),g=S=>{n("fixChange",z.cloneDeep(S))},p=S=>{var x;i.value=!0;let E=[];_r==null||_r.forEach(k=>{let _=z.cloneDeep(c.value)+1;d.setTableIndex(_),E.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:S[k.key],id:c.value,contents:k==null?void 0:k.options})}),S!=null&&S.children&&((x=S==null?void 0:S.children)==null?void 0:x.length)>0&&E.push({children:S==null?void 0:S.children,isFormColHidden:!0}),u.value=S==null?void 0:S.id,y.value=E,b.value=E},D=S=>{i.value=!0;let E=[];_r==null||_r.forEach(x=>{let k=z.cloneDeep(c.value)+1;d.setTableIndex(k),E.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:c.value,contents:x==null?void 0:x.options})}),o.value=S==null?void 0:S.id,y.value=E,b.value=E},m=S=>{let E=z.cloneDeep(b.value);E=E==null?void 0:E.map(x=>(x.children||(x.value=S==null?void 0:S[x.name]),x)),b.value=E},F=()=>{var E,x;y.value=b.value;let S={};if(u.value!=="")S.id=u.value,(E=y.value)==null||E.forEach(k=>{const _=_r==null?void 0:_r.find(I=>(I==null?void 0:I.label)===(k==null?void 0:k.label));_?S[_.key]=k.value:k!=null&&k.children&&k.children.length>0&&(S.children=k.children)}),i.value=!1,n("fixChange",{contents:z.cloneDeep(S),id:o.value,type:"fix"});else{let k=z.cloneDeep(c.value)+1;d.setTableIndex(k),S.id="idChild"+c.value,(x=y.value)==null||x.forEach(_=>{const I=_r==null?void 0:_r.find(R=>(R==null?void 0:R.label)===(_==null?void 0:_.label));I?S[I.key]=_.value:_!=null&&_.children&&_.children.length>0&&(S.children=_.children)}),i.value=!1,n("fixChange",{contents:z.cloneDeep(S),id:o.value,type:"add"})}u.value="",y.value=[],b.value=[]},C=()=>{i.value=!1,u.value="",o.value="",y.value=[],b.value=[]},L=S=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",S),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},O=S=>{n("deleteChange",S)};return(S,E)=>{const x=e.resolveComponent("svg-icon"),k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Zh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(_,I)=>(e.openBlock(),e.createElementBlock("div",Qh,[e.createElementVNode("div",e6,[e.createElementVNode("div",a6,e.toDisplayString(_.label),1),e.createElementVNode("div",l6,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>D(_)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>p(_)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>L(_)},null,8,["onClick"])])]),_!=null&&_.children&&_.children.length>0?(e.openBlock(),e.createElementBlock("div",r6,[e.createVNode(Xh,{tableChildContents:_==null?void 0:_.children,onDeleteChange:O,onFixChange:g},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Vr.ssDialog,{visible:i.value,onBeforeDestroy:C,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",n6,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",i6,[e.createVNode(k,{onClick:C,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>E[0]||(E[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"ok-button button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>E[1]||(E[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Xc=fr._export_sfc(o6,[["__scopeId","data-v-ebd68fa1"]]),t6={class:"table-operate-content"},s6={class:"table-operate-item"},c6={class:"operate-title"},u6={class:"operate-content"},d6={class:"fix-content"},p6={class:"fix-content-label"},f6={class:"fix-button"},h6={key:0},v6={class:"operate-title"},m6={class:"operate-content"},y6={class:"fix-content"},g6={class:"fix-content-label"},b6={class:"fix-button"},k6={class:"operate-title"},x6={class:"operate-content"},w6={class:"fix-content"},_6={class:"fix-content-label"},S6={class:"fix-button"},E6={class:"operate-title"},C6={class:"operate-content"},D6={class:"fix-content"},T6={class:"fix-content-label"},B6={class:"fix-button"},N6={class:"operate-content"},A6={style:{display:"flex","justify-content":"space-between"}},z6={class:"form-content"},M6={class:"dialog-footer"},I6={class:"form-content"},O6={class:"dialog-footer"},L6={class:"form-content"},R6={class:"dialog-footer"},$6={class:"form-content"},V6={class:"dialog-footer"},F6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]),o=e.ref(!1),d=e.ref(!1),c=e.ref([]),u=e.ref(!1),y=e.ref([]),b=e.ref(!1),g=e.ref([]),p=e.ref(""),D=e.ref(""),m=e.ref([]),F=e.ref([]),C=e.ref([]),L=e.ref([]),O=e.ref(!1),S=e.ref([]),E=e.ref([]),x=e.ref(0),k=e.ref([]),_=e.ref([]),I=e.ref([]),R=()=>{O.value=!0;let V=[];Jn==null||Jn.forEach(P=>{x.value++,V.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:(P==null?void 0:P.key)==="background"?"var(--ssComponent-primary-color)":"",id:x.value,contents:P==null?void 0:P.options})}),S.value=V,E.value=V},ae=()=>{var P,le,ce;d.value=!0;let V=[];(ce=(le=(P=re.FormContent)==null?void 0:P.find(he=>(he==null?void 0:he.key)==="Input"))==null?void 0:le.value)==null||ce.forEach(he=>{x.value++,V.push({label:he==null?void 0:he.label,name:(he==null?void 0:he.name)||(he==null?void 0:he.label),type:he.type,value:(he==null?void 0:he.label)==="类型"?"Input":"",id:x.value,contents:he==null?void 0:he.options})}),k.value=V,_.value=V},X=V=>{V||(k.value=_.value)},me=async V=>{var P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da;if((V==null?void 0:V.类型)!==((le=(P=_.value)==null?void 0:P.find(da=>(da==null?void 0:da.label)==="类型"))==null?void 0:le.value)){let da=[],ja=await((ua=(he=(ce=re.FormContent)==null?void 0:ce.find(sa=>(sa==null?void 0:sa.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:he.value)==null?void 0:ua.value)?await((Ce=(Ea=(va=re.FormContent)==null?void 0:va.find(sa=>(sa==null?void 0:sa.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ea.value)==null?void 0:Ce.value):(Ve=(ia=re.FormContent)==null?void 0:ia.find(sa=>(sa==null?void 0:sa.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ve.value;if(ja==null||ja.forEach(sa=>{x.value++,da.push({label:sa==null?void 0:sa.label,name:(sa==null?void 0:sa.name)||(sa==null?void 0:sa.label),type:sa.type,value:sa!=null&&sa.属性名?(V==null?void 0:V.prop)||(V==null?void 0:V.name)||(V==null?void 0:V.label):(V==null?void 0:V[sa.label])??"",id:x.value,contents:sa==null?void 0:sa.options,prop:(sa==null?void 0:sa.prop)||(sa==null?void 0:sa.name)||(sa==null?void 0:sa.label)})}),V!=null&&V.菜单选项&&((Fa=V==null?void 0:V.菜单选项)==null?void 0:Fa.length)>0){const sa=await re.menuToContentType(V==null?void 0:V.菜单选项);da=da==null?void 0:da.map(Fe=>((Fe==null?void 0:Fe.name)==="组信息选项"&&(Fe.contents=sa),Fe))}_.value=await re.selectToBase(z.cloneDeep(da)),k.value=await re.selectToBase(z.cloneDeep(da))}else{let da=z.cloneDeep(k.value);if(da=da==null?void 0:da.map(ja=>(ja.value=V==null?void 0:V[ja.name],ja)),V!=null&&V.菜单选项&&((Da=V==null?void 0:V.菜单选项)==null?void 0:Da.length)>0){const ja=await re.menuToContentType(V==null?void 0:V.菜单选项);da=da==null?void 0:da.map(sa=>((sa==null?void 0:sa.name)==="组信息选项"&&(sa.contents=ja),sa))}da=re.formToOptionsContents(da),_.value=await re.selectToBase(z.cloneDeep(da))}},ue=async V=>{await me(V),k.value=_.value},U=(V,P)=>{if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const le=P==null?void 0:P.optionUrl;return(le==null?void 0:le.selectRelateType)||P[V.key]}if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const le=P==null?void 0:P.optionUrl;return(le==null?void 0:le.menuSelect)||P[V.key]}if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const le=P==null?void 0:P.optionUrl;return(le==null?void 0:le.groupSelect)||P[V.key]}if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(P==null?void 0:P.value)||P[V.key];if((P==null?void 0:P.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const le=P[V.key];return fc(le)?le:V.default}return(V==null?void 0:V.label)==="类型"&&P[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!P[V.key]?!1:P[V.key]},W=async V=>{var ce,he,ua,ia,Ve,va,Ea,Ce,Fa;d.value=!0;let P=[];const le=await((ua=(he=(ce=re.FormContent)==null?void 0:ce.find(Da=>(Da==null?void 0:Da.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:he.value)==null?void 0:ua.value)?await((Ce=(Ea=(va=re.FormContent)==null?void 0:va.find(Da=>(Da==null?void 0:Da.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Ea.value)==null?void 0:Ce.value):(Ve=(ia=re.FormContent)==null?void 0:ia.find(Da=>(Da==null?void 0:Da.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Ve.value;if(le==null||le.forEach(Da=>{x.value++,P.push({label:Da==null?void 0:Da.label,name:(Da==null?void 0:Da.name)||(Da==null?void 0:Da.label),type:Da.type,value:(Da==null?void 0:Da.label)==="属性名"?(V==null?void 0:V.prop)||(V==null?void 0:V.name)||(V==null?void 0:V.label):U(Da,V),id:x.value,contents:Da==null?void 0:Da.options})}),V!=null&&V.menuSelect&&((Fa=V==null?void 0:V.menuSelect)==null?void 0:Fa.length)>0){const Da=await re.menuToContentType(V==null?void 0:V.menuSelect);P=P==null?void 0:P.map(da=>((da==null?void 0:da.name)==="组信息选项"&&(da.contents=Da),da))}p.value=V==null?void 0:V.id,k.value=await re.selectToBase(re.formToOptionsContents(P)),_.value=await re.selectToBase(re.formToOptionsContents(P))},Z=V=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,le;I.value=(P=z.cloneDeep(I.value))==null?void 0:P.filter(ce=>(ce==null?void 0:ce.id)!==(V==null?void 0:V.id)),n("change",(le=z.cloneDeep(r.originalItemContents))==null?void 0:le.map(ce=>((ce==null?void 0:ce.key)==="tableToForm"&&(ce.contents=I.value),ce))),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Q=()=>{d.value=!1,k.value=[],p.value=""},ve=async()=>{var ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da;k.value=_.value;let V={};p.value!==""?V.id=p.value:(x.value++,V.id="id"+x.value);let P=await((ua=(he=(ce=re.FormContent)==null?void 0:ce.find(da=>{var ja,sa;return(da==null?void 0:da.key)===(((sa=(ja=k.value)==null?void 0:ja.find(Fe=>(Fe==null?void 0:Fe.label)==="类型"))==null?void 0:sa.value)??"label")}))==null?void 0:he.value)==null?void 0:ua.value)??((Ve=(ia=re.FormContent)==null?void 0:ia.find(da=>{var ja,sa;return(da==null?void 0:da.key)===(((sa=(ja=k.value)==null?void 0:ja.find(Fe=>(Fe==null?void 0:Fe.label)==="类型"))==null?void 0:sa.value)??"label")}))==null?void 0:Ve.value);if((va=k.value)==null||va.forEach(da=>{const ja=P==null?void 0:P.find(sa=>(sa==null?void 0:sa.label)===(da==null?void 0:da.label));ja&&(V[ja.key]=da.value)}),V.name=V.label,(Ea=I.value)!=null&&Ea.find(da=>da.id===V.id))I.value=(Ce=I.value)==null?void 0:Ce.map(da=>(da.id===V.id&&(da=V),da));else{let da=z.cloneDeep(I.value);I.value||(I.value=[]),da.push(V),I.value=da}I.value=I.value.map(({id:da,...ja})=>ja),d.value=!1,p.value="";let le=z.cloneDeep(r.originalItemContents);(Fa=z.cloneDeep(r.originalItemContents))!=null&&Fa.find(da=>(da==null?void 0:da.key)==="tableToForm")?le=(Da=z.cloneDeep(r.originalItemContents))==null?void 0:Da.map(da=>((da==null?void 0:da.key)==="tableToForm"&&(da.contents=I.value),da)):le.push({key:"tableToForm",contents:I.value}),n("change",le)},Ae=V=>{O.value=!0;let P=[];Jn==null||Jn.forEach(le=>{x.value++,P.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:V[le.key],id:x.value,contents:le==null?void 0:le.options})}),p.value=V==null?void 0:V.id,S.value=P,E.value=P};e.watch(()=>b.value,()=>{var P,le;let V=z.cloneDeep(r.originalItemContents);(P=z.cloneDeep(r.originalItemContents))!=null&&P.find(ce=>(ce==null?void 0:ce.key)==="page")?V=(le=z.cloneDeep(r.originalItemContents))==null?void 0:le.map(ce=>((ce==null?void 0:ce.key)==="page"&&(ce.contents=b.value),ce)):V.push({key:"page",contents:b.value}),n("change",V)},{deep:!0});const te=V=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,le;F.value=(P=z.cloneDeep(F.value))==null?void 0:P.filter(ce=>(ce==null?void 0:ce.id)!==(V==null?void 0:V.id)),n("change",(le=z.cloneDeep(r.originalItemContents))==null?void 0:le.map(ce=>((ce==null?void 0:ce.key)==="extraButton"&&(ce.contents=F.value),ce))),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},A=()=>{var le,ce,he,ua,ia;S.value=E.value;let V={};if(p.value!==""?V.id=p.value:(x.value++,V.id="id"+x.value),(le=S.value)==null||le.forEach(Ve=>{const va=Jn==null?void 0:Jn.find(Ea=>(Ea==null?void 0:Ea.label)===(Ve==null?void 0:Ve.label));va?V[va.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&(V.children=Ve.children)}),(ce=F.value)!=null&&ce.find(Ve=>Ve.id===V.id))F.value=(he=F.value)==null?void 0:he.map(Ve=>(Ve.id===V.id&&(Ve=V),Ve));else{let Ve=z.cloneDeep(F.value)??[];Ve.push(V),F.value=Ve}O.value=!1,p.value="";let P=z.cloneDeep(r.originalItemContents);(ua=z.cloneDeep(r.originalItemContents))!=null&&ua.find(Ve=>(Ve==null?void 0:Ve.key)==="extraButton")?P=(ia=z.cloneDeep(r.originalItemContents))==null?void 0:ia.map(Ve=>((Ve==null?void 0:Ve.key)==="extraButton"&&(Ve.contents=F.value),Ve)):P.push({key:"extraButton",contents:F.value}),n("change",P)},se=V=>{let P=z.cloneDeep(E.value);P=P==null?void 0:P.map(le=>(le.children||(le.value=V==null?void 0:V[le.name]),le)),E.value=P},G=()=>{O.value=!1,S.value=[],p.value=""},fe=V=>{u.value=!0;let P=[];Xn==null||Xn.forEach(le=>{x.value++,P.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:V[le.key],id:x.value,contents:le==null?void 0:le.options})}),p.value=V==null?void 0:V.id,C.value=P,L.value=P},we=V=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,le;m.value=(P=z.cloneDeep(m.value))==null?void 0:P.filter(ce=>(ce==null?void 0:ce.id)!==(V==null?void 0:V.id)),n("change",(le=z.cloneDeep(r.originalItemContents))==null?void 0:le.map(ce=>((ce==null?void 0:ce.key)==="rowButton"&&(ce.contents=m.value),ce))),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_e=()=>{o.value=!0;let V=[];_r==null||_r.forEach(P=>{x.value++,V.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:"",id:x.value,contents:P==null?void 0:P.options})}),y.value=V,g.value=V},Ue=()=>{u.value=!0;let V=[];Xn==null||Xn.forEach(P=>{x.value++,V.push({label:P==null?void 0:P.label,name:P==null?void 0:P.label,type:P.type,value:"",id:x.value,contents:P==null?void 0:P.options})}),C.value=V,L.value=V},ra=V=>{let P=z.cloneDeep(L.value);P=P==null?void 0:P.map(le=>(le.children||(le.value=V==null?void 0:V[le.name]),le)),L.value=P},H=()=>{var le,ce,he,ua,ia;C.value=L.value;let V={};if(p.value!==""?V.id=p.value:(x.value++,V.id="id"+x.value),(le=C.value)==null||le.forEach(Ve=>{const va=Xn==null?void 0:Xn.find(Ea=>(Ea==null?void 0:Ea.label)===(Ve==null?void 0:Ve.label));va?V[va.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&(V.children=Ve.children)}),(ce=m.value)!=null&&ce.find(Ve=>Ve.id===V.id))m.value=(he=m.value)==null?void 0:he.map(Ve=>(Ve.id===V.id&&(Ve=V),Ve));else{let Ve=z.cloneDeep(m.value);Ve.push(V),m.value=Ve}u.value=!1,p.value="";let P=z.cloneDeep(r.originalItemContents);(ua=z.cloneDeep(r.originalItemContents))!=null&&ua.find(Ve=>(Ve==null?void 0:Ve.key)==="rowButton")?P=(ia=z.cloneDeep(r.originalItemContents))==null?void 0:ia.map(Ve=>((Ve==null?void 0:Ve.key)==="rowButton"&&(Ve.contents=m.value),Ve)):P.push({key:"rowButton",contents:m.value}),n("change",P)},Ge=()=>{u.value=!1,p.value="",L.value=[],C.value=[]},Me=V=>{o.value=!0;let P=[];_r==null||_r.forEach(le=>{x.value++,P.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:"",id:x.value,contents:le==null?void 0:le.options})}),y.value=P,D.value=V==null?void 0:V.id,g.value=P},Le=V=>{var P;c.value=qc(z.cloneDeep(c.value),V==null?void 0:V.id),n("change",(P=z.cloneDeep(r.originalItemContents))==null?void 0:P.map(le=>{var ce;return(le==null?void 0:le.key)==="header"&&(le.contents=(ce=c.value)!=null&&ce.some(he=>he==null?void 0:he.children)?[c.value]:c.value),le}))},Ie=V=>{var le,ce,he;V.type==="fix"?V.id!==""?c.value=Gc(c.value,V):c.value=Wc(c.value,V==null?void 0:V.contents):c.value=Kc(c.value,V),c.value=(le=c.value)!=null&&le.some(ua=>ua==null?void 0:ua.children)?[c.value]:c.value,p.value="";let P=z.cloneDeep(r.originalItemContents);(ce=z.cloneDeep(r.originalItemContents))!=null&&ce.find(ua=>(ua==null?void 0:ua.key)==="header")?P=(he=z.cloneDeep(r.originalItemContents))==null?void 0:he.map(ua=>((ua==null?void 0:ua.key)==="header"&&(ua.contents=c.value),ua)):P.push({key:"header",contents:c.value}),n("change",P)},de=V=>{var le;o.value=!0;let P=[];_r==null||_r.forEach(ce=>{x.value++,P.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,value:V[ce.key],id:x.value,contents:ce==null?void 0:ce.options})}),V!=null&&V.children&&((le=V==null?void 0:V.children)==null?void 0:le.length)>0&&P.push({children:V==null?void 0:V.children,isFormColHidden:!0}),p.value=V==null?void 0:V.id,D.value="",y.value=P,g.value=P},De=V=>{let P=z.cloneDeep(g.value);P=P==null?void 0:P.map(le=>(le.children||(le.value=V==null?void 0:V[le.name]),le)),g.value=P},Je=()=>{o.value=!1,p.value="",D.value="",g.value=[]},Sa=()=>{var le,ce,he,ua,ia,Ve;y.value=g.value;let V={};if(p.value!==""?V.id=p.value:(x.value++,V.id="id"+x.value),(le=y.value)==null||le.forEach(va=>{const Ea=_r==null?void 0:_r.find(Ce=>(Ce==null?void 0:Ce.label)===(va==null?void 0:va.label));Ea?V[Ea.key]=va.value:va!=null&&va.children&&va.children.length>0&&(V.children=va.children)}),(ce=c.value)!=null&&ce.find(va=>va.id===V.id))c.value=(he=c.value)==null?void 0:he.map(va=>(va.id===V.id&&(va=V),va));else{let va=z.cloneDeep(c.value)??[];D.value===""?va.push(V):va=va==null?void 0:va.map(Ea=>(Ea.id===D.value&&(Ea.children||(Ea.children=[]),Ea.children.push(V)),Ea)),c.value=va}c.value=(ua=c.value)!=null&&ua.some(va=>va==null?void 0:va.children)?[c.value]:c.value,o.value=!1,p.value="",D.value="";let P=z.cloneDeep(r.originalItemContents);(ia=z.cloneDeep(r.originalItemContents))!=null&&ia.find(va=>(va==null?void 0:va.key)==="header")?P=(Ve=z.cloneDeep(r.originalItemContents))==null?void 0:Ve.map(va=>((va==null?void 0:va.key)==="header"&&(va.contents=c.value),va)):P.push({key:"header",contents:c.value}),n("change",P)},We=V=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,le;c.value=(P=z.cloneDeep(c.value))==null?void 0:P.filter(ce=>(ce==null?void 0:ce.id)!==(V==null?void 0:V.id)),n("change",(le=z.cloneDeep(r.originalItemContents))==null?void 0:le.map(ce=>{var he;return(ce==null?void 0:ce.key)==="header"&&(ce.contents=(he=c.value)!=null&&he.some(ua=>ua==null?void 0:ua.children)?[c.value]:c.value),ce})),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>r.originalItemContents,()=>{var V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(i.value=z.cloneDeep(r.originalItemContents),c.value=(P=(V=i.value)==null?void 0:V.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:P.contents,m.value=(ce=(le=i.value)==null?void 0:le.find(Oe=>(Oe==null?void 0:Oe.key)==="rowButton"))==null?void 0:ce.contents,F.value=(ua=(he=i.value)==null?void 0:he.find(Oe=>(Oe==null?void 0:Oe.key)==="extraButton"))==null?void 0:ua.contents,b.value=(Ve=(ia=i.value)==null?void 0:ia.find(Oe=>(Oe==null?void 0:Oe.key)==="page"))!=null&&Ve.contents?!!((Ea=(va=i.value)==null?void 0:va.find(Oe=>(Oe==null?void 0:Oe.key)==="page"))!=null&&Ea.contents):!1,I.value=(Fa=(Ce=i.value)==null?void 0:Ce.find(Oe=>(Oe==null?void 0:Oe.key)==="tableToForm"))==null?void 0:Fa.contents,c.value=(Da=c.value)==null?void 0:Da.map((Oe,$e)=>(Array.isArray(Oe)?Oe=A3(Oe):Oe={label:(Oe==null?void 0:Oe.label)??"",prop:(Oe==null?void 0:Oe.label)==="操作"?"operate":Oe==null?void 0:Oe.prop,width:Oe!=null&&Oe.width?parseInt(Oe.width):"",fixed:(Oe==null?void 0:Oe.fixed)??void 0,sortable:(Oe==null?void 0:Oe.sortable)??!1,align:(Oe==null?void 0:Oe.align)??"left",showOverflowTooltip:(Oe==null?void 0:Oe.showOverflowTooltip)??!0,isNotDrag:(Oe==null?void 0:Oe.isNotDrag)??!1,isEditCol:(Oe==null?void 0:Oe.isEditCol)??!1,isOperate:(Oe==null?void 0:Oe.isOperate)??!1,id:(Oe==null?void 0:Oe.id)??$e,formMenuSelect:(Oe==null?void 0:Oe.formMenuSelect)??void 0,groupSelect:(Oe==null?void 0:Oe.groupSelect)??void 0},Oe)),c.value=(da=c.value)!=null&&da.every(Oe=>Array.isArray(Oe))?(ja=c.value)==null?void 0:ja[0]:c.value,m.value=(sa=m.value)==null?void 0:sa.map((Oe,$e)=>Oe={label:(Oe==null?void 0:Oe.label)??"",type:(Oe==null?void 0:Oe.type)??"",textColor:(Oe==null?void 0:Oe.textColor)??"#000000",id:(Oe==null?void 0:Oe.id)??$e}),F.value=(Fe=F.value)==null?void 0:Fe.map((Oe,$e)=>Oe={label:(Oe==null?void 0:Oe.label)??"",type:(Oe==null?void 0:Oe.type)??"",background:(Oe==null?void 0:Oe.background)??"var(--ssComponent-primary-color)",id:(Oe==null?void 0:Oe.id)??$e}),I.value)I.value=(Qe=I.value)==null?void 0:Qe.map(Oe=>{x.value++;let $e=Oe;return $e.id=x.value,$e});else{let Oe=[];const $e=(ha=re.getColumnChild(z.cloneDeep(c.value)))==null?void 0:ha.filter(ne=>(ne==null?void 0:ne.prop)!=="operate");$e==null||$e.forEach(ne=>{var qe;x.value++,Oe.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.prop)||(ne==null?void 0:ne.label),type:ne!=null&&ne.groupSelect?"Select":"Input",value:"",id:x.value,contents:ne==null?void 0:ne.options,menuSelect:ne==null?void 0:ne.formMenuSelect,groupSelect:(qe=ne==null?void 0:ne.groupSelect)==null?void 0:qe.split(":"),selectRelateType:"关联绑定列"})}),I.value=Oe}},{deep:!0,immediate:!0}),(V,P)=>{const le=e.resolveComponent("svg-icon"),ce=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",t6,[e.createElementVNode("div",s6,[e.createElementVNode("div",c6,[P[2]||(P[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ce,{class:"icon-content",onClick:_e,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",u6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(he,ua)=>(e.openBlock(),e.createElementBlock("div",{key:ua},[e.createElementVNode("div",d6,[e.createElementVNode("div",p6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",f6,[e.createVNode(le,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Me(he)},null,8,["onClick"]),e.createVNode(le,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>de(he)},null,8,["onClick"]),e.createVNode(le,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>We(he)},null,8,["onClick"])])]),he!=null&&he.children&&he.children.length>0?(e.openBlock(),e.createElementBlock("div",h6,[e.createVNode(Xc,{tableChildContents:he==null?void 0:he.children,onDeleteChange:Le,onFixChange:Ie},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",v6,[P[4]||(P[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:Ue},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[3]||(P[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",m6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(he,ua)=>(e.openBlock(),e.createElementBlock("div",{key:ua},[e.createElementVNode("div",y6,[e.createElementVNode("div",g6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",b6,[e.createVNode(le,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>fe(he)},null,8,["onClick"]),e.createVNode(le,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>we(he)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",k6,[P[6]||(P[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:R},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[5]||(P[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",x6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(he,ua)=>(e.openBlock(),e.createElementBlock("div",{key:ua},[e.createElementVNode("div",w6,[e.createElementVNode("div",_6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",S6,[e.createVNode(le,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>Ae(he)},null,8,["onClick"]),e.createVNode(le,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>te(he)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",E6,[P[8]||(P[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[7]||(P[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",C6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(he,ua)=>(e.openBlock(),e.createElementBlock("div",{key:ua},[e.createElementVNode("div",D6,[e.createElementVNode("div",T6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",B6,[e.createVNode(le,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>W(he)},null,8,["onClick"]),e.createVNode(le,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Z(he)},null,8,["onClick"])])])]))),128))]),P[10]||(P[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",N6,[e.createElementVNode("div",A6,[P[9]||(P[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(ul._sfc_main$1,{modelValue:b.value,"onUpdate:modelValue":P[0]||(P[0]=he=>b.value=he)},null,8,["modelValue"])])])]),e.createVNode(Vr.ssDialog,{visible:o.value,onBeforeDestroy:Je,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",z6,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M6,[e.createVNode(ce,{onClick:Je,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>P[11]||(P[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ce,{class:"ok-button button",onClick:Sa,id:"themeButton"},{default:e.withCtx(()=>P[12]||(P[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Vr.ssDialog,{visible:u.value,onBeforeDestroy:Ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",I6,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:ra},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O6,[e.createVNode(ce,{onClick:Ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>P[13]||(P[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ce,{class:"ok-button button",onClick:H,id:"themeButton"},{default:e.withCtx(()=>P[14]||(P[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Vr.ssDialog,{visible:O.value,onBeforeDestroy:G,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",L6,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",R6,[e.createVNode(ce,{onClick:G,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>P[15]||(P[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ce,{class:"ok-button button",onClick:A,id:"themeButton"},{default:e.withCtx(()=>P[16]||(P[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Vr.ssDialog,{visible:d.value,onBeforeDestroy:Q,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$6,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:me,onChangeVisible:X,onBlurChange:ue},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",V6,[e.createVNode(ce,{onClick:Q,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>P[17]||(P[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ce,{class:"ok-button button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>P[18]||(P[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},P6=fr._export_sfc(F6,[["__scopeId","data-v-7a6b87b5"]]),j6=z.useModelComp(z.pinia),{pageMapState:Zc}=z.storeToRefs(j6),H6=z.useMenuState(z.pinia),{activeMenuPath:Qc,systemHeight:eu}=z.storeToRefs(H6),U6=e.ref(24),q6=e.ref(6),au=e.ref(10),W6=e.ref(70),G6=e.ref(.18),K6=e.ref(45),Y6=()=>{au.value=(eu.value-100)/100};e.watch(()=>eu.value,()=>{Y6()},{deep:!0,immediate:!0});const J6=(a,l,r,n)=>{var i,o,d,c,u,y,b,g,p,D,m,F,C,L,O,S;return{x:((o=(i=a==null?void 0:a.value)==null?void 0:i.tableData)==null?void 0:o.x)||l%2*12,y:((c=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:c.y)||l,w:((y=(u=a==null?void 0:a.value)==null?void 0:u.tableData)==null?void 0:y.w)||U6.value,h:((g=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:g.h)||r,minW:((D=(p=a==null?void 0:a.value)==null?void 0:p.tableData)==null?void 0:D.minW)||q6.value,minH:((F=(m=a==null?void 0:a.value)==null?void 0:m.tableData)==null?void 0:F.minH)||G6.value,maxH:((L=(C=a==null?void 0:a.value)==null?void 0:C.tableData)==null?void 0:L.maxH)||K6.value,i:((S=(O=a==null?void 0:a.value)==null?void 0:O.tableData)==null?void 0:S.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},X6=(a,l)=>{var n,i,o,d,c,u,y,b;let r=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){if(((d=(o=(i=a==null?void 0:a.compData)==null?void 0:i.find(p=>(p==null?void 0:p.key)==="tableContents"))==null?void 0:o.contents)==null?void 0:d.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(r=((b=(y=(u=a==null?void 0:a.compData)==null?void 0:u.find(p=>(p==null?void 0:p.key)==="formContent"))==null?void 0:y.contents)==null?void 0:b.length)/5);return r*2},lu=(a,l,r)=>{var d,c;const n=(c=(d=Zc.value)==null?void 0:d[Qc.value])==null?void 0:c.filter(u=>{var y;return((y=u==null?void 0:u.key)==null?void 0:y.type)==="gridLayout"}),i=n==null?void 0:n.find(u=>{var y,b,g;return((g=(b=(y=u==null?void 0:u.value)==null?void 0:y.tableData)==null?void 0:b.component)==null?void 0:g.id)===a.id}),o=X6(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,y)=>lu(u,y))),{...J6(i,l,o,a)}},Z6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=z.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,i)=>lu(n,i)):[]},Q6=(a,l,r,n)=>{var i,o;return{x:r==null?void 0:r.x,y:0,w:Math.round(r==null?void 0:r.w),h:r==null?void 0:r.h,arrowGap:r==null?void 0:r.arrowGap,i:((o=(i=a==null?void 0:a.value)==null?void 0:i.tableData)==null?void 0:o.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},e4=(a,l)=>{var y,b,g,p;let r=0,n=0,i=0,o=0,d=0,c=((b=(y=a==null?void 0:a.compData)==null?void 0:y.find(D=>(D==null?void 0:D.key)==="numPosition"))==null?void 0:b.contents)??[],u=((p=(g=a==null?void 0:a.compData)==null?void 0:g.find(D=>(D==null?void 0:D.key)==="rowPosition"))==null?void 0:p.contents)??"";return u&&u!==1&&(d=Math.ceil(u*l)),i=(c==null?void 0:c[0])*l,o=(c==null?void 0:c[1])*100,{x:r,y:n,w:i,h:o,arrowGap:d}},ru=(a,l,r)=>{var d,c;const n=(c=(d=Zc.value)==null?void 0:d[Qc.value])==null?void 0:c.filter(u=>{var y;return((y=u==null?void 0:u.key)==null?void 0:y.type)==="gridLayout"}),i=n==null?void 0:n.find(u=>{var y,b,g;return((g=(b=(y=u==null?void 0:u.value)==null?void 0:y.tableData)==null?void 0:b.component)==null?void 0:g.id)===a.id}),o=e4(a,r);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,y)=>ru(u,y,r))),{...Q6(i,l,o,a)}},a4=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=z.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,i)=>ru(n,i,l)):[]},l4=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}]}]}}),r4=(a,l)=>a==null?void 0:a.map(r=>{for(const n in l)if(n===(r==null?void 0:r.prop))return{...r,value:l[n]};return r}),n4=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]);e.watch(()=>r.compType,c=>{var b;const u=l4(r==null?void 0:r.optionItems),y=c?(b=u[c==null?void 0:c.toUpperCase()])==null?void 0:b[r==null?void 0:r.target]:[];i.value=y==null?void 0:y.map(g=>{for(const[p,D]of Object.entries((r==null?void 0:r.comp)||{}))if((g==null?void 0:g.prop)===p)return{...g,value:D};return g})},{immediate:!0});const o=c=>ul.getComponent(c),d=c=>{var u,y;(c==null?void 0:c.prop)==="layout"&&(c==null?void 0:c.value)==="horizontal"?i.value=(u=i.value)==null?void 0:u.map(b=>{var g;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(g=b==null?void 0:b.options)==null?void 0:g.map(p=>({...p,disabled:!0}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!0}:b}):i.value=(y=i.value)==null?void 0:y.map(b=>{var g;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(g=b==null?void 0:b.options)==null?void 0:g.map(p=>({...p,disabled:!1}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!1}:b}),n("change",{target:r==null?void 0:r.target,styleConfigs:i.value,prop:c==null?void 0:c.prop})};return(c,u)=>{const y=e.resolveComponent("el-col"),b=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,g=>(e.openBlock(),e.createBlock(b,{class:"style-row",key:g==null?void 0:g.prop},{default:e.withCtx(()=>[e.createVNode(y,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g==null?void 0:g.label)+":",1)]),_:2},1024),e.createVNode(y,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(g.type)),{modelValue:g.value,"onUpdate:modelValue":p=>g.value=p,content:g==null?void 0:g.options,optionUrl:g==null?void 0:g.optionUrl,disabled:g==null?void 0:g.disabled,activeText:g==null?void 0:g.activeText,inactiveText:g==null?void 0:g.inactiveText,onChange:p=>d(g)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),i4=fr._export_sfc(n4,[["__scopeId","data-v-da01b651"]]),o4=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 r=a,n=l,i=[{required:!0,message:"输入不能为空",trigger:"blur"}],o=e.ref([]),d=L=>L==null?void 0:L.reduce((O,S)=>(O[S==null?void 0:S.prop]=S==null?void 0:S.rule,O),{}),c=e.computed(()=>({formRules:d(o.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),u=e.ref([]),y=e.ref(""),b=(L,O,S)=>{var k;let E=[];(r==null?void 0:r.activeTabName)==="任务配置"?(E=[{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:L},{label:"按钮名称",value:"按钮名称",children:O}]},{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:"暂停"}]}],o.value=[{prop:"任务名称",rule:i},{prop:"任务关键词",rule:i},{prop:"执行任务",rule:i},{prop:"执行动作",rule:i},{prop:"执行交互",rule:i}]):(r==null?void 0:r.activeTabName)==="任务关联"&&(E=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(k=r==null?void 0:r.relatedData)==null?void 0:k.map(_=>({label:_==null?void 0:_.任务名称,value:_==null?void 0:_.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],o.value=[{prop:"关联名称",rule:i},{prop:"关联状态",rule:i},{prop:"关联形式",rule:i},{prop:"关联任务集合",rule:i}]);let x;return S&&(S==null?void 0:S.length)>0?x=[...E,...g(L,O,S)]:x=E,x},g=(L,O,S)=>{const E=[{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 S?E==null?void 0:E.filter(x=>S==null?void 0:S.includes(x==null?void 0:x.prop)):E},p=(L,O)=>{var _,I,R,ae,X,me,ue,U,W;const S=((X=(ae=(R=(I=(_=r==null?void 0:r.comp)==null?void 0:_.compData)==null?void 0:I.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:R.contents)==null?void 0:ae.filter(Z=>(Z==null?void 0:Z.label)!=="操作"))==null?void 0:X.map(Z=>({value:Z==null?void 0:Z.prop,label:Z.label})))||[],E=/button/i,x=((W=(U=(ue=(me=r==null?void 0:r.comp)==null?void 0:me.compData)==null?void 0:ue.filter(Z=>E.test(Z==null?void 0:Z.key)))==null?void 0:U.flatMap(Z=>Z==null?void 0:Z.contents))==null?void 0:W.map(Z=>({value:Z==null?void 0:Z.label,label:Z.label})))||[],k=b(S,x,L);u.value=O?r4(k,O):k,L&&(L==null?void 0:L.length)>0&&o.value.push(...L==null?void 0:L.map(Z=>({prop:Z,rule:i})))};e.onMounted(()=>{p(null,r==null?void 0:r.extendItem)});const D=L=>{const O=L==null?void 0:L[y.value];if(y.value==="执行任务"){if(!(O!=null&&O.join("/")))return;const S=O==null?void 0:O.join("/");p(S==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:S==="进度设置/进度条"?["进度关键词"]:null,L)}},m=L=>{n("change",{target:r==null?void 0:r.target,extendConfigs:L})},F=(L,O)=>{y.value=O==null?void 0:O.changeProp,D(L)},C=L=>{n("onButtonClick",L)};return(L,O)=>(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:u.value,key:u.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:m,onBlurChange:F,onOnButtonClick:C},null,8,["rowContents","formRules","buttonValue"]))}}),t4=fr._export_sfc(o4,[["__scopeId","data-v-4b39853f"]]),s4={};function c4(a,l){return null}const u4=fr._export_sfc(s4,[["render",c4]]),d4={class:"form-operate-content"},p4={class:"form-operate-item"},f4={class:"operate-title"},h4={class:"operate-content"},v4={class:"fix-content"},m4={class:"fix-button"},y4={class:"operate-title"},g4={class:"operate-content"},b4={class:"fix-content"},k4={class:"fix-button"},x4={style:{display:"flex","justify-content":"space-between"}},w4={class:"form-content"},_4={class:"dialog-footer"},S4={class:"form-content"},E4={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref([]),d=e.ref([]),c=e.ref(!1),u=e.ref([]),y=e.ref([]),b=e.ref(""),g=e.ref(!1),p=e.ref(0),D=e.ref([]),m=e.ref([]),F=(U,W)=>{if((W==null?void 0:W.type)=="Select"&&(U==null?void 0:U.key)==="selectRelateType"){const Z=W==null?void 0:W.optionUrl;return(Z==null?void 0:Z.selectRelateType)||W[U.key]}if((W==null?void 0:W.type)=="Select"&&(U==null?void 0:U.key)==="menuSelect"){const Z=W==null?void 0:W.optionUrl;return(Z==null?void 0:Z.menuSelect)||W[U.key]}if((W==null?void 0:W.type)=="Select"&&(U==null?void 0:U.key)==="groupSelect"){const Z=W==null?void 0:W.optionUrl;return(Z==null?void 0:Z.groupSelect)||W[U.key]}if((W==null?void 0:W.type)=="Select"&&(U==null?void 0:U.key)==="originalContent")return(W==null?void 0:W.value)||W[U.key];if((W==null?void 0:W.type)=="Select"&&(U==null?void 0:U.key)==="multiple"){const Z=W[U.key];return fc(Z)?Z:U.default}return(U==null?void 0:U.label)==="类型"&&W[U.key]===""?"Input":(U==null?void 0:U.key)==="isFormColHidden"&&!W[U.key]?!1:W[U.key]},C=async U=>{var Q,ve,Ae,te,A,se;i.value=!0;let W=[];const Z=await((Ae=(ve=(Q=re.FormContent)==null?void 0:Q.find(G=>(G==null?void 0:G.key)===((U==null?void 0:U.type)===""?"Input":U==null?void 0:U.type)))==null?void 0:ve.value)==null?void 0:Ae.value)??((A=(te=re.FormContent)==null?void 0:te.find(G=>(G==null?void 0:G.key)===((U==null?void 0:U.type)===""?"Input":U==null?void 0:U.type)))==null?void 0:A.value);if(Z==null||Z.forEach(G=>{p.value++,W.push({label:G==null?void 0:G.label,name:G==null?void 0:G.label,type:G.type,prop:G==null?void 0:G.prop,value:F(G,U),id:p.value,contents:G==null?void 0:G.options,width:(U==null?void 0:U.width)??1})}),U!=null&&U.menuSelect&&((se=U==null?void 0:U.menuSelect)==null?void 0:se.length)>0){const G=await re.menuToContentType(U==null?void 0:U.menuSelect);W=W==null?void 0:W.map(fe=>((fe==null?void 0:fe.name)==="组信息选项"&&(fe.contents=G),fe))}b.value=U==null?void 0:U.id,o.value=await re.selectToBase(re.formToOptionsContents(W)),d.value=await re.selectToBase(re.formToOptionsContents(W))},L=U=>{var Z;c.value=!0;let W=[];(Z=re.FormButton)==null||Z.forEach(Q=>{p.value++,W.push({label:Q==null?void 0:Q.label,name:Q==null?void 0:Q.label,type:Q.type,value:(Q==null?void 0:Q.label)==="类型"&&U[Q.key]===""?"normal":U[Q.key],id:p.value,contents:Q==null?void 0:Q.options})}),D.value=W,m.value=W,b.value=U==null?void 0:U.id};e.watch(()=>g.value,()=>{var W,Z;let U=z.cloneDeep(r.originalItemContents);(W=z.cloneDeep(r.originalItemContents))!=null&&W.find(Q=>(Q==null?void 0:Q.key)==="enableWrap")?U=(Z=z.cloneDeep(r.originalItemContents))==null?void 0:Z.map(Q=>((Q==null?void 0:Q.key)==="enableWrap"&&(Q.contents=!g.value),Q)):U.push({key:"enableWrap",contents:!g.value}),n("change",U)},{deep:!0});const O=()=>{var Z,Q,ve,Ae,te;D.value=m.value;let U={};if(b.value!==""?U.id=b.value:(p.value++,U.id="id"+p.value),(Z=D.value)==null||Z.forEach(A=>{var G;const se=(G=re.FormButton)==null?void 0:G.find(fe=>(fe==null?void 0:fe.label)===(A==null?void 0:A.label));se&&(U[se.key]=A.value)}),(Q=u.value)!=null&&Q.find(A=>A.id===U.id))u.value=(ve=u.value)==null?void 0:ve.map(A=>(A.id===U.id&&(A=U),A));else{let A=z.cloneDeep(u.value);u.value||(u.value=[]),A.push(U),u.value=A}c.value=!1,b.value="";let W=z.cloneDeep(r.originalItemContents);(Ae=z.cloneDeep(r.originalItemContents))!=null&&Ae.find(A=>(A==null?void 0:A.key)==="formButton")?W=(te=z.cloneDeep(r.originalItemContents))==null?void 0:te.map(A=>((A==null?void 0:A.key)==="formButton"&&(A.contents=u.value),A)):W.push({key:"formButton",contents:u.value}),n("change",W)},S=U=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var W,Z;y.value=(W=z.cloneDeep(y.value))==null?void 0:W.filter(Q=>(Q==null?void 0:Q.id)!==(U==null?void 0:U.id)),n("change",(Z=z.cloneDeep(r.originalItemContents))==null?void 0:Z.map(Q=>((Q==null?void 0:Q.key)==="formContent"&&(Q.contents=y.value),Q))),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},E=U=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var W,Z;u.value=(W=z.cloneDeep(u.value))==null?void 0:W.filter(Q=>(Q==null?void 0:Q.id)!==(U==null?void 0:U.id)),n("change",(Z=z.cloneDeep(r.originalItemContents))==null?void 0:Z.map(Q=>((Q==null?void 0:Q.key)==="formButton"&&(Q.contents=u.value),Q))),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>{var W;c.value=!0;let U=[];(W=re.FormButton)==null||W.forEach(Z=>{p.value++,U.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:(Z==null?void 0:Z.label)==="类型"?"normal":"",id:p.value,contents:Z==null?void 0:Z.options})}),D.value=U,m.value=U},k=()=>{var W,Z,Q;i.value=!0;let U=[];(Q=(Z=(W=re.FormContent)==null?void 0:W.find(ve=>(ve==null?void 0:ve.key)==="Input"))==null?void 0:Z.value)==null||Q.forEach(ve=>{p.value++,U.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:(ve==null?void 0:ve.label)==="类型"?"Input":"",id:p.value,contents:ve==null?void 0:ve.options})}),o.value=U,d.value=U},_=U=>{let W=z.cloneDeep(m.value);W=W==null?void 0:W.map(Z=>(Z.value=U==null?void 0:U[Z.name],Z)),m.value=W},I=U=>{const W=U.find(ve=>(ve==null?void 0:ve.name)==="类型");if((W==null?void 0:W.value)!="Select")return;const Z=U.find(ve=>(ve==null?void 0:ve.name)==="多选"),Q=U.find(ve=>(ve==null?void 0:ve.name)==="初始值");Z!=null&&Z.value&&To.isString(Q.value)&&(Q.value=[Q.value]),!(Z!=null&&Z.value)&&!To.isString(Q.value)&&(Q.value="")},R=async U=>{var W,Z,Q,ve,Ae,te,A,se,G,fe,we,_e;if((U==null?void 0:U.类型)!==((Z=(W=d.value)==null?void 0:W.find(Ue=>(Ue==null?void 0:Ue.label)==="类型"))==null?void 0:Z.value)){let Ue=[];const ra=await((Ae=(ve=(Q=re.FormContent)==null?void 0:Q.find(H=>(H==null?void 0:H.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:ve.value)==null?void 0:Ae.value)?await((fe=(G=(se=re.FormContent)==null?void 0:se.find(H=>(H==null?void 0:H.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:G.value)==null?void 0:fe.value):(A=(te=re.FormContent)==null?void 0:te.find(H=>(H==null?void 0:H.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:A.value;if(ra==null||ra.forEach(H=>{var Me,Le;p.value++;const Ge=od(H==null?void 0:H.default)?(U==null?void 0:U[H.label])??H.value??"":H==null?void 0:H.default;Ue.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:Ge,prop:H==null?void 0:H.prop,id:p.value,contents:H==null?void 0:H.options,width:((Le=(Me=d.value)==null?void 0:Me[0])==null?void 0:Le.width)??1})}),U!=null&&U.菜单选项&&((we=U==null?void 0:U.菜单选项)==null?void 0:we.length)>0){const H=await re.menuToContentType(U==null?void 0:U.菜单选项);Ue=Ue==null?void 0:Ue.map(Ge=>((Ge==null?void 0:Ge.name)==="组信息选项"&&(Ge.contents=H),Ge))}I(Ue),d.value=await re.selectToBase(z.cloneDeep(Ue)),o.value=await re.selectToBase(z.cloneDeep(Ue))}else{let Ue=z.cloneDeep(d.value);if(Ue=Ue==null?void 0:Ue.map(ra=>(ra.value=U==null?void 0:U[ra.name],ra)),U!=null&&U.菜单选项&&((_e=U==null?void 0:U.菜单选项)==null?void 0:_e.length)>0){const ra=await re.menuToContentType(U==null?void 0:U.菜单选项);Ue=Ue==null?void 0:Ue.map(H=>((H==null?void 0:H.name)==="组信息选项"&&(H.contents=ra),H))}Ue=re.formToOptionsContents(Ue),I(Ue),d.value=await re.selectToBase(z.cloneDeep(Ue))}},ae=U=>{U||(o.value=d.value)},X=async U=>{await R(U),o.value=d.value},me=Fl.debounce(async()=>{var Q,ve,Ae,te,A,se,G,fe,we,_e,Ue,ra;o.value=d.value;let U={};U.width=((ve=(Q=o.value)==null?void 0:Q[0])==null?void 0:ve.width)??1,b.value!==""?U.id=b.value:(p.value++,U.id="id"+p.value);let W=await((A=(te=(Ae=re.FormContent)==null?void 0:Ae.find(H=>{var Ge,Me;return(H==null?void 0:H.key)===(((Me=(Ge=o.value)==null?void 0:Ge.find(Le=>(Le==null?void 0:Le.label)==="类型"))==null?void 0:Me.value)??"label")}))==null?void 0:te.value)==null?void 0:A.value)??((G=(se=re.FormContent)==null?void 0:se.find(H=>{var Ge,Me;return(H==null?void 0:H.key)===(((Me=(Ge=o.value)==null?void 0:Ge.find(Le=>(Le==null?void 0:Le.label)==="类型"))==null?void 0:Me.value)??"label")}))==null?void 0:G.value);if((fe=o.value)==null||fe.forEach(H=>{const Ge=W==null?void 0:W.find(Me=>(Me==null?void 0:Me.label)===(H==null?void 0:H.label));Ge&&(U[Ge.key]=H.value)}),U.width=U.width?U.width:1,U.key=U==null?void 0:U.label,U.isFormColHidden=U==null?void 0:U.isFormColHidden,(we=y.value)!=null&&we.find(H=>H.id===U.id))y.value=(_e=y.value)==null?void 0:_e.map(H=>(H.id===U.id&&(H=U),H));else{let H=z.cloneDeep(y.value);H.push(U),y.value=H}y.value=y.value.map(({id:H,...Ge})=>Ge),i.value=!1,b.value="";let Z=z.cloneDeep(r.originalItemContents);(Ue=z.cloneDeep(r.originalItemContents))!=null&&Ue.find(H=>(H==null?void 0:H.key)==="formContent")?Z=(ra=z.cloneDeep(r.originalItemContents))==null?void 0:ra.map(H=>((H==null?void 0:H.key)==="formContent"&&(H.contents=y.value),H)):Z.push({key:"formContent",contents:y.value}),n("change",Z)},300),ue=()=>{i.value=!1,c.value=!1,b.value="",d.value=[],m.value=[]};return e.watch(()=>r.originalItemContents,()=>{var W,Z,Q,ve,Ae,te;if(!r.originalItemContents||r.originalItemContents.length===0)return;const U=z.cloneDeep(r.originalItemContents);y.value=((W=U==null?void 0:U.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:W.contents)??[],u.value=((Z=U==null?void 0:U.find(A=>(A==null?void 0:A.key)==="formButton"))==null?void 0:Z.contents)??[],g.value=(Q=U==null?void 0:U.find(A=>(A==null?void 0:A.key)==="enableWrap"))!=null&&Q.contents?!((ve=U==null?void 0:U.find(A=>(A==null?void 0:A.key)==="enableWrap"))!=null&&ve.contents):!0,y.value=(Ae=z.cloneDeep(y.value))==null?void 0:Ae.map((A,se)=>{var fe;let G=A;return G.id=(A==null?void 0:A.id)??se,A!=null&&A.label||(A.label=(A==null?void 0:A.key)??(A==null?void 0:A.label)??""),A!=null&&A.type||(A.type=(A==null?void 0:A.type)??""),A.contents=((fe=A==null?void 0:A.options)==null?void 0:fe.length)===0?(A==null?void 0:A.contents)??"":A==null?void 0:A.options,G}),y.value=re.formToOptionsContents(y.value),u.value=(te=u.value)==null?void 0:te.map((A,se)=>A={label:(A==null?void 0:A.label)??"",type:(A==null?void 0:A.type)??"",background:(A==null?void 0:A.background)??"var(--ssComponent-primary-color)",id:se})},{deep:!0,immediate:!0}),(U,W)=>{const Z=e.resolveComponent("svg-icon"),Q=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",d4,[e.createElementVNode("div",p4,[e.createElementVNode("div",f4,[W[2]||(W[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(Q,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[W[1]||(W[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",h4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(ve,Ae)=>(e.openBlock(),e.createElementBlock("div",{key:Ae},[e.createElementVNode("div",v4,[e.createElementVNode("div",null,e.toDisplayString(ve.label),1),e.createElementVNode("div",m4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>C(ve)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>S(ve)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",y4,[W[4]||(W[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(Q,{class:"icon-content",id:"themeButton",onClick:x},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[W[3]||(W[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",g4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(ve,Ae)=>(e.openBlock(),e.createElementBlock("div",{key:Ae},[e.createElementVNode("div",b4,[e.createElementVNode("div",null,e.toDisplayString(ve.label),1),e.createElementVNode("div",k4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>L(ve)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>E(ve)},null,8,["onClick"])])])]))),128))]),W[6]||(W[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",x4,[W[5]||(W[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(ul._sfc_main$1,{modelValue:g.value,"onUpdate:modelValue":W[0]||(W[0]=ve=>g.value=ve)},null,8,["modelValue"])])]),e.createVNode(Vr.ssDialog,{visible:i.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",w4,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:R,onChangeVisible:ae,onBlurChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",_4,[e.createVNode(Q,{onClick:ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>W[7]||(W[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(Q,{class:"ok-button button",onClick:e.unref(me),id:"themeButton"},{default:e.withCtx(()=>W[8]||(W[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Vr.ssDialog,{visible:c.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",S4,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:ue,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:O},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Rs=fr._export_sfc(E4,[["__scopeId","data-v-20850524"]]),C4={class:"step-module content"},D4={class:"module-data"},T4={class:"step-module layout"},B4={class:"form-content"},N4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=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}]),o=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),d=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),u=e.ref("create"),y=e.ref({}),b=e.ref([]),g=C=>{var L;y.value=C,n("change",(L=m())==null?void 0:L.compData)},p=(C,L)=>{var O,S;switch(C){case"create":(O=o.value)==null||O.forEach(E=>{E.value=""}),u.value="create",c.visible=!0;break;case"update":(S=o.value)==null||S.forEach(E=>{E.value=L[E==null?void 0:E.prop]}),u.value="update",c.visible=!0;break;case"delete":b.value.splice(L,1),u.value="delete";break}},D=C=>{var L,O,S;if((C==null?void 0:C.buttonName)==="确认"){const E=z.cloneDeep(C==null?void 0:C.content);switch(Object.keys(E).forEach(x=>{E[x]===""&&delete E[x]}),u.value){case"create":b.value.push({...E,index:((L=b.value)==null?void 0:L.length)+1});break;case"update":b.value=(O=b.value)==null?void 0:O.map(x=>x.index===(E==null?void 0:E.index)?{...x,title:E==null?void 0:E.title,description:E==null?void 0:E.description}:x);break}n("change",(S=m())==null?void 0:S.compData),c.visible=!1}else c.visible=!1},m=()=>({comp:"Step",compData:[{key:"stepList",contents:b.value},{key:"stepConfig",contents:y.value}]}),F=()=>{c.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,C=>{var L,O;C&&(y.value=((L=C==null?void 0:C.find(S=>S.key==="stepConfig"))==null?void 0:L.contents)??{},b.value=((O=C==null?void 0:C.find(S=>S.key==="stepList"))==null?void 0:O.contents)??[])},{immediate:!0}),(C,L)=>{const O=e.resolveComponent("svg-icon"),S=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",C4,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(S,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=E=>p("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",D4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(E,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(E==null?void 0:E.title),1),e.createElementVNode("div",null,[e.createVNode(S,{type:"primary",size:"small",onClick:k=>p("update",{...E,index:x+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(S,{type:"danger",size:"small",onClick:k=>p("delete",x)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",T4,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ul.ssForm,{rowContents:i.value,onChange:g},null,8,["rowContents"])])]),e.createVNode(Vr.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:F,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",B4,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:d.value,onOnButtonClick:D},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),A4=fr._export_sfc(N4,[["__scopeId","data-v-7dbd17f2"]]),z4={class:"step-module content"},M4={class:"module-data"},I4={class:"step-module layout"},O4={class:"form-content"},L4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref("create"),o=e.ref({}),d=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}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),b=e.reactive({visible:!1,width:"40%",title:"时间线"}),g=C=>{var L;o.value=C,n("change",(L=m())==null?void 0:L.compData)},p=(C,L)=>{var O,S;switch(C){case"create":(O=u.value)==null||O.forEach(E=>{E.value=""}),i.value="create",b.visible=!0;break;case"update":(S=u.value)==null||S.forEach(E=>{E.value=L[E==null?void 0:E.prop]}),i.value="update",b.visible=!0;break;case"delete":d.value.splice(L,1),i.value="delete";break}},D=C=>{var L,O,S,E;if((C==null?void 0:C.buttonName)==="确认"){const x=z.cloneDeep(C==null?void 0:C.content);switch(Object.keys(x).forEach(k=>{x[k]===""&&delete x[k]}),i.value){case"create":(O=d.value)==null||O.push({...x,index:((L=d.value)==null?void 0:L.length)+1});break;case"update":d.value=(S=d.value)==null?void 0:S.map(k=>k.index===(x==null?void 0:x.index)?{...k,content:x==null?void 0:x.content,timestamp:x==null?void 0:x.timestamp}:k);break}n("change",(E=m())==null?void 0:E.compData),b.visible=!1}else b.visible=!1},m=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:d.value},{key:"timeLineConfig",contents:o.value}]}),F=()=>{b.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,C=>{var L,O;C&&(o.value=((L=C==null?void 0:C.find(S=>S.key==="timeLineConfig"))==null?void 0:L.contents)??{},d.value=((O=C==null?void 0:C.find(S=>S.key==="timeLineList"))==null?void 0:O.contents)??[])},{immediate:!0}),(C,L)=>{const O=e.resolveComponent("svg-icon"),S=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",z4,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(S,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=E=>p("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",M4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(E,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(E==null?void 0:E.content),1),e.createElementVNode("div",null,[e.createVNode(S,{type:"primary",size:"small",onClick:k=>p("update",{...E,index:x+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(S,{type:"danger",size:"small",onClick:k=>p("delete",x)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",I4,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ul.ssForm,{rowContents:c.value,onChange:g},null,8,["rowContents"])])]),e.createVNode(Vr.ssDialog,{visible:b.visible,title:b.title,onBeforeDestroy:F,width:b.width},{default:e.withCtx(()=>[e.createElementVNode("div",O4,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:D},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),R4=fr._export_sfc(L4,[["__scopeId","data-v-39ffc861"]]),$4={};function V4(a,l){return e.openBlock(),e.createElementBlock("div")}const F4=fr._export_sfc($4,[["render",V4]]),P4={class:"extra-content"},j4={key:0},H4={key:1},U4={class:"dialog-footer"},q4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const r=a,n=e.ref(0),i=e.ref(),o=e.ref(),d=l,c=e.ref(!1),u=e.ref({}),y=e.ref({}),b=e.ref();e.watch(()=>[r.itemData],()=>{var E;const S=z.cloneDeep(r.itemData);i.value=(E=z.cloneDeep(S))==null?void 0:E.map(x=>{var k;if(x.key==="extra"){let _=[];(k=x.value)==null||k.forEach(I=>{var R;_.push((R=Object.values(I))==null?void 0:R[0])}),x.value=_}return x})},{deep:!0,immediate:!0});const g=(S,E,x,k)=>{var I;let _={};((I=S==null?void 0:S[0])==null?void 0:I.contents)==="详情"&&(c.value=!0,_[E]=S,o.value=S==null?void 0:S.filter(R=>(R==null?void 0:R.key)!=="tableContentName"),u.value=_,y.value=x,b.value=k.id)},p=S=>{var R,ae,X,me;const E=(ae=(R=Object.values(z.cloneDeep(u.value)))==null?void 0:R[0])==null?void 0:ae.filter(ue=>(ue==null?void 0:ue.key)==="tableContentName"),x=(me=(X=Object.values(z.cloneDeep(u.value)))==null?void 0:X[0])==null?void 0:me.filter(ue=>(ue==null?void 0:ue.key)!=="tableContentName"),k=x==null?void 0:x.map((ue,U)=>{var W;return U===S.index&&(ue==null?void 0:ue.comp)==="Table"&&(ue.compData=(W=ue.compData)==null?void 0:W.map(Z=>{var Q,ve;return(Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=(ve=(Q=S.content)==null?void 0:Q.map(Ae=>{let te={};for(let A in Ae)A!=="id"&&(te[A]=Ae[A]);return te}))==null?void 0:ve.map(Ae=>Object.values(Ae))),Z})),ue});k.unshift(E==null?void 0:E[0]);let _=z.cloneDeep(u.value),I={};for(let ue in _)I[ue]=k;u.value=I},D=()=>{c.value=!1,u.value={},y.value={},b.value=void 0,n.value++},m=S=>{var R,ae,X,me;const E=(ae=(R=Object.values(z.cloneDeep(u.value)))==null?void 0:R[0])==null?void 0:ae.filter(ue=>(ue==null?void 0:ue.key)==="tableContentName"),x=(me=(X=Object.values(z.cloneDeep(u.value)))==null?void 0:X[0])==null?void 0:me.filter(ue=>(ue==null?void 0:ue.key)!=="tableContentName"),k=x==null?void 0:x.map((ue,U)=>(U===S.index&&(ue.compData=S.contents),ue));k.unshift(E==null?void 0:E[0]);let _=z.cloneDeep(u.value),I={};for(let ue in _)I[ue]=k;u.value=I},F=()=>{var E,x;let S={};for(let k in y.value)k===((E=Object.keys(u.value))==null?void 0:E[0])?S[k]=(x=Object.values(u.value))==null?void 0:x[0]:S[k]=y.value[k];d("change",{buttonName:"编辑",index:b.value,singleContent:S},"methodData"),c.value=!1,u.value={},y.value={},b.value=void 0},C=()=>{c.value=!1,u.value={},y.value={},b.value=void 0},L=S=>{d("change",S,"methodData")},O=S=>$i(S);return(S,E)=>{const x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",P4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(k,_)=>(e.openBlock(),e.createElementBlock("div",{key:n.value},[(k==null?void 0:k.key)==="extra"?(e.openBlock(),e.createElementBlock("div",j4)):(e.openBlock(),e.createElementBlock("div",H4,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(k.comp)),{itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,key:_,index:(k==null?void 0:k.id)??_,onContentClick:g,onChange:L},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Vr.ssDialog,{visible:c.value,onBeforeDestroy:C},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(k,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(k.comp)),{itemData:k==null?void 0:k.compData,onChange:p,childItemData:k==null?void 0:k.itemChildData,key:_,onContentChange:m,index:(k==null?void 0:k.id)??_,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",U4,[e.createVNode(x,{class:"cancel-button footer-button",onClick:D,id:"themeBorderButton"},{default:e.withCtx(()=>E[0]||(E[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(x,{class:"confirm-button footer-button",onClick:F,id:"themeButton"},{default:e.withCtx(()=>E[1]||(E[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},W4=fr._export_sfc(q4,[["__scopeId","data-v-2d9c5ab2"]]),G4={key:0,class:"method-content"},K4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),r=re.useOriginalState(z.pinia),{originalPath:n}=z.storeToRefs(r),i=a,o=e.ref(!1),d=e.ref(),c=re.useTableComp(z.pinia),{multipleTableConst:u}=z.storeToRefs(c),y=z.useModelComp(z.pinia),b=e.ref(!1),g=z.useMenuState(z.pinia),p=z.useLoginState(z.pinia),{itemData:D,isEdit:m,routeToChildPath:F,tableViewContents:C,lockingPage:L,payloadTypes:O}=z.storeToRefs(y),{activeMenuPath:S,platform:E,childMenu:x}=z.storeToRefs(g),{loginUserInfo:k}=z.storeToRefs(p),_=e.ref(!1),I=async()=>{var te,A;(te=l.value)!=null&&te.find(se=>(se==null?void 0:se.buttonName)==="保存")&&await Z((A=l.value)==null?void 0:A.find(se=>(se==null?void 0:se.buttonName)==="保存")),await re.onSaveBack()};e.watch(()=>D.value,async()=>{m.value==="view"&&!_.value&&await Ae(z.cloneDeep(i.itemData)),_.value=!1},{deep:!0});const R=()=>{o.value=!1,d.value=void 0},ae=te=>te.map(A=>{const se={};for(const G in A){const fe=A[G];if(G.includes(u.value)){const we=G.split(u.value);let _e=se;we.forEach((Ue,ra)=>{ra===we.length-1?_e[Ue]=fe:(_e[Ue]||(_e[Ue]={}),_e=_e[Ue])})}else se[G]=fe}return se}),X=async(te,A,se=[])=>{var fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We;let G=(fe=z.cloneDeep(A))==null?void 0:fe.filter(V=>(V==null?void 0:V.comp)!=="methodButton");if(te!=null&&te.includes("[")){let V=(H=(ra=(Ue=(_e=(we=z.cloneDeep(te))==null?void 0:we.split("["))==null?void 0:_e[1])==null?void 0:Ue.split("]"))==null?void 0:ra[0])==null?void 0:H.split(":"),P="";if(V!=null&&V[0]){let le=(Ge=G==null?void 0:G.find(ce=>(ce==null?void 0:ce.name)===(V==null?void 0:V[0])))==null?void 0:Ge.compData;if(!le){let ce=(Me=te==null?void 0:te.split("["))==null?void 0:Me[0],he=await re.getItemData(ce,sessionStorage.getItem("systemKey"),"",!1,"","",se);le=(Le=he==null?void 0:he.find(ua=>(ua==null?void 0:ua.name)===(V==null?void 0:V[0])))==null?void 0:Le.compData}le==null||le.forEach(ce=>{var he,ua,ia,Ve,va,Ea;if((ce==null?void 0:ce.key)==="formContent")(he=ce==null?void 0:ce.contents)==null||he.forEach(Ce=>{var Fa;(Ce==null?void 0:Ce.key)===(V==null?void 0:V[1])&&(Array.isArray(Ce==null?void 0:Ce.value)?P=Ce==null?void 0:Ce.value:P=(Fa=Ce==null?void 0:Ce.value)==null?void 0:Fa.toString())});else if((ce==null?void 0:ce.key)==="tableContents"){let Ce=[],Fa=(ua=le==null?void 0:le.find(da=>(da==null?void 0:da.key)==="header"))==null?void 0:ua.contents,Da=(V==null?void 0:V[1])??"";if(Fa!=null&&Fa.every(da=>Array.isArray(da))){let da=re.getColumnChild((va=Fa==null?void 0:Fa[0])==null?void 0:va.filter(ja=>(ja==null?void 0:ja.label)!=="操作"));(Ea=ce.contents)==null||Ea.forEach(ja=>{let sa={};ja=ja==null?void 0:ja.filter(Fe=>!(Fe!=null&&Fe.id)),da==null||da.forEach((Fe,ha)=>{let Qe=ja[ha];typeof ja[ha]=="number"&&(Qe=ja[ha].toString()),(Da===""||Da===Fe.prop)&&(sa[Fe.prop]=Qe)}),Ce.push(sa)}),Ce=ae(Ce)}else{let da=(ia=Fa==null?void 0:Fa.map(ja=>ja==null?void 0:ja.label))==null?void 0:ia.filter(ja=>ja!=="操作");(Ve=ce.contents)==null||Ve.forEach(ja=>{let sa={};ja=ja==null?void 0:ja.filter(Fe=>!(Fe!=null&&Fe.id)),da==null||da.forEach((Fe,ha)=>{let Qe=ja[ha];typeof ja[ha]=="number"&&(Qe=ja[ha].toString()),(Da===""||Da===Fe)&&(sa[Fe]=Qe)}),Ce.push(sa)})}P=Ce}})}return P}else if(te!=null&&te.includes("/")){let V={};return(Ie=z.cloneDeep(G))==null||Ie.forEach((P,le)=>{var ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe,Oe,$e,ne;if((P==null?void 0:P.comp)==="Table"){let qe=Array.isArray((ua=(he=(ce=P==null?void 0:P.compData)==null?void 0:ce.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:he.contents)==null?void 0:ua[0])?(Ea=(va=(Ve=(ia=P==null?void 0:P.compData)==null?void 0:ia.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:Ve.contents)==null?void 0:va[0])==null?void 0:Ea.some(Be=>Be==null?void 0:Be.children):[],na=(Da=(Fa=(Ce=P==null?void 0:P.compData)==null?void 0:Ce.find(Be=>(Be==null?void 0:Be.key)==="tableContents"))==null?void 0:Fa.contents)==null?void 0:Da.map(Be=>(Be!=null&&Be.find(Ke=>Ke==null?void 0:Ke.id)&&(Be=Be.slice(1)),Be)),fa=(ha=(Fe=(sa=(ja=(da=P==null?void 0:P.compData)==null?void 0:da.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:ja.contents)==null?void 0:sa[0])==null?void 0:Fe[0])==null?void 0:ha.label,ze=(Oe=(Qe=P==null?void 0:P.compData)==null?void 0:Qe.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:Oe.contents;if(qe)(qe==null?void 0:qe.length)===0?V[P.name]=V!=null&&V[P.name]?V[P.name]:re.tableToForm(na,ze):V[fa]=re.tableToForm(na,ze);else{const Be=[];ze=ze.slice(1,ze.length-1),ze==null||ze.forEach((Ke,Ee)=>{na==null||na.forEach(ye=>{Be.push({key:Ke.label+ye[0],value:ye[Ee+1]})})}),V["form"+le]=Be}}else{const qe=(ne=($e=P.compData)==null?void 0:$e.find(fa=>(fa==null?void 0:fa.key)==="formContent"))==null?void 0:ne.contents;V!=null&&V.form||(V.form=[]);const na=[];qe==null||qe.forEach(fa=>{fa.key!==""&&(fa={key:(fa==null?void 0:fa.key)??(fa==null?void 0:fa.label),value:fa==null?void 0:fa.value},na.push(fa))}),V.form=[...na,...z.cloneDeep(V==null?void 0:V.form)]}}),V}else{if(te==="createInsofDataApi"){let V=(de=z.cloneDeep(A))==null?void 0:de[0];return V={comp:(De=z.cloneDeep(V))==null?void 0:De.comp,compData:(Je=z.cloneDeep(V))==null?void 0:Je.compData,name:(Sa=z.cloneDeep(V))==null?void 0:Sa.name,isShow:(We=z.cloneDeep(V))==null?void 0:We.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:S.value},value:{pageData:V}}}return te}},me=async(te,A,se)=>{var we,_e,Ue;let G=await re.getItemData(A,sessionStorage.getItem("systemKey"),""),fe=G==null?void 0:G.find(ra=>(ra==null?void 0:ra.name)===(se==null?void 0:se[0]));if(fe){if((fe==null?void 0:fe.comp)==="Table"){let ra={};for(let De in z.cloneDeep(te))z.cloneDeep(te)[De]!=="loginUser"?ra[De]=z.cloneDeep(te)[De]:ra[De]=((we=k.value)==null?void 0:we.account)||((_e=k.value)==null?void 0:_e.账号);let H=[],Ge=ra;Array.isArray(te)||(Ge=[ra]),Ge==null||Ge.forEach(De=>{H.push({[De[se[1]]]:De})});let Me=[],Le=H==null?void 0:H.map(De=>{var Je;return(Je=Object.keys(De))==null?void 0:Je[0]});G==null||G.forEach(De=>{var Je;(De==null?void 0:De.name)===(se==null?void 0:se[0])&&((Je=De==null?void 0:De.compData)==null||Je.forEach(Sa=>{var We;(Sa==null?void 0:Sa.key)==="tableContents"&&((We=Sa==null?void 0:Sa.contents)==null||We.forEach(V=>{V!=null&&V.some(P=>Le.includes(P))&&Me.push({[V.find(P=>P.id).id]:V.find(P=>Le.includes(P))})}))}))});let Ie=Me==null?void 0:Me.map(De=>{var Je;return(Je=Object.keys(De))==null?void 0:Je[0]}),de=[];if(Ie==null||Ie.forEach(De=>{var We;let Je=(We=Me==null?void 0:Me.find(V=>{var P;return((P=Object.keys(V))==null?void 0:P[0].toString())===De.toString()}))==null?void 0:We[De],Sa=H==null?void 0:H.find(V=>{var P;return((P=Object.keys(V))==null?void 0:P[0])===Je});de.push({id:parseInt(De),value:{tableData:Sa[Je]}})}),(de==null?void 0:de.length)>0)return de}else if((fe==null?void 0:fe.comp)==="Form"){let ra=z.cloneDeep(fe);ra.compData=(Ue=ra.compData)==null?void 0:Ue.map(Me=>{var Le;return(Me==null?void 0:Me.key)==="formContent"&&(Me.contents=(Le=Me.contents)==null?void 0:Le.map(Ie=>((Ie==null?void 0:Ie.key)===(se==null?void 0:se[1])&&(Ie.value=(te==null?void 0:te[Ie==null?void 0:Ie.prop])||te),Ie))),Me});let H={};for(let Me in ra)Me!=="id"&&(H[Me]=ra[Me]);let Ge=[];if(Ge.push({id:fe==null?void 0:fe.id,keyType:se==null?void 0:se[1],value:{pageData:H}}),(Ge==null?void 0:Ge.length)>0)return Ge}}},ue=async(te,A,se)=>{var we,_e,Ue,ra,H,Ge,Me,Le,Ie,de;let G=await re.getItemData(A,sessionStorage.getItem("systemKey"),""),fe=G==null?void 0:G.find(De=>(De==null?void 0:De.name)===(se==null?void 0:se[0]));if(fe){if((fe==null?void 0:fe.comp)==="Table"){let De={};for(let Je in z.cloneDeep(te))z.cloneDeep(te)[Je]!=="loginUser"?De[Je]=z.cloneDeep(te)[Je]:De[Je]=((we=k.value)==null?void 0:we.account)||((_e=k.value)==null?void 0:_e.账号);await Zr.createInsofDataApi({key:{type:"data",pageKey:A,tableId:fe==null?void 0:fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:De}})}else if((fe==null?void 0:fe.comp)==="Form"){let De=z.cloneDeep(fe),Je=Object.keys(te),Sa="";(ra=(Ue=z.cloneDeep(De))==null?void 0:Ue.compData)==null||ra.forEach(he=>{var ua,ia;(he==null?void 0:he.key)==="formContent"&&((ia=(ua=z.cloneDeep(he))==null?void 0:ua.contents)==null||ia.forEach(Ve=>{var va;Je.includes(Ve==null?void 0:Ve.key)&&(Ve==null?void 0:Ve.value)===((va=k.value)==null?void 0:va.姓名)&&(Sa=Ve==null?void 0:Ve.key)}))});let We=[];(H=Object.values(te[Sa]))==null||H.forEach(he=>{he!=null&&he.includes("(")&&We.push(he)}),We=[...new Set(We)];const V=We==null?void 0:We.map(async he=>{var Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe,Oe,$e;let ua="";(ja=(da=(Da=(Fa=(Ce=(Ea=z.cloneDeep(he))==null?void 0:Ea.split("("))==null?void 0:Ce[1])==null?void 0:Fa.split(")"))==null?void 0:Da[0])==null?void 0:da.split(":"))==null||ja.forEach(ne=>{ua=ua===""?ua+ne.replaceAll("'",""):ua+"/"+ne.replaceAll("'","")});let ia=[];($e=(Oe=(Qe=(ha=(Fe=(sa=z.cloneDeep(he))==null?void 0:sa.split("<"))==null?void 0:Fe[1])==null?void 0:ha.split(">"))==null?void 0:Qe[0])==null?void 0:Oe.split(":"))==null||$e.forEach(ne=>{ia.push(ne.replaceAll("'",""))});const Ve=await re.getItemData(ua,sessionStorage.getItem("systemKey"),"");let va="";return Ve==null||Ve.forEach(ne=>{var qe;ne.name===(ia==null?void 0:ia[0])&&((qe=ne==null?void 0:ne.compData)==null||qe.forEach(na=>{var fa;(na==null?void 0:na.key)==="formContent"&&((fa=na.contents)==null||fa.forEach(ze=>{(ze==null?void 0:ze.key)===(ia==null?void 0:ia[1])&&(va=ze==null?void 0:ze.value)}))}))}),{[he]:va}}),P=await Promise.all(V);De.compData=(Me=(Ge=z.cloneDeep(De))==null?void 0:Ge.compData)==null?void 0:Me.map(he=>{var ua,ia;return(he==null?void 0:he.key)==="formContent"&&(he.contents=(ia=(ua=z.cloneDeep(he))==null?void 0:ua.contents)==null?void 0:ia.map(Ve=>{var va,Ea,Ce,Fa;return(va=te[Sa])!=null&&va[Ve==null?void 0:Ve.key]&&(te[Sa][Ve==null?void 0:Ve.key].includes("(")?Ve.value=(Ea=P==null?void 0:P.find(Da=>{var da;return((da=Object.keys(Da))==null?void 0:da[0])===te[Sa][Ve==null?void 0:Ve.key]}))==null?void 0:Ea[te[Sa][Ve==null?void 0:Ve.key]]:Ve.value=(Fa=(Ce=z.cloneDeep(te))==null?void 0:Ce[Sa])==null?void 0:Fa[Ve==null?void 0:Ve.key]),Ve})),he});const le=await Zr.getInsofDataApi({key:{type:"structure",pageKey:A,systemKey:sessionStorage.getItem("systemKey")}});let ce="";((Le=le==null?void 0:le.data)==null?void 0:Le.type)==="success"&&((de=(Ie=le==null?void 0:le.data)==null?void 0:Ie.result)==null||de.forEach(he=>{var ua,ia;((ia=(ua=he==null?void 0:he.value)==null?void 0:ua.pageData)==null?void 0:ia.name)===(se==null?void 0:se[0])&&(ce=he.id)}),await Zr.updateInsofDataApi({id:ce,value:{pageData:De}}))}}},U=(te,A="",se={})=>{for(const[G,fe]of Object.entries(te)){const we=A?`${A}.${G}`:G;fe!==null&&typeof fe=="object"&&!Array.isArray(fe)&&Object.prototype.toString.call(fe)!=="[object Date]"?U(fe,we,se):se[we]=fe}return se},W=async(te,A,se,G)=>{var _e,Ue,ra,H,Ge,Me,Le,Ie,de,De,Je,Sa,We,V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa;let fe=await re.getItemData(A,sessionStorage.getItem("systemKey"),""),we=fe==null?void 0:fe.find(Da=>(Da==null?void 0:Da.name)===(se==null?void 0:se[0]));if(we){if(!(se!=null&&se[1])&&(we==null?void 0:we.comp)==="Table"){let Da={},da=[],ja=(Ue=(_e=we==null?void 0:we.compData)==null?void 0:_e.find(ha=>(ha==null?void 0:ha.key)==="header"))==null?void 0:Ue.contents;ja!=null&&ja.every(ha=>Array.isArray(ha))?da=(H=re.getColumnChild((ra=ja==null?void 0:ja[0])==null?void 0:ra.filter(ha=>(ha==null?void 0:ha.label)!=="操作")))==null?void 0:H.map(ha=>ha==null?void 0:ha.prop):da=ja==null?void 0:ja.map(ha=>ha==null?void 0:ha.label);for(let ha in z.cloneDeep(te))if(z.cloneDeep(te)[ha]!=="loginUser"){let Qe=U(z.cloneDeep(te)[ha]),Oe={};for(let $e in Qe)if(da!=null&&da.find(ne=>ne===$e))Oe[$e]=Qe[$e];else if(da!=null&&da.find(ne=>(ne==null?void 0:ne.toUpperCase())===($e==null?void 0:$e.toUpperCase()))){let ne=da==null?void 0:da.find(qe=>(qe==null?void 0:qe.toUpperCase())===($e==null?void 0:$e.toUpperCase()));Oe[ne]=Qe[$e]}Da[ha]=Oe}else Da[ha]=((Ge=k.value)==null?void 0:Ge.account)||((Me=k.value)==null?void 0:Me.账号);let sa=await Zr.getInsofDataApi({keyLikes:{tableId:we==null?void 0:we.id}});if(((Ie=(Le=sa==null?void 0:sa.data)==null?void 0:Le.result)==null?void 0:Ie.length)>0){let ha=(De=(de=sa==null?void 0:sa.data)==null?void 0:de.result)==null?void 0:De.map(Qe=>Qe==null?void 0:Qe.id);(ha==null?void 0:ha.length)>0&&await Zr.batchDeleteInsofDataApi({ids:ha})}let Fe=[];if((Je=we==null?void 0:we.compData)!=null&&Je.find(ha=>(ha==null?void 0:ha.key)==="pageColumn")&&((V=(We=(Sa=we==null?void 0:we.compData)==null?void 0:Sa.find(ha=>(ha==null?void 0:ha.key)==="pageColumn"))==null?void 0:We.contents)!=null&&V.includes("["))){const ha=await Zr.getInsofDataApi({id:we==null?void 0:we.tableId});let Qe=((he=(ce=(le=(P=ha==null?void 0:ha.data)==null?void 0:P.result)==null?void 0:le[0])==null?void 0:ce.key)==null?void 0:he.pageKey)??"";(ua=Object.values(Da))==null||ua.forEach(Oe=>{Fe.push({key:{type:"data",pageKey:Qe,tableId:we==null?void 0:we.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Oe}})})}else(ia=Object.values(Da))==null||ia.forEach(ha=>{Fe.push({key:{type:"data",pageKey:A,tableId:we==null?void 0:we.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ha}})});(Fe==null?void 0:Fe.length)>0&&await Zr.batchAddInsofDataApi({dataList:Fe})}else if(!(se!=null&&se[1])&&(we==null?void 0:we.comp)==="Form"){let Da=z.cloneDeep(we);Da.compData=(va=(Ve=z.cloneDeep(Da))==null?void 0:Ve.compData)==null?void 0:va.map(sa=>{var Fe,ha;return(sa==null?void 0:sa.key)==="formContent"&&(sa.contents=(ha=(Fe=z.cloneDeep(sa))==null?void 0:Fe.contents)==null?void 0:ha.map(Qe=>{var Oe,$e;return(Oe=z.cloneDeep(te))!=null&&Oe[Qe==null?void 0:Qe.key]&&(Qe.value=($e=z.cloneDeep(te))==null?void 0:$e[Qe==null?void 0:Qe.key]),Qe})),sa});const da=await Zr.getInsofDataApi({key:{type:"structure",pageKey:A,systemKey:sessionStorage.getItem("systemKey")}});let ja="";((Ea=da==null?void 0:da.data)==null?void 0:Ea.type)==="success"&&((Fa=(Ce=da==null?void 0:da.data)==null?void 0:Ce.result)==null||Fa.forEach(sa=>{var Fe,ha;((ha=(Fe=sa==null?void 0:sa.value)==null?void 0:Fe.pageData)==null?void 0:ha.name)===(se==null?void 0:se[0])&&(ja=sa.id)}),await Zr.updateInsofDataApi({id:ja,value:{pageData:Da}}))}}},Z=async te=>{var A,se,G,fe,we,_e,Ue,ra,H,Ge,Me,Le,Ie,de;g.setImportLoading(!0);try{if(te.api){let De=new WeakMap,Je=await re.getItemData((x==null?void 0:x.value)===""?S.value:x==null?void 0:x.value,sessionStorage.getItem("systemKey"),"",!1,"","",De),Sa="";if(Je=Je==null?void 0:Je.map(ia=>{var Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe;if((ia==null?void 0:ia.comp)==="Form")ia.compData=(Ve=ia.compData)==null?void 0:Ve.map(Oe=>{var $e;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=($e=Oe.contents)==null?void 0:$e.map(ne=>{var qe;if((ne==null?void 0:ne.value)===""&&(ne==null?void 0:ne.type)==="Select"){let na=re.judgeContents((qe=z.cloneDeep(ne))==null?void 0:qe.optionUrl,De);ne.value=ne.value||na}return ne})),Oe});else if((ia==null?void 0:ia.comp)==="Table"&&(va=ia.compData)!=null&&va.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn")){let Oe=(Ce=(Ea=ia.compData)==null?void 0:Ea.find(na=>(na==null?void 0:na.key)==="pageColumn"))==null?void 0:Ce.contents,$e=((Da=(Fa=ia.compData)==null?void 0:Fa.find(na=>(na==null?void 0:na.key)==="pageGroup"))==null?void 0:Da.contents)??"",ne=(sa=(ja=(da=Oe==null?void 0:Oe.split("["))==null?void 0:da[1])==null?void 0:ja.split("]"))==null?void 0:sa[0];Sa=((Fe=Oe==null?void 0:Oe.split("["))==null?void 0:Fe[0])+((Qe=(ha=C.value)==null?void 0:ha.find(na=>(na==null?void 0:na.key)===ne))==null?void 0:Qe.value)}return ia}),!(Sa===""||Sa==="")){const ia=await re.getItemData(Sa,sessionStorage.getItem("systemKey"),"",!1,"","",De);Je=Je==null?void 0:Je.map(Ve=>{var va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe,Oe,$e;if((Ve==null?void 0:Ve.comp)==="Table"&&(va=Ve.compData)!=null&&va.find(ne=>(ne==null?void 0:ne.key)==="pageColumn")){let ne=(Ce=(Ea=Ve.compData)==null?void 0:Ea.find(Be=>(Be==null?void 0:Be.key)==="pageColumn"))==null?void 0:Ce.contents,qe=((Da=(Fa=Ve.compData)==null?void 0:Fa.find(Be=>(Be==null?void 0:Be.key)==="pageGroup"))==null?void 0:Da.contents)??"",na=(sa=(ja=(da=ne==null?void 0:ne.split("["))==null?void 0:da[1])==null?void 0:ja.split("]"))==null?void 0:sa[0],fa=((Fe=ne==null?void 0:ne.split("["))==null?void 0:Fe[0])+((Qe=(ha=C.value)==null?void 0:ha.find(Be=>(Be==null?void 0:Be.key)===na))==null?void 0:Qe.value),ze=(Oe=ia==null?void 0:ia.find(Be=>(Be==null?void 0:Be.name)===(qe===""?i==null?void 0:i.compName:qe)))==null?void 0:Oe.compData;Ve.compData=($e=Ve.compData)==null?void 0:$e.map(Be=>{var Ke;return(Be==null?void 0:Be.key)==="tableContents"&&(Be.contents=(Ke=ze==null?void 0:ze.find(Ee=>(Ee==null?void 0:Ee.key)==="tableContents"))==null?void 0:Ke.contents),Be})}return Ve})}let We={};if(((se=(A=te==null?void 0:te.extraValues)==null?void 0:A.input)==null?void 0:se.length)>0){const ia=(fe=(G=te==null?void 0:te.extraValues)==null?void 0:G.input)==null?void 0:fe.map(async Ve=>{var va;Q!=null&&Q.find(Ea=>Ea===Ve)?We=await X(Ve,Je):We[Object.keys(Ve)[0]]=await X((va=Object.values(Ve))==null?void 0:va[0],Je,De)});await Promise.all(ia)}else We=await X("/",Je);let V=!1;(_e=(we=te==null?void 0:te.extraValues)==null?void 0:we.output)==null||_e.forEach(ia=>{var Ve,va;(va=(Ve=Object.values(ia))==null?void 0:Ve[0])!=null&&va.includes(".doc")&&(V=!0)});let P;if(V){const ia=z.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});P=await Xa.axios.post(te.api,We,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ia.close()})}else P=await Xa.axios.post(te.api,We,{headers:{"Content-Type":"application/json"}});let le=(Ge=(H=(ra=(Ue=z.cloneDeep(te))==null?void 0:Ue.extraValues)==null?void 0:ra.output)==null?void 0:H.map(ia=>{var Ve,va,Ea,Ce,Fa,Da,da,ja,sa,Fe,ha,Qe,Oe,$e,ne,qe;if(!((va=(Ve=Object.values(ia))==null?void 0:Ve[0])!=null&&va.includes(".doc"))){let na=(Fe=(sa=(ja=(Ce=z.cloneDeep((Ea=Object.values(ia))==null?void 0:Ea[0]))==null?void 0:Ce.split("["))==null?void 0:ja[((da=(Da=z.cloneDeep((Fa=Object.values(ia))==null?void 0:Fa[0]))==null?void 0:Da.split("["))==null?void 0:da.length)-1])==null?void 0:sa.split("]"))==null?void 0:Fe[0],fa=na==null?void 0:na.split(":"),ze=(Oe=z.cloneDeep((ha=Object.values(ia))==null?void 0:ha[0]))==null?void 0:Oe.substring(0,z.cloneDeep((Qe=Object.values(ia))==null?void 0:Qe[0]).lastIndexOf("["));if(ze=(ne=z.cloneDeep(ze))==null?void 0:ne.slice(0,(($e=z.cloneDeep(ze))==null?void 0:$e.length)-1),ze!=null&&ze.includes("[")){let Be="";if((qe=re.contentTransArrayToAll(ze,"/"))==null||qe.forEach(Ke=>{var Ee,ye,$a,wl,el,Pl,bl;if(!(Ke!=null&&Ke.includes("[")))Be=Be===""?Be+Ke.replaceAll("/",""):Be+"/"+Ke.replaceAll("/","");else{let jl=z.cloneDeep(Ke).slice(1,((Ee=z.cloneDeep(Ke))==null?void 0:Ee.length)-1),ll=(Pl=(el=(wl=($a=(ye=z.cloneDeep(jl))==null?void 0:ye.split("["))==null?void 0:$a[1])==null?void 0:wl.split("]"))==null?void 0:el[0])==null?void 0:Pl.split(":"),Hl="",Ga=(bl=Je==null?void 0:Je.find(Jl=>(Jl==null?void 0:Jl.name)===(ll==null?void 0:ll[0])))==null?void 0:bl.compData;Ga==null||Ga.forEach(Jl=>{var Xl;(Jl==null?void 0:Jl.key)==="formContent"&&((Xl=Jl==null?void 0:Jl.contents)==null||Xl.forEach(ar=>{(ar==null?void 0:ar.key)===(ll==null?void 0:ll[1])&&(Hl=ar==null?void 0:ar.value)}))}),Be=Be===""?Be+Hl.replaceAll("/",""):Be+"/"+Hl.replaceAll("/","")}}),ze=Be,ze[(ze==null?void 0:ze.length)-1]!=="/")return ze}}}))==null?void 0:Ge.filter(ia=>ia);le=[...new Set(z.cloneDeep(le))];let ce=le==null?void 0:le.map(async ia=>{let Ve=await re.getItemData(ia,sessionStorage.getItem("systemKey"),"",!1,"","",De);if((Ve==null?void 0:Ve.length)===0)return await re.getParentContents(ia)});await Promise.all(ce);let he=[],ua=(Ie=(Le=(Me=z.cloneDeep(te))==null?void 0:Me.extraValues)==null?void 0:Le.output)==null?void 0:Ie.map(async ia=>{var ja,sa,Fe,ha,Qe,Oe,$e,ne,qe,na,fa,ze,Be,Ke,Ee,ye,$a,wl,el,Pl,bl,jl,ll,Hl,Ga,Jl,Xl,ar,Sl,pr,ya,ol,vl,Bl,Ua,_a,rl,Te,oa,Ya,pe,wa,Pa,pl,Il,Qa,kl,Ma,ea,ma,Ha,ka,Ul,Gl,Ba,Rl,Fr,Br,Ze,La,hl,Ll,Ta,Yr,ln,zr,Re,Zl,ql,Jr;if((sa=(ja=Object.values(ia))==null?void 0:ja[0])!=null&&sa.includes(".doc")){var Ve=new Blob([P.data],{type:"application/octet-stream;charset=UTF-8"}),va=P.headers["content-disposition"],Ea=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Ce=Ea.exec(va),Fa=Ce==null?void 0:Ce[1],Da=document.createElement("a"),da=window.URL.createObjectURL(Ve);d.value=[{name:Fa,blobUrl:da}],o.value=!0}else{let Sr=(na=(qe=(ne=(ha=z.cloneDeep((Fe=Object.values(ia))==null?void 0:Fe[0]))==null?void 0:ha.split("["))==null?void 0:ne[(($e=(Oe=z.cloneDeep((Qe=Object.values(ia))==null?void 0:Qe[0]))==null?void 0:Oe.split("["))==null?void 0:$e.length)-1])==null?void 0:qe.split("]"))==null?void 0:na[0],Ql=Sr==null?void 0:Sr.split(":"),Er=(Be=z.cloneDeep((fa=Object.values(ia))==null?void 0:fa[0]))==null?void 0:Be.substring(0,z.cloneDeep((ze=Object.values(ia))==null?void 0:ze[0]).lastIndexOf("["));if(Er!=null&&Er.includes("[")?Er=(Ee=z.cloneDeep(Er))==null?void 0:Ee.slice(0,((Ke=z.cloneDeep(Er))==null?void 0:Ke.length)-1):Er===""&&(Er=S.value),Er=Er.replaceAll("<","[").replaceAll(">","]"),Er!=null&&Er.includes("[")){let $l="";(ye=re.contentTransArrayToAll(Er,"/"))==null||ye.forEach((or,lr)=>{var Wl,Nl,Pr,rr,Wr,Nr,Tr,gn,Sn,Cn,mn;if(!(or!=null&&or.includes("[")))$l=$l===""?$l+or.replaceAll("/",""):$l+"/"+or.replaceAll("/","");else{let On="",nn="";(Wl=z.cloneDeep(or))!=null&&Wl.includes("]")?(On=z.cloneDeep(or).slice(1,((Nl=z.cloneDeep(or))==null?void 0:Nl.length)-1),nn=(Tr=(Nr=(Wr=(rr=(Pr=z.cloneDeep(On))==null?void 0:Pr.split("["))==null?void 0:rr[1])==null?void 0:Wr.split("]"))==null?void 0:Nr[0])==null?void 0:Tr.split(":")):(On=z.cloneDeep(or).slice(1,(gn=z.cloneDeep(or))==null?void 0:gn.length),nn=(Sn=z.cloneDeep(On))==null?void 0:Sn.split("/"));let Dn="",Vn=(Cn=Je==null?void 0:Je.find(on=>(on==null?void 0:on.name)===(nn==null?void 0:nn[0])))==null?void 0:Cn.compData;Vn==null||Vn.forEach(on=>{var Fn;(on==null?void 0:on.key)==="formContent"&&((Fn=on==null?void 0:on.contents)==null||Fn.forEach(Mr=>{(Mr==null?void 0:Mr.key)===(nn==null?void 0:nn[1])&&(Dn=Mr==null?void 0:Mr.value)}))}),((mn=re.contentTransArrayToAll(Er,"/"))==null?void 0:mn.length)-1!==lr?$l=$l===""?$l+Dn.replaceAll("/",""):$l+"/"+Dn.replaceAll("/",""):$l=$l+n.value+Dn.replaceAll("/","")}}),($a=S.value)!=null&&$a.includes($l)?Er=S.value:Er=$l}let er=z.cloneDeep((wl=Object.keys(ia))==null?void 0:wl[0]);if(((el=P==null?void 0:P.data)==null?void 0:el.statusCode)===200||((Pl=P==null?void 0:P.data)==null?void 0:Pl.code)===200){if(((jl=(bl=P==null?void 0:P.data)==null?void 0:bl.data)!=null&&jl[er]||(Hl=(ll=P==null?void 0:P.data)==null?void 0:ll.result)!=null&&Hl[er])&&(Ql==null?void 0:Ql.length)===1)return await W(((Jl=(Ga=P==null?void 0:P.data)==null?void 0:Ga.data)==null?void 0:Jl[er])||((ar=(Xl=P==null?void 0:P.data)==null?void 0:Xl.result)==null?void 0:ar[er]),z.cloneDeep(Er),Ql,Sa);if((pr=(Sl=P==null?void 0:P.data)==null?void 0:Sl.data)!=null&&pr[er]||(ol=(ya=P==null?void 0:P.data)==null?void 0:ya.result)!=null&&ol[er]){let $l=await me(((Bl=(vl=P==null?void 0:P.data)==null?void 0:vl.data)==null?void 0:Bl[er])||((_a=(Ua=P==null?void 0:P.data)==null?void 0:Ua.result)==null?void 0:_a[er]),z.cloneDeep(Er),Ql);return $l&&(he=[...he,...$l]),$l}else{if(!((rl=P==null?void 0:P.data)!=null&&rl.data)){let $l=await re.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,"","",De);$l=$l==null?void 0:$l.map(lr=>{var Wl;return(lr==null?void 0:lr.name)===(Ql==null?void 0:Ql[0])&&(lr.compData=(Wl=lr.compData)==null?void 0:Wl.map(Nl=>{var Pr;return(Nl==null?void 0:Nl.key)==="formContent"&&(Nl.contents=(Pr=Nl.contents)==null?void 0:Pr.map(rr=>{var Wr,Nr;return(rr==null?void 0:rr.key)===(Ql==null?void 0:Ql[1])&&(rr.value=(Nr=(Wr=P==null?void 0:P.data)==null?void 0:Wr.result)==null?void 0:Nr[er==null?void 0:er.replaceAll(":","")]),rr})),Nl})),lr});let or=[];(Te=$l==null?void 0:$l.filter(lr=>(lr==null?void 0:lr.comp)==="Form"))==null||Te.forEach(async lr=>{let Wl={};for(let Nl in lr)Nl!=="id"&&(Wl[Nl]=lr[Nl]);or.push({id:lr==null?void 0:lr.id,value:{pageData:Wl}})}),(or==null?void 0:or.length)>0&&await Zr.batchUpdateInsofDataApi({dataList:or});return}if((Ql==null?void 0:Ql.length)===1){const $l=(pe=(Ya=(oa=P==null?void 0:P.data)==null?void 0:oa.data)==null?void 0:Ya.path)==null?void 0:pe.path;let or="";(Qa=(Il=(pl=(Pa=(wa=$l==null?void 0:$l.split("("))==null?void 0:wa[1])==null?void 0:Pa.split(")"))==null?void 0:pl[0])==null?void 0:Il.split(":"))==null||Qa.forEach(Nl=>{var Pr,rr;or=or===""?or+((Pr=Nl==null?void 0:Nl.replaceAll("'",""))==null?void 0:Pr.trim()):or+"/"+((rr=Nl==null?void 0:Nl.replaceAll("'",""))==null?void 0:rr.trim())});let lr=[(Ha=(ma=(ea=(Ma=(kl=$l==null?void 0:$l.split("<"))==null?void 0:kl[1])==null?void 0:Ma.split(">"))==null?void 0:ea[0])==null?void 0:ma.replaceAll("'",""))==null?void 0:Ha.trim()],Wl;return(Gl=(Ul=(ka=P==null?void 0:P.data)==null?void 0:ka.data)==null?void 0:Ul.data)!=null&&Gl[Ql==null?void 0:Ql[0]]?Wl=await W((Fr=(Rl=(Ba=P==null?void 0:P.data)==null?void 0:Ba.data)==null?void 0:Rl.data)==null?void 0:Fr[Ql==null?void 0:Ql[0]],or,Ql,Sa):Wl=await ue((Ze=(Br=P==null?void 0:P.data)==null?void 0:Br.data)==null?void 0:Ze.data,or,lr,De),Wl}else{const $l=(Ll=(hl=(La=P==null?void 0:P.data)==null?void 0:La.data)==null?void 0:hl.path)==null?void 0:Ll.path;let or="";return(Re=(zr=(ln=(Yr=(Ta=$l==null?void 0:$l.split("("))==null?void 0:Ta[1])==null?void 0:Yr.split(")"))==null?void 0:ln[0])==null?void 0:zr.split(":"))==null||Re.forEach(Wl=>{var Nl,Pr;or=or===""?or+((Nl=Wl==null?void 0:Wl.replaceAll("'",""))==null?void 0:Nl.trim()):or+"/"+((Pr=Wl==null?void 0:Wl.replaceAll("'",""))==null?void 0:Pr.trim())}),await me((Jr=(ql=(Zl=P==null?void 0:P.data)==null?void 0:Zl.data)==null?void 0:ql.data)==null?void 0:Jr[Ql==null?void 0:Ql[0]],or,Ql)}}}}});if(await Promise.all(ua),(he==null?void 0:he.length)>0){let ia=[];he==null||he.forEach(Ea=>{ia!=null&&ia.find(Ce=>{var Fa,Da,da,ja;return((Da=(Fa=Ce==null?void 0:Ce.value)==null?void 0:Fa.pageData)==null?void 0:Da.name)===((ja=(da=Ea==null?void 0:Ea.value)==null?void 0:da.pageData)==null?void 0:ja.name)})||ia.push(Ea)});let Ve=[];ia==null||ia.forEach(Ea=>{var Da,da,ja,sa;let Ce=z.cloneDeep(Ea);Ce.value.pageData.compData=(Da=Ce.value.pageData.compData)==null?void 0:Da.map(Fe=>{var ha;return(Fe==null?void 0:Fe.key)==="formContent"&&(Fe.contents=(ha=Fe.contents)==null?void 0:ha.map(Qe=>{var $e,ne,qe,na;let Oe=($e=z.cloneDeep(he))==null?void 0:$e.find(fa=>(fa==null?void 0:fa.keyType)===(Qe==null?void 0:Qe.key));if(Oe){let fa=(na=(qe=(ne=Oe.value.pageData.compData)==null?void 0:ne.find(ze=>(ze==null?void 0:ze.key)==="formContent"))==null?void 0:qe.contents)==null?void 0:na.find(ze=>(ze==null?void 0:ze.key)===(Qe==null?void 0:Qe.key));Qe.value=fa==null?void 0:fa.value}return Qe})),Fe}),Ve.push({id:Ce==null?void 0:Ce.id,value:Ce==null?void 0:Ce.value});let Fa=[];(sa=(ja=(da=Ce==null?void 0:Ce.value)==null?void 0:da.pageData)==null?void 0:ja.compData)==null||sa.forEach(Fe=>{var ha;(Fe==null?void 0:Fe.key)==="formContent"&&((ha=Fe==null?void 0:Fe.contents)==null||ha.forEach(Qe=>{var Oe,$e,ne,qe,na,fa;if(($e=(Oe=Qe==null?void 0:Qe.optionUrl)==null?void 0:Oe.menuSelect)!=null&&$e.find(ze=>ze==null?void 0:ze.includes("[")))if(Fa!=null&&Fa.find(ze=>{var Be,Ke,Ee;return((Be=ze==null?void 0:ze.key)==null?void 0:Be.join(","))===((Ee=(Ke=Qe==null?void 0:Qe.optionUrl)==null?void 0:Ke.menuSelect)==null?void 0:Ee.join(","))})){let ze=(ne=Fa==null?void 0:Fa.find(Be=>{var Ke,Ee,ye;return((Ke=Be==null?void 0:Be.key)==null?void 0:Ke.join(","))===((ye=(Ee=Qe==null?void 0:Qe.optionUrl)==null?void 0:Ee.menuSelect)==null?void 0:ye.join(","))}))==null?void 0:ne.value;ze.push({key:Qe==null?void 0:Qe.prop,groups:(qe=Qe==null?void 0:Qe.optionUrl)==null?void 0:qe.groupSelect,value:Qe==null?void 0:Qe.value}),Fa=Fa==null?void 0:Fa.map(Be=>{var Ke,Ee,ye;return((Ke=Be==null?void 0:Be.key)==null?void 0:Ke.join(","))===((ye=(Ee=Qe==null?void 0:Qe.optionUrl)==null?void 0:Ee.menuSelect)==null?void 0:ye.join(","))&&(Be.value=ze),Be})}else Fa.push({key:(na=Qe==null?void 0:Qe.optionUrl)==null?void 0:na.menuSelect,value:[{key:Qe==null?void 0:Qe.prop,groups:(fa=Qe==null?void 0:Qe.optionUrl)==null?void 0:fa.groupSelect,value:Qe==null?void 0:Qe.value}]})}))}),(Fa==null?void 0:Fa.length)>0&&(Fa=Fa==null?void 0:Fa.map(Fe=>{var Qe;let ha="";return(Qe=Fe==null?void 0:Fe.key)==null||Qe.forEach(Oe=>{var $e;if(!(Oe!=null&&Oe.includes("[")))ha=ha===""?ha+Oe:ha+"/"+Oe;else{let ne="",qe=($e=Oe==null?void 0:Oe.replaceAll("[","").replaceAll("]",""))==null?void 0:$e.split(":");Je==null||Je.forEach(na=>{var fa;(na==null?void 0:na.name)===(qe==null?void 0:qe[0])&&((fa=na==null?void 0:na.compData)==null||fa.forEach(ze=>{var Be;(ze==null?void 0:ze.key)==="formContent"&&((Be=ze==null?void 0:ze.contents)==null||Be.forEach(Ke=>{(Ke==null?void 0:Ke.prop)===(qe==null?void 0:qe[1])&&(ne=Ke==null?void 0:Ke.value)}))}))}),ha=ha+n.value+ne}}),Fe.key=ha,Fe})),Fa==null||Fa.forEach(Fe=>{var $e,ne,qe;let ha=($e=De[Fe.key])==null?void 0:$e.find(na=>{var fa,ze,Be,Ke,Ee,ye,$a;return((ze=(fa=na==null?void 0:na.value)==null?void 0:fa.pageData)==null?void 0:ze.name)===((Ee=(Ke=(Be=Fe==null?void 0:Fe.value)==null?void 0:Be[0])==null?void 0:Ke.groups)==null?void 0:Ee[0])&&(($a=(ye=na==null?void 0:na.value)==null?void 0:ye.pageData)==null?void 0:$a.name)!==void 0}),Qe=ha==null?void 0:ha.id,Oe=(ne=ha==null?void 0:ha.value)==null?void 0:ne.pageData;Oe.compData=(qe=Oe.compData)==null?void 0:qe.map(na=>{var fa;return(na==null?void 0:na.key)==="formContent"&&(na.contents=(fa=na.contents)==null?void 0:fa.map(ze=>{var Ke;let Be=(Ke=Fe.value)==null?void 0:Ke.find(Ee=>(Ee==null?void 0:Ee.key)===(ze==null?void 0:ze.prop));return Be&&(ze.value=Be.value),ze})),na}),Ve.push({id:Qe,value:{pageData:Oe}})})});let va=(de=z.cloneDeep(he))==null?void 0:de[0];(Ve==null?void 0:Ve.length)>0&&await Zr.batchUpdateInsofDataApi({dataList:Ve})}y.setFreshContent(!0)}g.setImportLoading(!1)}catch{Xa.ElMessage.error("方法执行错误,请查看方法!"),g.setImportLoading(!1)}_.value=!0},Q=["createInsofDataApi"],ve=Fl.debounce(async te=>{Z(te)},100),Ae=async te=>{var _e,Ue,ra;const A=z.cloneDeep(te);let se,G=new WeakMap;te!=null&&te[0].path&&(se=await(A==null?void 0:A.map(async(H,Ge)=>{var We,V,P,le,ce,he,ua,ia,Ve,va,Ea,Ce,Fa,Da,da,ja;const Le=(We=G[H==null?void 0:H.path])==null?void 0:We.filter(sa=>{var Fe;return((Fe=sa==null?void 0:sa.key)==null?void 0:Fe.type)==="data"});let Ie="";const de=await re.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,G);Le==null||Le.forEach(sa=>{var Fe,ha,Qe,Oe,$e;((ha=(Fe=sa==null?void 0:sa.value)==null?void 0:Fe.tableData)==null?void 0:ha.算法名称)===((Qe=A==null?void 0:A[Ge])==null?void 0:Qe.method)&&(Ie=($e=(Oe=sa==null?void 0:sa.value)==null?void 0:Oe.tableData)==null?void 0:$e.算法体)});const De=await re.getItemData(H==null?void 0:H.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,G);let Je="",Sa=(ce=(le=(P=(V=De==null?void 0:De[0])==null?void 0:V.compData)==null?void 0:P.find(sa=>(sa==null?void 0:sa.key)==="header"))==null?void 0:le.contents)==null?void 0:ce.findIndex(sa=>(sa==null?void 0:sa.prop)==="算法体");return(ua=(he=De==null?void 0:De[0])==null?void 0:he.compData)==null||ua.forEach(sa=>{var Fe;(sa==null?void 0:sa.key)==="tableContents"&&((Fe=sa==null?void 0:sa.contents)==null||Fe.forEach(ha=>{ha!=null&&ha.find(Qe=>Qe===(H==null?void 0:H.method))&&(Je=ha[Sa])}))}),{buttonName:((ia=A==null?void 0:A[Ge])==null?void 0:ia.method)||((Ea=(va=(Ve=Le==null?void 0:Le[0])==null?void 0:Ve.value)==null?void 0:va.tableData)==null?void 0:Ea.算法名称),api:(Ie===""?(Da=(Fa=(Ce=Le==null?void 0:Le[0])==null?void 0:Ce.value)==null?void 0:Fa.tableData)==null?void 0:Da.算法体:Ie)||Je,content:de==null?void 0:de.filter(sa=>sa.comp!=="methodButton"),extraContent:(da=z.cloneDeep(H.value))==null?void 0:da.slice(1),methodName:(H==null?void 0:H.path)??"",extraValues:(ja=A==null?void 0:A[Ge])==null?void 0:ja.data}})));const fe=A==null?void 0:A.map(async H=>{var De,Je,Sa,We,V,P;const Ge=(De=resAll.data.result)==null?void 0:De.filter(le=>{var ce,he,ua;return((ce=le==null?void 0:le.key)==null?void 0:ce.parentTable)===""&&((he=le==null?void 0:le.key)==null?void 0:he.type)==="method"&&((ua=le==null?void 0:le.key)==null?void 0:ua.methodName)===le.method}),Me=Ge==null?void 0:Ge[0],Le=(Je=resAll.data.result)==null?void 0:Je.filter(le=>{var ce,he;return((ce=le==null?void 0:le.key)==null?void 0:ce.type)==="methodData"&&((he=le==null?void 0:le.key)==null?void 0:he.tableId)===(Me==null?void 0:Me.id)}),Ie=await re.getItemData(S.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,G),de=Le==null?void 0:Le[0];return{buttonName:(Sa=Me==null?void 0:Me.key)==null?void 0:Sa.methodKey,api:(V=(We=de==null?void 0:de.value)==null?void 0:We.tableData)==null?void 0:V[0],content:Ie==null?void 0:Ie.filter(le=>le.comp!=="methodButton"),extraContent:(P=z.cloneDeep(H.value))==null?void 0:P.slice(1),methodName:(H==null?void 0:H.method)??""}}),we=(_e=te==null?void 0:te[0])!=null&&_e.path&&((Ue=te==null?void 0:te[0])==null?void 0:Ue.path)!==""?await Promise.all(se):await Promise.all(fe);l.value=we==null?void 0:we.filter(H=>H==null?void 0:H.extraContent),(ra=l.value)==null||ra.forEach(H=>{var Ge;H.api===""&&((Ge=H.content)==null||Ge.forEach(Me=>{var Le;Me.comp=="Table"&&y.setExtraContents(re.methodTableToContent(Me.compData,(Le=H.extraContent)==null?void 0:Le[0]))}))})};return e.watch(()=>i.itemData,async()=>{m.value=="view"&&!_.value&&await Ae(z.cloneDeep(i.itemData)),_.value=!1},{immediate:!0,deep:!0}),(te,A)=>{var se,G,fe;return e.unref(m)!=="edit"?(e.openBlock(),e.createElementBlock("div",G4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=l.value)==null?void 0:se.filter(we=>(we==null?void 0:we.buttonName)!=="保存"),we=>{var _e;return e.openBlock(),e.createElementBlock("div",null,[we.api!==""?(e.openBlock(),e.createBlock(e.unref(ms._sfc_main),{key:0,disabled:e.unref(L)===e.unref(S)&&!((_e=we==null?void 0:we.buttonName)!=null&&_e.includes("预览")),class:"calculator-content",modelValue:we.buttonName,onClickTrigger:Ue=>e.unref(ve)(we),loading:b.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(F)!==""&&((fe=e.unref(S))==null?void 0:fe[((G=e.unref(S))==null?void 0:G.length)-1])!==e.unref(n)?(e.openBlock(),e.createBlock(e.unref(ms._sfc_main),{key:0,class:"calculator-content",onClickTrigger:I,modelValue:"保存"})):e.createCommentVNode("",!0)]),o.value?(e.openBlock(),e.createBlock(ul.ssFilePreview,{key:0,fileDataList:d.value,onDestroy:R},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Y4=fr._export_sfc(K4,[["__scopeId","data-v-063aa9af"]]),J4={};function X4(a,l){return" 567 "}const Z4=fr._export_sfc(J4,[["render",X4]]),Q4={class:"module content"},e2={class:"module data"},a2={class:"module layout"},l2={class:"form-content"},r2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.reactive({visible:!1,width:"40%",title:"签名配置"}),o=e.ref("create"),d=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}]),u=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:""}]),y=e.ref({}),b=e.ref([]),g=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:b.value},{key:"signConfig",contents:y.value}]}),p=C=>{var L;y.value=z.cloneDeep(C),n("change",(L=g())==null?void 0:L.compData)},D=C=>{var L,O;if((C==null?void 0:C.buttonName)==="确认"){const S=z.cloneDeep(C==null?void 0:C.content);switch(o.value){case"create":b.value.push({...S,index:((L=b.value)==null?void 0:L.length)+1});break}n("change",(O=g())==null?void 0:O.compData),i.visible=!1}else i.visible=!1},m=(C,L)=>{var O,S;switch(C){case"create":(O=u.value)==null||O.forEach(E=>{E.value=""}),o.value="create",i.visible=!0;break;case"update":(S=u.value)==null||S.forEach(E=>{E.value=L[E==null?void 0:E.prop]}),o.value="update",i.visible=!0;break;case"delete":b.value.splice(L,1),o.value="delete";break}},F=()=>{i.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,C=>{var L,O;C&&(y.value=((L=C==null?void 0:C.find(S=>S.key==="signConfig"))==null?void 0:L.contents)??{},b.value=((O=C==null?void 0:C.find(S=>S.key==="signTypeList"))==null?void 0:O.contents)??[])},{immediate:!0}),(C,L)=>{const O=e.resolveComponent("svg-icon"),S=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Q4,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(S,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=E=>m("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",e2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(E,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(E==null?void 0:E.label),1),e.createElementVNode("div",null,[e.createVNode(S,{type:"primary",size:"small",onClick:k=>m("update",{...E,index:x+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(S,{type:"danger",size:"small",onClick:k=>m("delete",x)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",a2,[e.createVNode(ul.ssForm,{rowContents:c.value,onChange:p},null,8,["rowContents"])])]),e.createVNode(Vr.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:F,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",l2,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:d.value,onOnButtonClick:D},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),n2=fr._export_sfc(r2,[["__scopeId","data-v-487e0536"]]),i2=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(0),o=e.computed(()=>{var g,p;return(g=r==null?void 0:r.stepConfig)!=null&&g.allowTrigger?i.value:(p=r==null?void 0:r.stepConfig)==null?void 0:p.active}),d=(g,p)=>{i.value=p-1,n("clickStep",g,p)};e.onMounted(()=>{var g;n("clickStep",(g=r==null?void 0:r.stepList)==null?void 0:g[0],0)});const c=g=>ul.getComponent(g),u=()=>{var p;const g=(p=r==null?void 0:r.stepList)==null?void 0:p.find((D,m)=>m+1===o.value);return console.log("findStep",g),g?g==null?void 0:g.children:[]},y=g=>{n("clickTrigger",g)},b=g=>{n("changeTrigger",g)};return(g,p)=>{var F,C,L,O,S;const D=e.resolveComponent("el-step"),m=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{direction:(F=a.stepConfig)==null?void 0:F.direction,active:o.value,"finish-status":"success",simple:(C=a.stepConfig)==null?void 0:C.simple,"align-center":((L=a.stepConfig)==null?void 0:L.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(E,x)=>(e.openBlock(),e.createBlock(D,{key:x,class:"step-item",onClick:k=>d(E,x+1)},{title:e.withCtx(()=>[e.renderSlot(g.$slots,"title",{title:E==null?void 0:E.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(g.$slots,"description",{descriptions:E==null?void 0:E.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(O=a.stepConfig)!=null&&O.allowTrigger&&((S=a.stepConfig)!=null&&S.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u(),(E,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(E==null?void 0:E.type)),{modelValue:E.value,"onUpdate:modelValue":k=>E.value=k,onClickTrigger:y,onChangeTrigger:b,content:E==null?void 0:E.content},e.createSlots({_:2},[e.renderList(g.$slots,(k,_)=>({name:_,fn:e.withCtx(I=>[e.renderSlot(g.$slots,_,e.mergeProps({ref_for:!0},I||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),o2=fr._export_sfc(i2,[["__scopeId","data-v-a30ff621"]]),t2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const r=a,n=l,i=e.ref({}),o=e.ref([]),d=(c,u)=>{n("clickStep",c,u)};return e.watch(()=>r==null?void 0:r.itemData,c=>{var g,p,D,m;i.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let u=((g=c==null?void 0:c.find(F=>(F==null?void 0:F.key)==="stepName"))==null?void 0:g.contents)??[],y=[];(D=(p=c==null?void 0:c.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:p.contents)==null||D.forEach(F=>{y.push({label:F==null?void 0:F.label,prop:F==null?void 0:F.prop,name:F==null?void 0:F.prop,type:"text",disabled:!0})});let b=((m=c==null?void 0:c.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:m.contents)??[];u=u==null?void 0:u.map((F,C)=>{let L=y==null?void 0:y.map(O=>{var S;return{...O,value:(S=b==null?void 0:b[C])==null?void 0:S[O==null?void 0:O.prop]}});return{title:F,description:L}}),o.value=u},{immediate:!0,deep:!0}),(c,u)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(o2,{stepConfig:i.value,stepList:o.value,onClickStep:d},{icon:e.withCtx(()=>[e.createVNode(y,{name:"import"})]),title:e.withCtx(({title:b})=>[e.createTextVNode(e.toDisplayString(b),1)]),description:e.withCtx(({descriptions:b})=>[e.createVNode(ul.ssForm,{ref:"formRef",rowContents:b,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),s2=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,r)=>{const n=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,(o,d)=>(e.openBlock(),e.createBlock(n,{key:d,timestamp:o.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:o==null?void 0:o.content,timestamp:o==null?void 0:o.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),c2=fr._export_sfc(s2,[["__scopeId","data-v-4172a886"]]),u2={class:"line-content"},d2={class:"line-time"},p2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,r=e.ref({}),n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,i=>{var o,d;n.value=(o=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:o.contents,r.value=(d=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:d.contents},{immediate:!0}),(i,o)=>(e.openBlock(),e.createBlock(c2,{activities:n.value,timeLineConfig:r.value},{content:e.withCtx(({content:d,timestamp:c})=>[e.createElementVNode("span",u2,e.toDisplayString(d),1),e.createElementVNode("span",d2,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),f2=fr._export_sfc(p2,[["__scopeId","data-v-b4d9deed"]]),h2={class:"tabs-content"},v2=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 r=a,n=l,i=e.ref();e.watch(()=>r==null?void 0:r.itemData,()=>{i.value=r==null?void 0:r.itemData},{immediate:!0,deep:!0});const o=p=>{n("change",p)},d=(p,D)=>{n("contentChange",p,D)},c=p=>{n("pageChange",p)},u=p=>{n("rowClick",p)},y=(p,D)=>{n("routeUrl",p,D)},b=p=>{n("clickTrigger",p)},g=(p,D)=>{n("clickMainKey",p,D)};return(p,D)=>{var m,F;return e.openBlock(),e.createElementBlock("div",h2,[(m=i.value)!=null&&m.length?(e.openBlock(),e.createBlock(ul.ssTab,{tabsContents:i.value,key:(F=i.value)==null?void 0:F.length},{pane:e.withCtx(({tab:C,index:L})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)(C==null?void 0:C.comp)),{related:C==null?void 0:C.relatedTables,compNames:C==null?void 0:C.nameContents,compName:C==null?void 0:C.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:a.isDevMode,itemData:C==null?void 0:C.compData,childItemData:C==null?void 0:C.itemChildData,onChange:o,calculator:C==null?void 0:C.calculatorFilters,index:(C==null?void 0:C.id)??L,config:{showIndex:C==null?void 0:C.showIndex,allowMove:C==null?void 0:C.allowMove,viewport:C==null?void 0:C.viewport,status:C==null?void 0:C.status},onContentChange:d,onPageChange:c,onRowClick:u,onRouteUrl:y,parentTableId:C==null?void 0:C.tableId,allMapContents:a.allMapContents,children:C==null?void 0:C.children,level:1,onClickTrigger:b,onClickMainKey:g},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","calculator","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),m2=fr._export_sfc(v2,[["__scopeId","data-v-71516232"]]),y2={class:"type-select"},g2=["onClick"],b2={class:"list-icon"},k2={__name:"modelSelect",setup(a){const l=ti(z.pinia),{itemData:r}=z.storeToRefs(l),n=i=>{const o=z.cloneDeep(r.value);o.push({comp:i.comp,name:i.name,compData:[]}),l.setItemData(o)};return(i,o)=>{const d=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",y2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Eu),(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:u},[e.createElementVNode("div",{class:"list-content",onClick:y=>n(c)},[e.createElementVNode("div",b2,[e.createVNode(d,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,g2)]))),128))])}}},x2=fr._export_sfc(k2,[["__scopeId","data-v-91799bf8"]]),w2={class:"fill-content"},_2={class:"operate-content"},S2={class:"collapse-title-content"},E2={class:"collapse-title-item"},C2={key:1},D2=["onClick"],T2={class:"icon-content"},B2={key:0,class:"edit-content"},N2=["onClick"],A2={class:"comp-child"},z2={__name:"modelFill",setup(a){const l=ti(z.pinia),{itemData:r,originalData:n}=z.storeToRefs(l),i=e.ref([]);e.ref([]);const o=e.ref([]),d=e.ref([]),c=D=>{var F;let m=(F=z.cloneDeep(d.value))==null?void 0:F.map((C,L)=>(D===L&&(C.content=!0),C));d.value=m},u=D=>{var F;let m=(F=z.cloneDeep(d.value))==null?void 0:F.map((C,L)=>(D===L&&(C.content=!1),C));d.value=m,i.value=z.cloneDeep(r.value)},y=(D,m)=>{var O;let F=(O=z.cloneDeep(d.value))==null?void 0:O.map((S,E)=>(D===E&&(S.content=!1),S));d.value=F;const C=z.cloneDeep(r.value),L=C==null?void 0:C.filter((S,E)=>(E===D&&(S.name=m),S));l.setOriginalData(L),l.setItemData(L)};e.watch(()=>r.value,()=>{var D,m,F;!r.value||((D=r.value)==null?void 0:D.length)===0?i.value=[]:i.value=(m=z.cloneDeep(r.value))==null?void 0:m.filter(C=>(C==null?void 0:C.comp)!=="methodButton"),o.value=i.value,d.value=(F=z.cloneDeep(o.value))==null?void 0:F.map((C,L)=>({id:L,content:!1}))},{deep:!0,immediate:!0});const b=D=>$i(D),g=(D,m,F)=>{var L,O;if(!D)return;let C=z.cloneDeep(r.value);C=(L=C==null?void 0:C.map((S,E)=>(E===F&&(S.compData=D),S)))==null?void 0:L.filter(S=>(S==null?void 0:S.comp)!=="methodButton"),d.value=(O=z.cloneDeep(C))==null?void 0:O.map((S,E)=>({id:E,content:!1})),l.setOriginalData(C),l.setItemData(C)},p=D=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const m=z.cloneDeep(r.value),F=m==null?void 0:m.filter((C,L)=>L!==D);l.setOriginalData(F),l.setItemData(F),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(D,m)=>{const F=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",w2,[m[1]||(m[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",_2,[e.createVNode(pc.default,{class:"collapse-content",collapseContents:i.value},{title:e.withCtx(({item:C,index:L})=>{var O,S,E,x,k,_,I,R,ae,X;return[e.createElementVNode("div",S2,[e.createElementVNode("div",E2,[(S=(O=d.value)==null?void 0:O.find(me=>me.id===L))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:C.name&&C.name!==""?"8px":"0px"})},e.toDisplayString(C.name),5)),(x=(E=d.value)==null?void 0:E.find(me=>me.id===L))!=null&&x.content?(e.openBlock(),e.createElementBlock("div",C2,[e.createVNode(ul.ssInput,{modelValue:C.name,"onUpdate:modelValue":me=>C.name=me,onClick:m[0]||(m[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(_=(k=d.value)==null?void 0:k.find(me=>me.id===L))!=null&&_.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(me=>c(L),["stop"]),class:"icon-content"},[e.createVNode(F,{name:"Edit",style:{width:"16px",height:"16px"}})],8,D2))]),e.createElementVNode("div",T2,[(R=(I=d.value)==null?void 0:I.find(me=>me.id===L))!=null&&R.content?(e.openBlock(),e.createElementBlock("div",B2,[e.createVNode(F,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(me=>u(L),["stop"])},null,8,["onClick"]),e.createVNode(F,{name:"Save",onClick:e.withModifiers(me=>y(L,C.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(X=(ae=d.value)==null?void 0:ae.find(me=>me.id===L))!=null&&X.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(me=>p(L),["stop"]),class:"icon-content"},[e.createVNode(F,{name:"Delete",style:{width:"16px",height:"16px"}})],8,N2))])])]}),content:e.withCtx(({item:C,index:L})=>{var O,S;return[e.createElementVNode("div",A2,[e.createTextVNode(e.toDisplayString(b(C.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b(C.comp+"Operate")),{itemContents:C==null?void 0:C.compData,originalItemContents:(S=(O=o.value)==null?void 0:O.find((E,x)=>x===L))==null?void 0:S.compData,onChange:E=>g(E,C,L)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},M2=fr._export_sfc(z2,[["__scopeId","data-v-a46a44b9"]]),I2={key:0,class:"show-content"},O2={style:{display:"flex"}},L2={__name:"modelShow",setup(a){const l=ti(z.pinia),{itemData:r}=z.storeToRefs(l),n=e.ref([]);e.watch(()=>r.value,()=>{var o;!r.value||((o=r.value)==null?void 0:o.length)===0?n.value=[]:n.value=z.cloneDeep(r.value)},{deep:!0,immediate:!0});const i=o=>$i(o);return(o,d)=>{var c;return((c=n.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",I2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(u,y)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:y},[e.createElementVNode("div",O2,e.toDisplayString(u.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(u.comp)),{itemData:u==null?void 0:u.compData,childItemData:u==null?void 0:u.itemChildData,key:y},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},R2=fr._export_sfc(L2,[["__scopeId","data-v-3f3e863e"]]),$2={class:"tabs-header"},V2={class:"tabs-list"},F2={class:"tab-name"},P2={class:"tab-actions"},j2=["onClick"],H2=["onClick"],U2=["onClick"],q2={class:"model-operate"},W2={class:"model-select",style:{display:"unset"}},G2={class:"existing-components"},K2={class:"component-list"},Y2=["onClick"],J2={class:"component-info"},X2={class:"component-type"},Z2={class:"component-name"},Q2={class:"model-fill"},ev={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]),o=e.ref(!1),d=e.ref(""),c=e.ref({title:""}),u=e.ref(-1),y=e.ref(!1),b=e.ref(-1),g=e.ref(new WeakMap),p=e.ref(null),D=ti(z.pinia),{itemData:m}=z.storeToRefs(D),F=()=>{d.value="新增标签页",c.value.title="",u.value=-1,o.value=!0},C=te=>{d.value="修改标签页",c.value.title=i.value[te].title,u.value=te,o.value=!0},L=te=>{const A=E(te);g.value.delete(A),i.value.splice(te,1),Ae()},O=()=>{if(c.value.title.trim()){if(u.value===-1){const te={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:S()};i.value.push(te)}else i.value[u.value].title=c.value.title,i.value[u.value].value=c.value.title,i.value[u.value].label=c.value.title;o.value=!1,Ae()}},S=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,E=te=>{const A=i.value[te];return A.id||(A.id=S()),A.id},x=te=>{var G;b.value=te;const A=E(te);p.value=z.cloneDeep(m.value);let se=g.value.get(A);!se&&((G=i.value[te].children)==null?void 0:G.length)>0&&(se=R(i.value[te].children)),se?D.setItemData(z.cloneDeep(se)):D.setItemData([]),y.value=!0},k=e.computed(()=>{const te=z.useModelComp(z.pinia),A=z.storeToRefs(te).itemData.value;return console.log("可用组件数据",A),!A||!Array.isArray(A)?[]:A.filter(se=>{var G;if(se.comp==="Tabs"&&b.value>=0){const fe=E(b.value);if((G=se.compData)==null?void 0:G.some(_e=>{var Ue;return _e.key==="stepList"&&((Ue=_e.contents)==null?void 0:Ue.some(ra=>ra.id===fe))}))return!1}return!0})}),_=te=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[te]||te,I=te=>{var A;try{const se=z.cloneDeep(te);se.id=Date.now()+Math.random(),se.comp==="Tabs"&&((A=se.compData)==null||A.forEach(fe=>{fe.key==="stepList"&&fe.contents&&fe.contents.forEach(we=>{we.id=S()})}));const G=z.cloneDeep(m.value);G.push(se),D.setItemData(G)}catch(se){console.error("添加组件失败:",se)}},R=te=>te.map(A=>{var se;switch(A.type){case"form":return{comp:"Form",name:A.value||"表单",compData:ae(A.content)};case"table":return{comp:"Table",name:A.value||"表格",compData:X(A.content)};default:return{comp:"Unknown",name:A.value||"",compData:((se=A.content)==null?void 0:se.originalData)||[]}}}),ae=te=>{if(!te)return[];const A=[];return te.rowContents&&A.push({key:"formContent",contents:te.rowContents}),te.buttonValue&&A.push({key:"formButton",contents:te.buttonValue}),typeof te.isEnableWrap<"u"&&A.push({key:"enableWrap",contents:te.isEnableWrap}),A},X=te=>[],me=()=>{if(b.value>=0&&b.value<i.value.length){const te=E(b.value);g.value.set(te,z.cloneDeep(m.value)),i.value[b.value].children=W(m.value),console.log("保存后的数据",W(m.value))}y.value=!1,b.value=-1,p.value=null,Ae()},ue=()=>{p.value&&D.setItemData(z.cloneDeep(p.value)),y.value=!1,b.value=-1,p.value=null},U=()=>{y.value&&ue()},W=te=>{if(!Array.isArray(te))throw new Error("sourceData must be an array");return te.map((A,se)=>{if(!A||typeof A!="object")return A;const{comp:G,name:fe,compData:we}=A;switch(G){case"Form":return{type:"form",content:Z(we||[]),value:"表单"};case"Table":return{type:"table",content:Q(we||[]),value:"表格"};default:return{type:"xxx",content:ve(we||[]),value:""}}})},Z=te=>{const A={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},se={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return te.forEach((G,fe)=>{if(!G||typeof G!="object"){console.warn(`Invalid config at index ${fe}:`,G);return}const{key:we,contents:_e}=G,Ue=se[we];if(!Ue){console.warn(`Unknown Form config key: ${we}`);return}we==="enableWrap"?A[Ue]=!!_e:A[Ue]=Array.isArray(_e)?_e:[]}),A},Q=te=>{const A={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},se={header:"columns",tableContents:"tableData"};return te.forEach((G,fe)=>{if(!G||typeof G!="object"){console.warn(`Invalid config at index ${fe}:`,G);return}const{key:we,contents:_e}=G,Ue=se[we];if(!Ue){console.warn(`Unknown Table config key: ${we}`);return}A[Ue]=Array.isArray(_e)?_e:[]}),A},ve=te=>(console.log("Default conversion logic - to be implemented"),{originalData:te,processed:!1,componentType:"unknown"}),Ae=()=>{const te=[{key:"stepList",contents:i.value}];n("change",te)};return e.watch(()=>r.itemContents,te=>{if(te&&te.length>0){const A=te.find(se=>se.key==="stepList");A&&A.contents&&(i.value=A.contents.map(se=>({title:se.title||"",value:se.value||se.title||"",label:se.label||se.title||"",children:se.children||[],id:se.id||S()})))}},{immediate:!0,deep:!0}),(te,A)=>{const se=e.resolveComponent("svg-icon"),G=e.resolveComponent("el-input"),fe=e.resolveComponent("el-form-item"),we=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",$2,[A[6]||(A[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:F},[e.createVNode(se,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),A[5]||(A[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",V2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(_e,Ue)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Ue},[e.createElementVNode("span",F2,e.toDisplayString(_e.title),1),e.createElementVNode("div",P2,[e.createElementVNode("button",{onClick:ra=>C(Ue)},"修改标题",8,j2),e.createElementVNode("button",{onClick:ra=>x(Ue)},"布局调整",8,H2),e.createElementVNode("button",{onClick:ra=>L(Ue)},"删除",8,U2)])]))),128))]),e.createVNode(Vr.ssDialog,{modelValue:o.value,"onUpdate:modelValue":A[2]||(A[2]=_e=>o.value=_e),title:d.value,onBeforeDestroy:A[3]||(A[3]=_e=>o.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:A[1]||(A[1]=_e=>o.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:O},"确定")]),default:e.withCtx(()=>[e.createVNode(we,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(fe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(G,{modelValue:c.value.title,"onUpdate:modelValue":A[0]||(A[0]=_e=>c.value.title=_e),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Vr.ssDialog,{modelValue:y.value,"onUpdate:modelValue":A[4]||(A[4]=_e=>y.value=_e),title:"布局调整",fullScreen:"",onBeforeDestroy:U},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:ue},"取消"),e.createElementVNode("button",{onClick:me},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",q2,[e.createElementVNode("div",W2,[e.createVNode(x2),e.createElementVNode("div",G2,[A[8]||(A[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",K2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,_e=>(e.openBlock(),e.createElementBlock("div",{key:_e.id,class:"component-item",onClick:Ue=>I(_e)},[e.createElementVNode("div",J2,[e.createElementVNode("span",X2,e.toDisplayString(_(_e.comp)),1),e.createElementVNode("span",Z2,e.toDisplayString(_e.name),1)]),A[7]||(A[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Y2))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:te.innerWidth},[e.createVNode(R2)])),e.createElementVNode("div",Q2,[e.createVNode(M2)])])]),_:1},8,["modelValue"])])}}},av=fr._export_sfc(ev,[["__scopeId","data-v-9096ed0d"]]);function lv(){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 rv(a){return{type:"line",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],...a}}function nv(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{top:"3%",left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:[]},yAxis:[{type:"value"}],series:[]}}function iv(a){return{type:"bar",barWidth:"60%",showBackground:!0,backgroundStyle:{color:"rgba(180, 180, 180, 0.1)"},itemStyle:{color:new Fl.LinearGradient(0,0,0,1,[{offset:0,color:"#94C2FD"},{offset:.7,color:"#6491E1"},{offset:1,color:"#3264C8"}])},emphasis:{itemStyle:{color:new Fl.LinearGradient(0,0,0,1,[{offset:0,color:"#3264C8"},{offset:.7,color:"#6491E1"},{offset:1,color:"#94C2FD"}])}},...a}}function ov(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function tv(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 sv=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),cv=a=>({type:"scatter",symbolSize:20,...a}),In={Line:{initBaseoptions:lv,initSeries:rv},Bar:{initBaseoptions:nv,initSeries:iv},Pie:{initBaseoptions:ov,initSeries:tv},Scatter:{initBaseoptions:sv,initSeries:cv}},uv=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:i}=a||{},o=In==null?void 0:In[n];if(!o)return;const{initBaseoptions:d,initSeries:c}=o,u=d();u.title.text=i??"";const y=l==null?void 0:l.map(p=>p==null?void 0:p.prop);let b=[];if(y==null||y.forEach(p=>{var D;b.push((D=r==null?void 0:r[0])==null?void 0:D[p])}),!y||!b)return u;u.xAxis.data=y;const g=c({data:b});return u.series.push(g),u},dv=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:i}=a||{},o=In==null?void 0:In[n];if(!o)return;const{initBaseoptions:d,initSeries:c}=o,u=d();u.title.text=i??"";const y=l==null?void 0:l.map(p=>p==null?void 0:p.prop);let b=[];if(y==null||y.forEach(p=>{var D;b.push((D=r==null?void 0:r[0])==null?void 0:D[p])}),!y||!b)return u;u.xAxis.data=y;const g=c({data:b});return u.series.push(g),u},pv=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:i}=a||{},o=In==null?void 0:In[n];if(!o)return;const{initBaseoptions:d,initSeries:c}=o,u=d();u.title.text=i??"";const y=l==null?void 0:l.map(D=>D==null?void 0:D.prop);let b=[];if(y==null||y.forEach(D=>{var m;b.push((m=r==null?void 0:r[0])==null?void 0:m[D])}),!y||!b)return u;const g=[];for(let D=0;D<y.length;D++){const m=y[D],F=b[D];g.push({name:m,value:F})}const p=c({data:g});return u.series.push(p),u},fv=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:i}=a||{},o=In==null?void 0:In[n];if(!o)return;const{initBaseoptions:d,initSeries:c}=o,u=d();u.title.text=i??"";let y=[];const b=l==null?void 0:l.map(D=>D==null?void 0:D.prop);if(y=b==null?void 0:b.map(D=>{var F;let m=[];return m.push(D),m.push((F=r==null?void 0:r[0])==null?void 0:F[D]),m}),!y)return u;const p=c({data:y});return u.series.push(p),u},hv=async(a=[])=>{var c,u,y,b,g;const l=((c=a==null?void 0:a.find(p=>p.key==="ChartType"))==null?void 0:c.contents)??{};let r=((u=a==null?void 0:a.find(p=>p.key==="header"))==null?void 0:u.contents)??[],n=((y=a==null?void 0:a.find(p=>p.key==="tableContents"))==null?void 0:y.contents)??[],i=((b=a==null?void 0:a.find(p=>p.key==="calculator"))==null?void 0:b.contents)??[];if((i==null?void 0:i.length)>0){i=i==null?void 0:i.map(D=>({methods:D==null?void 0:D.calculatorFilter,functionName:D==null?void 0:D.functionName,functionRelatedWords:D==null?void 0:D.functionRelatedWords}));let p=await No([],i,[],"Auto",[],[]);r=(g=p==null?void 0:p.xAxis)==null?void 0:g.map(D=>({label:D,prop:D})),n=p==null?void 0:p.yAxis}else if(r!=null&&r.some(p=>p==null?void 0:p.functionName)){let p=r==null?void 0:r.filter(F=>F==null?void 0:F.functionName);p=p==null?void 0:p.map(async F=>{let C={methods:F==null?void 0:F.calculatorFilter,functionName:F==null?void 0:F.functionName,functionRelatedWords:F==null?void 0:F.functionRelatedWords};return C=await No(F,[C],[],"Auto",[],[]),{name:F==null?void 0:F.prop,value:C==null?void 0:C.value}});let D=await Promise.all(p),m={};D==null||D.forEach(F=>{var C;m[F==null?void 0:F.name]=((C=F==null?void 0:F.value)==null?void 0:C.toString())??""}),n=[m]}let{type:o}=l,d={};return o==="Line"&&(d=await uv({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),o==="Bar"&&(d=await dv({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),o==="Pie"&&(d=await pv({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),o==="Scatter"&&(d=await fv({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),d},vv=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,r=e.ref({});e.onMounted(async()=>{const i=l==null?void 0:l.itemData;r.value=await hv(i)});const n=e.computed(()=>(l==null?void 0:l.height)||"300px");return(i,o)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:n.value})},[e.createVNode(ld.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),mv=fr._export_sfc(vv,[["__scopeId","data-v-d4c081e8"]]),yv={class:"chart-module layout"},gv={class:"chart-module content"},bv={class:"chart-module content"},kv={class:"form-content"},xv={class:"dialog-footer"},wv={class:"form-content"},_v={class:"dialog-footer"},Sv={class:"form-content"},Ev={class:"dialog-footer"},Cv=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.reactive({visible:!1,width:"840",title:"基础配置"}),o=e.ref([]),d=()=>[{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({}),u=Ie=>{var de;o.value=d(),(de=o.value)==null||de.forEach(De=>{var Sa;const Je=De==null?void 0:De.prop;De.value=(Sa=c==null?void 0:c.value)==null?void 0:Sa[Je]}),i.visible=!0},y=Ie=>{c.value=Ie},b=()=>{var Ie;i.visible=!1,n("change",(Ie=Me())==null?void 0:Ie.compData)},g=e.reactive({visible:!1,width:"840",title:"数据配置"}),p=e.ref([]),D=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],m=e.ref({}),F=()=>{const Ie=p.value,de=z.cloneDeep(Ie);return de==null||de.forEach(De=>{var Sa;const Je=De==null?void 0:De.prop;De.value=(Sa=m.value)==null?void 0:Sa[Je]}),de},C=Ie=>{var De;m.value=Ie;const de=F();p.value=de,n("change",(De=Me())==null?void 0:De.compData)},L=async Ie=>{const de=await re.getMenusContent(),De=F();De==null||De.forEach(Je=>{(Je==null?void 0:Je.prop)==="menu"&&(Je.contents=de)}),p.value=De,g.visible=!0,await _e(m.value.menu),await H(m.value.group)},O=e.reactive({visible:!1,width:"840",title:"详情页配置"}),S=e.ref([]),E=()=>[{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:[]}],x=e.ref({}),k=()=>{const Ie=S.value,de=z.cloneDeep(Ie);return de==null||de.forEach(De=>{var Sa;const Je=De==null?void 0:De.prop;De.value=(Sa=x.value)==null?void 0:Sa[Je]}),de},_=Ie=>{var De;x.value=Ie;const de=k();S.value=de,n("change",(De=Me())==null?void 0:De.compData)},I=async Ie=>{await U();const de=z.cloneDeep(R.value),De=k();De==null||De.forEach(Je=>{var We;const Sa=Je==null?void 0:Je.prop;Je.value=(We=x==null?void 0:x.value)==null?void 0:We[Sa],Sa==="mainKey"&&(Je.contents=de)}),S.value=De,O.visible=!0},R=e.ref([]),ae=e.ref([]),X=e.ref({}),me=e.ref({}),ue=()=>{const{compData:Ie}=G.value||{},de=Ie==null?void 0:Ie.find(le=>{const{key:ce}=le;return ce==="header"}),De=(de==null?void 0:de.contents)||[],Je=De==null?void 0:De.filter((le,ce)=>{const{label:he}=le;return he!=="操作"}),Sa=Je==null?void 0:Je.findIndex((le,ce)=>{const{isMainKey:he}=le;return he});if(Sa<0)return[];const We=Ie==null?void 0:Ie.find(le=>{const{key:ce}=le;return ce==="tableContents"}),V=(We==null?void 0:We.contents)||[];return V==null?void 0:V.map(le=>{const ce=le==null?void 0:le[0];let he=Sa;Xa.isObject(ce)&&(ce!=null&&ce.id)&&(he=he+1);const ua=le==null?void 0:le[he];return{label:ua,value:ua}})},U=async()=>{const Ie=await ue();R.value=Ie},W=async Ie=>{const de=sessionStorage.getItem("systemKey");return await re.getItemData(Ie,de,"")},Z=async Ie=>{const de=Ie;ae.value=de==null?void 0:de.map(De=>{const{name:Je}=De;return X.value[Je]=De,{label:Je,value:Je}})},Q=Ie=>{const{comp:de,compData:De}=me.value||{};if(de==="Table"){let Je=k();Je=Je.filter(Sa=>{const{prop:We}=Sa;return We!=="formItems"}),Ue(Je,De),S.value=Je}},ve=async()=>{var De,Je;const Ie=(De=x==null?void 0:x.value)==null?void 0:De.mainKey,de=(Je=m==null?void 0:m.value)==null?void 0:Je.menu;if(Ie){const We=`${de==null?void 0:de.join("/")}^${Ie}`,V=await W(We);await Z(V);const P=k();P==null||P.forEach(le=>{(le==null?void 0:le.prop)==="group"&&(le.contents=ae.value)}),S.value=P}};e.watch(()=>{var Ie;return(Ie=x==null?void 0:x.value)==null?void 0:Ie.mainKey},async(Ie,de)=>{Ie!=de&&Ie&&await ve()});const Ae=async Ie=>{const de=X.value[Ie];me.value=de,await Q()};e.watch(()=>{var Ie;return(Ie=x==null?void 0:x.value)==null?void 0:Ie.group},async(Ie,de)=>{Ie!=de&&Ie&&Ae(Ie)});const te=async()=>{var de;await ve();const Ie=(de=x.value)==null?void 0:de.group;await Ae(Ie)},A=e.ref([]),se=e.ref({}),G=e.ref({}),fe=async Ie=>{const de=Ie==null?void 0:Ie.join("/"),De=sessionStorage.getItem("systemKey");return await re.getItemData(de,De,"")},we=async Ie=>{const de=await fe(Ie);A.value=de==null?void 0:de.map(De=>{const{name:Je}=De;return se.value[Je]=De,{label:Je,value:Je}})},_e=async(Ie,de)=>{await we(Ie);const De=F();De==null||De.forEach(Je=>{(Je==null?void 0:Je.prop)==="group"&&(Je.contents=A.value)}),p.value=De};e.watch(()=>{var Ie;return(Ie=m==null?void 0:m.value)==null?void 0:Ie.menu},async(Ie,de)=>{const De=Ie==null?void 0:Ie.join("/"),Je=de==null?void 0:de.join("/");De!=Je&&await _e(Ie)});const Ue=(Ie,de)=>{const De=de==null?void 0:de.find(V=>{const{key:P}=V;return P==="header"}),Je=(De==null?void 0:De.contents)||[],Sa=Je==null?void 0:Je.filter((V,P)=>{const{label:le}=V;return le!=="操作"}),We=Sa==null?void 0:Sa.map((V,P)=>{const{label:le}=V;return{label:le,value:P}});Ie==null||Ie.forEach(V=>{const P=V==null?void 0:V.prop;(P==="nameCol"||P==="valueCol")&&(V.contents=We)})},ra=Ie=>{const{comp:de,compData:De}=G.value||{};if(de==="Table"){m.value.formItems=[];let Je=F();Je=Je.filter(Sa=>{const{prop:We}=Sa;return We!=="formItems"}),Ue(Je,De),p.value=Je}},H=async Ie=>{const de=se.value[Ie];G.value=de,await ra()};e.watch(()=>{var Ie;return(Ie=m==null?void 0:m.value)==null?void 0:Ie.group},async(Ie,de)=>{Ie!=de&&H(Ie)});const Ge=async()=>{var De,Je;const Ie=(De=m.value)==null?void 0:De.menu;await _e(Ie);const de=(Je=m.value)==null?void 0:Je.group;await H(de)},Me=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:m.value},{key:"chartDetailConfig",contents:x.value}]}),Le=()=>{i.visible=!1,g.visible=!1,O.visible=!1};return e.onMounted(async()=>{var de,De,Je;p.value=D(),S.value=E();const Ie=r==null?void 0:r.itemContents;c.value=((de=Ie==null?void 0:Ie.find(Sa=>Sa.key==="chartBaseConfig"))==null?void 0:de.contents)??{},m.value=((De=Ie==null?void 0:Ie.find(Sa=>Sa.key==="chartDataConfig"))==null?void 0:De.contents)??{},await Ge(),x.value=((Je=Ie==null?void 0:Ie.find(Sa=>Sa.key==="chartDetailConfig"))==null?void 0:Je.contents)??{},await te()}),(Ie,de)=>{const De=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",yv,[de[4]||(de[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(De,{id:"themeButton",onClick:de[0]||(de[0]=Je=>u())},{default:e.withCtx(()=>de[3]||(de[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",gv,[de[6]||(de[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(De,{id:"themeButton",onClick:de[1]||(de[1]=Je=>L())},{default:e.withCtx(()=>de[5]||(de[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",bv,[de[8]||(de[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(De,{id:"themeButton",onClick:de[2]||(de[2]=Je=>I())},{default:e.withCtx(()=>de[7]||(de[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Vr.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:Le,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",kv,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",xv,[e.createVNode(De,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>de[9]||(de[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(De,{class:"ok-button button",onClick:b,id:"themeButton"},{default:e.withCtx(()=>de[10]||(de[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Vr.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:Le,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",wv,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!0,onChange:C},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",_v,[e.createVNode(De,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>de[11]||(de[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(De,{class:"ok-button button",onClick:Le,id:"themeButton"},{default:e.withCtx(()=>de[12]||(de[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Vr.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:Le,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Sv,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ev,[e.createVNode(De,{class:"cancel-button button",onClick:Le,id:"themeBorderButton"},{default:e.withCtx(()=>de[13]||(de[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(De,{class:"ok-button button",onClick:Le,id:"themeButton"},{default:e.withCtx(()=>de[14]||(de[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Dv=fr._export_sfc(Cv,[["__scopeId","data-v-88c50cdb"]]),Tv={class:"layout"},Bv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const r=l,n=a;e.onMounted(async()=>{});const i=e.computed(()=>z.cloneDeep(n==null?void 0:n.itemData)||[]),o=e.computed(()=>{var b;const y=(b=i==null?void 0:i.value)==null?void 0:b.find(g=>{const{key:p}=g;return p==="baseConfig"});return y==null?void 0:y.contents}),d=e.computed(()=>{var b;const y=(b=i==null?void 0:i.value)==null?void 0:b.find(g=>{const{key:p}=g;return p==="children"});return y==null?void 0:y.contents}),c=e.computed(()=>{let y=z.cloneDeep(d.value)||[];const b=y.length;let g=0;const p=[];if(y=y.map(D=>{const m=D.span;return m?(D.span=Number(m),g=g+D.span):p.push(D),D}),g<24){const D=Math.floor((24-g)/b);p.forEach(m=>{m.span=D})}return y}),u=y=>{r("rowClick",y)};return(y,b)=>{var D;const g=e.resolveComponent("el-col"),p=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Tv,[e.createVNode(p,{style:e.normalizeStyle({height:(D=o.value)==null?void 0:D.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(m,F)=>(e.openBlock(),e.createBlock(g,{span:m==null?void 0:m.span},{default:e.withCtx(()=>{var C;return[e.unref(Ri)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)(m.comp)),{key:e.unref(oi),compName:m.name,index:(m==null?void 0:m.id)??F,height:(C=o.value)==null?void 0:C.height,itemData:m==null?void 0:m.compData,childItemData:m==null?void 0:m.itemChildData,onChange:e.unref(Mo),onContentChange:e.unref(Io),onPageChange:e.unref(Oo),onRowClick:u},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Nv=fr._export_sfc(Bv,[["__scopeId","data-v-ab9a36ed"]]),Av={class:"layout-operate"},zv={class:"layout-module"},Mv={class:"collapse-title-item"},Iv={class:"collapse-title"},Ov={class:"icon-content"},Lv=["onClick"],Rv={class:"comp-child"},$v=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l;e.onMounted(()=>{F()});const i=e.ref({}),o=e.ref({}),d=e.ref([]),c=x=>[{label:"高度",prop:"height",type:"input",value:x==null?void 0:x.height}],u=x=>{o.value=x,n("change",E(),!0)},y=e.ref([]),b=e.ref([]),g=x=>[{label:"占比",prop:"span",type:"input",value:x==null?void 0:x.span}],p=e.computed(()=>{const x=r==null?void 0:r.itemContents;return z.cloneDeep(x)}),D=e.computed(()=>{const x=p==null?void 0:p.value,k=x==null?void 0:x.find(_=>{const{key:I}=_;return I==="baseConfig"});return k==null?void 0:k.contents}),m=e.computed(()=>{const x=p==null?void 0:p.value,k=x==null?void 0:x.find(_=>{const{key:I}=_;return I==="children"});return k==null?void 0:k.contents}),F=()=>{var x;i.value=p.value||{},y.value=(m==null?void 0:m.value)||[],d.value=c(),d.value=(x=d.value)==null?void 0:x.map(k=>{var I;const{prop:_}=k;return k.value=(I=D.value)==null?void 0:I[_],k})};e.watch(()=>{var x;return(x=m==null?void 0:m.value)==null?void 0:x.length},()=>{var x;y.value=(m==null?void 0:m.value)||[],b.value=(x=m.value)==null?void 0:x.map(k=>g(k))},{immediate:!0});const C=(x,k)=>{const _=z.cloneDeep(m==null?void 0:m.value);_[k].span=x.span,y.value=_,n("change",E(),!0)},L=x=>$i(x),O=(x,k,_)=>{if(!x)return;const I=z.cloneDeep(m==null?void 0:m.value);I[_]&&(I[_].compData=x,y.value=I,n("change",E(),!0))},S=x=>{z.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let k=z.cloneDeep(m==null?void 0:m.value);k=k==null?void 0:k.filter((_,I)=>x!==I),y.value=k,n("change",E(),!0),Xa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},E=()=>({compData:[{key:"baseConfig",contents:o.value},{key:"children",contents:y==null?void 0:y.value}]});return(x,k)=>{const _=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Av,[e.createElementVNode("div",zv,[k[1]||(k[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(ul.ssForm,{rowContents:d.value,isEnableWrap:!0,onChange:k[0]||(k[0]=I=>u(I))},null,8,["rowContents"])])]),e.createVNode(pc.default,{class:"collapse-content",collapseContents:m.value},{title:e.withCtx(({item:I,index:R})=>[e.createElementVNode("div",Mv,[e.createElementVNode("div",Iv,e.toDisplayString(I.name),1),e.createElementVNode("div",Ov,[e.createElementVNode("div",{onClick:e.withModifiers(ae=>S(R),["stop"]),class:"icon-content"},[e.createVNode(_,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Lv)])])]),content:e.withCtx(({item:I,index:R})=>[e.createElementVNode("div",Rv,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(ul.ssForm,{rowContents:b.value[R],key:R,isEnableWrap:!0,onChange:ae=>C(ae,R)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(I.comp+"Operate")),{itemContents:I==null?void 0:I.compData,originalItemContents:I.compData,onChange:ae=>O(ae,I,R)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Vv=fr._export_sfc($v,[["__scopeId","data-v-ba05456e"]]),Fv=typeof window<"u";var $s;Fv&&(($s=window==null?void 0:window.navigator)!=null&&$s.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Bn(a){return a==null}function nu(){}const Pv=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(Pv)));function jv(){const a=new Map;return{on(l,r){const n=a.get(l);n!=null&&n.add(r)||a.set(l,new Set([r]))},off(l,r){const n=a.get(l);n&&n.delete(r)},clear(l){const r=a.get(l);r&&r.clear()},clearAll(){a.clear()},emit(l,...r){const n=a.get(l);n&&n.forEach(i=>{i(...r)})}}}function Vs(a,l=16){if(typeof a!="function")return nu;const r=(...o)=>{a(...o)};if(l<=0)return iu(r);let n=0,i;return function(...o){const d=Date.now(),c=d-n;clearTimeout(i),c>=l?(n=d,r(...o)):i=setTimeout(()=>{n=Date.now(),r(...o)},Math.max(0,l-c))}}function Hv(a,l=100){if(typeof a!="function")return nu;const r=(...i)=>{a(...i)};if(l<=0)return iu(r);let n;return function(...i){clearTimeout(n),n=setTimeout(()=>{r(...i)},l)}}function iu(a){if(typeof a!="function")return a;let l=!1,r,n;return function(...i){return r=i,l||(l=!0,n=Promise.resolve().then(()=>(l=!1,n=void 0,a(...r)))),n}}const Ji=new Set,ou=new WeakMap;function Uv(){Ji.forEach(a=>{a(...ou.get(a))}),Ji.clear()}function kn(a,...l){if(typeof a!="function")return a;ou.set(a,l),!Ji.has(a)&&(Ji.add(a),Ji.size===1&&Promise.resolve().then(Uv))}const tu=Symbol("LAYOUT_KEY"),su=Symbol("EMITTER_KEY");function qv(a){let l=0,r;for(let n=0,i=a.length;n<i;n++)r=a[n].y+a[n].h,r>l&&(l=r);return l}function It(a){const l=Array(a.length);for(let r=0,n=a.length;r<n;r++)l[r]=Wv(a[r]);return l}function Wv(a){return{...a}}function cu(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 zi(a,l,r){const n=du(a),i=pu(a),o=Array(a.length);for(let d=0,c=i.length;d<c;d++){let u=i[d];u.static||(u=Gv(n,u,l,r),n.push(u)),o[a.findIndex(y=>y.i===u.i)]=u,u.moved=!1}return o}function Gv(a,l,r,n){if(r)for(;l.y>0&&!Xi(a,l);)l.y--;else if(n){const o=n[l.i].y;for(;l.y>o&&!Xi(a,l);)l.y--}let i;for(;i=Xi(a,l);)l.y=i.y+i.h;return l}function Kv(a,l){const r=du(a);for(let n=0,i=a.length;n<i;n++){const o=a[n];if(o.x+o.w>l.cols&&(o.x=l.cols-o.w),o.x<0&&(o.x=0,o.w=l.cols),!o.static)r.push(o);else for(;Xi(r,o);)o.y++}return a}function Fs(a,l){for(let r=0,n=a.length;r<n;r++)if(a[r].i===l)return a[r]}function Xi(a,l){for(let r=0,n=a.length;r<n;r++)if(cu(a[r],l))return a[r]}function uu(a,l){return a.filter(r=>cu(r,l))}function du(a){return a.filter(l=>l.static)}function Ot(a,l,r,n,i=!1,o=!1){if(l.static)return a;const d=l.x,c=l.y,u=n&&l.y>n;typeof r=="number"&&(l.x=r),typeof n=="number"&&(l.y=n),l.moved=!0;let y=pu(a);u&&(y=y.reverse());const b=uu(y,l);if(o&&b.length)return l.x=d,l.y=c,l.moved=!1,a;for(let g=0,p=b.length;g<p;g++){const D=b[g];D.moved||l.y>D.y&&l.y-D.y>D.h/4||(D.static?a=Ps(a,D,l,i):a=Ps(a,l,D,i))}return a}function Ps(a,l,r,n){if(n){const i={x:r.x,y:r.y,w:r.w,h:r.h};if(i.y=Math.max(l.y-r.h,0),!Xi(a,i))return Ot(a,r,void 0,i.y,!1)}return Ot(a,r,void 0,r.y+1,!1)}function Yv(a,l,r,n){const i="translate3d("+l+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:r+"px",height:n+"px",position:"absolute"}}function Jv(a,l,r,n){const i="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:r+"px",height:n+"px",position:"absolute"}}function Xv(a,l,r,n){return{top:a+"px",left:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function Zv(a,l,r,n){return{top:a+"px",right:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function pu(a){return Array.from(a).sort(function(l,r){return l.y===r.y&&l.x===r.x?0:l.y>r.y||l.y===r.y&&l.x>r.x?1:-1})}function Qv(a,l){l=l||"Layout";const r=["x","y","w","h"],n=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let i=0,o=a.length;i<o;i++){const d=a[i];for(let c=0;c<r.length;c++)if(typeof d[r[c]]!="number")throw new Error("VueGridLayout: "+l+"["+i+"]."+r[c]+" must be a number!");if(d.i===void 0||d.i===null)throw new Error("VueGridLayout: "+l+"["+i+"].i cannot be null!");if(typeof d.i!="number"&&typeof d.i!="string")throw new Error("VueGridLayout: "+l+"["+i+"].i must be a string or number!");if(n.indexOf(d.i)>=0)throw new Error("VueGridLayout: "+l+"["+i+"].i must be unique!");if(n.push(d.i),d.static!==void 0&&typeof d.static!="boolean")throw new Error("VueGridLayout: "+l+"["+i+"].static must be a boolean!")}}function e1(a,l="vgl"){const r=()=>`${l}-${a}`;return{b:r,be:n=>`${r()}__${n}`,bm:n=>`${r()}--${n}`,bem:(n,i)=>`${r()}__${n}--${i}`}}function js(a){return a1(a)}function a1(a){var l;const r=((l=a.target)==null?void 0:l.offsetParent)||document.body,n=a.offsetParent===document.body?{left:0,top:0}:r.getBoundingClientRect(),i=a.clientX+r.scrollLeft-n.left,o=a.clientY+r.scrollTop-n.top;return{x:i,y:o}}function Hs(a,l,r,n){return l1(a)?{deltaX:r-a,deltaY:n-l,lastX:a,lastY:l,x:r,y:n}:{deltaX:0,deltaY:0,lastX:r,lastY:n,x:r,y:n}}function l1(a){return typeof a=="number"&&!Number.isNaN(a)}function r1(a,l){const r=hu(a);let n=r[0];for(let i=1,o=r.length;i<o;i++){const d=r[i];l>a[d]&&(n=d)}return n}function fu(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function n1(a,l,r,n,i,o,d){if(l[n])return It(l[n]);let c=a;const u=hu(r),y=u.slice(u.indexOf(n));for(let b=0,g=y.length;b<g;b++){const p=y[b];if(l[p]){c=l[p];break}}return c=It(c||[]),zi(Kv(c,{cols:o}),d)}function hu(a){return Object.keys(a).sort((l,r)=>a[l]-a[r])}let i1="auto";function o1(){return typeof document<"u"}function Us(){return o1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):i1}var Ki={exports:{}},s1=Ki.exports,qs;function c1(){return qs||(qs=1,function(a,l){(function(r,n){a.exports=n()})(s1,function(){function r(s,t){var h=Object.keys(s);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(s);t&&(w=w.filter(function(T){return Object.getOwnPropertyDescriptor(s,T).enumerable})),h.push.apply(h,w)}return h}function n(s){for(var t=1;t<arguments.length;t++){var h=arguments[t]!=null?arguments[t]:{};t%2?r(Object(h),!0).forEach(function(w){u(s,w,h[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(h)):r(Object(h)).forEach(function(w){Object.defineProperty(s,w,Object.getOwnPropertyDescriptor(h,w))})}return s}function i(s){return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(s)}function o(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}function d(s,t){for(var h=0;h<t.length;h++){var w=t[h];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(s,F(w.key),w)}}function c(s,t,h){return t&&d(s.prototype,t),Object.defineProperty(s,"prototype",{writable:!1}),s}function u(s,t,h){return(t=F(t))in s?Object.defineProperty(s,t,{value:h,enumerable:!0,configurable:!0,writable:!0}):s[t]=h,s}function y(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&g(s,t)}function b(s){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(s)}function g(s,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,w){return h.__proto__=w,h},g(s,t)}function p(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function D(s){var t=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 h,w=b(s);if(t){var T=b(this).constructor;h=Reflect.construct(w,arguments,T)}else h=w.apply(this,arguments);return function(j,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 p(j)}(this,h)}}function m(){return m=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(s,t,h){var w=function(j,Y){for(;!Object.prototype.hasOwnProperty.call(j,Y)&&(j=b(j))!==null;);return j}(s,t);if(w){var T=Object.getOwnPropertyDescriptor(w,t);return T.get?T.get.call(arguments.length<3?s:h):T.value}},m.apply(this,arguments)}function F(s){var t=function(h,w){if(typeof h!="object"||h===null)return h;var T=h[Symbol.toPrimitive];if(T!==void 0){var j=T.call(h,w);if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(h)}(s,"string");return typeof t=="symbol"?t:t+""}var C=function(s){return!(!s||!s.Window)&&s instanceof s.Window},L=void 0,O=void 0;function S(s){L=s;var t=s.document.createTextNode("");t.ownerDocument!==s.document&&typeof s.wrap=="function"&&s.wrap(t)===t&&(s=s.wrap(s)),O=s}function E(s){return C(s)?s:(s.ownerDocument||s).defaultView||O.window}typeof window<"u"&&window&&S(window);var x=function(s){return!!s&&i(s)==="object"},k=function(s){return typeof s=="function"},_={window:function(s){return s===O||C(s)},docFrag:function(s){return x(s)&&s.nodeType===11},object:x,func:k,number:function(s){return typeof s=="number"},bool:function(s){return typeof s=="boolean"},string:function(s){return typeof s=="string"},element:function(s){if(!s||i(s)!=="object")return!1;var t=E(s)||O;return/object|function/.test(typeof Element>"u"?"undefined":i(Element))?s instanceof Element||s instanceof t.Element:s.nodeType===1&&typeof s.nodeName=="string"},plainObject:function(s){return x(s)&&!!s.constructor&&/function Object\b/.test(s.constructor.toString())},array:function(s){return x(s)&&s.length!==void 0&&k(s.splice)}};function I(s){var t=s.interaction;if(t.prepared.name==="drag"){var h=t.prepared.axis;h==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):h==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function R(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="drag"){var w=h.prepared.axis;if(w==="x"||w==="y"){var T=w==="x"?"y":"x";t.page[T]=h.coords.start.page[T],t.client[T]=h.coords.start.client[T],t.delta[T]=0}}}var ae={id:"actions/drag",install:function(s){var t=s.actions,h=s.Interactable,w=s.defaults;h.prototype.draggable=ae.draggable,t.map.drag=ae,t.methodDict.drag="draggable",w.actions.drag=ae.defaults},listeners:{"interactions:before-action-move":I,"interactions:action-resume":I,"interactions:action-move":R,"auto-start:check":function(s){var t=s.interaction,h=s.interactable,w=s.buttons,T=h.options.drag;if(T&&T.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(w&h.options.drag.mouseButtons)!=0))return s.action={name:"drag",axis:T.lockAxis==="start"?T.startAxis:T.lockAxis},!1}},draggable:function(s){return _.object(s)?(this.options.drag.enabled=s.enabled!==!1,this.setPerAction("drag",s),this.setOnEvents("drag",s),/^(xy|x|y|start)$/.test(s.lockAxis)&&(this.options.drag.lockAxis=s.lockAxis),/^(xy|x|y)$/.test(s.startAxis)&&(this.options.drag.startAxis=s.startAxis),this):_.bool(s)?(this.options.drag.enabled=s,this):this.options.drag},beforeMove:I,move:R,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(s){return s.search("drag")===0}},X=ae,me={init:function(s){var t=s;me.document=t.document,me.DocumentFragment=t.DocumentFragment||ue,me.SVGElement=t.SVGElement||ue,me.SVGSVGElement=t.SVGSVGElement||ue,me.SVGElementInstance=t.SVGElementInstance||ue,me.Element=t.Element||ue,me.HTMLElement=t.HTMLElement||me.Element,me.Event=t.Event,me.Touch=t.Touch||ue,me.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ue(){}var U=me,W={init:function(s){var t=U.Element,h=s.navigator||{};W.supportsTouch="ontouchstart"in s||_.func(s.DocumentTouch)&&U.document instanceof s.DocumentTouch,W.supportsPointerEvent=h.pointerEnabled!==!1&&!!U.PointerEvent,W.isIOS=/iP(hone|od|ad)/.test(h.platform),W.isIOS7=/iP(hone|od|ad)/.test(h.platform)&&/OS 7[^\d]/.test(h.appVersion),W.isIe9=/MSIE 9/.test(h.userAgent),W.isOperaMobile=h.appName==="Opera"&&W.supportsTouch&&/Presto/.test(h.userAgent),W.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",W.pEventTypes=W.supportsPointerEvent?U.PointerEvent===s.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,W.wheelEvent=U.document&&"onmousewheel"in U.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Z=W;function Q(s,t){if(s.contains)return s.contains(t);for(;t;){if(t===s)return!0;t=t.parentNode}return!1}function ve(s,t){for(;_.element(s);){if(te(s,t))return s;s=Ae(s)}return null}function Ae(s){var t=s.parentNode;if(_.docFrag(t)){for(;(t=t.host)&&_.docFrag(t););return t}return t}function te(s,t){return O!==L&&(t=t.replace(/\/deep\//g," ")),s[Z.prefixedMatchesSelector](t)}var A=function(s){return s.parentNode||s.host};function se(s,t){for(var h,w=[],T=s;(h=A(T))&&T!==t&&h!==T.ownerDocument;)w.unshift(T),T=h;return w}function G(s,t,h){for(;_.element(s);){if(te(s,t))return!0;if((s=Ae(s))===h)return te(s,t)}return!1}function fe(s){return s.correspondingUseElement||s}function we(s){var t=s instanceof U.SVGElement?s.getBoundingClientRect():s.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function _e(s){var t,h=we(s);if(!Z.isIOS7&&h){var w={x:(t=(t=E(s))||O).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};h.left+=w.x,h.right+=w.x,h.top+=w.y,h.bottom+=w.y}return h}function Ue(s){for(var t=[];s;)t.push(s),s=Ae(s);return t}function ra(s){return!!_.string(s)&&(U.document.querySelector(s),!0)}function H(s,t){for(var h in t)s[h]=t[h];return s}function Ge(s,t,h){return s==="parent"?Ae(h):s==="self"?t.getRect(h):ve(h,s)}function Me(s,t,h,w){var T=s;return _.string(T)?T=Ge(T,t,h):_.func(T)&&(T=T.apply(void 0,w)),_.element(T)&&(T=_e(T)),T}function Le(s){return s&&{x:"x"in s?s.x:s.left,y:"y"in s?s.y:s.top}}function Ie(s){return!s||"x"in s&&"y"in s||((s=H({},s)).x=s.left||0,s.y=s.top||0,s.width=s.width||(s.right||0)-s.x,s.height=s.height||(s.bottom||0)-s.y),s}function de(s,t,h){s.left&&(t.left+=h.x),s.right&&(t.right+=h.x),s.top&&(t.top+=h.y),s.bottom&&(t.bottom+=h.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function De(s,t,h){var w=h&&s.options[h];return Le(Me(w&&w.origin||s.options.origin,s,t,[s&&t]))||{x:0,y:0}}function Je(s,t){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(xe){return!0},w=arguments.length>3?arguments[3]:void 0;if(w=w||{},_.string(s)&&s.search(" ")!==-1&&(s=Sa(s)),_.array(s))return s.forEach(function(xe){return Je(xe,t,h,w)}),w;if(_.object(s)&&(t=s,s=""),_.func(t)&&h(s))w[s]=w[s]||[],w[s].push(t);else if(_.array(t))for(var T=0,j=t;T<j.length;T++){var Y=j[T];Je(s,Y,h,w)}else if(_.object(t))for(var J in t)Je(Sa(J).map(function(xe){return"".concat(s).concat(xe)}),t[J],h,w);return w}function Sa(s){return s.trim().split(/ +/)}var We=function(s,t){return Math.sqrt(s*s+t*t)},V=["webkit","moz"];function P(s,t){s.__set||(s.__set={});var h=function(T){if(V.some(function(j){return T.indexOf(j)===0}))return 1;typeof s[T]!="function"&&T!=="__set"&&Object.defineProperty(s,T,{get:function(){return T in s.__set?s.__set[T]:s.__set[T]=t[T]},set:function(j){s.__set[T]=j},configurable:!0})};for(var w in t)h(w);return s}function le(s,t){s.page=s.page||{},s.page.x=t.page.x,s.page.y=t.page.y,s.client=s.client||{},s.client.x=t.client.x,s.client.y=t.client.y,s.timeStamp=t.timeStamp}function ce(s){s.page.x=0,s.page.y=0,s.client.x=0,s.client.y=0}function he(s){return s instanceof U.Event||s instanceof U.Touch}function ua(s,t,h){return s=s||"page",(h=h||{}).x=t[s+"X"],h.y=t[s+"Y"],h}function ia(s,t){return t=t||{x:0,y:0},Z.isOperaMobile&&he(s)?(ua("screen",s,t),t.x+=window.scrollX,t.y+=window.scrollY):ua("page",s,t),t}function Ve(s){return _.number(s.pointerId)?s.pointerId:s.identifier}function va(s,t,h){var w=t.length>1?Ce(t):t[0];ia(w,s.page),function(T,j){j=j||{},Z.isOperaMobile&&he(T)?ua("screen",T,j):ua("client",T,j)}(w,s.client),s.timeStamp=h}function Ea(s){var t=[];return _.array(s)?(t[0]=s[0],t[1]=s[1]):s.type==="touchend"?s.touches.length===1?(t[0]=s.touches[0],t[1]=s.changedTouches[0]):s.touches.length===0&&(t[0]=s.changedTouches[0],t[1]=s.changedTouches[1]):(t[0]=s.touches[0],t[1]=s.touches[1]),t}function Ce(s){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},h=0;h<s.length;h++){var w=s[h];for(var T in t)t[T]+=w[T]}for(var j in t)t[j]/=s.length;return t}function Fa(s){if(!s.length)return null;var t=Ea(s),h=Math.min(t[0].pageX,t[1].pageX),w=Math.min(t[0].pageY,t[1].pageY),T=Math.max(t[0].pageX,t[1].pageX),j=Math.max(t[0].pageY,t[1].pageY);return{x:h,y:w,left:h,top:w,right:T,bottom:j,width:T-h,height:j-w}}function Da(s,t){var h=t+"X",w=t+"Y",T=Ea(s),j=T[0][h]-T[1][h],Y=T[0][w]-T[1][w];return We(j,Y)}function da(s,t){var h=t+"X",w=t+"Y",T=Ea(s),j=T[1][h]-T[0][h],Y=T[1][w]-T[0][w];return 180*Math.atan2(Y,j)/Math.PI}function ja(s){return _.string(s.pointerType)?s.pointerType:_.number(s.pointerType)?[void 0,void 0,"touch","pen","mouse"][s.pointerType]:/touch/.test(s.type||"")||s instanceof U.Touch?"touch":"mouse"}function sa(s){var t=_.func(s.composedPath)?s.composedPath():s.path;return[fe(t?t[0]:s.target),fe(s.currentTarget)]}var Fe=function(){function s(t){o(this,s),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return c(s,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),s}();Object.defineProperty(Fe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var ha=function(s,t){for(var h=0;h<t.length;h++){var w=t[h];s.push(w)}return s},Qe=function(s){return ha([],s)},Oe=function(s,t){for(var h=0;h<s.length;h++)if(t(s[h],h,s))return h;return-1},$e=function(s,t){return s[Oe(s,t)]},ne=function(s){y(h,s);var t=D(h);function h(w,T,j){var Y;o(this,h),(Y=t.call(this,T._interaction)).dropzone=void 0,Y.dragEvent=void 0,Y.relatedTarget=void 0,Y.draggable=void 0,Y.propagationStopped=!1,Y.immediatePropagationStopped=!1;var J=j==="dragleave"?w.prev:w.cur,xe=J.element,je=J.dropzone;return Y.type=j,Y.target=xe,Y.currentTarget=xe,Y.dropzone=je,Y.dragEvent=T,Y.relatedTarget=T.target,Y.draggable=T.interactable,Y.timeStamp=T.timeStamp,Y}return c(h,[{key:"reject",value:function(){var w=this,T=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&T.cur.dropzone===this.dropzone&&T.cur.element===this.target)if(T.prev.dropzone=this.dropzone,T.prev.element=this.target,T.rejected=!0,T.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var j=T.activeDrops,Y=Oe(j,function(xe){var je=xe.dropzone,Se=xe.element;return je===w.dropzone&&Se===w.target});T.activeDrops.splice(Y,1);var J=new h(T,this.dragEvent,"dropdeactivate");J.dropzone=this.dropzone,J.target=this.target,this.dropzone.fire(J)}else this.dropzone.fire(new h(T,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),h}(Fe);function qe(s,t){for(var h=0,w=s.slice();h<w.length;h++){var T=w[h],j=T.dropzone,Y=T.element;t.dropzone=j,t.target=Y,j.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function na(s,t){for(var h=function(j,Y){for(var J=[],xe=0,je=j.interactables.list;xe<je.length;xe++){var Se=je[xe];if(Se.options.drop.enabled){var ca=Se.options.drop.accept;if(!(_.element(ca)&&ca!==Y||_.string(ca)&&!te(Y,ca)||_.func(ca)&&!ca({dropzone:Se,draggableElement:Y})))for(var Ia=0,nl=Se.getAllElements();Ia<nl.length;Ia++){var al=nl[Ia];al!==Y&&J.push({dropzone:Se,element:al,rect:Se.getRect(al)})}}}return J}(s,t),w=0;w<h.length;w++){var T=h[w];T.rect=T.dropzone.getRect(T.element)}return h}function fa(s,t,h){for(var w=s.dropState,T=s.interactable,j=s.element,Y=[],J=0,xe=w.activeDrops;J<xe.length;J++){var je=xe[J],Se=je.dropzone,ca=je.element,Ia=je.rect,nl=Se.dropCheck(t,h,T,j,ca,Ia);Y.push(nl?ca:null)}var al=function(dl){for(var Dl,El,Vl,tr=[],hr=0;hr<dl.length;hr++){var Kl=dl[hr],cr=dl[Dl];if(Kl&&hr!==Dl)if(cr){var pn=A(Kl),nr=A(cr);if(pn!==Kl.ownerDocument)if(nr!==Kl.ownerDocument)if(pn!==nr){tr=tr.length?tr:se(cr);var bn=void 0;if(cr instanceof U.HTMLElement&&Kl instanceof U.SVGElement&&!(Kl instanceof U.SVGSVGElement)){if(Kl===nr)continue;bn=Kl.ownerSVGElement}else bn=Kl;for(var Qr=se(bn,cr.ownerDocument),Rn=0;Qr[Rn]&&Qr[Rn]===tr[Rn];)Rn++;var yn=[Qr[Rn-1],Qr[Rn],tr[Rn]];if(yn[0])for(var pi=yn[0].lastChild;pi;){if(pi===yn[1]){Dl=hr,tr=Qr;break}if(pi===yn[2])break;pi=pi.previousSibling}}else Vl=cr,(parseInt(E(El=Kl).getComputedStyle(El).zIndex,10)||0)>=(parseInt(E(Vl).getComputedStyle(Vl).zIndex,10)||0)&&(Dl=hr);else Dl=hr}else Dl=hr}return Dl}(Y);return w.activeDrops[al]||null}function ze(s,t,h){var w=s.dropState,T={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return h.type==="dragstart"&&(T.activate=new ne(w,h,"dropactivate"),T.activate.target=null,T.activate.dropzone=null),h.type==="dragend"&&(T.deactivate=new ne(w,h,"dropdeactivate"),T.deactivate.target=null,T.deactivate.dropzone=null),w.rejected||(w.cur.element!==w.prev.element&&(w.prev.dropzone&&(T.leave=new ne(w,h,"dragleave"),h.dragLeave=T.leave.target=w.prev.element,h.prevDropzone=T.leave.dropzone=w.prev.dropzone),w.cur.dropzone&&(T.enter=new ne(w,h,"dragenter"),h.dragEnter=w.cur.element,h.dropzone=w.cur.dropzone)),h.type==="dragend"&&w.cur.dropzone&&(T.drop=new ne(w,h,"drop"),h.dropzone=w.cur.dropzone,h.relatedTarget=w.cur.element),h.type==="dragmove"&&w.cur.dropzone&&(T.move=new ne(w,h,"dropmove"),h.dropzone=w.cur.dropzone)),T}function Be(s,t){var h=s.dropState,w=h.activeDrops,T=h.cur,j=h.prev;t.leave&&j.dropzone.fire(t.leave),t.enter&&T.dropzone.fire(t.enter),t.move&&T.dropzone.fire(t.move),t.drop&&T.dropzone.fire(t.drop),t.deactivate&&qe(w,t.deactivate),h.prev.dropzone=T.dropzone,h.prev.element=T.element}function Ke(s,t){var h=s.interaction,w=s.iEvent,T=s.event;if(w.type==="dragmove"||w.type==="dragend"){var j=h.dropState;t.dynamicDrop&&(j.activeDrops=na(t,h.element));var Y=w,J=fa(h,Y,T);j.rejected=j.rejected&&!!J&&J.dropzone===j.cur.dropzone&&J.element===j.cur.element,j.cur.dropzone=J&&J.dropzone,j.cur.element=J&&J.element,j.events=ze(h,0,Y)}}var Ee={id:"actions/drop",install:function(s){var t=s.actions,h=s.interactStatic,w=s.Interactable,T=s.defaults;s.usePlugin(X),w.prototype.dropzone=function(j){return function(Y,J){if(_.object(J)){if(Y.options.drop.enabled=J.enabled!==!1,J.listeners){var xe=Je(J.listeners),je=Object.keys(xe).reduce(function(ca,Ia){return ca[/^(enter|leave)/.test(Ia)?"drag".concat(Ia):/^(activate|deactivate|move)/.test(Ia)?"drop".concat(Ia):Ia]=xe[Ia],ca},{}),Se=Y.options.drop.listeners;Se&&Y.off(Se),Y.on(je),Y.options.drop.listeners=je}return _.func(J.ondrop)&&Y.on("drop",J.ondrop),_.func(J.ondropactivate)&&Y.on("dropactivate",J.ondropactivate),_.func(J.ondropdeactivate)&&Y.on("dropdeactivate",J.ondropdeactivate),_.func(J.ondragenter)&&Y.on("dragenter",J.ondragenter),_.func(J.ondragleave)&&Y.on("dragleave",J.ondragleave),_.func(J.ondropmove)&&Y.on("dropmove",J.ondropmove),/^(pointer|center)$/.test(J.overlap)?Y.options.drop.overlap=J.overlap:_.number(J.overlap)&&(Y.options.drop.overlap=Math.max(Math.min(1,J.overlap),0)),"accept"in J&&(Y.options.drop.accept=J.accept),"checker"in J&&(Y.options.drop.checker=J.checker),Y}return _.bool(J)?(Y.options.drop.enabled=J,Y):Y.options.drop}(this,j)},w.prototype.dropCheck=function(j,Y,J,xe,je,Se){return function(ca,Ia,nl,al,dl,Dl,El){var Vl=!1;if(!(El=El||ca.getRect(Dl)))return!!ca.options.drop.checker&&ca.options.drop.checker(Ia,nl,Vl,ca,Dl,al,dl);var tr=ca.options.drop.overlap;if(tr==="pointer"){var hr=De(al,dl,"drag"),Kl=ia(Ia);Kl.x+=hr.x,Kl.y+=hr.y;var cr=Kl.x>El.left&&Kl.x<El.right,pn=Kl.y>El.top&&Kl.y<El.bottom;Vl=cr&&pn}var nr=al.getRect(dl);if(nr&&tr==="center"){var bn=nr.left+nr.width/2,Qr=nr.top+nr.height/2;Vl=bn>=El.left&&bn<=El.right&&Qr>=El.top&&Qr<=El.bottom}return nr&&_.number(tr)&&(Vl=Math.max(0,Math.min(El.right,nr.right)-Math.max(El.left,nr.left))*Math.max(0,Math.min(El.bottom,nr.bottom)-Math.max(El.top,nr.top))/(nr.width*nr.height)>=tr),ca.options.drop.checker&&(Vl=ca.options.drop.checker(Ia,nl,Vl,ca,Dl,al,dl)),Vl}(this,j,Y,J,xe,je,Se)},h.dynamicDrop=function(j){return _.bool(j)?(s.dynamicDrop=j,h):s.dynamicDrop},H(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",s.dynamicDrop=!1,T.actions.drop=Ee.defaults},listeners:{"interactions:before-action-start":function(s){var t=s.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(s,t){var h=s.interaction,w=(s.event,s.iEvent);if(h.prepared.name==="drag"){var T=h.dropState;T.activeDrops=[],T.events={},T.activeDrops=na(t,h.element),T.events=ze(h,0,w),T.events.activate&&(qe(T.activeDrops,T.events.activate),t.fire("actions/drop:start",{interaction:h,dragEvent:w}))}},"interactions:action-move":Ke,"interactions:after-action-move":function(s,t){var h=s.interaction,w=s.iEvent;if(h.prepared.name==="drag"){var T=h.dropState;Be(h,T.events),t.fire("actions/drop:move",{interaction:h,dragEvent:w}),T.events={}}},"interactions:action-end":function(s,t){if(s.interaction.prepared.name==="drag"){var h=s.interaction,w=s.iEvent;Ke(s,t),Be(h,h.dropState.events),t.fire("actions/drop:end",{interaction:h,dragEvent:w})}},"interactions:stop":function(s){var t=s.interaction;if(t.prepared.name==="drag"){var h=t.dropState;h&&(h.activeDrops=null,h.events=null,h.cur.dropzone=null,h.cur.element=null,h.prev.dropzone=null,h.prev.element=null,h.rejected=!1)}}},getActiveDrops:na,getDrop:fa,getDropEvents:ze,fireDropEvents:Be,filterEventType:function(s){return s.search("drag")===0||s.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ye=Ee;function $a(s){var t=s.interaction,h=s.iEvent,w=s.phase;if(t.prepared.name==="gesture"){var T=t.pointers.map(function(je){return je.pointer}),j=w==="start",Y=w==="end",J=t.interactable.options.deltaSource;if(h.touches=[T[0],T[1]],j)h.distance=Da(T,J),h.box=Fa(T),h.scale=1,h.ds=0,h.angle=da(T,J),h.da=0,t.gesture.startDistance=h.distance,t.gesture.startAngle=h.angle;else if(Y||t.pointers.length<2){var xe=t.prevEvent;h.distance=xe.distance,h.box=xe.box,h.scale=xe.scale,h.ds=0,h.angle=xe.angle,h.da=0}else h.distance=Da(T,J),h.box=Fa(T),h.scale=h.distance/t.gesture.startDistance,h.angle=da(T,J),h.ds=h.scale-t.gesture.scale,h.da=h.angle-t.gesture.angle;t.gesture.distance=h.distance,t.gesture.angle=h.angle,_.number(h.scale)&&h.scale!==1/0&&!isNaN(h.scale)&&(t.gesture.scale=h.scale)}}var wl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(s){var t=s.actions,h=s.Interactable,w=s.defaults;h.prototype.gesturable=function(T){return _.object(T)?(this.options.gesture.enabled=T.enabled!==!1,this.setPerAction("gesture",T),this.setOnEvents("gesture",T),this):_.bool(T)?(this.options.gesture.enabled=T,this):this.options.gesture},t.map.gesture=wl,t.methodDict.gesture="gesturable",w.actions.gesture=wl.defaults},listeners:{"interactions:action-start":$a,"interactions:action-move":$a,"interactions:action-end":$a,"interactions:new":function(s){s.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(s){if(!(s.interaction.pointers.length<2)){var t=s.interactable.options.gesture;if(t&&t.enabled)return s.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(s){return s.search("gesture")===0}},el=wl;function Pl(s,t,h,w,T,j,Y){if(!t)return!1;if(t===!0){var J=_.number(j.width)?j.width:j.right-j.left,xe=_.number(j.height)?j.height:j.bottom-j.top;if(Y=Math.min(Y,Math.abs((s==="left"||s==="right"?J:xe)/2)),J<0&&(s==="left"?s="right":s==="right"&&(s="left")),xe<0&&(s==="top"?s="bottom":s==="bottom"&&(s="top")),s==="left"){var je=J>=0?j.left:j.right;return h.x<je+Y}if(s==="top"){var Se=xe>=0?j.top:j.bottom;return h.y<Se+Y}if(s==="right")return h.x>(J>=0?j.right:j.left)-Y;if(s==="bottom")return h.y>(xe>=0?j.bottom:j.top)-Y}return!!_.element(w)&&(_.element(t)?t===w:G(w,t,T))}function bl(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="resize"&&h.resizeAxes){var w=t;h.interactable.options.resize.square?(h.resizeAxes==="y"?w.delta.x=w.delta.y:w.delta.y=w.delta.x,w.axes="xy"):(w.axes=h.resizeAxes,h.resizeAxes==="x"?w.delta.y=0:h.resizeAxes==="y"&&(w.delta.x=0))}}var jl,ll,Hl={id:"actions/resize",before:["actions/drag"],install:function(s){var t=s.actions,h=s.browser,w=s.Interactable,T=s.defaults;Hl.cursors=function(j){return j.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"}}(h),Hl.defaultMargin=h.supportsTouch||h.supportsPointerEvent?20:10,w.prototype.resizable=function(j){return function(Y,J,xe){return _.object(J)?(Y.options.resize.enabled=J.enabled!==!1,Y.setPerAction("resize",J),Y.setOnEvents("resize",J),_.string(J.axis)&&/^x$|^y$|^xy$/.test(J.axis)?Y.options.resize.axis=J.axis:J.axis===null&&(Y.options.resize.axis=xe.defaults.actions.resize.axis),_.bool(J.preserveAspectRatio)?Y.options.resize.preserveAspectRatio=J.preserveAspectRatio:_.bool(J.square)&&(Y.options.resize.square=J.square),Y):_.bool(J)?(Y.options.resize.enabled=J,Y):Y.options.resize}(this,j,s)},t.map.resize=Hl,t.methodDict.resize="resizable",T.actions.resize=Hl.defaults},listeners:{"interactions:new":function(s){s.interaction.resizeAxes="xy"},"interactions:action-start":function(s){(function(t){var h=t.iEvent,w=t.interaction;if(w.prepared.name==="resize"&&w.prepared.edges){var T=h,j=w.rect;w._rects={start:H({},j),corrected:H({},j),previous:H({},j),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},T.edges=w.prepared.edges,T.rect=w._rects.corrected,T.deltaRect=w._rects.delta}})(s),bl(s)},"interactions:action-move":function(s){(function(t){var h=t.iEvent,w=t.interaction;if(w.prepared.name==="resize"&&w.prepared.edges){var T=h,j=w.interactable.options.resize.invert,Y=j==="reposition"||j==="negate",J=w.rect,xe=w._rects,je=xe.start,Se=xe.corrected,ca=xe.delta,Ia=xe.previous;if(H(Ia,Se),Y){if(H(Se,J),j==="reposition"){if(Se.top>Se.bottom){var nl=Se.top;Se.top=Se.bottom,Se.bottom=nl}if(Se.left>Se.right){var al=Se.left;Se.left=Se.right,Se.right=al}}}else Se.top=Math.min(J.top,je.bottom),Se.bottom=Math.max(J.bottom,je.top),Se.left=Math.min(J.left,je.right),Se.right=Math.max(J.right,je.left);for(var dl in Se.width=Se.right-Se.left,Se.height=Se.bottom-Se.top,Se)ca[dl]=Se[dl]-Ia[dl];T.edges=w.prepared.edges,T.rect=Se,T.deltaRect=ca}})(s),bl(s)},"interactions:action-end":function(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="resize"&&h.prepared.edges){var w=t;w.edges=h.prepared.edges,w.rect=h._rects.corrected,w.deltaRect=h._rects.delta}},"auto-start:check":function(s){var t=s.interaction,h=s.interactable,w=s.element,T=s.rect,j=s.buttons;if(T){var Y=H({},t.coords.cur.page),J=h.options.resize;if(J&&J.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(j&J.mouseButtons)!=0)){if(_.object(J.edges)){var xe={left:!1,right:!1,top:!1,bottom:!1};for(var je in xe)xe[je]=Pl(je,J.edges[je],Y,t._latestPointer.eventTarget,w,T,J.margin||Hl.defaultMargin);xe.left=xe.left&&!xe.right,xe.top=xe.top&&!xe.bottom,(xe.left||xe.right||xe.top||xe.bottom)&&(s.action={name:"resize",edges:xe})}else{var Se=J.axis!=="y"&&Y.x>T.right-Hl.defaultMargin,ca=J.axis!=="x"&&Y.y>T.bottom-Hl.defaultMargin;(Se||ca)&&(s.action={name:"resize",axes:(Se?"x":"")+(ca?"y":"")})}return!s.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(s){var t=s.edges,h=s.axis,w=s.name,T=Hl.cursors,j=null;if(h)j=T[w+h];else if(t){for(var Y="",J=0,xe=["top","bottom","left","right"];J<xe.length;J++){var je=xe[J];t[je]&&(Y+=je)}j=T[Y]}return j},filterEventType:function(s){return s.search("resize")===0},defaultMargin:null},Ga=Hl,Jl={id:"actions",install:function(s){s.usePlugin(el),s.usePlugin(Ga),s.usePlugin(X),s.usePlugin(ye)}},Xl=0,ar={request:function(s){return jl(s)},cancel:function(s){return ll(s)},init:function(s){if(jl=s.requestAnimationFrame,ll=s.cancelAnimationFrame,!jl)for(var t=["ms","moz","webkit","o"],h=0;h<t.length;h++){var w=t[h];jl=s["".concat(w,"RequestAnimationFrame")],ll=s["".concat(w,"CancelAnimationFrame")]||s["".concat(w,"CancelRequestAnimationFrame")]}jl=jl&&jl.bind(s),ll=ll&&ll.bind(s),jl||(jl=function(T){var j=Date.now(),Y=Math.max(0,16-(j-Xl)),J=s.setTimeout(function(){T(j+Y)},Y);return Xl=j+Y,J},ll=function(T){return clearTimeout(T)})}},Sl={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(s){Sl.isScrolling=!0,ar.cancel(Sl.i),s.autoScroll=Sl,Sl.interaction=s,Sl.prevTime=Sl.now(),Sl.i=ar.request(Sl.scroll)},stop:function(){Sl.isScrolling=!1,Sl.interaction&&(Sl.interaction.autoScroll=null),ar.cancel(Sl.i)},scroll:function(){var s=Sl.interaction,t=s.interactable,h=s.element,w=s.prepared.name,T=t.options[w].autoScroll,j=pr(T.container,t,h),Y=Sl.now(),J=(Y-Sl.prevTime)/1e3,xe=T.speed*J;if(xe>=1){var je={x:Sl.x*xe,y:Sl.y*xe};if(je.x||je.y){var Se=ya(j);_.window(j)?j.scrollBy(je.x,je.y):j&&(j.scrollLeft+=je.x,j.scrollTop+=je.y);var ca=ya(j),Ia={x:ca.x-Se.x,y:ca.y-Se.y};(Ia.x||Ia.y)&&t.fire({type:"autoscroll",target:h,interactable:t,delta:Ia,interaction:s,container:j})}Sl.prevTime=Y}Sl.isScrolling&&(ar.cancel(Sl.i),Sl.i=ar.request(Sl.scroll))},check:function(s,t){var h;return(h=s.options[t].autoScroll)==null?void 0:h.enabled},onInteractionMove:function(s){var t=s.interaction,h=s.pointer;if(t.interacting()&&Sl.check(t.interactable,t.prepared.name))if(t.simulation)Sl.x=Sl.y=0;else{var w,T,j,Y,J=t.interactable,xe=t.element,je=t.prepared.name,Se=J.options[je].autoScroll,ca=pr(Se.container,J,xe);if(_.window(ca))Y=h.clientX<Sl.margin,w=h.clientY<Sl.margin,T=h.clientX>ca.innerWidth-Sl.margin,j=h.clientY>ca.innerHeight-Sl.margin;else{var Ia=we(ca);Y=h.clientX<Ia.left+Sl.margin,w=h.clientY<Ia.top+Sl.margin,T=h.clientX>Ia.right-Sl.margin,j=h.clientY>Ia.bottom-Sl.margin}Sl.x=T?1:Y?-1:0,Sl.y=j?1:w?-1:0,Sl.isScrolling||(Sl.margin=Se.margin,Sl.speed=Se.speed,Sl.start(t))}}};function pr(s,t,h){return(_.string(s)?Ge(s,t,h):s)||E(h)}function ya(s){return _.window(s)&&(s=window.document.body),{x:s.scrollLeft,y:s.scrollTop}}var ol={id:"auto-scroll",install:function(s){var t=s.defaults,h=s.actions;s.autoScroll=Sl,Sl.now=function(){return s.now()},h.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Sl.defaults},listeners:{"interactions:new":function(s){s.interaction.autoScroll=null},"interactions:destroy":function(s){s.interaction.autoScroll=null,Sl.stop(),Sl.interaction&&(Sl.interaction=null)},"interactions:stop":Sl.stop,"interactions:action-move":function(s){return Sl.onInteractionMove(s)}}},vl=ol;function Bl(s,t){var h=!1;return function(){return h||(O.console.warn(t),h=!0),s.apply(this,arguments)}}function Ua(s,t){return s.name=t.name,s.axis=t.axis,s.edges=t.edges,s}function _a(s){return _.bool(s)?(this.options.styleCursor=s,this):s===null?(delete this.options.styleCursor,this):this.options.styleCursor}function rl(s){return _.func(s)?(this.options.actionChecker=s,this):s===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Te={id:"auto-start/interactableMethods",install:function(s){var t=s.Interactable;t.prototype.getAction=function(h,w,T,j){var Y=function(J,xe,je,Se,ca){var Ia=J.getRect(Se),nl=xe.buttons||{0:1,1:4,3:8,4:16}[xe.button],al={action:null,interactable:J,interaction:je,element:Se,rect:Ia,buttons:nl};return ca.fire("auto-start:check",al),al.action}(this,w,T,j,s);return this.options.actionChecker?this.options.actionChecker(h,w,Y,this,j,T):Y},t.prototype.ignoreFrom=Bl(function(h){return this._backCompatOption("ignoreFrom",h)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Bl(function(h){return this._backCompatOption("allowFrom",h)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=rl,t.prototype.styleCursor=_a}};function oa(s,t,h,w,T){return t.testIgnoreAllow(t.options[s.name],h,w)&&t.options[s.name].enabled&&Pa(t,h,s,T)?s:null}function Ya(s,t,h,w,T,j,Y){for(var J=0,xe=w.length;J<xe;J++){var je=w[J],Se=T[J],ca=je.getAction(t,h,s,Se);if(ca){var Ia=oa(ca,je,Se,j,Y);if(Ia)return{action:Ia,interactable:je,element:Se}}}return{action:null,interactable:null,element:null}}function pe(s,t,h,w,T){var j=[],Y=[],J=w;function xe(Se){j.push(Se),Y.push(J)}for(;_.element(J);){j=[],Y=[],T.interactables.forEachMatch(J,xe);var je=Ya(s,t,h,j,Y,w,T);if(je.action&&!je.interactable.options[je.action.name].manualStart)return je;J=Ae(J)}return{action:null,interactable:null,element:null}}function wa(s,t,h){var w=t.action,T=t.interactable,j=t.element;w=w||{name:null},s.interactable=T,s.element=j,Ua(s.prepared,w),s.rect=T&&w.name?T.getRect(j):null,Qa(s,h),h.fire("autoStart:prepared",{interaction:s})}function Pa(s,t,h,w){var T=s.options,j=T[h.name].max,Y=T[h.name].maxPerElement,J=w.autoStart.maxInteractions,xe=0,je=0,Se=0;if(!(j&&Y&&J))return!1;for(var ca=0,Ia=w.interactions.list;ca<Ia.length;ca++){var nl=Ia[ca],al=nl.prepared.name;if(nl.interacting()&&(++xe>=J||nl.interactable===s&&((je+=al===h.name?1:0)>=j||nl.element===t&&(Se++,al===h.name&&Se>=Y))))return!1}return J>0}function pl(s,t){return _.number(s)?(t.autoStart.maxInteractions=s,this):t.autoStart.maxInteractions}function Il(s,t,h){var w=h.autoStart.cursorElement;w&&w!==s&&(w.style.cursor=""),s.ownerDocument.documentElement.style.cursor=t,s.style.cursor=t,h.autoStart.cursorElement=t?s:null}function Qa(s,t){var h=s.interactable,w=s.element,T=s.prepared;if(s.pointerType==="mouse"&&h&&h.options.styleCursor){var j="";if(T.name){var Y=h.options[T.name].cursorChecker;j=_.func(Y)?Y(T,h,w,s._interacting):t.actions.map[T.name].getCursor(T)}Il(s.element,j||"",t)}else t.autoStart.cursorElement&&Il(t.autoStart.cursorElement,"",t)}var kl={id:"auto-start/base",before:["actions"],install:function(s){var t=s.interactStatic,h=s.defaults;s.usePlugin(Te),h.base.actionChecker=null,h.base.styleCursor=!0,H(h.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(w){return pl(w,s)},s.autoStart={maxInteractions:1/0,withinInteractionLimit:Pa,cursorElement:null}},listeners:{"interactions:down":function(s,t){var h=s.interaction,w=s.pointer,T=s.event,j=s.eventTarget;h.interacting()||wa(h,pe(h,w,T,j,t),t)},"interactions:move":function(s,t){(function(h,w){var T=h.interaction,j=h.pointer,Y=h.event,J=h.eventTarget;T.pointerType!=="mouse"||T.pointerIsDown||T.interacting()||wa(T,pe(T,j,Y,J,w),w)})(s,t),function(h,w){var T=h.interaction;if(T.pointerIsDown&&!T.interacting()&&T.pointerWasMoved&&T.prepared.name){w.fire("autoStart:before-start",h);var j=T.interactable,Y=T.prepared.name;Y&&j&&(j.options[Y].manualStart||!Pa(j,T.element,T.prepared,w)?T.stop():(T.start(T.prepared,j,T.element),Qa(T,w)))}}(s,t)},"interactions:stop":function(s,t){var h=s.interaction,w=h.interactable;w&&w.options.styleCursor&&Il(h.element,"",t)}},maxInteractions:pl,withinInteractionLimit:Pa,validateAction:oa},Ma=kl,ea={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(s,t){var h=s.interaction,w=s.eventTarget,T=s.dx,j=s.dy;if(h.prepared.name==="drag"){var Y=Math.abs(T),J=Math.abs(j),xe=h.interactable.options.drag,je=xe.startAxis,Se=Y>J?"x":Y<J?"y":"xy";if(h.prepared.axis=xe.lockAxis==="start"?Se[0]:xe.lockAxis,Se!=="xy"&&je!=="xy"&&je!==Se){h.prepared.name=null;for(var ca=w,Ia=function(al){if(al!==h.interactable){var dl=h.interactable.options.drag;if(!dl.manualStart&&al.testIgnoreAllow(dl,ca,w)){var Dl=al.getAction(h.downPointer,h.downEvent,h,ca);if(Dl&&Dl.name==="drag"&&function(El,Vl){if(!Vl)return!1;var tr=Vl.options.drag.startAxis;return El==="xy"||tr==="xy"||tr===El}(Se,al)&&Ma.validateAction(Dl,al,ca,w,t))return al}}};_.element(ca);){var nl=t.interactables.forEachMatch(ca,Ia);if(nl){h.prepared.name="drag",h.interactable=nl,h.element=ca;break}ca=Ae(ca)}}}}}};function ma(s){var t=s.prepared&&s.prepared.name;if(!t)return null;var h=s.interactable.options;return h[t].hold||h[t].delay}var Ha={id:"auto-start/hold",install:function(s){var t=s.defaults;s.usePlugin(Ma),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(s){s.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(s){var t=s.interaction,h=ma(t);h>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},h))},"interactions:move":function(s){var t=s.interaction,h=s.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!h&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(s){var t=s.interaction;ma(t)>0&&(t.prepared.name=null)}},getHoldDuration:ma},ka=Ha,Ul={id:"auto-start",install:function(s){s.usePlugin(Ma),s.usePlugin(ka),s.usePlugin(ea)}},Gl=function(s){return/^(always|never|auto)$/.test(s)?(this.options.preventDefault=s,this):_.bool(s)?(this.options.preventDefault=s?"always":"never",this):this.options.preventDefault};function Ba(s){var t=s.interaction,h=s.event;t.interactable&&t.interactable.checkAndPreventDefault(h)}var Rl={id:"core/interactablePreventDefault",install:function(s){var t=s.Interactable;t.prototype.preventDefault=Gl,t.prototype.checkAndPreventDefault=function(h){return function(w,T,j){var Y=w.options.preventDefault;if(Y!=="never")if(Y!=="always"){if(T.events.supportsPassive&&/^touch(start|move)$/.test(j.type)){var J=E(j.target).document,xe=T.getDocOptions(J);if(!xe||!xe.events||xe.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(j.type)||_.element(j.target)&&te(j.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||j.preventDefault()}else j.preventDefault()}(this,s,h)},s.interactions.docEvents.push({type:"dragstart",listener:function(h){for(var w=0,T=s.interactions.list;w<T.length;w++){var j=T[w];if(j.element&&(j.element===h.target||Q(j.element,h.target)))return void j.interactable.checkAndPreventDefault(h)}}})},listeners:["down","move","up","cancel"].reduce(function(s,t){return s["interactions:".concat(t)]=Ba,s},{})};function Fr(s,t){if(t.phaselessTypes[s])return!0;for(var h in t.map)if(s.indexOf(h)===0&&s.substr(h.length)in t.phases)return!0;return!1}function Br(s){var t={};for(var h in s){var w=s[h];_.plainObject(w)?t[h]=Br(w):_.array(w)?t[h]=Qe(w):t[h]=w}return t}var Ze=function(){function s(t){o(this,s),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=t,this.result=La(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(s,[{key:"start",value:function(t,h){var w,T,j=t.phase,Y=this.interaction,J=function(je){var Se=je.interactable.options[je.prepared.name],ca=Se.modifiers;return ca&&ca.length?ca:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ia){var nl=Se[Ia];return nl&&nl.enabled&&{options:nl,methods:nl._methods}}).filter(function(Ia){return!!Ia})}(Y);this.prepareStates(J),this.startEdges=H({},Y.edges),this.edges=H({},this.startEdges),this.startOffset=(w=Y.rect,T=h,w?{left:T.x-w.left,top:T.y-w.top,right:w.right-T.x,bottom:w.bottom-T.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var xe=this.fillArg({phase:j,pageCoords:h,preEnd:!1});return this.result=La(),this.startAll(xe),this.result=this.setAll(xe)}},{key:"fillArg",value:function(t){var h=this.interaction;return t.interaction=h,t.interactable=h.interactable,t.element=h.element,t.rect||(t.rect=h.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var h=0,w=this.states;h<w.length;h++){var T=w[h];T.methods.start&&(t.state=T,T.methods.start(t))}}},{key:"setAll",value:function(t){var h=t.phase,w=t.preEnd,T=t.skipModifiers,j=t.rect,Y=t.edges;t.coords=H({},t.pageCoords),t.rect=H({},j),t.edges=H({},Y);for(var J=T?this.states.slice(T):this.states,xe=La(t.coords,t.rect),je=0;je<J.length;je++){var Se,ca=J[je],Ia=ca.options,nl=H({},t.coords),al=null;(Se=ca.methods)!=null&&Se.set&&this.shouldDo(Ia,w,h)&&(t.state=ca,al=ca.methods.set(t),de(t.edges,t.rect,{x:t.coords.x-nl.x,y:t.coords.y-nl.y})),xe.eventProps.push(al)}H(this.edges,t.edges),xe.delta.x=t.coords.x-t.pageCoords.x,xe.delta.y=t.coords.y-t.pageCoords.y,xe.rectDelta.left=t.rect.left-j.left,xe.rectDelta.right=t.rect.right-j.right,xe.rectDelta.top=t.rect.top-j.top,xe.rectDelta.bottom=t.rect.bottom-j.bottom;var dl=this.result.coords,Dl=this.result.rect;if(dl&&Dl){var El=xe.rect.left!==Dl.left||xe.rect.right!==Dl.right||xe.rect.top!==Dl.top||xe.rect.bottom!==Dl.bottom;xe.changed=El||dl.x!==xe.coords.x||dl.y!==xe.coords.y}return xe}},{key:"applyToInteraction",value:function(t){var h=this.interaction,w=t.phase,T=h.coords.cur,j=h.coords.start,Y=this.result,J=this.startDelta,xe=Y.delta;w==="start"&&H(this.startDelta,Y.delta);for(var je=0,Se=[[j,J],[T,xe]];je<Se.length;je++){var ca=Se[je],Ia=ca[0],nl=ca[1];Ia.page.x+=nl.x,Ia.page.y+=nl.y,Ia.client.x+=nl.x,Ia.client.y+=nl.y}var al=this.result.rectDelta,dl=t.rect||h.rect;dl.left+=al.left,dl.right+=al.right,dl.top+=al.top,dl.bottom+=al.bottom,dl.width=dl.right-dl.left,dl.height=dl.bottom-dl.top}},{key:"setAndApply",value:function(t){var h=this.interaction,w=t.phase,T=t.preEnd,j=t.skipModifiers,Y=this.setAll(this.fillArg({preEnd:T,phase:w,pageCoords:t.modifiedCoords||h.coords.cur.page}));if(this.result=Y,!Y.changed&&(!j||j<this.states.length)&&h.interacting())return!1;if(t.modifiedCoords){var J=h.coords.cur.page,xe={x:t.modifiedCoords.x-J.x,y:t.modifiedCoords.y-J.y};Y.coords.x+=xe.x,Y.coords.y+=xe.y,Y.delta.x+=xe.x,Y.delta.y+=xe.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var h=t.interaction,w=t.event,T=this.states;if(T&&T.length){for(var j=!1,Y=0;Y<T.length;Y++){var J=T[Y];t.state=J;var xe=J.options,je=J.methods,Se=je.beforeEnd&&je.beforeEnd(t);if(Se)return this.endResult=Se,!1;j=j||!j&&this.shouldDo(xe,!0,t.phase,!0)}j&&h.move({event:w,preEnd:!0})}}},{key:"stop",value:function(t){var h=t.interaction;if(this.states&&this.states.length){var w=H({states:this.states,interactable:h.interactable,element:h.element,rect:null},t);this.fillArg(w);for(var T=0,j=this.states;T<j.length;T++){var Y=j[T];w.state=Y,Y.methods.stop&&Y.methods.stop(w)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var h=0;h<t.length;h++){var w=t[h],T=w.options,j=w.methods,Y=w.name;this.states.push({options:T,methods:j,index:h,name:Y})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var h=t.interaction,w=h.coords,T=h.rect,j=h.modification;if(j.result){for(var Y=j.startDelta,J=j.result,xe=J.delta,je=J.rectDelta,Se=0,ca=[[w.start,Y],[w.cur,xe]];Se<ca.length;Se++){var Ia=ca[Se],nl=Ia[0],al=Ia[1];nl.page.x-=al.x,nl.page.y-=al.y,nl.client.x-=al.x,nl.client.y-=al.y}T.left-=je.left,T.right-=je.right,T.top-=je.top,T.bottom-=je.bottom}}},{key:"shouldDo",value:function(t,h,w,T){return!(!t||t.enabled===!1||T&&!t.endOnly||t.endOnly&&!h||w==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(h){return Br(h)}),this.result=La(H({},t.result.coords),H({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),s}();function La(s,t){return{rect:t,coords:s,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function hl(s,t){var h=s.defaults,w={start:s.start,set:s.set,beforeEnd:s.beforeEnd,stop:s.stop},T=function(j){var Y=j||{};for(var J in Y.enabled=Y.enabled!==!1,h)J in Y||(Y[J]=h[J]);var xe={options:Y,methods:w,name:t,enable:function(){return Y.enabled=!0,xe},disable:function(){return Y.enabled=!1,xe}};return xe};return t&&typeof t=="string"&&(T._defaults=h,T._methods=w),T}function Ll(s){var t=s.iEvent,h=s.interaction.modification.result;h&&(t.modifiers=h.eventProps)}var Ta={id:"modifiers/base",before:["actions"],install:function(s){s.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(s){var t=s.interaction;t.modification=new Ze(t)},"interactions:before-action-start":function(s){var t=s.interaction,h=s.interaction.modification;h.start(s,t.coords.start.page),t.edges=h.edges,h.applyToInteraction(s)},"interactions:before-action-move":function(s){var t=s.interaction,h=t.modification,w=h.setAndApply(s);return t.edges=h.edges,w},"interactions:before-action-end":function(s){var t=s.interaction,h=t.modification,w=h.beforeEnd(s);return t.edges=h.startEdges,w},"interactions:action-start":Ll,"interactions:action-move":Ll,"interactions:action-end":Ll,"interactions:after-action-start":function(s){return s.interaction.modification.restoreInteractionCoords(s)},"interactions:after-action-move":function(s){return s.interaction.modification.restoreInteractionCoords(s)},"interactions:stop":function(s){return s.interaction.modification.stop(s)}}},Yr=Ta,ln={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},zr=function(s){y(h,s);var t=D(h);function h(w,T,j,Y,J,xe,je){var Se;o(this,h),(Se=t.call(this,w)).relatedTarget=null,Se.screenX=void 0,Se.screenY=void 0,Se.button=void 0,Se.buttons=void 0,Se.ctrlKey=void 0,Se.shiftKey=void 0,Se.altKey=void 0,Se.metaKey=void 0,Se.page=void 0,Se.client=void 0,Se.delta=void 0,Se.rect=void 0,Se.x0=void 0,Se.y0=void 0,Se.t0=void 0,Se.dt=void 0,Se.duration=void 0,Se.clientX0=void 0,Se.clientY0=void 0,Se.velocity=void 0,Se.speed=void 0,Se.swipe=void 0,Se.axes=void 0,Se.preEnd=void 0,J=J||w.element;var ca=w.interactable,Ia=(ca&&ca.options||ln).deltaSource,nl=De(ca,J,j),al=Y==="start",dl=Y==="end",Dl=al?p(Se):w.prevEvent,El=al?w.coords.start:dl?{page:Dl.page,client:Dl.client,timeStamp:w.coords.cur.timeStamp}:w.coords.cur;return Se.page=H({},El.page),Se.client=H({},El.client),Se.rect=H({},w.rect),Se.timeStamp=El.timeStamp,dl||(Se.page.x-=nl.x,Se.page.y-=nl.y,Se.client.x-=nl.x,Se.client.y-=nl.y),Se.ctrlKey=T.ctrlKey,Se.altKey=T.altKey,Se.shiftKey=T.shiftKey,Se.metaKey=T.metaKey,Se.button=T.button,Se.buttons=T.buttons,Se.target=J,Se.currentTarget=J,Se.preEnd=xe,Se.type=je||j+(Y||""),Se.interactable=ca,Se.t0=al?w.pointers[w.pointers.length-1].downTime:Dl.t0,Se.x0=w.coords.start.page.x-nl.x,Se.y0=w.coords.start.page.y-nl.y,Se.clientX0=w.coords.start.client.x-nl.x,Se.clientY0=w.coords.start.client.y-nl.y,Se.delta=al||dl?{x:0,y:0}:{x:Se[Ia].x-Dl[Ia].x,y:Se[Ia].y-Dl[Ia].y},Se.dt=w.coords.delta.timeStamp,Se.duration=Se.timeStamp-Se.t0,Se.velocity=H({},w.coords.velocity[Ia]),Se.speed=We(Se.velocity.x,Se.velocity.y),Se.swipe=dl||Y==="inertiastart"?Se.getSwipe():null,Se}return c(h,[{key:"getSwipe",value:function(){var w=this._interaction;if(w.prevEvent.speed<600||this.timeStamp-w.prevEvent.timeStamp>150)return null;var T=180*Math.atan2(w.prevEvent.velocityY,w.prevEvent.velocityX)/Math.PI;T<0&&(T+=360);var j=112.5<=T&&T<247.5,Y=202.5<=T&&T<337.5;return{up:Y,down:!Y&&22.5<=T&&T<157.5,left:j,right:!j&&(292.5<=T||T<67.5),angle:T,speed:w.prevEvent.speed,velocity:{x:w.prevEvent.velocityX,y:w.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),h}(Fe);Object.defineProperties(zr.prototype,{pageX:{get:function(){return this.page.x},set:function(s){this.page.x=s}},pageY:{get:function(){return this.page.y},set:function(s){this.page.y=s}},clientX:{get:function(){return this.client.x},set:function(s){this.client.x=s}},clientY:{get:function(){return this.client.y},set:function(s){this.client.y=s}},dx:{get:function(){return this.delta.x},set:function(s){this.delta.x=s}},dy:{get:function(){return this.delta.y},set:function(s){this.delta.y=s}},velocityX:{get:function(){return this.velocity.x},set:function(s){this.velocity.x=s}},velocityY:{get:function(){return this.velocity.y},set:function(s){this.velocity.y=s}}});var Re=c(function s(t,h,w,T,j){o(this,s),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=h,this.event=w,this.downTime=T,this.downTarget=j}),Zl=function(s){return s.interactable="",s.element="",s.prepared="",s.pointerIsDown="",s.pointerWasMoved="",s._proxy="",s}({}),ql=function(s){return s.start="",s.move="",s.end="",s.stop="",s.interacting="",s}({}),Jr=0,Sr=function(){function s(t){var h=this,w=t.pointerType,T=t.scopeFire;o(this,s),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=Bl(function(Se){this.move(Se)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Jr++,this._scopeFire=T,this.pointerType=w;var j=this;this._proxy={};var Y=function(Se){Object.defineProperty(h._proxy,Se,{get:function(){return j[Se]}})};for(var J in Zl)Y(J);var xe=function(Se){Object.defineProperty(h._proxy,Se,{value:function(){return j[Se].apply(j,arguments)}})};for(var je in ql)xe(je);this._scopeFire("interactions:new",{interaction:this})}return c(s,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,h,w){var T=this.updatePointer(t,h,w,!0),j=this.pointers[T];this._scopeFire("interactions:down",{pointer:t,event:h,eventTarget:w,pointerIndex:T,pointerInfo:j,type:"down",interaction:this})}},{key:"start",value:function(t,h,w){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!h.options[t.name].enabled)&&(Ua(this.prepared,t),this.interactable=h,this.element=w,this.rect=h.getRect(w),this.edges=this.prepared.edges?H({},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(t,h,w){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,h,w,!1);var T,j,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&&(T=this.coords.cur.client.x-this.coords.start.client.x,j=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=We(T,j)>this.pointerMoveTolerance);var J,xe,je,Se=this.getPointerIndex(t),ca={pointer:t,pointerIndex:Se,pointerInfo:this.pointers[Se],event:h,type:"move",eventTarget:w,dx:T,dy:j,duplicate:Y,interaction:this};Y||(J=this.coords.velocity,xe=this.coords.delta,je=Math.max(xe.timeStamp/1e3,.001),J.page.x=xe.page.x/je,J.page.y=xe.page.y/je,J.client.x=xe.client.x/je,J.client.y=xe.client.y/je,J.timeStamp=je),this._scopeFire("interactions:move",ca),Y||this.simulation||(this.interacting()&&(ca.type=null,this.move(ca)),this.pointerWasMoved&&le(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||ce(this.coords.delta),(t=H({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,h,w,T){var j=this.getPointerIndex(t);j===-1&&(j=this.updatePointer(t,h,w,!1));var Y=/cancel$/i.test(h.type)?"cancel":"up";this._scopeFire("interactions:".concat(Y),{pointer:t,pointerIndex:j,pointerInfo:this.pointers[j],event:h,eventTarget:w,type:Y,curEventTarget:T,interaction:this}),this.simulation||this.end(h),this.removePointer(t,h)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var h;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(h=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,h===!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(t){var h=Ve(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Oe(this.pointers,function(w){return w.id===h})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,h,w,T){var j,Y,J,xe=Ve(t),je=this.getPointerIndex(t),Se=this.pointers[je];return T=T!==!1&&(T||/(down|start)$/i.test(h.type)),Se?Se.pointer=t:(Se=new Re(xe,t,h,null,null),je=this.pointers.length,this.pointers.push(Se)),va(this.coords.cur,this.pointers.map(function(ca){return ca.pointer}),this._now()),j=this.coords.delta,Y=this.coords.prev,J=this.coords.cur,j.page.x=J.page.x-Y.page.x,j.page.y=J.page.y-Y.page.y,j.client.x=J.client.x-Y.client.x,j.client.y=J.client.y-Y.client.y,j.timeStamp=J.timeStamp-Y.timeStamp,T&&(this.pointerIsDown=!0,Se.downTime=this.coords.cur.timeStamp,Se.downTarget=w,P(this.downPointer,t),this.interacting()||(le(this.coords.start,this.coords.cur),le(this.coords.prev,this.coords.cur),this.downEvent=h,this.pointerWasMoved=!1)),this._updateLatestPointer(t,h,w),this._scopeFire("interactions:update-pointer",{pointer:t,event:h,eventTarget:w,down:T,pointerInfo:Se,pointerIndex:je,interaction:this}),je}},{key:"removePointer",value:function(t,h){var w=this.getPointerIndex(t);if(w!==-1){var T=this.pointers[w];this._scopeFire("interactions:remove-pointer",{pointer:t,event:h,eventTarget:null,pointerIndex:w,pointerInfo:T,interaction:this}),this.pointers.splice(w,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,h,w){this._latestPointer.pointer=t,this._latestPointer.event=h,this._latestPointer.eventTarget=w}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,h,w,T){return new zr(this,t,this.prepared.name,h,this.element,w,T)}},{key:"_fireEvent",value:function(t){var h;(h=this.interactable)==null||h.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var h=t.event,w=t.phase,T=t.preEnd,j=t.type,Y=this.rect;if(Y&&w==="move"&&(de(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(w),t)===!1)return!1;var J=t.iEvent=this._createPreparedEvent(h,w,T,j);return this._scopeFire("interactions:action-".concat(w),t),w==="start"&&(this.prevEvent=J),this._fireEvent(J),this._scopeFire("interactions:after-action-".concat(w),t),!0}},{key:"_now",value:function(){return Date.now()}}]),s}();function Ql(s){Er(s.interaction)}function Er(s){if(!function(h){return!(!h.offset.pending.x&&!h.offset.pending.y)}(s))return!1;var t=s.offset.pending;return $l(s.coords.cur,t),$l(s.coords.delta,t),de(s.edges,s.rect,t),t.x=0,t.y=0,!0}function er(s){var t=s.x,h=s.y;this.offset.pending.x+=t,this.offset.pending.y+=h,this.offset.total.x+=t,this.offset.total.y+=h}function $l(s,t){var h=s.page,w=s.client,T=t.x,j=t.y;h.x+=T,h.y+=j,w.x+=T,w.y+=j}ql.offsetBy="";var or={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(s){s.Interaction.prototype.offsetBy=er},listeners:{"interactions:new":function(s){s.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(s){return function(t){t.pointerIsDown&&($l(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(s.interaction)},"interactions:before-action-start":Ql,"interactions:before-action-move":Ql,"interactions:before-action-end":function(s){var t=s.interaction;if(Er(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(s){var t=s.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},lr=or,Wl=function(){function s(t){o(this,s),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=t}return c(s,[{key:"start",value:function(t){var h=this.interaction,w=Nl(h);if(!w||!w.enabled)return!1;var T=h.coords.velocity.client,j=We(T.x,T.y),Y=this.modification||(this.modification=new Ze(h));if(Y.copyFrom(h.modification),this.t0=h._now(),this.allowResume=w.allowResume,this.v0=j,this.currentOffset={x:0,y:0},this.startCoords=h.coords.cur.page,this.modifierArg=Y.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-h.coords.cur.timeStamp<50&&j>w.minSpeed&&j>w.endSpeed)this.startInertia();else{if(Y.result=Y.setAll(this.modifierArg),!Y.result.changed)return!1;this.startSmoothEnd()}return h.modification.result.rect=null,h.offsetBy(this.targetOffset),h._doPhase({interaction:h,event:t,phase:"inertiastart"}),h.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),h.modification.result.rect=null,this.active=!0,h.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,h=this.interaction.coords.velocity.client,w=Nl(this.interaction),T=w.resistance,j=-Math.log(w.endSpeed/this.v0)/T;this.targetOffset={x:(h.x-j)/T,y:(h.y-j)/T},this.te=j,this.lambda_v0=T/this.v0,this.one_ve_v0=1-w.endSpeed/this.v0;var Y=this.modification,J=this.modifierArg;J.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},Y.result=Y.setAll(J),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 t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=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 t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var h=this;this.timeout=ar.request(function(){h.active&&t()})}},{key:"inertiaTick",value:function(){var t,h,w,T,j,Y,J,xe=this,je=this.interaction,Se=Nl(je).resistance,ca=(je._now()-this.t0)/1e3;if(ca<this.te){var Ia,nl=1-(Math.exp(-Se*ca)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,h=0,w=this.targetOffset.x,T=this.targetOffset.y,j=this.modifiedOffset.x,Y=this.modifiedOffset.y,Ia={x:rr(J=nl,t,w,j),y:rr(J,h,T,Y)}):Ia={x:this.targetOffset.x*nl,y:this.targetOffset.y*nl};var al={x:Ia.x-this.currentOffset.x,y:Ia.y-this.currentOffset.y};this.currentOffset.x+=al.x,this.currentOffset.y+=al.y,je.offsetBy(al),je.move(),this.onNextFrame(function(){return xe.inertiaTick()})}else je.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,h=this.interaction,w=h._now()-this.t0,T=Nl(h).smoothEndDuration;if(w<T){var j={x:Wr(w,0,this.targetOffset.x,T),y:Wr(w,0,this.targetOffset.y,T)},Y={x:j.x-this.currentOffset.x,y:j.y-this.currentOffset.y};this.currentOffset.x+=Y.x,this.currentOffset.y+=Y.y,h.offsetBy(Y),h.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else h.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var h=t.pointer,w=t.event,T=t.eventTarget,j=this.interaction;j.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),j.updatePointer(h,w,T,!0),j._doPhase({interaction:j,event:w,phase:"resume"}),le(j.coords.prev,j.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,ar.cancel(this.timeout)}}]),s}();function Nl(s){var t=s.interactable,h=s.prepared;return t&&t.options&&h.name&&t.options[h.name].inertia}var Pr={id:"inertia",before:["modifiers","actions"],install:function(s){var t=s.defaults;s.usePlugin(lr),s.usePlugin(Yr),s.actions.phases.inertiastart=!0,s.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(s){var t=s.interaction;t.inertia=new Wl(t)},"interactions:before-action-end":function(s){var t=s.interaction,h=s.event;return(!t._interacting||t.simulation||!t.inertia.start(h))&&null},"interactions:down":function(s){var t=s.interaction,h=s.eventTarget,w=t.inertia;if(w.active)for(var T=h;_.element(T);){if(T===t.element){w.resume(s);break}T=Ae(T)}},"interactions:stop":function(s){var t=s.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(s){var t=s.interaction.modification;t.stop(s),t.start(s,s.interaction.coords.cur.page),t.applyToInteraction(s)},"interactions:before-action-inertiastart":function(s){return s.interaction.modification.setAndApply(s)},"interactions:action-resume":Ll,"interactions:action-inertiastart":Ll,"interactions:after-action-inertiastart":function(s){return s.interaction.modification.restoreInteractionCoords(s)},"interactions:after-action-resume":function(s){return s.interaction.modification.restoreInteractionCoords(s)}}};function rr(s,t,h,w){var T=1-s;return T*T*t+2*T*s*h+s*s*w}function Wr(s,t,h,w){return-h*(s/=w)*(s-2)+t}var Nr=Pr;function Tr(s,t){for(var h=0;h<t.length;h++){var w=t[h];if(s.immediatePropagationStopped)break;w(s)}}var gn=function(){function s(t){o(this,s),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=H({},t||{})}return c(s,[{key:"fire",value:function(t){var h,w=this.global;(h=this.types[t.type])&&Tr(t,h),!t.propagationStopped&&w&&(h=w[t.type])&&Tr(t,h)}},{key:"on",value:function(t,h){var w=Je(t,h);for(t in w)this.types[t]=ha(this.types[t]||[],w[t])}},{key:"off",value:function(t,h){var w=Je(t,h);for(t in w){var T=this.types[t];if(T&&T.length)for(var j=0,Y=w[t];j<Y.length;j++){var J=Y[j],xe=T.indexOf(J);xe!==-1&&T.splice(xe,1)}}}},{key:"getRect",value:function(t){return null}}]),s}(),Sn=function(){function s(t){o(this,s),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,P(this,t)}return c(s,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),s}();function Cn(s){return _.object(s)?{capture:!!s.capture,passive:!!s.passive}:{capture:!!s,passive:!1}}function mn(s,t){return s===t||(typeof s=="boolean"?!!t.capture===s&&!t.passive:!!s.capture==!!t.capture&&!!s.passive==!!t.passive)}var On={id:"events",install:function(s){var t,h=[],w={},T=[],j={add:Y,remove:J,addDelegate:function(Se,ca,Ia,nl,al){var dl=Cn(al);if(!w[Ia]){w[Ia]=[];for(var Dl=0;Dl<T.length;Dl++){var El=T[Dl];Y(El,Ia,xe),Y(El,Ia,je,!0)}}var Vl=w[Ia],tr=$e(Vl,function(hr){return hr.selector===Se&&hr.context===ca});tr||(tr={selector:Se,context:ca,listeners:[]},Vl.push(tr)),tr.listeners.push({func:nl,options:dl})},removeDelegate:function(Se,ca,Ia,nl,al){var dl,Dl=Cn(al),El=w[Ia],Vl=!1;if(El)for(dl=El.length-1;dl>=0;dl--){var tr=El[dl];if(tr.selector===Se&&tr.context===ca){for(var hr=tr.listeners,Kl=hr.length-1;Kl>=0;Kl--){var cr=hr[Kl];if(cr.func===nl&&mn(cr.options,Dl)){hr.splice(Kl,1),hr.length||(El.splice(dl,1),J(ca,Ia,xe),J(ca,Ia,je,!0)),Vl=!0;break}}if(Vl)break}}},delegateListener:xe,delegateUseCapture:je,delegatedEvents:w,documents:T,targets:h,supportsOptions:!1,supportsPassive:!1};function Y(Se,ca,Ia,nl){if(Se.addEventListener){var al=Cn(nl),dl=$e(h,function(Dl){return Dl.eventTarget===Se});dl||(dl={eventTarget:Se,events:{}},h.push(dl)),dl.events[ca]||(dl.events[ca]=[]),$e(dl.events[ca],function(Dl){return Dl.func===Ia&&mn(Dl.options,al)})||(Se.addEventListener(ca,Ia,j.supportsOptions?al:al.capture),dl.events[ca].push({func:Ia,options:al}))}}function J(Se,ca,Ia,nl){if(Se.addEventListener&&Se.removeEventListener){var al=Oe(h,function(pn){return pn.eventTarget===Se}),dl=h[al];if(dl&&dl.events)if(ca!=="all"){var Dl=!1,El=dl.events[ca];if(El){if(Ia==="all"){for(var Vl=El.length-1;Vl>=0;Vl--){var tr=El[Vl];J(Se,ca,tr.func,tr.options)}return}for(var hr=Cn(nl),Kl=0;Kl<El.length;Kl++){var cr=El[Kl];if(cr.func===Ia&&mn(cr.options,hr)){Se.removeEventListener(ca,Ia,j.supportsOptions?hr:hr.capture),El.splice(Kl,1),El.length===0&&(delete dl.events[ca],Dl=!0);break}}}Dl&&!Object.keys(dl.events).length&&h.splice(al,1)}else for(ca in dl.events)dl.events.hasOwnProperty(ca)&&J(Se,ca,"all")}}function xe(Se,ca){for(var Ia=Cn(ca),nl=new Sn(Se),al=w[Se.type],dl=sa(Se)[0],Dl=dl;_.element(Dl);){for(var El=0;El<al.length;El++){var Vl=al[El],tr=Vl.selector,hr=Vl.context;if(te(Dl,tr)&&Q(hr,dl)&&Q(hr,Dl)){var Kl=Vl.listeners;nl.currentTarget=Dl;for(var cr=0;cr<Kl.length;cr++){var pn=Kl[cr];mn(pn.options,Ia)&&pn.func(nl)}}}Dl=Ae(Dl)}}function je(Se){return xe(Se,!0)}return(t=s.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return j.supportsOptions=!0},get passive(){return j.supportsPassive=!0}}),s.events=j,j}},nn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(s){for(var t=0,h=nn.methodOrder;t<h.length;t++){var w=h[t],T=nn[w](s);if(T)return T}return null},simulationResume:function(s){var t=s.pointerType,h=s.eventType,w=s.eventTarget,T=s.scope;if(!/down|start/i.test(h))return null;for(var j=0,Y=T.interactions.list;j<Y.length;j++){var J=Y[j],xe=w;if(J.simulation&&J.simulation.allowResume&&J.pointerType===t)for(;xe;){if(xe===J.element)return J;xe=Ae(xe)}}return null},mouseOrPen:function(s){var t,h=s.pointerId,w=s.pointerType,T=s.eventType,j=s.scope;if(w!=="mouse"&&w!=="pen")return null;for(var Y=0,J=j.interactions.list;Y<J.length;Y++){var xe=J[Y];if(xe.pointerType===w){if(xe.simulation&&!Dn(xe,h))continue;if(xe.interacting())return xe;t||(t=xe)}}if(t)return t;for(var je=0,Se=j.interactions.list;je<Se.length;je++){var ca=Se[je];if(!(ca.pointerType!==w||/down/i.test(T)&&ca.simulation))return ca}return null},hasPointer:function(s){for(var t=s.pointerId,h=0,w=s.scope.interactions.list;h<w.length;h++){var T=w[h];if(Dn(T,t))return T}return null},idle:function(s){for(var t=s.pointerType,h=0,w=s.scope.interactions.list;h<w.length;h++){var T=w[h];if(T.pointers.length===1){var j=T.interactable;if(j&&(!j.options.gesture||!j.options.gesture.enabled))continue}else if(T.pointers.length>=2)continue;if(!T.interacting()&&t===T.pointerType)return T}return null}};function Dn(s,t){return s.pointers.some(function(h){return h.id===t})}var Vn=nn,on=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Fn(s,t){return function(h){var w=t.interactions.list,T=ja(h),j=sa(h),Y=j[0],J=j[1],xe=[];if(/^touch/.test(h.type)){t.prevTouchTime=t.now();for(var je=0,Se=h.changedTouches;je<Se.length;je++){var ca=Se[je],Ia={pointer:ca,pointerId:Ve(ca),pointerType:T,eventType:h.type,eventTarget:Y,curEventTarget:J,scope:t},nl=Mr(Ia);xe.push([Ia.pointer,Ia.eventTarget,Ia.curEventTarget,nl])}}else{var al=!1;if(!Z.supportsPointerEvent&&/mouse/.test(h.type)){for(var dl=0;dl<w.length&&!al;dl++)al=w[dl].pointerType!=="mouse"&&w[dl].pointerIsDown;al=al||t.now()-t.prevTouchTime<500||h.timeStamp===0}if(!al){var Dl={pointer:h,pointerId:Ve(h),pointerType:T,eventType:h.type,curEventTarget:J,eventTarget:Y,scope:t},El=Mr(Dl);xe.push([Dl.pointer,Dl.eventTarget,Dl.curEventTarget,El])}}for(var Vl=0;Vl<xe.length;Vl++){var tr=xe[Vl],hr=tr[0],Kl=tr[1],cr=tr[2];tr[3][s](hr,h,Kl,cr)}}}function Mr(s){var t=s.pointerType,h=s.scope,w={interaction:Vn.search(s),searchDetails:s};return h.fire("interactions:find",w),w.interaction||h.interactions.new({pointerType:t})}function An(s,t){var h=s.doc,w=s.scope,T=s.options,j=w.interactions.docEvents,Y=w.events,J=Y[t];for(var xe in w.browser.isIOS&&!T.events&&(T.events={passive:!1}),Y.delegatedEvents)J(h,xe,Y.delegateListener),J(h,xe,Y.delegateUseCapture,!0);for(var je=T&&T.events,Se=0;Se<j.length;Se++){var ca=j[Se];J(h,ca.type,ca.listener,je)}}var Tn={id:"core/interactions",install:function(s){for(var t={},h=0;h<on.length;h++){var w=on[h];t[w]=Fn(w,s)}var T,j=Z.pEventTypes;function Y(){for(var J=0,xe=s.interactions.list;J<xe.length;J++){var je=xe[J];if(je.pointerIsDown&&je.pointerType==="touch"&&!je._interacting)for(var Se=function(){var nl=Ia[ca];s.documents.some(function(al){return Q(al.doc,nl.downTarget)})||je.removePointer(nl.pointer,nl.event)},ca=0,Ia=je.pointers;ca<Ia.length;ca++)Se()}}(T=U.PointerEvent?[{type:j.down,listener:Y},{type:j.down,listener:t.pointerDown},{type:j.move,listener:t.pointerMove},{type:j.up,listener:t.pointerUp},{type:j.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:Y},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(J){for(var xe=0,je=s.interactions.list;xe<je.length;xe++)je[xe].documentBlur(J)}}),s.prevTouchTime=0,s.Interaction=function(J){y(je,J);var xe=D(je);function je(){return o(this,je),xe.apply(this,arguments)}return c(je,[{key:"pointerMoveTolerance",get:function(){return s.interactions.pointerMoveTolerance},set:function(Se){s.interactions.pointerMoveTolerance=Se}},{key:"_now",value:function(){return s.now()}}]),je}(Sr),s.interactions={list:[],new:function(J){J.scopeFire=function(je,Se){return s.fire(je,Se)};var xe=new s.Interaction(J);return s.interactions.list.push(xe),xe},listeners:t,docEvents:T,pointerMoveTolerance:1},s.usePlugin(Rl)},listeners:{"scope:add-document":function(s){return An(s,"add")},"scope:remove-document":function(s){return An(s,"remove")},"interactable:unset":function(s,t){for(var h=s.interactable,w=t.interactions.list.length-1;w>=0;w--){var T=t.interactions.list[w];T.interactable===h&&(T.stop(),t.fire("interactions:destroy",{interaction:T}),T.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(w,1))}}},onDocSignal:An,doOnInteractions:Fn,methodNames:on},Po=Tn,Ln=function(s){return s[s.On=0]="On",s[s.Off=1]="Off",s}(Ln||{}),jo=function(){function s(t,h,w,T){o(this,s),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new gn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=h.actions,this.target=t,this._context=h.context||w,this._win=E(ra(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=T,this.set(h)}return c(s,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,h){return _.func(h.onstart)&&this.on("".concat(t,"start"),h.onstart),_.func(h.onmove)&&this.on("".concat(t,"move"),h.onmove),_.func(h.onend)&&this.on("".concat(t,"end"),h.onend),_.func(h.oninertiastart)&&this.on("".concat(t,"inertiastart"),h.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,h,w){var T,j=this,Y=(T=this._actions.map[t])==null?void 0:T.filterEventType,J=function(xe){return(Y==null||Y(xe))&&Fr(xe,j._actions)};(_.array(h)||_.object(h))&&this._onOff(Ln.Off,t,h,void 0,J),(_.array(w)||_.object(w))&&this._onOff(Ln.On,t,w,void 0,J)}},{key:"setPerAction",value:function(t,h){var w=this._defaults;for(var T in h){var j=T,Y=this.options[t],J=h[j];j==="listeners"&&this.updatePerActionListeners(t,Y.listeners,J),_.array(J)?Y[j]=Qe(J):_.plainObject(J)?(Y[j]=H(Y[j]||{},Br(J)),_.object(w.perAction[j])&&"enabled"in w.perAction[j]&&(Y[j].enabled=J.enabled!==!1)):_.bool(J)&&_.object(w.perAction[j])?Y[j].enabled=J:Y[j]=J}}},{key:"getRect",value:function(t){return t=t||(_.element(this.target)?this.target:null),_.string(this.target)&&(t=t||this._context.querySelector(this.target)),_e(t)}},{key:"rectChecker",value:function(t){var h=this;return _.func(t)?(this.getRect=function(w){var T=H({},t.apply(h,w));return"width"in T||(T.width=T.right-T.left,T.height=T.bottom-T.top),T},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,h){if(ra(h)||_.object(h)){for(var w in this.options[t]=h,this._actions.map)this.options[w][t]=h;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return _.string(t)?Array.from(this._context.querySelectorAll(t)):_.func(t)&&t.getAllElements?t.getAllElements():_.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||Q(this._context,t)}},{key:"testIgnoreAllow",value:function(t,h,w){return!this.testIgnore(t.ignoreFrom,h,w)&&this.testAllow(t.allowFrom,h,w)}},{key:"testAllow",value:function(t,h,w){return!t||!!_.element(w)&&(_.string(t)?G(w,t,h):!!_.element(t)&&Q(t,w))}},{key:"testIgnore",value:function(t,h,w){return!(!t||!_.element(w))&&(_.string(t)?G(w,t,h):!!_.element(t)&&Q(t,w))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,h,w,T,j){_.object(h)&&!_.array(h)&&(T=w,w=null);var Y=Je(h,w,j);for(var J in Y){J==="wheel"&&(J=Z.wheelEvent);for(var xe=0,je=Y[J];xe<je.length;xe++){var Se=je[xe];Fr(J,this._actions)?this.events[t===Ln.On?"on":"off"](J,Se):_.string(this.target)?this._scopeEvents[t===Ln.On?"addDelegate":"removeDelegate"](this.target,this._context,J,Se,T):this._scopeEvents[t===Ln.On?"add":"remove"](this.target,J,Se,T)}}return this}},{key:"on",value:function(t,h,w){return this._onOff(Ln.On,t,h,w)}},{key:"off",value:function(t,h,w){return this._onOff(Ln.Off,t,h,w)}},{key:"set",value:function(t){var h=this._defaults;for(var w in _.object(t)||(t={}),this.options=Br(h.base),this._actions.methodDict){var T=w,j=this._actions.methodDict[T];this.options[T]={},this.setPerAction(T,H(H({},h.perAction),h.actions[T])),this[j](t[T])}for(var Y in t)Y!=="getRect"?_.func(this[Y])&&this[Y](t[Y]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(_.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var h=this._scopeEvents.delegatedEvents[t],w=h.length-1;w>=0;w--){var T=h[w],j=T.selector,Y=T.context,J=T.listeners;j===this.target&&Y===this._context&&h.splice(w,1);for(var xe=J.length-1;xe>=0;xe--)this._scopeEvents.removeDelegate(this.target,this._context,t,J[xe][0],J[xe][1])}else this._scopeEvents.remove(this.target,"all")}}]),s}(),Ho=function(){function s(t){var h=this;o(this,s),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(w){var T=w.interactable,j=T.target,Y=_.string(j)?h.selectorMap[j]:j[h.scope.id],J=Oe(Y,function(xe){return xe===T});Y.splice(J,1)}})}return c(s,[{key:"new",value:function(t,h){h=H(h||{},{actions:this.scope.actions});var w=new this.scope.Interactable(t,h,this.scope.document,this.scope.events);return this.scope.addDocument(w._doc),this.list.push(w),_.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(w)):(w.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(w)),this.scope.fire("interactable:new",{target:t,options:h,interactable:w,win:this.scope._win}),w}},{key:"getExisting",value:function(t,h){var w=h&&h.context||this.scope.document,T=_.string(t),j=T?this.selectorMap[t]:t[this.scope.id];if(j)return $e(j,function(Y){return Y._context===w&&(T||Y.inContext(t))})}},{key:"forEachMatch",value:function(t,h){for(var w=0,T=this.list;w<T.length;w++){var j=T[w],Y=void 0;if((_.string(j.target)?_.element(t)&&te(t,j.target):t===j.target)&&j.inContext(t)&&(Y=h(j)),Y!==void 0)return Y}}}]),s}(),Uo=function(){function s(){var t=this;o(this,s),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=Z,this.defaults=Br(ln),this.Eventable=gn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(w){var T=function j(Y,J){var xe=w.interactables.getExisting(Y,J);return xe||((xe=w.interactables.new(Y,J)).events.global=j.globalEvents),xe};return T.getPointerAverage=Ce,T.getTouchBBox=Fa,T.getTouchDistance=Da,T.getTouchAngle=da,T.getElementRect=_e,T.getElementClientRect=we,T.matchesSelector=te,T.closest=ve,T.globalEvents={},T.version="1.10.27",T.scope=w,T.use=function(j,Y){return this.scope.usePlugin(j,Y),this},T.isSet=function(j,Y){return!!this.scope.interactables.get(j,Y&&Y.context)},T.on=Bl(function(j,Y,J){if(_.string(j)&&j.search(" ")!==-1&&(j=j.trim().split(/ +/)),_.array(j)){for(var xe=0,je=j;xe<je.length;xe++){var Se=je[xe];this.on(Se,Y,J)}return this}if(_.object(j)){for(var ca in j)this.on(ca,j[ca],Y);return this}return Fr(j,this.scope.actions)?this.globalEvents[j]?this.globalEvents[j].push(Y):this.globalEvents[j]=[Y]:this.scope.events.add(this.scope.document,j,Y,{options:J}),this},"The interact.on() method is being deprecated"),T.off=Bl(function(j,Y,J){if(_.string(j)&&j.search(" ")!==-1&&(j=j.trim().split(/ +/)),_.array(j)){for(var xe=0,je=j;xe<je.length;xe++){var Se=je[xe];this.off(Se,Y,J)}return this}if(_.object(j)){for(var ca in j)this.off(ca,j[ca],Y);return this}var Ia;return Fr(j,this.scope.actions)?j in this.globalEvents&&(Ia=this.globalEvents[j].indexOf(Y))!==-1&&this.globalEvents[j].splice(Ia,1):this.scope.events.remove(this.scope.document,j,Y,J),this},"The interact.off() method is being deprecated"),T.debug=function(){return this.scope},T.supportsTouch=function(){return Z.supportsTouch},T.supportsPointerEvent=function(){return Z.supportsPointerEvent},T.stop=function(){for(var j=0,Y=this.scope.interactions.list;j<Y.length;j++)Y[j].stop();return this},T.pointerMoveTolerance=function(j){return _.number(j)?(this.scope.interactions.pointerMoveTolerance=j,this):this.scope.interactions.pointerMoveTolerance},T.addDocument=function(j,Y){this.scope.addDocument(j,Y)},T.removeDocument=function(j){this.scope.removeDocument(j)},T}(this),this.InteractEvent=zr,this.Interactable=void 0,this.interactables=new Ho(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(w){return t.removeDocument(w.target)};var h=this;this.Interactable=function(w){y(j,w);var T=D(j);function j(){return o(this,j),T.apply(this,arguments)}return c(j,[{key:"_defaults",get:function(){return h.defaults}},{key:"set",value:function(Y){return m(b(j.prototype),"set",this).call(this,Y),h.fire("interactable:set",{options:Y,interactable:this}),this}},{key:"unset",value:function(){m(b(j.prototype),"unset",this).call(this);var Y=h.interactables.list.indexOf(this);Y<0||(h.interactables.list.splice(Y,1),h.fire("interactable:unset",{interactable:this}))}}]),j}(jo)}return c(s,[{key:"addListeners",value:function(t,h){this.listenerMaps.push({id:h,map:t})}},{key:"fire",value:function(t,h){for(var w=0,T=this.listenerMaps;w<T.length;w++){var j=T[w].map[t];if(j&&j(h,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(h,w){return h.isInitialized=!0,_.window(w)&&S(w),U.init(w),Z.init(w),ar.init(w),h.window=w,h.document=w.document,h.usePlugin(Po),h.usePlugin(On),h}(this,t)}},{key:"pluginIsInstalled",value:function(t){var h=t.id;return h?!!this._plugins.map[h]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,h){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,h),t.listeners&&t.before){for(var w=0,T=this.listenerMaps.length,j=t.before.reduce(function(J,xe){return J[xe]=!0,J[lo(xe)]=!0,J},{});w<T;w++){var Y=this.listenerMaps[w].id;if(Y&&(j[Y]||j[lo(Y)]))break}this.listenerMaps.splice(w,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,h){if(this.getDocIndex(t)!==-1)return!1;var w=E(t);h=h?H({},h):{},this.documents.push({doc:t,options:h}),this.events.documents.push(t),t!==this.document&&this.events.add(w,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:w,scope:this,options:h})}},{key:"removeDocument",value:function(t){var h=this.getDocIndex(t),w=E(t),T=this.documents[h].options;this.events.remove(w,"unload",this.onWindowUnload),this.documents.splice(h,1),this.events.documents.splice(h,1),this.fire("scope:remove-document",{doc:t,window:w,scope:this,options:T})}},{key:"getDocIndex",value:function(t){for(var h=0;h<this.documents.length;h++)if(this.documents[h].doc===t)return h;return-1}},{key:"getDocOptions",value:function(t){var h=this.getDocIndex(t);return h===-1?null:this.documents[h].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),s}();function lo(s){return s&&s.replace(/\/.*$/,"")}var ro=new Uo,dn=ro.interactStatic,qo=typeof globalThis<"u"?globalThis:window;ro.init(qo);var no=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(s){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(w){var T=w[0],j=w[1];return T in s||j in s}),h=function(w,T){for(var j=s.range,Y=s.limits,J=Y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:Y,xe=s.offset,je=xe===void 0?{x:0,y:0}:xe,Se={range:j,grid:s,x:null,y:null},ca=0;ca<t.length;ca++){var Ia=t[ca],nl=Ia[0],al=Ia[1],dl=Math.round((w-je.x)/s[nl]),Dl=Math.round((T-je.y)/s[al]);Se[nl]=Math.max(J.left,Math.min(J.right,dl*s[nl]+je.x)),Se[al]=Math.max(J.top,Math.min(J.bottom,Dl*s[al]+je.y))}return Se};return h.grid=s,h.coordFields=t,h}}),Wo={id:"snappers",install:function(s){var t=s.interactStatic;t.snappers=H(t.snappers||{},no),t.createSnapGrid=t.snappers.grid}},Go=Wo,Ko={start:function(s){var t=s.state,h=s.rect,w=s.edges,T=s.pageCoords,j=t.options,Y=j.ratio,J=j.enabled,xe=t.options,je=xe.equalDelta,Se=xe.modifiers;Y==="preserve"&&(Y=h.width/h.height),t.startCoords=H({},T),t.startRect=H({},h),t.ratio=Y,t.equalDelta=je;var ca=t.linkedEdges={top:w.top||w.left&&!w.bottom,left:w.left||w.top&&!w.right,bottom:w.bottom||w.right&&!w.top,right:w.right||w.bottom&&!w.left};if(t.xIsPrimaryAxis=!(!w.left&&!w.right),t.equalDelta){var Ia=(ca.left?1:-1)*(ca.top?1:-1);t.edgeSign={x:Ia,y:Ia}}else t.edgeSign={x:ca.left?-1:1,y:ca.top?-1:1};if(J!==!1&&H(w,ca),Se!=null&&Se.length){var nl=new Ze(s.interaction);nl.copyFrom(s.interaction.modification),nl.prepareStates(Se),t.subModification=nl,nl.startAll(n({},s))}},set:function(s){var t=s.state,h=s.rect,w=s.coords,T=t.linkedEdges,j=H({},w),Y=t.equalDelta?Yo:Vi;if(H(s.edges,T),Y(t,t.xIsPrimaryAxis,w,h),!t.subModification)return null;var J=H({},h);de(T,J,{x:w.x-j.x,y:w.y-j.y});var xe=t.subModification.setAll(n(n({},s),{},{rect:J,edges:T,pageCoords:w,prevCoords:w,prevRect:J})),je=xe.delta;return xe.changed&&(Y(t,Math.abs(je.x)>Math.abs(je.y),xe.coords,xe.rect),H(w,xe.coords)),xe.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Yo(s,t,h){var w=s.startCoords,T=s.edgeSign;t?h.y=w.y+(h.x-w.x)*T.y:h.x=w.x+(h.y-w.y)*T.x}function Vi(s,t,h,w){var T=s.startRect,j=s.startCoords,Y=s.ratio,J=s.edgeSign;if(t){var xe=w.width/Y;h.y=j.y+(xe-T.height)*J.y}else{var je=w.height*Y;h.x=j.x+(je-T.width)*J.x}}var Jo=hl(Ko,"aspectRatio"),ki=function(){};ki._defaults={};var si=ki;function Pn(s,t,h){return _.func(s)?Me(s,t.interactable,t.element,[h.x,h.y,t]):Me(s,t.interactable,t.element)}var xi={start:function(s){var t=s.rect,h=s.startOffset,w=s.state,T=s.interaction,j=s.pageCoords,Y=w.options,J=Y.elementRect,xe=H({left:0,top:0,right:0,bottom:0},Y.offset||{});if(t&&J){var je=Pn(Y.restriction,T,j);if(je){var Se=je.right-je.left-t.width,ca=je.bottom-je.top-t.height;Se<0&&(xe.left+=Se,xe.right+=Se),ca<0&&(xe.top+=ca,xe.bottom+=ca)}xe.left+=h.left-t.width*J.left,xe.top+=h.top-t.height*J.top,xe.right+=h.right-t.width*(1-J.right),xe.bottom+=h.bottom-t.height*(1-J.bottom)}w.offset=xe},set:function(s){var t=s.coords,h=s.interaction,w=s.state,T=w.options,j=w.offset,Y=Pn(T.restriction,h,t);if(Y){var J=function(xe){return!xe||"left"in xe&&"top"in xe||((xe=H({},xe)).left=xe.x||0,xe.top=xe.y||0,xe.right=xe.right||xe.left+xe.width,xe.bottom=xe.bottom||xe.top+xe.height),xe}(Y);t.x=Math.max(Math.min(J.right-j.right,t.x),J.left+j.left),t.y=Math.max(Math.min(J.bottom-j.bottom,t.y),J.top+j.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Xo=hl(xi,"restrict"),io={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Qn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Fi(s,t){for(var h=0,w=["top","left","bottom","right"];h<w.length;h++){var T=w[h];T in s||(s[T]=t[T])}return s}var Wn={noInner:io,noOuter:Qn,start:function(s){var t,h=s.interaction,w=s.startOffset,T=s.state,j=T.options;j&&(t=Le(Pn(j.offset,h,h.coords.start.page))),t=t||{x:0,y:0},T.offset={top:t.y+w.top,left:t.x+w.left,bottom:t.y-w.bottom,right:t.x-w.right}},set:function(s){var t=s.coords,h=s.edges,w=s.interaction,T=s.state,j=T.offset,Y=T.options;if(h){var J=H({},t),xe=Pn(Y.inner,w,J)||{},je=Pn(Y.outer,w,J)||{};Fi(xe,io),Fi(je,Qn),h.top?t.y=Math.min(Math.max(je.top+j.top,J.y),xe.top+j.top):h.bottom&&(t.y=Math.max(Math.min(je.bottom+j.bottom,J.y),xe.bottom+j.bottom)),h.left?t.x=Math.min(Math.max(je.left+j.left,J.x),xe.left+j.left):h.right&&(t.x=Math.max(Math.min(je.right+j.right,J.x),xe.right+j.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Zo=hl(Wn,"restrictEdges"),Qo=H({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(s){}},xi.defaults),et=hl({start:xi.start,set:xi.set,defaults:Qo},"restrictRect"),at={width:-1/0,height:-1/0},oo={width:1/0,height:1/0},ci=hl({start:function(s){return Wn.start(s)},set:function(s){var t=s.interaction,h=s.state,w=s.rect,T=s.edges,j=h.options;if(T){var Y=Ie(Pn(j.min,t,s.coords))||at,J=Ie(Pn(j.max,t,s.coords))||oo;h.options={endOnly:j.endOnly,inner:H({},Wn.noInner),outer:H({},Wn.noOuter)},T.top?(h.options.inner.top=w.bottom-Y.height,h.options.outer.top=w.bottom-J.height):T.bottom&&(h.options.inner.bottom=w.top+Y.height,h.options.outer.bottom=w.top+J.height),T.left?(h.options.inner.left=w.right-Y.width,h.options.outer.left=w.right-J.width):T.right&&(h.options.inner.right=w.left+Y.width,h.options.outer.right=w.left+J.width),Wn.set(s),h.options=j}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),wi={start:function(s){var t,h=s.interaction,w=s.interactable,T=s.element,j=s.rect,Y=s.state,J=s.startOffset,xe=Y.options,je=xe.offsetWithOrigin?function(Ia){var nl=Ia.interaction.element,al=Le(Me(Ia.state.options.origin,null,null,[nl])),dl=al||De(Ia.interactable,nl,Ia.interaction.prepared.name);return dl}(s):{x:0,y:0};if(xe.offset==="startCoords")t={x:h.coords.start.page.x,y:h.coords.start.page.y};else{var Se=Me(xe.offset,w,T,[h]);(t=Le(Se)||{x:0,y:0}).x+=je.x,t.y+=je.y}var ca=xe.relativePoints;Y.offsets=j&&ca&&ca.length?ca.map(function(Ia,nl){return{index:nl,relativePoint:Ia,x:J.left-j.width*Ia.x+t.x,y:J.top-j.height*Ia.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(s){var t=s.interaction,h=s.coords,w=s.state,T=w.options,j=w.offsets,Y=De(t.interactable,t.element,t.prepared.name),J=H({},h),xe=[];T.offsetWithOrigin||(J.x-=Y.x,J.y-=Y.y);for(var je=0,Se=j;je<Se.length;je++)for(var ca=Se[je],Ia=J.x-ca.x,nl=J.y-ca.y,al=0,dl=T.targets.length;al<dl;al++){var Dl=T.targets[al],El=void 0;(El=_.func(Dl)?Dl(Ia,nl,t._proxy,ca,al):Dl)&&xe.push({x:(_.number(El.x)?El.x:Ia)+ca.x,y:(_.number(El.y)?El.y:nl)+ca.y,range:_.number(El.range)?El.range:T.range,source:Dl,index:al,offset:ca})}for(var Vl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},tr=0;tr<xe.length;tr++){var hr=xe[tr],Kl=hr.range,cr=hr.x-J.x,pn=hr.y-J.y,nr=We(cr,pn),bn=nr<=Kl;Kl===1/0&&Vl.inRange&&Vl.range!==1/0&&(bn=!1),Vl.target&&!(bn?Vl.inRange&&Kl!==1/0?nr/Kl<Vl.distance/Vl.range:Kl===1/0&&Vl.range!==1/0||nr<Vl.distance:!Vl.inRange&&nr<Vl.distance)||(Vl.target=hr,Vl.distance=nr,Vl.range=Kl,Vl.inRange=bn,Vl.delta.x=cr,Vl.delta.y=pn)}return Vl.inRange&&(h.x=Vl.target.x,h.y=Vl.target.y),w.closest=Vl,Vl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},to=hl(wi,"snap"),jn={start:function(s){var t=s.state,h=s.edges,w=t.options;if(!h)return null;s.state={options:{targets:null,relativePoints:[{x:h.left?0:1,y:h.top?0:1}],offset:w.offset||"self",origin:{x:0,y:0},range:w.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],wi.start(s),t.offsets=s.state.offsets,s.state=t},set:function(s){var t=s.interaction,h=s.state,w=s.coords,T=h.options,j=h.offsets,Y={x:w.x-j[0].x,y:w.y-j[0].y};h.options=H({},T),h.options.targets=[];for(var J=0,xe=T.targets||[];J<xe.length;J++){var je=xe[J],Se=void 0;if(Se=_.func(je)?je(Y.x,Y.y,t):je){for(var ca=0,Ia=h.targetFields;ca<Ia.length;ca++){var nl=Ia[ca],al=nl[0],dl=nl[1];if(al in Se||dl in Se){Se.x=Se[al],Se.y=Se[dl];break}}h.options.targets.push(Se)}}var Dl=wi.set(s);return h.options=T,Dl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},lt=hl(jn,"snapSize"),_i={aspectRatio:Jo,restrictEdges:Zo,restrict:Xo,restrictRect:et,restrictSize:ci,snapEdges:hl({start:function(s){var t=s.edges;return t?(s.state.targetFields=s.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],jn.start(s)):null},set:jn.set,defaults:H(Br(jn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:to,snapSize:lt,spring:si,avoid:si,transform:si,rubberband:si},ui={id:"modifiers",install:function(s){var t=s.interactStatic;for(var h in s.usePlugin(Yr),s.usePlugin(Go),t.modifiers=_i,_i){var w=_i[h],T=w._defaults,j=w._methods;T._methods=j,s.defaults.perAction[h]=T}}},rt=ui,so=function(s){y(h,s);var t=D(h);function h(w,T,j,Y,J,xe){var je;if(o(this,h),P(p(je=t.call(this,J)),j),j!==T&&P(p(je),T),je.timeStamp=xe,je.originalEvent=j,je.type=w,je.pointerId=Ve(T),je.pointerType=ja(T),je.target=Y,je.currentTarget=null,w==="tap"){var Se=J.getPointerIndex(T);je.dt=je.timeStamp-J.pointers[Se].downTime;var ca=je.timeStamp-J.tapTime;je.double=!!J.prevTap&&J.prevTap.type!=="doubletap"&&J.prevTap.target===je.target&&ca<500}else w==="doubletap"&&(je.dt=T.timeStamp-J.tapTime,je.double=!0);return je}return c(h,[{key:"_subtractOrigin",value:function(w){var T=w.x,j=w.y;return this.pageX-=T,this.pageY-=j,this.clientX-=T,this.clientY-=j,this}},{key:"_addOrigin",value:function(w){var T=w.x,j=w.y;return this.pageX+=T,this.pageY+=j,this.clientX+=T,this.clientY+=j,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),h}(Fe),di={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(s){s.pointerEvents=di,s.defaults.actions.pointerEvents=di.defaults,H(s.actions.phaselessTypes,di.types)},listeners:{"interactions:new":function(s){var t=s.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(s){var t=s.down,h=s.pointerInfo;!t&&h.hold||(h.hold={duration:1/0,timeout:null})},"interactions:move":function(s,t){var h=s.interaction,w=s.pointer,T=s.event,j=s.eventTarget;s.duplicate||h.pointerIsDown&&!h.pointerWasMoved||(h.pointerIsDown&&Pi(s),Hn({interaction:h,pointer:w,event:T,eventTarget:j,type:"move"},t))},"interactions:down":function(s,t){(function(h,w){for(var T=h.interaction,j=h.pointer,Y=h.event,J=h.eventTarget,xe=h.pointerIndex,je=T.pointers[xe].hold,Se=Ue(J),ca={interaction:T,pointer:j,event:Y,eventTarget:J,type:"hold",targets:[],path:Se,node:null},Ia=0;Ia<Se.length;Ia++){var nl=Se[Ia];ca.node=nl,w.fire("pointerEvents:collect-targets",ca)}if(ca.targets.length){for(var al=1/0,dl=0,Dl=ca.targets;dl<Dl.length;dl++){var El=Dl[dl].eventable.options.holdDuration;El<al&&(al=El)}je.duration=al,je.timeout=setTimeout(function(){Hn({interaction:T,eventTarget:J,pointer:j,event:Y,type:"hold"},w)},al)}})(s,t),Hn(s,t)},"interactions:up":function(s,t){Pi(s),Hn(s,t),function(h,w){var T=h.interaction,j=h.pointer,Y=h.event,J=h.eventTarget;T.pointerWasMoved||Hn({interaction:T,eventTarget:J,pointer:j,event:Y,type:"tap"},w)}(s,t)},"interactions:cancel":function(s,t){Pi(s),Hn(s,t)}},PointerEvent:so,fire:Hn,collectEventTargets:co,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 Hn(s,t){var h=s.interaction,w=s.pointer,T=s.event,j=s.eventTarget,Y=s.type,J=s.targets,xe=J===void 0?co(s,t):J,je=new so(Y,w,T,j,h,t.now());t.fire("pointerEvents:new",{pointerEvent:je});for(var Se={interaction:h,pointer:w,event:T,eventTarget:j,targets:xe,type:Y,pointerEvent:je},ca=0;ca<xe.length;ca++){var Ia=xe[ca];for(var nl in Ia.props||{})je[nl]=Ia.props[nl];var al=De(Ia.eventable,Ia.node);if(je._subtractOrigin(al),je.eventable=Ia.eventable,je.currentTarget=Ia.node,Ia.eventable.fire(je),je._addOrigin(al),je.immediatePropagationStopped||je.propagationStopped&&ca+1<xe.length&&xe[ca+1].node!==je.currentTarget)break}if(t.fire("pointerEvents:fired",Se),Y==="tap"){var dl=je.double?Hn({interaction:h,pointer:w,event:T,eventTarget:j,type:"doubletap"},t):je;h.prevTap=dl,h.tapTime=dl.timeStamp}return je}function co(s,t){var h=s.interaction,w=s.pointer,T=s.event,j=s.eventTarget,Y=s.type,J=h.getPointerIndex(w),xe=h.pointers[J];if(Y==="tap"&&(h.pointerWasMoved||!xe||xe.downTarget!==j))return[];for(var je=Ue(j),Se={interaction:h,pointer:w,event:T,eventTarget:j,type:Y,path:je,targets:[],node:null},ca=0;ca<je.length;ca++){var Ia=je[ca];Se.node=Ia,t.fire("pointerEvents:collect-targets",Se)}return Y==="hold"&&(Se.targets=Se.targets.filter(function(nl){var al,dl;return nl.eventable.options.holdDuration===((al=h.pointers[J])==null||(dl=al.hold)==null?void 0:dl.duration)})),Se.targets}function Pi(s){var t=s.interaction,h=s.pointerIndex,w=t.pointers[h].hold;w&&w.timeout&&(clearTimeout(w.timeout),w.timeout=null)}var nt=Object.freeze({__proto__:null,default:di});function it(s){var t=s.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var uo={id:"pointer-events/holdRepeat",install:function(s){s.usePlugin(di);var t=s.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=s.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(s,t){return s["pointerEvents:".concat(t)]=it,s},{"pointerEvents:new":function(s){var t=s.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(s,t){var h=s.interaction,w=s.pointerEvent,T=s.eventTarget,j=s.targets;if(w.type==="hold"&&j.length){var Y=j[0].eventable.options.holdRepeatInterval;Y<=0||(h.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:h,eventTarget:T,type:"hold",pointer:w,event:w},t)},Y))}}})},ot=uo,tt={id:"pointer-events/interactableTargets",install:function(s){var t=s.Interactable;t.prototype.pointerEvents=function(w){return H(this.events.options,w),this};var h=t.prototype._backCompatOption;t.prototype._backCompatOption=function(w,T){var j=h.call(this,w,T);return j===this&&(this.events.options[w]=T),j}},listeners:{"pointerEvents:collect-targets":function(s,t){var h=s.targets,w=s.node,T=s.type,j=s.eventTarget;t.interactables.forEachMatch(w,function(Y){var J=Y.events,xe=J.options;J.types[T]&&J.types[T].length&&Y.testIgnoreAllow(xe,w,j)&&h.push({node:w,eventable:J,props:{interactable:Y}})})},"interactable:new":function(s){var t=s.interactable;t.events.getRect=function(h){return t.getRect(h)}},"interactable:set":function(s,t){var h=s.interactable,w=s.options;H(h.events.options,t.pointerEvents.defaults),H(h.events.options,w.pointerEvents||{})}}},st=tt,ct={id:"pointer-events",install:function(s){s.usePlugin(nt),s.usePlugin(ot),s.usePlugin(st)}},Si=ct,ut={id:"reflow",install:function(s){var t=s.Interactable;s.actions.phases.reflow=!0,t.prototype.reflow=function(h){return function(w,T,j){for(var Y=w.getAllElements(),J=j.window.Promise,xe=J?[]:null,je=function(){var ca=Y[Se],Ia=w.getRect(ca);if(!Ia)return 1;var nl,al=$e(j.interactions.list,function(El){return El.interacting()&&El.interactable===w&&El.element===ca&&El.prepared.name===T.name});if(al)al.move(),xe&&(nl=al._reflowPromise||new J(function(El){al._reflowResolve=El}));else{var dl=Ie(Ia),Dl=function(El){return{coords:El,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:dl.x,y:dl.y},client:{x:dl.x,y:dl.y},timeStamp:j.now()});nl=function(El,Vl,tr,hr,Kl){var cr=El.interactions.new({pointerType:"reflow"}),pn={interaction:cr,event:Kl,pointer:Kl,eventTarget:tr,phase:"reflow"};cr.interactable=Vl,cr.element=tr,cr.prevEvent=Kl,cr.updatePointer(Kl,Kl,tr,!0),ce(cr.coords.delta),Ua(cr.prepared,hr),cr._doPhase(pn);var nr=El.window,bn=nr.Promise,Qr=bn?new bn(function(Rn){cr._reflowResolve=Rn}):void 0;return cr._reflowPromise=Qr,cr.start(hr,Vl,tr),cr._interacting?(cr.move(pn),cr.end(Kl)):(cr.stop(),cr._reflowResolve()),cr.removePointer(Kl,Kl),Qr}(j,w,ca,T,Dl)}xe&&xe.push(nl)},Se=0;Se<Y.length&&!je();Se++);return xe&&J.all(xe).then(function(){return w})}(this,h,s)}},listeners:{"interactions:stop":function(s,t){var h=s.interaction;h.pointerType==="reflow"&&(h._reflowResolve&&h._reflowResolve(),function(w,T){w.splice(w.indexOf(T),1)}(t.interactions.list,h))}}},dt=ut;if(dn.use(Rl),dn.use(lr),dn.use(Si),dn.use(Nr),dn.use(rt),dn.use(Ul),dn.use(Jl),dn.use(vl),dn.use(dt),dn.default=dn,i(a)==="object"&&a)try{a.exports=dn}catch{}return dn.default=dn,dn})}(Ki,Ki.exports)),Ki.exports}var u1=c1();const Ws=z.getDefaultExportFromCjs(u1),Ro=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:r}){const n=a,i=r,o=e.inject(tu),d=e.inject(su);if(!o)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const c=e.shallowRef(null),u=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 y=!1,b=!1,g=NaN,p=NaN,D=NaN,m=NaN,F=-1,C=-1,L=-1,O=-1,S=n.x,E=n.y,x=n.w,k=n.h;const _=e.ref(),I=e.reactive({i:e.toRef(n,"i"),state:u,wrapper:_,calcXY:Me});function R(he){Je(he)}function ae(){Sa()}function X(he){Bn(n.isDraggable)&&(u.draggable=he)}function me(he){Bn(n.isResizable)&&(u.resizable=he)}function ue(he){Bn(n.isBounded)&&(u.bounded=he)}function U(he){u.transformScale=he}function W(he){u.rowHeight=he}function Z(he){u.maxRows=he}function Q(){u.rtl=Us()==="rtl",Sa()}function ve(he){u.cols=Math.floor(he)}o.increaseItem(I),e.onBeforeMount(()=>{u.rtl=Us()==="rtl"}),e.onMounted(()=>{o.responsive&&o.lastBreakpoint?u.cols=fu(o.lastBreakpoint,o.cols):u.cols=o.colNum,u.rowHeight=o.rowHeight,u.containerWidth=o.width!==null?o.width:100,u.margin=o.margin!==void 0?o.margin.map(Number):[10,10],u.maxRows=o.maxRows,Bn(n.isDraggable)?u.draggable=o.isDraggable:u.draggable=n.isDraggable,Bn(n.isResizable)?u.resizable=o.isResizable:u.resizable=n.isResizable,Bn(n.isBounded)?u.bounded=o.isBounded:u.bounded=n.isBounded,u.transformScale=o.transformScale,u.useCssTransforms=o.useCssTransforms,u.useStyleCursor=o.useStyleCursor,e.watchEffect(()=>{S=n.x,E=n.y,k=n.h,x=n.w,kn(_e)}),d.on("updateWidth",R),d.on("compact",ae),d.on("setDraggable",X),d.on("setResizable",me),d.on("setBounded",ue),d.on("setTransformScale",U),d.on("setRowHeight",W),d.on("setMaxRows",Z),d.on("directionchange",Q),d.on("setColNum",ve)}),e.onBeforeUnmount(()=>{d.off("updateWidth",R),d.off("compact",ae),d.off("setDraggable",X),d.off("setResizable",me),d.off("setBounded",ue),d.off("setTransformScale",U),d.off("setRowHeight",W),d.off("setMaxRows",Z),d.off("directionchange",Q),d.off("setColNum",ve),c.value&&(c.value.unset(),c.value=null),o.decreaseItem(I)}),l({state:u,wrapper:_});const Ae=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,te=e.computed(()=>u.resizable&&!n.static),A=e.computed(()=>o.isMirrored?!u.rtl:u.rtl),se=e.computed(()=>(u.draggable||u.resizable)&&!n.static),G=e1("item"),fe=e.computed(()=>({[G.b()]:!0,[G.bm("resizable")]:te.value,[G.bm("static")]:n.static,[G.bm("resizing")]:u.isResizing,[G.bm("dragging")]:u.isDragging,[G.bm("transform")]:u.useCssTransforms,[G.bm("rtl")]:A.value,[G.bm("no-touch")]:Ae&&se.value})),we=e.computed(()=>[G.be("resizer"),A.value&&G.bem("resizer","rtl")].filter(Boolean));e.watch(()=>n.isDraggable,he=>{u.draggable=he}),e.watch(()=>n.static,()=>{kn(P),kn(ce)}),e.watch(()=>u.draggable,()=>{kn(P)}),e.watch(()=>n.isResizable,he=>{u.resizable=he}),e.watch(()=>n.isBounded,he=>{u.bounded=he}),e.watch(()=>u.resizable,()=>{kn(ce)}),e.watch(()=>u.rowHeight,()=>{kn(_e),kn(Ue)}),e.watch([()=>u.cols,()=>u.containerWidth],()=>{kn(ce),kn(_e),kn(Ue)}),e.watch([()=>n.minH,()=>n.maxH,()=>n.minW,()=>n.maxW],()=>{kn(ce)}),e.watch(A,()=>{kn(ce),kn(_e)}),e.watch([()=>o.margin,()=>o.margin[0],()=>o.margin[1]],()=>{const he=o.margin;!he||he[0]===u.margin[0]&&he[1]===u.margin[1]||(u.margin=he.map(Number),kn(_e),kn(Ue))});function _e(){n.x+n.w>u.cols?(S=0,x=n.w>u.cols?u.cols:n.w):(S=n.x,x=n.w);const he=Ge(S,E,x,k);u.isDragging&&(he.top=u.dragging.top,A.value?he.right=u.dragging.left:he.left=u.dragging.left),u.isResizing&&(he.width=u.resizing.width,he.height=u.resizing.height);let ua;u.useCssTransforms?A.value?ua=Jv(he.top,he.right,he.width,he.height):ua=Yv(he.top,he.left,he.width,he.height):A.value?ua=Zv(he.top,he.right,he.width,he.height):ua=Xv(he.top,he.left,he.width,he.height),u.style=ua}function Ue(){const he={};for(const ua of["width","height"]){const ia=u.style[ua].match(/^(\d+)px$/);if(!ia)return;he[ua]=ia[1]}i("container-resized",n.i,n.h,n.w,he.height,he.width)}function ra(he){if(n.static)return;const ua=he.type;if(ua==="resizestart"&&u.isResizing||ua!=="resizestart"&&!u.isResizing)return;const ia=js(he);if(Bn(ia))return;const{x:Ve,y:va}=ia,Ea={width:0,height:0};let Ce;switch(ua){case"resizestart":{ce(),F=x,C=k,Ce=Ge(S,E,x,k),Ea.width=Ce.width,Ea.height=Ce.height,u.resizing=Ea,u.isResizing=!0;break}case"resizemove":{!he.edges.right&&!he.edges.left&&(D=Ve),!he.edges.top&&!he.edges.bottom&&(m=va);const Fa=Hs(D,m,Ve,va);A.value?Ea.width=u.resizing.width-Fa.deltaX/u.transformScale:Ea.width=u.resizing.width+Fa.deltaX/u.transformScale,Ea.height=u.resizing.height+Fa.deltaY/u.transformScale,u.resizing=Ea;break}case"resizeend":{Ce=Ge(S,E,x,k),Ea.width=Ce.width,Ea.height=Ce.height,u.resizing={width:-1,height:-1},u.isResizing=!1;break}}Ce=De(Ea.height,Ea.width),Ce.w<n.minW&&(Ce.w=n.minW),Ce.w>n.maxW&&(Ce.w=n.maxW),Ce.h<n.minH&&(Ce.h=n.minH),Ce.h>n.maxH&&(Ce.h=n.maxH),Ce.h<1&&(Ce.h=1),Ce.w<1&&(Ce.w=1),D=Ve,m=va,(x!==Ce.w||k!==Ce.h)&&i("resize",n.i,Ce.h,Ce.w,Ea.height,Ea.width),he.type==="resizeend"&&(F!==x||C!==k)&&i("resized",n.i,Ce.h,Ce.w,Ea.height,Ea.width),d.emit("resizeEvent",he.type,n.i,S,E,Ce.h,Ce.w)}function H(he){if(n.static||u.isResizing)return;const ua=he.type;if(ua==="dragstart"&&u.isDragging||ua!=="dragstart"&&!u.isDragging)return;const ia=js(he);if(Bn(ia))return;const{x:Ve,y:va}=ia,Ea=he.target;if(!Ea.offsetParent)return;const Ce={top:0,left:0};switch(ua){case"dragstart":{L=S,O=E;const Da=Ea.offsetParent.getBoundingClientRect(),da=Ea.getBoundingClientRect(),ja=da.left/u.transformScale,sa=Da.left/u.transformScale,Fe=da.right/u.transformScale,ha=Da.right/u.transformScale,Qe=da.top/u.transformScale,Oe=Da.top/u.transformScale;A.value?Ce.left=(Fe-ha)*-1:Ce.left=ja-sa,Ce.top=Qe-Oe,u.dragging=Ce,u.isDragging=!0;break}case"dragmove":{const Da=Hs(g,p,Ve,va);if(A.value?Ce.left=u.dragging.left-Da.deltaX/u.transformScale:Ce.left=u.dragging.left+Da.deltaX/u.transformScale,Ce.top=u.dragging.top+Da.deltaY/u.transformScale,u.bounded){const da=Ea.offsetParent.clientHeight-Ie(n.h,u.rowHeight,u.margin[1]);Ce.top=de(Ce.top,0,da);const ja=Le(),sa=u.containerWidth-Ie(n.w,ja,u.margin[0]);Ce.left=de(Ce.left,0,sa)}u.dragging=Ce;break}case"dragend":{const Da=Ea.offsetParent.getBoundingClientRect(),da=Ea.getBoundingClientRect(),ja=da.left/u.transformScale,sa=Da.left/u.transformScale,Fe=da.right/u.transformScale,ha=Da.right/u.transformScale,Qe=da.top/u.transformScale,Oe=Da.top/u.transformScale;A.value?Ce.left=(Fe-ha)*-1:Ce.left=ja-sa,Ce.top=Qe-Oe,u.dragging={top:-1,left:-1},u.isDragging=!1;break}}let Fa;A.value,Fa=Me(Ce.top,Ce.left),g=Ve,p=va,(S!==Fa.x||E!==Fa.y)&&i("move",n.i,Fa.x,Fa.y),he.type==="dragend"&&(L!==S||O!==E)&&i("moved",n.i,Fa.x,Fa.y),d.emit("dragEvent",he.type,n.i,Fa.x,Fa.y,k,x)}function Ge(he,ua,ia,Ve){const va=Le();let Ea;return A.value?Ea={right:Math.round(va*he+(he+1)*u.margin[0]),top:Math.round(u.rowHeight*ua+(ua+1)*u.margin[1]),width:ia===1/0?ia:Math.round(va*ia+Math.max(0,ia-1)*u.margin[0]),height:Ve===1/0?Ve:Math.round(u.rowHeight*Ve+Math.max(0,Ve-1)*u.margin[1])}:Ea={left:Math.round(va*he+(he+1)*u.margin[0]),top:Math.round(u.rowHeight*ua+(ua+1)*u.margin[1]),width:ia===1/0?ia:Math.round(va*ia+Math.max(0,ia-1)*u.margin[0]),height:Ve===1/0?Ve:Math.round(u.rowHeight*Ve+Math.max(0,Ve-1)*u.margin[1])},Ea}function Me(he,ua){const ia=Le();let Ve=Math.round((ua-u.margin[0])/(ia+u.margin[0])),va=Math.round((he-u.margin[1])/(u.rowHeight+u.margin[1]));return Ve=Math.max(Math.min(Ve,u.cols-x),0),va=Math.max(Math.min(va,u.maxRows-k),0),{x:Ve,y:va}}function Le(){return(u.containerWidth-u.margin[0]*(u.cols+1))/u.cols}function Ie(he,ua,ia){return Number.isFinite(he)?Math.round(ua*he+Math.max(0,he-1)*ia):he}function de(he,ua,ia){return Math.max(Math.min(he,ia),ua)}function De(he,ua,ia=!1){const Ve=Le();let va=Math.round((ua+u.margin[0])/(Ve+u.margin[0])),Ea=0;return ia?Ea=Math.ceil((he+u.margin[1])/(u.rowHeight+u.margin[1])):Ea=Math.round((he+u.margin[1])/(u.rowHeight+u.margin[1])),va=Math.max(Math.min(va,u.cols-S),0),Ea=Math.max(Math.min(Ea,u.maxRows-E),0),{w:va,h:Ea}}function Je(he,ua){u.containerWidth=he}function Sa(){_e()}function We(){!c.value&&_.value&&(c.value=Ws(_.value),u.useStyleCursor||c.value.styleCursor(!1))}const V=Vs(H);function P(){if(We(),!!c.value)if(u.draggable&&!n.static){const he={ignoreFrom:n.dragIgnoreFrom,allowFrom:n.dragAllowFrom,...n.dragOption};c.value.draggable(he),y||(y=!0,c.value.on("dragstart dragmove dragend",ua=>{ua.type==="dragmove"?V(ua):H(ua)}))}else c.value.draggable({enabled:!1})}const le=Vs(ra);function ce(){if(We(),!!c.value)if(u.resizable&&!n.static){const he=Ge(0,0,n.maxW,n.maxH),ua=Ge(0,0,n.minW,n.minH),ia={edges:{left:A.value?`.${we.value[0]}`:!1,right:A.value?!1:`.${we.value[0]}`,bottom:`.${we.value[0]}`,top:!1},ignoreFrom:n.resizeIgnoreFrom,restrictSize:{min:{height:ua.height*u.transformScale,width:ua.width*u.transformScale},max:{height:he.height*u.transformScale,width:he.width*u.transformScale}},...n.resizeOption};n.preserveAspectRatio&&(ia.modifiers=[Ws.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(ia),b||(b=!0,c.value.on("resizestart resizemove resizeend",Ve=>{Ve.type==="resizemove"?le(Ve):ra(Ve)}))}else c.value.resizable({enabled:!1})}return(he,ua)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:_,class:e.normalizeClass(fe.value),style:e.normalizeStyle(u.style)},[e.renderSlot(he.$slots,"default"),te.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(we.value)},null,2)):e.createCommentVNode("",!0)],6))}}),bi=typeof window<"u";var Gs;bi&&(Gs=window==null?void 0:window.navigator)!=null&&Gs.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ks(a){return a!=null}function Ys(){}const d1=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(d1)));const p1=bi&&("ontouchstart"in window||h1()>0),f1=p1?"pointerdown":"click";function h1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function v1(a,l,r=window.Event){const{type:n,bubbles:i=!1,cancelable:o=!1,...d}=l;if(!Ks(n)||n==="")return!1;let c;return Ks(r)?c=new r(n,{bubbles:i,cancelable:o}):(c=document.createEvent("HTMLEvents"),c.initEvent(n,i,o)),Object.assign(c,d),a.dispatchEvent(c)}const m1="clickoutside",y1=new Set;bi&&document.addEventListener(f1,a=>{const l=a.target,r=a.composedPath&&a.composedPath();y1.forEach(n=>{n!==l&&(r?!r.includes(n):!n.contains(l))&&(!n.__transferElement||n.__transferElement!==l&&!n.__transferElement.contains(l))&&v1(n,{type:m1})})},!0);const g1=[["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 Eo;if(bi){for(const a of g1)if(a[1]in document){Eo=a;break}}e.computed(()=>!1);const b1=new Set,k1=new WeakMap;if(bi&&Eo){const a=Eo[2],l=Eo[4];document.addEventListener(l,()=>{if(b1.forEach(r=>{r.value=!1}),document[a]){const r=k1.get(document[a]);r&&(r.value=!0)}},!1)}const vu=new Map;vu.set("x",0);vu.set("y",0);var yi=[],x1=function(){return yi.some(function(a){return a.activeTargets.length>0})},w1=function(){return yi.some(function(a){return a.skippedTargets.length>0})},Js="ResizeObserver loop completed with undelivered notifications.",_1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Js}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Js),window.dispatchEvent(a)},ao;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ao||(ao={}));var gi=function(a){return Object.freeze(a)},S1=function(){function a(l,r){this.inlineSize=l,this.blockSize=r,gi(this)}return a}(),mu=function(){function a(l,r,n,i){return this.x=l,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,gi(this)}return a.prototype.toJSON=function(){var l=this,r=l.x,n=l.y,i=l.top,o=l.right,d=l.bottom,c=l.left,u=l.width,y=l.height;return{x:r,y:n,top:i,right:o,bottom:d,left:c,width:u,height:y}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Pt=function(a){return a instanceof SVGElement&&"getBBox"in a},yu=function(a){if(Pt(a)){var l=a.getBBox(),r=l.width,n=l.height;return!r&&!n}var i=a,o=i.offsetWidth,d=i.offsetHeight;return!(o||d||a.getClientRects().length)},Xs=function(a){var l;if(a instanceof Element)return!0;var r=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(r&&a instanceof r.Element)},E1=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},Zi=typeof window<"u"?window:{},xo=new WeakMap,Zs=/auto|scroll/,C1=/^tb|vertical/,D1=/msie|trident/i.test(Zi.navigator&&Zi.navigator.userAgent),qn=function(a){return parseFloat(a||"0")},Oi=function(a,l,r){return a===void 0&&(a=0),l===void 0&&(l=0),r===void 0&&(r=!1),new S1((r?l:a)||0,(r?a:l)||0)},Qs=gi({devicePixelContentBoxSize:Oi(),borderBoxSize:Oi(),contentBoxSize:Oi(),contentRect:new mu(0,0,0,0)}),gu=function(a,l){if(l===void 0&&(l=!1),xo.has(a)&&!l)return xo.get(a);if(yu(a))return xo.set(a,Qs),Qs;var r=getComputedStyle(a),n=Pt(a)&&a.ownerSVGElement&&a.getBBox(),i=!D1&&r.boxSizing==="border-box",o=C1.test(r.writingMode||""),d=!n&&Zs.test(r.overflowY||""),c=!n&&Zs.test(r.overflowX||""),u=n?0:qn(r.paddingTop),y=n?0:qn(r.paddingRight),b=n?0:qn(r.paddingBottom),g=n?0:qn(r.paddingLeft),p=n?0:qn(r.borderTopWidth),D=n?0:qn(r.borderRightWidth),m=n?0:qn(r.borderBottomWidth),F=n?0:qn(r.borderLeftWidth),C=g+y,L=u+b,O=F+D,S=p+m,E=c?a.offsetHeight-S-a.clientHeight:0,x=d?a.offsetWidth-O-a.clientWidth:0,k=i?C+O:0,_=i?L+S:0,I=n?n.width:qn(r.width)-k-x,R=n?n.height:qn(r.height)-_-E,ae=I+C+x+O,X=R+L+E+S,me=gi({devicePixelContentBoxSize:Oi(Math.round(I*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:Oi(ae,X,o),contentBoxSize:Oi(I,R,o),contentRect:new mu(g,u,I,R)});return xo.set(a,me),me},bu=function(a,l,r){var n=gu(a,r),i=n.borderBoxSize,o=n.contentBoxSize,d=n.devicePixelContentBoxSize;switch(l){case ao.DEVICE_PIXEL_CONTENT_BOX:return d;case ao.BORDER_BOX:return i;default:return o}},T1=function(){function a(l){var r=gu(l);this.target=l,this.contentRect=r.contentRect,this.borderBoxSize=gi([r.borderBoxSize]),this.contentBoxSize=gi([r.contentBoxSize]),this.devicePixelContentBoxSize=gi([r.devicePixelContentBoxSize])}return a}(),ku=function(a){if(yu(a))return 1/0;for(var l=0,r=a.parentNode;r;)l+=1,r=r.parentNode;return l},B1=function(){var a=1/0,l=[];yi.forEach(function(o){if(o.activeTargets.length!==0){var d=[];o.activeTargets.forEach(function(c){var u=new T1(c.target),y=ku(c.target);d.push(u),c.lastReportedSize=bu(c.target,c.observedBox),y<a&&(a=y)}),l.push(function(){o.callback.call(o.observer,d,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=l;r<n.length;r++){var i=n[r];i()}return a},ec=function(a){yi.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(r){r.isActive()&&(ku(r.target)>a?l.activeTargets.push(r):l.skippedTargets.push(r))})})},N1=function(){var a=0;for(ec(a);x1();)a=B1(),ec(a);return w1()&&_1(),a>0},xt,xu=[],A1=function(){return xu.splice(0).forEach(function(a){return a()})},z1=function(a){if(!xt){var l=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return A1()}).observe(r,n),xt=function(){r.textContent="".concat(l?l--:l++)}}xu.push(a),xt()},M1=function(a){z1(function(){requestAnimationFrame(a)})},Co=0,I1=function(){return!!Co},O1=250,L1={attributes:!0,characterData:!0,childList:!0,subtree:!0},ac=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],lc=function(a){return a===void 0&&(a=0),Date.now()+a},wt=!1,R1=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var r=this;if(l===void 0&&(l=O1),!wt){wt=!0;var n=lc(l);M1(function(){var i=!1;try{i=N1()}finally{if(wt=!1,l=n-lc(),!I1())return;i?r.run(1e3):l>0?r.run(l):r.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,r=function(){return l.observer&&l.observer.observe(document.body,L1)};document.body?r():Zi.addEventListener("DOMContentLoaded",r)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ac.forEach(function(r){return Zi.addEventListener(r,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),ac.forEach(function(r){return Zi.removeEventListener(r,l.listener,!0)}),this.stopped=!0)},a}(),Lt=new R1,rc=function(a){!Co&&a>0&&Lt.start(),Co+=a,!Co&&Lt.stop()},$1=function(a){return!Pt(a)&&!E1(a)&&getComputedStyle(a).display==="inline"},V1=function(){function a(l,r){this.target=l,this.observedBox=r||ao.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=bu(this.target,this.observedBox,!0);return $1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),F1=function(){function a(l,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=r}return a}(),wo=new WeakMap,nc=function(a,l){for(var r=0;r<a.length;r+=1)if(a[r].target===l)return r;return-1},_o=function(){function a(){}return a.connect=function(l,r){var n=new F1(l,r);wo.set(l,n)},a.observe=function(l,r,n){var i=wo.get(l),o=i.observationTargets.length===0;nc(i.observationTargets,r)<0&&(o&&yi.push(i),i.observationTargets.push(new V1(r,n&&n.box)),rc(1),Lt.schedule())},a.unobserve=function(l,r){var n=wo.get(l),i=nc(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&yi.splice(yi.indexOf(n),1),n.observationTargets.splice(i,1),rc(-1))},a.disconnect=function(l){var r=this,n=wo.get(l);n.observationTargets.slice().forEach(function(i){return r.unobserve(l,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},a}(),P1=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.");_o.connect(this,l)}return a.prototype.observe=function(l,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Xs(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");_o.observe(this,l,r)},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(!Xs(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");_o.unobserve(this,l)},a.prototype.disconnect=function(){_o.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const $o=new WeakMap;function j1(a){var l;for(let r=0,n=a.length;r<n;++r){const i=a[r],o=$o.get(i.target);if(typeof o=="function"){const{inlineSize:d,blockSize:c}=((l=i.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:u,offsetHeight:y}=i.target;o(Object.assign(i,{offsetWidth:u,offsetHeight:y,width:d??u,height:c??y}))}}}const wu=new(bi&&window.ResizeObserver||P1)(j1);function ic(a,l){$o.set(a,l),wu.observe(a)}function oc(a){$o.has(a)&&(wu.unobserve(a),$o.delete(a))}function H1(a={}){let l=Ys;const r=e.watch(()=>e.unref(a.target),i=>{l(),!(!i||typeof a.onResize!="function")&&(ic(i,a.onResize),l=()=>{oc(i),l=Ys})},{immediate:!0}),n=()=>{r(),l()};return e.getCurrentScope()&&e.onScopeDispose(n),{observeResize:ic,unobserveResize:oc,unobserve:n}}const U1=e.ref(!1);e.computed(()=>U1.value);const tc="__theme_style__",_t="__theme_observer__",sc=e.reactive(new Map),cc=new Map;e.watch(sc,()=>{if(!bi)return;cc.clear();const a=document.head.querySelector(`#${tc}`);a&&document.head.removeChild(a);const l=document.createElement("style");let r=`.${_t} { width: 1px }`,n=1;for(const[i,[o,d]]of sc.entries())r+=` html.${o} .${_t}, .${d} .${_t} { width: ${++n}px }`,cc.set(n,i);l.textContent=r,l.id=tc,document.head.appendChild(l)});const _u=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:r}){const n=a,i=r,o=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),d=new Map,c=e.ref(n.layout),u=e.ref(),{observeResize:y,unobserveResize:b}=H1(),g=jv();g.on("resizeEvent",p),g.on("dragEvent",D),e.onBeforeMount(()=>{i("layout-before-mount",c.value)}),e.onMounted(()=>{i("layout-mounted",c.value),e.nextTick(()=>{Qv(c.value),o.originalLayout=c.value,e.nextTick(()=>{R(),u.value&&y(u.value,Hv(S,16)),zi(c.value,n.verticalCompact),i("layout-updated",c.value),O(),S()})})}),e.onBeforeUnmount(()=>{g.clearAll(),u.value&&b(u.value)});function p(X,me,ue,U,W,Z){_(X,me,ue,U,W,Z)}function D(X,me,ue,U,W,Z){k(X,me,ue,U,W,Z)}e.watch(()=>o.width,(X,me)=>{e.nextTick(()=>{g.emit("updateWidth",X),me===-1&&e.nextTick(()=>{i("layout-ready",c.value)}),O()})}),e.watch(()=>[n.layout,n.layout.length],()=>{c.value=n.layout,L()}),e.watch(()=>n.colNum,X=>{g.emit("setColNum",X)}),e.watch(()=>n.rowHeight,X=>{g.emit("setRowHeight",X)}),e.watch(()=>n.isDraggable,X=>{g.emit("setDraggable",X)}),e.watch(()=>n.isResizable,X=>{g.emit("setResizable",X)}),e.watch(()=>n.isBounded,X=>{g.emit("setBounded",X)}),e.watch(()=>n.transformScale,X=>{g.emit("setTransformScale",X)}),e.watch(()=>n.responsive,X=>{X||(i("update:layout",o.originalLayout),g.emit("setColNum",n.colNum)),S()}),e.watch(()=>n.maxRows,X=>{g.emit("setMaxRows",X)}),e.watch([()=>n.margin,()=>n.margin[1]],O),e.provide(tu,e.reactive({...e.toRefs(n),...e.toRefs(o),increaseItem:m,decreaseItem:F})),e.provide(su,g),l({state:o,getItem:C,resizeEvent:_,dragEvent:k,layoutUpdate:L});function m(X){d.set(X.i,X)}function F(X){d.delete(X.i)}function C(X){return d.get(X)}function L(){if(!Bn(c.value)&&!Bn(o.originalLayout)){if(c.value.length!==o.originalLayout.length){const X=ae(c.value,o.originalLayout);if(X.length>0)if(c.value.length>o.originalLayout.length)o.originalLayout=o.originalLayout.concat(X);else{const me=new Set(X.map(ue=>ue.i));o.originalLayout=o.originalLayout.filter(ue=>!me.has(ue.i))}o.lastLayoutLength=c.value.length,R()}zi(c.value,n.verticalCompact),g.emit("updateWidth",o.width),O(),i("layout-updated",c.value)}}function O(){o.mergedStyle={height:E()}}function S(){u.value&&(o.width=u.value.offsetWidth),g.emit("resizeEvent")}function E(){if(!n.autoSize)return;const X=parseFloat(n.margin[1]);return qv(c.value)*(n.rowHeight+X)+X+"px"}let x;function k(X,me,ue,U,W,Z){let Q=Fs(c.value,me);Bn(Q)&&(Q={h:0,w:0,x:0,y:0,i:""}),X==="dragstart"&&!n.verticalCompact&&(x=c.value.reduce((ve,{i:Ae,x:te,y:A})=>({...ve,[Ae]:{x:te,y:A}}),{})),X==="dragmove"||X==="dragstart"?(o.placeholder.i=me,o.placeholder.x=Q.x,o.placeholder.y=Q.y,o.placeholder.w=Z,o.placeholder.h=W,e.nextTick(()=>{o.isDragging=!0}),g.emit("updateWidth",o.width)):e.nextTick(()=>{o.isDragging=!1}),c.value=Ot(c.value,Q,ue,U,!0,n.preventCollision),n.restoreOnDrag?(Q.static=!0,zi(c.value,n.verticalCompact,x),Q.static=!1):zi(c.value,n.verticalCompact),g.emit("compact"),O(),X==="dragend"&&(x=void 0,i("layout-updated",c.value))}function _(X,me,ue,U,W,Z){let Q=Fs(c.value,me);Bn(Q)&&(Q={h:0,w:0,x:0,y:0,i:""});let ve;if(n.preventCollision){const Ae=uu(c.value,{...Q,w:Z,h:W}).filter(te=>te.i!==Q.i);if(ve=Ae.length>0,ve){let te=1/0,A=1/0;Ae.forEach(se=>{se.x>Q.x&&(te=Math.min(te,se.x)),se.y>Q.y&&(A=Math.min(A,se.y))}),Number.isFinite(te)&&(Q.w=te-Q.x),Number.isFinite(A)&&(Q.h=A-Q.y)}}ve||(Q.w=Z,Q.h=W),X==="resizestart"||X==="resizemove"?(o.placeholder.i=me,o.placeholder.x=ue,o.placeholder.y=U,o.placeholder.w=Q.w,o.placeholder.h=Q.h,e.nextTick(()=>{o.isDragging=!0}),g.emit("updateWidth",o.width)):X&&e.nextTick(()=>{o.isDragging=!1}),n.responsive&&I(),zi(c.value,n.verticalCompact),g.emit("compact"),O(),X==="resizeend"&&i("layout-updated",c.value)}function I(){const X=r1(n.breakpoints,o.width);if(X===o.lastBreakpoint)return;const me=fu(X,n.cols);!Bn(o.lastBreakpoint)&&!o.layouts[o.lastBreakpoint]&&(o.layouts[o.lastBreakpoint]=It(c.value));const ue=n1(o.originalLayout,o.layouts,n.breakpoints,X,o.lastBreakpoint,me,n.verticalCompact);o.layouts[X]=ue,o.lastBreakpoint!==X&&i("breakpoint-changed",X,ue),c.value=ue,i("update:layout",ue),o.lastBreakpoint=X,g.emit("setColNum",me)}function R(){o.layouts=Object.assign({},n.responsiveLayouts)}function ae(X,me){const ue=new Set(me.map(Q=>Q.i)),U=new Set(X.map(Q=>Q.i)),W=X.filter(Q=>!ue.has(Q.i)),Z=me.filter(Q=>!U.has(Q.i));return W.concat(Z)}return(X,me)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:u,class:"vgl-layout",style:e.normalizeStyle(o.mergedStyle)},[X.$slots.default?e.renderSlot(X.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,ue=>(e.openBlock(),e.createBlock(Ro,e.mergeProps({key:ue.i,ref_for:!0},ue),{default:e.withCtx(()=>[e.renderSlot(X.$slots,"item",{item:ue})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Ro,{class:"vgl-item--placeholder",x:o.placeholder.x,y:o.placeholder.y,w:o.placeholder.w,h:o.placeholder.h,i:o.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,o.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 q1={key:0,class:"item-view-group"},W1={key:0,class:"item-view-group"},G1=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const r=z.useModelComp(z.pinia),{isEdit:n}=z.storeToRefs(r),i=ti(z.pinia),o=l,d=a,c=e.ref(""),u=e.computed(()=>d==null?void 0:d.children),y=e.computed(()=>{var O,S,E,x;return((O=d==null?void 0:d.children)==null?void 0:O.length)>0&&((S=d==null?void 0:d.children)!=null&&S.every(k=>k==null?void 0:k.layout))?(x=(E=d==null?void 0:d.children)==null?void 0:E[0])==null?void 0:x.layout:"vertical"}),b=O=>{c.value=O,o("radioChange",O)},g=e.computed(()=>{var O,S;return((S=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:S.isGridLayout)||!1}),p=e.ref((d==null?void 0:d.level)+1),D=e.computed(()=>{if(!(d!=null&&d.children)||!Array.isArray(d.children)||d.children.length<2)return!1;const O=d.children.some(E=>(E==null?void 0:E.name)==="测量系统配置表"&&(E==null?void 0:E.comp)==="ParentItem"),S=d.children.some(E=>(E==null?void 0:E.name)==="测量系统传递表"&&(E==null?void 0:E.comp)==="ParentItem");return O&&S}),m=e.computed(()=>{var S,E,x,k,_,I;let O=(S=d==null?void 0:d.children)==null?void 0:S.filter(R=>R==null?void 0:R.choice);if(i.setSelectTab((E=O==null?void 0:O[0])==null?void 0:E.choiceName),(c==null?void 0:c.value)!=="")return(x=d==null?void 0:d.children)==null?void 0:x.filter(R=>!(R!=null&&R.choiceName)||(R==null?void 0:R.choiceName)===(c==null?void 0:c.value));{let R=(_=(k=d==null?void 0:d.children)==null?void 0:k.find(ae=>ae==null?void 0:ae.choice))==null?void 0:_.choiceName;return(I=d==null?void 0:d.children)==null?void 0:I.filter(ae=>!(ae!=null&&ae.choiceName)||(ae==null?void 0:ae.choiceName)===R)}}),F=O=>{const S=(O==null?void 0:O.menuFilter)||[];return Array.isArray(S)&&(S==null?void 0:S.some(E=>{const x=typeof E=="string"?E:JSON.stringify(E);return x==null?void 0:x.includes("HideGroup=Yes")}))};e.watch(()=>d==null?void 0:d.children,()=>{D.value},{deep:!0});const C=O=>{o("rowClick",O)},L=(O,S)=>{o("routeUrl",O,S)};return(O,S)=>g.value?(e.openBlock(),e.createBlock(e.unref(_u),{key:0,layout:u.value,"onUpdate:layout":S[0]||(S[0]=E=>u.value=E),"is-draggable":e.unref(n)==="edit","is-resizable":e.unref(n)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(E,x)=>(e.openBlock(),e.createBlock(e.unref(Ro),{key:E.i,x:E.x,y:E.y,"min-h":E.minH,"max-h":E.maxH,"min-w":E.minW,w:E.w,h:E.h,i:E.i},{default:e.withCtx(()=>{var k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:x===((k=d==null?void 0:d.children)==null?void 0:k.length)-1?"0px":"24px"})},[((I=(_=E==null?void 0:E.component)==null?void 0:_.comp)==null?void 0:I.toUpperCase())!=="TABLE"&&((R=E==null?void 0:E.component)!=null&&R.name)?(e.openBlock(),e.createElementBlock("div",q1,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(p.value.toString())-1)*12+"px",fontWeight:600-(p.value-1)*100>=400?600-(p.value-1)*100:400,fontSize:17-p.value>=14?17-p.value+"px":"14px"})},e.toDisplayString((ae=E==null?void 0:E.component)==null?void 0:ae.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)((X=E==null?void 0:E.component)==null?void 0:X.comp)),{pageLayout:y.value,config:{showIndex:(me=e.unref(xr)[x])==null?void 0:me.showIndex,allowMove:(ue=e.unref(xr)[x])==null?void 0:ue.allowMove,viewport:(U=e.unref(xr)[x])==null?void 0:U.viewport,status:(W=e.unref(xr)[x])==null?void 0:W.status},related:E==null?void 0:E.relatedTables,compName:E==null?void 0:E.component.name,compNames:e.unref($c),itemData:(Z=E==null?void 0:E.component)==null?void 0:Z.compData,childItemData:(Q=E==null?void 0:E.component)==null?void 0:Q.itemChildData,key:e.unref(oi),cacheNewData:e.unref(Rc),onChange:e.unref(Mo),index:(E==null?void 0:E.id)??x,onContentChange:e.unref(Io),onPageChange:e.unref(Oo),parentTableId:(ve=E==null?void 0:E.component)==null?void 0:ve.tableId,allMapContents:e.unref(At),children:(Ae=E==null?void 0:E.component)==null?void 0:Ae.children,level:p.value,onRowClick:C,onRouteUrl:L,onClickTrigger:e.unref(Vc),onClickMainKey:e.unref(Fc),onRadioChange:b},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(m.value,(E,x)=>{var k,_;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(E==null?void 0:E.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(x)===((k=d==null?void 0:d.children)==null?void 0:k.length)-1?"0px":"24px"})},[((_=E==null?void 0:E.comp)==null?void 0:_.toUpperCase())!=="TABLE"&&E.name?(e.openBlock(),e.createElementBlock("div",W1,[F(E)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(p.value.toString())>1?"12px":"0px",fontWeight:600-(p.value-1)*100>=400?600-(p.value-1)*100:400,fontSize:17-p.value>=14?17-p.value+"px":"14px"})},e.toDisplayString(E.name),5))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)(E.comp)),{compName:E.name,groupNames:E==null?void 0:E.nameContents,config:{showIndex:E==null?void 0:E.showIndex,allowMove:E==null?void 0:E.allowMove,viewport:E==null?void 0:E.viewport,status:E==null?void 0:E.status},itemData:E==null?void 0:E.compData,related:E==null?void 0:E.relatedTables,childItemData:E==null?void 0:E.itemChildData,key:e.unref(oi),onChange:e.unref(Mo),index:(E==null?void 0:E.id)??x,onContentChange:e.unref(Io),onPageChange:e.unref(Oo),parentTableId:E==null?void 0:E.tableId,allMapContents:e.unref(At),children:E==null?void 0:E.children,level:p.value,onRowClick:C,onRouteUrl:L,onRadioChange:b},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),K1=fr._export_sfc(G1,[["__scopeId","data-v-bafbdd45"]]),Y1={class:"radio-group-container"},J1=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(),o=ti(z.pinia),{selectTab:d}=z.storeToRefs(o);e.watch(()=>r==null?void 0:r.itemData,()=>{i.value=d.value},{immediate:!0,deep:!0});const c=u=>{i.value=u,n("radioChange",i.value)};return(u,y)=>(e.openBlock(),e.createElementBlock("div",Y1,[e.createVNode(ul.ssRadio,{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=b=>i.value=b),content:r==null?void 0:r.itemData,onChange:c},null,8,["modelValue","content"])]))}}),X1=fr._export_sfc(J1,[["__scopeId","data-v-177d64c3"]]),Z1=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,()=>{var n,i;r.value=((i=(n=l==null?void 0:l.itemData)==null?void 0:n.find(o=>(o==null?void 0:o.key)==="backGround"))==null?void 0:i.contents)??[]},{deep:!0,immediate:!0}),(n,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(ul.ssCarousel,{carouselList:r.value},null,8,["carouselList"])]))}}),Q1=a=>{if(a==null||typeof a=="number"||typeof a!="string")return a;const l=a.match(/^(\d+)\_(\d+)$/);if(!l)return a;const r=Number(l[1]),n=Number(l[2]);return!Number.isFinite(r)||!Number.isFinite(n)?a:String(r*1e3+n)},uc=a=>{if(a==null)return null;const l=String(a).trim();if(!l)return null;const r=Number(l);return Number.isFinite(r)?r:null},em=a=>{if(a==null)return null;const l=String(a).trim();if(!l)return null;if(/^\d+$/.test(l)){const i=Number(l);return Number.isFinite(i)?l.length<=10?i*1e3:i:null}const r=l.includes("T")?l:l.replace(" ","T"),n=Date.parse(r);return Number.isFinite(n)?n:null},am=(a,l=[])=>{let r=Array.isArray(a)?a.slice():[];if(r.length<=1)return r;let n=new Map((l||[]).map((d,c)=>[String(d),c]));const i=r.some(d=>uc(d==null?void 0:d.sort)!==null),o=r.map((d,c)=>({r:d,idx:c,id:String((d==null?void 0:d.id)??""),sortVal:uc(d==null?void 0:d.sort),createTimeMs:em(d==null?void 0:d.create_time),prevIdx:n.has(String(d==null?void 0:d.id))?n.get(String(d==null?void 0:d.id)):Number.POSITIVE_INFINITY}));return o.sort((d,c)=>{if(i){const b=d.sortVal,g=c.sortVal;if(b===null&&g!==null)return 1;if(b!==null&&g===null)return-1;if(b!==null&&g!==null&&b!==g)return b-g}const u=d.createTimeMs,y=c.createTimeMs;return u!==null&&y!==null&&u!==y?y-u:u!==null&&y===null?-1:u===null&&y!==null?1:d.prevIdx!==c.prevIdx?d.prevIdx-c.prevIdx:d.idx-c.idx}),o.map(d=>d.r)},Su=(a,l,r=0)=>{if(r>((l==null?void 0:l.length)??""))return a;let n=l==null?void 0:l[r],i=new Map;for(const d of a){const c=d[n];i.has(c)||i.set(c,[]),i.get(c)&&i.get(c).push(d)}const o=[];for(const[d,c]of i){const[u,...y]=c,b={...u};r+1===((l==null?void 0:l.length)??"")?b.children=c==null?void 0:c.map(g=>(g.level=z.cloneDeep(r)+1,g)).filter((g,p)=>p!==0):y.length>0&&(b.children=Su(y,l,r+1)),b.level=r,o.push(b)}return o},lm=(a,l)=>{if(!l||(l==null?void 0:l.length)===0)return a;let r=[];return r=Su(a,l,0),r},rm=a=>{var y,b;let l=new Map,r=[],n=[];a==null||a.forEach(g=>{l.set(g==null?void 0:g.key,g==null?void 0:g.contents)});let i=l==null?void 0:l.get("header"),o=l==null?void 0:l.get("tableContents");if((i==null?void 0:i.length)>0){let g=[];if(Array.isArray(i==null?void 0:i[0])&&((y=i==null?void 0:i[0])!=null&&y.every(D=>!(D!=null&&D.children)))&&(i=i==null?void 0:i[0]),i.some(D=>Array.isArray(D)&&(D==null?void 0:D.find(m=>m.children))))g=(b=re.getGradeColumns(i,!0))==null?void 0:b[0];else{let D=i.some(m=>Array.isArray(m))?i==null?void 0:i[0]:i;D==null||D.forEach((m,F)=>{g.push({label:(m==null?void 0:m.label)??"",prop:(m==null?void 0:m.prop)??"a"+F,width:m!=null&&m.width?parseInt(m.width):"",fixed:(m==null?void 0:m.fixed)??void 0,sortable:(m==null?void 0:m.sortable)??!1,filterable:(m==null?void 0:m.filterable)??!1,operable:(m==null?void 0:m.operable)??!1,showSummary:(m==null?void 0:m.showSummary)??!1,align:(m==null?void 0:m.align)??"left",showOverflowTooltip:(m==null?void 0:m.showOverflowTooltip)??!0,isNotDrag:(m==null?void 0:m.isNotDrag)??!1,isEditCol:(m==null?void 0:m.isEditCol)??!1,isOperate:(m==null?void 0:m.isOperate)??!1,id:(m==null?void 0:m.id)??F,formType:(m==null?void 0:m.formType)??(m!=null&&m.groupSelect?"Select":""),disabled:m==null?void 0:m.disabled,options:(m==null?void 0:m.options)??[],value:(m==null?void 0:m.value)??"",mainKey:(m==null?void 0:m.mainKey)??F===0,allSelectionContents:(m==null?void 0:m.allContents)??[],filterContent:m==null?void 0:m.filterContents,menus:m==null?void 0:m.menus,groups:m==null?void 0:m.groups,words:m==null?void 0:m.words,filter:m==null?void 0:m.filter,bindMenus:m==null?void 0:m.bindMenus,fatherPath:m==null?void 0:m.fatherPath,isMainPath:m==null?void 0:m.isMainPath,required:(m==null?void 0:m.required)??!1,relatedContents:m==null?void 0:m.relatedContents,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords,calculatorFilter:m==null?void 0:m.calculatorFilter,relatedPages:m==null?void 0:m.relatedPages,multiple:(m==null?void 0:m.multiple)??!1,multipleLimit:m==null?void 0:m.multipleLimit})})}g=g==null?void 0:g.filter(D=>{var m;return!((m=D==null?void 0:D.filter)!=null&&m.includes("@ShowHide=Hide"))}),r=re.getNewColumnChild(g)}let d=Array.isArray(o==null?void 0:o[0])&&(o!=null&&o[0].every(g=>Array.isArray(g)))?o==null?void 0:o[0]:o;d=$t(d,[],!1);let c=[];d==null||d.forEach((g,p)=>{var m;let D={};if(D=g,Array.isArray(g)&&g.some(F=>F==null?void 0:F.id)){const F=(m=g==null?void 0:g.find(C=>C.id))==null?void 0:m.id;c.push(Object.assign(D,{id:Q1(F)}))}else D.id?c.push(D):c.push(Object.assign(D,{id:p.toString()}))});let u=am(c,[]);return n=lm(u,[]),{columns:r,tableContents:n}},nm=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,r=e.ref([]),n=e.ref(),i=e.ref([]),o=e.ref(0),d=e.ref([]),c=e.ref(300),u=e.ref(!1),y=z.useMenuState(z.pinia),{systemHeight:b}=z.storeToRefs(y),g=()=>{var m;n.value&&(c.value=Math.max(40*((m=i==null?void 0:i.value)==null?void 0:m.length),100))};e.onMounted(()=>{e.nextTick(()=>{g()})}),e.watch(()=>b.value,()=>{g(),u.value=!0},{immediate:!0,deep:!0}),e.watch(()=>l==null?void 0:l.itemData,async()=>{var F;let m=rm(l==null?void 0:l.itemData);r.value=(m==null?void 0:m.columns)??[],i.value=(m==null?void 0:m.tableContents)??[],d.value=(F=m==null?void 0:m.columns)==null?void 0:F.map(C=>C==null?void 0:C.label),o.value=o.value+1,g()},{immediate:!0,deep:!0});const p=m=>{var C,L,O,S;return m!=null&&m.column?((L=(C=m==null?void 0:m.column)==null?void 0:C.filter)==null?void 0:L.includes("@TextRGBA"))||((S=(O=m==null?void 0:m.column)==null?void 0:O.filter)==null?void 0:S.includes("@TextBackRGBA")):!1},D=m=>{var k,_,I,R,ae,X,me,ue,U,W,Z;const{row:F,column:C,item:L,slotData:O}=m;let S=F!=null&&F[C==null?void 0:C.prop]||(F==null?void 0:F[C==null?void 0:C.prop])===0?((_=(k=F==null?void 0:F[C==null?void 0:C.prop])==null?void 0:k[0])==null?void 0:_.contents)??((F==null?void 0:F[C==null?void 0:C.prop])===0?"0":F==null?void 0:F[C==null?void 0:C.prop]):((R=(I=F==null?void 0:F[L==null?void 0:L.prop])==null?void 0:I[0])==null?void 0:R.contents)??(F==null?void 0:F[L==null?void 0:L.prop])??((X=(ae=O==null?void 0:O[L==null?void 0:L.prop])==null?void 0:ae[0])==null?void 0:X.contents)??(O==null?void 0:O[L==null?void 0:L.prop])??((U=(ue=F==null?void 0:F[(me=L==null?void 0:L.child)==null?void 0:me.prop])==null?void 0:ue[0])==null?void 0:U.contents)??(F==null?void 0:F[(W=L==null?void 0:L.child)==null?void 0:W.prop]),x=Array.isArray(S)&&!(S!=null&&S.every(Q=>typeof Q=="string"||typeof Q=="number"))?"查看":S;if(x=Array.isArray(x)?x.join(","):x,(C==null?void 0:C.formType)==="Date")if(!x||x===""||x===null||x===void 0)x="";else{const Q=z.dayjs(x,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);x=Q.isValid()?Q.format("YYYYMMDD"):x??""}return Array.isArray(C==null?void 0:C.relatedPages)&&((Z=C==null?void 0:C.relatedPages)==null?void 0:Z.length)>0&&(x="详情页"),x};return(m,F)=>{var C;return e.openBlock(),e.createElementBlock("div",{class:"seamless-table",ref_key:"containerRef",ref:n},[((C=r.value)==null?void 0:C.length)>0?(e.openBlock(),e.createBlock(ul.ssTable,{key:o.value+JSON.stringify(r.value),columns:r.value,tableData:[],isShowPagination:!1,showIndex:!1,isCardViewport:!1,checkedColumns:d.value,canAddOrDeleteRow:!1,isShowEdit:!1,isShowDelete:!1,allowSelect:!1,allowRowAddOrDelete:!1,hideHeaderContent:!0,class:"table-header"},null,8,["columns","checkedColumns"])):e.createCommentVNode("",!0),u.value&&i.value.length>0?(e.openBlock(),e.createBlock(e.unref(rd.Vue3SeamlessScroll),{list:i.value,visibleCount:5,limitMoveNum:5,step:.5,hover:!0,class:"table-content",key:"scroll-"+o.value,style:e.normalizeStyle({height:c.value+"px"})},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(ul.ssTable,{key:o.value+JSON.stringify(r.value),columns:r.value,tableData:i.value,isShowPagination:!1,showIndex:!1,isCardViewport:!1,checkedColumns:d.value,canAddOrDeleteRow:!1,isShowEdit:!1,isShowDelete:!1,allowSelect:!1,allowRowAddOrDelete:!1,hideHeaderContent:!0},{content:e.withCtx(L=>{var O,S,E,x,k,_,I,R,ae,X,me,ue,U,W,Z,Q,ve,Ae;return[p(L)?(e.openBlock(),e.createBlock(hc,{key:0,value:D(L),columnContent:L==null?void 0:L.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(D(L))&&((S=(O=D(L))==null?void 0:O.toString())!=null&&S.includes(".txt")||(x=(E=D(L))==null?void 0:E.toString())!=null&&x.includes(".cpt")||(_=(k=D(L))==null?void 0:k.toString())!=null&&_.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(D(L))&&((R=(I=D(L))==null?void 0:I.toString())!=null&&R.includes(".txt")||(X=(ae=D(L))==null?void 0:ae.toString())!=null&&X.includes(".cpt")||(ue=(me=D(L))==null?void 0:me.toString())!=null&&ue.includes(".cyd"))?"underline":"",cursor:!Array.isArray(D(L))&&((W=(U=D(L))==null?void 0:U.toString())!=null&&W.includes(".txt")||(Q=(Z=D(L))==null?void 0:Z.toString())!=null&&Q.includes(".cpt")||(Ae=(ve=D(L))==null?void 0:ve.toString())!=null&&Ae.includes(".cyd"))?"pointer":"",marginLeft:(L==null?void 0:L.colIndex)===0?`${((L==null?void 0:L.level)??0)*20}px`:0})},e.toDisplayString(D(L)===0?"0":D(L)),5))]}),_:1},8,["columns","tableData","checkedColumns"]))]),_:1},8,["list","style"])):e.createCommentVNode("",!0)],512)}}}),im=fr._export_sfc(nm,[["__scopeId","data-v-3849a6ed"]]),Eu=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"}]),om={TABLE:Yc,FORM:Ls,STATICFORM:Jc,TABLEOPERATE:P6,TABLESTYLE:i4,TABLEEXTEND:t4,TABLEINTERACTION:u4,FORMOPERATE:Rs,FOLD:F4,CALCULATOR:W4,METHODBUTTON:Y4,AVATARUPLOAD:vs.ssAvatar,SIGNATURE:vs.ssSignature,FORMTOP:Ls,STEP:t2,STEPOPERATE:A4,TIMELINE:f2,TIMELINEOPERATE:R4,FORMTOPOPERATE:Rs,SIGNATUREOPERATE:n2,AVATARUPLOADOPERATE:Z4,TABS:m2,TABSOPERATE:av,CHART:mv,CHARTOPERATE:Dv,LAYOUT:Nv,LAYOUTOPERATE:Vv,PARENTITEM:K1,RADIO:X1,CAROUSEL:Z1,SEAMSCROLL:im};function $i(a){return om[a==null?void 0:a.toUpperCase()]||null}exports.De=_u;exports.activeStepInfo=Mi;exports.addContents=Qi;exports.addVisibleDialog=Ft;exports.affixItems=h3;exports.allMapContents=At;exports.analyzeMenu=yc;exports.cacheNewData=Rc;exports.clickMainKey=Fc;exports.clickSavePage=f3;exports.clickStep=jc;exports.clickTrigger=Vc;exports.compId=oi;exports.compNames=$c;exports.compShow=Ri;exports.existLayouts=w3;exports.fixChangeValue=Vo;exports.generateLayouts=Z6;exports.getComponent=$i;exports.getComponents=eo;exports.getPageConstruct=gp;exports.getPageData=qr;exports.getSliceContLength=T3;exports.gridRowHeight=W6;exports.gridRowHeightHmPg=au;exports.isStepLayout=Hc;exports.newGenerateLayouts=a4;exports.onBack=d3;exports.onButtonChange=g3;exports.onChange=Mo;exports.onClick=p3;exports.onClickStep=_3;exports.onContentChange=Io;exports.onExtendTaskEnd=x3;exports.onOk=b3;exports.onPageBack=E3;exports.onPageChange=Oo;exports.onSelectFixContent=u3;exports.renderShowItems=Oc;exports.showItems=xr;exports.sliceTableLength=Lc;exports.slotContent=Eu;exports.ssTable=Yc;exports.st=Ro;exports.stepItems=B3;exports.tabChange=S3;exports.toolBar=k3;exports.useFormComp=Vt;exports.useModelLoader=s0;exports.verifyButton=C3;
|