index.5e96257d.js 140 KB

12345678910111213141516171819202122232425
  1. import{d as we,e as We,f as El,c as S,a as x,w as De,o as w,g as M,h as Ee,i as Pe,b as o,j as a,u as $t,k as fe,E as ae,l as st,r as U,m as J,p as at,n as Y,F as te,q as pe,s as j,t as Le,v as it,x as rt,y as me,z as Fl,A as le,B as Cl,C as el,D as vt,G as wl,H as tl,I as _e,J as Dt,K as xl,L as dt,M as wt,N as Rt,O as Vl,P as qe,Q as Bl}from"./index.0a536df3.js";import{M as Al,t as Je,f as _l,a as Nl,b as kl,c as Tl,d as Il,s as $l,e as Dl,g as Sl,h as Ol,i as Ul,j as Pl,k as Rl,r as Ml,l as Ye,m as zl,p as Ll,n as Jl,o as jl,q as Mt,u as Ge,_ as xt,v as ve,w as ft,x as ct,y as zt}from"./lodash.12932064.js";import{_ as Ve}from"./plugin-vue_export-helper.f63bf49c.js";function Kl(t){return{all:t=t||new Map,on:function(e,l){var s=t.get(e);s?s.push(l):t.set(e,[l])},off:function(e,l){var s=t.get(e);s&&(l?s.splice(s.indexOf(l)>>>0,1):t.set(e,[]))},emit:function(e,l){var s=t.get(e);s&&s.slice().map(function(u){u(l)}),(s=t.get("*"))&&s.slice().map(function(u){u(e,l)})}}}const Xe=Kl();const Gl=we({__name:"topology",setup(t){let e=null;return Xe.on("render",l=>{try{e.open(l?JSON.parse(l):null)}catch{e.open()}}),We(()=>{e=new Al("topology",{...Je}),e.register(_l()),e.registerAnchors(Nl()),e.register(kl()),e.registerCanvasDraw(Tl()),e.register(Il()),e.register($l()),e.registerCanvasDraw(Dl()),e.registerCanvasDraw(Sl()),e.registerCanvasDraw(Ol()),e.register(Ul()),e.registerCanvasDraw(Pl()),e.registerAnchors(Rl()),Ml(),e.open()}),El(()=>{e&&e.destroy()}),(l,s)=>(w(),S("div",{onContextmenu:s[0]||(s[0]=De(()=>{},["prevent"])),class:"topology-wrapper"},[...s[1]||(s[1]=[x("div",{id:"topology"},null,-1)])],32))}}),Yl=Ve(Gl,[["__scopeId","data-v-4f7cf136"]]);function Xl(t,e="img.png"){const l=t.split(","),s=l[0].match(/:(.*?);/)[1],u=atob(l[1]);let r=u.length;const f=new Uint8Array(r);for(;r--;)f[r]=u.charCodeAt(r);return new File([f],e,{type:s})}function ll(t){const e=new FormData;return Object.keys(t).forEach(l=>{e.append(l,t[l])}),e}var St={},et={};(function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",l=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s="["+e+"]["+l+"]*",u=new RegExp("^"+s+"$"),r=function(g,c){const v=[];let b=c.exec(g);for(;b;){const C=[];C.startIndex=c.lastIndex-b[0].length;const d=b.length;for(let P=0;P<d;P++)C.push(b[P]);v.push(C),b=c.exec(g)}return v},f=function(g){const c=u.exec(g);return!(c===null||typeof c>"u")};t.isExist=function(g){return typeof g<"u"},t.isEmptyObject=function(g){return Object.keys(g).length===0},t.merge=function(g,c,v){if(c){const b=Object.keys(c),C=b.length;for(let d=0;d<C;d++)v==="strict"?g[b[d]]=[c[b[d]]]:g[b[d]]=c[b[d]]}},t.getValue=function(g){return t.isExist(g)?g:""};const m=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],p=["__proto__","constructor","prototype"];t.isName=f,t.getAllMatches=r,t.nameRegexp=s,t.DANGEROUS_PROPERTY_NAMES=m,t.criticalProperties=p})(et);const Ot=et,Wl={allowBooleanAttributes:!1,unpairedTags:[]};St.validate=function(t,e){e=Object.assign({},Wl,e);const l=[];let s=!1,u=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let r=0;r<t.length;r++)if(t[r]==="<"&&t[r+1]==="?"){if(r+=2,r=Jt(t,r),r.err)return r}else if(t[r]==="<"){let f=r;if(r++,t[r]==="!"){r=jt(t,r);continue}else{let m=!1;t[r]==="/"&&(m=!0,r++);let p="";for(;r<t.length&&t[r]!==">"&&t[r]!==" "&&t[r]!==" "&&t[r]!==`
  2. `&&t[r]!=="\r";r++)p+=t[r];if(p=p.trim(),p[p.length-1]==="/"&&(p=p.substring(0,p.length-1),r--),!nn(p)){let v;return p.trim().length===0?v="Invalid space after '<'.":v="Tag '"+p+"' is an invalid name.",de("InvalidTag",v,ye(t,r))}const g=Zl(t,r);if(g===!1)return de("InvalidAttr","Attributes for '"+p+"' have open quote.",ye(t,r));let c=g.value;if(r=g.index,c[c.length-1]==="/"){const v=r-c.length;c=c.substring(0,c.length-1);const b=Kt(c,e);if(b===!0)s=!0;else return de(b.err.code,b.err.msg,ye(t,v+b.err.line))}else if(m)if(g.tagClosed){if(c.trim().length>0)return de("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",ye(t,f));if(l.length===0)return de("InvalidTag","Closing tag '"+p+"' has not been opened.",ye(t,f));{const v=l.pop();if(p!==v.tagName){let b=ye(t,v.tagStartPos);return de("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+b.line+", col "+b.col+") instead of closing tag '"+p+"'.",ye(t,f))}l.length==0&&(u=!0)}}else return de("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",ye(t,r));else{const v=Kt(c,e);if(v!==!0)return de(v.err.code,v.err.msg,ye(t,r-c.length+v.err.line));if(u===!0)return de("InvalidXml","Multiple possible root nodes found.",ye(t,r));e.unpairedTags.indexOf(p)!==-1||l.push({tagName:p,tagStartPos:f}),s=!0}for(r++;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="!"){r++,r=jt(t,r);continue}else if(t[r+1]==="?"){if(r=Jt(t,++r),r.err)return r}else break;else if(t[r]==="&"){const v=tn(t,r);if(v==-1)return de("InvalidChar","char '&' is not expected.",ye(t,r));r=v}else if(u===!0&&!Lt(t[r]))return de("InvalidXml","Extra text at the end",ye(t,r));t[r]==="<"&&r--}}else{if(Lt(t[r]))continue;return de("InvalidChar","char '"+t[r]+"' is not expected.",ye(t,r))}if(s){if(l.length==1)return de("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",ye(t,l[0].tagStartPos));if(l.length>0)return de("InvalidXml","Invalid '"+JSON.stringify(l.map(r=>r.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return de("InvalidXml","Start tag expected.",1);return!0};function Lt(t){return t===" "||t===" "||t===`
  3. `||t==="\r"}function Jt(t,e){const l=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){const s=t.substr(l,e-l);if(e>5&&s==="xml")return de("InvalidXml","XML declaration allowed only at the start of the document.",ye(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function jt(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let l=1;for(e+=8;e<t.length;e++)if(t[e]==="<")l++;else if(t[e]===">"&&(l--,l===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}const Hl='"',ql="'";function Zl(t,e){let l="",s="",u=!1;for(;e<t.length;e++){if(t[e]===Hl||t[e]===ql)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){u=!0;break}l+=t[e]}return s!==""?!1:{value:l,index:e,tagClosed:u}}const Ql=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Kt(t,e){const l=Ot.getAllMatches(t,Ql),s={};for(let u=0;u<l.length;u++){if(l[u][1].length===0)return de("InvalidAttr","Attribute '"+l[u][2]+"' has no space in starting.",Ze(l[u]));if(l[u][3]!==void 0&&l[u][4]===void 0)return de("InvalidAttr","Attribute '"+l[u][2]+"' is without value.",Ze(l[u]));if(l[u][3]===void 0&&!e.allowBooleanAttributes)return de("InvalidAttr","boolean attribute '"+l[u][2]+"' is not allowed.",Ze(l[u]));const r=l[u][2];if(!ln(r))return de("InvalidAttr","Attribute '"+r+"' is an invalid name.",Ze(l[u]));if(!s.hasOwnProperty(r))s[r]=1;else return de("InvalidAttr","Attribute '"+r+"' is repeated.",Ze(l[u]))}return!0}function en(t,e){let l=/\d/;for(t[e]==="x"&&(e++,l=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(l))break}return-1}function tn(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,en(t,e);let l=0;for(;e<t.length;e++,l++)if(!(t[e].match(/\w/)&&l<20)){if(t[e]===";")break;return-1}return e}function de(t,e,l){return{err:{code:t,msg:e,line:l.line||l,col:l.col}}}function ln(t){return Ot.isName(t)}function nn(t){return Ot.isName(t)}function ye(t,e){const l=t.substring(0,e).split(/\r?\n/);return{line:l.length,col:l[l.length-1].length+1}}function Ze(t){return t.startIndex+t[1].length}var Ut={};const{DANGEROUS_PROPERTY_NAMES:nl,criticalProperties:on}=et,ol=t=>nl.includes(t)?"__"+t:t,ul={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,l){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,onDangerousProperty:ol};function un(t,e){if(typeof t!="string")return;const l=t.toLowerCase();if(nl.some(s=>l===s.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(on.some(s=>l===s.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}function sl(t){var e,l,s,u,r,f,m;return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:Math.max(1,(e=t.maxEntitySize)!=null?e:1e4),maxExpansionDepth:Math.max(1,(l=t.maxExpansionDepth)!=null?l:1e4),maxTotalExpansions:Math.max(1,(s=t.maxTotalExpansions)!=null?s:1/0),maxExpandedLength:Math.max(1,(u=t.maxExpandedLength)!=null?u:1e5),maxEntityCount:Math.max(1,(r=t.maxEntityCount)!=null?r:1e3),allowedTags:(f=t.allowedTags)!=null?f:null,tagFilter:(m=t.tagFilter)!=null?m:null}:sl(!0)}const sn=function(t){const e=Object.assign({},ul,t),l=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(const{value:s,name:u}of l)s&&un(s,u);return e.onDangerousProperty===null&&(e.onDangerousProperty=ol),e.processEntities=sl(e.processEntities),e};Ut.buildOptions=sn;Ut.defaultOptions=ul;class an{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,l){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:l})}addChild(e){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,[":@"]:e[":@"]}):this.child.push({[e.tagname]:e.child})}}var rn=an;const al=et;class dn{constructor(e){this.suppressValidationErr=!e,this.options=e||{}}readDocType(e,l){const s=Object.create(null);let u=0;if(e[l+3]==="O"&&e[l+4]==="C"&&e[l+5]==="T"&&e[l+6]==="Y"&&e[l+7]==="P"&&e[l+8]==="E"){l=l+9;let r=1,f=!1,m=!1,p="";for(;l<e.length;l++)if(e[l]==="<"&&!m){if(f&&Me(e,"!ENTITY",l)){l+=7;let g,c;if([g,c,l]=this.readEntityExp(e,l+1,this.suppressValidationErr),c.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&u>=this.options.maxEntityCount)throw new Error(`Entity count (${u+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);const v=g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");s[g]={regx:RegExp(`&${v};`,"g"),val:c},u++}}else if(f&&Me(e,"!ELEMENT",l)){l+=8;const{index:g}=this.readElementExp(e,l+1);l=g}else if(f&&Me(e,"!ATTLIST",l))l+=8;else if(f&&Me(e,"!NOTATION",l)){l+=9;const{index:g}=this.readNotationExp(e,l+1,this.suppressValidationErr);l=g}else if(Me(e,"!--",l))m=!0;else throw new Error("Invalid DOCTYPE");r++,p=""}else if(e[l]===">"){if(m?e[l-1]==="-"&&e[l-2]==="-"&&(m=!1,r--):r--,r===0)break}else e[l]==="["?f=!0:p+=e[l];if(r!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:s,i:l}}readEntityExp(e,l){l=be(e,l);let s="";for(;l<e.length&&!/\s/.test(e[l])&&e[l]!=='"'&&e[l]!=="'";)s+=e[l],l++;if(Qe(s),l=be(e,l),!this.suppressValidationErr){if(e.substring(l,l+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[l]==="%")throw new Error("Parameter entities are not supported")}let u="";if([l,u]=this.readIdentifierVal(e,l,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&u.length>this.options.maxEntitySize)throw new Error(`Entity "${s}" size (${u.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return l--,[s,u,l]}readNotationExp(e,l){l=be(e,l);let s="";for(;l<e.length&&!/\s/.test(e[l]);)s+=e[l],l++;!this.suppressValidationErr&&Qe(s),l=be(e,l);const u=e.substring(l,l+6).toUpperCase();if(!this.suppressValidationErr&&u!=="SYSTEM"&&u!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${u}"`);l+=u.length,l=be(e,l);let r=null,f=null;if(u==="PUBLIC")[l,r]=this.readIdentifierVal(e,l,"publicIdentifier"),l=be(e,l),(e[l]==='"'||e[l]==="'")&&([l,f]=this.readIdentifierVal(e,l,"systemIdentifier"));else if(u==="SYSTEM"&&([l,f]=this.readIdentifierVal(e,l,"systemIdentifier"),!this.suppressValidationErr&&!f))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:s,publicIdentifier:r,systemIdentifier:f,index:--l}}readIdentifierVal(e,l,s){let u="";const r=e[l];if(r!=='"'&&r!=="'")throw new Error(`Expected quoted string, found "${r}"`);for(l++;l<e.length&&e[l]!==r;)u+=e[l],l++;if(e[l]!==r)throw new Error(`Unterminated ${s} value`);return l++,[l,u]}readElementExp(e,l){l=be(e,l);let s="";for(;l<e.length&&!/\s/.test(e[l]);)s+=e[l],l++;if(!this.suppressValidationErr&&!al.isName(s))throw new Error(`Invalid element name: "${s}"`);l=be(e,l);let u="";if(e[l]==="E"&&Me(e,"MPTY",l))l+=4;else if(e[l]==="A"&&Me(e,"NY",l))l+=2;else if(e[l]==="("){for(l++;l<e.length&&e[l]!==")";)u+=e[l],l++;if(e[l]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[l]}"`);return{elementName:s,contentModel:u.trim(),index:l}}readAttlistExp(e,l){l=be(e,l);let s="";for(;l<e.length&&!/\s/.test(e[l]);)s+=e[l],l++;Qe(s),l=be(e,l);let u="";for(;l<e.length&&!/\s/.test(e[l]);)u+=e[l],l++;if(!Qe(u))throw new Error(`Invalid attribute name: "${u}"`);l=be(e,l);let r="";if(e.substring(l,l+8).toUpperCase()==="NOTATION"){if(r="NOTATION",l+=8,l=be(e,l),e[l]!=="(")throw new Error(`Expected '(', found "${e[l]}"`);l++;let m=[];for(;l<e.length&&e[l]!==")";){let p="";for(;l<e.length&&e[l]!=="|"&&e[l]!==")";)p+=e[l],l++;if(p=p.trim(),!Qe(p))throw new Error(`Invalid notation name: "${p}"`);m.push(p),e[l]==="|"&&(l++,l=be(e,l))}if(e[l]!==")")throw new Error("Unterminated list of notations");l++,r+=" ("+m.join("|")+")"}else{for(;l<e.length&&!/\s/.test(e[l]);)r+=e[l],l++;const m=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!m.includes(r.toUpperCase()))throw new Error(`Invalid attribute type: "${r}"`)}l=be(e,l);let f="";return e.substring(l,l+8).toUpperCase()==="#REQUIRED"?(f="#REQUIRED",l+=8):e.substring(l,l+7).toUpperCase()==="#IMPLIED"?(f="#IMPLIED",l+=7):[l,f]=this.readIdentifierVal(e,l,"ATTLIST"),{elementName:s,attributeName:u,attributeType:r,defaultValue:f,index:l}}}const be=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function Me(t,e,l){for(let s=0;s<e.length;s++)if(e[s]!==t[l+s+1])return!1;return!0}function Qe(t){if(al.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}var fn=dn;const pn=/^[-+]?0x[a-fA-F0-9]+$/,mn=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const cn={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function gn(t,e={}){if(e=Object.assign({},cn,e),!t||typeof t!="string")return t;let l=t.trim();if(e.skipLike!==void 0&&e.skipLike.test(l))return t;if(e.hex&&pn.test(l))return Number.parseInt(l,16);{const s=mn.exec(l);if(s){const u=s[1],r=s[2];let f=vn(s[3]);const m=s[4]||s[6];if(!e.leadingZeros&&r.length>0&&u&&l[2]!==".")return t;if(!e.leadingZeros&&r.length>0&&!u&&l[1]!==".")return t;{const p=Number(l),g=""+p;return g.search(/[eE]/)!==-1||m?e.eNotation?p:t:l.indexOf(".")!==-1?g==="0"&&f===""||g===f||u&&g==="-"+f?p:t:r?f===g||u+f===g?p:t:l===g||l===u+g?p:t}}else return t}}function vn(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substr(0,t.length-1))),t}var hn=gn;function yn(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const l of t)if(typeof l=="string"&&e===l||l instanceof RegExp&&l.test(e))return!0}:()=>!1}var il=yn;const gt=et,Ke=rn,bn=fn,En=hn,Fn=il;class Cn{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(l,s)=>Gt(s,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(l,s)=>Gt(s,16,"&#x")}},this.addExternalEntities=wn,this.parseXml=_n,this.parseTextData=xn,this.resolveNameSpace=Vn,this.buildAttributesMap=An,this.isItStopNode=In,this.replaceEntitiesValue=kn,this.readStopNodeData=Dn,this.saveTextToParentTag=Tn,this.addChild=Nn,this.ignoreAttributesFn=Fn(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let l=0;l<this.options.stopNodes.length;l++){const s=this.options.stopNodes[l];typeof s=="string"&&(s.startsWith("*.")?this.stopNodesWildcard.add(s.substring(2)):this.stopNodesExact.add(s))}}}}function wn(t){const e=Object.keys(t);for(let l=0;l<e.length;l++){const s=e[l],u=s.replace(/[.\-+*:]/g,"\\.");this.lastEntities[s]={regex:new RegExp("&"+u+";","g"),val:t[s]}}}function xn(t,e,l,s,u,r,f){if(t!==void 0&&(this.options.trimValues&&!s&&(t=t.trim()),t.length>0)){f||(t=this.replaceEntitiesValue(t,e,l));const m=this.options.tagValueProcessor(e,t,l,u,r);return m==null?t:typeof m!=typeof t||m!==t?m:this.options.trimValues?_t(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?_t(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Vn(t){if(this.options.removeNSPrefix){const e=t.split(":"),l=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=l+e[1])}return t}const Bn=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function An(t,e,l){if(this.options.ignoreAttributes!==!0&&typeof t=="string"){const s=gt.getAllMatches(t,Bn),u=s.length,r={};for(let f=0;f<u;f++){const m=this.resolveNameSpace(s[f][1]);if(this.ignoreAttributesFn(m,e))continue;let p=s[f][4],g=this.options.attributeNamePrefix+m;if(m.length)if(this.options.transformAttributeName&&(g=this.options.transformAttributeName(g)),g=Sn(g,this.options),p!==void 0){this.options.trimValues&&(p=p.trim()),p=this.replaceEntitiesValue(p,l,e);const c=this.options.attributeValueProcessor(m,p,e);c==null?r[g]=p:typeof c!=typeof p||c!==p?r[g]=c:r[g]=_t(p,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[g]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const f={};return f[this.options.attributesGroupName]=r,f}return r}}const _n=function(t){t=t.replace(/\r\n?/g,`
  4. `);const e=new Ke("!xml");let l=e,s="",u="";this.entityExpansionCount=0,this.currentExpandedLength=0;const r=new bn(this.options.processEntities);for(let f=0;f<t.length;f++)if(t[f]==="<")if(t[f+1]==="/"){const p=ze(t,">",f,"Closing Tag is not closed.");let g=t.substring(f+2,p).trim();if(this.options.removeNSPrefix){const b=g.indexOf(":");b!==-1&&(g=g.substr(b+1))}this.options.transformTagName&&(g=this.options.transformTagName(g)),l&&(s=this.saveTextToParentTag(s,l,u));const c=u.substring(u.lastIndexOf(".")+1);if(g&&this.options.unpairedTags.indexOf(g)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${g}>`);let v=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(v=u.lastIndexOf(".",u.lastIndexOf(".")-1),this.tagsNodeStack.pop()):v=u.lastIndexOf("."),u=u.substring(0,v),l=this.tagsNodeStack.pop(),s="",f=p}else if(t[f+1]==="?"){let p=At(t,f,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,l,u),!(this.options.ignoreDeclaration&&p.tagName==="?xml"||this.options.ignorePiTags)){const g=new Ke(p.tagName);g.add(this.options.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&(g[":@"]=this.buildAttributesMap(p.tagExp,u,p.tagName)),this.addChild(l,g,u,f)}f=p.closeIndex+1}else if(t.substr(f+1,3)==="!--"){const p=ze(t,"-->",f+4,"Comment is not closed.");if(this.options.commentPropName){const g=t.substring(f+4,p-2);s=this.saveTextToParentTag(s,l,u),l.add(this.options.commentPropName,[{[this.options.textNodeName]:g}])}f=p}else if(t.substr(f+1,2)==="!D"){const p=r.readDocType(t,f);this.docTypeEntities=p.entities,f=p.i}else if(t.substr(f+1,2)==="!["){const p=ze(t,"]]>",f,"CDATA is not closed.")-2,g=t.substring(f+9,p);s=this.saveTextToParentTag(s,l,u);let c=this.parseTextData(g,l.tagname,u,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?l.add(this.options.cdataPropName,[{[this.options.textNodeName]:g}]):l.add(this.options.textNodeName,c),f=p+2}else{let p=At(t,f,this.options.removeNSPrefix),g=p.tagName;const c=p.rawTagName;let v=p.tagExp,b=p.attrExpPresent,C=p.closeIndex;if(this.options.transformTagName){const k=this.options.transformTagName(g);v===g&&(v=k),g=k}if(this.options.strictReservedNames&&(g===this.options.commentPropName||g===this.options.cdataPropName||g===this.options.textNodeName||g===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${g}`);l&&s&&l.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,l,u,!1));const d=l;d&&this.options.unpairedTags.indexOf(d.tagname)!==-1&&(l=this.tagsNodeStack.pop(),u=u.substring(0,u.lastIndexOf("."))),g!==e.tagname&&(u+=u?"."+g:g);const P=f;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,u,g)){let k="";if(v.length>0&&v.lastIndexOf("/")===v.length-1)g[g.length-1]==="/"?(g=g.substr(0,g.length-1),u=u.substr(0,u.length-1),v=g):v=v.substr(0,v.length-1),f=p.closeIndex;else if(this.options.unpairedTags.indexOf(g)!==-1)f=p.closeIndex;else{const N=this.readStopNodeData(t,c,C+1);if(!N)throw new Error(`Unexpected end of ${c}`);f=N.i,k=N.tagContent}const I=new Ke(g);g!==v&&b&&(I[":@"]=this.buildAttributesMap(v,u,g)),k&&(k=this.parseTextData(k,g,u,!0,b,!0,!0)),u=u.substr(0,u.lastIndexOf(".")),I.add(this.options.textNodeName,k),this.addChild(l,I,u,P)}else{if(v.length>0&&v.lastIndexOf("/")===v.length-1){if(g[g.length-1]==="/"?(g=g.substr(0,g.length-1),u=u.substr(0,u.length-1),v=g):v=v.substr(0,v.length-1),this.options.transformTagName){const I=this.options.transformTagName(g);v===g&&(v=I),g=I}const k=new Ke(g);g!==v&&b&&(k[":@"]=this.buildAttributesMap(v,u,g)),this.addChild(l,k,u,P),u=u.substr(0,u.lastIndexOf("."))}else if(this.options.unpairedTags.indexOf(g)!==-1){const k=new Ke(g);g!==v&&b&&(k[":@"]=this.buildAttributesMap(v,u)),this.addChild(l,k,u,P),u=u.substr(0,u.lastIndexOf(".")),f=p.closeIndex;continue}else{const k=new Ke(g);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(l),g!==v&&b&&(k[":@"]=this.buildAttributesMap(v,u,g)),this.addChild(l,k,u),l=k}s="",f=C}}else s+=t[f];return e.child};function Nn(t,e,l,s){this.options.captureMetaData||(s=void 0);const u=this.options.updateTag(e.tagname,l,e[":@"]);u===!1||(typeof u=="string"&&(e.tagname=u),t.addChild(e,s))}const kn=function(t,e,l){if(t.indexOf("&")===-1)return t;const s=this.options.processEntities;if(!s.enabled||s.allowedTags&&!s.allowedTags.includes(e)||s.tagFilter&&!s.tagFilter(e,l))return t;for(let u in this.docTypeEntities){const r=this.docTypeEntities[u],f=t.match(r.regx);if(f){if(this.entityExpansionCount+=f.length,s.maxTotalExpansions&&this.entityExpansionCount>s.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${s.maxTotalExpansions}`);const m=t.length;if(t=t.replace(r.regx,r.val),s.maxExpandedLength&&(this.currentExpandedLength+=t.length-m,this.currentExpandedLength>s.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${s.maxExpandedLength}`)}}if(t.indexOf("&")===-1)return t;for(const u of Object.keys(this.lastEntities)){const r=this.lastEntities[u],f=t.match(r.regex);if(f&&(this.entityExpansionCount+=f.length,s.maxTotalExpansions&&this.entityExpansionCount>s.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${s.maxTotalExpansions}`);t=t.replace(r.regex,r.val)}if(t.indexOf("&")===-1)return t;if(this.options.htmlEntities)for(const u of Object.keys(this.htmlEntities)){const r=this.htmlEntities[u],f=t.match(r.regex);if(f&&(this.entityExpansionCount+=f.length,s.maxTotalExpansions&&this.entityExpansionCount>s.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${s.maxTotalExpansions}`);t=t.replace(r.regex,r.val)}return t=t.replace(this.ampEntity.regex,this.ampEntity.val),t};function Tn(t,e,l,s){return t&&(s===void 0&&(s=e.child.length===0),t=this.parseTextData(t,e.tagname,l,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,s),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function In(t,e,l,s){return!!(e&&e.has(s)||t&&t.has(l))}function $n(t,e,l=">"){let s,u="";for(let r=e;r<t.length;r++){let f=t[r];if(s)f===s&&(s="");else if(f==='"'||f==="'")s=f;else if(f===l[0])if(l[1]){if(t[r+1]===l[1])return{data:u,index:r}}else return{data:u,index:r};else f===" "&&(f=" ");u+=f}}function ze(t,e,l,s){const u=t.indexOf(e,l);if(u===-1)throw new Error(s);return u+e.length-1}function At(t,e,l,s=">"){const u=$n(t,e+1,s);if(!u)return;let r=u.data;const f=u.index,m=r.search(/\s/);let p=r,g=!0;m!==-1&&(p=r.substring(0,m),r=r.substring(m+1).trimStart());const c=p;if(l){const v=p.indexOf(":");v!==-1&&(p=p.substr(v+1),g=p!==u.data.substr(v+1))}return{tagName:p,tagExp:r,closeIndex:f,attrExpPresent:g,rawTagName:c}}function Dn(t,e,l){const s=l;let u=1;for(;l<t.length;l++)if(t[l]==="<")if(t[l+1]==="/"){const r=ze(t,">",l,`${e} is not closed`);if(t.substring(l+2,r).trim()===e&&(u--,u===0))return{tagContent:t.substring(s,l),i:r};l=r}else if(t[l+1]==="?")l=ze(t,"?>",l+1,"StopNode is not closed.");else if(t.substr(l+1,3)==="!--")l=ze(t,"-->",l+3,"StopNode is not closed.");else if(t.substr(l+1,2)==="![")l=ze(t,"]]>",l,"StopNode is not closed.")-2;else{const r=At(t,l,">");r&&((r&&r.tagName)===e&&r.tagExp[r.tagExp.length-1]!=="/"&&u++,l=r.closeIndex)}}function _t(t,e,l){if(e&&typeof t=="string"){const s=t.trim();return s==="true"?!0:s==="false"?!1:En(t,l)}else return gt.isExist(t)?t:""}function Gt(t,e,l){const s=Number.parseInt(t,e);return s>=0&&s<=1114111?String.fromCodePoint(s):l+t+";"}function Sn(t,e){if(gt.criticalProperties.includes(t))throw new Error(`[SECURITY] Invalid name: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);return gt.DANGEROUS_PROPERTY_NAMES.includes(t)?e.onDangerousProperty(t):t}var On=Cn,rl={};function Un(t,e){return dl(t,e)}function dl(t,e,l){let s;const u={};for(let r=0;r<t.length;r++){const f=t[r],m=Pn(f);let p="";if(l===void 0?p=m:p=l+"."+m,m===e.textNodeName)s===void 0?s=f[m]:s+=""+f[m];else{if(m===void 0)continue;if(f[m]){let g=dl(f[m],e,p);const c=Mn(g,e);f[":@"]?Rn(g,f[":@"],p,e):Object.keys(g).length===1&&g[e.textNodeName]!==void 0&&!e.alwaysCreateTextNode?g=g[e.textNodeName]:Object.keys(g).length===0&&(e.alwaysCreateTextNode?g[e.textNodeName]="":g=""),u[m]!==void 0&&u.hasOwnProperty(m)?(Array.isArray(u[m])||(u[m]=[u[m]]),u[m].push(g)):e.isArray(m,p,c)?u[m]=[g]:u[m]=g}}}return typeof s=="string"?s.length>0&&(u[e.textNodeName]=s):s!==void 0&&(u[e.textNodeName]=s),u}function Pn(t){const e=Object.keys(t);for(let l=0;l<e.length;l++){const s=e[l];if(s!==":@")return s}}function Rn(t,e,l,s){if(e){const u=Object.keys(e),r=u.length;for(let f=0;f<r;f++){const m=u[f];s.isArray(m,l+"."+m,!0,!0)?t[m]=[e[m]]:t[m]=e[m]}}}function Mn(t,e){const{textNodeName:l}=e,s=Object.keys(t).length;return!!(s===0||s===1&&(t[l]||typeof t[l]=="boolean"||t[l]===0))}rl.prettify=Un;const{buildOptions:zn}=Ut,Ln=On,{prettify:Jn}=rl,jn=St;class Kn{constructor(e){this.externalEntities={},this.options=zn(e)}parse(e,l){if(typeof e!="string")if(e.toString)e=e.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(l){l===!0&&(l={});const r=jn.validate(e,l);if(r!==!0)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const s=new Ln(this.options);s.addExternalEntities(this.externalEntities);const u=s.parseXml(e);return this.options.preserveOrder||u===void 0?u:Jn(u,this.options)}addEntity(e,l){if(l.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(l==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=l}}var Gn=Kn;const Yn=`
  5. `;function Xn(t,e){let l="";return e.format&&e.indentBy.length>0&&(l=Yn),fl(t,e,"",l)}function fl(t,e,l,s){let u="",r=!1;if(!Array.isArray(t)){if(t!=null){let f=t.toString();return f=Nt(f,e),f}return""}for(let f=0;f<t.length;f++){const m=t[f],p=Wn(m);if(p===void 0)continue;let g="";if(l.length===0?g=p:g=`${l}.${p}`,p===e.textNodeName){let d=m[p];Hn(g,e)||(d=e.tagValueProcessor(p,d),d=Nt(d,e)),r&&(u+=s),u+=d,r=!1;continue}else if(p===e.cdataPropName){r&&(u+=s);const d=String(m[p][0][e.textNodeName]).replace(/\]\]>/g,"]]]]><![CDATA[>");u+=`<![CDATA[${d}]]>`,r=!1;continue}else if(p===e.commentPropName){const d=String(m[p][0][e.textNodeName]).replace(/--/g,"- -").replace(/-$/,"- ");u+=s+`<!--${d}-->`,r=!0;continue}else if(p[0]==="?"){const d=Yt(m[":@"],e),P=p==="?xml"?"":s;let k=m[p][0][e.textNodeName];k=k.length!==0?" "+k:"",u+=P+`<${p}${k}${d}?>`,r=!0;continue}let c=s;c!==""&&(c+=e.indentBy);const v=Yt(m[":@"],e),b=s+`<${p}${v}`,C=fl(m[p],e,g,c);e.unpairedTags.indexOf(p)!==-1?e.suppressUnpairedNode?u+=b+">":u+=b+"/>":(!C||C.length===0)&&e.suppressEmptyNode?u+=b+"/>":C&&C.endsWith(">")?u+=b+`>${C}${s}</${p}>`:(u+=b+">",C&&s!==""&&(C.includes("/>")||C.includes("</"))?u+=s+e.indentBy+C+s:u+=C,u+=`</${p}>`),r=!0}return u}function Wn(t){const e=Object.keys(t);for(let l=0;l<e.length;l++){const s=e[l];if(!!Object.prototype.hasOwnProperty.call(t,s)&&s!==":@")return s}}function Yt(t,e){let l="";if(t&&!e.ignoreAttributes)for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let u=e.attributeValueProcessor(s,t[s]);u=Nt(u,e),u===!0&&e.suppressBooleanAttributes?l+=` ${s.substr(e.attributeNamePrefix.length)}`:l+=` ${s.substr(e.attributeNamePrefix.length)}="${u}"`}return l}function Hn(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let l=t.substr(t.lastIndexOf(".")+1);for(let s in e.stopNodes)if(e.stopNodes[s]===t||e.stopNodes[s]==="*."+l)return!0;return!1}function Nt(t,e){if(t&&t.length>0&&e.processEntities)for(let l=0;l<e.entities.length;l++){const s=e.entities[l];t=t.replace(s.regex,s.val)}return t}var qn=Xn;const Zn=qn,Qn=il,eo={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Re(t){this.options=Object.assign({},eo,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Qn(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=no),this.processTextOrObjNode=to,this.options.format?(this.indentate=lo,this.tagEndChar=`>
  6. `,this.newLine=`
  7. `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Re.prototype.build=function(t){return this.options.preserveOrder?Zn(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)};Re.prototype.j2x=function(t,e,l){let s="",u="";const r=l.join(".");for(let f in t)if(!!Object.prototype.hasOwnProperty.call(t,f))if(typeof t[f]>"u")this.isAttribute(f)&&(u+="");else if(t[f]===null)this.isAttribute(f)||f===this.options.cdataPropName?u+="":f[0]==="?"?u+=this.indentate(e)+"<"+f+"?"+this.tagEndChar:u+=this.indentate(e)+"<"+f+"/"+this.tagEndChar;else if(t[f]instanceof Date)u+=this.buildTextValNode(t[f],f,"",e);else if(typeof t[f]!="object"){const m=this.isAttribute(f);if(m&&!this.ignoreAttributesFn(m,r))s+=this.buildAttrPairStr(m,""+t[f]);else if(!m)if(f===this.options.textNodeName){let p=this.options.tagValueProcessor(f,""+t[f]);u+=this.replaceEntitiesValue(p)}else u+=this.buildTextValNode(t[f],f,"",e)}else if(Array.isArray(t[f])){const m=t[f].length;let p="",g="";for(let c=0;c<m;c++){const v=t[f][c];if(!(typeof v>"u"))if(v===null)f[0]==="?"?u+=this.indentate(e)+"<"+f+"?"+this.tagEndChar:u+=this.indentate(e)+"<"+f+"/"+this.tagEndChar;else if(typeof v=="object")if(this.options.oneListGroup){const b=this.j2x(v,e+1,l.concat(f));p+=b.val,this.options.attributesGroupName&&v.hasOwnProperty(this.options.attributesGroupName)&&(g+=b.attrStr)}else p+=this.processTextOrObjNode(v,f,e,l);else if(this.options.oneListGroup){let b=this.options.tagValueProcessor(f,v);b=this.replaceEntitiesValue(b),p+=b}else p+=this.buildTextValNode(v,f,"",e)}this.options.oneListGroup&&(p=this.buildObjectNode(p,f,g,e)),u+=p}else if(this.options.attributesGroupName&&f===this.options.attributesGroupName){const m=Object.keys(t[f]),p=m.length;for(let g=0;g<p;g++)s+=this.buildAttrPairStr(m[g],""+t[f][m[g]])}else u+=this.processTextOrObjNode(t[f],f,e,l);return{attrStr:s,val:u}};Re.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'};function to(t,e,l,s){const u=this.j2x(t,l+1,s.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,u.attrStr,l):this.buildObjectNode(u.val,e,u.attrStr,l)}Re.prototype.buildObjectNode=function(t,e,l,s){if(t==="")return e[0]==="?"?this.indentate(s)+"<"+e+l+"?"+this.tagEndChar:this.indentate(s)+"<"+e+l+this.closeTag(e)+this.tagEndChar;{let u="</"+e+this.tagEndChar,r="";if(e[0]==="?"&&(r="?",u=""),(l||l==="")&&t.indexOf("<")===-1)return this.indentate(s)+"<"+e+l+r+">"+t+u;if(this.options.commentPropName!==!1&&e===this.options.commentPropName&&r.length===0){const f=String(t).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(s)+`<!--${f}-->`+this.newLine}else return this.indentate(s)+"<"+e+l+r+this.tagEndChar+t+this.indentate(s)+u}};Re.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e};Re.prototype.buildTextValNode=function(t,e,l,s){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName){const u=String(t).replace(/\]\]>/g,"]]]]><![CDATA[>");return this.indentate(s)+`<![CDATA[${u}]]>`+this.newLine}else if(this.options.commentPropName!==!1&&e===this.options.commentPropName){const u=String(t).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(s)+`<!--${u}-->`+this.newLine}else{if(e[0]==="?")return this.indentate(s)+"<"+e+l+"?"+this.tagEndChar;{let u=this.options.tagValueProcessor(e,t);return u=this.replaceEntitiesValue(u),u===""?this.indentate(s)+"<"+e+l+this.closeTag(e)+this.tagEndChar:this.indentate(s)+"<"+e+l+">"+u+"</"+e+this.tagEndChar}}};Re.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const l=this.options.entities[e];t=t.replace(l.regex,l.val)}return t};function lo(t){return this.options.indentBy.repeat(t)}function no(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}var oo=Re;const uo=St,so=Gn,ao=oo;var io={XMLParser:so,XMLValidator:uo,XMLBuilder:ao};const Ce=":@";let O,Se,Ue=[];const kt={};function ro(t){const s=new io.XMLParser({ignoreAttributes:!1,attributeNamePrefix:"",preserveOrder:!0}).parse(t).filter(r=>r.svg),u=[];return Ue=[],s.forEach(r=>{const f=r[Ce];O=ml(f),f.width&&f.width.includes("%")&&(f.width=O.width*parseFloat(f.width)/100),f.height&&f.height.includes("%")&&(f.height=O.height*parseFloat(f.height)/100),O.width<O.height?(f.height||(f.height=40),Se=f.height/O.height,!f.width&&(f.width=Se*O.width)):(f.width||(f.width=40),Se=f.width/O.width,!f.height&&(f.height=Se*O.height)),isNaN(Se)&&(Se=1);const p=r.svg;p.filter(v=>v.defs).forEach(v=>{vl(v.defs.filter(b=>b.linearGradient))});const c=pt(f,p);u.push(...c)}),fo(u[0]),u}function fo(t){Ue=Ue.map((e,l)=>({id:l+"",penId:t.id,x:e.x,y:e.y})),t.anchors=Ue}function pt(t,e,l){const s=[],[u,r]=xo(t);t.visibility==="hidden"&&(t.visible=!1);const f={id:Ye(),name:"combine",x:t.x,y:t.y,locked:t.locked,width:u,height:r,children:[],visible:t.visible};return s.push(f),e.forEach(m=>{let p;const g=m[Ce];if(g&&g.transform&&m.g&&m.g.forEach(c=>{c[Ce]?c[Ce].transform=g.transform:c[Ce]={transform:g.transform}}),m.g)p=pt({x:0,y:0,width:1,height:1,locked:10,...g},m.g);else if(m.svg){let c=0,v=0,b=1,C=1;if(t.transform){const I=Vo(t.transform);I&&(c=I.x/O.width,v=I.y/O.height)}const d=m[Ce],P=ml(m[Ce]);b=Number(d.width)/O.width,C=Number(d.height)/O.height;let k=zl(O);O.width=P.width,O.height=P.height,p=pt({x:c,y:v,width:b,height:C,locked:10},m.svg),O=k}else if(m.a)p=pt({x:0,y:0,width:1,height:1,locked:10,...g},m.a);else if(m.defs)Ht(m.defs.filter(c=>c.style)),Fo(m.defs.filter(c=>c.linearGradient)),vl(m.defs.filter(c=>c.linearGradient));else if(m.style)Ht([{style:m.style}]);else if(g)if(p=co(g,t,f.id),m.path)p=po(g,p);else if(m.rect){p=mo(g,p);const c=p;[{x:c.x+c.width*.5,y:c.y},{x:c.x+c.width*1,y:c.y+c.height*.5},{x:c.x+c.width*.5,y:c.y+c.height*1},{x:c.x,y:c.y+c.height*.5}].forEach(b=>{(b.x<=.01||b.x>=.99||b.y<=.01||b.y>=.99)&&Ue.push(b)})}else if(m.circle){p=Xt(g,p);const c=p;[{x:c.x+c.width*.5,y:c.y},{x:c.x+c.width*1,y:c.y+c.height*.5},{x:c.x+c.width*.5,y:c.y+c.height*1},{x:c.x,y:c.y+c.height*.5}].forEach(b=>{(b.x<=.01||b.x>=.99||b.y<=.01||b.y>=.99)&&Ue.push(b)})}else if(m.ellipse)p=Xt(g,p);else if(m.line){p=vo(g,p);const c=p;c.anchors.forEach(v=>{const b=c.x+v.x*c.width,C=c.y+v.y*c.height;(b<.01||b>.99||C<.01||C>.99)&&Ue.push({x:b,y:C})})}else if(m.polygon)p=cl(g,p);else if(m.polyline){p=ho(g,p);const c=p;c.anchors.forEach(v=>{const b=c.x+v.x*c.width,C=c.y+v.y*c.height;(b<.01||b>.99||C<.01||C>.99)&&Ue.push({x:b,y:C})})}else m.text?p=yo(g,m.text,p):m.image?p=bo(g,p):p=void 0;if(p)if(Array.isArray(p)){for(const c of p)c.parentId||(c.parentId=f.id,f.children.push(c.id));s.push(...p)}else f.children.push(p.id),s.push(p)}),s}function pl(t){let e=0,l=0;if(t&&t.includes("translate")){let s=t.replace("translate(","").replace(")","").split(",");e=parseFloat(s[0]),l=parseFloat(s[1])}return{offsetX:e,offsetY:l}}function po(t,e){var b;let l=t.d;if(!l)return;let s=Ll(l),u=Jl(s),r=0,f=0;if(t.transform&&t.transform.includes("translate")){let C=pl(t.transform);r=C.offsetX,f=C.offsetY}else if(t.transform&&t.transform.includes("rotate")){const C=t.transform.match(/(-?\d+)/g);C!=null&&C.length&&(e.pivot||(e.pivot={}),e.pivot.x=(C[1]-u.x)/u.width,e.pivot.y=(C[2]-u.y)/u.height)}(b=e.points)==null||b.forEach(C=>{C.x=(C.x+e.x-O.x)/O.width,C.y=(C.y+e.y-O.y)/O.height}),u.x+=r,u.ex+=r,u.y+=f,u.ey+=f;const m=(u.x+e.x-O.x)/O.width,p=(u.y+e.y-O.y)/O.height,g=u.width/O.width<=1?u.width/O.width:1,c=u.height/O.height<=1?u.height/O.height:1;return{...e,name:"svgPath",pathId:Ye(),path:l,x:m,y:p,width:g,height:c,disableAnchor:!0}}function mo(t,e){const l=(t.x||0-O.x+e.x)/O.width,s=(t.y||0-O.y+e.y)/O.height,u=t.width/O.width<=1?t.width/O.width:1,r=t.height/O.height<=1?t.height/O.height:1,f=t.rx/t.width||t.ry/t.height||0;return{...e,name:"rectangle",x:l,y:s,width:u,height:r,borderRadius:f}}function Xt(t,e){const l=t.rx||t.r,s=t.ry||t.r,u=(t.cx-l-O.x+e.x)/O.width,r=(t.cy-s-O.y+e.y)/O.height,f=2*l/O.width,m=2*s/O.height;return{...e,name:"circle",x:u,y:r,width:f,height:m}}function ml(t){if(t.viewBox){const e=t.viewBox.split(" ");return{x:Number(e[0]),y:Number(e[1]),width:Number(e[2]),height:Number(e[3])}}else return{x:0,y:0,width:parseFloat(t.width),height:parseFloat(t.height)}}function co(t,e,l){var P;const s=qt(t.class),u=qt(e.class),r=Tt(t.style),f=Tt(e.style),m={...e,...u,...f,...t,...s,...r};let p,g,c;if(m.fill!=="none")if((P=m.fill)!=null&&P.includes("url")){const k=m.fill.replace("url(#","").replace(")","");if(kt[k])g=kt[k].color,c=1;else{let I=It.find(N=>N.id===k);I&&!I.color&&(I=It.find(N=>I.from===`#${N.id}`)),p=I==null?void 0:I.color}}else p=m.fill,!p&&(p="#000");let v=0,b=0,C=0,d=null;return m.transform&&m.transform.split(") ").forEach(I=>{const[N,F]=I.split("("),[V,R]=F.split(" ");N==="translate"?(v=Number(V)||0,b=Number(R)||0):N==="rotate"?(C=parseFloat(F),v=0,b=0):N==="matrix"&&(d=F.split(" ").map(L=>parseFloat(L)))}),isNaN(C)&&(C=0),{id:Ye(),locked:10,parentId:l,x:v,y:b,rotate:C,gradientColors:g,bkType:c,background:p,color:m.stroke==="none"?void 0:m.stroke,lineWidth:m.stroke==="none"?0:m["stroke-width"]?parseFloat(m["stroke-width"])*Se:m.stroke?1:0,lineCap:m.strokeLinecap,lineJoin:m.strokeLinejoin,lineDash:m.strokeDasharray,lineDashOffset:m.strokeDashoffset,globalAlpha:Number(m.opacity),fontSize:m["font-size"]?parseFloat(m["font-size"])*Se:16,fontFamily:m["font-family"],fontWeight:m["font-weight"],fontStyle:m["font-style"],matrix:d,visible:m.visibility!=="hidden"}}function go(t){const l=t.replace(/[\'\"\\\/\b\f\n\r\t]/g,"").split(/\s|,/),s=[];return l.forEach((u,r)=>{r%2===0&&s.push({x:Number(u),y:Number(l[r+1])})}),s}function cl(t,e){const l=t.points,s=go(l),u=jl(s),r=s.map(f=>({x:(f.x-u.x)/u.width,y:(f.y-u.y)/u.height,id:Ye()}));return{...e,name:"line",lineName:"line",type:0,close:!0,anchors:r,x:(u.x-O.x+e.x)/O.width,y:(u.y-O.y+e.y)/O.height,width:u.width/O.width,height:u.height/O.height}}function Wt(t,e){const[l,s,u,r,f,m]=e,p=t.x,g=t.y,c=l*p+u*g+f,v=s*p+r*g+m;return[c,v]}function vo(t,e){let l=Number(t.x1)||0,s=Number(t.x2)||0,u=Number(t.y1)||0,r=Number(t.y2)||0;Array.isArray(e.matrix)&&([l,u]=Wt({x:l,y:u},e.matrix),[s,r]=Wt({x:s,y:r},e.matrix));const f=Math.min(l,s),m=Math.max(l,s),p=Math.min(u,r),g=Math.max(u,r),c=(f-O.x+e.x)/O.width,v=(p-O.y+e.y)/O.height,b=(m-f)/O.width,C=(g-p)/O.height;return{...e,name:"line",lineName:"line",type:0,x:c,y:v,width:b,height:C,anchors:[{x:l<s?0:1,y:u<r?0:1,hidden:!0,id:Ye()},{x:l<s?1:0,y:u<r?1:0,hidden:!0,id:Ye()}]}}function ho(t,e){const l=cl(t,e);return Object.assign(l,{close:!1,type:1,anchors:l.anchors.map(s=>(s.hidden=!0,s))})}function yo(t,e,l){var p;const s=(p=e[0])==null?void 0:p[gl],u=Eo(s,l),r=l.fontSize||0;let{offsetX:f,offsetY:m}=pl(t.transform);return t.fill&&t.fill!=="none"&&(l.color=t.fill),{...l,name:"text",textAlign:"left",text:s,x:(parseFloat(t.x)+(f||0)-O.x+l.x)/O.width,y:(parseFloat(t.y)+(m||0)-O.y+l.y-r)/O.height,width:u/O.width,height:r/O.height}}function bo(t,e){const{x:l,y:s,width:u,height:r}=t;return{...e,name:"image",x:(l-O.x+e.x)/O.width,y:(s-O.y+e.y)/O.height,width:u/O.width,height:r/O.height,image:t["xlink:href"]}}function Eo(t,e){return(e.fontSize||16)/Se*String(t).length}function Tt(t){if(!t)return{};const e=t.split(";"),l={};return e.forEach(s=>{const[u,r]=s.split(":");u&&(l[u]=r)}),l}const gl="#text";let mt;function Ht(t){t.forEach(e=>{e.style&&e.style[0]&&(mt=wo(e.style[0][gl]))})}let It=[];function Fo(t){t.forEach(e=>{if(e.linearGradient){const l={id:e[Ce].id,from:e[Ce]["xlink:href"],color:void 0};e.linearGradient.length>0&&(l.color=e.linearGradient[0][Ce]["stop-color"]),It.push(l)}})}function vl(t){t.forEach(e=>{let{id:l,x1:s,x2:u,y1:r,y2:f}=e[Ce],m=Co(s,r,u,f)+90,p=e.linearGradient.map(g=>g[Ce]["stop-color"]+" "+parseFloat(g[Ce].offset||0)*100+"%").join(",");kt[l]={color:`linear-gradient(${m}deg,${p})`,points:[{x:s,y:r},{x:u,y:f}]}})}function Co(t,e,l,s){const u=l-t,r=s-e;return Math.atan2(r,u)*(180/Math.PI)}function wo(t){const e={};return t.split("}").forEach(s=>{const[u,r]=s.split("{");u&&(e[u.trim()]=Tt(r))}),e}function qt(t){const e={};for(const l in mt)if(Object.prototype.hasOwnProperty.call(mt,l)){const s=mt[l];(l==="."+t||l.includes("."+t+",")||l.includes(",."+t))&&Object.assign(e,s)}return e}function xo(t){var s;if((s=String(t.width))!=null&&s.endsWith("in")){const u=parseFloat(t.width)*96,r=parseFloat(t.height)*96;return[u,r]}const e=parseFloat(t.width)||0,l=parseFloat(t.height)||0;return[e,l]}function Vo(t){const e=/translate\((-?\d+),\s*(-?\d+)\)/,l=t.match(e);if(l){const s=parseInt(l[1],10),u=parseInt(l[2],10);return{x:s,y:u}}}const Bo={class:"flex-row p-3"},Ao=["onClick"],_o={class:"font-bold flex1 no-wrap"},No={class:"flex hover-show"},ko={class:"drawing-list"},To={class:"flex"},Io={class:"buttons"},$o=["onDragstart"],Do=["src"],So=["src"],Oo={class:"flex-row p-3"},Uo=["onClick"],Po={class:"font-bold flex1 no-wrap"},Ro={class:"flex hover-show"},Mo={class:"buttons comp-buttons"},zo={class:"img-item"},Lo={class:"handle"},Vt="#333333",Zt="#FF00FF",Jo=100*1024,jo=300,Ko=we({__name:"menu",setup(t){const e=window.allEnv.topo.imgServer,l=e!=null&&e.includes("http")?e:window.origin+e,s="/plugin/topo/",u=["\u7535\u529B","\u56FD\u5BB6\u7535\u7F51","\u5B89\u9632\u5F31\u7535","\u6696\u901A\u7A7A\u8C03","\u6D88\u9632\u62A5\u8B66","\u7ED9\u6392\u6C34","\u7BA1\u9053","\u6309\u94AE","\u6309\u94AE\u5F00\u5173","\u673A\u68B0\u8BBE\u5907","\u6C34\u5229\u8BBE\u5907"],r=new Map,f=new Set,m=async A=>{if(!(r.has(A)||f.has(A)))try{const _=await fetch(s+A);if(!_.ok)throw new Error(`HTTP ${_.status}`);const X=await _.text();if(X.length>Jo){f.add(A),console.warn("[svg->pen] \u6587\u4EF6\u8FC7\u5927\uFF0C\u4FDD\u6301\u56FE\u7247\u65B9\u5F0F\uFF1A",A);return}const se=X.replaceAll('fill="currentColor"',`fill="${Zt}"`),oe=ro(se.replaceAll("currentColor",Vt));if(oe.length>jo){f.add(A),console.warn(`[svg->pen] \u8282\u70B9\u6570 ${oe.length} \u8FC7\u591A\uFF0C\u4FDD\u6301\u56FE\u7247\u65B9\u5F0F\uFF1A`,A);return}oe.forEach(Q=>{if(Q.background===Zt&&(Q.background=Vt,Q.followColor=!0),Q.parentId||(!Q.color&&(Q.color=Vt),Q.background===void 0&&(Q.background=""),!Q.width||!Q.height))return;const he=Q.width/Q.height;Q.width>=Q.height?(Q.width=60,Q.height=60/he):(Q.height=60,Q.width=60*he)}),r.set(A,oe)}catch(_){f.add(A),console.warn("[svg->pen] \u89E3\u6790\u5931\u8D25\uFF0C\u4FDD\u6301\u56FE\u7247\u65B9\u5F0F\uFF1A",A,_)}},p=A=>{if(!A||!u.includes(A.name))return;const _=6;let X=0;(async()=>{for(;X<A.list.length;){const oe=A.list.slice(X,X+_);X+=_,await Promise.all(oe.map(Q=>{var he;return((he=Q.data)==null?void 0:he.image)&&m(Q.data.image)}))}})()},g=M([]),c=A=>{(Array.isArray(A)?A:[A]).forEach(X=>p(Mt[Number(X)]))},v=$t(),b=M([]),C=M([]),d=Ee(()=>v.getters.currentDrawing),P=Ee(()=>v.getters.currentComp),k=Ee(()=>v.getters.histories),I=Ee(()=>v.state.historyIndex),N=Pe({components:[],topology:[]});function F(A){fe.folder().then(_=>{N.components=_.components,N.topology=_.topology,A&&A(_.topology)})}let V;We(()=>{F(()=>{sessionStorage.drawingId&&R(N.topology)}),setTimeout(()=>{V=window.meta2d},0)});const R=A=>{const _=sessionStorage.drawingId;if(_==="new"){A&&A[0]?Te(A[0].id):fe.folderAdd("\u9ED8\u8BA4\u6587\u4EF6\u5939","topology").then(()=>{F(X=>{Te(X[0].id)})});return}fe.topology(_).then(({diagram:X})=>{X?tt(X):ae.warning("\u56FE\u5F62\u4E0D\u5B58\u5728")})},L=(A,_,X)=>{const se=A.dataTransfer;if(!!se)if(_.data){const oe=!!X&&u.includes(X.name),Q=oe&&r.get(_.data.image);if(Q){se.setData("Text",JSON.stringify(Q));return}if(oe&&_.data.image&&!f.has(_.data.image)){A.preventDefault(),ae.info("\u56FE\u5143\u89E3\u6790\u4E2D\uFF0C\u8BF7\u7A0D\u5019\u518D\u62D6");return}_.data.name==="svgPath"?se.setData("Text",JSON.stringify({..._.data,image:s+_.data.image})):se.setData("Text",JSON.stringify(_.data))}else se.setData("Text",JSON.stringify({..._,name:"image",width:36,height:36,iconFamily:_.font_family||_.myfont||"sgcc",color:"#C1976A",icon:unescape(("\\u"+_.unicode).replace(/\\/g,"%"))}))},$=(A,_)=>{_.jsonData&&A.dataTransfer.setData("Text",Ge.inflate(_.jsonData,{to:"string"}))};function z(A){st.prompt("","\u65B0\u5EFA\u6587\u4EF6\u5939",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88",inputValidator(_){return _?!0:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"}}).then(({value:_})=>{fe.folderAdd(_,A).then(F)})}function Z(A){st.prompt("","\u7F16\u8F91\u6587\u4EF6\u5939",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88",inputValue:A.name,inputValidator(_){return _?!0:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"}}).then(({value:_})=>{fe.folderEdit(_,A.types,A.id).then(F)})}function ie(A){fe.folderDel(A).then(()=>{ae.success("\u5220\u9664\u6210\u529F"),F()})}function K(A){A.list&&A.list.length||setTimeout(()=>{b.value.includes(A.id)&&fe.folderData(A.id).then(_=>{A.list=_.data})},0)}function E(A){A.list&&A.list.length||setTimeout(()=>{C.value.includes(A.id)&&fe.folderData(A.id).then(_=>{A.list=_.data})},0)}function ce(A,_){fe.topologyDel(A.list[_].id).then(()=>{ae.success("\u5220\u9664\u6210\u529F"),A.list.splice(_,1)})}function Ne(A,_,X=!1){const se=N[A].find(oe=>oe.id===_);se&&fe.folderData(se.id).then(oe=>{if(se.list=oe.data,X&&A==="components"){const Q=oe.data.find(he=>he.id===X);Q&&v.commit("setCurrentComp",Q)}})}Xe.on("updateComp",A=>{Ne("components",A)}),Xe.on("updateDrawing",A=>{Ne("topology",A)});function Te(A){je(()=>{V.setOptions({...Je}),V.open(),v.commit("setCurrentDrawing",{folderId:A})})}function re(A){fe.topologyAdd({...A,id:void 0,name:A.name+"-copy"}).then(()=>{ae.success("\u590D\u5236\u6210\u529F"),Ne("topology",A.folderId)})}function tt(A){je(()=>{if(A.jsonData){const _=JSON.parse(Ge.inflate(A.jsonData,{to:"string"}));V.setOptions(_.options||{...Je}),V.open(_),console.log(_),V.fitView(!0,30),v.commit("setCurrentDrawing",A)}else V.setOptions({...Je}),V.open(),V.fitView(!0,30),v.commit("setCurrentDrawing",A)})}function je(A){k.value===V.store.histories.length&&I.value==V.store.historyIndex?(A(),lt()):st.confirm("\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F","",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(()=>{A(),lt()})}function lt(){v.commit("setHistory",{histories:0,historyIndex:void 0})}function ht(A){je(()=>{const _=JSON.parse(Ge.inflate(A.jsonData,{to:"string"}));V.open({pens:_}),V.uncombine(_[_.length-1]),v.commit("setCurrentComp",A)})}function nt(A){st.confirm("\u5F53\u524D\u64CD\u4F5C\u5C06\u53D6\u6D88\u56FE\u7EB8\u7F16\u8F91\u5E76\u521B\u5EFA\u65B0\u7EC4\u4EF6,\u786E\u5B9A\u8981\u7EE7\u7EED\u5417\uFF1F","",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(()=>{V.open(),v.commit("setCurrentComp",{folderId:A})})}function ot(A,_){const X=200/Math.max(A,_),se=Math.round(A*X),oe=Math.round(_*X);return{newWidth:se,newHeight:oe}}function ut(A,_){je(()=>{V.open(),fe.uploadImg(ll({file:A})).then(X=>{const se=`${l}/${X.path}`,oe=new Image;oe.src=se,oe.onload=()=>{const Q=ot(oe.width,oe.height);V.addPens([{name:A.name.endsWith(".gif")?"gif":"image",text:"",image:se,x:100,y:100,width:Q.newWidth,height:Q.newHeight}]);const he=V.toComponent();fe.topologyAdd({folderId:_,jsonData:Ge.deflate(JSON.stringify(he!=null?he:""),{to:"string"}),name:el().format("YYYY-MM-DD HH:mm:ss"),types:"components",images:se,status:1}).then(He=>{ae.success("\u4FDD\u5B58\u6210\u529F"),Ne("components",_,He.diagramId),C.value=[_]})}})})}return(A,_)=>{const X=U("el-button"),se=U("el-popconfirm"),oe=U("el-collapse-item"),Q=U("el-collapse"),he=U("el-tab-pane"),He=U("el-upload"),yt=U("el-image"),bt=U("el-tooltip"),Et=U("el-tabs");return w(),S("div",{class:"menu br",onContextmenu:_[7]||(_[7]=De(()=>{},["prevent"]))},[o(Et,{"model-value":"\u7CFB\u7EDF\u7EC4\u4EF6"},{default:a(()=>[o(he,{label:"\u56FE\u7EB8",name:"\u56FE\u7EB8"},{default:a(()=>[x("div",Bo,[o(X,{type:"primary",icon:J(at),size:"small",onClick:_[0]||(_[0]=q=>z("topology"))},{default:a(()=>[..._[8]||(_[8]=[Y("\u65B0\u5EFA\u6587\u4EF6\u5939",-1)])]),_:1},8,["icon"])]),o(Q,{modelValue:b.value,"onUpdate:modelValue":_[2]||(_[2]=q=>b.value=q)},{default:a(()=>[(w(!0),S(te,null,pe(N.topology,q=>(w(),j(oe,{title:q.name,name:q.id,key:q.id},{title:a(()=>[x("div",{class:"flex overflow-hidden justify-between w-full hover",onClick:ne=>K(q)},[x("span",_o,Le(q.name),1),x("div",No,[o(se,{title:"\u786E\u5B9A\u8981\u5220\u9664\uFF1F",onConfirm:ne=>ie(q.id)},{reference:a(()=>[o(X,{circle:"",class:"!mx-0",type:"danger",size:"small",icon:J(it),onClick:_[1]||(_[1]=De(()=>{},["stop"]))},null,8,["icon"])]),_:1},8,["onConfirm"]),o(X,{circle:"",class:"!mx-1",type:"primary",size:"small",icon:J(rt),onClick:De(ne=>Z(q),["stop"])},null,8,["icon","onClick"]),o(X,{circle:"",class:"!mx-0",type:"info",size:"small",icon:J(at),onClick:De(ne=>Te(q.id),["stop"])},null,8,["icon","onClick"])])],8,Ao)]),default:a(()=>[x("div",ko,[(w(!0),S(te,null,pe(q.list,(ne,ge)=>{var Ie;return w(),S("div",{class:"flex-row drawing",key:ne.id},[x("div",{class:me(["no-wrap",{active:((Ie=d.value)==null?void 0:Ie.id)===ne.id}])},Le(ne.name),3),x("div",To,[o(X,{type:"primary",icon:J(Fl),size:"small",circle:"",onClick:Be=>re(ne)},null,8,["icon","onClick"]),o(X,{class:"!mx-1",type:"primary",icon:J(rt),size:"small",circle:"",onClick:Be=>tt(ne)},null,8,["icon","onClick"]),o(se,{title:"\u786E\u5B9A\u8981\u5220\u9664\uFF1F",onConfirm:Be=>ce(q,ge)},{reference:a(()=>[o(X,{class:"!mx-0",type:"danger",icon:J(it),size:"small",circle:""},null,8,["icon"])]),_:1},8,["onConfirm"])])])}),128))])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(he,{label:"\u7CFB\u7EDF\u7EC4\u4EF6",name:"\u7CFB\u7EDF\u7EC4\u4EF6"},{default:a(()=>[o(Q,{modelValue:g.value,"onUpdate:modelValue":_[3]||(_[3]=q=>g.value=q),onChange:c},{default:a(()=>[(w(!0),S(te,null,pe(J(Mt),(q,ne)=>(w(),S(te,{key:q.name},[q.show?(w(),j(oe,{key:0,title:`${q.name}(${q.list.length})`,name:ne},{default:a(()=>[x("div",Io,[(w(!0),S(te,null,pe(q.list,(ge,Ie)=>(w(),S("div",{class:"drap-dom",draggable:"true",onDragstart:Be=>L(Be,ge,q),key:Ie},[ge.font_family?(w(),S("i",{key:0,class:me(`icon-${ge.font_family}-${ge.my_class}`)},null,2)):ge.my_class?(w(),S("i",{key:1,class:me(`icon-${ge.my_class}`)},null,2)):ge.data&&ge.data.name==="svgPath"?(w(),S("img",{key:2,class:"svg",loading:"lazy",src:J(s)+ge.data.image},null,8,Do)):ge.icon?(w(),S("i",{key:4,class:me(["t-icon",ge.icon])},null,2)):(w(),S("img",{key:3,class:"svg",loading:"lazy",src:J(s)+ge.data.image},null,8,So))],40,$o))),128))])]),_:2},1032,["title","name"])):le("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1}),o(he,{label:"\u6211\u7684\u7EC4\u4EF6",name:"\u6211\u7684\u7EC4\u4EF6"},{default:a(()=>[x("div",Oo,[o(X,{type:"primary",icon:J(at),size:"small",onClick:_[4]||(_[4]=q=>z("components"))},{default:a(()=>[..._[9]||(_[9]=[Y("\u65B0\u5EFA\u6587\u4EF6\u5939",-1)])]),_:1},8,["icon"])]),o(Q,{modelValue:C.value,"onUpdate:modelValue":_[6]||(_[6]=q=>C.value=q)},{default:a(()=>[(w(!0),S(te,null,pe(N.components,q=>(w(),j(oe,{title:q.name,name:q.id,key:q.id},{title:a(()=>[x("div",{class:"flex overflow-hidden justify-between w-full hover",onClick:ne=>E(q)},[x("span",Po,Le(q.name),1),x("div",Ro,[o(se,{title:"\u786E\u5B9A\u8981\u5220\u9664\uFF1F",onConfirm:ne=>ie(q.id)},{reference:a(()=>[o(X,{circle:"",class:"!mx-0",type:"danger",size:"small",icon:J(it),onClick:_[5]||(_[5]=De(()=>{},["stop"]))},null,8,["icon"])]),_:1},8,["onConfirm"]),o(X,{circle:"",class:"!mx-1",type:"primary",size:"small",icon:J(rt),onClick:De(ne=>Z(q),["stop"])},null,8,["icon","onClick"]),o(He,{style:{display:"inline-flex"},"before-upload":ne=>ut(ne,q.id),accept:".jpg,.jpeg,.gif,.png"},{default:a(()=>[o(X,{circle:"",class:"!mx-0",type:"primary",size:"small",icon:J(Cl)},null,8,["icon"])]),_:1},8,["before-upload"]),o(X,{circle:"",class:"!ml-1 mr-2",type:"info",size:"small",icon:J(at),onClick:De(ne=>nt(q.id),["stop"])},null,8,["icon","onClick"])])],8,Uo)]),default:a(()=>[x("div",Mo,[(w(!0),S(te,null,pe(q.list,(ne,ge)=>(w(),j(bt,{content:ne.name,key:ne.id,placement:"right",size:"small"},{default:a(()=>{var Ie;return[x("div",zo,[x("div",Lo,[o(X,{type:"primary",icon:J(rt),size:"small",circle:"",onClick:Be=>ht(ne)},null,8,["icon","onClick"]),o(se,{title:"\u786E\u5B9A\u8981\u5220\u9664\uFF1F",onConfirm:Be=>ce(q,ge)},{reference:a(()=>[o(X,{type:"danger",icon:J(it),size:"small",circle:""},null,8,["icon"])]),_:1},8,["onConfirm"])]),o(yt,{class:me(["comp-img",{active:((Ie=P.value)==null?void 0:Ie.id)===ne.id}]),fit:"cover",src:ne.images.includes("http")?ne.images:J(l)+"/"+ne.images,onDragstart:Be=>$(Be,ne)},null,8,["class","src","onDragstart"])])]}),_:2},1032,["content"]))),128))])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})],32)}}}),Go=Ve(Ko,[["__scopeId","data-v-759dc288"]]),Yo="/plugin/topo/assets/eye-close.639bc234.svg",Xo="/plugin/topo/assets/eye.917dcd30.svg";const Wo={class:"pens px-4 py-2"},Ho={class:"pen-name flex-1 px-1"},qo=["onClick"],Zo=["onClick"],Qo=["onClick"],eu=["onClick"],tu=["onClick"],lu=["onClick"],nu=we({__name:"locked",props:{pens:Array},setup(t){function e(l,s,u){window.meta2d.setValue({id:u.id,[l]:s}),window.meta2d.render(1/0)}return(l,s)=>(w(),S("div",Wo,[(w(!0),S(te,null,pe(t.pens,u=>(w(),S("div",{class:"pen-item flex py-0.5",key:u.id},[u.name!=="combine"?(w(),S(te,{key:0},[s[0]||(s[0]=x("i",{class:"t-icon t-image"},null,-1)),x("div",Ho,Le(u.text||u.name),1),x("i",{class:me(["t-icon t-unlock",{active:!u.locked}]),onClick:r=>e("locked","",u)},null,10,qo),x("i",{class:me(["t-icon t-lock",{active:u.locked===1}]),onClick:r=>e("locked",1,u)},null,10,Zo),x("i",{class:me(["t-icon t-wufayidong",{active:u.locked===2}]),onClick:r=>e("locked",2,u)},null,10,Qo),x("i",{class:me(["t-icon t-jinyong",{active:u.locked===10}]),onClick:r=>e("locked",10,u)},null,10,eu),u.visible===!1?(w(),S("img",{key:0,src:Yo,class:"icon",alt:"icon",onClick:r=>e("visible",!0,u)},null,8,tu)):(w(),S("img",{key:1,src:Xo,class:"icon",onClick:r=>e("visible",!1,u),alt:"icon"},null,8,lu))],64)):le("",!0)]))),128))]))}}),Bt=Ve(nu,[["__scopeId","data-v-1dde4a39"]]);const Qt=3,ou=we({__name:"context-menu",setup(t){let e;const l=Pe({x:0,y:0,isCombine:!1,show:!1,active:[]});We(()=>{e=window.meta2d,e.on("contextmenu",({e:u,bounding:r={left:0,top:0}})=>{const f=e.store.active;f.length>0&&(l.x=u.clientX+(r==null?void 0:r.left)+Qt,l.y=u.clientY+(r==null?void 0:r.top)+Qt,l.isCombine=f.length===1&&f[0].name==="combine",l.active=f,l.show=!0)}),e.on("click",()=>l.show=!1)});function s(u,r,f){if(l.show=!1,u==="combine"){e.combine(l.active);return}if(u==="combine-showChild"){const m=e.combine(l.active,0);if(m.children.length>1){const p={};m.children.forEach((g,c)=>{p[c+1]=c}),m.combineMap=p,e.setValue({id:m.id,combineMap:m.combineMap}),e.active([]),e.active([m],!0)}return}if(u==="un-combine"){e.uncombine(l.active[0]);return}if(u==="layer"){l.active.forEach(m=>e[r](m)),e.render(1/0);return}if(u==="setValue"){e.setValue({id:l.active[0].id,[r]:f}),e.render(1/0);return}l.active=[]}return(u,r)=>{var f,m;return vt((w(),S("div",{class:"context-menu",onContextmenu:r[9]||(r[9]=De(()=>{},["prevent"])),style:tl({left:l.x+"px",top:l.y+"px"})},[x("div",{class:"menu-item",onClick:r[0]||(r[0]=p=>s("layer","top"))},"\u7F6E\u9876"),x("div",{class:"menu-item",onClick:r[1]||(r[1]=p=>s("layer","bottom"))},"\u7F6E\u5E95"),x("div",{class:"menu-item",onClick:r[2]||(r[2]=p=>s("layer","up"))},"\u4E0A\u4E00\u4E2A\u56FE\u5C42"),x("div",{class:"menu-item",onClick:r[3]||(r[3]=p=>s("layer","down"))},"\u4E0B\u4E00\u4E2A\u56FE\u5C42"),l.active.length>1?(w(),S(te,{key:0},[x("div",{class:"menu-item",onClick:r[4]||(r[4]=p=>s("combine"))},"\u7EC4\u5408"),x("div",{class:"menu-item",onClick:r[5]||(r[5]=p=>s("combine-showChild"))},"\u7EC4\u5408\u4E3A\u72B6\u6001")],64)):l.active.length===1?(w(),S(te,{key:1},[(f=l.active[0])!=null&&f.image?(w(),S(te,{key:0},[(m=l.active[0])!=null&&m.isBottom?(w(),S("div",{key:0,class:"menu-item",onClick:r[6]||(r[6]=p=>s("setValue","isBottom",!1))},"\u53BB\u4E0A\u5C42")):(w(),S("div",{key:1,class:"menu-item",onClick:r[7]||(r[7]=p=>s("setValue","isBottom",!0))},"\u53BB\u4E0B\u5C42"))],64)):le("",!0),l.isCombine?(w(),S("div",{key:1,class:"menu-item",onClick:r[8]||(r[8]=p=>s("un-combine"))},"\u53D6\u6D88\u7EC4\u5408")):le("",!0)],64)):le("",!0)],36)),[[wl,l.show&&l.active.length]])}}}),uu=Ve(ou,[["__scopeId","data-v-73cf7266"]]);const su={class:"my-drawer"},au={class:"panel-wrapper"},iu={style:{flex:"auto"}},ru=we({__name:"bind-data-panel",props:{deviceList:Array},emits:["setBindData"],setup(t,{expose:e,emit:l}){const s=t,u=l,r=M();M(!0);const f=M(!1),m=M(!1),p=M(""),g=M(""),c=M(""),v=M(""),b=M([]),C=M([]);function d(V){const R=s.deviceList.find(L=>L.key===V);p.value=R.key,g.value=R.name,c.value="",v.value="",P(R)}function P(V){let R=null;V.product?R=V:(R=s.deviceList.find(L=>L.key===V.devId),_e(()=>{var $;const L=b.value.find(z=>z.key===V.pointId);L&&(($=r.value)==null||$.setCurrentRow(L))})),b.value=JSON.parse(R.product.metadata).properties}function k(V){!V||_e(()=>{c.value=V.key,v.value=V.name})}function I(){u("setBindData",{devId:p.value,pointId:c.value,devName:g.value,pointName:v.value,tags:C.value}),m.value=!1}function N(){p.value="",c.value="",g.value="",v.value="",b.value=[],C.value=[]}function F(V){m.value=!0,V.devId&&V.pointId&&_e(()=>{p.value=V.devId,g.value=V.devName,c.value=V.pointId,v.value=V.pointName,C.value=V.tags,P(V)})}return e({show:F}),(V,R)=>{const L=U("el-option"),$=U("el-select"),z=U("el-table-column"),Z=U("el-table"),ie=U("el-button"),K=U("el-drawer"),E=Dt("loading");return w(),S("div",su,[o(K,{modelValue:m.value,"onUpdate:modelValue":R[2]||(R[2]=ce=>m.value=ce),title:"\u6570\u636E\u7ED1\u5B9A",size:"400px",class:"bind-data-panel",direction:"rtl",onClose:N},{footer:a(()=>[x("div",iu,[o(ie,{onClick:R[1]||(R[1]=ce=>m.value=!1)},{default:a(()=>[...R[3]||(R[3]=[Y("\u53D6\u6D88",-1)])]),_:1}),o(ie,{type:"primary",onClick:I,disabled:!c.value},{default:a(()=>[...R[4]||(R[4]=[Y("\u7ED1\u5B9A",-1)])]),_:1},8,["disabled"])])]),default:a(()=>[vt((w(),S("div",au,[o($,{modelValue:p.value,"onUpdate:modelValue":R[0]||(R[0]=ce=>p.value=ce),onChange:d,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",filterable:"",style:{width:"100%","margin-bottom":"20px"}},{default:a(()=>[(w(!0),S(te,null,pe(s.deviceList,ce=>(w(),j(L,{label:ce.name,value:ce.key,key:ce.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o(Z,{height:"calc(100vh - 200px)",data:b.value,border:"",ref_key:"tableRef",ref:r,style:{width:"100%"},size:"small","highlight-current-row":"",onCurrentChange:k},{default:a(()=>[o(z,{prop:"name",align:"center",label:"\u6570\u636E\u9879\u540D\u79F0"}),o(z,{prop:"key",align:"center",label:"\u6570\u636E\u9879\u7F16\u7801"})]),_:1},8,["data"])])),[[E,f.value]])]),_:1},8,["modelValue"])])}}}),du=Ve(ru,[["__scopeId","data-v-4a701d81"]]);const fu={class:"my-drawer"},pu={class:"panel-wrapper"},mu={style:{flex:"auto"}},cu=we({__name:"bind-func-panel",props:{deviceList:Array},emits:["setBindFunc"],setup(t,{expose:e,emit:l}){const s=l,u=M();M(!0);const r=M(!1),f=M(!1),m=M(""),p=M(""),g=M(""),c=M(""),v=M(""),b=M(""),C=M([]),d=M([]),P=M([]),k=t;function I($){const z=k.deviceList.find(Z=>Z.key===$);m.value=z.key,p.value=z.name,g.value=z.product.key,b.value=z.key,c.value="",v.value="",c.value="",C.value=[],N(z.product.key)}function N($,z){P.value=[],$&&fe.functionList({productKey:$}).then(Z=>{P.value=Z.Data,z&&_e(()=>{var K;const ie=P.value.find(E=>E.key===z);ie&&((K=u.value)==null||K.setCurrentRow(ie))})})}function F($){!$||_e(()=>{c.value=$.key,v.value=$.name,C.value=$==null?void 0:$.inputs})}function V(){s("setBindFunc",{funcDevId:m.value,funcKey:c.value,productKey:g.value,funcDevName:p.value,deviceKey:b.value,funcName:v.value,funcInputs:C.value,tags:d.value}),f.value=!1}function R(){m.value="",c.value="",p.value="",g.value="",C.value=[],P.value=[]}function L($){f.value=!0,$.funcDevId&&$.funcKey&&_e(()=>{m.value=$.funcDevId,p.value=$.funcDevName,g.value=$.productKey,c.value=$.funcKey,v.value=$.funcName,b.value=$.deviceKey,C.value=$.funcInputs,d.value=$.tags,N($.productKey,$.funcKey)})}return e({show:L}),($,z)=>{const Z=U("el-option"),ie=U("el-select"),K=U("el-table-column"),E=U("el-table"),ce=U("el-button"),Ne=U("el-drawer"),Te=Dt("loading");return w(),S("div",fu,[o(Ne,{modelValue:f.value,"onUpdate:modelValue":z[2]||(z[2]=re=>f.value=re),title:"\u6570\u636E\u7ED1\u5B9A",size:"400px",class:"bind-data-panel",direction:"rtl",onClose:R},{footer:a(()=>[x("div",mu,[o(ce,{onClick:z[1]||(z[1]=re=>f.value=!1)},{default:a(()=>[...z[3]||(z[3]=[Y("\u53D6\u6D88",-1)])]),_:1}),o(ce,{type:"primary",onClick:V,disabled:!c.value},{default:a(()=>[...z[4]||(z[4]=[Y("\u7ED1\u5B9A",-1)])]),_:1},8,["disabled"])])]),default:a(()=>[vt((w(),S("div",pu,[o(ie,{modelValue:m.value,"onUpdate:modelValue":z[0]||(z[0]=re=>m.value=re),onChange:I,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",filterable:"",style:{width:"100%","margin-bottom":"20px"}},{default:a(()=>[(w(!0),S(te,null,pe(k.deviceList,re=>(w(),j(Z,{label:re.name,value:re.key,key:re.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o(E,{height:"calc(100vh - 200px)",data:P.value,border:"",ref_key:"tableRef",ref:u,style:{width:"100%"},size:"small","highlight-current-row":"",onCurrentChange:F},{default:a(()=>[o(K,{prop:"name",align:"center",label:"\u540D\u79F0"}),o(K,{prop:"key",align:"center",label:"\u529F\u80FD\u6807\u8BC6"})]),_:1},8,["data"])])),[[Te,r.value]])]),_:1},8,["modelValue"])])}}}),gu=Ve(cu,[["__scopeId","data-v-f06d425e"]]);const vu={class:"my-drawer"},hu={class:"panel-wrapper"},yu={style:{flex:"auto"}},bu=we({__name:"bind-attr-panel",props:{deviceList:Array},emits:["setBindAttr"],setup(t,{expose:e,emit:l}){const s=l,u=M(),r=M(!1),f=M(!1),m=M(""),p=M(""),g=M(""),c=M(""),v=M(""),b=M(""),C=M(""),d=M(""),P=M([]),k=t;function I($){const z=k.deviceList.find(Z=>Z.key===$);console.log(z),c.value="",v.value="",C.value="",d.value="",b.value="",m.value=z.product.key,p.value=z.key,g.value=z.name,N(z.product.key)}function N($,z){P.value=[],$&&fe.propertyList({productKey:$}).then(Z=>{P.value=Z.Data.filter(ie=>!ie.accessMode),z&&_e(()=>{var K;const ie=P.value.find(E=>E.key===z);ie&&((K=u.value)==null||K.setCurrentRow(ie))})})}function F($){!$||_e(()=>{c.value=$.key,v.value=$.name,b.value=$.valueType.type,C.value=$.valueType.decimals,d.value=$.valueType.unit})}function V(){s("setBindAttr",{attrKey:c.value,attrName:v.value,attrType:b.value,attrDecimals:C.value,attrUnit:d.value,productKey:m.value,deviceKey:p.value,deviceName:g.value}),f.value=!1}function R(){v.value="",c.value="",b.value="",C.value="",d.value="",p.value="",m.value="",g.value="",P.value=[]}function L($){console.log($),f.value=!0,$.attrKey&&_e(()=>{m.value=$.productKey,c.value=$.attrKey,v.value=$.attrName,b.value=$.attrType,C.value=$.attrDecimals,d.value=$.attrUnit,p.value=$.deviceKey,g.value=$.deviceName,N($.productKey,$.attrKey)})}return e({show:L}),($,z)=>{const Z=U("el-option"),ie=U("el-select"),K=U("el-table-column"),E=U("el-table"),ce=U("el-button"),Ne=U("el-drawer"),Te=Dt("loading");return w(),S("div",vu,[o(Ne,{modelValue:f.value,"onUpdate:modelValue":z[2]||(z[2]=re=>f.value=re),title:"\u5C5E\u6027\u7ED1\u5B9A",size:"500px",class:"bind-data-panel",direction:"rtl",onClose:R},{footer:a(()=>[x("div",yu,[o(ce,{onClick:z[1]||(z[1]=re=>f.value=!1)},{default:a(()=>[...z[3]||(z[3]=[Y("\u53D6\u6D88",-1)])]),_:1}),o(ce,{type:"primary",onClick:V,disabled:!c.value},{default:a(()=>[...z[4]||(z[4]=[Y("\u7ED1\u5B9A",-1)])]),_:1},8,["disabled"])])]),default:a(()=>[vt((w(),S("div",hu,[o(ie,{modelValue:p.value,"onUpdate:modelValue":z[0]||(z[0]=re=>p.value=re),onChange:I,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",filterable:"",style:{width:"100%","margin-bottom":"20px"}},{default:a(()=>[(w(!0),S(te,null,pe(k.deviceList,re=>(w(),j(Z,{label:re.name,value:re.key,key:re.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o(E,{height:"calc(100vh - 200px)",data:P.value,border:"",ref_key:"tableRef",ref:u,style:{width:"100%"},size:"small","highlight-current-row":"",onCurrentChange:F},{default:a(()=>[o(K,{prop:"name",align:"center",label:"\u5C5E\u6027\u540D\u79F0"}),o(K,{prop:"key",align:"center",label:"\u5C5E\u6027\u6807\u8BC6"}),o(K,{prop:"valueType.type",align:"center",label:"\u6570\u636E\u7C7B\u578B"}),o(K,{prop:"valueType.decimals",align:"center",label:"\u7CBE\u5EA6"}),o(K,{prop:"valueType.unit",align:"center",label:"\u5355\u4F4D"})]),_:1},8,["data"])])),[[Te,r.value]])]),_:1},8,["modelValue"])])}}}),Eu=Ve(bu,[["__scopeId","data-v-28dfe5c1"]]);const Fu={class:"echarts-editor"},Cu={class:"editor-wrapper"},wu={class:"mb-2 json-actions"},xu={style:{flex:"auto"}},Vu=we({__name:"echarts-editor",props:{penEcharts:{type:[Object,String],default:()=>({})}},emits:["saveEchartsData"],setup(t,{expose:e,emit:l}){const s=t,u=l,r=M(!1),f=M(""),m=M(""),p=M(""),g=Ee(()=>f.value!==m.value),c={title:{text:"\u6807\u9898"},tooltip:{},xAxis:{data:["A","B","C","D","E"]},yAxis:{},series:[{name:"\u6570\u636E",type:"bar",data:[10,20,30,40,50]}]};function v(){try{if(typeof s.penEcharts=="string"&&s.penEcharts)f.value=s.penEcharts,m.value=s.penEcharts;else if(s.penEcharts&&Object.keys(s.penEcharts).length>0){const F=JSON.stringify(s.penEcharts,null,2);f.value=F,m.value=F}else{const F=JSON.stringify(c,null,2);f.value=F,m.value=""}d()}catch(F){p.value=F instanceof Error?F.message:"\u672A\u77E5\u9519\u8BEF",ae.error("\u521D\u59CB\u5316 JSON \u5185\u5BB9\u5931\u8D25\uFF1A"+p.value)}}function b(){m.value?f.value=m.value:f.value=JSON.stringify(c,null,2),d(),ae.info("\u5DF2\u91CD\u7F6E\u4E3A\u539F\u59CB\u914D\u7F6E")}function C(){try{const F=JSON.parse(f.value);f.value=JSON.stringify(F,null,2),ae.success("JSON \u683C\u5F0F\u5316\u6210\u529F")}catch{ae.error("JSON \u683C\u5F0F\u5316\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 JSON \u683C\u5F0F")}}function d(){try{if(!f.value.trim()){p.value="";return}JSON.parse(f.value),p.value=""}catch(F){p.value=F instanceof Error?F.message:"\u672A\u77E5\u9519\u8BEF"}}function P(){if(!p.value)try{const F=JSON.parse(f.value);u("saveEchartsData",F),ae.success("Echarts \u914D\u7F6E\u5DF2\u4FDD\u5B58"),r.value=!1}catch(F){p.value=F instanceof Error?F.message:"\u672A\u77E5\u9519\u8BEF",ae.error("\u4FDD\u5B58\u5931\u8D25\uFF1A"+p.value)}}function k(){r.value=!1}function I(F){r.value=!0,_e(()=>{v()})}function N(){}return We(()=>{window.addEventListener("resize",N)}),xl(()=>{window.removeEventListener("resize",N)}),e({show:I}),(F,V)=>{const R=U("el-alert"),L=U("el-button"),$=U("el-input"),z=U("el-drawer");return w(),S("div",Fu,[o(z,{modelValue:r.value,"onUpdate:modelValue":V[2]||(V[2]=Z=>r.value=Z),title:"Echarts \u6570\u636E\u7F16\u8F91",size:"660px",direction:"rtl",onClose:k,"destroy-on-close":!1},{footer:a(()=>[x("div",xu,[o(L,{onClick:V[1]||(V[1]=Z=>r.value=!1)},{default:a(()=>[...V[5]||(V[5]=[Y("\u53D6\u6D88",-1)])]),_:1}),o(L,{type:"primary",onClick:P,disabled:!!p.value||!g.value},{default:a(()=>[...V[6]||(V[6]=[Y("\u4FDD\u5B58",-1)])]),_:1},8,["disabled"])])]),default:a(()=>[x("div",Cu,[p.value?(w(),j(R,{key:0,title:"JSON \u683C\u5F0F\u9519\u8BEF",type:"error",description:p.value,"show-icon":"",closable:!1,class:"mb-3"},null,8,["description"])):le("",!0),!p.value&&f.value?(w(),j(R,{key:1,title:"JSON \u683C\u5F0F\u6B63\u786E",type:"info","show-icon":"",closable:!1,class:"mb-3"})):le("",!0),x("div",wu,[o(L,{size:"small",type:"primary",onClick:C,disabled:!f.value||!!p.value},{default:a(()=>[...V[3]||(V[3]=[Y("\u683C\u5F0F\u5316",-1)])]),_:1},8,["disabled"]),o(L,{size:"small",type:"warning",onClick:b,disabled:!g.value},{default:a(()=>[...V[4]||(V[4]=[Y("\u91CD\u7F6E",-1)])]),_:1},8,["disabled"])]),o($,{modelValue:f.value,"onUpdate:modelValue":V[0]||(V[0]=Z=>f.value=Z),type:"textarea",onInput:d,placeholder:"\u8BF7\u8F93\u5165 Echarts \u914D\u7F6E JSON",class:me(["json-textarea",{"error-input":p.value}])},null,8,["modelValue","class"])])]),_:1},8,["modelValue"])])}}}),Bu=Ve(Vu,[["__scopeId","data-v-a1785510"]]);const Au={class:"echarts-api-binding"},_u={key:0,class:"binding-wrapper"},Nu={class:"mb-2 json-actions"},ku={class:"mb-2 json-actions"},Tu={style:{flex:"auto"}},Iu=`
  8. const data = res?.List?.reverse() || [];
  9. const option = {
  10. xAxis: {
  11. type: 'category',
  12. data: data.map(item => item.ts)
  13. },
  14. series: [
  15. {
  16. data: data.map(item => item.value),
  17. type: 'line'
  18. }
  19. ]
  20. }
  21. return option;
  22. `,$u=we({__name:"echarts-api-binding",emits:["saveEchartsApi"],setup(t,{expose:e,emit:l}){const s=l,u=M(!1),r=M(),f=M(!1),m=Pe({interval:5,url:"",method:"GET",params:"",filter:""}),p=Pe({interval:[{required:!0,message:"\u8BF7\u8F93\u5165\u63A5\u53E3\u8BF7\u6C42\u95F4\u9694",trigger:"change"}],url:[{required:!0,message:"\u8BF7\u8F93\u5165\u63A5\u53E3\u5730\u5740",trigger:"change"}],params:[{validator:c,trigger:"blur"}],filter:[{required:!0,message:"\u8BF7\u8F93\u5165\u8FC7\u6EE4\u5668\u811A\u672C",trigger:"change"},{validator:b,trigger:"blur"}]});function g(k){if(k.url){if(m.interval=k.interval||5,m.url=k.url||"",m.method=k.method||"GET",k.params)try{typeof k.params=="string"?m.params=k.params:m.params=JSON.stringify(k.params,null,2)}catch{m.params=""}else m.params="";m.filter=k.filter||""}else m.interval=5,m.url="",m.method="GET",m.params="",m.filter="";f.value=!1}function c(k,I,N){if(!I.trim()){N();return}try{JSON.parse(m.params),N()}catch{N(new Error("\u65E0\u6548\u7684 JSON \u683C\u5F0F"))}}function v(){try{const k=JSON.parse(m.params);m.params=JSON.stringify(k,null,2),ae.success("\u683C\u5F0F\u5316\u6210\u529F")}catch{ae.error("\u683C\u5F0F\u5316\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 JSON \u683C\u5F0F")}}function b(k,I,N){if(!I.trim()){N(new Error("\u8BF7\u8F93\u5165\u8FC7\u6EE4\u5668\u811A\u672C"));return}try{const F=new Function("res",I);try{F({}),N()}catch(V){N(new Error("\u6267\u884C\u9519\u8BEF\uFF1A"+(V instanceof Error?V.message:"\u672A\u77E5\u9519\u8BEF")))}}catch(F){N(new Error("\u8BED\u6CD5\u9519\u8BEF\uFF1A"+(F instanceof Error?F.message:"\u672A\u77E5\u9519\u8BEF")))}}function C(){var k;f.value=!0,(k=r.value)==null||k.validate(I=>{if(I)try{const N={interval:m.interval,url:m.url,method:m.method,params:m.params?JSON.parse(m.params):{},filter:m.filter};s("saveEchartsApi",N),ae.success("\u63A5\u53E3\u7ED1\u5B9A\u6210\u529F"),u.value=!1}catch(N){ae.error("\u4FDD\u5B58\u5931\u8D25\uFF1A"+(N instanceof Error?N.message:"\u672A\u77E5\u9519\u8BEF"))}else ae.error("\u8BF7\u5B8C\u5584\u8868\u5355\u4FE1\u606F")})}function d(k){u.value=!0,_e(()=>{g(k)})}e({show:d});function P(k){var F;const I=((F=k==null?void 0:k.List)==null?void 0:F.reverse())||[];return{xAxis:{type:"category",data:I.map(V=>V.ts)},series:[{data:I.map(V=>V.value),type:"line"}]}}return console.log(JSON.stringify(P)),(k,I)=>{const N=U("el-input"),F=U("el-form-item"),V=U("el-radio"),R=U("el-radio-group"),L=U("el-button"),$=U("el-form"),z=U("el-drawer");return w(),S("div",Au,[o(z,{modelValue:u.value,"onUpdate:modelValue":I[6]||(I[6]=Z=>u.value=Z),title:"Echarts \u63A5\u53E3\u7ED1\u5B9A",size:"660px",direction:"rtl","destroy-on-close":!1},{footer:a(()=>[x("div",Tu,[o(L,{onClick:I[5]||(I[5]=Z=>u.value=!1)},{default:a(()=>[...I[12]||(I[12]=[Y("\u53D6\u6D88",-1)])]),_:1}),o(L,{type:"primary",onClick:C},{default:a(()=>[...I[13]||(I[13]=[Y("\u4FDD\u5B58",-1)])]),_:1})])]),default:a(()=>[u.value?(w(),S("div",_u,[o($,{ref_key:"formRef",ref:r,model:m,"label-width":"80px",rules:p},{default:a(()=>[o(F,{label:"\u8BF7\u6C42\u95F4\u9694",prop:"interval"},{default:a(()=>[o(N,{modelValue:m.interval,"onUpdate:modelValue":I[0]||(I[0]=Z=>m.interval=Z),type:"number",placeholder:"\u8BF7\u6C42\u95F4\u9694",clearable:""},{append:a(()=>[...I[7]||(I[7]=[Y("\u79D2",-1)])]),_:1},8,["modelValue"])]),_:1}),o(F,{label:"\u63A5\u53E3\u5730\u5740",prop:"url"},{default:a(()=>[o(N,{modelValue:m.url,"onUpdate:modelValue":I[1]||(I[1]=Z=>m.url=Z),placeholder:"\u5F53\u524D\u9879\u76EE\u4E2D\u63A5\u53E3\uFF1A/api/v1/xxx \u5176\u4ED6\u9879\u76EE\u4E2D\u63A5\u53E3\uFF1A http://xxx.com/xxx/xxx",clearable:""},null,8,["modelValue"])]),_:1}),o(F,{label:"\u8BF7\u6C42\u65B9\u6CD5",prop:"method"},{default:a(()=>[o(R,{modelValue:m.method,"onUpdate:modelValue":I[2]||(I[2]=Z=>m.method=Z)},{default:a(()=>[o(V,{label:"GET"},{default:a(()=>[...I[8]||(I[8]=[Y("GET",-1)])]),_:1}),o(V,{label:"POST"},{default:a(()=>[...I[9]||(I[9]=[Y("POST",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(F,{label:"\u8BF7\u6C42\u53C2\u6570",prop:"params"},{default:a(()=>[x("div",Nu,[o(L,{size:"small",type:"primary",onClick:v,disabled:!m.params},{default:a(()=>[...I[10]||(I[10]=[Y("\u683C\u5F0F\u5316",-1)])]),_:1},8,["disabled"])]),o(N,{modelValue:m.params,"onUpdate:modelValue":I[3]||(I[3]=Z=>m.params=Z),type:"textarea",placeholder:`\u8BF7\u8F93\u5165\u8BF7\u6C42\u53C2\u6570 (JSON\u683C\u5F0F\uFF0CGET \u8BF7\u6C42\u4F1A\u81EA\u52A8\u5C06\u8BF7\u6C42\u53C2\u6570\u8F6C\u6362\u4E3A query)
  23. \u53EF\u4EE5\u7528 $deviceKey $propertyKey \u4EE3\u66FF\u5F53\u524D\u7ED1\u5B9A\u7684\u8BBE\u5907ID\u548C\u5C5E\u6027ID \u4F8B\u5982\uFF1A
  24. ${JSON.stringify({deviceKey:"$deviceKey",propertyKey:"$propertyKey",xxx:"xxx"},null,2)}`,class:"params-textarea"},null,8,["modelValue","placeholder"])]),_:1}),o(F,{label:"\u8FC7\u6EE4\u5668",class:"mb-3",prop:"filter"},{default:a(()=>[x("div",ku,[o(L,{size:"small",type:"primary",onClick:b,disabled:!m.filter},{default:a(()=>[...I[11]||(I[11]=[Y("\u68C0\u67E5\u8BED\u6CD5",-1)])]),_:1},8,["disabled"])]),o(N,{modelValue:m.filter,"onUpdate:modelValue":I[4]||(I[4]=Z=>m.filter=Z),type:"textarea",placeholder:`\u63A5\u53E3\u8FD4\u56DE\u503C\u4E3A res \u8FC7\u6EE4\u5668\u7684\u8FD4\u56DE\u503C\u4E3A echarts\u914D\u7F6E\u4E2D\u7684option\u5BF9\u8C61\uFF0C\u4F8B\u5982\uFF1A
  25. ${Iu}`,class:"filter-textarea"},null,8,["modelValue","placeholder"])]),_:1})]),_:1},8,["model","rules"])])):le("",!0)]),_:1},8,["modelValue"])])}}}),Du=Ve($u,[["__scopeId","data-v-595bb041"]]);const Su={class:"pen bl"},Ou={class:"collapse-wrapper"},Uu={class:"collapse-wrapper"},Pu={class:"collapse-wrapper"},Ru={class:"collapse-wrapper"},Mu={class:"collapse-wrapper"},zu={class:"collapse-wrapper"},Lu={class:"collapse-wrapper"},Ju={class:"collapse-wrapper"},ju={class:"collapse-wrapper"},Ku={class:"collapse-wrapper"},Gu={class:"collapse-wrapper"},Yu={class:"collapse-wrapper"},Xu={class:"collapse-wrapper"},Wu={key:0,class:"collapse-wrapper"},Hu={key:1,class:"collapse-wrapper"},qu={key:1,class:"pens"},Zu={class:"flex justify-between align"},Qu={class:"collapse-wrapper"},es={class:"collapse-wrapper"},ts={class:"collapse-wrapper"},ls={class:"collapse-wrapper"},ns={class:"collapse-wrapper"},os={class:"collapse-wrapper"},us={class:"collapse-wrapper"},ss=we({__name:"index",setup(t){const e=$t(),l=Ee(()=>e.getters.currentComp),s=Ee(()=>e.getters.currentDrawing),u=Ee(()=>d.devName?d.devName+"-"+d.pointName:""),r=Ee(()=>d.funcName?d.funcDevName+"-"+d.funcName:""),f=M([]);fe.deviceList().then(B=>{f.value=B.device}),dt(l,B=>{!B||(m.value=B.name||new Date().toLocaleString())}),dt(s,B=>{!B||(m.value=B.name||new Date().toLocaleString())});const m=M("");dt(m,()=>{l.value?e.commit("setCurrentComp",{...l.value,name:m.value}):s.value&&e.commit("setCurrentDrawing",{...s.value,name:m.value})});const p=["lineName","attrName"],g={id:"",name:"",x:0,y:0,width:0,height:0,rotate:void 0,dataBindSwith:void 0,animateCycle:1/0,autoPlay:!1,animateType:"",showDuration:void 0,devId:"",funcDevId:"",funcDevName:"",devName:"",pointName:"",funcKey:"",pointId:"",funcInputs:[],deviceKey:"",funcName:"",tags:void 0,combineMap:void 0,events:void 0};let c;const v=M([]),b=M([]),C=Pe({...Je});We(()=>{setTimeout(()=>{c=window.meta2d,Object.assign(C,{...Je}),c.on("active",B=>{v.value=[...B],z(B)}),c.on("opened",()=>{var B,n;Object.assign(C,c.getOptions()),C.eventPassword=((n=(B=c.store.data)==null?void 0:B.options)==null?void 0:n.eventPassword)||"",b.value=[...c.store.data.pens]}),c.on("inactive",()=>{v.value=[],b.value=[...c.store.data.pens]})},0)});const d=Pe({...g}),P=Ee(()=>c.getPenRect(d));function k(B,n){const T=d||v.value[0];c.setValue({id:T==null?void 0:T.id,[B]:Number(n)},{render:!0})}function I(B){switch(E("animateType",B),B){case"":E("frames",[]),L("stopAnimate",v.value[0].id);break;case"rotate":E("showDuration",1e3),E("frames",[{rotate:360,duration:1e3}]);break;case"upDown":E("showDuration",560),E("frames",[{y:-10,duration:100},{y:10,duration:80},{y:-10,duration:50},{y:10,duration:30},{y:0,duration:300}]);break;case"leftRight":E("showDuration",560),E("frames",[{x:-10,duration:100},{x:10,duration:80},{x:-10,duration:50},{x:10,duration:30},{x:0,duration:300}]);break;case"heart":E("showDuration",500),E("frames",[{scale:1.1,duration:100},{scale:1,duration:400}]);break;case"show":E("showDuration",300),E("frames",[{color:"#fa541c",rotate:-10,duration:100},{color:"#fa541c",rotate:10,duration:100},{color:"#fa541c",rotate:0,duration:100}]);break}c.render(1/0)}function N(){var n;const B={action:"",name:"",type:"",isSwitch:!1,enablePassword:!1,eventPassword:"",value:{},where:{},link:{url:"",target:"",width:"",height:"",title:""},attr:{productKey:"",deviceKey:"",deviceName:"",attrKey:"",attrName:"",attrType:"",attrDecimals:"",attrUnit:"",attrValue:"",valueType:"fixed",penId:""},params:""};(n=d.events)!=null&&n.length?Object.assign(d,{events:[...d.events,B]}):Object.assign(d,{events:[{...B}]}),c.setValue({id:v.value[0].id,events:d.events})}function F(){Object.assign(d,{events:void 0}),c.setValue({id:v.value[0].id,events:void 0})}dt(C,()=>{c.setOptions(Vl(C)),c.resize()});const V=Pe({width:null,space:30});function R(){c.layout(v.value.length?v.value:c.store.data.pens,V.width,V.space)}function L(B,n){c[B](n)}function $(B){if(B==="spaceBetween")return c.spaceBetween(v.value);if(B==="spaceBetweenColumn")return c.spaceBetweenColumn(v.value);c.alignNodes(B,v.value)}function z(B){if(B.length===1){const n=B[0];Object.assign(d,{...g},n),n.onMove=xt.throttle(({x:T,y})=>{Object.assign(d,n)},200),n.onResize=xt.throttle(({width:T,height:y})=>{Object.assign(d,n)},200),n.onRotate=xt.throttle(({rotate:T})=>{Object.assign(d,n)},200)}}function Z(B,n){c.updateLineType(B,n),ce(B,"lineName")}function ie(B,n){d.combineMap={...d.combineMap,[B]:n},E("combineMap",d.combineMap),c.render(1/0)}function K(B){const n=v.value[0];if(!n||n.name!=="combine"){E("color",B);return}const T=[],y=G=>{G==null||G.forEach(W=>{var ee;const H=c.store.pens[W];!H||(T.push({id:W,color:H.color,background:H.background,followColor:H.followColor}),(ee=H.children)!=null&&ee.length&&y(H.children))})};y(n.children||[]),E("color",B),T.forEach(({id:G,color:W,background:H,followColor:ee})=>{(ee||W&&H&&W===H)&&c.setValue({id:G,background:B})}),c.render(1/0)}function E(B,n,T,y=!0){if(!T&&v.value.length>1){let G=[];v.value.forEach(W=>{E(B,n,W,!1),G.push(W)}),c.render(1/0),c.active(G);return}if(B){const G=T||v.value[0];c.setValue({id:G==null?void 0:G.id,[B]:n}),B==="tags"&&G.name==="text"&&c.setValue({id:G==null?void 0:G.id,text:"0"})}}function ce(B,n,T=!0){if(p.includes(n)){const y=[B];c.delete(y),c.addPens(y),T&&c.active(y,!0)}}function Ne(){var B,n,T;ot.value=((n=(B=v.value[0])==null?void 0:B.echarts)==null?void 0:n.option)||{},(T=ut.value)==null||T.show(v.value[0])}function Te(B){if(!v.value.length)return;E("echarts",{option:B}),c.render(1/0)}function re(){var n,T;const B=((n=v.value[0])==null?void 0:n.echartsApi)||{};(T=A.value)==null||T.show(B)}function tt(B){if(!v.value.length)return;const n=v.value[0];c.setValue({id:n.id,echartsApi:B})}function je(){const{devId:B,pointId:n,devName:T,pointName:y,tags:G}=v.value[0];_.value.show({devId:B||"",pointId:n||"",devName:T,pointName:y,tags:G})}function lt({devId:B,pointId:n,devName:T,pointName:y,tags:G}){const H=[B+"-"+n,G[1]||""];E("devId",B,void 0,!1),E("pointId",n,void 0,!1),E("tags",H,void 0,!1),E("devName",T,void 0,!1),E("pointName",y),d.devName=T,d.pointName=y}function ht(){E("devId",void 0,void 0,!1),E("tags",void 0,void 0,!1),E("devName",void 0,void 0,!1),E("pointName",void 0),d.devName="",d.pointName=""}const nt=M(),ot=M({}),ut=M(),A=M(),_=M(),X=M();function se(){const{funcDevId:B,productKey:n,funcDevName:T,funcInputs:y,funcKey:G,funcName:W,deviceKey:H,tags:ee}=v.value[0];nt.value.show({funcDevId:B||"",productKey:n||"",funcDevName:T,funcInputs:y,funcKey:G,funcName:W,deviceKey:H,tags:ee})}function oe(){var n;const{events:B}=v.value[0];X.value.show((n=B==null?void 0:B[0])==null?void 0:n.attr)}function Q({productKey:B,attrName:n,attrKey:T,deviceName:y,deviceKey:G,attrType:W,attrDecimals:H,attrUnit:ee}){var D;!((D=d.events)!=null&&D[0])||(d.events[0].attr={...d.events[0].attr,productKey:B,deviceKey:G,deviceName:y,attrKey:T,attrName:n,attrType:W,attrDecimals:H,attrUnit:ee},E("events",d.events))}function he(B){var n;!((n=d.events)!=null&&n[0])||(d.events[0].attr.attrValue=B,E("events",d.events))}function He(B){var n;!((n=d.events)!=null&&n[0])||(d.events[0].attr.valueType=B,B==="fixed"?d.events[0].attr.penId="":d.events[0].attr.attrValue="",E("events",d.events))}function yt(B){var n;!((n=d.events)!=null&&n[0])||(d.events[0].attr.penId=B,E("events",d.events))}function bt(B){var n;!((n=d.events)!=null&&n[0])||(d.events[0].attr.switchStatus=B,E("events",d.events))}const Et=Ee(()=>{var B;return d.name==="combine"&&typeof d.showChild=="number"&&((B=d.children)==null?void 0:B.length)===2}),q=Ee(()=>b.value.filter(B=>B.input===!0));function ne({funcDevId:B,productKey:n,funcDevName:T,funcKey:y,funcInputs:G,funcName:W,deviceKey:H,tags:ee}){const D=B+"-"+y,ue=ee!=null&&ee.length?[ee[0],D]:["",D];E("funcDevId",B,void 0,!1),E("productKey",n,void 0,!1),E("tags",ue,void 0,!1),E("funcDevName",T,void 0,!1),E("funcInputs",G,void 0,!1),E("funcName",W,void 0,!1),E("deviceKey",H,void 0,!1),E("funcKey",y),d.funcDevName=T,d.funcName=W}function ge(){E("funcDevId",void 0,void 0,!1),E("productKey",void 0,void 0,!1),E("tags",void 0,void 0,!1),E("funcDevName",void 0,void 0,!1),E("funcInputs",void 0,void 0,!1),E("funcName",void 0,void 0,!1),E("deviceKey",void 0,void 0,!1),E("funcKey",void 0),d.funcDevName="",d.funcName=""}function Ie(){Object.assign(d,{events:void 0})}function Be(B){B?(E("dash",B,void 0,!1),E("lineDash",[B*5,B*5])):(E("dash",void 0,void 0,!1),E("lineDash",void 0,void 0,!1))}return(B,n)=>{const T=U("el-input"),y=U("el-form-item"),G=U("el-switch"),W=U("el-form"),H=U("el-collapse-item"),ee=U("el-color-picker"),D=U("el-option"),ue=U("el-select"),Oe=U("el-collapse"),Fe=U("el-tab-pane"),xe=U("el-button"),Pt=U("el-icon"),ke=U("el-tooltip"),Ae=U("el-radio"),Ft=U("el-radio-group"),yl=U("el-text"),bl=U("el-slider"),Ct=U("el-tabs");return w(),S("div",Su,[v.value.length===1?(w(),j(Ct,{key:0,"model-value":"\u5916\u89C2"},{default:a(()=>[v.value[0].name==="combine"?(w(),j(Fe,{key:0,label:"\u5916\u89C2",name:"\u5916\u89C2"},{default:a(()=>[o(Oe,{"model-value":["\u4F4D\u7F6E\u548C\u5927\u5C0F","\u6837\u5F0F","\u72B6\u6001"]},{default:a(()=>[o(H,{title:"\u4F4D\u7F6E\u548C\u5927\u5C0F",name:"\u4F4D\u7F6E\u548C\u5927\u5C0F"},{default:a(()=>[x("div",Ou,[o(W,{ref:"form",model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"X"},{default:a(()=>[o(T,{modelValue:P.value.x,"onUpdate:modelValue":n[0]||(n[0]=i=>P.value.x=i),modelModifiers:{number:!0},type:"number",onInput:n[1]||(n[1]=i=>k("x",i)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"Y"},{default:a(()=>[o(T,{modelValue:P.value.y,"onUpdate:modelValue":n[2]||(n[2]=i=>P.value.y=i),modelModifiers:{number:!0},type:"number",onInput:n[3]||(n[3]=i=>k("y",i)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u5BBD"},{default:a(()=>[o(T,{modelValue:P.value.width,"onUpdate:modelValue":n[4]||(n[4]=i=>P.value.width=i),modelModifiers:{number:!0},type:"number",onInput:n[5]||(n[5]=i=>k("width",i)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u9AD8"},{default:a(()=>[o(T,{modelValue:P.value.height,"onUpdate:modelValue":n[6]||(n[6]=i=>P.value.height=i),modelModifiers:{number:!0},type:"number",onInput:n[7]||(n[7]=i=>k("height",i)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u65CB\u8F6C"},{default:a(()=>[o(T,{modelValue:d.rotate,"onUpdate:modelValue":n[8]||(n[8]=i=>d.rotate=i),modelModifiers:{number:!0},type:"number",onInput:n[9]||(n[9]=i=>E("rotate",Number(i))),placeholder:"\u5EA6"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u6C34\u5E73\u7FFB\u8F6C"},{default:a(()=>[o(G,{modelValue:d.flipX,"onUpdate:modelValue":n[10]||(n[10]=i=>d.flipX=i),onChange:n[11]||(n[11]=i=>E("flipX",i))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u5782\u76F4\u7FFB\u8F6C"},{default:a(()=>[o(G,{modelValue:d.flipY,"onUpdate:modelValue":n[12]||(n[12]=i=>d.flipY=i),onChange:n[13]||(n[13]=i=>E("flipY",i))},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}),o(H,{title:"\u6837\u5F0F",name:"\u6837\u5F0F"},{default:a(()=>[x("div",Uu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.color,"onUpdate:modelValue":n[14]||(n[14]=i=>d.color=i),onChange:n[15]||(n[15]=i=>K(i)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u80CC\u666F\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.background,"onUpdate:modelValue":n[16]||(n[16]=i=>d.background=i),onChange:n[17]||(n[17]=i=>E("background",i)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u7EBF\u6761\u5BBD\u5EA6"},{default:a(()=>[o(T,{modelValue:d.lineWidth,"onUpdate:modelValue":n[18]||(n[18]=i=>d.lineWidth=i),type:"number",onInput:n[19]||(n[19]=i=>E("lineWidth",i)),placeholder:" "},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}),typeof d.showChild=="number"?(w(),j(H,{key:0,title:"\u72B6\u6001",name:"\u72B6\u6001"},{default:a(()=>[x("div",Pu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u72B6\u6001"},{default:a(()=>[o(ue,{modelValue:d.showChild,"onUpdate:modelValue":n[20]||(n[20]=i=>d.showChild=i),onChange:n[21]||(n[21]=i=>E("showChild",i)),placeholder:"\u72B6\u6001"},{default:a(()=>{var i;return[((i=d.children)==null?void 0:i.length)===2?(w(!0),S(te,{key:0},pe(d.children,(h,$e)=>(w(),j(D,{label:`\u72B6\u6001-${$e+1}`,value:$e,key:h},null,8,["label","value"]))),128)):(w(!0),S(te,{key:1},pe(d.children,(h,$e)=>(w(),j(D,{label:`\u72B6\u6001-${$e+1}`,value:$e,key:h},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])]),_:1}),d.children&&d.children.length>1&&d.combineMap?(w(),j(y,{key:0,label:"\u5BF9\u5E94\u503C"},{default:a(()=>[(w(!0),S(te,null,pe(d.children,(i,h)=>(w(),j(T,{key:i,modelValue:d.combineMap[h+1],"onUpdate:modelValue":$e=>d.combineMap[h+1]=$e,onInput:$e=>ie(h+1,$e),placeholder:"\u8BF7\u8F93\u5165",style:{"margin-bottom":"6px"}},{prepend:a(()=>[Y("\u72B6\u6001"+Le(h+1),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onInput"]))),128))]),_:1})):le("",!0)]),_:1},8,["model"])])]),_:1})):le("",!0)]),_:1})]),_:1})):v.value[0].name==="line"?(w(),j(Fe,{key:1,label:"\u5916\u89C2",name:"\u5916\u89C2"},{default:a(()=>[o(Oe,{"model-value":["\u6837\u5F0F","\u6587\u5B57"]},{default:a(()=>[o(H,{title:"\u6837\u5F0F",name:"\u6837\u5F0F"},{default:a(()=>[x("div",Ru,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.color,"onUpdate:modelValue":n[22]||(n[22]=i=>d.color=i),onChange:n[23]||(n[23]=i=>E("color",i)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u7EBF\u6761\u6837\u5F0F"},{default:a(()=>[o(ue,{modelValue:d.dash,"onUpdate:modelValue":n[24]||(n[24]=i=>d.dash=i),onChange:Be,placeholder:" "},{default:a(()=>[o(D,{label:"\u76F4\u7EBF",value:0}),o(D,{label:"\u95F4\u9694\u7EBF1",value:1}),o(D,{label:"\u95F4\u9694\u7EBF2",value:2}),o(D,{label:"\u95F4\u9694\u7EBF3",value:3})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u8FDE\u7EBF\u6837\u5F0F"},{default:a(()=>[o(ue,{modelValue:d.lineName,"onUpdate:modelValue":n[25]||(n[25]=i=>d.lineName=i),onChange:n[26]||(n[26]=i=>Z(v.value[0],i)),placeholder:" "},{default:a(()=>[(w(!0),S(te,null,pe(J(ft),i=>(w(),j(D,{label:i.label,value:i.name,key:i.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u8D77\u70B9\u7BAD\u5934"},{default:a(()=>[o(ue,{modelValue:d.fromArrow,"onUpdate:modelValue":n[27]||(n[27]=i=>d.fromArrow=i),onChange:n[28]||(n[28]=i=>E("fromArrow",i)),placeholder:" "},{default:a(()=>[(w(!0),S(te,null,pe(J(ct),i=>(w(),j(D,{value:i,key:i},{default:a(()=>[x("i",{class:me(["t-icon",`t-from-${i}`])},null,2)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u7EC8\u70B9\u7BAD\u5934"},{default:a(()=>[o(ue,{modelValue:d.toArrow,"onUpdate:modelValue":n[29]||(n[29]=i=>d.toArrow=i),onChange:n[30]||(n[30]=i=>E("toArrow",i)),placeholder:" "},{default:a(()=>[(w(!0),S(te,null,pe(J(ct),i=>(w(),j(D,{label:i,value:i,key:i},{default:a(()=>[x("i",{class:me(["t-icon",`t-to-${i}`])},null,2)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u7EBF\u6761\u5BBD\u5EA6"},{default:a(()=>[o(T,{modelValue:d.lineWidth,"onUpdate:modelValue":n[31]||(n[31]=i=>d.lineWidth=i),type:"number",onInput:n[32]||(n[32]=i=>E("lineWidth",i)),placeholder:" "},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}),o(H,{title:"\u6587\u5B57",name:"\u6587\u5B57"},{default:a(()=>[x("div",Mu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u5B57\u4F53\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.textColor,"onUpdate:modelValue":n[33]||(n[33]=i=>d.textColor=i),onChange:n[34]||(n[34]=i=>E("textColor",i)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u6587\u5B57\u5927\u5C0F"},{default:a(()=>[o(T,{modelValue:d.fontSize,"onUpdate:modelValue":n[35]||(n[35]=i=>d.fontSize=i),type:"number",onInput:n[36]||(n[36]=i=>E("fontSize",i)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u6587\u5B57\u884C\u9AD8"},{default:a(()=>[o(T,{modelValue:d.lineHeight,"onUpdate:modelValue":n[37]||(n[37]=i=>d.lineHeight=i),type:"number",onInput:n[38]||(n[38]=i=>E("lineHeight",i)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u503E\u659C"},{default:a(()=>[o(ue,{modelValue:d.fontStyle,"onUpdate:modelValue":n[39]||(n[39]=i=>d.fontStyle=i),onChange:n[40]||(n[40]=i=>E("fontStyle",i)),placeholder:"\u503E\u659C"},{default:a(()=>[o(D,{label:"\u6B63\u5E38",value:"normal"}),o(D,{label:"\u503E\u659C",value:"italic"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u52A0\u7C97"},{default:a(()=>[o(ue,{modelValue:d.fontWeight,"onUpdate:modelValue":n[41]||(n[41]=i=>d.fontWeight=i),onChange:n[42]||(n[42]=i=>E("fontWeight",i)),placeholder:"\u52A0\u7C97"},{default:a(()=>[o(D,{label:"\u6B63\u5E38",value:"normal"}),o(D,{label:"\u52A0\u7C97",value:"bold"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u6C34\u5E73\u5BF9\u9F50"},{default:a(()=>[o(ue,{modelValue:d.textAlign,"onUpdate:modelValue":n[43]||(n[43]=i=>d.textAlign=i),onChange:n[44]||(n[44]=i=>E("textAlign",i)),placeholder:"\u6C34\u5E73\u5BF9\u9F50"},{default:a(()=>[o(D,{label:"\u5DE6\u5BF9\u9F50",value:"left"}),o(D,{label:"\u5C45\u4E2D",value:"center"}),o(D,{label:"\u53F3\u5BF9\u9F50",value:"right"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u5782\u76F4\u5BF9\u9F50"},{default:a(()=>[o(ue,{modelValue:d.textBaseline,"onUpdate:modelValue":n[45]||(n[45]=i=>d.textBaseline=i),onChange:n[46]||(n[46]=i=>E("textBaseline",i)),placeholder:"\u5782\u76F4\u5BF9\u9F50"},{default:a(()=>[o(D,{label:"\u9876\u90E8\u5BF9\u9F50",value:"top"}),o(D,{label:"\u5C45\u4E2D",value:"middle"}),o(D,{label:"\u5E95\u90E8\u5BF9\u9F50",value:"bottom"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u9690\u85CF\u6587\u5B57"},{default:a(()=>[o(G,{modelValue:d.hiddenText,"onUpdate:modelValue":n[47]||(n[47]=i=>d.hiddenText=i),onChange:n[48]||(n[48]=i=>E("hiddenText",i))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u8D85\u51FA\u7701\u7565"},{default:a(()=>[o(G,{modelValue:d.ellipsis,"onUpdate:modelValue":n[49]||(n[49]=i=>d.ellipsis=i),onChange:n[50]||(n[50]=i=>E("ellipsis",i))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u4FDD\u7559\u5C0F\u6570"},{default:a(()=>[o(T,{modelValue:d.keepDecimal,"onUpdate:modelValue":n[51]||(n[51]=i=>d.keepDecimal=i),modelModifiers:{number:!0},type:"number",onInput:n[52]||(n[52]=i=>E("keepDecimal",Number(i))),placeholder:" "},null,8,["modelValue"])]),_:1}),o(y,{label:"\u6587\u672C\u5185\u5BB9"},{default:a(()=>[o(T,{modelValue:d.text,"onUpdate:modelValue":n[53]||(n[53]=i=>d.text=i),type:"textarea",autosize:{minRows:4},onInput:n[54]||(n[54]=i=>E("text",i)),placeholder:" "},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1})]),_:1})]),_:1})):(w(),j(Fe,{key:2,label:"\u5916\u89C2",name:"\u5916\u89C2"},{default:a(()=>[o(Oe,{"model-value":["Echarts","\u4F4D\u7F6E\u548C\u5927\u5C0F","\u6837\u5F0F","\u6587\u5B57","\u56FE\u7247","\u5B57\u4F53\u56FE\u6807","\u8FDB\u5EA6\u6761","\u5F00\u5173\u8BBE\u7F6E"]},{default:a(()=>{var i;return[d.name==="echarts"?(w(),j(H,{key:0,title:"Echarts",name:"Echarts"},{default:a(()=>[x("div",zu,[o(W,{ref:"form",model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u521D\u59CB\u6570\u636E"},{default:a(()=>[o(xe,{type:"primary",size:"small",onClick:n[55]||(n[55]=h=>Ne())},{default:a(()=>[...n[196]||(n[196]=[Y("\u4FEE\u6539\u6570\u636E",-1)])]),_:1})]),_:1}),o(y,{label:"\u63A5\u53E3\u7ED1\u5B9A"},{default:a(()=>[o(xe,{type:"primary",size:"small",onClick:n[56]||(n[56]=h=>re())},{default:a(()=>[...n[197]||(n[197]=[Y("\u7ED1\u5B9A\u63A5\u53E3",-1)])]),_:1})]),_:1})]),_:1},8,["model"])])]),_:1})):le("",!0),o(H,{title:"\u4F4D\u7F6E\u548C\u5927\u5C0F",name:"\u4F4D\u7F6E\u548C\u5927\u5C0F"},{default:a(()=>[x("div",Lu,[o(W,{ref:"form",model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"X"},{default:a(()=>[o(T,{modelValue:P.value.x,"onUpdate:modelValue":n[57]||(n[57]=h=>P.value.x=h),modelModifiers:{number:!0},type:"number",onInput:n[58]||(n[58]=h=>k("x",h)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"Y"},{default:a(()=>[o(T,{modelValue:P.value.y,"onUpdate:modelValue":n[59]||(n[59]=h=>P.value.y=h),modelModifiers:{number:!0},type:"number",onInput:n[60]||(n[60]=h=>k("y",h)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u5BBD"},{default:a(()=>[o(T,{modelValue:P.value.width,"onUpdate:modelValue":n[61]||(n[61]=h=>P.value.width=h),modelModifiers:{number:!0},type:"number",onInput:n[62]||(n[62]=h=>k("width",h)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u9AD8"},{default:a(()=>[o(T,{modelValue:P.value.height,"onUpdate:modelValue":n[63]||(n[63]=h=>P.value.height=h),modelModifiers:{number:!0},type:"number",onInput:n[64]||(n[64]=h=>k("height",h)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u65CB\u8F6C"},{default:a(()=>[o(T,{modelValue:d.rotate,"onUpdate:modelValue":n[65]||(n[65]=h=>d.rotate=h),modelModifiers:{number:!0},type:"number",onInput:n[66]||(n[66]=h=>E("rotate",Number(h))),placeholder:"\u5EA6"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u6C34\u5E73\u7FFB\u8F6C"},{default:a(()=>[o(G,{modelValue:d.flipX,"onUpdate:modelValue":n[67]||(n[67]=h=>d.flipX=h),onChange:n[68]||(n[68]=h=>E("flipX",h))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u5782\u76F4\u7FFB\u8F6C"},{default:a(()=>[o(G,{modelValue:d.flipY,"onUpdate:modelValue":n[69]||(n[69]=h=>d.flipY=h),onChange:n[70]||(n[70]=h=>E("flipY",h))},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}),["switch"].includes((d==null?void 0:d.name)||"")?(w(),j(H,{key:1,title:"\u5F00\u5173\u8BBE\u7F6E",name:"\u5F00\u5173\u8BBE\u7F6E"},{default:a(()=>[x("div",Ju,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u5F00\u542F\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.onColor,"onUpdate:modelValue":n[71]||(n[71]=h=>d.onColor=h),onChange:n[72]||(n[72]=h=>E("onColor",h)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u5173\u95ED\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.offColor,"onUpdate:modelValue":n[73]||(n[73]=h=>d.offColor=h),onChange:n[74]||(n[74]=h=>E("offColor",h)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1})]),_:1},8,["model"])])]),_:1})):le("",!0),o(H,{title:"\u6837\u5F0F",name:"\u6837\u5F0F"},{default:a(()=>[x("div",ju,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.color,"onUpdate:modelValue":n[75]||(n[75]=h=>d.color=h),onChange:n[76]||(n[76]=h=>E("color",h)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u80CC\u666F\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.background,"onUpdate:modelValue":n[77]||(n[77]=h=>d.background=h),onChange:n[78]||(n[78]=h=>E("background",h)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u7EBF\u6761\u6837\u5F0F"},{default:a(()=>[o(ue,{modelValue:d.dash,"onUpdate:modelValue":n[79]||(n[79]=h=>d.dash=h),onChange:Be,placeholder:" "},{default:a(()=>[o(D,{label:"\u76F4\u7EBF",value:0}),o(D,{label:"\u95F4\u9694\u7EBF1",value:1}),o(D,{label:"\u95F4\u9694\u7EBF2",value:2}),o(D,{label:"\u95F4\u9694\u7EBF3",value:3})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u7EBF\u6761\u5BBD\u5EA6"},{default:a(()=>[o(T,{modelValue:d.lineWidth,"onUpdate:modelValue":n[80]||(n[80]=h=>d.lineWidth=h),type:"number",onInput:n[81]||(n[81]=h=>E("lineWidth",h)),placeholder:" "},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}),["square","rectangle","circle","triangle","diamond","pentagon","hexagon","pentagram","leftArrow","rightArrow","twowayArrow","cloud","message","file","people"].includes((i=d==null?void 0:d.name)!=null?i:"")?(w(),j(H,{key:2,title:"\u8FDB\u5EA6\u6761",name:"\u8FDB\u5EA6\u6761"},{default:a(()=>[x("div",Ku,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u8FDB\u5EA6"},{default:a(()=>[o(T,{modelValue:d.progress,"onUpdate:modelValue":n[82]||(n[82]=h=>d.progress=h),max:"1",min:"0",step:"0.1",type:"number",onInput:n[83]||(n[83]=h=>E("progress",h)),placeholder:"\u8F93\u51650\u52301\u7684\u6570\u5B57"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u8FDB\u5EA6\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.progressColor,"onUpdate:modelValue":n[84]||(n[84]=h=>d.progressColor=h),onChange:n[85]||(n[85]=h=>E("progressColor",h)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u5782\u76F4\u8FDB\u5EA6"},{default:a(()=>[o(G,{modelValue:d.verticalProgress,"onUpdate:modelValue":n[86]||(n[86]=h=>d.verticalProgress=h),onChange:n[87]||(n[87]=h=>E("verticalProgress",h))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u53CD\u5411\u8FDB\u5EA6"},{default:a(()=>[o(G,{modelValue:d.reverseProgress,"onUpdate:modelValue":n[88]||(n[88]=h=>d.reverseProgress=h),onChange:n[89]||(n[89]=h=>E("reverseProgress",h))},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1})):le("",!0),o(H,{title:"\u6587\u5B57",name:"\u6587\u5B57"},{default:a(()=>[x("div",Gu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u5B57\u4F53\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.textColor,"onUpdate:modelValue":n[90]||(n[90]=h=>d.textColor=h),onChange:n[91]||(n[91]=h=>E("textColor",h)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u6587\u5B57\u5927\u5C0F"},{default:a(()=>[o(T,{modelValue:d.fontSize,"onUpdate:modelValue":n[92]||(n[92]=h=>d.fontSize=h),type:"number",onInput:n[93]||(n[93]=h=>E("fontSize",h)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u6587\u5B57\u884C\u9AD8"},{default:a(()=>[o(T,{modelValue:d.lineHeight,"onUpdate:modelValue":n[94]||(n[94]=h=>d.lineHeight=h),type:"number",onInput:n[95]||(n[95]=h=>E("lineHeight",h)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u503E\u659C"},{default:a(()=>[o(ue,{modelValue:d.fontStyle,"onUpdate:modelValue":n[96]||(n[96]=h=>d.fontStyle=h),onChange:n[97]||(n[97]=h=>E("fontStyle",h)),placeholder:"\u503E\u659C"},{default:a(()=>[o(D,{label:"\u6B63\u5E38",value:"normal"}),o(D,{label:"\u503E\u659C",value:"italic"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u52A0\u7C97"},{default:a(()=>[o(ue,{modelValue:d.fontWeight,"onUpdate:modelValue":n[98]||(n[98]=h=>d.fontWeight=h),onChange:n[99]||(n[99]=h=>E("fontWeight",h)),placeholder:"\u52A0\u7C97"},{default:a(()=>[o(D,{label:"\u6B63\u5E38",value:"normal"}),o(D,{label:"\u52A0\u7C97",value:"bold"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u6C34\u5E73\u5BF9\u9F50"},{default:a(()=>[o(ue,{modelValue:d.textAlign,"onUpdate:modelValue":n[100]||(n[100]=h=>d.textAlign=h),onChange:n[101]||(n[101]=h=>E("textAlign",h)),placeholder:"\u6C34\u5E73\u5BF9\u9F50"},{default:a(()=>[o(D,{label:"\u5DE6\u5BF9\u9F50",value:"left"}),o(D,{label:"\u5C45\u4E2D",value:"center"}),o(D,{label:"\u53F3\u5BF9\u9F50",value:"right"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u5782\u76F4\u5BF9\u9F50"},{default:a(()=>[o(ue,{modelValue:d.textBaseline,"onUpdate:modelValue":n[102]||(n[102]=h=>d.textBaseline=h),onChange:n[103]||(n[103]=h=>E("textBaseline",h)),placeholder:"\u5782\u76F4\u5BF9\u9F50"},{default:a(()=>[o(D,{label:"\u9876\u90E8\u5BF9\u9F50",value:"top"}),o(D,{label:"\u5C45\u4E2D",value:"middle"}),o(D,{label:"\u5E95\u90E8\u5BF9\u9F50",value:"bottom"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u9690\u85CF\u6587\u5B57"},{default:a(()=>[o(G,{modelValue:d.hiddenText,"onUpdate:modelValue":n[104]||(n[104]=h=>d.hiddenText=h),onChange:n[105]||(n[105]=h=>E("hiddenText",h))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u8D85\u51FA\u7701\u7565"},{default:a(()=>[o(G,{modelValue:d.ellipsis,"onUpdate:modelValue":n[106]||(n[106]=h=>d.ellipsis=h),onChange:n[107]||(n[107]=h=>E("ellipsis",h))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u4FDD\u7559\u5C0F\u6570"},{default:a(()=>[o(T,{modelValue:d.keepDecimal,"onUpdate:modelValue":n[108]||(n[108]=h=>d.keepDecimal=h),modelModifiers:{number:!0},type:"number",onInput:n[109]||(n[109]=h=>E("keepDecimal",Number(h))),placeholder:" "},null,8,["modelValue"])]),_:1}),o(y,{label:"\u6587\u672C\u5185\u5BB9"},{default:a(()=>[o(T,{modelValue:d.text,"onUpdate:modelValue":n[110]||(n[110]=h=>d.text=h),type:"textarea",autosize:{minRows:4},onInput:n[111]||(n[111]=h=>E("text",h)),placeholder:" "},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}),o(H,{title:"\u56FE\u7247",name:"\u56FE\u7247"},{default:a(()=>[x("div",Yu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[d.name==="image"?(w(),j(y,{key:0,label:"\u56FE\u7247\u5730\u5740"},{default:a(()=>[o(T,{modelValue:d.image,"onUpdate:modelValue":n[112]||(n[112]=h=>d.image=h),onInput:n[113]||(n[113]=h=>E("image",h)),placeholder:" "},null,8,["modelValue"])]),_:1})):le("",!0),o(y,{label:"\u4FDD\u6301\u6BD4\u4F8B"},{default:a(()=>[o(G,{modelValue:d.imageRatio,"onUpdate:modelValue":n[114]||(n[114]=h=>d.imageRatio=h),onChange:n[115]||(n[115]=h=>E("imageRatio",h))},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}),o(H,{title:"\u5B57\u4F53\u56FE\u6807",name:"\u5B57\u4F53\u56FE\u6807"},{default:a(()=>[x("div",Xu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.iconColor,"onUpdate:modelValue":n[116]||(n[116]=h=>d.iconColor=h),onChange:n[117]||(n[117]=h=>E("iconColor",h)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1})]),_:1},8,["model"])])]),_:1})]}),_:1})]),_:1})),o(Fe,{label:"\u4E8B\u4EF6",name:"\u4E8B\u4EF6"},{default:a(()=>[o(W,{model:d,"label-width":"65px","label-position":"left",class:"p-3",size:"small"},{default:a(()=>[d.events?(w(),j(y,{key:1,label:""},{default:a(()=>[o(xe,{type:"primary",onClick:F},{default:a(()=>[...n[199]||(n[199]=[Y("\u89E3\u9664\u4E8B\u4EF6\u7ED1\u5B9A",-1)])]),_:1})]),_:1})):(w(),j(y,{key:0,label:""},{default:a(()=>[o(xe,{type:"primary",onClick:N},{default:a(()=>[...n[198]||(n[198]=[Y("\u6DFB\u52A0\u4E8B\u4EF6",-1)])]),_:1})]),_:1})),(w(!0),S(te,null,pe(d.events,i=>(w(),S(te,{key:i.name},[o(y,{label:"\u4E8B\u4EF6\u7C7B\u578B"},{default:a(()=>[o(ue,{modelValue:i.type,"onUpdate:modelValue":h=>i.type=h,placeholder:"\u9009\u62E9\u4E8B\u4EF6\u7C7B\u578B"},{default:a(()=>[o(D,{label:"\u9F20\u6807\u5355\u51FB",value:"click"}),o(D,{label:"\u9F20\u6807\u53CC\u51FB",value:"dblclick"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),o(y,{label:"\u4E8B\u4EF6\u884C\u4E3A"},{default:a(()=>[o(ue,{modelValue:i.action,"onUpdate:modelValue":h=>i.action=h,placeholder:"\u9009\u62E9\u4E8B\u4EF6\u884C\u4E3A"},{default:a(()=>[o(D,{label:"\u6253\u5F00\u94FE\u63A5",value:"link"}),o(D,{label:"\u89E6\u53D1\u529F\u80FD",value:"func"}),o(D,{label:"\u8BBE\u7F6E\u5C5E\u6027",value:"attr"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),i.action==="link"?(w(),S(te,{key:0},[o(y,{label:"\u94FE\u63A5\u5730\u5740"},{default:a(()=>[o(T,{modelValue:i.link.url,"onUpdate:modelValue":h=>i.link.url=h,placeholder:"URL"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),o(y,{label:"\u6253\u5F00\u65B9\u5F0F"},{default:a(()=>[o(ue,{modelValue:i.link.target,"onUpdate:modelValue":h=>i.link.target=h,placeholder:"\u9009\u62E9\u6253\u5F00\u65B9\u5F0F"},{default:a(()=>[o(D,{label:"\u5F53\u524D\u9875\u9762",value:"_self"}),o(D,{label:"\u65B0\u7A97\u53E3\u6253\u5F00",value:"_blank"}),o(D,{label:"\u5F39\u7A97\u6253\u5F00",value:"iframe"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024)],64)):i.action==="func"?(w(),S(te,{key:1},[o(y,{label:"\u7ED1\u5B9A\u529F\u80FD"},{default:a(()=>[o(T,{modelValue:r.value,"onUpdate:modelValue":n[118]||(n[118]=h=>r.value=h),placeholder:"\u70B9\u51FB\u7ED1\u5B9A",onClick:se,readonly:""},{suffix:a(()=>[r.value?(w(),j(J(wt),{key:0,class:"input-icon",onClick:ge})):le("",!0)]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u662F\u5426\u5F00\u5173"},{default:a(()=>[o(G,{modelValue:i.isSwitch,"onUpdate:modelValue":h=>i.isSwitch=h,class:"mr-2"},null,8,["modelValue","onUpdate:modelValue"]),o(ke,{class:"item",effect:"dark",content:"\u5982\u679C\u9009\u62E9\u662F\u5F00\u5173\uFF0C\u70B9\u51FB\u5F00\u5173\u4F1A\u76F4\u63A5\u8FDB\u884C\u4E8B\u4EF6\u7684\u53D1\u9001\uFF0C\u4E0D\u4F1A\u51FA\u73B0\u4E8B\u4EF6\u5F39\u7A97\u3002\u4F1A\u6839\u636E\u7ED1\u5B9A\u529F\u80FD\u4E2D\u8F93\u5165\u53C2\u6570\u4E2D\u7B2C\u4E00\u4E2A\u53C2\u6570\u7684\u7C7B\u578B\u6765\u786E\u5B9A[boolean/int/string]\uFF0C \u5C06\u5F53\u524D\u72B6\u6001\u503C\u53D6\u53CD\u8FDB\u884C\u53C2\u6570\u4F20\u9012\uFF1Atrue/false 0/1 '0'/'1'",placement:"top"},{default:a(()=>[o(Pt,{style:{"font-size":"16px",color:"#ccc"}},{default:a(()=>[o(J(Rt))]),_:1})]),_:1})]),_:2},1024),o(y,{label:"\u542F\u7528\u5BC6\u7801"},{default:a(()=>[o(G,{modelValue:i.enablePassword,"onUpdate:modelValue":h=>i.enablePassword=h,class:"mr-2"},null,8,["modelValue","onUpdate:modelValue"]),o(ke,{class:"item",effect:"dark",content:"\u542F\u7528\u540E\uFF0C\u89E6\u53D1\u529F\u80FD\u6267\u884C\u524D\u9700\u8981\u8F93\u5165\u5BC6\u7801\u6821\u9A8C",placement:"top"},{default:a(()=>[o(Pt,{style:{"font-size":"16px",color:"#ccc"}},{default:a(()=>[o(J(Rt))]),_:1})]),_:1})]),_:2},1024),i.enablePassword?(w(),j(y,{key:0,label:"\u5BC6\u7801\u9A8C\u8BC1"},{default:a(()=>[o(T,{modelValue:i.eventPassword,"onUpdate:modelValue":h=>i.eventPassword=h,type:"password","show-password":"",clearable:"",placeholder:"\u4E0D\u586B\u5199\u5219\u4F7F\u7528\u5168\u5C40\u5BC6\u7801"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):le("",!0)],64)):i.action==="attr"?(w(),S(te,{key:2},[o(y,{label:"\u7ED1\u5B9A\u5C5E\u6027"},{default:a(()=>[o(T,{value:i.attr.deviceName?i.attr.deviceName+"-"+i.attr.attrName:"",placeholder:"\u70B9\u51FB\u7ED1\u5B9A",onClick:oe,readonly:""},{suffix:a(()=>[o(J(wt),{class:"input-icon",onClick:Ie})]),_:1},8,["value"])]),_:2},1024),o(y,{label:"\u503C\u7C7B\u578B"},{default:a(()=>[o(Ft,{modelValue:i.attr.valueType,"onUpdate:modelValue":h=>i.attr.valueType=h,onChange:n[119]||(n[119]=h=>He(h))},{default:a(()=>[o(Ae,{label:"fixed"},{default:a(()=>[...n[200]||(n[200]=[Y("\u56FA\u5B9A\u503C",-1)])]),_:1}),o(Ae,{label:"input"},{default:a(()=>[...n[201]||(n[201]=[Y("\u8F93\u5165\u6846",-1)])]),_:1}),d.name==="switch"?(w(),j(Ae,{key:"switchNumber",label:"switchNumber"},{default:a(()=>[...n[202]||(n[202]=[Y("\u5F00\u5173\u72B6\u6001\u5207\u6362(0/1)",-1)])]),_:1})):le("",!0),d.name==="switch"?(w(),j(Ae,{key:"switchBool",label:"switchBool"},{default:a(()=>[...n[203]||(n[203]=[Y("\u5F00\u5173\u72B6\u6001\u5207\u6362(true/false)",-1)])]),_:1})):le("",!0),Et.value?(w(),j(Ae,{key:"reverse",label:"reverse"},{default:a(()=>[...n[204]||(n[204]=[Y("\u53CD\u5411\u8BBE\u7F6E\u5C5E\u6027",-1)])]),_:1})):le("",!0)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),!i.attr.valueType||i.attr.valueType==="fixed"?(w(),j(y,{key:0,label:"\u5C5E\u6027\u503C"},{default:a(()=>[o(T,{modelValue:i.attr.attrValue,"onUpdate:modelValue":h=>i.attr.attrValue=h,onInput:n[120]||(n[120]=h=>he(h)),placeholder:"\u8BF7\u8F93\u5165\u5C5E\u6027\u503C"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):le("",!0),i.attr.valueType==="input"?(w(),j(y,{key:1,label:"\u9009\u62E9\u8F93\u5165\u6846","label-width":"auto"},{default:a(()=>[o(ue,{modelValue:i.attr.penId,"onUpdate:modelValue":h=>i.attr.penId=h,onChange:n[121]||(n[121]=h=>yt(h)),placeholder:"\u8BF7\u9009\u62E9\u8F93\u5165\u6846"},{default:a(()=>[(w(!0),S(te,null,pe(q.value,h=>(w(),j(D,{key:h.id,label:h.text||h.name||h.id,value:h.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):le("",!0),i.attr.valueType==="switchNumber"||i.attr.valueType==="switchBool"?(w(),j(y,{key:2,label:"\u5207\u6362\u72B6\u6001","label-width":"auto"},{default:a(()=>[o(Ft,{modelValue:i.attr.switchStatus,"onUpdate:modelValue":h=>i.attr.switchStatus=h,onChange:n[122]||(n[122]=h=>bt(h))},{default:a(()=>[o(Ae,{label:!0},{default:a(()=>[...n[205]||(n[205]=[Y("\u7ACB\u5373\u5207\u6362",-1)])]),_:1}),o(Ae,{label:!1},{default:a(()=>[...n[206]||(n[206]=[Y("\u4E0D\u5207\u6362",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),o(yl,{type:"danger"},{default:a(()=>[...n[207]||(n[207]=[Y("\u70B9\u51FB\u4E4B\u540E\u7684\u9ED8\u8BA4\u72B6\u6001\u663E\u793A\uFF0C\u4E0D\u9009\u62E9\u9ED8\u8BA4\u4E0D\u5207\u6362\uFF0C\u7ACB\u5373\u5207\u6362\u6307\u5C5E\u6027\u8BBE\u7F6E\u8BF7\u6C42\u53D1\u9001\u7684\u540C\u65F6\u5C31\u6539\u53D8\u72B6\u6001",-1)])]),_:1})]),_:2},1024)):le("",!0)],64)):i.link.target==="iframe"?(w(),S(te,{key:3},[o(y,{label:"\u5F39\u7A97\u5BBD\u5EA6"},{default:a(()=>[o(T,{modelValue:i.link.width,"onUpdate:modelValue":h=>i.link.width=h,placeholder:"\u5982400px\u300150%\u300133vw"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),o(y,{label:"\u5F39\u7A97\u9AD8\u5EA6"},{default:a(()=>[o(T,{modelValue:i.link.height,"onUpdate:modelValue":h=>i.link.height=h,placeholder:"\u5982400px\u300133vh"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),o(y,{label:"\u5F39\u7A97\u6807\u9898"},{default:a(()=>[o(T,{modelValue:i.link.title,"onUpdate:modelValue":h=>i.link.title=h,placeholder:"\u8BF7\u8F93\u5165\u5F39\u7A97\u6807\u9898"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)],64)):le("",!0)],64))),128))]),_:1},8,["model"])]),_:1}),o(Fe,{label:"\u52A8\u6548",name:"\u52A8\u6548"},{default:a(()=>[o(Oe,{"model-value":["\u52A8\u6548"]},{default:a(()=>[o(H,{title:"\u52A8\u6548",name:"\u52A8\u6548"},{default:a(()=>[v.value[0].name==="line"?(w(),S("div",Wu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u52A8\u753B\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.animateColor,"onUpdate:modelValue":n[123]||(n[123]=i=>d.animateColor=i),onChange:n[124]||(n[124]=i=>E("animateColor",i)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u52A8\u753B\u6548\u679C"},{default:a(()=>[o(ue,{modelValue:d.lineAnimateType,"onUpdate:modelValue":n[125]||(n[125]=i=>d.lineAnimateType=i),onChange:n[126]||(n[126]=i=>E("lineAnimateType",i)),placeholder:"\u6C34\u6D41"},{default:a(()=>[o(D,{label:"\u6C34\u6D41",value:""}),o(D,{label:"\u6C34\u73E0\u6D41\u52A8",value:1}),o(D,{label:"\u5706\u70B9",value:2})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u52A8\u753B\u901F\u5EA6"},{default:a(()=>[o(bl,{modelValue:d.animateSpan,"onUpdate:modelValue":n[127]||(n[127]=i=>d.animateSpan=i),onChange:n[128]||(n[128]=i=>E("animateSpan",i)),min:1,max:5},null,8,["modelValue"])]),_:1}),o(y,{label:"\u53CD\u5411\u6D41\u52A8"},{default:a(()=>[o(G,{modelValue:d.animateReverse,"onUpdate:modelValue":n[129]||(n[129]=i=>d.animateReverse=i),onChange:n[130]||(n[130]=i=>E("animateReverse",i))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u81EA\u52A8\u64AD\u653E"},{default:a(()=>[o(G,{modelValue:d.autoPlay,"onUpdate:modelValue":n[131]||(n[131]=i=>d.autoPlay=i),onChange:n[132]||(n[132]=i=>E("autoPlay",i))},null,8,["modelValue"])]),_:1}),o(y,{label:"","label-width":"0"},{default:a(()=>[o(xe,{type:"primary",size:"small",onClick:n[133]||(n[133]=i=>L("startAnimate",v.value[0].id))},{default:a(()=>[...n[208]||(n[208]=[Y("\u64AD\u653E",-1)])]),_:1}),o(xe,{type:"primary",size:"small",onClick:n[134]||(n[134]=i=>L("pauseAnimate",v.value[0].id))},{default:a(()=>[...n[209]||(n[209]=[Y("\u6682\u505C",-1)])]),_:1}),o(xe,{type:"primary",size:"small",onClick:n[135]||(n[135]=i=>L("stopAnimate",v.value[0].id))},{default:a(()=>[...n[210]||(n[210]=[Y("\u505C\u6B62",-1)])]),_:1})]),_:1}),o(y,{label:"\u9F20\u6807\u63D0\u793A"},{default:a(()=>[o(T,{modelValue:d.title,"onUpdate:modelValue":n[136]||(n[136]=i=>d.title=i),type:"textarea",autosize:{minRows:4},onInput:n[137]||(n[137]=i=>E("title",i)),placeholder:" "},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])):(w(),S("div",Hu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u65F6\u957F"},{default:a(()=>[o(T,{modelValue:d.showDuration,"onUpdate:modelValue":n[138]||(n[138]=i=>d.showDuration=i),readonly:""},null,8,["modelValue"])]),_:1}),o(y,{label:"\u52A8\u753B\u6548\u679C"},{default:a(()=>[o(ue,{modelValue:d.animateType,"onUpdate:modelValue":n[139]||(n[139]=i=>d.animateType=i),onChange:I,placeholder:"\u52A8\u753B\u6548\u679C"},{default:a(()=>[o(D,{label:"\u65E0",value:""}),o(D,{label:"\u65CB\u8F6C",value:"rotate"}),o(D,{label:"\u9006\u5411\u65CB\u8F6C",value:"rerotate"}),o(D,{label:"\u4E0A\u4E0B\u8DF3\u52A8",value:"upDown"}),o(D,{label:"\u5DE6\u53F3\u8DF3\u52A8",value:"leftRight"}),o(D,{label:"\u5FC3\u8DF3",value:"heart"}),o(D,{label:"\u70AB\u8000",value:"show"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u5FAA\u73AF\u6B21\u6570"},{default:a(()=>[o(T,{modelValue:d.animateCycle,"onUpdate:modelValue":n[140]||(n[140]=i=>d.animateCycle=i),type:"number",onInput:n[141]||(n[141]=i=>E("animateCycle",Number(i)))},null,8,["modelValue"])]),_:1}),o(y,{label:"\u81EA\u52A8\u64AD\u653E"},{default:a(()=>[o(G,{modelValue:d.autoPlay,"onUpdate:modelValue":n[142]||(n[142]=i=>d.autoPlay=i),onChange:n[143]||(n[143]=i=>E("autoPlay",i))},null,8,["modelValue"])]),_:1}),o(y,{label:"","label-width":"0"},{default:a(()=>[o(xe,{type:"primary",size:"small",onClick:n[144]||(n[144]=i=>L("startAnimate",v.value[0].id))},{default:a(()=>[...n[211]||(n[211]=[Y("\u64AD\u653E",-1)])]),_:1}),o(xe,{type:"primary",size:"small",onClick:n[145]||(n[145]=i=>L("pauseAnimate",v.value[0].id))},{default:a(()=>[...n[212]||(n[212]=[Y("\u6682\u505C",-1)])]),_:1}),o(xe,{type:"primary",size:"small",onClick:n[146]||(n[146]=i=>L("stopAnimate",v.value[0].id))},{default:a(()=>[...n[213]||(n[213]=[Y("\u505C\u6B62",-1)])]),_:1})]),_:1}),o(y,{label:"\u9F20\u6807\u63D0\u793A"},{default:a(()=>[o(T,{modelValue:d.title,"onUpdate:modelValue":n[147]||(n[147]=i=>d.title=i),type:"textarea",autosize:{minRows:4},onInput:n[148]||(n[148]=i=>E("title",i)),placeholder:" "},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]))]),_:1})]),_:1})]),_:1}),s.value&&(d.name==="echarts"?d.canDataBind:!0)?(w(),j(Fe,{key:3,label:"\u6570\u636E\u7ED1\u5B9A",name:"\u6570\u636E\u7ED1\u5B9A"},{default:a(()=>[o(W,{model:d,"label-width":"60px","label-position":"left",class:"p-3",size:"small"},{default:a(()=>[o(y,{label:"\u663E\u793A\u6548\u679C"},{default:a(()=>[o(Ft,{modelValue:d.dataBindSwith,"onUpdate:modelValue":n[149]||(n[149]=i=>d.dataBindSwith=i),size:"small",onChange:n[150]||(n[150]=i=>E("dataBindSwith",i))},{default:a(()=>[o(Ae,{label:!1},{default:a(()=>[...n[214]||(n[214]=[Y("\u6570\u636E\u663E\u793A",-1)])]),_:1}),o(Ae,{label:!0},{default:a(()=>[...n[215]||(n[215]=[Y("\u5F00\u5173\u72B6\u6001",-1)])]),_:1}),o(Ae,{label:"animate"},{default:a(()=>[...n[216]||(n[216]=[Y("\u52A8\u6548",-1)])]),_:1}),o(Ae,{label:"progress"},{default:a(()=>[...n[217]||(n[217]=[Y("\u8FDB\u5EA6",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u7ED1\u5B9A\u6570\u636E"},{default:a(()=>[o(T,{modelValue:u.value,"onUpdate:modelValue":n[151]||(n[151]=i=>u.value=i),placeholder:"\u70B9\u51FB\u7ED1\u5B9A",onClick:je,readonly:""},{suffix:a(()=>[u.value?(w(),j(J(wt),{key:0,class:"input-icon",onClick:ht})):le("",!0)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1})):le("",!0),v.value[0].name!=="combine"?(w(),j(Fe,{key:4,label:"\u7ED3\u6784",name:"\u7ED3\u6784"},{default:a(()=>[o(Bt,{pens:v.value},null,8,["pens"])]),_:1})):le("",!0)]),_:1})):v.value.length>1?(w(),S("div",qu,[o(Ct,{"model-value":"\u5916\u89C2"},{default:a(()=>[o(Fe,{label:"\u5916\u89C2",name:"\u5916\u89C2"},{default:a(()=>[o(Oe,{"model-value":["\u5BF9\u9F50","\u6837\u5F0F","\u6587\u5B57"]},{default:a(()=>[o(H,{title:"\u5BF9\u9F50",name:"\u5BF9\u9F50"},{default:a(()=>[x("div",Zu,[o(ke,{content:"\u5DE6\u5BF9\u9F50"},{default:a(()=>[x("i",{class:"t-align-left t-icon",onClick:n[152]||(n[152]=i=>$("left"))})]),_:1}),o(ke,{content:"\u53F3\u5BF9\u9F50"},{default:a(()=>[x("i",{class:"t-align-right t-icon",onClick:n[153]||(n[153]=i=>$("right"))})]),_:1}),o(ke,{content:"\u9876\u90E8\u5BF9\u9F50"},{default:a(()=>[x("i",{class:"t-align-top t-icon",onClick:n[154]||(n[154]=i=>$("top"))})]),_:1}),o(ke,{content:"\u5E95\u90E8\u5BF9\u9F50"},{default:a(()=>[x("i",{class:"t-align-bottom t-icon",onClick:n[155]||(n[155]=i=>$("bottom"))})]),_:1}),o(ke,{content:"\u5782\u76F4\u5C45\u4E2D"},{default:a(()=>[x("i",{class:"t-align-center t-icon",onClick:n[156]||(n[156]=i=>$("center"))})]),_:1}),o(ke,{content:"\u6C34\u5E73\u5C45\u4E2D"},{default:a(()=>[x("i",{class:"t-align-middle t-icon",onClick:n[157]||(n[157]=i=>$("middle"))})]),_:1}),o(ke,{content:"\u6C34\u5E73\u7B49\u5206\u5BF9\u9F50"},{default:a(()=>[x("i",{class:"t-horizontal-between t-icon",onClick:n[158]||(n[158]=i=>$("spaceBetween"))})]),_:1}),o(ke,{content:"\u5782\u76F4\u7B49\u5206\u5BF9\u9F50"},{default:a(()=>[x("i",{class:"t-vertical-between t-icon",onClick:n[159]||(n[159]=i=>$("spaceBetweenColumn"))})]),_:1})])]),_:1}),o(H,{title:"\u6837\u5F0F",name:"\u6837\u5F0F"},{default:a(()=>[x("div",Qu,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.color,"onUpdate:modelValue":n[160]||(n[160]=i=>d.color=i),onChange:n[161]||(n[161]=i=>E("color",i)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u7EBF\u6761\u5BBD\u5EA6"},{default:a(()=>[o(T,{modelValue:d.lineWidth,"onUpdate:modelValue":n[162]||(n[162]=i=>d.lineWidth=i),type:"number",onInput:n[163]||(n[163]=i=>E("lineWidth",i)),placeholder:" "},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}),o(H,{title:"\u6587\u5B57",name:"\u6587\u5B57"},{default:a(()=>[x("div",es,[o(W,{model:d,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u5B57\u4F53\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:d.textColor,"onUpdate:modelValue":n[164]||(n[164]=i=>d.textColor=i),onChange:n[165]||(n[165]=i=>E("textColor",i)),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u6587\u5B57\u5927\u5C0F"},{default:a(()=>[o(T,{modelValue:d.fontSize,"onUpdate:modelValue":n[166]||(n[166]=i=>d.fontSize=i),type:"number",onInput:n[167]||(n[167]=i=>E("fontSize",i)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u6587\u5B57\u884C\u9AD8"},{default:a(()=>[o(T,{modelValue:d.lineHeight,"onUpdate:modelValue":n[168]||(n[168]=i=>d.lineHeight=i),type:"number",onInput:n[169]||(n[169]=i=>E("lineHeight",i)),placeholder:"px"},null,8,["modelValue"])]),_:1}),o(y,{label:"\u503E\u659C"},{default:a(()=>[o(ue,{modelValue:d.fontStyle,"onUpdate:modelValue":n[170]||(n[170]=i=>d.fontStyle=i),onChange:n[171]||(n[171]=i=>E("fontStyle",i)),placeholder:"\u503E\u659C"},{default:a(()=>[o(D,{label:"\u6B63\u5E38",value:"normal"}),o(D,{label:"\u503E\u659C",value:"italic"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u52A0\u7C97"},{default:a(()=>[o(ue,{modelValue:d.fontWeight,"onUpdate:modelValue":n[172]||(n[172]=i=>d.fontWeight=i),onChange:n[173]||(n[173]=i=>E("fontWeight",i)),placeholder:"\u52A0\u7C97"},{default:a(()=>[o(D,{label:"\u6B63\u5E38",value:"normal"}),o(D,{label:"\u52A0\u7C97",value:"bold"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u6C34\u5E73\u5BF9\u9F50"},{default:a(()=>[o(ue,{modelValue:d.textAlign,"onUpdate:modelValue":n[174]||(n[174]=i=>d.textAlign=i),onChange:n[175]||(n[175]=i=>E("textAlign",i)),placeholder:"\u6C34\u5E73\u5BF9\u9F50"},{default:a(()=>[o(D,{label:"\u5DE6\u5BF9\u9F50",value:"left"}),o(D,{label:"\u5C45\u4E2D",value:"center"}),o(D,{label:"\u53F3\u5BF9\u9F50",value:"right"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u5782\u76F4\u5BF9\u9F50"},{default:a(()=>[o(ue,{modelValue:d.textBaseline,"onUpdate:modelValue":n[176]||(n[176]=i=>d.textBaseline=i),onChange:n[177]||(n[177]=i=>E("textBaseline",i)),placeholder:"\u5782\u76F4\u5BF9\u9F50"},{default:a(()=>[o(D,{label:"\u9876\u90E8\u5BF9\u9F50",value:"top"}),o(D,{label:"\u5C45\u4E2D",value:"middle"}),o(D,{label:"\u5E95\u90E8\u5BF9\u9F50",value:"bottom"})]),_:1},8,["modelValue"])]),_:1}),o(y,{label:"\u9690\u85CF\u6587\u5B57"},{default:a(()=>[o(G,{modelValue:d.hiddenText,"onUpdate:modelValue":n[178]||(n[178]=i=>d.hiddenText=i),onChange:n[179]||(n[179]=i=>E("hiddenText",i))},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1})]),_:1})]),_:1}),o(Fe,{label:"\u5E03\u5C40",name:"\u5E03\u5C40"},{default:a(()=>[o(Oe,{"model-value":["\u5E03\u5C40"]},{default:a(()=>[o(H,{title:"\u5E03\u5C40",name:"\u5E03\u5C40"},{default:a(()=>[x("div",ts,[o(W,{model:V,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u6700\u5927\u5BBD\u5EA6"},{default:a(()=>[o(T,{modelValue:V.width,"onUpdate:modelValue":n[180]||(n[180]=i=>V.width=i),modelModifiers:{number:!0},type:"number",placeholder:" "},null,8,["modelValue"])]),_:1}),o(y,{label:"\u95F4\u8DDD"},{default:a(()=>[o(T,{modelValue:V.space,"onUpdate:modelValue":n[181]||(n[181]=i=>V.space=i),modelModifiers:{number:!0},type:"number",placeholder:" "},null,8,["modelValue"])]),_:1}),o(xe,{type:"primary",size:"default",class:"mb-3 w-full",onClick:R},{default:a(()=>[...n[218]||(n[218]=[Y("\u5F00\u59CB\u6392\u7248",-1)])]),_:1})]),_:1},8,["model"])])]),_:1})]),_:1})]),_:1}),o(Fe,{label:"\u7ED3\u6784",name:"\u7ED3\u6784"},{default:a(()=>[o(Bt,{pens:v.value},null,8,["pens"])]),_:1})]),_:1})])):(w(),j(Ct,{key:2,"model-value":"\u56FE\u7EB8"},{default:a(()=>[o(Fe,{label:l.value?"\u7EC4\u4EF6":"\u56FE\u7EB8",name:"\u56FE\u7EB8"},{default:a(()=>[o(Oe,{"model-value":["\u6587\u4EF6","\u753B\u5E03","\u4E8B\u4EF6"]},{default:a(()=>[l.value||s.value?(w(),j(H,{key:0,title:"\u6587\u4EF6",name:"\u6587\u4EF6"},{default:a(()=>[x("div",ls,[o(W,{"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u6587\u4EF6\u540D"},{default:a(()=>[o(T,{modelValue:m.value,"onUpdate:modelValue":n[182]||(n[182]=i=>m.value=i),modelModifiers:{lazy:!0}},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})):le("",!0),l.value?le("",!0):(w(),j(H,{key:1,title:"\u753B\u5E03",name:"\u753B\u5E03"},{default:a(()=>[x("div",ns,[o(W,{model:C,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u9ED8\u8BA4\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:C.color,"onUpdate:modelValue":n[183]||(n[183]=i=>C.color=i),onChange:n[184]||(n[184]=i=>C.color=i),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u5B57\u4F53\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:C.textColor,"onUpdate:modelValue":n[185]||(n[185]=i=>C.textColor=i),onChange:n[186]||(n[186]=i=>C.textColor=i),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u80CC\u666F\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:C.background,"onUpdate:modelValue":n[187]||(n[187]=i=>C.background=i),onChange:n[188]||(n[188]=i=>C.background=i),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u80CC\u666F\u7F51\u683C"},{default:a(()=>[o(G,{modelValue:C.grid,"onUpdate:modelValue":n[189]||(n[189]=i=>C.grid=i)},null,8,["modelValue"])]),_:1}),o(y,{label:"\u7F51\u683C\u989C\u8272"},{default:a(()=>[o(ee,{modelValue:C.gridColor,"onUpdate:modelValue":n[190]||(n[190]=i=>C.gridColor=i),onChange:n[191]||(n[191]=i=>C.gridColor=i),"show-alpha":"",predefine:J(ve)},null,8,["modelValue","predefine"])]),_:1}),o(y,{label:"\u7F51\u683C\u5927\u5C0F"},{default:a(()=>[o(T,{"model-value":C.gridSize===30?null:C.gridSize,onInput:n[192]||(n[192]=i=>parseInt(i)>0?C.gridSize=i:C.gridSize=30),type:"number"},null,8,["model-value"])]),_:1})]),_:1},8,["model"])])]),_:1})),l.value?le("",!0):(w(),j(H,{key:2,title:"\u4E8B\u4EF6",name:"\u4E8B\u4EF6"},{default:a(()=>[x("div",os,[o(W,{model:C,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u4E8B\u4EF6\u5BC6\u7801"},{default:a(()=>[o(T,{modelValue:C.eventPassword,"onUpdate:modelValue":n[193]||(n[193]=i=>C.eventPassword=i),type:"password","show-password":"",clearable:"",placeholder:"\u4E0D\u586B\u5199\u5219\u4E0D\u542F\u7528"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1}))]),_:1})]),_:1},8,["label"]),o(Fe,{label:"\u5E03\u5C40",name:"\u5E03\u5C40"},{default:a(()=>[o(Oe,{"model-value":["\u5E03\u5C40"]},{default:a(()=>[o(H,{title:"\u5E03\u5C40",name:"\u5E03\u5C40"},{default:a(()=>[x("div",us,[o(W,{model:V,"label-width":"70px","label-position":"left",size:"small"},{default:a(()=>[o(y,{label:"\u6700\u5927\u5BBD\u5EA6"},{default:a(()=>[o(T,{modelValue:V.width,"onUpdate:modelValue":n[194]||(n[194]=i=>V.width=i),modelModifiers:{number:!0},type:"number",placeholder:" "},null,8,["modelValue"])]),_:1}),o(y,{label:"\u95F4\u8DDD"},{default:a(()=>[o(T,{modelValue:V.space,"onUpdate:modelValue":n[195]||(n[195]=i=>V.space=i),modelModifiers:{number:!0},type:"number",placeholder:" "},null,8,["modelValue"])]),_:1}),o(xe,{type:"primary",size:"default",class:"mb-3 w-full",onClick:R},{default:a(()=>[...n[219]||(n[219]=[Y("\u5F00\u59CB\u6392\u7248",-1)])]),_:1})]),_:1},8,["model"])])]),_:1})]),_:1})]),_:1}),o(Fe,{label:"\u7ED3\u6784",name:"\u7ED3\u6784"},{default:a(()=>[o(Bt,{pens:b.value},null,8,["pens"])]),_:1})]),_:1})),o(uu),o(du,{ref_key:"bindPanelRef",ref:_,deviceList:f.value,onSetBindData:lt},null,8,["deviceList"]),o(gu,{ref_key:"bindFuncRef",ref:nt,deviceList:f.value,onSetBindFunc:ne},null,8,["deviceList"]),o(Eu,{ref_key:"bindAttrRef",ref:X,deviceList:f.value,onSetBindAttr:Q},null,8,["deviceList"]),o(Bu,{ref_key:"echartsEditorRef",ref:ut,penEcharts:ot.value,onSaveEchartsData:Te},null,8,["penEcharts"]),o(Du,{ref_key:"echartsApiBindingRef",ref:A,onSaveEchartsApi:tt},null,512)])}}}),as=Ve(ss,[["__scopeId","data-v-e9e7add0"]]),is="/plugin/topo/assets/logo.91bc7193.png",rs="/plugin/topo/assets/import.2c710f7e.svg",ds="/plugin/topo/assets/export.46a95ab4.svg";var hl={exports:{}};(function(t,e){(function(l,s){s()})(qe,function(){function l(g,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(g.type)?new Blob(["\uFEFF",g],{type:g.type}):g}function s(g,c,v){var b=new XMLHttpRequest;b.open("GET",g),b.responseType="blob",b.onload=function(){p(b.response,c,v)},b.onerror=function(){console.error("could not download file")},b.send()}function u(g){var c=new XMLHttpRequest;c.open("HEAD",g,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function r(g){try{g.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),g.dispatchEvent(c)}}var f=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof qe=="object"&&qe.global===qe?qe:void 0,m=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=f.saveAs||(typeof window!="object"||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(g,c,v){var b=f.URL||f.webkitURL,C=document.createElement("a");c=c||g.name||"download",C.download=c,C.rel="noopener",typeof g=="string"?(C.href=g,C.origin===location.origin?r(C):u(C.href)?s(g,c,v):r(C,C.target="_blank")):(C.href=b.createObjectURL(g),setTimeout(function(){b.revokeObjectURL(C.href)},4e4),setTimeout(function(){r(C)},0))}:"msSaveOrOpenBlob"in navigator?function(g,c,v){if(c=c||g.name||"download",typeof g!="string")navigator.msSaveOrOpenBlob(l(g,v),c);else if(u(g))s(g,c,v);else{var b=document.createElement("a");b.href=g,b.target="_blank",setTimeout(function(){r(b)})}}:function(g,c,v,b){if(b=b||open("","_blank"),b&&(b.document.title=b.document.body.innerText="downloading..."),typeof g=="string")return s(g,c,v);var C=g.type==="application/octet-stream",d=/constructor/i.test(f.HTMLElement)||f.safari,P=/CriOS\/[\d]+/.test(navigator.userAgent);if((P||C&&d||m)&&typeof FileReader<"u"){var k=new FileReader;k.onloadend=function(){var F=k.result;F=P?F:F.replace(/^data:[^;]*;/,"data:attachment/file;"),b?b.location.href=F:location=F,b=null},k.readAsDataURL(g)}else{var I=f.URL||f.webkitURL,N=I.createObjectURL(g);b?b.location=N:location.href=N,b=null,setTimeout(function(){I.revokeObjectURL(N)},4e4)}});f.saveAs=p.saveAs=p,t.exports=p})})(hl);const fs={class:"header bb"},ps={class:"flex items-center left"},ms={class:"flex items-center handles"},cs={key:0,class:"label"},gs={key:1,class:"label"},vs={class:"flex items-center center"},hs={class:"attr"},ys={class:"attr"},bs={class:"attr"},Es={class:"attr"},Fs={class:"key-value"},Cs={class:"key"},ws={class:"value"},xs={class:"right"},Vs=we({__name:"header",setup(t){const e=$t(),l=Ee(()=>e.getters.currentComp),s=Ee(()=>e.getters.currentDrawing);window.onbeforeunload=()=>{if(l.value||s.value)return"\u786E\u5B9A\u9000\u51FA\u5417"};let u;We(()=>{setTimeout(()=>{u=window.meta2d},0)}),localStorage.getItem("companyName");const r=M(ft.find(N=>N.name===Je.drawingLineName)),f=Pe({lineWidth:1,locked:0,fromArrow:"",toArrow:""}),m=M(!1);document.onkeydown=({key:N})=>{N==="Escape"&&(m.value=!1)};const p=()=>{m.value=!m.value,m.value?window.meta2d.drawLine("curve"):window.meta2d.finishDrawLine()};let g;setTimeout(()=>{g=window.meta2d.getOptions()},0);const c=(N,F)=>{if(N==="drawingLineName"){g[N]=F,r.value=ft.find(V=>V.name===F);return}v(N,F)};function v(N,F){f[N]=F,window.meta2d.store.data[N]=F}function b(){var V;const N=u.data();N.options=u.store.options,sessionStorage.setItem("data",JSON.stringify(N)),sessionStorage.setItem("drawingId",((V=s.value)==null?void 0:V.id)||"");const F=N.pens.filter(R=>R.tags&&R.devId&&R.pointId&&!zt.includes(R.tags[0])).map(R=>({deviceKey:R.devId,propertyKey:R.pointId}));sessionStorage.setItem("pointIds",JSON.stringify(F)),window.open("/plugin/topo/index.html#/show")}const C=()=>{if(!u.data().pens.length)return ae("\u8BF7\u5148\u7ED8\u5236\u56FE\u5F62");if(l.value){const N=u.toComponent();I(u.toPng()).then(F=>{(l.value.id?fe.topologyEdit:fe.topologyAdd)({folderId:l.value.folderId,jsonData:Ge.deflate(JSON.stringify(N!=null?N:""),{to:"string"}),id:l.value.id||void 0,name:l.value.name,types:"components",images:F,status:1}).then(()=>{ae.success("\u4FDD\u5B58\u6210\u529F"),d(),Xe.emit("updateComp",l.value.folderId),e.commit("setCurrentComp",null)})});return}if(s.value){const N=s.value.id?fe.topologyEdit:fe.topologyAdd,F=u.data();F.options=u.store.options,I(u.toPng()).then(V=>{const R={folderId:s.value.folderId,types:"topology",jsonData:Ge.deflate(JSON.stringify(F!=null?F:""),{to:"string"}),name:s.value.name,pointIds:F.pens.filter(L=>L.tags&&L.devId&&L.pointId&&!zt.includes(L.tags[0])).map(L=>({deviceKey:L.devId,propertyKey:L.pointId})),images:V,id:s.value.id||void 0,status:1};N(R).then(L=>{ae.success("\u4FDD\u5B58\u6210\u529F"),d(),Xe.emit("updateDrawing",R.folderId),e.commit("setCurrentDrawing",{...s.value,id:(L==null?void 0:L.diagramId)||R.id})})})}};function d(){e.commit("setHistory",{histories:u.store.histories.length,historyIndex:u.store.historyIndex})}function P(N){const F=new FileReader;F.readAsText(N.raw),F.onload=()=>{try{const V=JSON.parse(F.result);if(!V.pens||!V.options)return ae.error("\u8BF7\u4F20\u5165\u5408\u6CD5\u56FE\u5F62\u6587\u4EF6");u.setOptions(V.options),u.open(V),u.fitView(!0,30)}catch(V){console.log(V),ae.error("\u65E0\u6CD5\u8BFB\u53D6\u6587\u4EF6")}}}function k(){var R,L;const N=u.data();N.options=u.store.options;const F=JSON.stringify(N),V=new Blob([F],{type:"application/json"});hl.exports.saveAs(V,"\u6C99\u679C\u7EC4\u6001\u56FE\u5BFC\u51FA "+((R=s.value)!=null&&R.name?((L=s.value)==null?void 0:L.name)+" ":"")+el().format("YYYY-MM-DD HH:mm:ss")+".json")}function I(N){return new Promise((F,V)=>{fe.uploadImg(ll({file:Xl(N)})).then(R=>{F(R.path)}).catch(V)})}return(N,F)=>{const V=U("el-tooltip"),R=U("el-dropdown-item"),L=U("el-dropdown-menu"),$=U("el-dropdown"),z=U("el-input-number"),Z=U("el-popover"),ie=U("el-upload");return w(),S("div",fs,[x("div",ps,[F[9]||(F[9]=x("img",{src:is,class:"logo",alt:"logo"},null,-1)),F[10]||(F[10]=x("div",{class:"title"},"\u62D3\u6251\u56FE\u7F16\u8F91\u5668",-1)),x("div",ms,[x("div",{style:tl({cursor:!l.value&&!s.value?"not-allowed":"pointer"})},[x("div",{class:me(["attr",{disabled:!l.value&&!s.value}]),onClick:C},[F[7]||(F[7]=x("i",{class:"t-icon t-save"},null,-1)),s.value?(w(),S("div",cs,"\u4FDD\u5B58\u56FE\u7EB8")):(w(),S("div",gs,"\u4FDD\u5B58\u7EC4\u4EF6"))],2)],4),o(V,{content:"\u9884\u89C8\u56FE\u5F62\u53CA\u5B9E\u65F6\u6570\u636E\uFF08\u8F6E\u8BE2\u5237\u65B0\uFF09"},{default:a(()=>[x("div",{class:"attr",onClick:b},[...F[8]||(F[8]=[x("i",{class:"t-icon t-attention"},null,-1),x("div",{class:"label"},"\u9884\u89C8",-1)])])]),_:1})])]),x("div",vs,[x("div",{class:me(["attr",{"!text-red-600":m.value}]),onClick:p},[...F[11]||(F[11]=[x("i",{class:"t-icon t-curve"},null,-1),x("div",{class:"label"},"\u94A2\u7B14",-1)])],2),o($,{onCommand:F[0]||(F[0]=K=>c("fromArrow",K))},{dropdown:a(()=>[o(L,null,{default:a(()=>[o(R,{command:""},{default:a(()=>[...F[13]||(F[13]=[x("i",{class:"t-icon t-line"},null,-1)])]),_:1}),(w(!0),S(te,null,pe(J(ct),K=>(w(),j(R,{command:K,key:K},{default:a(()=>[x("i",{class:me(["t-icon",`t-from-${K}`])},null,2)]),_:2},1032,["command"]))),128))]),_:1})]),default:a(()=>[x("div",hs,[x("i",{class:me(["t-icon",f.fromArrow?`t-from-${f.fromArrow}`:"t-line"])},null,2),F[12]||(F[12]=x("div",{class:"label"},"\u8D77\u70B9",-1))])]),_:1}),o($,{onCommand:F[1]||(F[1]=K=>c("toArrow",K))},{dropdown:a(()=>[o(L,null,{default:a(()=>[o(R,{command:""},{default:a(()=>[...F[15]||(F[15]=[x("i",{class:"t-icon t-line"},null,-1)])]),_:1}),(w(!0),S(te,null,pe(J(ct),K=>(w(),j(R,{command:K,key:K},{default:a(()=>[x("i",{class:me(["t-icon",`t-to-${K}`])},null,2)]),_:2},1032,["command"]))),128))]),_:1})]),default:a(()=>[x("div",ys,[x("i",{class:me(["t-icon",f.toArrow?`t-to-${f.toArrow}`:"t-line"])},null,2),F[14]||(F[14]=x("div",{class:"label"},"\u7EC8\u70B9",-1))])]),_:1}),o(Z,{placement:"bottom",width:"175"},{reference:a(()=>[x("div",bs,[x("span",null,Le(f.lineWidth),1),F[16]||(F[16]=x("div",{class:"label"},"\u7EBF\u5BBD",-1))])]),default:a(()=>[o(z,{modelValue:f.lineWidth,"onUpdate:modelValue":F[2]||(F[2]=K=>f.lineWidth=K),onChange:F[3]||(F[3]=K=>c("lineWidth",K)),min:1},null,8,["modelValue"])]),_:1}),o($,{onCommand:F[4]||(F[4]=K=>c("drawingLineName",K))},{dropdown:a(()=>[o(L,null,{default:a(()=>[(w(!0),S(te,null,pe(J(ft),K=>(w(),j(R,{command:K.name,key:K.name},{default:a(()=>[x("div",Fs,[x("div",Cs,Le(K.label),1),x("div",ws,[x("i",{class:me(["t-icon",K.icon])},null,2)])])]),_:2},1032,["command"]))),128))]),_:1})]),default:a(()=>[x("div",Es,[x("i",{class:me(["t-icon",r.value.icon])},null,2),F[17]||(F[17]=x("div",{class:"label"},"\u8FDE\u7EBF",-1))])]),_:1}),f.locked===0?(w(),S("div",{key:0,class:"attr",onClick:F[5]||(F[5]=K=>c("locked",1))},[...F[18]||(F[18]=[x("i",{class:"t-icon t-unlock"},null,-1),x("div",{class:"label"},"\u7F16\u8F91",-1)])])):(w(),S("div",{key:1,class:"attr !text-red-600",onClick:F[6]||(F[6]=K=>c("locked",0))},[...F[19]||(F[19]=[x("i",{class:"t-icon t-wufayidong"},null,-1),x("div",{class:"label"},"\u9501\u5B9A",-1)])]))]),x("div",xs,[o(ie,{"on-change":P,"auto-upload":!1,accept:".json"},{default:a(()=>[...F[20]||(F[20]=[x("div",{class:"attr"},[x("img",{src:rs,style:{height:"18px"}}),x("div",{class:"label"},"\u5BFC\u5165")],-1)])]),_:1}),x("div",{class:"attr",onClick:k},[...F[21]||(F[21]=[x("img",{src:ds,style:{height:"18px"}},null,-1),x("div",{class:"label"},"\u5BFC\u51FA",-1)])])])])}}}),Bs=Ve(Vs,[["__scopeId","data-v-fd4928f2"]]);const As={class:"editor"},_s={class:"flex justify-between overflow-hidden"},Ns=we({__name:"index",setup(t){return(e,l)=>(w(),S("div",As,[o(Bs,{onChoose:l[0]||(l[0]=s=>e.$emit("choose")),onSave:l[1]||(l[1]=s=>e.$emit("save",s))}),x("div",_s,[o(Go),o(Yl),o(as)])]))}}),ks=Ve(Ns,[["__scopeId","data-v-8f212404"]]),Ts={class:"page-wrapper"},Ss=we({__name:"index",setup(t){const l=Bl().params.drawingId;return sessionStorage.setItem("drawingId",l||""),(s,u)=>(w(),S("div",Ts,[o(ks,{onChoose:u[0]||(u[0]=r=>J(Xe).emit("choose"))})]))}});export{Ss as default};