vue-wiring-diagram 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11269,7 +11269,7 @@ const Ko = (n, e = {}) => ns.get(n, { params: e }), el = (n, e = {}) => ns.post(
|
|
|
11269
11269
|
}
|
|
11270
11270
|
}
|
|
11271
11271
|
}
|
|
11272
|
-
},
|
|
11272
|
+
}, tl = {
|
|
11273
11273
|
markup: [
|
|
11274
11274
|
{
|
|
11275
11275
|
tagName: "path",
|
|
@@ -11308,7 +11308,7 @@ const Ko = (n, e = {}) => ns.get(n, { params: e }), el = (n, e = {}) => ns.post(
|
|
|
11308
11308
|
}
|
|
11309
11309
|
}
|
|
11310
11310
|
}
|
|
11311
|
-
},
|
|
11311
|
+
}, eg = {
|
|
11312
11312
|
markup: [
|
|
11313
11313
|
{
|
|
11314
11314
|
tagName: "path",
|
|
@@ -11359,13 +11359,13 @@ const Ko = (n, e = {}) => ns.get(n, { params: e }), el = (n, e = {}) => ns.post(
|
|
|
11359
11359
|
}
|
|
11360
11360
|
}
|
|
11361
11361
|
}
|
|
11362
|
-
},
|
|
11362
|
+
}, nl = "M 0 -6 8 0 0 6 z", pb = "M 0 -6 -8 0 0 6 z", tg = {
|
|
11363
11363
|
attrs: {
|
|
11364
11364
|
wrap: {
|
|
11365
11365
|
strokeWidth: 10
|
|
11366
11366
|
},
|
|
11367
11367
|
arrow: {
|
|
11368
|
-
d:
|
|
11368
|
+
d: nl,
|
|
11369
11369
|
fill: "#ED8A19",
|
|
11370
11370
|
stroke: "#ED8A19",
|
|
11371
11371
|
style: {
|
|
@@ -11416,8 +11416,8 @@ const Ko = (n, e = {}) => ns.get(n, { params: e }), el = (n, e = {}) => ns.post(
|
|
|
11416
11416
|
}
|
|
11417
11417
|
]
|
|
11418
11418
|
}, bt = {
|
|
11419
|
-
markup:
|
|
11420
|
-
attrs:
|
|
11419
|
+
markup: tl.markup,
|
|
11420
|
+
attrs: tl.attrs
|
|
11421
11421
|
}, bn = (n, e) => {
|
|
11422
11422
|
const t = n.__vccOpts || n;
|
|
11423
11423
|
for (const [s, i] of e)
|
|
@@ -34341,7 +34341,7 @@ const Ou = "line", Eu = "pipe", Mu = "arrow", GB = [{
|
|
|
34341
34341
|
var R, D, L, j, F, T;
|
|
34342
34342
|
const e = n, t = U("0");
|
|
34343
34343
|
console.log(e.payload);
|
|
34344
|
-
const s = U(e.payload.attrs.line.stroke), i = U(e.payload.attrs.line.strokeWidth), r = e.payload.markup.length - 1, o = U(e.payload.markup.length - 1), a = U(e.payload.attrs.arrow.fill), l = U(e.payload.attrs.arrow.d ===
|
|
34344
|
+
const s = U(e.payload.attrs.line.stroke), i = U(e.payload.attrs.line.strokeWidth), r = e.payload.markup.length - 1, o = U(e.payload.markup.length - 1), a = U(e.payload.attrs.arrow.fill), l = U(e.payload.attrs.arrow.d === nl ? _r : oh), c = U(e.payload.attrs.arrow.style.animation.split(" ")[0] === yi ? yi : Ar), u = U(e.payload.attrs.arrow.display), h = () => {
|
|
34345
34345
|
if (e.payload.attr("line/stroke", s.value), e.payload.attr("line/strokeWidth", i.value), e.payload.attr("arrow/fill", a.value), e.payload.attr("arrow/stroke", a.value), o.value !== r) {
|
|
34346
34346
|
e.payload.markup = e.payload.markup.slice(0, 1);
|
|
34347
34347
|
for (let P = 0; P < o.value; P++)
|
|
@@ -34353,7 +34353,7 @@ const Ou = "line", Eu = "pipe", Mu = "arrow", GB = [{
|
|
|
34353
34353
|
atConnectionRatio: 1 / (o.value + 1) * (P + 1)
|
|
34354
34354
|
});
|
|
34355
34355
|
}
|
|
34356
|
-
e.payload.attr("arrow/d", l.value === _r ?
|
|
34356
|
+
e.payload.attr("arrow/d", l.value === _r ? nl : pb), e.payload.attr("arrow/style/animation", c.value === yi ? "flashing 2s infinite linear" : ""), e.payload.attr("arrow/display", u.value), console.log(e.payload.markup), bt.markup = e.payload.markup, bt.attrs = e.payload.attrs;
|
|
34357
34357
|
}, d = U([]), f = U(((L = (D = (R = e.payload.data) == null ? void 0 : R.fields) == null ? void 0 : D[0]) == null ? void 0 : L.deviceCode) ?? ""), g = U(((T = (F = (j = e.payload.data) == null ? void 0 : j.fields) == null ? void 0 : F[0]) == null ? void 0 : T.field) ?? ""), p = async () => {
|
|
34358
34358
|
d.value = await Dd(), f.value && y();
|
|
34359
34359
|
};
|
|
@@ -34729,7 +34729,7 @@ const Ou = "line", Eu = "pipe", Mu = "arrow", GB = [{
|
|
|
34729
34729
|
},
|
|
34730
34730
|
setup(n) {
|
|
34731
34731
|
const e = n, t = U(e.payload.data.type), s = () => {
|
|
34732
|
-
e.payload.data.type = t.value, t.value === Ou && (bt.attrs =
|
|
34732
|
+
e.payload.data.type = t.value, t.value === Ou && (bt.attrs = tl.attrs, bt.markup = tl.markup), t.value === Eu && (bt.attrs = eg.attrs, bt.markup = eg.markup), t.value === Mu && (bt.attrs = tg.attrs, bt.markup = tg.markup), e.payload.attrs = null, e.payload.attr(bt.attrs), e.payload.markup = bt.markup, r();
|
|
34733
34733
|
}, i = Un(null), r = () => {
|
|
34734
34734
|
i.value = null, t.value === Ou && (i.value = v6), t.value === Eu && (i.value = _6), t.value === Mu && (i.value = D6);
|
|
34735
34735
|
};
|
|
@@ -36146,7 +36146,7 @@ const Y6 = { class: "control-box" }, q6 = {
|
|
|
36146
36146
|
return !1;
|
|
36147
36147
|
for (let v = 0; v < y.data.condition.length; v++)
|
|
36148
36148
|
if (Number(b) > y.data.condition[v].min && Number(b) <= y.data.condition[v].max)
|
|
36149
|
-
return y.attr("arrow/style/animation", y.data.condition[v].animation === yi ? "flashing 2s infinite linear" : ""), y.attr("arrow/d", y.data.condition[v].direction === _r ?
|
|
36149
|
+
return y.attr("arrow/style/animation", y.data.condition[v].animation === yi ? "flashing 2s infinite linear" : ""), y.attr("arrow/d", y.data.condition[v].direction === _r ? nl : pb), y.attr("arrow/display", y.data.condition[v].display), !1;
|
|
36150
36150
|
}, g = () => {
|
|
36151
36151
|
t.value.zoomToFit({ maxScale: 1.4, padding: 20 });
|
|
36152
36152
|
}, p = Un(), m = () => {
|
|
@@ -31,7 +31,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
|
|
|
31
31
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const s=new this(e);return t.forEach(r=>s.set(r)),s}static accessor(e){const s=(this[Om]=this[Om]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=Ji(o);s[a]||(VV(r,o),s[a]=!0)}return L.isArray(e)?e.forEach(i):i(e),this}}Et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.reduceDescriptors(Et.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(s){this[t]=s}}}),L.freezeMethods(Et);function xu(n,e){const t=this||qi,s=e||t,r=Et.from(s.headers);let i=s.data;return L.forEach(n,function(a){i=a.call(t,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function Mm(n){return!!(n&&n.__CANCEL__)}function Lr(n,e,t){ue.call(this,n??"canceled",ue.ERR_CANCELED,e,t),this.name="CanceledError"}L.inherits(Lr,ue,{__CANCEL__:!0});function Pm(n,e,t){const s=t.config.validateStatus;!t.status||!s||s(t.status)?n(t):e(new ue("Request failed with status code "+t.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function DV(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function RV(n,e){n=n||10;const t=new Array(n),s=new Array(n);let r=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),d=s[i];o||(o=u),t[r]=c,s[r]=u;let f=i,h=0;for(;f!==r;)h+=t[f++],f=f%n;if(r=(r+1)%n,r===i&&(i=(i+1)%n),u-o<e)return;const p=d&&u-d;return p?Math.round(h*1e3/p):void 0}}function LV(n,e){let t=0,s=1e3/e,r,i;const o=(u,d=Date.now())=>{t=d,r=null,i&&(clearTimeout(i),i=null),n.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-t;f>=s?o(u,d):(r=u,i||(i=setTimeout(()=>{i=null,o(r)},s-f)))},()=>r&&o(r)]}const za=(n,e,t=3)=>{let s=0;const r=RV(50,250);return LV(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-s,u=r(c),d=o<=a;s=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};n(f)},t)},Nm=(n,e)=>{const t=n!=null;return[s=>e[0]({lengthComputable:t,total:n,loaded:s}),e[1]]},Am=n=>(...e)=>L.asap(()=>n(...e)),IV=St.hasStandardBrowserEnv?function(){const e=St.navigator&&/(msie|trident)/i.test(St.navigator.userAgent),t=document.createElement("a");let s;function r(i){let o=i;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return s=r(window.location.href),function(o){const a=L.isString(o)?r(o):o;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}(),BV=St.hasStandardBrowserEnv?{write(n,e,t,s,r,i){const o=[n+"="+encodeURIComponent(e)];L.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),L.isString(s)&&o.push("path="+s),L.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jV(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function $V(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function _m(n,e){return n&&!jV(e)?$V(n,e):e}const Tm=n=>n instanceof Et?{...n}:n;function Gs(n,e){e=e||{};const t={};function s(u,d,f){return L.isPlainObject(u)&&L.isPlainObject(d)?L.merge.call({caseless:f},u,d):L.isPlainObject(d)?L.merge({},d):L.isArray(d)?d.slice():d}function r(u,d,f){if(L.isUndefined(d)){if(!L.isUndefined(u))return s(void 0,u,f)}else return s(u,d,f)}function i(u,d){if(!L.isUndefined(d))return s(void 0,d)}function o(u,d){if(L.isUndefined(d)){if(!L.isUndefined(u))return s(void 0,u)}else return s(void 0,d)}function a(u,d,f){if(f in e)return s(u,d);if(f in n)return s(void 0,u)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,d)=>r(Tm(u),Tm(d),!0)};return L.forEach(Object.keys(Object.assign({},n,e)),function(d){const f=c[d]||r,h=f(n[d],e[d],d);L.isUndefined(h)&&f!==a||(t[d]=h)}),t}const km=n=>{const e=Gs({},n);let{data:t,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:a}=e;e.headers=o=Et.from(o),e.url=vm(_m(e.baseURL,e.url),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(L.isFormData(t)){if(St.hasStandardBrowserEnv||St.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(St.hasStandardBrowserEnv&&(s&&L.isFunction(s)&&(s=s(e)),s||s!==!1&&IV(e.url))){const u=r&&i&&BV.read(i);u&&o.set(r,u)}return e},zV=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(t,s){const r=km(n);let i=r.data;const o=Et.from(r.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=r,d,f,h,p,g;function m(){p&&p(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout;function b(){if(!y)return;const x=Et.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:n,request:y};Pm(function(C){t(C),m()},function(C){s(C),m()},S),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(s(new ue("Request aborted",ue.ECONNABORTED,n,y)),y=null)},y.onerror=function(){s(new ue("Network Error",ue.ERR_NETWORK,n,y)),y=null},y.ontimeout=function(){let v=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||Sm;r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),s(new ue(v,S.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,n,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&L.forEach(o.toJSON(),function(v,S){y.setRequestHeader(S,v)}),L.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),a&&a!=="json"&&(y.responseType=r.responseType),u&&([h,g]=za(u,!0),y.addEventListener("progress",h)),c&&y.upload&&([f,p]=za(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(r.cancelToken||r.signal)&&(d=x=>{y&&(s(!x||x.type?new Lr(null,n,y):x),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=DV(r.url);if(w&&St.protocols.indexOf(w)===-1){s(new ue("Unsupported protocol "+w+":",ue.ERR_BAD_REQUEST,n));return}y.send(i||null)})},FV=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let s=new AbortController,r;const i=function(u){if(!r){r=!0,a();const d=u instanceof Error?u:this.reason;s.abort(d instanceof ue?d:new Lr(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,i(new ue(`timeout ${e} of ms exceeded`,ue.ETIMEDOUT))},e);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),n=null)};n.forEach(u=>u.addEventListener("abort",i));const{signal:c}=s;return c.unsubscribe=()=>L.asap(a),c}},UV=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let s=0,r;for(;s<t;)r=s+e,yield n.slice(s,r),s=r},HV=async function*(n,e){for await(const t of GV(n))yield*UV(t,e)},GV=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:s}=await e.read();if(t)break;yield s}}finally{await e.cancel()}},Vm=(n,e,t,s)=>{const r=HV(n,e);let i=0,o,a=c=>{o||(o=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await r.next();if(u){a(),c.close();return}let f=d.byteLength;if(t){let h=i+=f;t(h)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),r.return()}},{highWaterMark:2})},Fa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Dm=Fa&&typeof ReadableStream=="function",WV=Fa&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Rm=(n,...e)=>{try{return!!n(...e)}catch{return!1}},YV=Dm&&Rm(()=>{let n=!1;const e=new Request(St.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Lm=64*1024,vu=Dm&&Rm(()=>L.isReadableStream(new Response("").body)),Ua={stream:vu&&(n=>n.body)};Fa&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ua[e]&&(Ua[e]=L.isFunction(n[e])?t=>t[e]():(t,s)=>{throw new ue(`Response type '${e}' is not supported`,ue.ERR_NOT_SUPPORT,s)})})})(new Response);const qV=async n=>{if(n==null)return 0;if(L.isBlob(n))return n.size;if(L.isSpecCompliantForm(n))return(await new Request(St.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(L.isArrayBufferView(n)||L.isArrayBuffer(n))return n.byteLength;if(L.isURLSearchParams(n)&&(n=n+""),L.isString(n))return(await WV(n)).byteLength},JV=async(n,e)=>{const t=L.toFiniteNumber(n.getContentLength());return t??qV(e)},Cu={http:mV,xhr:zV,fetch:Fa&&(async n=>{let{url:e,method:t,data:s,signal:r,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=km(n);u=u?(u+"").toLowerCase():"text";let p=FV([r,i&&i.toAbortSignal()],o),g;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(c&&YV&&t!=="get"&&t!=="head"&&(y=await JV(d,s))!==0){let S=new Request(e,{method:"POST",body:s,duplex:"half"}),E;if(L.isFormData(s)&&(E=S.headers.get("content-type"))&&d.setContentType(E),S.body){const[C,P]=Nm(y,za(Am(c)));s=Vm(S.body,Lm,C,P)}}L.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;g=new Request(e,{...h,signal:p,method:t.toUpperCase(),headers:d.normalize().toJSON(),body:s,duplex:"half",credentials:b?f:void 0});let w=await fetch(g);const x=vu&&(u==="stream"||u==="response");if(vu&&(a||x&&m)){const S={};["status","statusText","headers"].forEach(A=>{S[A]=w[A]});const E=L.toFiniteNumber(w.headers.get("content-length")),[C,P]=a&&Nm(E,za(Am(a),!0))||[];w=new Response(Vm(w.body,Lm,C,()=>{P&&P(),m&&m()}),S)}u=u||"text";let v=await Ua[L.findKey(Ua,u)||"text"](w,n);return!x&&m&&m(),await new Promise((S,E)=>{Pm(S,E,{data:v,headers:Et.from(w.headers),status:w.status,statusText:w.statusText,config:n,request:g})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,n,g),{cause:b.cause||b}):ue.from(b,b&&b.code,n,g)}})};L.forEach(Cu,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Im=n=>`- ${n}`,XV=n=>L.isFunction(n)||n===null||n===!1,Bm={getAdapter:n=>{n=L.isArray(n)?n:[n];const{length:e}=n;let t,s;const r={};for(let i=0;i<e;i++){t=n[i];let o;if(s=t,!XV(t)&&(s=Cu[(o=String(t)).toLowerCase()],s===void 0))throw new ue(`Unknown adapter '${o}'`);if(s)break;r[o||"#"+i]=s}if(!s){const i=Object.entries(r).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
|
|
32
32
|
`+i.map(Im).join(`
|
|
33
33
|
`):" "+Im(i[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Cu};function Su(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Lr(null,n)}function jm(n){return Su(n),n.headers=Et.from(n.headers),n.data=xu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Bm.getAdapter(n.adapter||qi.adapter)(n).then(function(s){return Su(n),s.data=xu.call(n,n.transformResponse,s),s.headers=Et.from(s.headers),s},function(s){return Mm(s)||(Su(n),s&&s.response&&(s.response.data=xu.call(n,n.transformResponse,s.response),s.response.headers=Et.from(s.response.headers))),Promise.reject(s)})}const $m="1.7.7",Eu={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Eu[n]=function(s){return typeof s===n||"a"+(e<1?"n ":" ")+n}});const zm={};Eu.transitional=function(e,t,s){function r(i,o){return"[Axios v"+$m+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(e===!1)throw new ue(r(o," has been removed"+(t?" in "+t:"")),ue.ERR_DEPRECATED);return t&&!zm[o]&&(zm[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,o,a):!0}};function KV(n,e,t){if(typeof n!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let r=s.length;for(;r-- >0;){const i=s[r],o=e[i];if(o){const a=n[i],c=a===void 0||o(a,i,n);if(c!==!0)throw new ue("option "+i+" must be "+c,ue.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ue("Unknown option "+i,ue.ERR_BAD_OPTION)}}const Ou={assertOptions:KV,validators:Eu},fs=Ou.validators;class Ws{constructor(e){this.defaults=e,this.interceptors={request:new Cm,response:new Cm}}async request(e,t){try{return await this._request(e,t)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
34
|
-
`+i):s.stack=i}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Gs(this.defaults,t);const{transitional:s,paramsSerializer:r,headers:i}=t;s!==void 0&&Ou.assertOptions(s,{silentJSONParsing:fs.transitional(fs.boolean),forcedJSONParsing:fs.transitional(fs.boolean),clarifyTimeoutError:fs.transitional(fs.boolean)},!1),r!=null&&(L.isFunction(r)?t.paramsSerializer={serialize:r}:Ou.assertOptions(r,{encode:fs.function,serialize:fs.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&L.merge(i.common,i[t.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),t.headers=Et.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(c=c&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,h;if(!c){const g=[jm.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),h=g.length,d=Promise.resolve(t);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let p=t;for(f=0;f<h;){const g=a[f++],m=a[f++];try{p=g(p)}catch(y){m.call(this,y);break}}try{d=jm.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(e){e=Gs(this.defaults,e);const t=_m(e.baseURL,e.url);return vm(t,e.params,e.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(e){Ws.prototype[e]=function(t,s){return this.request(Gs(s||{},{method:e,url:t,data:(s||{}).data}))}}),L.forEach(["post","put","patch"],function(e){function t(s){return function(i,o,a){return this.request(Gs(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Ws.prototype[e]=t(),Ws.prototype[e+"Form"]=t(!0)});class Mu{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,a){s.reason||(s.reason=new Lr(i,o,a),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=s=>{e.abort(s)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Mu(function(r){e=r}),cancel:e}}}function ZV(n){return function(t){return n.apply(null,t)}}function QV(n){return L.isObject(n)&&n.isAxiosError===!0}const Pu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pu).forEach(([n,e])=>{Pu[e]=n});function Fm(n){const e=new Ws(n),t=im(Ws.prototype.request,e);return L.extend(t,Ws.prototype,e,{allOwnKeys:!0}),L.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Fm(Gs(n,r))},t}const qe=Fm(qi);qe.Axios=Ws,qe.CanceledError=Lr,qe.CancelToken=Mu,qe.isCancel=Mm,qe.VERSION=$m,qe.toFormData=ja,qe.AxiosError=ue,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=ZV,qe.isAxiosError=QV,qe.mergeConfig=Gs,qe.AxiosHeaders=Et,qe.formToJSON=n=>Em(L.isHTMLForm(n)?new FormData(n):n),qe.getAdapter=Bm.getAdapter,qe.HttpStatusCode=Pu,qe.default=qe;const Mn=qe.create({baseURL:"http://localhost:8001",timeout:1e4,headers:{"Content-Type":"application/json"}}),eD=n=>{Mn.defaults.baseURL=n},tD=n=>{Mn.interceptors.request.use(e=>{if(n)return e.headers.token=n,e},e=>Promise.reject(e))};Mn.interceptors.response.use(n=>(n.data.isOk=n.data.code===200,n.data),n=>{if(n.response)switch(n.response.status){}return Promise.reject(n)});const Xi=(n,e={})=>Mn.get(n,{params:e}),Ha=(n,e={})=>Mn.post(n,e),Um=(n,e={})=>Mn.delete(n,{params:e}),nD=(n,e={})=>Mn.post(n,e,{headers:{"Content-Type":"multipart/form-data"}}),Ki=(n,e)=>{const t=document.querySelector(n),s=t.querySelectorAll(".x6-port-body"),r=t.querySelectorAll(".x6-port-label");for(let i=0,o=s.length;i<o;i+=1)s[i].style.visibility=e?"visible":"hidden";for(let i=0,o=r.length;i<o;i+=1)r[i].style.visibility=e?"visible":"hidden"},Nu=()=>Xi("/cny/custom/deviceList").then(n=>{if(n!=null&&n.isOk)return n.data}),Au=n=>Xi("/cny/custom/monitorInfo",{deviceCode:n,fieldType:1}).then(e=>{if(e!=null&&e.isOk)return e.data}),Hm=n=>Xi("/cny/template/selectOne",{id:n}).then(e=>{if(e!=null&&e.isOk){const t=JSON.parse(e.data.remark);return{background:t.background,grid:t.grid,data:t.data}}else Ye.error((e==null?void 0:e.msg)||"获取失败")}),sD=n=>Ha("/cny/custom/arrRealData2",n).then(e=>{if(e!=null&&e.isOk)return e.data;Ye.error((e==null?void 0:e.msg)||"获取失败")}),Gm={color:"#000000"},Wm={size:10,visible:!1,type:"doubleMesh",args:[{color:"#282828",thickness:1},{color:"#363636",thickness:2,factor:4}]},rD={stencilGraphWidth:300,stencilGraphHeight:0,layoutOptions:{columns:3,columnWidth:74,resizeToFit:!0,center:!0}},_u={position:"absolute",args:{x:0,y:0},attrs:{text:{fill:"#5174ff",fontSize:8},circle:{magnet:!0,stroke:"#5174ff",r:4}},label:{position:"top"}},iD={shape:"rect",label:"文本",width:50,height:30,attrs:{body:{fill:"#00000000",stroke:"#00000000",strokeWidth:1,rx:6,ry:6},text:{fill:"#ffffff"},label:{textAnchor:"start",x:-14,y:0}},data:{type:"text",content:"文本",fields:[]},ports:{groups:{ports:{portOption:_u}}}},Ym={markup:[{tagName:"path",selector:"line",groupSelector:"lines"}],attrs:{wrap:{strokeWidth:10},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}}},qm={markup:[{tagName:"path",selector:"line",groupSelector:"lines"},{tagName:"path",selector:"pipe",groupSelector:"lines"}],attrs:{wrap:{strokeWidth:10},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,targetMarker:null,sourceMarker:null},pipe:{stroke:"#2364DD",strokeWidth:1,strokeDasharray:5,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}}},Ga="M 0 -6 8 0 0 6 z",Jm="M 0 -6 -8 0 0 6 z",Wa={attrs:{wrap:{strokeWidth:10},arrow:{d:Ga,fill:"#ED8A19",stroke:"#ED8A19",style:{animation:"flashing 2s infinite linear"},display:"block"},arrow1:{atConnectionRatio:.5},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}},markup:[{tagName:"path",selector:"line",groupSelector:"lines"},{tagName:"path",groupSelector:"arrow",selector:"arrow1"}]},Qe={markup:Wa.markup,attrs:Wa.attrs},Ut=(n,e)=>{const t=n.__vccOpts||n;for(const[s,r]of e)t[s]=r;return t},oD={class:"control"},aD={class:"row-column"},lD=Ut({__name:"index",props:{payload:Object},setup(n){var h,p,g,m,y,b,w,x,v,S,E,C,P,A,T,k,V,R,j,N,M;const e=n,t=l.ref(((h=e.payload.value.options.background)==null?void 0:h.color)||null),s=l.ref(((g=(p=e.payload.value.options)==null?void 0:p.grid)==null?void 0:g.visible)||null),r=l.ref(((y=(m=e.payload.value.options)==null?void 0:m.grid)==null?void 0:y.size)||10),i=l.ref(((v=(x=(w=(b=e.payload.value.options)==null?void 0:b.grid)==null?void 0:w.args)==null?void 0:x[0])==null?void 0:v.color)||null),o=l.ref(((P=(C=(E=(S=e.payload.value.options)==null?void 0:S.grid)==null?void 0:E.args)==null?void 0:C[0])==null?void 0:P.thickness)||1),a=l.ref(((V=(k=(T=(A=e.payload.value.options)==null?void 0:A.grid)==null?void 0:T.args)==null?void 0:k[1])==null?void 0:V.color)||null),c=l.ref(((M=(N=(j=(R=e.payload.value.options)==null?void 0:R.grid)==null?void 0:j.args)==null?void 0:N[1])==null?void 0:M.thickness)||1),u=l.ref("1"),d=D=>{e.payload.value.drawBackground({color:D})},f=()=>{e.payload.value.drawGrid({visible:s.value,size:r.value,type:"doubleMesh",args:[{color:i.value,thickness:o.value},{color:a.value,thickness:c.value}]})};return(D,B)=>{const G=l.resolveComponent("el-col"),se=l.resolveComponent("el-color-picker"),I=l.resolveComponent("el-row"),_=l.resolveComponent("el-switch"),H=l.resolveComponent("el-input-number"),K=l.resolveComponent("el-collapse-item"),q=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",oD,[l.createVNode(q,{modelValue:u.value,"onUpdate:modelValue":B[7]||(B[7]=re=>u.value=re),accordion:""},{default:l.withCtx(()=>[l.createVNode(K,{title:"基础属性",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",aD,[l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[8]||(B[8]=[l.createElementVNode("div",{class:"row-label"},"背景色",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(se,{modelValue:t.value,"onUpdate:modelValue":B[0]||(B[0]=re=>t.value=re),size:"small","show-alpha":"",onChange:d},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[9]||(B[9]=[l.createElementVNode("div",{class:"row-label"},"网格",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=re=>s.value=re),"active-value":!0,"inactive-value":!1,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[10]||(B[10]=[l.createElementVNode("div",{class:"row-label"},"网格大小",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(H,{modelValue:r.value,"onUpdate:modelValue":B[2]||(B[2]=re=>r.value=re),min:1,max:20,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[11]||(B[11]=[l.createElementVNode("div",{class:"row-label"},"主网格颜色",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(se,{modelValue:i.value,"onUpdate:modelValue":B[3]||(B[3]=re=>i.value=re),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[12]||(B[12]=[l.createElementVNode("div",{class:"row-label"},"次网格颜色",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(se,{modelValue:a.value,"onUpdate:modelValue":B[4]||(B[4]=re=>a.value=re),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[13]||(B[13]=[l.createElementVNode("div",{class:"row-label"},"主网格粗细",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(H,{modelValue:o.value,"onUpdate:modelValue":B[5]||(B[5]=re=>o.value=re),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[14]||(B[14]=[l.createElementVNode("div",{class:"row-label"},"次网格粗细",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(H,{modelValue:c.value,"onUpdate:modelValue":B[6]||(B[6]=re=>c.value=re),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-5dd827ed"]]);typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(n){n.forEach(e=>{Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value(...t){const s=document.createDocumentFragment();t.forEach(r=>{const i=r instanceof Node;s.appendChild(i?r:document.createTextNode(String(r)))}),this.appendChild(s)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class yt{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function e(){return(t,s,r)=>{const i=r.value,o=t.__proto__;r.value=function(...a){this.disposed||(i.call(this,...a),o.dispose.call(this))}}}n.dispose=e})(yt||(yt={}));class Xm{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(e=>{e.dispose()}),this.items.clear())}contains(e){return this.items.has(e)}add(e){this.items.add(e)}remove(e){this.items.delete(e)}clear(){this.items.clear()}}(function(n){function e(t){const s=new n;return t.forEach(r=>{s.add(r)}),s}n.from=e})(Xm||(Xm={}));function Km(n,e,t){if(t)switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2]);case 4:return n.call(e,t[0],t[1],t[2],t[3]);case 5:return n.call(e,t[0],t[1],t[2],t[3],t[4]);case 6:return n.call(e,t[0],t[1],t[2],t[3],t[4],t[5]);default:return n.apply(e,t)}return n.call(e)}function ee(n,e,...t){return Km(n,e,t)}function cD(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function Tu(n){return n!=null&&(n instanceof Promise||cD(n))}function ku(...n){const e=[];if(n.forEach(s=>{Array.isArray(s)?e.push(...s):e.push(s)}),e.some(s=>Tu(s))){const s=e.map(r=>Tu(r)?r:Promise.resolve(r!==!1));return Promise.all(s).then(r=>r.reduce((i,o)=>o!==!1&&i,!0))}return e.every(s=>s!==!1)}function uD(...n){const e=ku(n);return typeof e=="boolean"?Promise.resolve(e):e}function Vu(n,e){const t=[];for(let s=0;s<n.length;s+=2){const r=n[s],i=n[s+1],o=Array.isArray(e)?e:[e],a=Km(r,i,o);t.push(a)}return ku(t)}class dD{constructor(){this.listeners={}}on(e,t,s){return t==null?this:(this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t,s),this)}once(e,t,s){const r=(...i)=>(this.off(e,r),Vu([t,s],i));return this.on(e,r,this)}off(e,t,s){if(!(e||t||s))return this.listeners={},this;const r=this.listeners;return(e?[e]:Object.keys(r)).forEach(o=>{const a=r[o];if(a){if(!(t||s)){delete r[o];return}for(let c=a.length-2;c>=0;c-=2)t&&a[c]!==t||s&&a[c+1]!==s||a.splice(c,2)}}),this}trigger(e,...t){let s=!0;if(e!=="*"){const i=this.listeners[e];i!=null&&(s=Vu([...i],t))}const r=this.listeners["*"];return r!=null?ku([s,Vu([...r],[e,...t])]):s}emit(e,...t){return this.trigger(e,...t)}}function hD(n,...e){e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(n.prototype,s,Object.getOwnPropertyDescriptor(t.prototype,s))})})}const fD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])};function pD(n,e){fD(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}class gD{}const mD=/^\s*class\s+/.test(`${gD}`)||/^\s*class\s*\{/.test(`${class{}}`);function Du(n,e){let t;return mD?t=class extends e{}:(t=function(){return e.apply(this,arguments)},pD(t,e)),Object.defineProperty(t,"name",{value:n}),t}function Zm(n){return n==="__proto__"}function Ru(n,e,t="/"){let s;const r=Array.isArray(e)?e:e.split(t);if(r.length)for(s=n;r.length;){const i=r.shift();if(Object(s)===s&&i&&i in s)s=s[i];else return}return s}function Ir(n,e,t,s="/"){const r=Array.isArray(e)?e:e.split(s),i=r.pop();if(i&&!Zm(i)){let o=n;r.forEach(a=>{Zm(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[i]=t}return n}function Qm(n,e,t="/"){const s=Array.isArray(e)?e.slice():e.split(t),r=s.pop();if(r)if(s.length>0){const i=Ru(n,s);i&&delete i[r]}else delete n[r];return n}var yD=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class Te extends dD{dispose(){this.off()}}yD([yt.dispose()],Te.prototype,"dispose",null),function(n){n.dispose=yt.dispose}(Te||(Te={})),hD(Te,yt);const ey=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},ty=ey(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),Lu=ey(n=>GP(oa(n)).replace(/ /g,""));function Iu(n){let e=2166136261,t=!1,s=n;for(let r=0,i=s.length;r<i;r+=1){let o=s.charCodeAt(r);o>127&&!t&&(s=unescape(encodeURIComponent(s)),o=s.charCodeAt(r),t=!0),e^=o,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function Ya(){let n="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let t=0,s=e.length;t<s;t+=1){const r=e[t],i=Math.random()*16|0,o=r==="x"?i:r==="y"?i&3|8:r;n+=o.toString(16)}return n}function bD(n,e,t){const s=Math.min(2,Math.floor(n.length*.34));let r=Math.floor(n.length*.4)+1,i,o=!1;const a=n.toLowerCase();for(const c of e){const u=t(c);if(u!==void 0&&Math.abs(u.length-a.length)<=s){const d=u.toLowerCase();if(d===a){if(u===n)continue;return c}if(o||u.length<3)continue;const f=wD(a,d,r-1);if(f===void 0)continue;f<3?(o=!0,i=c):(r=f,i=c)}}return i}function wD(n,e,t){let s=new Array(e.length+1),r=new Array(e.length+1);const i=t+1;for(let a=0;a<=e.length;a+=1)s[a]=a;for(let a=1;a<=n.length;a+=1){const c=n.charCodeAt(a-1),u=a>t?a-t:1,d=e.length>t+a?t+a:e.length;r[0]=a;let f=a;for(let p=1;p<u;p+=1)r[p]=i;for(let p=u;p<=d;p+=1){const g=c===e.charCodeAt(p-1)?s[p-1]:Math.min(s[p]+1,r[p-1]+1,s[p-1]+2);r[p]=g,f=Math.min(f,g)}for(let p=d+1;p<=e.length;p+=1)r[p]=i;if(f>t)return;const h=s;s=r,r=h}const o=s[e.length];return o>t?void 0:o}function qn(n){return typeof n=="string"&&n.slice(-1)==="%"}function dn(n,e){if(n==null)return 0;let t;if(typeof n=="string"){if(t=parseFloat(n),qn(n)&&(t/=100,Number.isFinite(t)))return t*e}else t=n;return Number.isFinite(t)?t>0&&t<1?t*e:t:0}function ps(n){if(typeof n=="object"){let t=0,s=0,r=0,i=0;return n.vertical!=null&&Number.isFinite(n.vertical)&&(s=i=n.vertical),n.horizontal!=null&&Number.isFinite(n.horizontal)&&(r=t=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(t=n.left),n.top!=null&&Number.isFinite(n.top)&&(s=n.top),n.right!=null&&Number.isFinite(n.right)&&(r=n.right),n.bottom!=null&&Number.isFinite(n.bottom)&&(i=n.bottom),{top:s,right:r,bottom:i,left:t}}let e=0;return n!=null&&Number.isFinite(n)&&(e=n),{top:e,right:e,bottom:e,left:e}}let Bu=!1,ny=!1,sy=!1,ry=!1,iy=!1,oy=!1,ay=!1,ly=!1,cy=!1,uy=!1,dy=!1,hy=!1,fy=!1,py=!1,gy=!1,my=!1;if(typeof navigator=="object"){const n=navigator.userAgent;Bu=n.indexOf("Macintosh")>=0,ny=!!n.match(/(iPad|iPhone|iPod)/g),sy=n.indexOf("Windows")>=0,ry=n.indexOf("MSIE")>=0,iy=!!n.match(/Trident\/7\./),oy=!!n.match(/Edge\//),ay=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,cy=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,uy=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,dy=n.indexOf("Firefox/")>=0,hy=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(my=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(ly=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,py=window.PointerEvent!=null&&!Bu),typeof document=="object"){fy="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){gy=!0}}),e=document.createElement("div");e.addEventListener&&e.addEventListener("click",()=>{},n)}catch{}}var gs;(function(n){n.IS_MAC=Bu,n.IS_IOS=ny,n.IS_WINDOWS=sy,n.IS_IE=ry,n.IS_IE11=iy,n.IS_EDGE=oy,n.IS_NETSCAPE=ay,n.IS_CHROME_APP=ly,n.IS_CHROME=cy,n.IS_OPERA=uy,n.IS_FIREFOX=dy,n.IS_SAFARI=hy,n.SUPPORT_TOUCH=fy,n.SUPPORT_POINTER=py,n.SUPPORT_PASSIVE=gy,n.NO_FOREIGNOBJECT=my,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(gs||(gs={})),function(n){function e(){const i=window.module;return i!=null&&i.hot!=null&&i.hot.status!=null?i.hot.status():"unkonwn"}n.getHMRStatus=e;function t(){return e()==="apply"}n.isApplyingHMR=t;const s={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function r(i){const o=document.createElement(s[i]||"div"),a=`on${i}`;let c=a in o;return c||(o.setAttribute(a,"return;"),c=typeof o[a]=="function"),c}n.isEventSupported=r}(gs||(gs={}));const ju=/[\t\r\n\f]/g,$u=/\S+/g,Br=n=>` ${n} `;function jr(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function Pn(n,e){if(n==null||e==null)return!1;const t=Br(jr(n)),s=Br(e);return n.nodeType===1?t.replace(ju," ").includes(s):!1}function X(n,e){if(!(n==null||e==null)){if(typeof e=="function")return X(n,e(jr(n)));if(typeof e=="string"&&n.nodeType===1){const t=e.match($u)||[],s=Br(jr(n)).replace(ju," ");let r=t.reduce((i,o)=>i.indexOf(Br(o))<0?`${i}${o} `:i,s);r=r.trim(),s!==r&&n.setAttribute("class",r)}}}function De(n,e){if(n!=null){if(typeof e=="function")return De(n,e(jr(n)));if((!e||typeof e=="string")&&n.nodeType===1){const t=(e||"").match($u)||[],s=Br(jr(n)).replace(ju," ");let r=t.reduce((i,o)=>{const a=Br(o);return i.indexOf(a)>-1?i.replace(a," "):i},s);r=e?r.trim():"",s!==r&&n.setAttribute("class",r)}}}function hn(n,e,t){if(!(n==null||e==null)){if(t!=null&&typeof e=="string"){t?X(n,e):De(n,e);return}if(typeof e=="function")return hn(n,e(jr(n),t),t);typeof e=="string"&&(e.match($u)||[]).forEach(r=>{Pn(n,r)?De(n,r):X(n,r)})}}let yy=0;function xD(){return yy+=1,`v${yy}`}function zu(n){return(n.id==null||n.id==="")&&(n.id=xD()),n.id}function ms(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const rt={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},by="1.1";function wy(n,e=document){return e.createElement(n)}function Fu(n,e=rt.xhtml,t=document){return t.createElementNS(e,n)}function fn(n,e=document){return Fu(n,rt.svg,e)}function qa(n){if(n){const t=`<svg xmlns="${rt.svg}" xmlns:xlink="${rt.xlink}" version="${by}">${n}</svg>`,{documentElement:s}=vD(t,{async:!1});return s}const e=document.createElementNS(rt.svg,"svg");return e.setAttributeNS(rt.xmlns,"xmlns:xlink",rt.xlink),e.setAttribute("version",by),e}function vD(n,e={}){let t;try{const s=new DOMParser;if(e.async!=null){const r=s;r.async=e.async}t=s.parseFromString(n,e.mimeType||"text/xml")}catch{t=void 0}if(!t||t.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return t}function CD(n,e=!0){const t=n.nodeName;return e?t.toLowerCase():t.toUpperCase()}function Uu(n){let e=0,t=n.previousSibling;for(;t;)t.nodeType===1&&(e+=1),t=t.previousSibling;return e}function SD(n,e){return n.querySelectorAll(e)}function ED(n,e){return n.querySelector(e)}function xy(n,e,t){const s=n.ownerSVGElement;let r=n.parentNode;for(;r&&r!==t&&r!==s;){if(Pn(r,e))return r;r=r.parentNode}return null}function Hu(n,e){const t=e&&e.parentNode;return n===t||!!(t&&t.nodeType===1&&n.compareDocumentPosition(t)&16)}function Ht(n){n&&(Array.isArray(n)?n:[n]).forEach(t=>{t.parentNode&&t.parentNode.removeChild(t)})}function Zi(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function kt(n,e){(Array.isArray(e)?e:[e]).forEach(s=>{s!=null&&n.appendChild(s)})}function vy(n,e){const t=n.firstChild;return t?Gu(t,e):kt(n,e)}function Gu(n,e){const t=n.parentNode;t&&(Array.isArray(e)?e:[e]).forEach(r=>{r!=null&&t.insertBefore(r,n)})}function ys(n,e){e!=null&&e.appendChild(n)}function Cy(n){try{return n instanceof HTMLElement}catch{return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function OD(n,e){const t=[];let s=n.firstChild;for(;s;s=s.nextSibling)s.nodeType===1&&(!e||Pn(s,e))&&t.push(s);return t}const Sy=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function MD(n,e){return n.getAttribute(e)}function Wu(n,e){const t=Oy(e);t.ns?n.hasAttributeNS(t.ns,t.local)&&n.removeAttributeNS(t.ns,t.local):n.hasAttribute(e)&&n.removeAttribute(e)}function Yu(n,e,t){if(t==null)return Wu(n,e);const s=Oy(e);s.ns&&typeof t=="string"?n.setAttributeNS(s.ns,e,t):e==="id"?n.id=`${t}`:n.setAttribute(e,`${t}`)}function Ey(n,e){Object.keys(e).forEach(t=>{Yu(n,t,e[t])})}function fe(n,e,t){if(e==null){const s=n.attributes,r={};for(let i=0;i<s.length;i+=1)r[s[i].name]=s[i].value;return r}if(typeof e=="string"&&t===void 0)return n.getAttribute(e);typeof e=="object"?Ey(n,e):Yu(n,e,t)}function Oy(n){if(n.indexOf(":")!==-1){const e=n.split(":");return{ns:rt[e[0]],local:e[1]}}return{ns:null,local:n}}function Qi(n){const e={};return Object.keys(n).forEach(t=>{const s=Sy.includes(t)?t:ty(t);e[s]=n[t]}),e}function Ja(n){const e={};return n.split(";").forEach(s=>{const r=s.trim();if(r){const i=r.split("=");i.length&&(e[i[0].trim()]=i[1]?i[1].trim():"")}}),e}function qu(n,e){return Object.keys(e).forEach(t=>{if(t==="class")n[t]=n[t]?`${n[t]} ${e[t]}`:e[t];else if(t==="style"){const s=typeof n[t]=="object",r=typeof e[t]=="object";let i,o;s&&r?(i=n[t],o=e[t]):s?(i=n[t],o=Ja(e[t])):r?(i=Ja(n[t]),o=e[t]):(i=Ja(n[t]),o=Ja(e[t])),n[t]=qu(i,o)}else n[t]=e[t]}),n}function PD(n,e,t={}){const s=t.offset||0,r=[],i=[];let o,a,c=null;for(let u=0;u<n.length;u+=1){o=i[u]=n[u];for(let d=0,f=e.length;d<f;d+=1){const h=e[d],p=h.start+s,g=h.end+s;u>=p&&u<g&&(typeof o=="string"?o=i[u]={t:n[u],attrs:h.attrs}:o.attrs=qu(qu({},o.attrs),h.attrs),t.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(d)))}a=i[u-1],a?Ie(o)&&Ie(a)?(c=c,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?c.t+=o.t:(r.push(c),c=o)):Ie(o)||Ie(a)?(c=c,r.push(c),c=o):c=(c||"")+o:c=o}return c!=null&&r.push(c),r}function ND(n){return n.replace(/ /g," ")}var Ys;(function(n){function e(u){const d="data:";return u.substr(0,d.length)===d}n.isDataUrl=e;function t(u,d){if(!u||e(u)){setTimeout(()=>d(null,u));return}const f=()=>{d(new Error(`Failed to load image: ${u}`))},h=window.FileReader?g=>{if(g.status===200){const m=new FileReader;m.onload=y=>{const b=y.target.result;d(null,b)},m.onerror=f,m.readAsDataURL(g.response)}else f()}:g=>{const m=y=>{const w=[];for(let x=0;x<y.length;x+=32768)w.push(String.fromCharCode.apply(null,y.subarray(x,x+32768)));return w.join("")};if(g.status===200){let y=u.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,w=new Uint8Array(g.response),x=b+btoa(m(w));d(null,x)}else f()},p=new XMLHttpRequest;p.responseType=window.FileReader?"blob":"arraybuffer",p.open("GET",u,!0),p.addEventListener("error",f),p.addEventListener("load",()=>h(p)),p.send()}n.imageToDataUri=t;function s(u){let d=u.replace(/\s/g,"");d=decodeURIComponent(d);const f=d.indexOf(","),h=d.slice(0,f),p=h.split(":")[1].split(";")[0],g=d.slice(f+1);let m;h.indexOf("base64")>=0?m=atob(g):m=unescape(encodeURIComponent(g));const y=new Uint8Array(m.length);for(let b=0;b<m.length;b+=1)y[b]=m.charCodeAt(b);return new Blob([y],{type:p})}n.dataUriToBlob=s;function r(u,d){const f=window.navigator.msSaveBlob;if(f)f(u,d);else{const h=window.URL.createObjectURL(u),p=document.createElement("a");p.href=h,p.download=d,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(h)}}n.downloadBlob=r;function i(u,d){const f=s(u);r(f,d)}n.downloadDataUri=i;function o(u){const d=u.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return d&&d[2]?d[2].replace(/\s+/," ").split(" "):null}function a(u){const d=parseFloat(u);return Number.isNaN(d)?null:d}function c(u,d={}){let f=null;const h=x=>(f==null&&(f=o(u)),f!=null?a(f[x]):null),p=x=>{const v=u.match(x);return v&&v[2]?a(v[2]):null};let g=d.width;if(g==null&&(g=p(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),g==null&&(g=h(2)),g==null)throw new Error("Can not parse width from svg string");let m=d.height;if(m==null&&(m=p(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),m==null&&(m=h(3)),m==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(u).replace(/'/g,"%27").replace(/"/g,"%22")}`}n.svgToDataUrl=c})(Ys||(Ys={}));let qs;const AD={px(n){return n},mm(n){return qs*n},cm(n){return qs*n*10},in(n){return qs*n*25.4},pt(n){return qs*(25.4*n/72)},pc(n){return qs*(25.4*n/6)}};var My;(function(n){function e(s,r,i){const o=document.createElement("div"),a=o.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=s+(i||"px"),a.height=r+(i||"px"),document.body.appendChild(o);const c=o.getBoundingClientRect(),u={width:c.width||0,height:c.height||0};return document.body.removeChild(o),u}n.measure=e;function t(s,r){qs==null&&(qs=e("1","1","mm").width);const i=r?AD[r]:null;return i?i(s):s}n.toPx=t})(My||(My={}));const _D=/-(.)/g;function TD(n){return n.replace(_D,(e,t)=>t.toUpperCase())}const Ju={},Py=["webkit","ms","moz","o"],Ny=typeof document<"u"?document.createElement("div").style:{};function kD(n){for(let e=0;e<Py.length;e+=1){const t=Py[e]+n;if(t in Ny)return t}return null}function VD(n){const e=TD(n);if(Ju[e]==null){const t=e.charAt(0).toUpperCase()+e.slice(1);Ju[e]=e in Ny?e:kD(t)}return Ju[e]}function Ay(n,e){const t=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return t&&e?t.getPropertyValue(e)||t[e]:t}const DD={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function RD(n){return/^--/.test(n)}function LD(n,e,t){const s=window.getComputedStyle(n,null);return t?s.getPropertyValue(e)||void 0:s[e]||n.style[e]}function ID(n,e){return!DD[n]&&typeof e=="number"?`${e}px`:e}function Je(n,e,t){if(typeof e=="string"){const s=RD(e);if(s||(e=VD(e)),t===void 0)return LD(n,e,s);s||(t=ID(e,t));const r=n.style;s?r.setProperty(e,t):r[e]=t;return}for(const s in e)Je(n,s,e[s])}const Xa=new WeakMap;function _y(n,e){const t=oa(e),s=Xa.get(n);if(s)return s[t]}function BD(n,e,t){const s=oa(e),r=Xa.get(n);r?r[s]=t:Xa.set(n,{[s]:t})}function Js(n,e,t){if(!e){const s={};return Object.keys(Xa).forEach(r=>{s[r]=_y(n,r)}),s}if(typeof e=="string"){if(t===void 0)return _y(n,e);BD(n,e,t);return}for(const s in e)Js(n,s,e[s])}class oe{get[Symbol.toStringTag](){return oe.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(e){this.node.id=e}constructor(e,t,s){if(!e)throw new TypeError("Invalid element to create vector");let r;if(oe.isVector(e))r=e.node;else if(typeof e=="string")if(e.toLowerCase()==="svg")r=qa();else if(e[0]==="<"){const i=qa(e);r=document.importNode(i.firstChild,!0)}else r=document.createElementNS(rt.svg,e);else r=e;this.node=r,t&&this.setAttributes(t),s&&this.append(s)}transform(e,t){return e==null?zr(this.node):(zr(this.node,e,t),this)}translate(e,t=0,s={}){return e==null?jy(this.node):(jy(this.node,e,t,s),this)}rotate(e,t,s,r={}){return e==null?Zu(this.node):(Zu(this.node,e,t,s,r),this)}scale(e,t){return e==null?Qu(this.node):(Qu(this.node,e,t),this)}getTransformToElement(e){const t=oe.toNode(e);return so(this.node,t)}removeAttribute(e){return Wu(this.node,e),this}getAttribute(e){return MD(this.node,e)}setAttribute(e,t){return Yu(this.node,e,t),this}setAttributes(e){return Ey(this.node,e),this}attr(e,t){return e==null?fe(this.node):typeof e=="string"&&t===void 0?fe(this.node,e):(typeof e=="object"?fe(this.node,e):fe(this.node,e,t),this)}svg(){return this.node instanceof SVGSVGElement?this:oe.create(this.node.ownerSVGElement)}defs(){const e=this.svg()||this,t=e.node.getElementsByTagName("defs")[0];return t?oe.create(t):oe.create("defs").appendTo(e)}text(e,t={}){return ky(this.node,e,t),this}tagName(){return CD(this.node)}clone(){return oe.create(this.node.cloneNode(!0))}remove(){return Ht(this.node),this}empty(){return Zi(this.node),this}append(e){return kt(this.node,oe.toNodes(e)),this}appendTo(e){return ys(this.node,oe.isVector(e)?e.node:e),this}prepend(e){return vy(this.node,oe.toNodes(e)),this}before(e){return Gu(this.node,oe.toNodes(e)),this}replace(e){return this.node.parentNode&&this.node.parentNode.replaceChild(oe.toNode(e),this.node),oe.create(e)}first(){return this.node.firstChild?oe.create(this.node.firstChild):null}last(){return this.node.lastChild?oe.create(this.node.lastChild):null}get(e){const t=this.node.childNodes[e];return t?oe.create(t):null}indexOf(e){return Array.prototype.slice.call(this.node.childNodes).indexOf(oe.toNode(e))}find(e){const t=[],s=SD(this.node,e);if(s)for(let r=0,i=s.length;r<i;r+=1)t.push(oe.create(s[r]));return t}findOne(e){const t=ED(this.node,e);return t?oe.create(t):null}findParentByClass(e,t){const s=xy(this.node,e,t);return s?oe.create(s):null}matches(e){const t=this.node;this.node.matches;const s=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return s&&s.call(t,e)}contains(e){return Hu(this.node,oe.isVector(e)?e.node:e)}wrap(e){const t=oe.create(e),s=this.node.parentNode;return s!=null&&s.insertBefore(t.node,this.node),t.append(this)}parent(e){let t=this;if(t.node.parentNode==null)return null;if(t=oe.create(t.node.parentNode),e==null)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=oe.create(t.node.parentNode));return t}children(){const e=this.node.childNodes,t=[];for(let s=0;s<e.length;s+=1)e[s].nodeType===1&&t.push(oe.create(e[s]));return t}eachChild(e,t){const s=this.children();for(let r=0,i=s.length;r<i;r+=1)e.call(s[r],s[r],r,s),t&&s[r].eachChild(e,t);return this}index(){return Uu(this.node)}hasClass(e){return Pn(this.node,e)}addClass(e){return X(this.node,e),this}removeClass(e){return De(this.node,e),this}toggleClass(e,t){return hn(this.node,e,t),this}toLocalPoint(e,t){return rR(this.node,e,t)}sample(e=1){return this.node instanceof SVGPathElement?FD(this.node,e):[]}toPath(){return oe.create(JD(this.node))}toPathData(){return Iy(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function e(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],c=o;return(a==null||a===n.toStringTag)&&c.node instanceof SVGElement&&typeof c.sample=="function"&&typeof c.toPath=="function"}n.isVector=e;function t(o,a,c){return new n(o,a,c)}n.create=t;function s(o){if(o[0]==="<"){const a=qa(o),c=[];for(let u=0,d=a.childNodes.length;u<d;u+=1){const f=a.childNodes[u];c.push(t(document.importNode(f,!0)))}return c}return[t(o)]}n.createVectors=s;function r(o){return e(o)?o.node:o}n.toNode=r;function i(o){return Array.isArray(o)?o.map(a=>r(a)):[r(o)]}n.toNodes=i})(oe||(oe={}));function jD(n,e){const t=oe.create(e),s=oe.create("textPath"),r=n.d;if(r&&n["xlink:href"]===void 0){const i=oe.create("path").attr("d",r).appendTo(t.defs());s.attr("xlink:href",`#${i.id}`)}return typeof n=="object"&&s.attr(n),s.node}function $D(n,e,t){const s=t.eol,r=t.baseSize,i=t.lineHeight;let o=0,a;const c={},u=e.length-1;for(let d=0;d<=u;d+=1){let f=e[d],h=null;if(typeof f=="object"){const p=f.attrs,g=oe.create("tspan",p);a=g.node;let m=f.t;s&&d===u&&(m+=s),a.textContent=m;const y=p.class;y&&g.addClass(y),t.includeAnnotationIndices&&g.attr("annotations",f.annotations.join(",")),h=parseFloat(p["font-size"]),h===void 0&&(h=r),h&&h>o&&(o=h)}else s&&d===u&&(f+=s),a=document.createTextNode(f||" "),r&&r>o&&(o=r);n.appendChild(a)}return o&&(c.maxFontSize=o),i?c.lineHeight=i:o&&(c.lineHeight=o*1.2),c}const Ty=/em$/;function Ka(n,e){const t=parseFloat(n);return Ty.test(n)?t*e:t}function zD(n,e,t,s){if(!Array.isArray(e))return 0;const r=e.length;if(!r)return 0;let i=e[0];const o=Ka(i.maxFontSize,t)||t;let a=0;const c=Ka(s,t);for(let f=1;f<r;f+=1){i=e[f];const h=Ka(i.lineHeight,t)||c;a+=h}const u=Ka(i.maxFontSize,t)||t;let d;switch(n){case"middle":d=o/2-.15*u-a/2;break;case"bottom":d=-(.25*u)-a;break;case"top":default:d=.8*o;break}return d}function ky(n,e,t={}){e=ND(e);const s=t.eol;let r=t.textPath;const i=t.textVerticalAnchor,o=i==="middle"||i==="bottom"||i==="top";let a=t.x;a===void 0&&(a=n.getAttribute("x")||0);const c=t.includeAnnotationIndices;let u=t.annotations;u&&!Array.isArray(u)&&(u=[u]);const d=t.lineHeight,f=d==="auto",h=f?"1.5em":d||"1em";let p=!0;const g=n.childNodes;if(g.length===1){const A=g[0];A&&A.tagName.toUpperCase()==="TITLE"&&(p=!1)}p&&Zi(n),fe(n,{"xml:space":"preserve",display:e||t.displayEmpty?null:"none"});const m=fe(n,"font-size");let y=parseFloat(m);y||(y=16,(o||u)&&!m&&fe(n,"font-size",`${y}`));let b;r?(typeof r=="string"&&(r={d:r}),b=jD(r,n)):b=document.createDocumentFragment();let w,x=0,v;const S=e.split(`
|
|
34
|
+
`+i):s.stack=i}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Gs(this.defaults,t);const{transitional:s,paramsSerializer:r,headers:i}=t;s!==void 0&&Ou.assertOptions(s,{silentJSONParsing:fs.transitional(fs.boolean),forcedJSONParsing:fs.transitional(fs.boolean),clarifyTimeoutError:fs.transitional(fs.boolean)},!1),r!=null&&(L.isFunction(r)?t.paramsSerializer={serialize:r}:Ou.assertOptions(r,{encode:fs.function,serialize:fs.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&L.merge(i.common,i[t.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),t.headers=Et.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(c=c&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,h;if(!c){const g=[jm.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),h=g.length,d=Promise.resolve(t);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let p=t;for(f=0;f<h;){const g=a[f++],m=a[f++];try{p=g(p)}catch(y){m.call(this,y);break}}try{d=jm.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(e){e=Gs(this.defaults,e);const t=_m(e.baseURL,e.url);return vm(t,e.params,e.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(e){Ws.prototype[e]=function(t,s){return this.request(Gs(s||{},{method:e,url:t,data:(s||{}).data}))}}),L.forEach(["post","put","patch"],function(e){function t(s){return function(i,o,a){return this.request(Gs(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Ws.prototype[e]=t(),Ws.prototype[e+"Form"]=t(!0)});class Mu{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,a){s.reason||(s.reason=new Lr(i,o,a),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=s=>{e.abort(s)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Mu(function(r){e=r}),cancel:e}}}function ZV(n){return function(t){return n.apply(null,t)}}function QV(n){return L.isObject(n)&&n.isAxiosError===!0}const Pu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pu).forEach(([n,e])=>{Pu[e]=n});function Fm(n){const e=new Ws(n),t=im(Ws.prototype.request,e);return L.extend(t,Ws.prototype,e,{allOwnKeys:!0}),L.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Fm(Gs(n,r))},t}const qe=Fm(qi);qe.Axios=Ws,qe.CanceledError=Lr,qe.CancelToken=Mu,qe.isCancel=Mm,qe.VERSION=$m,qe.toFormData=ja,qe.AxiosError=ue,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=ZV,qe.isAxiosError=QV,qe.mergeConfig=Gs,qe.AxiosHeaders=Et,qe.formToJSON=n=>Em(L.isHTMLForm(n)?new FormData(n):n),qe.getAdapter=Bm.getAdapter,qe.HttpStatusCode=Pu,qe.default=qe;const Mn=qe.create({baseURL:"http://localhost:8001",timeout:1e4,headers:{"Content-Type":"application/json"}}),eD=n=>{Mn.defaults.baseURL=n},tD=n=>{Mn.interceptors.request.use(e=>{if(n)return e.headers.token=n,e},e=>Promise.reject(e))};Mn.interceptors.response.use(n=>(n.data.isOk=n.data.code===200,n.data),n=>{if(n.response)switch(n.response.status){}return Promise.reject(n)});const Xi=(n,e={})=>Mn.get(n,{params:e}),Ha=(n,e={})=>Mn.post(n,e),Um=(n,e={})=>Mn.delete(n,{params:e}),nD=(n,e={})=>Mn.post(n,e,{headers:{"Content-Type":"multipart/form-data"}}),Ki=(n,e)=>{const t=document.querySelector(n),s=t.querySelectorAll(".x6-port-body"),r=t.querySelectorAll(".x6-port-label");for(let i=0,o=s.length;i<o;i+=1)s[i].style.visibility=e?"visible":"hidden";for(let i=0,o=r.length;i<o;i+=1)r[i].style.visibility=e?"visible":"hidden"},Nu=()=>Xi("/cny/custom/deviceList").then(n=>{if(n!=null&&n.isOk)return n.data}),Au=n=>Xi("/cny/custom/monitorInfo",{deviceCode:n,fieldType:1}).then(e=>{if(e!=null&&e.isOk)return e.data}),Hm=n=>Xi("/cny/template/selectOne",{id:n}).then(e=>{if(e!=null&&e.isOk){const t=JSON.parse(e.data.remark);return{background:t.background,grid:t.grid,data:t.data}}else Ye.error((e==null?void 0:e.msg)||"获取失败")}),sD=n=>Ha("/cny/custom/arrRealData2",n).then(e=>{if(e!=null&&e.isOk)return e.data;Ye.error((e==null?void 0:e.msg)||"获取失败")}),Gm={color:"#000000"},Wm={size:10,visible:!1,type:"doubleMesh",args:[{color:"#282828",thickness:1},{color:"#363636",thickness:2,factor:4}]},rD={stencilGraphWidth:300,stencilGraphHeight:0,layoutOptions:{columns:3,columnWidth:74,resizeToFit:!0,center:!0}},_u={position:"absolute",args:{x:0,y:0},attrs:{text:{fill:"#5174ff",fontSize:8},circle:{magnet:!0,stroke:"#5174ff",r:4}},label:{position:"top"}},iD={shape:"rect",label:"文本",width:50,height:30,attrs:{body:{fill:"#00000000",stroke:"#00000000",strokeWidth:1,rx:6,ry:6},text:{fill:"#ffffff"},label:{textAnchor:"start",x:-14,y:0}},data:{type:"text",content:"文本",fields:[]},ports:{groups:{ports:{portOption:_u}}}},Ga={markup:[{tagName:"path",selector:"line",groupSelector:"lines"}],attrs:{wrap:{strokeWidth:10},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}}},Ym={markup:[{tagName:"path",selector:"line",groupSelector:"lines"},{tagName:"path",selector:"pipe",groupSelector:"lines"}],attrs:{wrap:{strokeWidth:10},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,targetMarker:null,sourceMarker:null},pipe:{stroke:"#2364DD",strokeWidth:1,strokeDasharray:5,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}}},Wa="M 0 -6 8 0 0 6 z",qm="M 0 -6 -8 0 0 6 z",Jm={attrs:{wrap:{strokeWidth:10},arrow:{d:Wa,fill:"#ED8A19",stroke:"#ED8A19",style:{animation:"flashing 2s infinite linear"},display:"block"},arrow1:{atConnectionRatio:.5},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}},markup:[{tagName:"path",selector:"line",groupSelector:"lines"},{tagName:"path",groupSelector:"arrow",selector:"arrow1"}]},Qe={markup:Ga.markup,attrs:Ga.attrs},Ut=(n,e)=>{const t=n.__vccOpts||n;for(const[s,r]of e)t[s]=r;return t},oD={class:"control"},aD={class:"row-column"},lD=Ut({__name:"index",props:{payload:Object},setup(n){var h,p,g,m,y,b,w,x,v,S,E,C,P,A,T,k,V,R,j,N,M;const e=n,t=l.ref(((h=e.payload.value.options.background)==null?void 0:h.color)||null),s=l.ref(((g=(p=e.payload.value.options)==null?void 0:p.grid)==null?void 0:g.visible)||null),r=l.ref(((y=(m=e.payload.value.options)==null?void 0:m.grid)==null?void 0:y.size)||10),i=l.ref(((v=(x=(w=(b=e.payload.value.options)==null?void 0:b.grid)==null?void 0:w.args)==null?void 0:x[0])==null?void 0:v.color)||null),o=l.ref(((P=(C=(E=(S=e.payload.value.options)==null?void 0:S.grid)==null?void 0:E.args)==null?void 0:C[0])==null?void 0:P.thickness)||1),a=l.ref(((V=(k=(T=(A=e.payload.value.options)==null?void 0:A.grid)==null?void 0:T.args)==null?void 0:k[1])==null?void 0:V.color)||null),c=l.ref(((M=(N=(j=(R=e.payload.value.options)==null?void 0:R.grid)==null?void 0:j.args)==null?void 0:N[1])==null?void 0:M.thickness)||1),u=l.ref("1"),d=D=>{e.payload.value.drawBackground({color:D})},f=()=>{e.payload.value.drawGrid({visible:s.value,size:r.value,type:"doubleMesh",args:[{color:i.value,thickness:o.value},{color:a.value,thickness:c.value}]})};return(D,B)=>{const G=l.resolveComponent("el-col"),se=l.resolveComponent("el-color-picker"),I=l.resolveComponent("el-row"),_=l.resolveComponent("el-switch"),H=l.resolveComponent("el-input-number"),K=l.resolveComponent("el-collapse-item"),q=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",oD,[l.createVNode(q,{modelValue:u.value,"onUpdate:modelValue":B[7]||(B[7]=re=>u.value=re),accordion:""},{default:l.withCtx(()=>[l.createVNode(K,{title:"基础属性",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",aD,[l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[8]||(B[8]=[l.createElementVNode("div",{class:"row-label"},"背景色",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(se,{modelValue:t.value,"onUpdate:modelValue":B[0]||(B[0]=re=>t.value=re),size:"small","show-alpha":"",onChange:d},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[9]||(B[9]=[l.createElementVNode("div",{class:"row-label"},"网格",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=re=>s.value=re),"active-value":!0,"inactive-value":!1,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[10]||(B[10]=[l.createElementVNode("div",{class:"row-label"},"网格大小",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(H,{modelValue:r.value,"onUpdate:modelValue":B[2]||(B[2]=re=>r.value=re),min:1,max:20,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[11]||(B[11]=[l.createElementVNode("div",{class:"row-label"},"主网格颜色",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(se,{modelValue:i.value,"onUpdate:modelValue":B[3]||(B[3]=re=>i.value=re),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[12]||(B[12]=[l.createElementVNode("div",{class:"row-label"},"次网格颜色",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(se,{modelValue:a.value,"onUpdate:modelValue":B[4]||(B[4]=re=>a.value=re),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[13]||(B[13]=[l.createElementVNode("div",{class:"row-label"},"主网格粗细",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(H,{modelValue:o.value,"onUpdate:modelValue":B[5]||(B[5]=re=>o.value=re),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(I,{gutter:20},{default:l.withCtx(()=>[l.createVNode(G,{span:12},{default:l.withCtx(()=>B[14]||(B[14]=[l.createElementVNode("div",{class:"row-label"},"次网格粗细",-1)])),_:1}),l.createVNode(G,{span:12},{default:l.withCtx(()=>[l.createVNode(H,{modelValue:c.value,"onUpdate:modelValue":B[6]||(B[6]=re=>c.value=re),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-5dd827ed"]]);typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(n){n.forEach(e=>{Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value(...t){const s=document.createDocumentFragment();t.forEach(r=>{const i=r instanceof Node;s.appendChild(i?r:document.createTextNode(String(r)))}),this.appendChild(s)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class yt{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function e(){return(t,s,r)=>{const i=r.value,o=t.__proto__;r.value=function(...a){this.disposed||(i.call(this,...a),o.dispose.call(this))}}}n.dispose=e})(yt||(yt={}));class Xm{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(e=>{e.dispose()}),this.items.clear())}contains(e){return this.items.has(e)}add(e){this.items.add(e)}remove(e){this.items.delete(e)}clear(){this.items.clear()}}(function(n){function e(t){const s=new n;return t.forEach(r=>{s.add(r)}),s}n.from=e})(Xm||(Xm={}));function Km(n,e,t){if(t)switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2]);case 4:return n.call(e,t[0],t[1],t[2],t[3]);case 5:return n.call(e,t[0],t[1],t[2],t[3],t[4]);case 6:return n.call(e,t[0],t[1],t[2],t[3],t[4],t[5]);default:return n.apply(e,t)}return n.call(e)}function ee(n,e,...t){return Km(n,e,t)}function cD(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function Tu(n){return n!=null&&(n instanceof Promise||cD(n))}function ku(...n){const e=[];if(n.forEach(s=>{Array.isArray(s)?e.push(...s):e.push(s)}),e.some(s=>Tu(s))){const s=e.map(r=>Tu(r)?r:Promise.resolve(r!==!1));return Promise.all(s).then(r=>r.reduce((i,o)=>o!==!1&&i,!0))}return e.every(s=>s!==!1)}function uD(...n){const e=ku(n);return typeof e=="boolean"?Promise.resolve(e):e}function Vu(n,e){const t=[];for(let s=0;s<n.length;s+=2){const r=n[s],i=n[s+1],o=Array.isArray(e)?e:[e],a=Km(r,i,o);t.push(a)}return ku(t)}class dD{constructor(){this.listeners={}}on(e,t,s){return t==null?this:(this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t,s),this)}once(e,t,s){const r=(...i)=>(this.off(e,r),Vu([t,s],i));return this.on(e,r,this)}off(e,t,s){if(!(e||t||s))return this.listeners={},this;const r=this.listeners;return(e?[e]:Object.keys(r)).forEach(o=>{const a=r[o];if(a){if(!(t||s)){delete r[o];return}for(let c=a.length-2;c>=0;c-=2)t&&a[c]!==t||s&&a[c+1]!==s||a.splice(c,2)}}),this}trigger(e,...t){let s=!0;if(e!=="*"){const i=this.listeners[e];i!=null&&(s=Vu([...i],t))}const r=this.listeners["*"];return r!=null?ku([s,Vu([...r],[e,...t])]):s}emit(e,...t){return this.trigger(e,...t)}}function hD(n,...e){e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(n.prototype,s,Object.getOwnPropertyDescriptor(t.prototype,s))})})}const fD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])};function pD(n,e){fD(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}class gD{}const mD=/^\s*class\s+/.test(`${gD}`)||/^\s*class\s*\{/.test(`${class{}}`);function Du(n,e){let t;return mD?t=class extends e{}:(t=function(){return e.apply(this,arguments)},pD(t,e)),Object.defineProperty(t,"name",{value:n}),t}function Zm(n){return n==="__proto__"}function Ru(n,e,t="/"){let s;const r=Array.isArray(e)?e:e.split(t);if(r.length)for(s=n;r.length;){const i=r.shift();if(Object(s)===s&&i&&i in s)s=s[i];else return}return s}function Ir(n,e,t,s="/"){const r=Array.isArray(e)?e:e.split(s),i=r.pop();if(i&&!Zm(i)){let o=n;r.forEach(a=>{Zm(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[i]=t}return n}function Qm(n,e,t="/"){const s=Array.isArray(e)?e.slice():e.split(t),r=s.pop();if(r)if(s.length>0){const i=Ru(n,s);i&&delete i[r]}else delete n[r];return n}var yD=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class Te extends dD{dispose(){this.off()}}yD([yt.dispose()],Te.prototype,"dispose",null),function(n){n.dispose=yt.dispose}(Te||(Te={})),hD(Te,yt);const ey=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},ty=ey(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),Lu=ey(n=>GP(oa(n)).replace(/ /g,""));function Iu(n){let e=2166136261,t=!1,s=n;for(let r=0,i=s.length;r<i;r+=1){let o=s.charCodeAt(r);o>127&&!t&&(s=unescape(encodeURIComponent(s)),o=s.charCodeAt(r),t=!0),e^=o,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function Ya(){let n="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let t=0,s=e.length;t<s;t+=1){const r=e[t],i=Math.random()*16|0,o=r==="x"?i:r==="y"?i&3|8:r;n+=o.toString(16)}return n}function bD(n,e,t){const s=Math.min(2,Math.floor(n.length*.34));let r=Math.floor(n.length*.4)+1,i,o=!1;const a=n.toLowerCase();for(const c of e){const u=t(c);if(u!==void 0&&Math.abs(u.length-a.length)<=s){const d=u.toLowerCase();if(d===a){if(u===n)continue;return c}if(o||u.length<3)continue;const f=wD(a,d,r-1);if(f===void 0)continue;f<3?(o=!0,i=c):(r=f,i=c)}}return i}function wD(n,e,t){let s=new Array(e.length+1),r=new Array(e.length+1);const i=t+1;for(let a=0;a<=e.length;a+=1)s[a]=a;for(let a=1;a<=n.length;a+=1){const c=n.charCodeAt(a-1),u=a>t?a-t:1,d=e.length>t+a?t+a:e.length;r[0]=a;let f=a;for(let p=1;p<u;p+=1)r[p]=i;for(let p=u;p<=d;p+=1){const g=c===e.charCodeAt(p-1)?s[p-1]:Math.min(s[p]+1,r[p-1]+1,s[p-1]+2);r[p]=g,f=Math.min(f,g)}for(let p=d+1;p<=e.length;p+=1)r[p]=i;if(f>t)return;const h=s;s=r,r=h}const o=s[e.length];return o>t?void 0:o}function qn(n){return typeof n=="string"&&n.slice(-1)==="%"}function dn(n,e){if(n==null)return 0;let t;if(typeof n=="string"){if(t=parseFloat(n),qn(n)&&(t/=100,Number.isFinite(t)))return t*e}else t=n;return Number.isFinite(t)?t>0&&t<1?t*e:t:0}function ps(n){if(typeof n=="object"){let t=0,s=0,r=0,i=0;return n.vertical!=null&&Number.isFinite(n.vertical)&&(s=i=n.vertical),n.horizontal!=null&&Number.isFinite(n.horizontal)&&(r=t=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(t=n.left),n.top!=null&&Number.isFinite(n.top)&&(s=n.top),n.right!=null&&Number.isFinite(n.right)&&(r=n.right),n.bottom!=null&&Number.isFinite(n.bottom)&&(i=n.bottom),{top:s,right:r,bottom:i,left:t}}let e=0;return n!=null&&Number.isFinite(n)&&(e=n),{top:e,right:e,bottom:e,left:e}}let Bu=!1,ny=!1,sy=!1,ry=!1,iy=!1,oy=!1,ay=!1,ly=!1,cy=!1,uy=!1,dy=!1,hy=!1,fy=!1,py=!1,gy=!1,my=!1;if(typeof navigator=="object"){const n=navigator.userAgent;Bu=n.indexOf("Macintosh")>=0,ny=!!n.match(/(iPad|iPhone|iPod)/g),sy=n.indexOf("Windows")>=0,ry=n.indexOf("MSIE")>=0,iy=!!n.match(/Trident\/7\./),oy=!!n.match(/Edge\//),ay=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,cy=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,uy=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,dy=n.indexOf("Firefox/")>=0,hy=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(my=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(ly=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,py=window.PointerEvent!=null&&!Bu),typeof document=="object"){fy="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){gy=!0}}),e=document.createElement("div");e.addEventListener&&e.addEventListener("click",()=>{},n)}catch{}}var gs;(function(n){n.IS_MAC=Bu,n.IS_IOS=ny,n.IS_WINDOWS=sy,n.IS_IE=ry,n.IS_IE11=iy,n.IS_EDGE=oy,n.IS_NETSCAPE=ay,n.IS_CHROME_APP=ly,n.IS_CHROME=cy,n.IS_OPERA=uy,n.IS_FIREFOX=dy,n.IS_SAFARI=hy,n.SUPPORT_TOUCH=fy,n.SUPPORT_POINTER=py,n.SUPPORT_PASSIVE=gy,n.NO_FOREIGNOBJECT=my,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(gs||(gs={})),function(n){function e(){const i=window.module;return i!=null&&i.hot!=null&&i.hot.status!=null?i.hot.status():"unkonwn"}n.getHMRStatus=e;function t(){return e()==="apply"}n.isApplyingHMR=t;const s={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function r(i){const o=document.createElement(s[i]||"div"),a=`on${i}`;let c=a in o;return c||(o.setAttribute(a,"return;"),c=typeof o[a]=="function"),c}n.isEventSupported=r}(gs||(gs={}));const ju=/[\t\r\n\f]/g,$u=/\S+/g,Br=n=>` ${n} `;function jr(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function Pn(n,e){if(n==null||e==null)return!1;const t=Br(jr(n)),s=Br(e);return n.nodeType===1?t.replace(ju," ").includes(s):!1}function X(n,e){if(!(n==null||e==null)){if(typeof e=="function")return X(n,e(jr(n)));if(typeof e=="string"&&n.nodeType===1){const t=e.match($u)||[],s=Br(jr(n)).replace(ju," ");let r=t.reduce((i,o)=>i.indexOf(Br(o))<0?`${i}${o} `:i,s);r=r.trim(),s!==r&&n.setAttribute("class",r)}}}function De(n,e){if(n!=null){if(typeof e=="function")return De(n,e(jr(n)));if((!e||typeof e=="string")&&n.nodeType===1){const t=(e||"").match($u)||[],s=Br(jr(n)).replace(ju," ");let r=t.reduce((i,o)=>{const a=Br(o);return i.indexOf(a)>-1?i.replace(a," "):i},s);r=e?r.trim():"",s!==r&&n.setAttribute("class",r)}}}function hn(n,e,t){if(!(n==null||e==null)){if(t!=null&&typeof e=="string"){t?X(n,e):De(n,e);return}if(typeof e=="function")return hn(n,e(jr(n),t),t);typeof e=="string"&&(e.match($u)||[]).forEach(r=>{Pn(n,r)?De(n,r):X(n,r)})}}let yy=0;function xD(){return yy+=1,`v${yy}`}function zu(n){return(n.id==null||n.id==="")&&(n.id=xD()),n.id}function ms(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const rt={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},by="1.1";function wy(n,e=document){return e.createElement(n)}function Fu(n,e=rt.xhtml,t=document){return t.createElementNS(e,n)}function fn(n,e=document){return Fu(n,rt.svg,e)}function qa(n){if(n){const t=`<svg xmlns="${rt.svg}" xmlns:xlink="${rt.xlink}" version="${by}">${n}</svg>`,{documentElement:s}=vD(t,{async:!1});return s}const e=document.createElementNS(rt.svg,"svg");return e.setAttributeNS(rt.xmlns,"xmlns:xlink",rt.xlink),e.setAttribute("version",by),e}function vD(n,e={}){let t;try{const s=new DOMParser;if(e.async!=null){const r=s;r.async=e.async}t=s.parseFromString(n,e.mimeType||"text/xml")}catch{t=void 0}if(!t||t.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return t}function CD(n,e=!0){const t=n.nodeName;return e?t.toLowerCase():t.toUpperCase()}function Uu(n){let e=0,t=n.previousSibling;for(;t;)t.nodeType===1&&(e+=1),t=t.previousSibling;return e}function SD(n,e){return n.querySelectorAll(e)}function ED(n,e){return n.querySelector(e)}function xy(n,e,t){const s=n.ownerSVGElement;let r=n.parentNode;for(;r&&r!==t&&r!==s;){if(Pn(r,e))return r;r=r.parentNode}return null}function Hu(n,e){const t=e&&e.parentNode;return n===t||!!(t&&t.nodeType===1&&n.compareDocumentPosition(t)&16)}function Ht(n){n&&(Array.isArray(n)?n:[n]).forEach(t=>{t.parentNode&&t.parentNode.removeChild(t)})}function Zi(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function kt(n,e){(Array.isArray(e)?e:[e]).forEach(s=>{s!=null&&n.appendChild(s)})}function vy(n,e){const t=n.firstChild;return t?Gu(t,e):kt(n,e)}function Gu(n,e){const t=n.parentNode;t&&(Array.isArray(e)?e:[e]).forEach(r=>{r!=null&&t.insertBefore(r,n)})}function ys(n,e){e!=null&&e.appendChild(n)}function Cy(n){try{return n instanceof HTMLElement}catch{return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function OD(n,e){const t=[];let s=n.firstChild;for(;s;s=s.nextSibling)s.nodeType===1&&(!e||Pn(s,e))&&t.push(s);return t}const Sy=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function MD(n,e){return n.getAttribute(e)}function Wu(n,e){const t=Oy(e);t.ns?n.hasAttributeNS(t.ns,t.local)&&n.removeAttributeNS(t.ns,t.local):n.hasAttribute(e)&&n.removeAttribute(e)}function Yu(n,e,t){if(t==null)return Wu(n,e);const s=Oy(e);s.ns&&typeof t=="string"?n.setAttributeNS(s.ns,e,t):e==="id"?n.id=`${t}`:n.setAttribute(e,`${t}`)}function Ey(n,e){Object.keys(e).forEach(t=>{Yu(n,t,e[t])})}function fe(n,e,t){if(e==null){const s=n.attributes,r={};for(let i=0;i<s.length;i+=1)r[s[i].name]=s[i].value;return r}if(typeof e=="string"&&t===void 0)return n.getAttribute(e);typeof e=="object"?Ey(n,e):Yu(n,e,t)}function Oy(n){if(n.indexOf(":")!==-1){const e=n.split(":");return{ns:rt[e[0]],local:e[1]}}return{ns:null,local:n}}function Qi(n){const e={};return Object.keys(n).forEach(t=>{const s=Sy.includes(t)?t:ty(t);e[s]=n[t]}),e}function Ja(n){const e={};return n.split(";").forEach(s=>{const r=s.trim();if(r){const i=r.split("=");i.length&&(e[i[0].trim()]=i[1]?i[1].trim():"")}}),e}function qu(n,e){return Object.keys(e).forEach(t=>{if(t==="class")n[t]=n[t]?`${n[t]} ${e[t]}`:e[t];else if(t==="style"){const s=typeof n[t]=="object",r=typeof e[t]=="object";let i,o;s&&r?(i=n[t],o=e[t]):s?(i=n[t],o=Ja(e[t])):r?(i=Ja(n[t]),o=e[t]):(i=Ja(n[t]),o=Ja(e[t])),n[t]=qu(i,o)}else n[t]=e[t]}),n}function PD(n,e,t={}){const s=t.offset||0,r=[],i=[];let o,a,c=null;for(let u=0;u<n.length;u+=1){o=i[u]=n[u];for(let d=0,f=e.length;d<f;d+=1){const h=e[d],p=h.start+s,g=h.end+s;u>=p&&u<g&&(typeof o=="string"?o=i[u]={t:n[u],attrs:h.attrs}:o.attrs=qu(qu({},o.attrs),h.attrs),t.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(d)))}a=i[u-1],a?Ie(o)&&Ie(a)?(c=c,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?c.t+=o.t:(r.push(c),c=o)):Ie(o)||Ie(a)?(c=c,r.push(c),c=o):c=(c||"")+o:c=o}return c!=null&&r.push(c),r}function ND(n){return n.replace(/ /g," ")}var Ys;(function(n){function e(u){const d="data:";return u.substr(0,d.length)===d}n.isDataUrl=e;function t(u,d){if(!u||e(u)){setTimeout(()=>d(null,u));return}const f=()=>{d(new Error(`Failed to load image: ${u}`))},h=window.FileReader?g=>{if(g.status===200){const m=new FileReader;m.onload=y=>{const b=y.target.result;d(null,b)},m.onerror=f,m.readAsDataURL(g.response)}else f()}:g=>{const m=y=>{const w=[];for(let x=0;x<y.length;x+=32768)w.push(String.fromCharCode.apply(null,y.subarray(x,x+32768)));return w.join("")};if(g.status===200){let y=u.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,w=new Uint8Array(g.response),x=b+btoa(m(w));d(null,x)}else f()},p=new XMLHttpRequest;p.responseType=window.FileReader?"blob":"arraybuffer",p.open("GET",u,!0),p.addEventListener("error",f),p.addEventListener("load",()=>h(p)),p.send()}n.imageToDataUri=t;function s(u){let d=u.replace(/\s/g,"");d=decodeURIComponent(d);const f=d.indexOf(","),h=d.slice(0,f),p=h.split(":")[1].split(";")[0],g=d.slice(f+1);let m;h.indexOf("base64")>=0?m=atob(g):m=unescape(encodeURIComponent(g));const y=new Uint8Array(m.length);for(let b=0;b<m.length;b+=1)y[b]=m.charCodeAt(b);return new Blob([y],{type:p})}n.dataUriToBlob=s;function r(u,d){const f=window.navigator.msSaveBlob;if(f)f(u,d);else{const h=window.URL.createObjectURL(u),p=document.createElement("a");p.href=h,p.download=d,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(h)}}n.downloadBlob=r;function i(u,d){const f=s(u);r(f,d)}n.downloadDataUri=i;function o(u){const d=u.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return d&&d[2]?d[2].replace(/\s+/," ").split(" "):null}function a(u){const d=parseFloat(u);return Number.isNaN(d)?null:d}function c(u,d={}){let f=null;const h=x=>(f==null&&(f=o(u)),f!=null?a(f[x]):null),p=x=>{const v=u.match(x);return v&&v[2]?a(v[2]):null};let g=d.width;if(g==null&&(g=p(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),g==null&&(g=h(2)),g==null)throw new Error("Can not parse width from svg string");let m=d.height;if(m==null&&(m=p(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),m==null&&(m=h(3)),m==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(u).replace(/'/g,"%27").replace(/"/g,"%22")}`}n.svgToDataUrl=c})(Ys||(Ys={}));let qs;const AD={px(n){return n},mm(n){return qs*n},cm(n){return qs*n*10},in(n){return qs*n*25.4},pt(n){return qs*(25.4*n/72)},pc(n){return qs*(25.4*n/6)}};var My;(function(n){function e(s,r,i){const o=document.createElement("div"),a=o.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=s+(i||"px"),a.height=r+(i||"px"),document.body.appendChild(o);const c=o.getBoundingClientRect(),u={width:c.width||0,height:c.height||0};return document.body.removeChild(o),u}n.measure=e;function t(s,r){qs==null&&(qs=e("1","1","mm").width);const i=r?AD[r]:null;return i?i(s):s}n.toPx=t})(My||(My={}));const _D=/-(.)/g;function TD(n){return n.replace(_D,(e,t)=>t.toUpperCase())}const Ju={},Py=["webkit","ms","moz","o"],Ny=typeof document<"u"?document.createElement("div").style:{};function kD(n){for(let e=0;e<Py.length;e+=1){const t=Py[e]+n;if(t in Ny)return t}return null}function VD(n){const e=TD(n);if(Ju[e]==null){const t=e.charAt(0).toUpperCase()+e.slice(1);Ju[e]=e in Ny?e:kD(t)}return Ju[e]}function Ay(n,e){const t=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return t&&e?t.getPropertyValue(e)||t[e]:t}const DD={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function RD(n){return/^--/.test(n)}function LD(n,e,t){const s=window.getComputedStyle(n,null);return t?s.getPropertyValue(e)||void 0:s[e]||n.style[e]}function ID(n,e){return!DD[n]&&typeof e=="number"?`${e}px`:e}function Je(n,e,t){if(typeof e=="string"){const s=RD(e);if(s||(e=VD(e)),t===void 0)return LD(n,e,s);s||(t=ID(e,t));const r=n.style;s?r.setProperty(e,t):r[e]=t;return}for(const s in e)Je(n,s,e[s])}const Xa=new WeakMap;function _y(n,e){const t=oa(e),s=Xa.get(n);if(s)return s[t]}function BD(n,e,t){const s=oa(e),r=Xa.get(n);r?r[s]=t:Xa.set(n,{[s]:t})}function Js(n,e,t){if(!e){const s={};return Object.keys(Xa).forEach(r=>{s[r]=_y(n,r)}),s}if(typeof e=="string"){if(t===void 0)return _y(n,e);BD(n,e,t);return}for(const s in e)Js(n,s,e[s])}class oe{get[Symbol.toStringTag](){return oe.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(e){this.node.id=e}constructor(e,t,s){if(!e)throw new TypeError("Invalid element to create vector");let r;if(oe.isVector(e))r=e.node;else if(typeof e=="string")if(e.toLowerCase()==="svg")r=qa();else if(e[0]==="<"){const i=qa(e);r=document.importNode(i.firstChild,!0)}else r=document.createElementNS(rt.svg,e);else r=e;this.node=r,t&&this.setAttributes(t),s&&this.append(s)}transform(e,t){return e==null?zr(this.node):(zr(this.node,e,t),this)}translate(e,t=0,s={}){return e==null?jy(this.node):(jy(this.node,e,t,s),this)}rotate(e,t,s,r={}){return e==null?Zu(this.node):(Zu(this.node,e,t,s,r),this)}scale(e,t){return e==null?Qu(this.node):(Qu(this.node,e,t),this)}getTransformToElement(e){const t=oe.toNode(e);return so(this.node,t)}removeAttribute(e){return Wu(this.node,e),this}getAttribute(e){return MD(this.node,e)}setAttribute(e,t){return Yu(this.node,e,t),this}setAttributes(e){return Ey(this.node,e),this}attr(e,t){return e==null?fe(this.node):typeof e=="string"&&t===void 0?fe(this.node,e):(typeof e=="object"?fe(this.node,e):fe(this.node,e,t),this)}svg(){return this.node instanceof SVGSVGElement?this:oe.create(this.node.ownerSVGElement)}defs(){const e=this.svg()||this,t=e.node.getElementsByTagName("defs")[0];return t?oe.create(t):oe.create("defs").appendTo(e)}text(e,t={}){return ky(this.node,e,t),this}tagName(){return CD(this.node)}clone(){return oe.create(this.node.cloneNode(!0))}remove(){return Ht(this.node),this}empty(){return Zi(this.node),this}append(e){return kt(this.node,oe.toNodes(e)),this}appendTo(e){return ys(this.node,oe.isVector(e)?e.node:e),this}prepend(e){return vy(this.node,oe.toNodes(e)),this}before(e){return Gu(this.node,oe.toNodes(e)),this}replace(e){return this.node.parentNode&&this.node.parentNode.replaceChild(oe.toNode(e),this.node),oe.create(e)}first(){return this.node.firstChild?oe.create(this.node.firstChild):null}last(){return this.node.lastChild?oe.create(this.node.lastChild):null}get(e){const t=this.node.childNodes[e];return t?oe.create(t):null}indexOf(e){return Array.prototype.slice.call(this.node.childNodes).indexOf(oe.toNode(e))}find(e){const t=[],s=SD(this.node,e);if(s)for(let r=0,i=s.length;r<i;r+=1)t.push(oe.create(s[r]));return t}findOne(e){const t=ED(this.node,e);return t?oe.create(t):null}findParentByClass(e,t){const s=xy(this.node,e,t);return s?oe.create(s):null}matches(e){const t=this.node;this.node.matches;const s=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return s&&s.call(t,e)}contains(e){return Hu(this.node,oe.isVector(e)?e.node:e)}wrap(e){const t=oe.create(e),s=this.node.parentNode;return s!=null&&s.insertBefore(t.node,this.node),t.append(this)}parent(e){let t=this;if(t.node.parentNode==null)return null;if(t=oe.create(t.node.parentNode),e==null)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=oe.create(t.node.parentNode));return t}children(){const e=this.node.childNodes,t=[];for(let s=0;s<e.length;s+=1)e[s].nodeType===1&&t.push(oe.create(e[s]));return t}eachChild(e,t){const s=this.children();for(let r=0,i=s.length;r<i;r+=1)e.call(s[r],s[r],r,s),t&&s[r].eachChild(e,t);return this}index(){return Uu(this.node)}hasClass(e){return Pn(this.node,e)}addClass(e){return X(this.node,e),this}removeClass(e){return De(this.node,e),this}toggleClass(e,t){return hn(this.node,e,t),this}toLocalPoint(e,t){return rR(this.node,e,t)}sample(e=1){return this.node instanceof SVGPathElement?FD(this.node,e):[]}toPath(){return oe.create(JD(this.node))}toPathData(){return Iy(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function e(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],c=o;return(a==null||a===n.toStringTag)&&c.node instanceof SVGElement&&typeof c.sample=="function"&&typeof c.toPath=="function"}n.isVector=e;function t(o,a,c){return new n(o,a,c)}n.create=t;function s(o){if(o[0]==="<"){const a=qa(o),c=[];for(let u=0,d=a.childNodes.length;u<d;u+=1){const f=a.childNodes[u];c.push(t(document.importNode(f,!0)))}return c}return[t(o)]}n.createVectors=s;function r(o){return e(o)?o.node:o}n.toNode=r;function i(o){return Array.isArray(o)?o.map(a=>r(a)):[r(o)]}n.toNodes=i})(oe||(oe={}));function jD(n,e){const t=oe.create(e),s=oe.create("textPath"),r=n.d;if(r&&n["xlink:href"]===void 0){const i=oe.create("path").attr("d",r).appendTo(t.defs());s.attr("xlink:href",`#${i.id}`)}return typeof n=="object"&&s.attr(n),s.node}function $D(n,e,t){const s=t.eol,r=t.baseSize,i=t.lineHeight;let o=0,a;const c={},u=e.length-1;for(let d=0;d<=u;d+=1){let f=e[d],h=null;if(typeof f=="object"){const p=f.attrs,g=oe.create("tspan",p);a=g.node;let m=f.t;s&&d===u&&(m+=s),a.textContent=m;const y=p.class;y&&g.addClass(y),t.includeAnnotationIndices&&g.attr("annotations",f.annotations.join(",")),h=parseFloat(p["font-size"]),h===void 0&&(h=r),h&&h>o&&(o=h)}else s&&d===u&&(f+=s),a=document.createTextNode(f||" "),r&&r>o&&(o=r);n.appendChild(a)}return o&&(c.maxFontSize=o),i?c.lineHeight=i:o&&(c.lineHeight=o*1.2),c}const Ty=/em$/;function Ka(n,e){const t=parseFloat(n);return Ty.test(n)?t*e:t}function zD(n,e,t,s){if(!Array.isArray(e))return 0;const r=e.length;if(!r)return 0;let i=e[0];const o=Ka(i.maxFontSize,t)||t;let a=0;const c=Ka(s,t);for(let f=1;f<r;f+=1){i=e[f];const h=Ka(i.lineHeight,t)||c;a+=h}const u=Ka(i.maxFontSize,t)||t;let d;switch(n){case"middle":d=o/2-.15*u-a/2;break;case"bottom":d=-(.25*u)-a;break;case"top":default:d=.8*o;break}return d}function ky(n,e,t={}){e=ND(e);const s=t.eol;let r=t.textPath;const i=t.textVerticalAnchor,o=i==="middle"||i==="bottom"||i==="top";let a=t.x;a===void 0&&(a=n.getAttribute("x")||0);const c=t.includeAnnotationIndices;let u=t.annotations;u&&!Array.isArray(u)&&(u=[u]);const d=t.lineHeight,f=d==="auto",h=f?"1.5em":d||"1em";let p=!0;const g=n.childNodes;if(g.length===1){const A=g[0];A&&A.tagName.toUpperCase()==="TITLE"&&(p=!1)}p&&Zi(n),fe(n,{"xml:space":"preserve",display:e||t.displayEmpty?null:"none"});const m=fe(n,"font-size");let y=parseFloat(m);y||(y=16,(o||u)&&!m&&fe(n,"font-size",`${y}`));let b;r?(typeof r=="string"&&(r={d:r}),b=jD(r,n)):b=document.createDocumentFragment();let w,x=0,v;const S=e.split(`
|
|
35
35
|
`),E=[],C=S.length-1;for(let A=0;A<=C;A+=1){w=h;let T="v-line";const k=fn("tspan");let V,R=S[A];if(R)if(u){const j=PD(R,u,{offset:-x,includeAnnotationIndices:c});V=$D(k,j,{eol:A!==C&&s,baseSize:y,lineHeight:f?null:h,includeAnnotationIndices:c});const N=V.lineHeight;N&&f&&A!==0&&(w=N),A===0&&(v=V.maxFontSize*.8)}else s&&A!==C&&(R+=s),k.textContent=R;else{k.textContent="-",T+=" v-empty-line";const j=k.style;j.fillOpacity=0,j.strokeOpacity=0,u&&(V={})}V&&E.push(V),A>0&&k.setAttribute("dy",w),(A>0||r)&&k.setAttribute("x",a),k.className.baseVal=T,b.appendChild(k),x+=R.length+1}if(o)if(u)w=zD(i,E,y,h);else if(i==="top")w="0.8em";else{let A;switch(C>0?(A=parseFloat(h)||1,A*=C,Ty.test(h)||(A/=y)):A=0,i){case"middle":w=`${.3-A/2}em`;break;case"bottom":w=`${-A-.3}em`;break}}else i===0?w="0em":i?w=i:(w=0,n.getAttribute("y")==null&&n.setAttribute("y",`${v||"0.8em"}`));b.firstChild.setAttribute("dy",w),n.appendChild(b)}function eo(n,e={}){const t=document.createElement("canvas").getContext("2d");if(!n)return{width:0};const s=[],r=e["font-size"]?`${parseFloat(e["font-size"])}px`:"14px";return s.push(e["font-style"]||"normal"),s.push(e["font-variant"]||"normal"),s.push(e["font-weight"]||400),s.push(r),s.push(e["font-family"]||"sans-serif"),t.font=s.join(" "),t.measureText(n)}function Vy(n,e,t,s={}){if(e>=t)return[n,""];const r=n.length,i={};let o=Math.round(e/t*r-1);for(o<0&&(o=0);o>=0&&o<r;){const a=n.slice(0,o),c=i[a]||eo(a,s).width,u=n.slice(0,o+1),d=i[u]||eo(u,s).width;if(i[a]=c,i[u]=d,c>e)o-=1;else if(d<=e)o+=1;else break}return[n.slice(0,o),n.slice(o)]}function Dy(n,e,t={},s={}){const r=e.width,i=e.height,o=s.eol||`
|
|
36
36
|
`,a=t.fontSize||14,c=t.lineHeight?parseFloat(t.lineHeight):Math.ceil(a*1.4),u=Math.floor(i/c);if(n.indexOf(o)>-1){const y=Ya(),b=[];return n.split(o).map(w=>{const x=Dy(w,Object.assign(Object.assign({},e),{height:Number.MAX_SAFE_INTEGER}),t,Object.assign(Object.assign({},s),{eol:y}));x&&b.push(...x.split(y))}),b.slice(0,u).join(o)}const{width:d}=eo(n,t);if(d<r)return n;const f=[];let h=n,p=d,g=s.ellipsis,m=0;g&&(typeof g!="string"&&(g="…"),m=eo(g,t).width);for(let y=0;y<u;y+=1)if(p>r)if(y===u-1){const[w]=Vy(h,r-m,p,t);f.push(g?`${w}${g}`:w)}else{const[w,x]=Vy(h,r,p,t);f.push(w),h=x,p=eo(h,t).width}else{f.push(h);break}return f.join(o)}const Xu=.551784;function ct(n,e,t=NaN){const s=n.getAttribute(e);if(s==null)return t;const r=parseFloat(s);return Number.isNaN(r)?t:r}function FD(n,e=1){const t=n.getTotalLength(),s=[];let r=0,i;for(;r<t;)i=n.getPointAtLength(r),s.push({distance:r,x:i.x,y:i.y}),r+=e;return s}function UD(n){return["M",ct(n,"x1"),ct(n,"y1"),"L",ct(n,"x2"),ct(n,"y2")].join(" ")}function HD(n){const e=Za(n);return e.length===0?null:`${Ry(e)} Z`}function GD(n){const e=Za(n);return e.length===0?null:Ry(e)}function Ry(n){return`M ${n.map(t=>`${t.x} ${t.y}`).join(" L")}`}function Za(n){const e=[],t=n.points;if(t)for(let s=0,r=t.numberOfItems;s<r;s+=1)e.push(t.getItem(s));return e}function WD(n){const e=ct(n,"cx",0),t=ct(n,"cy",0),s=ct(n,"r"),r=s*Xu;return["M",e,t-s,"C",e+r,t-s,e+s,t-r,e+s,t,"C",e+s,t+r,e+r,t+s,e,t+s,"C",e-r,t+s,e-s,t+r,e-s,t,"C",e-s,t-r,e-r,t-s,e,t-s,"Z"].join(" ")}function YD(n){const e=ct(n,"cx",0),t=ct(n,"cy",0),s=ct(n,"rx"),r=ct(n,"ry")||s,i=s*Xu,o=r*Xu;return["M",e,t-r,"C",e+i,t-r,e+s,t-o,e+s,t,"C",e+s,t+o,e+i,t+r,e,t+r,"C",e-i,t+r,e-s,t+o,e-s,t,"C",e-s,t-o,e-i,t-r,e,t-r,"Z"].join(" ")}function qD(n){return Ly({x:ct(n,"x",0),y:ct(n,"y",0),width:ct(n,"width",0),height:ct(n,"height",0),rx:ct(n,"rx",0),ry:ct(n,"ry",0)})}function Ly(n){let e;const t=n.x,s=n.y,r=n.width,i=n.height,o=Math.min(n.rx||n["top-rx"]||0,r/2),a=Math.min(n.rx||n["bottom-rx"]||0,r/2),c=Math.min(n.ry||n["top-ry"]||0,i/2),u=Math.min(n.ry||n["bottom-ry"]||0,i/2);return o||a||c||u?e=["M",t,s+c,"v",i-c-u,"a",a,u,0,0,0,a,u,"h",r-2*a,"a",a,u,0,0,0,a,-u,"v",-(i-u-c),"a",o,c,0,0,0,-o,-c,"h",-(r-2*o),"a",o,c,0,0,0,-o,c,"Z"]:e=["M",t,s,"H",t+r,"V",s+i,"H",t,"V",s,"Z"],e.join(" ")}function JD(n){const e=fn("path");fe(e,fe(n));const t=Iy(n);return t&&e.setAttribute("d",t),e}function Iy(n){const e=n.tagName.toLowerCase();switch(e){case"path":return n.getAttribute("d");case"line":return UD(n);case"polygon":return HD(n);case"polyline":return GD(n);case"ellipse":return YD(n);case"circle":return WD(n);case"rect":return qD(n)}throw new Error(`"${e}" cannot be converted to svg path element.`)}const XD=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,By=/[ ,]+/,KD=/^(\w+)\((.*)\)/;function ZD(n,e){const s=fn("svg").createSVGPoint();return s.x=n,s.y=e,s}function it(n){const t=fn("svg").createSVGMatrix();if(n!=null){const s=n,r=t;for(const i in s)r[i]=s[i]}return t}function to(n){const e=fn("svg");return n!=null?(n instanceof DOMMatrix||(n=it(n)),e.createSVGTransformFromMatrix(n)):e.createSVGTransform()}function no(n){let e=it();const t=n!=null&&n.match(XD);if(!t)return e;for(let s=0,r=t.length;s<r;s+=1){const o=t[s].match(KD);if(o){let a,c,u,d,f,h=it();const p=o[2].split(By);switch(o[1].toLowerCase()){case"scale":a=parseFloat(p[0]),c=p[1]===void 0?a:parseFloat(p[1]),h=h.scaleNonUniform(a,c);break;case"translate":u=parseFloat(p[0]),d=parseFloat(p[1]),h=h.translate(u,d);break;case"rotate":f=parseFloat(p[0]),u=parseFloat(p[1])||0,d=parseFloat(p[2])||0,u!==0||d!==0?h=h.translate(u,d).rotate(f).translate(-u,-d):h=h.rotate(f);break;case"skewx":f=parseFloat(p[0]),h=h.skewX(f);break;case"skewy":f=parseFloat(p[0]),h=h.skewY(f);break;case"matrix":h.a=parseFloat(p[0]),h.b=parseFloat(p[1]),h.c=parseFloat(p[2]),h.d=parseFloat(p[3]),h.e=parseFloat(p[4]),h.f=parseFloat(p[5]);break;default:continue}e=e.multiply(h)}}return e}function $r(n){const e=n||{},t=e.a!=null?e.a:1,s=e.b!=null?e.b:0,r=e.c!=null?e.c:0,i=e.d!=null?e.d:1,o=e.e!=null?e.e:0,a=e.f!=null?e.f:0;return`matrix(${t},${s},${r},${i},${o},${a})`}function Qa(n){let e,t,s;if(n){const i=By;if(n.trim().indexOf("matrix")>=0){const o=no(n),a=QD(o);e=[a.translateX,a.translateY],t=[a.rotation],s=[a.scaleX,a.scaleY];const c=[];(e[0]!==0||e[1]!==0)&&c.push(`translate(${e.join(",")})`),(s[0]!==1||s[1]!==1)&&c.push(`scale(${s.join(",")})`),t[0]!==0&&c.push(`rotate(${t[0]})`),n=c.join(" ")}else{const o=n.match(/translate\((.*?)\)/);o&&(e=o[1].split(i));const a=n.match(/rotate\((.*?)\)/);a&&(t=a[1].split(i));const c=n.match(/scale\((.*?)\)/);c&&(s=c[1].split(i))}}const r=s&&s[0]?parseFloat(s[0]):1;return{raw:n||"",translation:{tx:e&&e[0]?parseInt(e[0],10):0,ty:e&&e[1]?parseInt(e[1],10):0},rotation:{angle:t&&t[0]?parseInt(t[0],10):0,cx:t&&t[1]?parseInt(t[1],10):void 0,cy:t&&t[2]?parseInt(t[2],10):void 0},scale:{sx:r,sy:s&&s[1]?parseFloat(s[1]):r}}}function Ku(n,e){const t=e.x*n.a+e.y*n.c+0,s=e.x*n.b+e.y*n.d+0;return{x:t,y:s}}function QD(n){const e=Ku(n,{x:0,y:1}),t=Ku(n,{x:1,y:0}),s=180/Math.PI*Math.atan2(e.y,e.x)-90,r=180/Math.PI*Math.atan2(t.y,t.x);return{skewX:s,skewY:r,translateX:n.e,translateY:n.f,scaleX:Math.sqrt(n.a*n.a+n.b*n.b),scaleY:Math.sqrt(n.c*n.c+n.d*n.d),rotation:s}}function eR(n){let e,t,s,r;return n?(e=n.a==null?1:n.a,r=n.d==null?1:n.d,t=n.b,s=n.c):e=r=1,{sx:t?Math.sqrt(e*e+t*t):e,sy:s?Math.sqrt(s*s+r*r):r}}function tR(n){let e={x:0,y:1};n&&(e=Ku(n,e));const t=180*Math.atan2(e.y,e.x)/Math.PI%360-90;return{angle:t%360+(t<0?360:0)}}function nR(n){return{tx:n&&n.e||0,ty:n&&n.f||0}}function zr(n,e,t={}){if(e==null)return no(fe(n,"transform"));if(t.absolute){n.setAttribute("transform",$r(e));return}const s=n.transform,r=to(e);s.baseVal.appendItem(r)}function jy(n,e,t=0,s={}){let r=fe(n,"transform");const i=Qa(r);if(e==null)return i.translation;r=i.raw,r=r.replace(/translate\([^)]*\)/g,"").trim();const o=s.absolute?e:i.translation.tx+e,a=s.absolute?t:i.translation.ty+t,c=`translate(${o},${a})`;n.setAttribute("transform",`${c} ${r}`.trim())}function Zu(n,e,t,s,r={}){let i=fe(n,"transform");const o=Qa(i);if(e==null)return o.rotation;i=o.raw,i=i.replace(/rotate\([^)]*\)/g,"").trim(),e%=360;const a=r.absolute?e:o.rotation.angle+e,c=t!=null&&s!=null?`,${t},${s}`:"",u=`rotate(${a}${c})`;n.setAttribute("transform",`${i} ${u}`.trim())}function Qu(n,e,t){let s=fe(n,"transform");const r=Qa(s);if(e==null)return r.scale;t=t??e,s=r.raw,s=s.replace(/scale\([^)]*\)/g,"").trim();const i=`scale(${e},${t})`;n.setAttribute("transform",`${s} ${i}`.trim())}function so(n,e){if(ms(e)&&ms(n)){const t=e.getScreenCTM(),s=n.getScreenCTM();if(t&&s)return t.inverse().multiply(s)}return it()}function sR(n,e){let t=it();if(ms(e)&&ms(n)){let s=n;const r=[];for(;s&&s!==e;){const i=s.getAttribute("transform")||null,o=no(i);r.push(o),s=s.parentNode}r.reverse().forEach(i=>{t=t.multiply(i)})}return t}function rR(n,e,t){const s=n instanceof SVGSVGElement?n:n.ownerSVGElement,r=s.createSVGPoint();r.x=e,r.y=t;try{const i=s.getScreenCTM(),o=r.matrixTransform(i.inverse()),a=so(n,s).inverse();return o.matrixTransform(a)}catch{return r}}var Gt;(function(n){const e={};function t(i){return e[i]||{}}n.get=t;function s(i,o){e[i]=o}n.register=s;function r(i){delete e[i]}n.unregister=r})(Gt||(Gt={}));var Xs;(function(n){const e=new WeakMap;function t(i){return e.has(i)||e.set(i,{events:Object.create(null)}),e.get(i)}n.ensure=t;function s(i){return e.get(i)}n.get=s;function r(i){return e.delete(i)}n.remove=r})(Xs||(Xs={}));var ce;(function(n){n.returnTrue=()=>!0,n.returnFalse=()=>!1;function e(r){r.stopPropagation()}n.stopPropagationCallback=e;function t(r,i,o){r.addEventListener!=null&&r.addEventListener(i,o)}n.addEventListener=t;function s(r,i,o){r.removeEventListener!=null&&r.removeEventListener(i,o)}n.removeEventListener=s})(ce||(ce={})),function(n){const e=/[^\x20\t\r\n\f]+/g,t=/^([^.]*)(?:\.(.+)|)/;function s(a){return(a||"").match(e)||[""]}n.splitType=s;function r(a){const c=t.exec(a)||[];return{originType:c[1]?c[1].trim():c[1],namespaces:c[2]?c[2].split(".").map(u=>u.trim()).sort():[]}}n.normalizeType=r;function i(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType}n.isValidTarget=i;function o(a,c){if(c){const u=a;return u.querySelector!=null&&u.querySelector(c)!=null}return!0}n.isValidSelector=o}(ce||(ce={})),function(n){let e=0;const t=new WeakMap;function s(a){return t.has(a)||(t.set(a,e),e+=1),t.get(a)}n.ensureHandlerId=s;function r(a){return t.get(a)}n.getHandlerId=r;function i(a){return t.delete(a)}n.removeHandlerId=i;function o(a,c){return t.set(a,c)}n.setHandlerId=o}(ce||(ce={})),function(n){function e(t,s){const r=[],i=Xs.get(t),o=i&&i.events&&i.events[s.type],a=o&&o.handlers||[],c=o?o.delegateCount:0;if(c>0&&!(s.type==="click"&&typeof s.button=="number"&&s.button>=1)){for(let u=s.target;u!==t;u=u.parentNode||t)if(u.nodeType===1&&!(s.type==="click"&&u.disabled===!0)){const d=[],f={};for(let h=0;h<c;h+=1){const p=a[h],g=p.selector;if(g!=null&&f[g]==null){const m=t,y=[];m.querySelectorAll(g).forEach(b=>{y.push(b)}),f[g]=y.includes(u)}f[g]&&d.push(p)}d.length&&r.push({elem:u,handlers:d})}}return c<a.length&&r.push({elem:t,handlers:a.slice(c)}),r}n.getHandlerQueue=e}(ce||(ce={})),function(n){function e(t){return t!=null&&t===t.window}n.isWindow=e}(ce||(ce={})),function(n){function e(t,s){const r=t.nodeType===9?t.documentElement:t,i=s&&s.parentNode;return t===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):t.compareDocumentPosition&&t.compareDocumentPosition(i)&16))}n.contains=e}(ce||(ce={}));class Nn{constructor(e,t){this.isDefaultPrevented=ce.returnFalse,this.isPropagationStopped=ce.returnFalse,this.isImmediatePropagationStopped=ce.returnFalse,this.isSimulated=!1,this.preventDefault=()=>{const s=this.originalEvent;this.isDefaultPrevented=ce.returnTrue,s&&!this.isSimulated&&s.preventDefault()},this.stopPropagation=()=>{const s=this.originalEvent;this.isPropagationStopped=ce.returnTrue,s&&!this.isSimulated&&s.stopPropagation()},this.stopImmediatePropagation=()=>{const s=this.originalEvent;this.isImmediatePropagationStopped=ce.returnTrue,s&&!this.isSimulated&&s.stopImmediatePropagation(),this.stopPropagation()},typeof e=="string"?this.type=e:e.type&&(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?ce.returnTrue:ce.returnFalse,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget,this.timeStamp=e.timeStamp),t&&Object.assign(this,t),this.timeStamp||(this.timeStamp=Date.now())}}(function(n){function e(t){return t instanceof n?t:new n(t)}n.create=e})(Nn||(Nn={})),function(n){function e(t,s){Object.defineProperty(n.prototype,t,{enumerable:!0,configurable:!0,get:typeof s=="function"?function(){if(this.originalEvent)return s(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set(r){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:r})}})}n.addProperty=e}(Nn||(Nn={})),function(n){const e={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(e).forEach(t=>n.addProperty(t,e[t]))}(Nn||(Nn={})),function(n){Gt.register("load",{noBubble:!0})}(),function(n){Gt.register("beforeunload",{postDispatch(e,t){t.result!==void 0&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}})}(),function(n){Gt.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(e,t){let s;const r=t.relatedTarget,i=t.handleObj;return(!r||r!==e&&!ce.contains(e,r))&&(t.type=i.originType,s=i.handler.call(e,t),t.type="mouseover"),s}}),Gt.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(e,t){let s;const r=t.relatedTarget,i=t.handleObj;return(!r||r!==e&&!ce.contains(e,r))&&(t.type=i.originType,s=i.handler.call(e,t),t.type="mouseout"),s}})}();var iR=function(n,e){var t={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(t[s[r]]=n[s[r]]);return t},ro;(function(n){let e;function t(o,a,c,u,d){if(!ce.isValidTarget(o))return;let f;if(typeof c!="function"){const{handler:m,selector:y}=c,b=iR(c,["handler","selector"]);c=m,d=y,f=b}const h=Xs.ensure(o);let p=h.handler;p==null&&(p=h.handler=function(m,...y){return e!==m.type?r(o,m,...y):void 0});const g=ce.ensureHandlerId(c);ce.splitType(a).forEach(m=>{const{originType:y,namespaces:b}=ce.normalizeType(m);if(!y)return;let w=y,x=Gt.get(w);w=(d?x.delegateType:x.bindType)||w,x=Gt.get(w);const v=Object.assign({type:w,originType:y,data:u,selector:d,guid:g,handler:c,namespace:b.join(".")},f),S=h.events;let E=S[w];E||(E=S[w]={handlers:[],delegateCount:0},(!x.setup||x.setup(o,u,b,p)===!1)&&ce.addEventListener(o,w,p)),x.add&&(ce.removeHandlerId(v.handler),x.add(o,v),ce.setHandlerId(v.handler,g)),d?(E.handlers.splice(E.delegateCount,0,v),E.delegateCount+=1):E.handlers.push(v)})}n.on=t;function s(o,a,c,u,d){const f=Xs.get(o);if(!f)return;const h=f.events;h&&(ce.splitType(a).forEach(p=>{const{originType:g,namespaces:m}=ce.normalizeType(p);if(!g){Object.keys(h).forEach(S=>{s(o,S+p,c,u,!0)});return}let y=g;const b=Gt.get(y);y=(u?b.delegateType:b.bindType)||y;const w=h[y];if(!w)return;const x=m.length>0?new RegExp(`(^|\\.)${m.join("\\.(?:.*\\.|)")}(\\.|$)`):null,v=w.handlers.length;for(let S=w.handlers.length-1;S>=0;S-=1){const E=w.handlers[S];(d||g===E.originType)&&(!c||ce.getHandlerId(c)===E.guid)&&(x==null||E.namespace&&x.test(E.namespace))&&(u==null||u===E.selector||u==="**"&&E.selector)&&(w.handlers.splice(S,1),E.selector&&(w.delegateCount-=1),b.remove&&b.remove(o,E))}v&&w.handlers.length===0&&((!b.teardown||b.teardown(o,m,f.handler)===!1)&&ce.removeEventListener(o,y,f.handler),delete h[y])}),Object.keys(h).length===0&&Xs.remove(o))}n.off=s;function r(o,a,...c){const u=Nn.create(a);u.delegateTarget=o;const d=Gt.get(u.type);if(d.preDispatch&&d.preDispatch(o,u)===!1)return;const f=ce.getHandlerQueue(o,u);for(let h=0,p=f.length;h<p&&!u.isPropagationStopped();h+=1){const g=f[h];u.currentTarget=g.elem;for(let m=0,y=g.handlers.length;m<y&&!u.isImmediatePropagationStopped();m+=1){const b=g.handlers[m];if(u.rnamespace==null||b.namespace&&u.rnamespace.test(b.namespace)){u.handleObj=b,u.data=b.data;const w=Gt.get(b.originType).handle,x=w?w(g.elem,u,...c):b.handler.call(g.elem,u,...c);x!==void 0&&(u.result=x,x===!1&&(u.preventDefault(),u.stopPropagation()))}}}return d.postDispatch&&d.postDispatch(o,u),u.result}n.dispatch=r;function i(o,a,c,u){let d=o,f=typeof o=="string"?o:o.type,h=typeof o=="string"||d.namespace==null?[]:d.namespace.split(".");const p=c;if(p.nodeType===3||p.nodeType===8)return;f.indexOf(".")>-1&&(h=f.split("."),f=h.shift(),h.sort());const g=f.indexOf(":")<0&&`on${f}`;d=o instanceof Nn?o:new Nn(f,typeof o=="object"?o:null),d.namespace=h.join("."),d.rnamespace=d.namespace?new RegExp(`(^|\\.)${h.join("\\.(?:.*\\.|)")}(\\.|$)`):null,d.result=void 0,d.target||(d.target=p);const m=[d];Array.isArray(a)?m.push(...a):m.push(a);const y=Gt.get(f);if(!u&&y.trigger&&y.trigger(p,d,a)===!1)return;let b;const w=[p];if(!u&&!y.noBubble&&!ce.isWindow(p)){b=y.delegateType||f;let v=p,S=p.parentNode;for(;S!=null;)w.push(S),v=S,S=S.parentNode;const E=p.ownerDocument||document;if(v===E){const C=v.defaultView||v.parentWindow||window;w.push(C)}}let x=p;for(let v=0,S=w.length;v<S&&!d.isPropagationStopped();v+=1){const E=w[v];x=E,d.type=v>1?b:y.bindType||f;const C=Xs.get(E);C&&C.events[d.type]&&C.handler&&C.handler.call(E,...m);const P=g&&E[g]||null;P&&ce.isValidTarget(E)&&(d.result=P.call(E,...m),d.result===!1&&d.preventDefault())}if(d.type=f,!u&&!d.isDefaultPrevented()){const v=y.preventDefault;if((v==null||v(w.pop(),d,a)===!1)&&ce.isValidTarget(p)&&g&&typeof p[f]=="function"&&!ce.isWindow(p)){const S=p[g];S&&(p[g]=null),e=f,d.isPropagationStopped()&&x.addEventListener(f,ce.stopPropagationCallback),p[f](),d.isPropagationStopped()&&x.removeEventListener(f,ce.stopPropagationCallback),e=void 0,S&&(p[g]=S)}}return d.result}n.trigger=i})(ro||(ro={}));var ut;(function(n){function e(i,o,a,c,u){return io.on(i,o,a,c,u),i}n.on=e;function t(i,o,a,c,u){return io.on(i,o,a,c,u,!0),i}n.once=t;function s(i,o,a,c){return io.off(i,o,a,c),i}n.off=s;function r(i,o,a,c){return ro.trigger(o,a,i,c),i}n.trigger=r})(ut||(ut={}));var io;(function(n){function e(s,r,i,o,a,c){if(typeof r=="object"){typeof i!="string"&&(o=o||i,i=void 0),Object.keys(r).forEach(u=>e(s,u,i,o,r[u],c));return}if(o==null&&a==null?(a=i,o=i=void 0):a==null&&(typeof i=="string"?(a=o,o=void 0):(a=o,o=i,i=void 0)),a===!1)a=ce.returnFalse;else if(!a)return;if(c){const u=a;a=function(d,...f){return n.off(s,d),u.call(this,d,...f)},ce.setHandlerId(a,ce.ensureHandlerId(u))}ro.on(s,r,a,o,i)}n.on=e;function t(s,r,i,o){const a=r;if(a&&a.preventDefault!=null&&a.handleObj!=null){const c=a.handleObj;t(a.delegateTarget,c.namespace?`${c.originType}.${c.namespace}`:c.originType,c.selector,c.handler);return}if(typeof r=="object"){const c=r;Object.keys(c).forEach(u=>t(s,u,i,c[u]));return}(i===!1||typeof i=="function")&&(o=i,i=void 0),o===!1&&(o=ce.returnFalse),ro.off(s,r,o,i)}n.off=t})(io||(io={}));class $y{constructor(e,t,s){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=gs.isEventSupported("wheel")?"wheel":"mousewheel",this.target=e,this.onWheelCallback=t,this.onWheelGuard=s,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(e){if(this.onWheelGuard!=null&&!this.onWheelGuard(e))return;this.deltaX+=e.deltaX,this.deltaY+=e.deltaY,e.preventDefault();let t;(this.deltaX!==0||this.deltaY!==0)&&(e.stopPropagation(),t=!0),t===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(e)}))}didWheel(e){this.animationFrameId=0,this.onWheelCallback(e,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function ed(n){const e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView;return{top:e.top+t.pageYOffset,left:e.left+t.pageXOffset}}function oR(n){return n.getBoundingClientRect().width}function aR(n){return n.getBoundingClientRect().height}function zy(n,e=60){let t=null;return(...s)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{n.apply(this,s)},e)}}function lR(n){let e=null,t=[];const s=()=>{if(getComputedStyle(n).position==="static"){const u=n.style;u.position="relative"}const c=document.createElement("object");return c.onload=()=>{c.contentDocument.defaultView.addEventListener("resize",r),r()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("tabindex","-1"),c.type="text/html",n.appendChild(c),c.data="about:blank",c},r=zy(()=>{t.forEach(c=>c(n))}),i=c=>{e||(e=s()),t.indexOf(c)===-1&&t.push(c)},o=()=>{e&&e.parentNode&&(e.contentDocument&&e.contentDocument.defaultView.removeEventListener("resize",r),e.parentNode.removeChild(e),e=null,t=[])};return{element:n,bind:i,destroy:o,unbind:c=>{const u=t.indexOf(c);u!==-1&&t.splice(u,1),t.length===0&&e&&o()}}}function cR(n){let e=null,t=[];const s=zy(()=>{t.forEach(c=>{c(n)})}),r=()=>{const c=new ResizeObserver(s);return c.observe(n),s(),c},i=c=>{e||(e=r()),t.indexOf(c)===-1&&t.push(c)},o=()=>{e&&(e.disconnect(),t=[],e=null)};return{element:n,bind:i,destroy:o,unbind:c=>{const u=t.indexOf(c);u!==-1&&t.splice(u,1),t.length===0&&e&&o()}}}const uR=typeof ResizeObserver<"u"?cR:lR;var el;(function(n){const e=new WeakMap;function t(r){let i=e.get(r);return i||(i=uR(r),e.set(r,i),i)}function s(r){r.destroy(),e.delete(r.element)}n.bind=(r,i)=>{const o=t(r);return o.bind(i),()=>o.unbind(i)},n.clear=r=>{const i=t(r);s(i)}})(el||(el={}));class oo{constructor(e={}){this.comparator=e.comparator||oo.defaultComparator,this.index={},this.data=e.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(e,t,s){const r={priority:e,value:t},i=this.data.length;return s&&(r.id=s,this.index[s]=i),this.data.push(r),this.bubbleUp(i),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(e,t){const s=this.index[e];if(typeof s>"u")throw new Error(`Node with id '${e}' was not found in the heap.`);const r=this.data,i=r[s].priority,o=this.comparator(t,i);o<0?(r[s].priority=t,this.bubbleUp(s)):o>0&&(r[s].priority=t,this.bubbleDown(s))}remove(){const e=this.data,t=e[0],s=e.pop();return t.id&&delete this.index[t.id],e.length>0&&(e[0]=s,s.id&&(this.index[s.id]=0),this.bubbleDown(0)),t?t.value:null}heapify(){for(let e=0;e<this.data.length;e+=1)this.bubbleUp(e)}bubbleUp(e){const t=this.data;let s,r,i=e;for(;i>0&&(r=i-1>>>1,this.comparator(t[i].priority,t[r].priority)<0);){s=t[r],t[r]=t[i];let o=t[i].id;o!=null&&(this.index[o]=r),t[i]=s,o=t[i].id,o!=null&&(this.index[o]=i),i=r}}bubbleDown(e){const t=this.data,s=t.length-1;let r=e;for(;;){const i=(r<<1)+1,o=i+1;let a=r;if(i<=s&&this.comparator(t[i].priority,t[a].priority)<0&&(a=i),o<=s&&this.comparator(t[o].priority,t[a].priority)<0&&(a=o),a!==r){const c=t[a];t[a]=t[r];let u=t[r].id;u!=null&&(this.index[u]=a),t[r]=c,u=t[r].id,u!=null&&(this.index[u]=r),r=a}else break}}}(function(n){n.defaultComparator=(e,t)=>e-t})(oo||(oo={}));var td;(function(n){function e(t,s,r=(i,o)=>1){const i={},o={},a={},c=new oo;for(i[s]=0,Object.keys(t).forEach(u=>{u!==s&&(i[u]=1/0),c.insert(i[u],u,u)});!c.isEmpty();){const u=c.remove();a[u]=!0;const d=t[u]||[];for(let f=0;f<d.length;f+=1){const h=d[f];if(!a[h]){const p=i[u]+r(u,h);p<i[h]&&(i[h]=p,o[h]=u,c.updatePriority(h,p))}}}return o}n.run=e})(td||(td={}));class Jn{constructor(e,t,s,r){if(e==null)return this.set(255,255,255,1);if(typeof e=="number")return this.set(e,t,s,r);if(typeof e=="string")return Jn.fromString(e)||this;if(Array.isArray(e))return this.set(e);this.set(e.r,e.g,e.b,e.a==null?1:e.a)}blend(e,t,s){this.set(e.r+(t.r-e.r)*s,e.g+(t.g-e.g)*s,e.b+(t.b-e.b)*s,e.a+(t.a-e.a)*s)}lighten(e){const t=Jn.lighten(this.toArray(),e);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}darken(e){this.lighten(-e)}set(e,t,s,r){const i=Array.isArray(e)?e[0]:e,o=Array.isArray(e)?e[1]:t,a=Array.isArray(e)?e[2]:s,c=Array.isArray(e)?e[3]:r;return this.r=Math.round(xt(i,0,255)),this.g=Math.round(xt(o,0,255)),this.b=Math.round(xt(a,0,255)),this.a=c==null?1:xt(c,0,1),this}toHex(){return`#${["r","g","b"].map(t=>{const s=this[t].toString(16);return s.length<2?`0${s}`:s}).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return Jn.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(e){const t=`${this.r},${this.g},${this.b},`;return e?`rgb(${t})`:`rgba(${t},${this.a})`}toGrey(){return Jn.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}(function(n){function e(x){return new n(x)}n.fromArray=e;function t(x){return new n([...g(x),1])}n.fromHex=t;function s(x){const v=x.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(v){const S=v[1].split(/\s*,\s*/).map(E=>parseInt(E,10));return new n(S)}return null}n.fromRGBA=s;function r(x,v,S){S<0&&++S,S>1&&--S;const E=6*S;return E<1?x+(v-x)*E:2*S<1?v:3*S<2?x+(v-x)*(2/3-S)*6:x}function i(x){const v=x.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(v){const S=v[2].split(/\s*,\s*/),E=(parseFloat(S[0])%360+360)%360/360,C=parseFloat(S[1])/100,P=parseFloat(S[2])/100,A=S[3]==null?1:parseInt(S[3],10);return new n(u(E,C,P,A))}return null}n.fromHSLA=i;function o(x){if(x.startsWith("#"))return t(x);if(x.startsWith("rgb"))return s(x);const v=n.named[x];return v?t(v):i(x)}n.fromString=o;function a(x,v){return n.fromArray([x,x,x,v])}n.makeGrey=a;function c(x,v,S,E){const C=Array.isArray(x)?x[0]:x,P=Array.isArray(x)?x[1]:v,A=Array.isArray(x)?x[2]:S,T=Array.isArray(x)?x[3]:E,k=Math.max(C,P,A),V=Math.min(C,P,A),R=(k+V)/2;let j=0,N=0;if(V!==k){const M=k-V;switch(N=R>.5?M/(2-k-V):M/(k+V),k){case C:j=(P-A)/M+(P<A?6:0);break;case P:j=(A-C)/M+2;break;case A:j=(C-P)/M+4;break}j/=6}return[j,N,R,T??1]}n.rgba2hsla=c;function u(x,v,S,E){const C=Array.isArray(x)?x[0]:x,P=Array.isArray(x)?x[1]:v,A=Array.isArray(x)?x[2]:S,T=Array.isArray(x)?x[3]:E,k=A<=.5?A*(P+1):A+P-A*P,V=2*A-k;return[r(V,k,C+1/3)*256,r(V,k,C)*256,r(V,k,C-1/3)*256,T??1]}n.hsla2rgba=u;function d(x){return new n(Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),x?void 0:parseFloat(Math.random().toFixed(2)))}n.random=d;function f(){const x="0123456789ABCDEF";let v="#";for(let S=0;S<6;S+=1)v+=x[Math.floor(Math.random()*16)];return v}n.randomHex=f;function h(x){return d(x).toString()}n.randomRGBA=h;function p(x,v){if(typeof x=="string"){const A=x[0]==="#",[T,k,V]=g(x);return v?T*.299+k*.587+V*.114>186?"#000000":"#ffffff":`${A?"#":""}${m(255-T,255-k,255-V)}`}const S=x[0],E=x[1],C=x[2],P=x[3];return v?S*.299+E*.587+C*.114>186?[0,0,0,P]:[255,255,255,P]:[255-S,255-E,255-C,P]}n.invert=p;function g(x){const v=x.indexOf("#")===0?x:`#${x}`;let S=+`0x${v.substr(1)}`;if(!(v.length===4||v.length===7)||Number.isNaN(S))throw new Error("Invalid hex color.");const E=v.length===4?4:8,C=(1<<E)-1,P=["b","g","r"].map(()=>{const A=S&C;return S>>=E,E===4?17*A:A});return[P[2],P[1],P[0]]}function m(x,v,S){const E=C=>C.length<2?`0${C}`:C;return`${E(x.toString(16))}${E(v.toString(16))}${E(S.toString(16))}`}function y(x,v){return w(x,v)}n.lighten=y;function b(x,v){return w(x,-v)}n.darken=b;function w(x,v){if(typeof x=="string"){const C=x[0]==="#",P=parseInt(C?x.substr(1):x,16),A=xt((P>>16)+v,0,255),T=xt((P>>8&255)+v,0,255),k=xt((P&255)+v,0,255);return`${C?"#":""}${(k|T<<8|A<<16).toString(16)}`}const S=m(x[0],x[1],x[2]),E=g(w(S,v));return[E[0],E[1],E[2],x[3]]}})(Jn||(Jn={})),function(n){n.named={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",burntsienna:"#ea7e5d",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(Jn||(Jn={}));class nd{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(e){return this.map.has(e)}get(e){return this.map.get(e)}set(e,t){this.map.set(e,t),this.arr.push(e)}delete(e){const t=this.arr.indexOf(e);t>=0&&this.arr.splice(t,1);const s=this.map.get(e);return this.map.delete(e),s}each(e){this.arr.forEach(t=>{const s=this.map.get(t);e(s,t)})}dispose(){this.clear()}}var bs;(function(n){function e(r){const i=[],o=[];return Array.isArray(r)?i.push(...r):r.split("|").forEach(a=>{a.indexOf("&")===-1?i.push(a):o.push(...a.split("&"))}),{or:i,and:o}}n.parse=e;function t(r,i){if(r!=null&&i!=null){const o=e(r),a=e(i),c=o.or.sort(),u=a.or.sort(),d=o.and.sort(),f=a.and.sort(),h=(p,g)=>p.length===g.length&&(p.length===0||p.every((m,y)=>m===g[y]));return h(c,u)&&h(d,f)}return r==null&&i==null}n.equals=t;function s(r,i,o){if(i==null||Array.isArray(i)&&i.length===0)return o?r.altKey!==!0&&r.ctrlKey!==!0&&r.metaKey!==!0&&r.shiftKey!==!0:!0;const{or:a,and:c}=e(i),u=d=>{const f=`${d.toLowerCase()}Key`;return r[f]===!0};return a.some(d=>u(d))&&c.every(d=>u(d))}n.isMatch=s})(bs||(bs={}));var Ks;(function(n){n.linear=e=>e,n.quad=e=>e*e,n.cubic=e=>e*e*e,n.inout=e=>{if(e<=0)return 0;if(e>=1)return 1;const t=e*e,s=t*e;return 4*(e<.5?s:3*(e-t)+s-.75)},n.exponential=e=>Math.pow(2,10*(e-1)),n.bounce=e=>{for(let t=0,s=1;;t+=s,s/=2)if(e>=(7-4*t)/11){const r=(11-6*t-11*e)/4;return-r*r+s*s}}})(Ks||(Ks={})),function(n){n.decorators={reverse(e){return t=>1-e(1-t)},reflect(e){return t=>.5*(t<.5?e(2*t):2-e(2-2*t))},clamp(e,t=0,s=1){return r=>{const i=e(r);return i<t?t:i>s?s:i}},back(e=1.70158){return t=>t*t*((e+1)*t-e)},elastic(e=1.5){return t=>Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e/3*t)}}}(Ks||(Ks={})),function(n){function e(N){return-1*Math.cos(N*(Math.PI/2))+1}n.easeInSine=e;function t(N){return Math.sin(N*(Math.PI/2))}n.easeOutSine=t;function s(N){return-.5*(Math.cos(Math.PI*N)-1)}n.easeInOutSine=s;function r(N){return N*N}n.easeInQuad=r;function i(N){return N*(2-N)}n.easeOutQuad=i;function o(N){return N<.5?2*N*N:-1+(4-2*N)*N}n.easeInOutQuad=o;function a(N){return N*N*N}n.easeInCubic=a;function c(N){const M=N-1;return M*M*M+1}n.easeOutCubic=c;function u(N){return N<.5?4*N*N*N:(N-1)*(2*N-2)*(2*N-2)+1}n.easeInOutCubic=u;function d(N){return N*N*N*N}n.easeInQuart=d;function f(N){const M=N-1;return 1-M*M*M*M}n.easeOutQuart=f;function h(N){const M=N-1;return N<.5?8*N*N*N*N:1-8*M*M*M*M}n.easeInOutQuart=h;function p(N){return N*N*N*N*N}n.easeInQuint=p;function g(N){const M=N-1;return 1+M*M*M*M*M}n.easeOutQuint=g;function m(N){const M=N-1;return N<.5?16*N*N*N*N*N:1+16*M*M*M*M*M}n.easeInOutQuint=m;function y(N){return N===0?0:Math.pow(2,10*(N-1))}n.easeInExpo=y;function b(N){return N===1?1:-Math.pow(2,-10*N)+1}n.easeOutExpo=b;function w(N){if(N===0||N===1)return N;const M=N*2,D=M-1;return M<1?.5*Math.pow(2,10*D):.5*(-Math.pow(2,-10*D)+2)}n.easeInOutExpo=w;function x(N){const M=N/1;return-1*(Math.sqrt(1-M*N)-1)}n.easeInCirc=x;function v(N){const M=N-1;return Math.sqrt(1-M*M)}n.easeOutCirc=v;function S(N){const M=N*2,D=M-2;return M<1?-.5*(Math.sqrt(1-M*M)-1):.5*(Math.sqrt(1-D*D)+1)}n.easeInOutCirc=S;function E(N,M=1.70158){return N*N*((M+1)*N-M)}n.easeInBack=E;function C(N,M=1.70158){const D=N/1-1;return D*D*((M+1)*D+M)+1}n.easeOutBack=C;function P(N,M=1.70158){const D=N*2,B=D-2,G=M*1.525;return D<1?.5*D*D*((G+1)*D-G):.5*(B*B*((G+1)*B+G)+2)}n.easeInOutBack=P;function A(N,M=.7){if(N===0||N===1)return N;const B=N/1-1,G=1-M,se=G/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*B)*Math.sin((B-se)*(2*Math.PI)/G))}n.easeInElastic=A;function T(N,M=.7){const D=1-M,B=N*2;if(N===0||N===1)return N;const G=D/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*B)*Math.sin((B-G)*(2*Math.PI)/D)+1}n.easeOutElastic=T;function k(N,M=.65){const D=1-M;if(N===0||N===1)return N;const B=N*2,G=B-1,se=D/(2*Math.PI)*Math.asin(1);return B<1?-.5*(Math.pow(2,10*G)*Math.sin((G-se)*(2*Math.PI)/D)):Math.pow(2,-10*G)*Math.sin((G-se)*(2*Math.PI)/D)*.5+1}n.easeInOutElastic=k;function V(N){const M=N/1;if(M<1/2.75)return 7.5625*M*M;if(M<2/2.75){const D=M-.5454545454545454;return 7.5625*D*D+.75}if(M<2.5/2.75){const D=M-.8181818181818182;return 7.5625*D*D+.9375}{const D=M-.9545454545454546;return 7.5625*D*D+.984375}}n.easeOutBounce=V;function R(N){return 1-V(1-N)}n.easeInBounce=R;function j(N){return N<.5?R(N*2)*.5:V(N*2-1)*.5+.5}n.easeInOutBounce=j}(Ks||(Ks={}));var Zs;(function(n){n.number=(e,t)=>{const s=t-e;return r=>e+s*r},n.object=(e,t)=>{const s=Object.keys(e);return r=>{const i={};for(let o=s.length-1;o!==-1;o-=1){const a=s[o];i[a]=e[a]+(t[a]-e[a])*r}return i}},n.unit=(e,t)=>{const s=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=s.exec(e),i=s.exec(t),o=i?i[1]:"",a=r?+r[1]:0,c=i?+i[1]:0,u=o.indexOf("."),d=u>0?o[1].length-u-1:0,f=c-a,h=r?r[2]:"";return p=>(a+f*p).toFixed(d)+h},n.color=(e,t)=>{const s=parseInt(e.slice(1),16),r=parseInt(t.slice(1),16),i=s&255,o=(r&255)-i,a=s&65280,c=(r&65280)-a,u=s&16711680,d=(r&16711680)-u;return f=>{const h=i+o*f&255,p=a+c*f&65280,g=u+d*f&16711680;return`#${(1<<24|h|p|g).toString(16).slice(1)}`}}})(Zs||(Zs={}));const ao=[];function Fr(n,e){const t=ao.find(s=>s.name===n);if(!(t&&(t.loadTimes+=1,t.loadTimes>1))&&!gs.isApplyingHMR()){const s=document.createElement("style");s.setAttribute("type","text/css"),s.textContent=e;const r=document.querySelector("head");r&&r.insertBefore(s,r.firstChild),ao.push({name:n,loadTimes:1,styleElement:s})}}function Ur(n){const e=ao.findIndex(t=>t.name===n);if(e>-1){const t=ao[e];if(t.loadTimes-=1,t.loadTimes>0)return;let s=t.styleElement;s&&s.parentNode&&s.parentNode.removeChild(s),s=null,ao.splice(e,1)}}var ye;(function(n){function e(s){return 180*s/Math.PI%360}n.toDeg=e,n.toRad=function(s,r=!1){return(r?s:s%360)*Math.PI/180};function t(s){return s%360+(s<0?360:0)}n.normalize=t})(ye||(ye={}));var Ce;(function(n){function e(a,c=0){return Number.isInteger(a)?a:+a.toFixed(c)}n.round=e;function t(a,c){let u,d;if(c==null?(d=a??1,u=0):(d=c,u=a??0),d<u){const f=u;u=d,d=f}return Math.floor(Math.random()*(d-u+1)+u)}n.random=t;function s(a,c,u){return Number.isNaN(a)?NaN:Number.isNaN(c)||Number.isNaN(u)?0:c<u?a<c?c:a>u?u:a:a<u?u:a>c?c:a}n.clamp=s;function r(a,c){return c*Math.round(a/c)}n.snapToGrid=r;function i(a,c){return c!=null&&a!=null&&c.x>=a.x&&c.x<=a.x+a.width&&c.y>=a.y&&c.y<=a.y+a.height}n.containsPoint=i;function o(a,c){const u=a.x-c.x,d=a.y-c.y;return u*u+d*d}n.squaredLength=o})(Ce||(Ce={}));class ws{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class O extends ws{constructor(e,t){super(),this.x=e??0,this.y=t??0}round(e=0){return this.x=Ce.round(this.x,e),this.y=Ce.round(this.y,e),this}add(e,t){const s=O.create(e,t);return this.x+=s.x,this.y+=s.y,this}update(e,t){const s=O.create(e,t);return this.x=s.x,this.y=s.y,this}translate(e,t){const s=O.create(e,t);return this.x+=s.x,this.y+=s.y,this}rotate(e,t){const s=O.rotate(this,e,t);return this.x=s.x,this.y=s.y,this}scale(e,t,s=new O){const r=O.create(s);return this.x=r.x+e*(this.x-r.x),this.y=r.y+t*(this.y-r.y),this}closest(e){if(e.length===1)return O.create(e[0]);let t=null,s=1/0;return e.forEach(r=>{const i=this.squaredDistance(r);i<s&&(t=r,s=i)}),t?O.create(t):null}distance(e){return Math.sqrt(this.squaredDistance(e))}squaredDistance(e){const t=O.create(e),s=this.x-t.x,r=this.y-t.y;return s*s+r*r}manhattanDistance(e){const t=O.create(e);return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(e=new O){const t=O.create(e),s=-(t.y-this.y),r=t.x-this.x;let i=Math.atan2(s,r);return i<0&&(i=2*Math.PI+i),180*i/Math.PI}angleBetween(e,t){if(this.equals(e)||this.equals(t))return NaN;let s=this.theta(t)-this.theta(e);return s<0&&(s+=360),s}vectorAngle(e){return new O(0,0).angleBetween(this,e)}toPolar(e){return this.update(O.toPolar(this,e)),this}changeInAngle(e,t,s=new O){return this.clone().translate(-e,-t).theta(s)-this.theta(s)}adhereToRect(e){return Ce.containsPoint(e,this)||(this.x=Math.min(Math.max(this.x,e.x),e.x+e.width),this.y=Math.min(Math.max(this.y,e.y),e.y+e.height)),this}bearing(e){const t=O.create(e),s=ye.toRad(this.y),r=ye.toRad(t.y),i=this.x,o=t.x,a=ye.toRad(o-i),c=Math.sin(a)*Math.cos(r),u=Math.cos(s)*Math.sin(r)-Math.sin(s)*Math.cos(r)*Math.cos(a),d=ye.toDeg(Math.atan2(c,u)),f=["NE","E","SE","S","SW","W","NW","N"];let h=d-22.5;return h<0&&(h+=360),h=parseInt(h/45,10),f[h]}cross(e,t){if(e!=null&&t!=null){const s=O.create(e),r=O.create(t);return(r.x-this.x)*(s.y-this.y)-(r.y-this.y)*(s.x-this.x)}return NaN}dot(e){const t=O.create(e);return this.x*t.x+this.y*t.y}diff(e,t){if(typeof e=="number")return new O(this.x-e,this.y-t);const s=O.create(e);return new O(this.x-s.x,this.y-s.y)}lerp(e,t){const s=O.create(e);return new O((1-t)*this.x+t*s.x,(1-t)*this.y+t*s.y)}normalize(e=1){const t=e/this.magnitude();return this.scale(t,t)}move(e,t){const s=O.create(e),r=ye.toRad(s.theta(this));return this.translate(Math.cos(r)*t,-Math.sin(r)*t)}reflection(e){return O.create(e).move(this,this.distance(e))}snapToGrid(e,t){return this.x=Ce.snapToGrid(this.x,e),this.y=Ce.snapToGrid(this.y,t??e),this}equals(e){const t=O.create(e);return t!=null&&t.x===this.x&&t.y===this.y}clone(){return O.clone(this)}toJSON(){return O.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPoint=e})(O||(O={})),function(n){function e(s){return s!=null&&typeof s=="object"&&typeof s.x=="number"&&typeof s.y=="number"}n.isPointLike=e;function t(s){return s!=null&&Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&typeof s[1]=="number"}n.isPointData=t}(O||(O={})),function(n){function e(f,h){return f==null||typeof f=="number"?new n(f,h):t(f)}n.create=e;function t(f){return n.isPoint(f)?new n(f.x,f.y):Array.isArray(f)?new n(f[0],f[1]):new n(f.x,f.y)}n.clone=t;function s(f){return n.isPoint(f)?{x:f.x,y:f.y}:Array.isArray(f)?{x:f[0],y:f[1]}:{x:f.x,y:f.y}}n.toJSON=s;function r(f,h,p=new n){let g=Math.abs(f*Math.cos(h)),m=Math.abs(f*Math.sin(h));const y=t(p),b=ye.normalize(ye.toDeg(h));return b<90?m=-m:b<180?(g=-g,m=-m):b<270&&(g=-g),new n(y.x+g,y.y+m)}n.fromPolar=r;function i(f,h=new n){const p=t(f),g=t(h),m=p.x-g.x,y=p.y-g.y;return new n(Math.sqrt(m*m+y*y),ye.toRad(g.theta(p)))}n.toPolar=i;function o(f,h){return f===h?!0:f!=null&&h!=null?f.x===h.x&&f.y===h.y:!1}n.equals=o;function a(f,h){if(f==null&&h!=null||f!=null&&h==null||f!=null&&h!=null&&f.length!==h.length)return!1;if(f!=null&&h!=null){for(let p=0,g=f.length;p<g;p+=1)if(!o(f[p],h[p]))return!1}return!0}n.equalPoints=a;function c(f,h,p,g){return new n(Ce.random(f,h),Ce.random(p,g))}n.random=c;function u(f,h,p){const g=ye.toRad(ye.normalize(-h)),m=Math.sin(g),y=Math.cos(g);return d(f,y,m,p)}n.rotate=u;function d(f,h,p,g=new n){const m=t(f),y=t(g),b=m.x-y.x,w=m.y-y.y,x=b*h-w*p,v=w*h+b*p;return new n(x+y.x,v+y.y)}n.rotateEx=d}(O||(O={}));class F extends ws{get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get origin(){return new O(this.x,this.y)}get topLeft(){return new O(this.x,this.y)}get topCenter(){return new O(this.x+this.width/2,this.y)}get topRight(){return new O(this.x+this.width,this.y)}get center(){return new O(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new O(this.x,this.y+this.height)}get bottomCenter(){return new O(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new O(this.x+this.width,this.y+this.height)}get corner(){return new O(this.x+this.width,this.y+this.height)}get rightMiddle(){return new O(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new O(this.x,this.y+this.height/2)}get topLine(){return new Y(this.topLeft,this.topRight)}get rightLine(){return new Y(this.topRight,this.bottomRight)}get bottomLine(){return new Y(this.bottomLeft,this.bottomRight)}get leftLine(){return new Y(this.topLeft,this.bottomLeft)}constructor(e,t,s,r){super(),this.x=e??0,this.y=t??0,this.width=s??0,this.height=r??0}getOrigin(){return this.origin}getTopLeft(){return this.topLeft}getTopCenter(){return this.topCenter}getTopRight(){return this.topRight}getCenter(){return this.center}getCenterX(){return this.x+this.width/2}getCenterY(){return this.y+this.height/2}getBottomLeft(){return this.bottomLeft}getBottomCenter(){return this.bottomCenter}getBottomRight(){return this.bottomRight}getCorner(){return this.corner}getRightMiddle(){return this.rightMiddle}getLeftMiddle(){return this.leftMiddle}getTopLine(){return this.topLine}getRightLine(){return this.rightLine}getBottomLine(){return this.bottomLine}getLeftLine(){return this.leftLine}bbox(e){if(!e)return this.clone();const t=ye.toRad(e),s=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t)),i=this.width*r+this.height*s,o=this.width*s+this.height*r;return new F(this.x+(this.width-i)/2,this.y+(this.height-o)/2,i,o)}round(e=0){return this.x=Ce.round(this.x,e),this.y=Ce.round(this.y,e),this.width=Ce.round(this.width,e),this.height=Ce.round(this.height,e),this}add(e,t,s,r){const i=F.create(e,t,s,r),o=Math.min(this.x,i.x),a=Math.min(this.y,i.y),c=Math.max(this.x+this.width,i.x+i.width),u=Math.max(this.y+this.height,i.y+i.height);return this.x=o,this.y=a,this.width=c-o,this.height=u-a,this}update(e,t,s,r){const i=F.create(e,t,s,r);return this.x=i.x,this.y=i.y,this.width=i.width,this.height=i.height,this}inflate(e,t){const s=e,r=t??e;return this.x-=s,this.y-=r,this.width+=2*s,this.height+=2*r,this}snapToGrid(e,t){const s=this.origin.snapToGrid(e,t),r=this.corner.snapToGrid(e,t);return this.x=s.x,this.y=s.y,this.width=r.x-s.x,this.height=r.y-s.y,this}translate(e,t){const s=O.create(e,t);return this.x+=s.x,this.y+=s.y,this}scale(e,t,s=new O){const r=this.origin.scale(e,t,s);return this.x=r.x,this.y=r.y,this.width*=e,this.height*=t,this}rotate(e,t=this.getCenter()){if(e!==0){const s=ye.toRad(e),r=Math.cos(s),i=Math.sin(s);let o=this.getOrigin(),a=this.getTopRight(),c=this.getBottomRight(),u=this.getBottomLeft();o=O.rotateEx(o,r,i,t),a=O.rotateEx(a,r,i,t),c=O.rotateEx(c,r,i,t),u=O.rotateEx(u,r,i,t);const d=new F(o.x,o.y,0,0);d.add(a.x,a.y,0,0),d.add(c.x,c.y,0,0),d.add(u.x,u.y,0,0),this.update(d)}return this}rotate90(){const e=(this.width-this.height)/2;this.x+=e,this.y-=e;const t=this.width;return this.width=this.height,this.height=t,this}moveAndExpand(e){const t=F.clone(e);return this.x+=t.x||0,this.y+=t.y||0,this.width+=t.width||0,this.height+=t.height||0,this}getMaxScaleToFit(e,t=this.center){const s=F.clone(e),r=t.x,i=t.y;let o=1/0,a=1/0,c=1/0,u=1/0,d=1/0,f=1/0,h=1/0,p=1/0;const g=s.topLeft;g.x<r&&(o=(this.x-r)/(g.x-r)),g.y<i&&(d=(this.y-i)/(g.y-i));const m=s.bottomRight;m.x>r&&(a=(this.x+this.width-r)/(m.x-r)),m.y>i&&(f=(this.y+this.height-i)/(m.y-i));const y=s.topRight;y.x>r&&(c=(this.x+this.width-r)/(y.x-r)),y.y<i&&(h=(this.y-i)/(y.y-i));const b=s.bottomLeft;return b.x<r&&(u=(this.x-r)/(b.x-r)),b.y>i&&(p=(this.y+this.height-i)/(b.y-i)),{sx:Math.min(o,a,c,u),sy:Math.min(d,f,h,p)}}getMaxUniformScaleToFit(e,t=this.center){const s=this.getMaxScaleToFit(e,t);return Math.min(s.sx,s.sy)}containsPoint(e,t){return Ce.containsPoint(this,O.create(e,t))}containsRect(e,t,s,r){const i=F.create(e,t,s,r),o=this.x,a=this.y,c=this.width,u=this.height,d=i.x,f=i.y,h=i.width,p=i.height;return c===0||u===0||h===0||p===0?!1:d>=o&&f>=a&&d+h<=o+c&&f+p<=a+u}intersectsWithLine(e){const t=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],s=[],r=[];return t.forEach(i=>{const o=e.intersectsWithLine(i);o!==null&&r.indexOf(o.toString())<0&&(s.push(o),r.push(o.toString()))}),s.length>0?s:null}intersectsWithLineFromCenterToPoint(e,t){const s=O.clone(e),r=this.center;let i=null;t!=null&&t!==0&&s.rotate(t,r);const o=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],a=new Y(r,s);for(let c=o.length-1;c>=0;c-=1){const u=o[c].intersectsWithLine(a);if(u!==null){i=u;break}}return i&&t!=null&&t!==0&&i.rotate(-t,r),i}intersectsWithRect(e,t,s,r){const i=F.create(e,t,s,r);if(!this.isIntersectWithRect(i))return null;const o=this.origin,a=this.corner,c=i.origin,u=i.corner,d=Math.max(o.x,c.x),f=Math.max(o.y,c.y);return new F(d,f,Math.min(a.x,u.x)-d,Math.min(a.y,u.y)-f)}isIntersectWithRect(e,t,s,r){const i=F.create(e,t,s,r),o=this.origin,a=this.corner,c=i.origin,u=i.corner;return!(u.x<=o.x||u.y<=o.y||c.x>=a.x||c.y>=a.y)}normalize(){let e=this.x,t=this.y,s=this.width,r=this.height;return this.width<0&&(e=this.x+this.width,s=-this.width),this.height<0&&(t=this.y+this.height,r=-this.height),this.x=e,this.y=t,this.width=s,this.height=r,this}union(e){const t=F.clone(e),s=this.origin,r=this.corner,i=t.origin,o=t.corner,a=Math.min(s.x,i.x),c=Math.min(s.y,i.y),u=Math.max(r.x,o.x),d=Math.max(r.y,o.y);return new F(a,c,u-a,d-c)}getNearestSideToPoint(e){const t=O.clone(e),s=t.x-this.x,r=this.x+this.width-t.x,i=t.y-this.y,o=this.y+this.height-t.y;let a=s,c="left";return r<a&&(a=r,c="right"),i<a&&(a=i,c="top"),o<a&&(c="bottom"),c}getNearestPointToPoint(e){const t=O.clone(e);if(this.containsPoint(t)){const s=this.getNearestSideToPoint(t);if(s==="left")return new O(this.x,t.y);if(s==="top")return new O(t.x,this.y);if(s==="right")return new O(this.x+this.width,t.y);if(s==="bottom")return new O(t.x,this.y+this.height)}return t.adhereToRect(this)}equals(e){return e!=null&&e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}clone(){return new F(this.x,this.y,this.width,this.height)}toJSON(){return{x:this.x,y:this.y,width:this.width,height:this.height}}serialize(){return`${this.x} ${this.y} ${this.width} ${this.height}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isRectangle=e})(F||(F={})),function(n){function e(t){return t!=null&&typeof t=="object"&&typeof t.x=="number"&&typeof t.y=="number"&&typeof t.width=="number"&&typeof t.height=="number"}n.isRectangleLike=e}(F||(F={})),function(n){function e(o,a,c,u){return o==null||typeof o=="number"?new n(o,a,c,u):t(o)}n.create=e;function t(o){return n.isRectangle(o)?o.clone():Array.isArray(o)?new n(o[0],o[1],o[2],o[3]):new n(o.x,o.y,o.width,o.height)}n.clone=t;function s(o){return new n(o.x-o.a,o.y-o.b,2*o.a,2*o.b)}n.fromEllipse=s;function r(o){return new n(0,0,o.width,o.height)}n.fromSize=r;function i(o,a){return new n(o.x,o.y,a.width,a.height)}n.fromPositionAndSize=i}(F||(F={}));class Y extends ws{get center(){return new O((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(e,t,s,r){super(),typeof e=="number"&&typeof t=="number"?(this.start=new O(e,t),this.end=new O(s,r)):(this.start=O.create(e),this.end=O.create(t))}getCenter(){return this.center}round(e=0){return this.start.round(e),this.end.round(e),this}translate(e,t){return typeof e=="number"?(this.start.translate(e,t),this.end.translate(e,t)):(this.start.translate(e),this.end.translate(e)),this}rotate(e,t){return this.start.rotate(e,t),this.end.rotate(e,t),this}scale(e,t,s){return this.start.scale(e,t,s),this.end.scale(e,t,s),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const e=this.start.x-this.end.x,t=this.start.y-this.end.y;return e*e+t*t}setLength(e){const t=this.length();if(!t)return this;const s=e/t;return this.scale(s,s,this.start)}parallel(e){const t=this.clone();if(!t.isDifferentiable())return t;const{start:s,end:r}=t,i=s.clone().rotate(270,r),o=r.clone().rotate(90,s);return s.move(o,e),r.move(i,e),t}vector(){return new O(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const e=new O(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,e)}bbox(){const e=Math.min(this.start.x,this.end.x),t=Math.min(this.start.y,this.end.y),s=Math.max(this.start.x,this.end.x),r=Math.max(this.start.y,this.end.y);return new F(e,t,s-e,r-t)}bearing(){return this.start.bearing(this.end)}closestPoint(e){return this.pointAt(this.closestPointNormalizedLength(e))}closestPointLength(e){return this.closestPointNormalizedLength(e)*this.length()}closestPointTangent(e){return this.tangentAt(this.closestPointNormalizedLength(e))}closestPointNormalizedLength(e){const t=this.vector().dot(new Y(this.start,e).vector()),s=Math.min(1,Math.max(0,t/this.squaredLength()));return Number.isNaN(s)?0:s}pointAt(e){const t=this.start,s=this.end;return e<=0?t.clone():e>=1?s.clone():t.lerp(s,e)}pointAtLength(e){const t=this.start,s=this.end;let r=!0;e<0&&(r=!1,e=-e);const i=this.length();if(e>=i)return r?s.clone():t.clone();const o=(r?e:i-e)/i;return this.pointAt(o)}divideAt(e){const t=this.pointAt(e);return[new Y(this.start,t),new Y(t,this.end)]}divideAtLength(e){const t=this.pointAtLength(e);return[new Y(this.start,t),new Y(t,this.end)]}containsPoint(e){const t=this.start,s=this.end;if(t.cross(e,s)!==0)return!1;const r=this.length();return!(new Y(t,e).length()>r||new Y(e,s).length()>r)}intersect(e,t){const s=e.intersectsWithLine(this,t);return s?Array.isArray(s)?s:[s]:null}intersectsWithLine(e){const t=new O(this.end.x-this.start.x,this.end.y-this.start.y),s=new O(e.end.x-e.start.x,e.end.y-e.start.y),r=t.x*s.y-t.y*s.x,i=new O(e.start.x-this.start.x,e.start.y-this.start.y),o=i.x*s.y-i.y*s.x,a=i.x*t.y-i.y*t.x;if(r===0||o*r<0||a*r<0)return null;if(r>0){if(o>r||a>r)return null}else if(o<r||a<r)return null;return new O(this.start.x+o*t.x/r,this.start.y+o*t.y/r)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(e){const t=O.clone(e),s=this.start,r=this.end;return((r.x-s.x)*(t.y-s.y)-(r.y-s.y)*(t.x-s.x))/this.length()}pointSquaredDistance(e,t){const s=O.create(e,t);return this.closestPoint(s).squaredDistance(s)}pointDistance(e,t){const s=O.create(e,t);return this.closestPoint(s).distance(s)}tangentAt(e){if(!this.isDifferentiable())return null;const t=this.start,s=this.end,r=this.pointAt(e),i=new Y(t,s);return i.translate(r.x-t.x,r.y-t.y),i}tangentAtLength(e){if(!this.isDifferentiable())return null;const t=this.start,s=this.end,r=this.pointAtLength(e),i=new Y(t,s);return i.translate(r.x-t.x,r.y-t.y),i}relativeCcw(e,t){const s=O.create(e,t);let r=s.x-this.start.x,i=s.y-this.start.y;const o=this.end.x-this.start.x,a=this.end.y-this.start.y;let c=r*a-i*o;return c===0&&(c=r*o+i*a,c>0&&(r-=o,i-=a,c=r*o+i*a,c<0&&(c=0))),c<0?-1:c>0?1:0}equals(e){return e!=null&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.end.x===e.end.x&&this.end.y===e.end.y}clone(){return new Y(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isLine=e})(Y||(Y={}));class pn extends ws{get center(){return new O(this.x,this.y)}constructor(e,t,s,r){super(),this.x=e??0,this.y=t??0,this.a=s??0,this.b=r??0}bbox(){return F.fromEllipse(this)}getCenter(){return this.center}inflate(e,t){const s=e,r=t??e;return this.a+=2*s,this.b+=2*r,this}normalizedDistance(e,t){const s=O.create(e,t),r=s.x-this.x,i=s.y-this.y,o=this.a,a=this.b;return r*r/(o*o)+i*i/(a*a)}containsPoint(e,t){return this.normalizedDistance(e,t)<=1}intersectsWithLine(e){const t=[],s=this.a,r=this.b,i=e.start,o=e.end,a=e.vector(),c=i.diff(new O(this.x,this.y)),u=new O(a.x/(s*s),a.y/(r*r)),d=new O(c.x/(s*s),c.y/(r*r)),f=a.dot(u),h=a.dot(d),p=c.dot(d)-1,g=h*h-f*p;if(g<0)return null;if(g>0){const m=Math.sqrt(g),y=(-h-m)/f,b=(-h+m)/f;if((y<0||y>1)&&(b<0||b>1))return null;y>=0&&y<=1&&t.push(i.lerp(o,y)),b>=0&&b<=1&&t.push(i.lerp(o,b))}else{const m=-h/f;if(m>=0&&m<=1)t.push(i.lerp(o,m));else return null}return t}intersectsWithLineFromCenterToPoint(e,t=0){const s=O.clone(e);t&&s.rotate(t,this.getCenter());const r=s.x-this.x,i=s.y-this.y;let o;if(r===0)return o=this.bbox().getNearestPointToPoint(s),t?o.rotate(-t,this.getCenter()):o;const a=i/r,c=a*a,u=this.a*this.a,d=this.b*this.b;let f=Math.sqrt(1/(1/u+c/d));f=r<0?-f:f;const h=a*f;return o=new O(this.x+f,this.y+h),t?o.rotate(-t,this.getCenter()):o}tangentTheta(e){const t=O.clone(e),s=t.x,r=t.y,i=this.a,o=this.b,a=this.bbox().center,c=a.x,u=a.y,d=30,f=s>a.x+i/2,h=s<a.x-i/2;let p,g;return f||h?(g=s>a.x?r-d:r+d,p=i*i/(s-c)-i*i*(r-u)*(g-u)/(o*o*(s-c))+c):(p=r>a.y?s+d:s-d,g=o*o/(r-u)-o*o*(s-c)*(p-c)/(i*i*(r-u))+u),new O(p,g).theta(t)}scale(e,t){return this.a*=e,this.b*=t,this}rotate(e,t){const s=F.fromEllipse(this);s.rotate(e,t);const r=pn.fromRect(s);return this.a=r.a,this.b=r.b,this.x=r.x,this.y=r.y,this}translate(e,t){const s=O.create(e,t);return this.x+=s.x,this.y+=s.y,this}equals(e){return e!=null&&e.x===this.x&&e.y===this.y&&e.a===this.a&&e.b===this.b}clone(){return new pn(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isEllipse=e})(pn||(pn={})),function(n){function e(r,i,o,a){return r==null||typeof r=="number"?new n(r,i,o,a):t(r)}n.create=e;function t(r){return n.isEllipse(r)?r.clone():Array.isArray(r)?new n(r[0],r[1],r[2],r[3]):new n(r.x,r.y,r.a,r.b)}n.parse=t;function s(r){const i=r.center;return new n(i.x,i.y,r.width/2,r.height/2)}n.fromRect=s}(pn||(pn={}));const dR=new RegExp("^[\\s\\dLMCZz,.]*$");function hR(n){return typeof n!="string"?!1:dR.test(n)}function sd(n,e){return(n%e+e)%e}function fR(n,e,t,s,r){const i=[],o=n[n.length-1],a=e!=null&&e>0,c=e||0;if(s&&a){n=n.slice();const f=n[0],h=new O(o.x+(f.x-o.x)/2,o.y+(f.y-o.y)/2);n.splice(0,0,h)}let u=n[0],d=1;for(t?i.push("M",u.x,u.y):i.push("L",u.x,u.y);d<(s?n.length:n.length-1);){let f=n[sd(d,n.length)],h=u.x-f.x,p=u.y-f.y;if(a&&(h!==0||p!==0)&&(r==null||r.indexOf(d-1)<0)){let g=Math.sqrt(h*h+p*p);const m=h*Math.min(c,g/2)/g,y=p*Math.min(c,g/2)/g,b=f.x+m,w=f.y+y;i.push("L",b,w);let x=n[sd(d+1,n.length)];for(;d<n.length-2&&Math.round(x.x-f.x)===0&&Math.round(x.y-f.y)===0;)x=n[sd(d+2,n.length)],d+=1;h=x.x-f.x,p=x.y-f.y,g=Math.max(1,Math.sqrt(h*h+p*p));const v=h*Math.min(c,g/2)/g,S=p*Math.min(c,g/2)/g,E=f.x+v,C=f.y+S;i.push("Q",f.x,f.y,E,C),f=new O(E,C)}else i.push("L",f.x,f.y);u=f,d+=1}return s?i.push("Z"):i.push("L",o.x,o.y),i.map(f=>typeof f=="string"?f:+f.toFixed(3)).join(" ")}function Fy(n,e={}){const t=[];return n&&n.length&&n.forEach(s=>{Array.isArray(s)?t.push({x:s[0],y:s[1]}):t.push({x:s.x,y:s.y})}),fR(t,e.round,e.initialMove==null||e.initialMove,e.close,e.exclude)}function tl(n,e,t,s,r=0,i=0,o=0,a,c){if(t===0||s===0)return[];a-=n,c-=e,t=Math.abs(t),s=Math.abs(s);const u=-a/2,d=-c/2,f=Math.cos(r*Math.PI/180),h=Math.sin(r*Math.PI/180),p=f*u+h*d,g=-1*h*u+f*d,m=p*p,y=g*g,b=t*t,w=s*s,x=m/b+y/w;let v;if(x>1)t=Math.sqrt(x)*t,s=Math.sqrt(x)*s,v=0;else{let Z=1;i===o&&(Z=-1),v=Z*Math.sqrt((b*w-b*y-w*m)/(b*y+w*m))}const S=v*t*g/s,E=-1*v*s*p/t,C=f*S-h*E+a/2,P=h*S+f*E+c/2;let A=Math.atan2((g-E)/s,(p-S)/t)-Math.atan2(0,1),T=A>=0?A:2*Math.PI+A;A=Math.atan2((-g-E)/s,(-p-S)/t)-Math.atan2((g-E)/s,(p-S)/t);let k=A>=0?A:2*Math.PI+A;o===0&&k>0?k-=2*Math.PI:o!==0&&k<0&&(k+=2*Math.PI);const V=k*2/Math.PI,R=Math.ceil(V<0?-1*V:V),j=k/R,N=8/3*Math.sin(j/4)*Math.sin(j/4)/Math.sin(j/2),M=f*t,D=f*s,B=h*t,G=h*s;let se=Math.cos(T),I=Math.sin(T),_=-N*(M*I+G*se),H=-N*(B*I-D*se),K=0,q=0;const re=[];for(let Z=0;Z<R;Z+=1){T+=j,se=Math.cos(T),I=Math.sin(T),K=M*se-G*I+C,q=B*se+D*I+P;const ge=-N*(M*I+G*se),te=-N*(B*I-D*se),le=Z*6;re[le]=Number(_+n),re[le+1]=Number(H+e),re[le+2]=Number(K-ge+n),re[le+3]=Number(q-te+e),re[le+4]=Number(K+n),re[le+5]=Number(q+e),_=K+ge,H=q+te}return re.map(Z=>+Z.toFixed(2))}function pR(n,e,t,s,r=0,i=0,o=0,a,c){const u=[],d=tl(n,e,t,s,r,i,o,a,c);if(d!=null)for(let f=0,h=d.length;f<h;f+=6)u.push("C",d[f],d[f+1],d[f+2],d[f+3],d[f+4],d[f+5]);return u.join(" ")}class ze extends ws{get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(e){if(super(),e!=null){if(typeof e=="string")return ze.parse(e);this.points=e.map(t=>O.create(t))}else this.points=[]}scale(e,t,s=new O){return this.points.forEach(r=>r.scale(e,t,s)),this}rotate(e,t){return this.points.forEach(s=>s.rotate(e,t)),this}translate(e,t){const s=O.create(e,t);return this.points.forEach(r=>r.translate(s.x,s.y)),this}round(e=0){return this.points.forEach(t=>t.round(e)),this}bbox(){if(this.points.length===0)return new F;let e=1/0,t=-1/0,s=1/0,r=-1/0;const i=this.points;for(let o=0,a=i.length;o<a;o+=1){const c=i[o],u=c.x,d=c.y;u<e&&(e=u),u>t&&(t=u),d<s&&(s=d),d>r&&(r=d)}return new F(e,s,t-e,r-s)}closestPoint(e){const t=this.closestPointLength(e);return this.pointAtLength(t)}closestPointLength(e){const t=this.points,s=t.length;if(s===0||s===1)return 0;let r=0,i=0,o=1/0;for(let a=0,c=s-1;a<c;a+=1){const u=new Y(t[a],t[a+1]),d=u.length(),f=u.closestPointNormalizedLength(e),p=u.pointAt(f).squaredDistance(e);p<o&&(o=p,i=r+f*d),r+=d}return i}closestPointNormalizedLength(e){const t=this.length();return t===0?0:this.closestPointLength(e)/t}closestPointTangent(e){const t=this.closestPointLength(e);return this.tangentAtLength(t)}containsPoint(e){if(this.points.length===0)return!1;const t=O.clone(e),s=t.x,r=t.y,i=this.points,o=i.length;let a=o-1,c=0;for(let u=0;u<o;u+=1){const d=i[a],f=i[u];if(t.equals(d))return!0;const h=new Y(d,f);if(h.containsPoint(e))return!0;if(r<=d.y&&r>f.y||r>d.y&&r<=f.y){const p=d.x-s>f.x-s?d.x-s:f.x-s;if(p>=0){const g=new O(s+p,r),m=new Y(e,g);h.intersectsWithLine(m)&&(c+=1)}}a=u}return c%2===1}intersectsWithLine(e){const t=[];for(let s=0,r=this.points.length-1;s<r;s+=1){const i=this.points[s],o=this.points[s+1],a=e.intersectsWithLine(new Y(i,o));a&&t.push(a)}return t.length>0?t:null}isDifferentiable(){for(let e=0,t=this.points.length-1;e<t;e+=1){const s=this.points[e],r=this.points[e+1];if(new Y(s,r).isDifferentiable())return!0}return!1}length(){let e=0;for(let t=0,s=this.points.length-1;t<s;t+=1){const r=this.points[t],i=this.points[t+1];e+=r.distance(i)}return e}pointAt(e){const t=this.points,s=t.length;if(s===0)return null;if(s===1||e<=0)return t[0].clone();if(e>=1)return t[s-1].clone();const i=this.length()*e;return this.pointAtLength(i)}pointAtLength(e){const t=this.points,s=t.length;if(s===0)return null;if(s===1)return t[0].clone();let r=!0;e<0&&(r=!1,e=-e);let i=0;for(let a=0,c=s-1;a<c;a+=1){const u=r?a:c-1-a,d=t[u],f=t[u+1],h=new Y(d,f),p=d.distance(f);if(e<=i+p)return h.pointAtLength((r?1:-1)*(e-i));i+=p}return(r?t[s-1]:t[0]).clone()}tangentAt(e){const s=this.points.length;if(s===0||s===1)return null;e<0&&(e=0),e>1&&(e=1);const i=this.length()*e;return this.tangentAtLength(i)}tangentAtLength(e){const t=this.points,s=t.length;if(s===0||s===1)return null;let r=!0;e<0&&(r=!1,e=-e);let i,o=0;for(let a=0,c=s-1;a<c;a+=1){const u=r?a:c-1-a,d=t[u],f=t[u+1],h=new Y(d,f),p=d.distance(f);if(h.isDifferentiable()){if(e<=o+p)return h.tangentAtLength((r?1:-1)*(e-o));i=h}o+=p}if(i){const a=r?1:0;return i.tangentAt(a)}return null}simplify(e={}){const t=this.points;if(t.length<3)return this;const s=e.threshold||0;let r=0;for(;t[r+2];){const i=r,o=r+1,a=r+2,c=t[i],u=t[o],d=t[a];new Y(c,d).closestPoint(u).distance(u)<=s?t.splice(o,1):r+=1}return this}toHull(){const e=this.points,t=e.length;if(t===0)return new ze;let s=e[0];for(let h=1;h<t;h+=1)(e[h].y<s.y||e[h].y===s.y&&e[h].x>s.x)&&(s=e[h]);const r=[];for(let h=0;h<t;h+=1){let p=s.theta(e[h]);p===0&&(p=360),r.push([e[h],h,p])}if(r.sort((h,p)=>{let g=h[2]-p[2];return g===0&&(g=p[1]-h[1]),g}),r.length>2){const h=r[r.length-1];r.unshift(h)}const i={},o=[],a=h=>`${h[0].toString()}@${h[1]}`;for(;r.length!==0;){const h=r.pop(),p=h[0];if(i[a(h)])continue;let g=!1;for(;!g;)if(o.length<2)o.push(h),g=!0;else{const m=o.pop(),y=m[0],b=o.pop(),w=b[0],x=w.cross(y,p);if(x<0)o.push(b),o.push(m),o.push(h),g=!0;else if(x===0){const S=y.angleBetween(w,p);Math.abs(S-180)<1e-10||y.equals(p)||w.equals(y)?(i[a(m)]=y,o.push(b)):Math.abs((S+1)%360-1)<1e-10&&(o.push(b),r.push(m))}else i[a(m)]=y,o.push(b)}}o.length>2&&o.pop();let c,u=-1;for(let h=0,p=o.length;h<p;h+=1){const g=o[h][1];(c===void 0||g<c)&&(c=g,u=h)}let d=[];if(u>0){const h=o.slice(u),p=o.slice(0,u);d=h.concat(p)}else d=o;const f=[];for(let h=0,p=d.length;h<p;h+=1)f.push(d[h][0]);return new ze(f)}equals(e){return e==null||e.points.length!==this.points.length?!1:e.points.every((t,s)=>t.equals(this.points[s]))}clone(){return new ze(this.points.map(e=>e.clone()))}toJSON(){return this.points.map(e=>e.toJSON())}serialize(){return this.points.map(e=>`${e.serialize()}`).join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPolyline=e})(ze||(ze={})),function(n){function e(t){const s=t.trim();if(s==="")return new n;const r=[],i=s.split(/\s*,\s*|\s+/);for(let o=0,a=i.length;o<a;o+=2)r.push({x:+i[o],y:+i[o+1]});return new n(r)}n.parse=e}(ze||(ze={}));class Be extends ws{constructor(e,t,s,r){super(),this.PRECISION=3,this.start=O.create(e),this.controlPoint1=O.create(t),this.controlPoint2=O.create(s),this.end=O.create(r)}bbox(){const e=this.start,t=this.controlPoint1,s=this.controlPoint2,r=this.end,i=e.x,o=e.y,a=t.x,c=t.y,u=s.x,d=s.y,f=r.x,h=r.y,p=[],g=[[],[]];let m,y,b,w,x,v,S,E;for(let M=0;M<2;M+=1){if(M===0?(y=6*i-12*a+6*u,m=-3*i+9*a-9*u+3*f,b=3*a-3*i):(y=6*o-12*c+6*d,m=-3*o+9*c-9*d+3*h,b=3*c-3*o),Math.abs(m)<1e-12){if(Math.abs(y)<1e-12)continue;w=-b/y,w>0&&w<1&&p.push(w);continue}S=y*y-4*b*m,E=Math.sqrt(S),!(S<0)&&(x=(-y+E)/(2*m),x>0&&x<1&&p.push(x),v=(-y-E)/(2*m),v>0&&v<1&&p.push(v))}let C,P,A,T=p.length;const k=T;for(;T;)T-=1,w=p[T],A=1-w,C=A*A*A*i+3*A*A*w*a+3*A*w*w*u+w*w*w*f,g[0][T]=C,P=A*A*A*o+3*A*A*w*c+3*A*w*w*d+w*w*w*h,g[1][T]=P;p[k]=0,p[k+1]=1,g[0][k]=i,g[1][k]=o,g[0][k+1]=f,g[1][k+1]=h,p.length=k+2,g[0].length=k+2,g[1].length=k+2;const V=Math.min.apply(null,g[0]),R=Math.min.apply(null,g[1]),j=Math.max.apply(null,g[0]),N=Math.max.apply(null,g[1]);return new F(V,R,j-V,N-R)}closestPoint(e,t={}){return this.pointAtT(this.closestPointT(e,t))}closestPointLength(e,t={}){const s=this.getOptions(t);return this.lengthAtT(this.closestPointT(e,s),s)}closestPointNormalizedLength(e,t={}){const s=this.getOptions(t),r=this.closestPointLength(e,s);if(!r)return 0;const i=this.length(s);return i===0?0:r/i}closestPointT(e,t={}){const s=this.getPrecision(t),r=this.getDivisions(t),i=Math.pow(10,-s);let o=null,a=0,c=0,u=0,d=0,f=0,h=null;const p=r.length;let g=p>0?1/p:0;for(r.forEach((m,y)=>{const b=m.start.distance(e),w=m.end.distance(e),x=b+w;(h==null||x<h)&&(o=m,a=y*g,c=(y+1)*g,u=b,d=w,h=x,f=m.endpointDistance())});;){const m=u?Math.abs(u-d)/u:0,y=d!=null?Math.abs(u-d)/d:0,b=m<i||y<i,w=u?u<f*i:!0,x=d?d<f*i:!0;if(b||(w||x))return u<=d?a:c;const S=o.divide(.5);g/=2;const E=S[0].start.distance(e),C=S[0].end.distance(e),P=E+C,A=S[1].start.distance(e),T=S[1].end.distance(e),k=A+T;P<=k?(o=S[0],c-=g,u=E,d=C):(o=S[1],a+=g,u=A,d=T)}}closestPointTangent(e,t={}){return this.tangentAtT(this.closestPointT(e,t))}containsPoint(e,t={}){return this.toPolyline(t).containsPoint(e)}divideAt(e,t={}){if(e<=0)return this.divideAtT(0);if(e>=1)return this.divideAtT(1);const s=this.tAt(e,t);return this.divideAtT(s)}divideAtLength(e,t={}){const s=this.tAtLength(e,t);return this.divideAtT(s)}divide(e){return this.divideAtT(e)}divideAtT(e){const t=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return[new Be(t,t,t,t),new Be(t,s,r,i)];if(e>=1)return[new Be(t,s,r,i),new Be(i,i,i,i)];const o=this.getSkeletonPoints(e),a=o.startControlPoint1,c=o.startControlPoint2,u=o.divider,d=o.dividerControlPoint1,f=o.dividerControlPoint2;return[new Be(t,a,c,u),new Be(u,d,f,i)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(e){const t=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return{startControlPoint1:t.clone(),startControlPoint2:t.clone(),divider:t.clone(),dividerControlPoint1:s.clone(),dividerControlPoint2:r.clone()};if(e>=1)return{startControlPoint1:s.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};const o=new Y(t,s).pointAt(e),a=new Y(s,r).pointAt(e),c=new Y(r,i).pointAt(e),u=new Y(o,a).pointAt(e),d=new Y(a,c).pointAt(e),f=new Y(u,d).pointAt(e);return{startControlPoint1:o,startControlPoint2:u,divider:f,dividerControlPoint1:d,dividerControlPoint2:c}}getSubdivisions(e={}){const t=this.getPrecision(e);let s=[new Be(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(t===0)return s;let r=this.endpointDistance();const i=Math.pow(10,-t);let o=0;for(;;){o+=1;const a=[];s.forEach(d=>{const f=d.divide(.5);a.push(f[0],f[1])});const c=a.reduce((d,f)=>d+f.endpointDistance(),0),u=c!==0?(c-r)/c:0;if(o>1&&u<i)return a;s=a,r=c}}length(e={}){return this.getDivisions(e).reduce((s,r)=>s+r.endpointDistance(),0)}lengthAtT(e,t={}){if(e<=0)return 0;const s=t.precision===void 0?this.PRECISION:t.precision;return this.divide(e)[0].length({precision:s})}pointAt(e,t={}){if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();const s=this.tAt(e,t);return this.pointAtT(s)}pointAtLength(e,t={}){const s=this.tAtLength(e,t);return this.pointAtT(s)}pointAtT(e){return e<=0?this.start.clone():e>=1?this.end.clone():this.getSkeletonPoints(e).divider}isDifferentiable(){const e=this.start,t=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(s)&&s.equals(r))}tangentAt(e,t={}){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);const s=this.tAt(e,t);return this.tangentAtT(s)}tangentAtLength(e,t={}){if(!this.isDifferentiable())return null;const s=this.tAtLength(e,t);return this.tangentAtT(s)}tangentAtT(e){if(!this.isDifferentiable())return null;e<0&&(e=0),e>1&&(e=1);const t=this.getSkeletonPoints(e),s=t.startControlPoint2,r=t.dividerControlPoint1,i=t.divider,o=new Y(s,r);return o.translate(i.x-s.x,i.y-s.y),o}getPrecision(e={}){return e.precision==null?this.PRECISION:e.precision}getDivisions(e={}){if(e.subdivisions!=null)return e.subdivisions;const t=this.getPrecision(e);return this.getSubdivisions({precision:t})}getOptions(e={}){const t=this.getPrecision(e),s=this.getDivisions(e);return{precision:t,subdivisions:s}}tAt(e,t={}){if(e<=0)return 0;if(e>=1)return 1;const s=this.getOptions(t),i=this.length(s)*e;return this.tAtLength(i,s)}tAtLength(e,t={}){let s=!0;e<0&&(s=!1,e=-e);const r=this.getPrecision(t),i=this.getDivisions(t),o={precision:r,subdivisions:i};let a=null,c,u,d=0,f=0,h=0;const p=i.length;let g=p>0?1/p:0;for(let b=0;b<p;b+=1){const w=s?b:p-1-b,x=i[b],v=x.endpointDistance();if(e<=h+v){a=x,c=w*g,u=(w+1)*g,d=s?e-h:v+h-e,f=s?v+h-e:e-h;break}h+=v}if(a==null)return s?1:0;const m=this.length(o),y=Math.pow(10,-r);for(;;){let b;if(b=m!==0?d/m:0,b<y)return c;if(b=m!==0?f/m:0,b<y)return u;let w,x;const v=a.divide(.5);g/=2;const S=v[0].endpointDistance(),E=v[1].endpointDistance();d<=S?(a=v[0],u-=g,w=d,x=S-w):(a=v[1],c+=g,w=d-S,x=E-w),d=w,f=x}}toPoints(e={}){const t=this.getDivisions(e),s=[t[0].start.clone()];return t.forEach(r=>s.push(r.end.clone())),s}toPolyline(e={}){return new ze(this.toPoints(e))}scale(e,t,s){return this.start.scale(e,t,s),this.controlPoint1.scale(e,t,s),this.controlPoint2.scale(e,t,s),this.end.scale(e,t,s),this}rotate(e,t){return this.start.rotate(e,t),this.controlPoint1.rotate(e,t),this.controlPoint2.rotate(e,t),this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?(this.start.translate(e,t),this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t)):(this.start.translate(e),this.controlPoint1.translate(e),this.controlPoint2.translate(e),this.end.translate(e)),this}equals(e){return e!=null&&this.start.equals(e.start)&&this.controlPoint1.equals(e.controlPoint1)&&this.controlPoint2.equals(e.controlPoint2)&&this.end.equals(e.end)}clone(){return new Be(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isCurve=e})(Be||(Be={})),function(n){function e(r){const i=r.length,o=[],a=[];let c=2;o[0]=r[0]/c;for(let u=1;u<i;u+=1)a[u]=1/c,c=(u<i-1?4:3.5)-a[u],o[u]=(r[u]-o[u-1])/c;for(let u=1;u<i;u+=1)o[i-u-1]-=a[i-u]*o[i-u];return o}function t(r){const i=r.map(h=>O.clone(h)),o=[],a=[],c=i.length-1;if(c===1)return o[0]=new O((2*i[0].x+i[1].x)/3,(2*i[0].y+i[1].y)/3),a[0]=new O(2*o[0].x-i[0].x,2*o[0].y-i[0].y),[o,a];const u=[];for(let h=1;h<c-1;h+=1)u[h]=4*i[h].x+2*i[h+1].x;u[0]=i[0].x+2*i[1].x,u[c-1]=(8*i[c-1].x+i[c].x)/2;const d=e(u);for(let h=1;h<c-1;h+=1)u[h]=4*i[h].y+2*i[h+1].y;u[0]=i[0].y+2*i[1].y,u[c-1]=(8*i[c-1].y+i[c].y)/2;const f=e(u);for(let h=0;h<c;h+=1)o.push(new O(d[h],f[h])),h<c-1?a.push(new O(2*i[h+1].x-d[h+1],2*i[h+1].y-f[h+1])):a.push(new O((i[c].x+d[c-1])/2,(i[c].y+f[c-1])/2));return[o,a]}function s(r){if(r==null||Array.isArray(r)&&r.length<2)throw new Error("At least 2 points are required");const i=t(r),o=[];for(let a=0,c=i[0].length;a<c;a+=1){const u=new O(i[0][a].x,i[0][a].y),d=new O(i[1][a].x,i[1][a].y);o.push(new n(r[a],u,d,r[a+1]))}return o}n.throughPoints=s}(Be||(Be={}));class nl extends ws{constructor(){super(...arguments),this.isVisible=!0,this.isSegment=!0,this.isSubpathStart=!1}get end(){return this.endPoint}get start(){if(this.previousSegment==null)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path, or segment has not yet been added to a path.)");return this.previousSegment.end}closestPointT(e,t){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(e);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(e,t){if(e<=0)return 0;const s=this.length();return e>=1?s:s*e}divideAtT(e){if(this.divideAt)return this.divideAt(e);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(e){if(this.pointAt)return this.pointAt(e);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(e){if(this.tangentAt)return this.tangentAt(e);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class gt extends nl{constructor(e,t){super(),Y.isLine(e)?this.endPoint=e.end.clone().round(2):this.endPoint=O.create(e,t).round(2)}get type(){return"L"}get line(){return new Y(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(e){return this.line.closestPoint(e)}closestPointLength(e){return this.line.closestPointLength(e)}closestPointNormalizedLength(e){return this.line.closestPointNormalizedLength(e)}closestPointTangent(e){return this.line.closestPointTangent(e)}length(){return this.line.length()}divideAt(e){const t=this.line.divideAt(e);return[new gt(t[0]),new gt(t[1])]}divideAtLength(e){const t=this.line.divideAtLength(e);return[new gt(t[0]),new gt(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.line.pointAt(e)}pointAtLength(e){return this.line.pointAtLength(e)}tangentAt(e){return this.line.tangentAt(e)}tangentAtLength(e){return this.line.tangentAtLength(e)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new gt(this.end)}scale(e,t,s){return this.end.scale(e,t,s),this}rotate(e,t){return this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?this.end.translate(e,t):this.end.translate(e),this}equals(e){return this.type===e.type&&this.start.equals(e.start)&&this.end.equals(e.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const e=this.end;return`${this.type} ${e.x} ${e.y}`}}(function(n){function e(...t){const s=t.length,r=t[0];if(Y.isLine(r))return new n(r);if(O.isPointLike(r))return s===1?new n(r):t.map(o=>new n(o));if(s===2)return new n(+t[0],+t[1]);const i=[];for(let o=0;o<s;o+=2){const a=+t[o],c=+t[o+1];i.push(new n(a,c))}return i}n.create=e})(gt||(gt={}));class Hr extends nl{get end(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. MoveTo), or segment has not yet been added to a path.)");return this.subpathStartSegment.end}get type(){return"Z"}get line(){return new Y(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(e){return this.line.closestPoint(e)}closestPointLength(e){return this.line.closestPointLength(e)}closestPointNormalizedLength(e){return this.line.closestPointNormalizedLength(e)}closestPointTangent(e){return this.line.closestPointTangent(e)}length(){return this.line.length()}divideAt(e){const t=this.line.divideAt(e);return[t[1].isDifferentiable()?new gt(t[0]):this.clone(),new gt(t[1])]}divideAtLength(e){const t=this.line.divideAtLength(e);return[t[1].isDifferentiable()?new gt(t[0]):this.clone(),new gt(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.line.pointAt(e)}pointAtLength(e){return this.line.pointAtLength(e)}tangentAt(e){return this.line.tangentAt(e)}tangentAtLength(e){return this.line.tangentAtLength(e)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(e){return this.type===e.type&&this.start.equals(e.start)&&this.end.equals(e.end)}clone(){return new Hr}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}(function(n){function e(){return new n}n.create=e})(Hr||(Hr={}));class Gr extends nl{constructor(e,t){super(),this.isVisible=!1,this.isSubpathStart=!0,Y.isLine(e)||Be.isCurve(e)?this.endPoint=e.end.clone().round(2):this.endPoint=O.create(e,t).round(2)}get start(){throw new Error("Illegal access. Moveto segments should not need a start property.")}get type(){return"M"}bbox(){return null}closestPoint(){return this.end.clone()}closestPointLength(){return 0}closestPointNormalizedLength(){return 0}closestPointT(){return 1}closestPointTangent(){return null}length(){return 0}lengthAtT(){return 0}divideAt(){return[this.clone(),this.clone()]}divideAtLength(){return[this.clone(),this.clone()]}getSubdivisions(){return[]}pointAt(){return this.end.clone()}pointAtLength(){return this.end.clone()}pointAtT(){return this.end.clone()}tangentAt(){return null}tangentAtLength(){return null}tangentAtT(){return null}isDifferentiable(){return!1}scale(e,t,s){return this.end.scale(e,t,s),this}rotate(e,t){return this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?this.end.translate(e,t):this.end.translate(e),this}clone(){return new Gr(this.end)}equals(e){return this.type===e.type&&this.end.equals(e.end)}toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const e=this.end;return`${this.type} ${e.x} ${e.y}`}}(function(n){function e(...t){const s=t.length,r=t[0];if(Y.isLine(r))return new n(r);if(Be.isCurve(r))return new n(r);if(O.isPointLike(r)){if(s===1)return new n(r);const o=[];for(let a=0;a<s;a+=1)a===0?o.push(new n(t[a])):o.push(new gt(t[a]));return o}if(s===2)return new n(+t[0],+t[1]);const i=[];for(let o=0;o<s;o+=2){const a=+t[o],c=+t[o+1];o===0?i.push(new n(a,c)):i.push(new gt(a,c))}return i}n.create=e})(Gr||(Gr={}));class Wt extends nl{constructor(e,t,s,r,i,o){super(),Be.isCurve(e)?(this.controlPoint1=e.controlPoint1.clone().round(2),this.controlPoint2=e.controlPoint2.clone().round(2),this.endPoint=e.end.clone().round(2)):typeof e=="number"?(this.controlPoint1=new O(e,t).round(2),this.controlPoint2=new O(s,r).round(2),this.endPoint=new O(i,o).round(2)):(this.controlPoint1=O.create(e).round(2),this.controlPoint2=O.create(t).round(2),this.endPoint=O.create(s).round(2))}get type(){return"C"}get curve(){return new Be(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(e){return this.curve.closestPoint(e)}closestPointLength(e){return this.curve.closestPointLength(e)}closestPointNormalizedLength(e){return this.curve.closestPointNormalizedLength(e)}closestPointTangent(e){return this.curve.closestPointTangent(e)}length(){return this.curve.length()}divideAt(e,t={}){const s=this.curve.divideAt(e,t);return[new Wt(s[0]),new Wt(s[1])]}divideAtLength(e,t={}){const s=this.curve.divideAtLength(e,t);return[new Wt(s[0]),new Wt(s[1])]}divideAtT(e){const t=this.curve.divideAtT(e);return[new Wt(t[0]),new Wt(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.curve.pointAt(e)}pointAtLength(e){return this.curve.pointAtLength(e)}tangentAt(e){return this.curve.tangentAt(e)}tangentAtLength(e){return this.curve.tangentAtLength(e)}isDifferentiable(){if(!this.previousSegment)return!1;const e=this.start,t=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(s)&&s.equals(r))}scale(e,t,s){return this.controlPoint1.scale(e,t,s),this.controlPoint2.scale(e,t,s),this.end.scale(e,t,s),this}rotate(e,t){return this.controlPoint1.rotate(e,t),this.controlPoint2.rotate(e,t),this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?(this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t)):(this.controlPoint1.translate(e),this.controlPoint2.translate(e),this.end.translate(e)),this}equals(e){return this.start.equals(e.start)&&this.end.equals(e.end)&&this.controlPoint1.equals(e.controlPoint1)&&this.controlPoint2.equals(e.controlPoint2)}clone(){return new Wt(this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){const e=this.controlPoint1,t=this.controlPoint2,s=this.end;return[this.type,e.x,e.y,t.x,t.y,s.x,s.y].join(" ")}}(function(n){function e(...t){const s=t.length,r=t[0];if(Be.isCurve(r))return new n(r);if(O.isPointLike(r)){if(s===3)return new n(t[0],t[1],t[2]);const o=[];for(let a=0;a<s;a+=3)o.push(new n(t[a],t[a+1],t[a+2]));return o}if(s===6)return new n(t[0],t[1],t[2],t[3],t[4],t[5]);const i=[];for(let o=0;o<s;o+=6)i.push(new n(t[o],t[o+1],t[o+2],t[o+3],t[o+4],t[o+5]));return i}n.create=e})(Wt||(Wt={}));function sl(n,e,t){return{x:n*Math.cos(t)-e*Math.sin(t),y:n*Math.sin(t)+e*Math.cos(t)}}function Uy(n,e,t,s,r,i){const o=.3333333333333333,a=2/3;return[o*n+a*t,o*e+a*s,o*r+a*t,o*i+a*s,r,i]}function Hy(n,e,t,s,r,i,o,a,c,u){const d=Math.PI*120/180,f=Math.PI/180*(+r||0);let h=[],p,g,m,y,b;if(u)g=u[0],m=u[1],y=u[2],b=u[3];else{p=sl(n,e,-f),n=p.x,e=p.y,p=sl(a,c,-f),a=p.x,c=p.y;const j=(n-a)/2,N=(e-c)/2;let M=j*j/(t*t)+N*N/(s*s);M>1&&(M=Math.sqrt(M),t=M*t,s=M*s);const D=t*t,B=s*s,G=(i===o?-1:1)*Math.sqrt(Math.abs((D*B-D*N*N-B*j*j)/(D*N*N+B*j*j)));y=G*t*N/s+(n+a)/2,b=G*-s*j/t+(e+c)/2,g=Math.asin((e-b)/s),m=Math.asin((c-b)/s),g=n<y?Math.PI-g:g,m=a<y?Math.PI-m:m,g<0&&(g=Math.PI*2+g),m<0&&(m=Math.PI*2+m),o&&g>m&&(g-=Math.PI*2),!o&&m>g&&(m-=Math.PI*2)}let w=m-g;if(Math.abs(w)>d){const j=m,N=a,M=c;m=g+d*(o&&m>g?1:-1),a=y+t*Math.cos(m),c=b+s*Math.sin(m),h=Hy(a,c,t,s,r,0,o,N,M,[m,j,y,b])}w=m-g;const x=Math.cos(g),v=Math.sin(g),S=Math.cos(m),E=Math.sin(m),C=Math.tan(w/4),P=4/3*(t*C),A=4/3*(s*C),T=[n,e],k=[n+P*v,e-A*x],V=[a+P*E,c-A*S],R=[a,c];if(k[0]=2*T[0]-k[0],k[1]=2*T[1]-k[1],u)return[k,V,R].concat(h);{h=[k,V,R].concat(h).join().split(",");const j=[],N=h.length;for(let M=0;M<N;M+=1)j[M]=M%2?sl(+h[M-1],+h[M],f).y:sl(+h[M],+h[M+1],f).x;return j}}function gR(n){if(!n)return null;const e=`
|
|
37
37
|
\v\f\r \u2028\u2029`,t=new RegExp(`([a-z])[${e},]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[${e}]*,?[${e}]*)+)`,"ig"),s=new RegExp(`(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[${e}]*,?[${e}]*`,"ig"),r={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return n.replace(t,(o,a,c)=>{const u=[];let d=a.toLowerCase();c.replace(s,(h,p)=>(p&&u.push(+p),h)),d==="m"&&u.length>2&&(i.push([a,...u.splice(0,2)]),d="l",a=a==="m"?"l":"L");const f=r[d];for(;u.length>=f&&(i.push([a,...u.splice(0,f)]),!!f););return o}),i}function mR(n){const e=gR(n);if(!e||!e.length)return[["M",0,0]];let t=0,s=0,r=0,i=0;const o=[];for(let a=0,c=e.length;a<c;a+=1){const u=[];o.push(u);const d=e[a],f=d[0];if(f!==f.toUpperCase())switch(u[0]=f.toUpperCase(),u[0]){case"A":u[1]=d[1],u[2]=d[2],u[3]=d[3],u[4]=d[4],u[5]=d[5],u[6]=+d[6]+t,u[7]=+d[7]+s;break;case"V":u[1]=+d[1]+s;break;case"H":u[1]=+d[1]+t;break;case"M":r=+d[1]+t,i=+d[2]+s;for(let h=1,p=d.length;h<p;h+=1)u[h]=+d[h]+(h%2?t:s);break;default:for(let h=1,p=d.length;h<p;h+=1)u[h]=+d[h]+(h%2?t:s);break}else for(let h=0,p=d.length;h<p;h+=1)u[h]=d[h];switch(u[0]){case"Z":t=+r,s=+i;break;case"H":t=u[1];break;case"V":s=u[1];break;case"M":r=u[u.length-2],i=u[u.length-1],t=u[u.length-2],s=u[u.length-1];break;default:t=u[u.length-2],s=u[u.length-1];break}}return o}function yR(n){const e=mR(n),t={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function s(c,u,d){let f,h;if(!c)return["C",u.x,u.y,u.x,u.y,u.x,u.y];switch(c[0]in{T:1,Q:1}||(u.qx=null,u.qy=null),c[0]){case"M":u.X=c[1],u.Y=c[2];break;case"A":return parseFloat(c[1])===0||parseFloat(c[2])===0?["L",c[6],c[7]]:["C"].concat(Hy.apply(0,[u.x,u.y].concat(c.slice(1))));case"S":return d==="C"||d==="S"?(f=u.x*2-u.bx,h=u.y*2-u.by):(f=u.x,h=u.y),["C",f,h].concat(c.slice(1));case"T":return d==="Q"||d==="T"?(u.qx=u.x*2-u.qx,u.qy=u.y*2-u.qy):(u.qx=u.x,u.qy=u.y),["C"].concat(Uy(u.x,u.y,u.qx,u.qy,c[1],c[2]));case"Q":return u.qx=c[1],u.qy=c[2],["C"].concat(Uy(u.x,u.y,c[1],c[2],c[3],c[4]));case"H":return["L"].concat(c[1],u.y);case"V":return["L"].concat(u.x,c[1])}return c}function r(c,u){if(c[u].length>7){c[u].shift();const d=c[u];for(;d.length;)i[u]="A",u+=1,c.splice(u,0,["C"].concat(d.splice(0,6)));c.splice(u,1),a=e.length}}const i=[];let o="",a=e.length;for(let c=0;c<a;c+=1){let u="";e[c]&&(u=e[c][0]),u!=="C"&&(i[c]=u,c>0&&(o=i[c-1])),e[c]=s(e[c],t,o),i[c]!=="A"&&u==="C"&&(i[c]="C"),r(e,c);const d=e[c],f=d.length;t.x=d[f-2],t.y=d[f-1],t.bx=parseFloat(d[f-4])||t.x,t.by=parseFloat(d[f-3])||t.y}return(!e[0][0]||e[0][0]!=="M")&&e.unshift(["M",0,0]),e}function bR(n){return yR(n).map(e=>e.map(t=>typeof t=="string"?t:Ce.round(t,2))).join(",").split(",").join(" ")}class ne extends ws{constructor(e){if(super(),this.PRECISION=3,this.segments=[],Array.isArray(e))if(Y.isLine(e[0])||Be.isCurve(e[0])){let t=null;e.forEach((r,i)=>{i===0&&this.appendSegment(ne.createSegment("M",r.start)),t!=null&&!t.end.equals(r.start)&&this.appendSegment(ne.createSegment("M",r.start)),Y.isLine(r)?this.appendSegment(ne.createSegment("L",r.end)):Be.isCurve(r)&&this.appendSegment(ne.createSegment("C",r.controlPoint1,r.controlPoint2,r.end)),t=r})}else e.forEach(s=>{s.isSegment&&this.appendSegment(s)});else e!=null&&(Y.isLine(e)?(this.appendSegment(ne.createSegment("M",e.start)),this.appendSegment(ne.createSegment("L",e.end))):Be.isCurve(e)?(this.appendSegment(ne.createSegment("M",e.start)),this.appendSegment(ne.createSegment("C",e.controlPoint1,e.controlPoint2,e.end))):ze.isPolyline(e)?e.points&&e.points.length&&e.points.forEach((t,s)=>{const r=s===0?ne.createSegment("M",t):ne.createSegment("L",t);this.appendSegment(r)}):e.isSegment&&this.appendSegment(e))}get start(){const e=this.segments,t=e.length;if(t===0)return null;for(let s=0;s<t;s+=1){const r=e[s];if(r.isVisible)return r.start}return e[t-1].end}get end(){const e=this.segments,t=e.length;if(t===0)return null;for(let s=t-1;s>=0;s-=1){const r=e[s];if(r.isVisible)return r.end}return e[t-1].end}moveTo(...e){return this.appendSegment(Gr.create.call(null,...e))}lineTo(...e){return this.appendSegment(gt.create.call(null,...e))}curveTo(...e){return this.appendSegment(Wt.create.call(null,...e))}arcTo(e,t,s,r,i,o,a){const c=this.end||new O,u=typeof o=="number"?tl(c.x,c.y,e,t,s,r,i,o,a):tl(c.x,c.y,e,t,s,r,i,o.x,o.y);if(u!=null)for(let d=0,f=u.length;d<f;d+=6)this.curveTo(u[d],u[d+1],u[d+2],u[d+3],u[d+4],u[d+5]);return this}quadTo(e,t,s,r){const i=this.end||new O,o=["M",i.x,i.y];if(typeof e=="number")o.push("Q",e,t,s,r);else{const c=t;o.push("Q",e.x,e.y,c.x,c.y)}const a=ne.parse(o.join(" "));return this.appendSegment(a.segments.slice(1)),this}close(){return this.appendSegment(Hr.create())}drawPoints(e,t={}){const s=Fy(e,t),r=ne.parse(s);r&&r.segments&&this.appendSegment(r.segments)}bbox(){const e=this.segments,t=e.length;if(t===0)return null;let s;for(let i=0;i<t;i+=1){const o=e[i];if(o.isVisible){const a=o.bbox();a!=null&&(s=s?s.union(a):a)}}if(s!=null)return s;const r=e[t-1];return new F(r.end.x,r.end.y,0,0)}appendSegment(e){const t=this.segments.length;let s=t!==0?this.segments[t-1]:null,r;const i=null;if(Array.isArray(e))for(let o=0,a=e.length;o<a;o+=1){const c=e[o];r=this.prepareSegment(c,s,i),this.segments.push(r),s=r}else e!=null&&e.isSegment&&(r=this.prepareSegment(e,s,i),this.segments.push(r));return this}insertSegment(e,t){const s=this.segments.length;if(e<0&&(e=s+e+1),e>s||e<0)throw new Error("Index out of range.");let r,i=null,o=null;if(s!==0&&(e>=1?(i=this.segments[e-1],o=i.nextSegment):(i=null,o=this.segments[0])),!Array.isArray(t))r=this.prepareSegment(t,i,o),this.segments.splice(e,0,r);else for(let a=0,c=t.length;a<c;a+=1){const u=t[a];r=this.prepareSegment(u,i,o),this.segments.splice(e+a,0,r),i=r}return this}removeSegment(e){const t=this.fixIndex(e),s=this.segments.splice(t,1)[0],r=s.previousSegment,i=s.nextSegment;return r&&(r.nextSegment=i),i&&(i.previousSegment=r),s.isSubpathStart&&i&&this.updateSubpathStartSegment(i),s}replaceSegment(e,t){const s=this.fixIndex(e);let r;const i=this.segments[s];let o=i.previousSegment;const a=i.nextSegment;let c=i.isSubpathStart;if(!Array.isArray(t))r=this.prepareSegment(t,o,a),this.segments.splice(s,1,r),c&&r.isSubpathStart&&(c=!1);else{this.segments.splice(e,1);for(let u=0,d=t.length;u<d;u+=1){const f=t[u];r=this.prepareSegment(f,o,a),this.segments.splice(e+u,0,r),o=r,c&&r.isSubpathStart&&(c=!1)}}c&&a&&this.updateSubpathStartSegment(a)}getSegment(e){const t=this.fixIndex(e);return this.segments[t]}fixIndex(e){const t=this.segments.length;if(t===0)throw new Error("Path has no segments.");let s=e;for(;s<0;)s=t+s;if(s>=t||s<0)throw new Error("Index out of range.");return s}segmentAt(e,t={}){const s=this.segmentIndexAt(e,t);return s?this.getSegment(s):null}segmentAtLength(e,t={}){const s=this.segmentIndexAtLength(e,t);return s?this.getSegment(s):null}segmentIndexAt(e,t={}){if(this.segments.length===0)return null;const s=Ce.clamp(e,0,1),r=this.getOptions(t),o=this.length(r)*s;return this.segmentIndexAtLength(o,r)}segmentIndexAtLength(e,t={}){const s=this.segments.length;if(s===0)return null;let r=!0;e<0&&(r=!1,e=-e);const i=this.getPrecision(t),o=this.getSubdivisions(t);let a=0,c=null;for(let u=0;u<s;u+=1){const d=r?u:s-1-u,f=this.segments[d],h=o[d],p=f.length({precision:i,subdivisions:h});if(f.isVisible){if(e<=a+p)return d;c=d}a+=p}return c}getSegmentSubdivisions(e={}){const t=this.getPrecision(e),s=[];for(let r=0,i=this.segments.length;r<i;r+=1){const a=this.segments[r].getSubdivisions({precision:t});s.push(a)}return s}updateSubpathStartSegment(e){let t=e.previousSegment,s=e;for(;s&&!s.isSubpathStart;)t!=null?s.subpathStartSegment=t.subpathStartSegment:s.subpathStartSegment=null,t=s,s=s.nextSegment}prepareSegment(e,t,s){e.previousSegment=t,e.nextSegment=s,t!=null&&(t.nextSegment=e),s!=null&&(s.previousSegment=e);let r=e;return e.isSubpathStart&&(e.subpathStartSegment=e,r=s),r!=null&&this.updateSubpathStartSegment(r),e}closestPoint(e,t={}){const s=this.closestPointT(e,t);return s?this.pointAtT(s):null}closestPointLength(e,t={}){const s=this.getOptions(t),r=this.closestPointT(e,s);return r?this.lengthAtT(r,s):0}closestPointNormalizedLength(e,t={}){const s=this.getOptions(t),r=this.closestPointLength(e,s);if(r===0)return 0;const i=this.length(s);return i===0?0:r/i}closestPointT(e,t={}){if(this.segments.length===0)return null;const s=this.getPrecision(t),r=this.getSubdivisions(t);let i,o=1/0;for(let a=0,c=this.segments.length;a<c;a+=1){const u=this.segments[a],d=r[a];if(u.isVisible){const f=u.closestPointT(e,{precision:s,subdivisions:d}),h=u.pointAtT(f),p=Ce.squaredLength(h,e);p<o&&(i={segmentIndex:a,value:f},o=p)}}return i||{segmentIndex:this.segments.length-1,value:1}}closestPointTangent(e,t={}){if(this.segments.length===0)return null;const s=this.getPrecision(t),r=this.getSubdivisions(t);let i,o=1/0;for(let a=0,c=this.segments.length;a<c;a+=1){const u=this.segments[a],d=r[a];if(u.isDifferentiable()){const f=u.closestPointT(e,{precision:s,subdivisions:d}),h=u.pointAtT(f),p=Ce.squaredLength(h,e);p<o&&(i=u.tangentAtT(f),o=p)}}return i||null}containsPoint(e,t={}){const s=this.toPolylines(t);if(!s)return!1;let r=0;for(let i=0,o=s.length;i<o;i+=1)s[i].containsPoint(e)&&(r+=1);return r%2===1}pointAt(e,t={}){if(this.segments.length===0)return null;if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();const s=this.getOptions(t),i=this.length(s)*e;return this.pointAtLength(i,s)}pointAtLength(e,t={}){if(this.segments.length===0)return null;if(e===0)return this.start.clone();let s=!0;e<0&&(s=!1,e=-e);const r=this.getPrecision(t),i=this.getSubdivisions(t);let o,a=0;for(let u=0,d=this.segments.length;u<d;u+=1){const f=s?u:d-1-u,h=this.segments[f],p=i[f],g=h.length({precision:r,subdivisions:p});if(h.isVisible){if(e<=a+g)return h.pointAtLength((s?1:-1)*(e-a),{precision:r,subdivisions:p});o=h}a+=g}return o?s?o.end:o.start:this.segments[this.segments.length-1].end.clone()}pointAtT(e){const t=this.segments,s=t.length;if(s===0)return null;const r=e.segmentIndex;if(r<0)return t[0].pointAtT(0);if(r>=s)return t[s-1].pointAtT(1);const i=Ce.clamp(e.value,0,1);return t[r].pointAtT(i)}divideAt(e,t={}){if(this.segments.length===0)return null;const s=Ce.clamp(e,0,1),r=this.getOptions(t),o=this.length(r)*s;return this.divideAtLength(o,r)}divideAtLength(e,t={}){if(this.segments.length===0)return null;let s=!0;e<0&&(s=!1,e=-e);const r=this.getPrecision(t),i=this.getSubdivisions(t);let o=0,a,c,u,d,f;for(let S=0,E=this.segments.length;S<E;S+=1){const C=s?S:E-1-S,P=this.getSegment(C),A=i[C],T={precision:r,subdivisions:A},k=P.length(T);if(P.isDifferentiable()&&(u=P,d=C,e<=o+k)){c=C,a=P.divideAtLength((s?1:-1)*(e-o),T);break}o+=k}if(!u)return null;a||(c=d,f=s?1:0,a=u.divideAtT(f));const h=this.clone(),p=c;h.replaceSegment(p,a);const g=p;let m=p+1,y=p+2;a[0].isDifferentiable()||(h.removeSegment(g),m-=1,y-=1);const b=h.getSegment(m).start;h.insertSegment(m,ne.createSegment("M",b)),y+=1,a[1].isDifferentiable()||(h.removeSegment(y-1),y-=1);const w=y-g-1;for(let S=y,E=h.segments.length;S<E;S+=1){const C=this.getSegment(S-w),P=h.getSegment(S);if(P.type==="Z"&&!C.subpathStartSegment.end.equals(P.subpathStartSegment.end)){const A=ne.createSegment("L",C.end);h.replaceSegment(S,A)}}const x=new ne(h.segments.slice(0,m)),v=new ne(h.segments.slice(m));return[x,v]}intersectsWithLine(e,t={}){const s=this.toPolylines(t);if(s==null)return null;let r=null;for(let i=0,o=s.length;i<o;i+=1){const a=s[i],c=e.intersect(a);c&&(r==null&&(r=[]),Array.isArray(c)?r.push(...c):r.push(c))}return r}isDifferentiable(){for(let e=0,t=this.segments.length;e<t;e+=1)if(this.segments[e].isDifferentiable())return!0;return!1}isValid(){const e=this.segments;return e.length===0||e[0].type==="M"}length(e={}){if(this.segments.length===0)return 0;const t=this.getSubdivisions(e);let s=0;for(let r=0,i=this.segments.length;r<i;r+=1){const o=this.segments[r],a=t[r];s+=o.length({subdivisions:a})}return s}lengthAtT(e,t={}){const s=this.segments.length;if(s===0)return 0;let r=e.segmentIndex;if(r<0)return 0;let i=Ce.clamp(e.value,0,1);r>=s&&(r=s-1,i=1);const o=this.getPrecision(t),a=this.getSubdivisions(t);let c=0;for(let f=0;f<r;f+=1){const h=this.segments[f],p=a[f];c+=h.length({precision:o,subdivisions:p})}const u=this.segments[r],d=a[r];return c+=u.lengthAtT(i,{precision:o,subdivisions:d}),c}tangentAt(e,t={}){if(this.segments.length===0)return null;const s=Ce.clamp(e,0,1),r=this.getOptions(t),o=this.length(r)*s;return this.tangentAtLength(o,r)}tangentAtLength(e,t={}){if(this.segments.length===0)return null;let s=!0;e<0&&(s=!1,e=-e);const r=this.getPrecision(t),i=this.getSubdivisions(t);let o,a=0;for(let c=0,u=this.segments.length;c<u;c+=1){const d=s?c:u-1-c,f=this.segments[d],h=i[d],p=f.length({precision:r,subdivisions:h});if(f.isDifferentiable()){if(e<=a+p)return f.tangentAtLength((s?1:-1)*(e-a),{precision:r,subdivisions:h});o=f}a+=p}if(o){const c=s?1:0;return o.tangentAtT(c)}return null}tangentAtT(e){const t=this.segments.length;if(t===0)return null;const s=e.segmentIndex;if(s<0)return this.segments[0].tangentAtT(0);if(s>=t)return this.segments[t-1].tangentAtT(1);const r=Ce.clamp(e.value,0,1);return this.segments[s].tangentAtT(r)}getPrecision(e={}){return e.precision==null?this.PRECISION:e.precision}getSubdivisions(e={}){if(e.segmentSubdivisions==null){const t=this.getPrecision(e);return this.getSegmentSubdivisions({precision:t})}return e.segmentSubdivisions}getOptions(e={}){const t=this.getPrecision(e),s=this.getSubdivisions(e);return{precision:t,segmentSubdivisions:s}}toPoints(e={}){const t=this.segments,s=t.length;if(s===0)return null;const r=this.getSubdivisions(e),i=[];let o=[];for(let a=0;a<s;a+=1){const c=t[a];if(c.isVisible){const u=r[a];u.length>0?u.forEach(d=>o.push(d.start)):o.push(c.start)}else o.length>0&&(o.push(t[a-1].end),i.push(o),o=[])}return o.length>0&&(o.push(this.end),i.push(o)),i}toPolylines(e={}){const t=this.toPoints(e);return t?t.map(s=>new ze(s)):null}scale(e,t,s){return this.segments.forEach(r=>r.scale(e,t,s)),this}rotate(e,t){return this.segments.forEach(s=>s.rotate(e,t)),this}translate(e,t){return typeof e=="number"?this.segments.forEach(s=>s.translate(e,t)):this.segments.forEach(s=>s.translate(e)),this}clone(){const e=new ne;return this.segments.forEach(t=>e.appendSegment(t.clone())),e}equals(e){if(e==null)return!1;const t=this.segments,s=e.segments,r=t.length;if(s.length!==r)return!1;for(let i=0;i<r;i+=1){const o=t[i],a=s[i];if(o.type!==a.type||!o.equals(a))return!1}return!0}toJSON(){return this.segments.map(e=>e.toJSON())}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map(e=>e.serialize()).join(" ")}toString(){return this.serialize()}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPath=e})(ne||(ne={})),function(n){function e(s){if(!s)return new n;const r=new n,i=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,o=n.normalize(s).match(i);if(o!=null)for(let a=0,c=o.length;a<c;a+=1){const u=o[a],d=/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g,f=u.match(d);if(f!=null){const h=f[0],p=f.slice(1).map(m=>+m),g=t.call(null,h,...p);r.appendSegment(g)}}return r}n.parse=e;function t(s,...r){if(s==="M")return Gr.create.call(null,...r);if(s==="L")return gt.create.call(null,...r);if(s==="C")return Wt.create.call(null,...r);if(s==="z"||s==="Z")return Hr.create();throw new Error(`Invalid path segment type "${s}"`)}n.createSegment=t}(ne||(ne={})),function(n){n.normalize=bR,n.isValid=hR,n.drawArc=pR,n.drawPoints=Fy,n.arcToCurves=tl}(ne||(ne={}));class Fe{constructor(e){this.options=Object.assign({},e),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(e,t,s=!1){if(typeof e=="object"){Object.entries(e).forEach(([o,a])=>{this.register(o,a,t)});return}this.exist(e)&&!s&&!gs.isApplyingHMR()&&this.onDuplicated(e);const r=this.options.process,i=r?ee(r,this,e,t):t;return this.data[e]=i,i}unregister(e){const t=e?this.data[e]:null;return delete this.data[e],t}get(e){return e?this.data[e]:null}exist(e){return e?this.data[e]!=null:!1}onDuplicated(e){try{throw this.options.onConflict&&ee(this.options.onConflict,this,e),new Error(`${ia(this.options.type)} with name '${e}' already registered.`)}catch(t){throw t}}onNotFound(e,t){throw new Error(this.getSpellingSuggestion(e,t))}getSpellingSuggestion(e,t){const s=this.getSpellingSuggestionForName(e),r=t?`${t} ${MP(this.options.type)}`:this.options.type;return`${ia(r)} with name '${e}' does not exist.${s?` Did you mean '${s}'?`:""}`}getSpellingSuggestionForName(e){return bD(e,Object.keys(this.data),t=>t)}}(function(n){function e(t){return new n(t)}n.create=e})(Fe||(Fe={}));const wR=Object.freeze(Object.defineProperty({__proto__:null,dot:{color:"#aaaaaa",thickness:1,markup:"rect",update(n,e){const t=e.thickness*e.sx,s=e.thickness*e.sy;fe(n,{width:t,height:s,rx:t,ry:s,fill:e.color})}},doubleMesh:[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(n,e){let t;const s=e.width,r=e.height,i=e.thickness;s-i>=0&&r-i>=0?t=["M",s,0,"H0 M0 0 V0",r].join(" "):t="M 0 0 0 0",fe(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(n,e){let t;const s=e.factor||1,r=e.width*s,i=e.height*s,o=e.thickness;r-o>=0&&i-o>=0?t=["M",r,0,"H0 M0 0 V0",i].join(" "):t="M 0 0 0 0",e.width=r,e.height=i,fe(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}}],fixedDot:{color:"#aaaaaa",thickness:1,markup:"rect",update(n,e){const t=e.sx<=1?e.thickness*e.sx:e.thickness;fe(n,{width:t,height:t,rx:t,ry:t,fill:e.color})}},mesh:{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(n,e){let t;const s=e.width,r=e.height,i=e.thickness;s-i>=0&&r-i>=0?t=["M",s,0,"H0 M0 0 V0",r].join(" "):t="M 0 0 0 0",fe(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}}},Symbol.toStringTag,{value:"Module"}));class xs{constructor(){this.patterns={},this.root=oe.create(qa(),{width:"100%",height:"100%"},[fn("defs")]).node}add(e,t){const s=this.root.childNodes[0];s&&s.appendChild(t),this.patterns[e]=t,oe.create("rect",{width:"100%",height:"100%",fill:`url(#${e})`}).appendTo(this.root)}get(e){return this.patterns[e]}has(e){return this.patterns[e]!=null}}(function(n){n.presets=wR,n.registry=Fe.create({type:"grid"}),n.registry.register(n.presets,!0)})(xs||(xs={}));const Gy=function(n){const e=document.createElement("canvas"),t=n.width,s=n.height;e.width=t*2,e.height=s;const r=e.getContext("2d");return r.drawImage(n,0,0,t,s),r.translate(2*t,0),r.scale(-1,1),r.drawImage(n,0,0,t,s),e},Wy=function(n){const e=document.createElement("canvas"),t=n.width,s=n.height;e.width=t,e.height=s*2;const r=e.getContext("2d");return r.drawImage(n,0,0,t,s),r.translate(0,2*s),r.scale(1,-1),r.drawImage(n,0,0,t,s),e},Yy=function(n){const e=document.createElement("canvas"),t=n.width,s=n.height;e.width=2*t,e.height=2*s;const r=e.getContext("2d");return r.drawImage(n,0,0,t,s),r.setTransform(-1,0,0,-1,e.width,e.height),r.drawImage(n,0,0,t,s),r.setTransform(-1,0,0,1,e.width,0),r.drawImage(n,0,0,t,s),r.setTransform(1,0,0,-1,0,e.height),r.drawImage(n,0,0,t,s),e},xR=Object.freeze(Object.defineProperty({__proto__:null,flipX:Gy,flipXY:Yy,flipY:Wy,watermark:function(n,e){const t=n.width,s=n.height,r=document.createElement("canvas");r.width=t*3,r.height=s*3;const i=r.getContext("2d"),o=e.angle!=null?-e.angle:-20,a=ye.toRad(o),c=r.width/4,u=r.height/4;for(let d=0;d<4;d+=1)for(let f=0;f<4;f+=1)(d+f)%2>0&&(i.setTransform(1,0,0,1,(2*d-1)*c,(2*f-1)*u),i.rotate(a),i.drawImage(n,-t/2,-s/2,t,s));return r}},Symbol.toStringTag,{value:"Module"}));var lo;(function(n){n.presets=Object.assign({},xR),n.presets["flip-x"]=Gy,n.presets["flip-y"]=Wy,n.presets["flip-xy"]=Yy,n.registry=Fe.create({type:"background pattern"}),n.registry.register(n.presets,!0)})(lo||(lo={}));function rd(n,e){return n??e}function ot(n,e){return n!=null&&Number.isFinite(n)?n:e}function vR(n={}){const e=rd(n.color,"blue"),t=ot(n.width,1),s=ot(n.margin,2),r=ot(n.opacity,1),i=s,o=s+t;return`
|
|
@@ -480,7 +480,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
|
|
|
480
480
|
background-color: #6a6b8a;
|
|
481
481
|
}
|
|
482
482
|
`;$.prototype.isSelectionEnabled=function(){const n=this.getPlugin("selection");return n?n.isEnabled():!1},$.prototype.enableSelection=function(){const n=this.getPlugin("selection");return n&&n.enable(),this},$.prototype.disableSelection=function(){const n=this.getPlugin("selection");return n&&n.disable(),this},$.prototype.toggleSelection=function(n){const e=this.getPlugin("selection");return e&&e.toggleEnabled(n),this},$.prototype.isMultipleSelection=function(){const n=this.getPlugin("selection");return n?n.isMultipleSelection():!1},$.prototype.enableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.enableMultipleSelection(),this},$.prototype.disableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.disableMultipleSelection(),this},$.prototype.toggleMultipleSelection=function(n){const e=this.getPlugin("selection");return e&&e.toggleMultipleSelection(n),this},$.prototype.isSelectionMovable=function(){const n=this.getPlugin("selection");return n?n.isSelectionMovable():!1},$.prototype.enableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.enableSelectionMovable(),this},$.prototype.disableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.disableSelectionMovable(),this},$.prototype.toggleSelectionMovable=function(n){const e=this.getPlugin("selection");return e&&e.toggleSelectionMovable(n),this},$.prototype.isRubberbandEnabled=function(){const n=this.getPlugin("selection");return n?n.isRubberbandEnabled():!1},$.prototype.enableRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableRubberband(),this},$.prototype.disableRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableRubberband(),this},$.prototype.toggleRubberband=function(n){const e=this.getPlugin("selection");return e&&e.toggleRubberband(n),this},$.prototype.isStrictRubberband=function(){const n=this.getPlugin("selection");return n?n.isStrictRubberband():!1},$.prototype.enableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableStrictRubberband(),this},$.prototype.disableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableStrictRubberband(),this},$.prototype.toggleStrictRubberband=function(n){const e=this.getPlugin("selection");return e&&e.toggleStrictRubberband(n),this},$.prototype.setRubberbandModifiers=function(n){const e=this.getPlugin("selection");return e&&e.setRubberbandModifiers(n),this},$.prototype.setSelectionFilter=function(n){const e=this.getPlugin("selection");return e&&e.setSelectionFilter(n),this},$.prototype.setSelectionDisplayContent=function(n){const e=this.getPlugin("selection");return e&&e.setSelectionDisplayContent(n),this},$.prototype.isSelectionEmpty=function(){const n=this.getPlugin("selection");return n?n.isEmpty():!0},$.prototype.cleanSelection=function(n){const e=this.getPlugin("selection");return e&&e.clean(n),this},$.prototype.resetSelection=function(n,e){const t=this.getPlugin("selection");return t&&t.reset(n,e),this},$.prototype.getSelectedCells=function(){const n=this.getPlugin("selection");return n?n.getSelectedCells():[]},$.prototype.getSelectedCellCount=function(){const n=this.getPlugin("selection");return n?n.getSelectedCellCount():0},$.prototype.isSelected=function(n){const e=this.getPlugin("selection");return e?e.isSelected(n):!1},$.prototype.select=function(n,e){const t=this.getPlugin("selection");return t&&t.select(n,e),this},$.prototype.unselect=function(n,e){const t=this.getPlugin("selection");return t&&t.unselect(n,e),this};var vj=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class li extends Te{get rubberbandDisabled(){return this.options.enabled!==!0||this.options.rubberband!==!0}get disabled(){return this.options.enabled!==!0}get length(){return this.selectionImpl.length}get cells(){return this.selectionImpl.cells}constructor(e={}){super(),this.name="selection",this.movedMap=new WeakMap,this.unselectMap=new WeakMap,this.options=Object.assign(Object.assign({enabled:!0},li.defaultOptions),e),Fr(this.name,xj)}init(e){this.graph=e,this.selectionImpl=new o0(Object.assign(Object.assign({},this.options),{graph:e})),this.setup(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(e){return e!=null?e!==this.isEnabled()&&(e?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}isMultipleSelection(){return this.isMultiple()}enableMultipleSelection(){return this.enableMultiple(),this}disableMultipleSelection(){return this.disableMultiple(),this}toggleMultipleSelection(e){return e!=null?e!==this.isMultipleSelection()&&(e?this.enableMultipleSelection():this.disableMultipleSelection()):this.isMultipleSelection()?this.disableMultipleSelection():this.enableMultipleSelection(),this}isSelectionMovable(){return this.options.movable!==!1}enableSelectionMovable(){return this.selectionImpl.options.movable=!0,this}disableSelectionMovable(){return this.selectionImpl.options.movable=!1,this}toggleSelectionMovable(e){return e!=null?e!==this.isSelectionMovable()&&(e?this.enableSelectionMovable():this.disableSelectionMovable()):this.isSelectionMovable()?this.disableSelectionMovable():this.enableSelectionMovable(),this}isRubberbandEnabled(){return!this.rubberbandDisabled}enableRubberband(){return this.rubberbandDisabled&&(this.options.rubberband=!0),this}disableRubberband(){return this.rubberbandDisabled||(this.options.rubberband=!1),this}toggleRubberband(e){return e!=null?e!==this.isRubberbandEnabled()&&(e?this.enableRubberband():this.disableRubberband()):this.isRubberbandEnabled()?this.disableRubberband():this.enableRubberband(),this}isStrictRubberband(){return this.selectionImpl.options.strict===!0}enableStrictRubberband(){return this.selectionImpl.options.strict=!0,this}disableStrictRubberband(){return this.selectionImpl.options.strict=!1,this}toggleStrictRubberband(e){return e!=null?e!==this.isStrictRubberband()&&(e?this.enableStrictRubberband():this.disableStrictRubberband()):this.isStrictRubberband()?this.disableStrictRubberband():this.enableStrictRubberband(),this}setRubberbandModifiers(e){this.setModifiers(e)}setSelectionFilter(e){return this.setFilter(e),this}setSelectionDisplayContent(e){return this.setContent(e),this}isEmpty(){return this.length<=0}clean(e={}){return this.selectionImpl.clean(e),this}reset(e,t={}){return this.selectionImpl.reset(e?this.getCells(e):[],t),this}getSelectedCells(){return this.cells}getSelectedCellCount(){return this.length}isSelected(e){return this.selectionImpl.isSelected(e)}select(e,t={}){const s=this.getCells(e);return s.length&&(this.isMultiple()?this.selectionImpl.select(s,t):this.reset(s.slice(0,1),t)),this}unselect(e,t={}){return this.selectionImpl.unselect(this.getCells(e),t),this}setup(){this.selectionImpl.on("*",(e,t)=>{this.trigger(e,t),this.graph.trigger(e,t)})}startListening(){this.graph.on("blank:mousedown",this.onBlankMouseDown,this),this.graph.on("blank:click",this.onBlankClick,this),this.graph.on("cell:mousemove",this.onCellMouseMove,this),this.graph.on("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.on("box:mousedown",this.onBoxMouseDown,this)}stopListening(){this.graph.off("blank:mousedown",this.onBlankMouseDown,this),this.graph.off("blank:click",this.onBlankClick,this),this.graph.off("cell:mousemove",this.onCellMouseMove,this),this.graph.off("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.off("box:mousedown",this.onBoxMouseDown,this)}onBlankMouseDown({e}){if(!this.allowBlankMouseDown(e))return;const t=this.graph.panning.allowPanning(e,!0),s=this.graph.getPlugin("scroller"),r=s&&s.allowPanning(e,!0);(this.allowRubberband(e,!0)||this.allowRubberband(e)&&!r&&!t)&&this.startRubberband(e)}allowBlankMouseDown(e){const t=this.options.eventTypes;return(t==null?void 0:t.includes("leftMouseDown"))&&e.button===0||(t==null?void 0:t.includes("mouseWheelDown"))&&e.button===1}onBlankClick(){this.clean()}allowRubberband(e,t){return!this.rubberbandDisabled&&bs.isMatch(e,this.options.modifiers,t)}allowMultipleSelection(e){return this.isMultiple()&&bs.isMatch(e,this.options.multipleSelectionModifiers)}onCellMouseMove({cell:e}){this.movedMap.set(e,!0)}onCellMouseUp({e,cell:t}){const s=this.options;let r=this.disabled;!r&&this.movedMap.has(t)&&(r=s.selectCellOnMoved===!1,r||(r=s.selectNodeOnMoved===!1&&t.isNode()),r||(r=s.selectEdgeOnMoved===!1&&t.isEdge())),r||(this.allowMultipleSelection(e)?this.unselectMap.has(t)?this.unselectMap.delete(t):this.isSelected(t)?this.unselect(t):this.select(t):this.reset(t)),this.movedMap.delete(t)}onBoxMouseDown({e,cell:t}){this.disabled||this.allowMultipleSelection(e)&&(this.unselect(t),this.unselectMap.set(t,!0))}getCells(e){return(Array.isArray(e)?e:[e]).map(t=>typeof t=="string"?this.graph.getCellById(t):t).filter(t=>t!=null)}startRubberband(e){return this.rubberbandDisabled||this.selectionImpl.startSelecting(e),this}isMultiple(){return this.options.multiple!==!1}enableMultiple(){return this.options.multiple=!0,this}disableMultiple(){return this.options.multiple=!1,this}setModifiers(e){return this.options.modifiers=e,this}setContent(e){return this.selectionImpl.setContent(e),this}setFilter(e){return this.selectionImpl.setFilter(e),this}dispose(){this.stopListening(),this.off(),this.selectionImpl.dispose(),Ur(this.name)}}vj([Te.dispose()],li.prototype,"dispose",null),function(n){n.defaultOptions={rubberband:!1,rubberNode:!0,rubberEdge:!1,pointerEvents:"auto",multiple:!0,multipleSelectionModifiers:["ctrl","meta"],movable:!0,strict:!1,selectCellOnMoved:!1,selectNodeOnMoved:!1,selectEdgeOnMoved:!1,following:!0,content:null,eventTypes:["leftMouseDown","mouseWheelDown"]}}(li||(li={}));const xd="line",vd="pipe",Cd="arrow",Cj=[{label:"直线",value:xd},{label:"管道",value:vd},{label:"箭头",value:Cd}],Cl=[{label:"Block",value:"block"},{label:"Classic",value:"classic"},{label:"Diamond",value:"diamond"},{label:"Cross",value:"cross"},{label:"Async",value:"async"},{label:"Circle",value:"circle"},{label:"CirclePlus",value:"circlePlus"},{label:"Ellipse",value:"ellipse"}],ci="stop",a0=[{label:"停止",value:ci},{label:"正向",value:"forward-pipe"},{label:"反向",value:"reverse-pipe"}],nr="flashing",ui="arrowForward",Sd="arrowBackward",Sj=[{label:"正向",value:ui},{label:"反向",value:Sd}],Ej=()=>new tr({resizing:{enabled:!0,preserveAspectRatio:!1},rotating:!0}),Oj=()=>new t0,Mj=()=>new s0,Pj=()=>new r0({format(n){return n.replace(/\s/g,"").replace("cmd","command")}}),Nj=["tools","ports"],Aj=()=>new ai({beforeAddCommand:(n,e)=>{if(Nj.includes(e.key))return!1}}),_j=()=>new li({enabled:!0,multiple:!0,rubberband:!0,modifiers:["alt"],showNodeSelectionBox:!0}),Tj=n=>{const e=n.getSelectedCells();e.length&&n.removeCells(e)},kj=n=>{const e=n.getSelectedCells();e.length&&n.copy(e)},Vj=n=>{if(!n.isClipboardEmpty()){const e=n.paste({offset:32});n.cleanSelection(),n.select(e)}},Dj=n=>{n.canUndo()&&n.undo()},Rj=n=>{n.canRedo()&&n.redo()},Lj=n=>{n.addTools([{name:"vertices",args:{snapRadius:3,attrs:{r:3,fill:"#239edd",cursor:"move","stroke-width":2},modifiers:["shift"]}},{name:"segments",args:{attrs:{stroke:"#239edd",strokeWidth:2,strokeDasharray:"5 5"}}},{name:"source-arrowhead",args:{attrs:{stroke:"#239edd"}}},{name:"target-arrowhead",args:{attrs:{stroke:"#239edd"}}}])},l0=()=>{var n,e;return(n=Qe.attrs)!=null&&n.pipe?"pipe":(e=Qe.attrs)!=null&&e.arrow?"arrow":"line"},c0=n=>n!=="none"?n+" 30s infinite linear":"",Ed=()=>Math.random(),u0="--",Sl=/\$\{(.*?)\}/g,Ij={min:0,max:0,direction:ci},Bj={min:0,max:0,animation:nr,direction:ui,display:"block"},jj={class:"control"},$j={class:"row-column"},zj={class:"row-column"},d0=Ut(Object.assign({name:"text-control"},{__name:"index",props:{payload:Object},setup(n){var D,B,G,se;const e=n,t=l.ref((D=e.payload.attrs.label)!=null&&D.textAnchor?"0":"1"),s=l.ref([]),r=l.ref([]),i=async()=>{s.value=await Nu()},o=l.ref();let a=l.reactive({});const c=()=>{a=s.value.find(I=>I.deviceCode===o.value),a&&u()},u=async()=>{r.value=await Au(a.deviceCode)},d=I=>I.replace(Sl,u0),f=I=>{_k.confirm(`是否确定要添加${a.deviceName}-${I.name}?
|
|
483
|
-
添加后为:--${I.unit??""}`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const _=I.unit??"",H=e.payload.data.content;e.payload.data.content=h.value=H+"${"+a.deviceName+"."+I.name+"}"+_;const K=H.match(Sl),q=(K==null?void 0:K.length)||0;e.payload.data.fields.push({index:q,deviceName:a.deviceName,deviceCode:a.deviceCode,field:I.dataField}),e.payload.label=d(e.payload.data.content)})},h=l.ref(e.payload.data.content||null),p=l.ref(e.payload.attrs.body.fill||null),g=l.ref(e.payload.attrs.body.stroke||null),m=l.ref(e.payload.attrs.body.strokeWidth||null),y=l.ref(e.payload.attrs.body.rx||null),b=l.ref(e.payload.attrs.body.ry||null),w=l.ref(e.payload.attrs.text.fill||null),x=l.ref(e.payload.attrs.text.fontSize||null),v=l.ref(((B=e.payload.attrs.label)==null?void 0:B.textAnchor)||null),S=l.ref(((G=e.payload.attrs.label)==null?void 0:G.x)||null),E=l.ref(((se=e.payload.attrs.label)==null?void 0:se.y)||null),C=()=>{e.payload.attr("body/fill",p.value),e.payload.attr("body/stroke",g.value),e.payload.attr("body/strokeWidth",m.value),e.payload.attr("body/rx",y.value),e.payload.attr("body/ry",b.value),e.payload.attr("text/fill",w.value),e.payload.attr("text/fontSize",x.value),e.payload.attr("label/textAnchor",v.value),e.payload.attr("label/x",S.value),e.payload.attr("label/y",E.value)},P=l.ref(null),A=()=>{if(e.payload.data.content.length>h.value.length&&e.payload.data.content.endsWith("}")){const I=e.payload.data.content.match(Sl);if(I){const _=I.length-1;e.payload.data.fields.splice(_,1),h.value=e.payload.data.content.substring(0,e.payload.data.content.lastIndexOf("${"))}}e.payload.data.content=h.value,e.payload.label=d(h.value)},T=()=>{if(P.value){const I=P.value.$refs.textarea;I.focus();const _=h.value.length;I.setSelectionRange(_,_)}},k=l.ref([]),V=()=>{k.value=JSON.parse(JSON.stringify(e.payload.getPorts().map(I=>({id:I.id,attrs:I.attrs,args:{x:Number(I.args.x.replace("%","")),y:Number(I.args.y.replace("%",""))}}))))},R=()=>{const I=_u;I.attrs.text.text=`${e.payload.getPorts().length+1}`,I.args.x="50%",I.args.y="50%",e.payload.addPorts([{group:"ports",...I}]),V()},j=()=>{Ki("#drawing-board",!0)},N=(I,_,H)=>{e.payload.portProp(I,"args/"+_,H+"%"),V()},M=I=>{e.payload.removePort(I),V()};return l.onMounted(()=>{V(),i(),document.addEventListener("selectionchange",()=>{document.activeElement.tagName==="TEXTAREA"&&T()})}),(I,_)=>{const H=l.resolveComponent("el-input"),K=l.resolveComponent("el-alert"),q=l.resolveComponent("el-option"),re=l.resolveComponent("el-select"),Z=l.resolveComponent("el-table-column"),ge=l.resolveComponent("el-table"),te=l.resolveComponent("el-collapse-item"),le=l.resolveComponent("el-col"),bt=l.resolveComponent("el-color-picker"),st=l.resolveComponent("el-row"),Pt=l.resolveComponent("el-input-number"),Q=l.resolveComponent("el-button"),sr=l.resolveComponent("el-slider"),rr=l.resolveComponent("el-icon"),hi=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",jj,[l.createVNode(hi,{modelValue:t.value,"onUpdate:modelValue":_[12]||(_[12]=ae=>t.value=ae),accordion:""},{default:l.withCtx(()=>[n.payload.data.type==="text"?(l.openBlock(),l.createBlock(te,{key:0,title:"文本内容",name:"0"},{default:l.withCtx(()=>[l.createVNode(H,{ref_key:"inputRef",ref:P,type:"textarea",modelValue:h.value,"onUpdate:modelValue":_[0]||(_[0]=ae=>h.value=ae),onInput:A,onFocus:T,rows:10},null,8,["modelValue"]),l.createVNode(K,{type:"info",title:"提示",description:"请先选择设备,再选择字段,最后点击确定按钮,即可绑定设备数据。绑定完成后会由 $<> 进行包裹!",style:{"margin-top":"20px"}}),l.createVNode(re,{modelValue:o.value,"onUpdate:modelValue":_[1]||(_[1]=ae=>o.value=ae),placeholder:"请选择设备",onChange:c,filterable:"",clearable:"",style:{"margin-top":"20px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,ae=>(l.openBlock(),l.createBlock(q,{key:ae.deviceCode,label:ae.deviceName,value:ae.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.createVNode(ge,{data:r.value,border:"",style:{"margin-top":"20px"},size:"small",height:"500",onRowClick:f},{default:l.withCtx(()=>[l.createVNode(Z,{type:"index",label:"序号",width:"50",align:"center"}),l.createVNode(Z,{prop:"name",label:"字段名称","show-overflow-tooltip":""}),l.createVNode(Z,{prop:"dataField",label:"字段编码","show-overflow-tooltip":""}),l.createVNode(Z,{prop:"unit",label:"单位",width:"50"})]),_:1},8,["data"])]),_:1})):l.createCommentVNode("",!0),l.createVNode(te,{title:"图形设置",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",$j,[l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[13]||(_[13]=[l.createElementVNode("div",{class:"row-label"},"背景颜色",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(bt,{modelValue:p.value,"onUpdate:modelValue":_[2]||(_[2]=ae=>p.value=ae),"show-alpha":!0,size:"small",onChange:C},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[14]||(_[14]=[l.createElementVNode("div",{class:"row-label"},"边框颜色",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(bt,{modelValue:g.value,"onUpdate:modelValue":_[3]||(_[3]=ae=>g.value=ae),"show-alpha":!0,size:"small",onChange:C},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[15]||(_[15]=[l.createElementVNode("div",{class:"row-label"},"边框宽度",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:m.value,"onUpdate:modelValue":_[4]||(_[4]=ae=>m.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[16]||(_[16]=[l.createElementVNode("div",{class:"row-label"},"背景圆角rx",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:y.value,"onUpdate:modelValue":_[5]||(_[5]=ae=>y.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[17]||(_[17]=[l.createElementVNode("div",{class:"row-label"},"背景圆角ry",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:b.value,"onUpdate:modelValue":_[6]||(_[6]=ae=>b.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),n.payload.data.type==="text"?(l.openBlock(),l.createBlock(te,{key:1,title:"文字设置",name:"2"},{default:l.withCtx(()=>[l.createElementVNode("div",zj,[l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[18]||(_[18]=[l.createElementVNode("div",{class:"row-label"},"字体颜色",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(bt,{modelValue:w.value,"onUpdate:modelValue":_[7]||(_[7]=ae=>w.value=ae),"show-alpha":!0,size:"small",onChange:C},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[19]||(_[19]=[l.createElementVNode("div",{class:"row-label"},"字体大小",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:x.value,"onUpdate:modelValue":_[8]||(_[8]=ae=>x.value=ae),size:"small","controls-position":"right",onChange:C,min:12,max:48,step:2},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[20]||(_[20]=[l.createElementVNode("div",{class:"row-label"},"对齐方式",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:v.value,"onUpdate:modelValue":_[9]||(_[9]=ae=>v.value=ae),size:"small",onChange:C},{default:l.withCtx(()=>[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(["start","middle","end"],ae=>l.createVNode(q,{key:ae,label:ae,value:ae},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[21]||(_[21]=[l.createElementVNode("div",{class:"row-label"},"x轴偏移",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:S.value,"onUpdate:modelValue":_[10]||(_[10]=ae=>S.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[22]||(_[22]=[l.createElementVNode("div",{class:"row-label"},"y轴偏移",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:E.value,"onUpdate:modelValue":_[11]||(_[11]=ae=>E.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})):l.createCommentVNode("",!0),l.createVNode(te,{title:"连接桩设置",name:"3"},{default:l.withCtx(()=>[l.createVNode(Q,{type:"primary",onClick:R,size:"small"},{default:l.withCtx(()=>_[23]||(_[23]=[l.createTextVNode("添加连接桩")])),_:1}),l.createVNode(Q,{type:"primary",onClick:j,size:"small"},{default:l.withCtx(()=>_[24]||(_[24]=[l.createTextVNode("显示连接桩")])),_:1}),l.createVNode(ge,{data:k.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[l.createVNode(Z,{label:"ID",width:"50",align:"center"},{default:l.withCtx(({row:ae})=>[l.createTextVNode(l.toDisplayString(ae.attrs.text.text),1)]),_:1}),l.createVNode(Z,{label:"x",width:"100",align:"center"},{default:l.withCtx(({row:ae})=>[l.createVNode(sr,{modelValue:ae.args.x,"onUpdate:modelValue":Jt=>ae.args.x=Jt,min:0,max:100,step:1,onInput:Jt=>N(ae.id,"x",Jt)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(Z,{label:"y",width:"100",align:"center"},{default:l.withCtx(({row:ae})=>[l.createVNode(sr,{modelValue:ae.args.y,"onUpdate:modelValue":Jt=>ae.args.y=Jt,min:0,max:100,step:1,onInput:Jt=>N(ae.id,"y",Jt)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(Z,{label:"操作",align:"center"},{default:l.withCtx(({row:ae})=>[l.createVNode(Q,{type:"danger",size:"small",onClick:Jt=>M(ae.id)},{default:l.withCtx(()=>[l.createVNode(rr,null,{default:l.withCtx(()=>[l.createVNode(l.unref(Vp))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-02b2bc1a"]]),Fj={class:"container"},Uj={class:"row-column"},Hj={class:"row-column"},Gj={class:"row-column"},Wj=Ut({__name:"default-line",props:{payload:Object},setup(n){var c,u,d,f;const e=n,t=l.ref("0"),s=l.ref(e.payload.attrs.line.stroke),r=l.ref(e.payload.attrs.line.strokeWidth),i=l.reactive({name:((c=e.payload.attrs.line.sourceMarker)==null?void 0:c.name)??null,args:((u=e.payload.attrs.line.sourceMarker)==null?void 0:u.args)??{}}),o=l.reactive({name:((d=e.payload.attrs.line.targetMarker)==null?void 0:d.name)??null,args:((f=e.payload.attrs.line.targetMarker)==null?void 0:f.args)??{}}),a=()=>{e.payload.attr("line/stroke",s.value),e.payload.attr("line/strokeWidth",r.value),e.payload.attr("line/sourceMarker/name",i.name),e.payload.attr("line/sourceMarker/args",i.args),e.payload.attr("line/targetMarker/name",o.name),e.payload.attr("line/targetMarker/args",o.args),Qe.markup=e.payload.markup,Qe.attrs=e.payload.attrs};return(h,p)=>{const g=l.resolveComponent("el-col"),m=l.resolveComponent("el-color-picker"),y=l.resolveComponent("el-row"),b=l.resolveComponent("el-input-number"),w=l.resolveComponent("el-collapse-item"),x=l.resolveComponent("el-option"),v=l.resolveComponent("el-select"),S=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",Fj,[l.createVNode(S,{modelValue:t.value,"onUpdate:modelValue":p[10]||(p[10]=E=>t.value=E),accordion:""},{default:l.withCtx(()=>[l.createVNode(w,{title:"线段设置",name:"0"},{default:l.withCtx(()=>[l.createElementVNode("div",Uj,[l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[11]||(p[11]=[l.createElementVNode("div",{class:"row-label"},"颜色",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=E=>s.value=E),"show-alpha":!0,size:"small",onChange:a},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[12]||(p[12]=[l.createElementVNode("div",{class:"row-label"},"粗细",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:r.value,"onUpdate:modelValue":p[1]||(p[1]=E=>r.value=E),size:"small","controls-position":"right",onChange:a,min:1,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(w,{title:"箭头1设置",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",Hj,[l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[13]||(p[13]=[l.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(v,{modelValue:i.name,"onUpdate:modelValue":p[2]||(p[2]=E=>i.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cl),E=>(l.openBlock(),l.createBlock(x,{key:E.value,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[14]||(p[14]=[l.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:i.args.width,"onUpdate:modelValue":p[3]||(p[3]=E=>i.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[15]||(p[15]=[l.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:i.args.height,"onUpdate:modelValue":p[4]||(p[4]=E=>i.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[16]||(p[16]=[l.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:i.args.offset,"onUpdate:modelValue":p[5]||(p[5]=E=>i.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(w,{title:"箭头2设置",name:"2"},{default:l.withCtx(()=>[l.createElementVNode("div",Gj,[l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[17]||(p[17]=[l.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(v,{modelValue:o.name,"onUpdate:modelValue":p[6]||(p[6]=E=>o.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cl),E=>(l.openBlock(),l.createBlock(x,{key:E.value,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[18]||(p[18]=[l.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:o.args.width,"onUpdate:modelValue":p[7]||(p[7]=E=>o.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[19]||(p[19]=[l.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:o.args.height,"onUpdate:modelValue":p[8]||(p[8]=E=>o.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[20]||(p[20]=[l.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:o.args.offset,"onUpdate:modelValue":p[9]||(p[9]=E=>o.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-060936eb"]]),Yj={class:"form-container"},qj={class:"footer",style:{"margin-top":"10px"}},h0=Ut({__name:"condition",props:{payload:{type:Array},type:{type:String}},emits:["close"],setup(n,{emit:e}){const t=n,s=l.ref(t.payload),r=()=>{s.value.push(JSON.parse(JSON.stringify(t.type==="pipe"?Ij:Bj)))},i=u=>{s.value.splice(u,1)},o=e,a=()=>{o("close",s.value)},c=()=>{o("close",!1)};return(u,d)=>{const f=l.resolveComponent("el-button"),h=l.resolveComponent("el-input-number"),p=l.resolveComponent("el-table-column"),g=l.resolveComponent("el-option"),m=l.resolveComponent("el-select"),y=l.resolveComponent("el-switch"),b=l.resolveComponent("el-table");return l.openBlock(),l.createElementBlock("div",Yj,[l.createVNode(f,{type:"primary",size:"small",onClick:r,style:{"margin-bottom":"10px"}},{default:l.withCtx(()=>d[0]||(d[0]=[l.createTextVNode("添加条件")])),_:1}),l.createVNode(b,{data:s.value,size:"small",border:""},{default:l.withCtx(()=>[l.createVNode(p,{prop:"min",label:"最小值",width:"150",align:"center"},{default:l.withCtx(w=>[l.createVNode(h,{modelValue:w.row.min,"onUpdate:modelValue":x=>w.row.min=x,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),l.createVNode(p,{prop:"max",label:"最大值",width:"150",align:"center"},{default:l.withCtx(w=>[l.createVNode(h,{modelValue:w.row.max,"onUpdate:modelValue":x=>w.row.max=x,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),n.type==="pipe"?(l.openBlock(),l.createBlock(p,{key:0,prop:"direction",label:"流向",align:"center"},{default:l.withCtx(w=>[l.createVNode(m,{modelValue:w.row.direction,"onUpdate:modelValue":x=>w.row.direction=x,size:"small"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a0),x=>(l.openBlock(),l.createBlock(g,{key:x.value,label:x.label,value:x.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1})):l.createCommentVNode("",!0),n.type==="arrow"?(l.openBlock(),l.createBlock(p,{key:1,prop:"direction",label:"方向",align:"center"},{default:l.withCtx(w=>[l.createVNode(y,{modelValue:w.row.direction,"onUpdate:modelValue":x=>w.row.direction=x,"active-value":l.unref(ui),"active-text":"正向","inactive-value":l.unref(Sd),"inactive-text":"反向",size:"small"},null,8,["modelValue","onUpdate:modelValue","active-value","inactive-value"])]),_:1})):l.createCommentVNode("",!0),n.type==="arrow"?(l.openBlock(),l.createBlock(p,{key:2,prop:"direction",label:"动作",align:"center"},{default:l.withCtx(w=>[l.createVNode(y,{modelValue:w.row.animation,"onUpdate:modelValue":x=>w.row.animation=x,"active-value":l.unref(nr),"active-text":"闪烁","inactive-value":l.unref(ci),"inactive-text":"静止",size:"small"},null,8,["modelValue","onUpdate:modelValue","active-value","inactive-value"])]),_:1})):l.createCommentVNode("",!0),n.type==="arrow"?(l.openBlock(),l.createBlock(p,{key:3,prop:"display",label:"显示",align:"center"},{default:l.withCtx(w=>[l.createVNode(y,{modelValue:w.row.display,"onUpdate:modelValue":x=>w.row.display=x,"active-value":"block","active-text":"显示","inactive-value":"none","inactive-text":"隐藏",size:"small"},null,8,["modelValue","onUpdate:modelValue"])]),_:1})):l.createCommentVNode("",!0),l.createVNode(p,{label:"操作",align:"center"},{default:l.withCtx(w=>[l.createVNode(f,{type:"danger",size:"small",onClick:x=>i(w.$index)},{default:l.withCtx(()=>d[1]||(d[1]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l.createElementVNode("div",qj,[l.createVNode(f,{type:"primary",onClick:a},{default:l.withCtx(()=>d[2]||(d[2]=[l.createTextVNode("保存")])),_:1}),l.createVNode(f,{onClick:c},{default:l.withCtx(()=>d[3]||(d[3]=[l.createTextVNode("取消")])),_:1})])])}}},[["__scopeId","data-v-93fe286b"]]),Jj={class:"container"},Xj={class:"row-column"},Kj={class:"row-column"},Zj={class:"row-column"},Qj={class:"row-column"},e3=Ut({__name:"pipe-line",props:{payload:Object},setup(n){var A,T,k,V,R,j,N,M,D,B,G,se;const e=n,t=l.ref("0"),s=l.ref(e.payload.attrs.line.stroke),r=l.ref(e.payload.attrs.pipe.stroke),i=l.ref(e.payload.attrs.line.strokeWidth),o=l.ref(e.payload.attrs.pipe.strokeDasharray),a=l.ref(((T=(A=e.payload.attrs.pipe)==null?void 0:A.style)==null?void 0:T.animation.split(" ")[0])??ci),c=l.reactive({name:((k=e.payload.attrs.pipe.sourceMarker)==null?void 0:k.name)??null,args:((V=e.payload.attrs.pipe.sourceMarker)==null?void 0:V.args)??{}}),u=l.reactive({name:((R=e.payload.attrs.pipe.targetMarker)==null?void 0:R.name)??null,args:((j=e.payload.attrs.pipe.targetMarker)==null?void 0:j.args)??{}}),d=()=>{e.payload.attr("line/stroke",s.value),e.payload.attr("pipe/stroke",r.value),e.payload.attr("line/strokeWidth",i.value),e.payload.attr("pipe/strokeWidth",i.value),e.payload.attr("pipe/strokeDasharray",o.value),e.payload.attr("pipe/sourceMarker/name",c.name),e.payload.attr("pipe/sourceMarker/args",c.args),e.payload.attr("pipe/targetMarker/name",u.name),e.payload.attr("pipe/targetMarker/args",u.args),e.payload.attr("pipe/style/animation",c0(a.value)),Qe.markup=e.payload.markup,Qe.attrs=e.payload.attrs,console.log("线-基础配置",Qe),console.log("线-当前配置",e.payload)},f=l.ref(e.payload.data.isCondition??!1),h=()=>{e.payload.data.isCondition=f.value},p=l.reactive({show:!1,payload:null}),g=()=>{p.show=!0,p.payload=e.payload.data.condition??[]},m=I=>{p.show=!1,p.payload=null,I&&(e.payload.data.condition=I),console.log("条件线",e.payload.data)},y=l.ref([]),b=l.ref(((D=(M=(N=e.payload.data)==null?void 0:N.fields)==null?void 0:M[0])==null?void 0:D.deviceCode)??""),w=l.ref(((se=(G=(B=e.payload.data)==null?void 0:B.fields)==null?void 0:G[0])==null?void 0:se.field)??""),x=async()=>{y.value=await Nu(),b.value&&S()};let v=l.reactive({});const S=()=>{v=y.value.find(I=>I.deviceCode===b.value),v?(C(),e.payload.data.fields=[{index:0,deviceName:v.deviceName,deviceCode:v.deviceCode,field:w.value??""}],w.value=e.payload.data.fields[0].field):(w.value="",e.payload.data.fields=[]),console.log("管道配置",e.payload)},E=l.ref([]),C=async()=>{E.value=await Au(v.deviceCode)},P=()=>{e.payload.data.fields=[{index:0,deviceName:v.deviceName,deviceCode:v.deviceCode,field:w.value??""}],console.log("管道配置",e.payload)};return l.onMounted(()=>{x()}),(I,_)=>{const H=l.resolveComponent("el-col"),K=l.resolveComponent("el-color-picker"),q=l.resolveComponent("el-row"),re=l.resolveComponent("el-input-number"),Z=l.resolveComponent("el-collapse-item"),ge=l.resolveComponent("el-option"),te=l.resolveComponent("el-select"),le=l.resolveComponent("el-switch"),bt=l.resolveComponent("el-button"),st=l.resolveComponent("el-collapse"),Pt=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",Jj,[l.createVNode(st,{modelValue:t.value,"onUpdate:modelValue":_[16]||(_[16]=Q=>t.value=Q),accordion:""},{default:l.withCtx(()=>[l.createVNode(Z,{title:"线段设置",name:"0"},{default:l.withCtx(()=>[l.createElementVNode("div",Xj,[l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[18]||(_[18]=[l.createElementVNode("div",{class:"row-label"},"颜色1",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=Q=>s.value=Q),"show-alpha":!0,size:"small",onChange:d},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[19]||(_[19]=[l.createElementVNode("div",{class:"row-label"},"颜色2",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:r.value,"onUpdate:modelValue":_[1]||(_[1]=Q=>r.value=Q),"show-alpha":!0,size:"small",onChange:d},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[20]||(_[20]=[l.createElementVNode("div",{class:"row-label"},"粗细",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:i.value,"onUpdate:modelValue":_[2]||(_[2]=Q=>i.value=Q),size:"small","controls-position":"right",onChange:d,min:1,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(Z,{title:"管道设置",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",Kj,[l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[21]||(_[21]=[l.createElementVNode("div",{class:"row-label"},"管道间隔",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:o.value,"onUpdate:modelValue":_[3]||(_[3]=Q=>o.value=Q),size:"small","controls-position":"right",onChange:d,min:5,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[22]||(_[22]=[l.createElementVNode("div",{class:"row-label"},"默认流动方向",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(te,{modelValue:a.value,"onUpdate:modelValue":_[4]||(_[4]=Q=>a.value=Q),placeholder:"请选择管道方向",size:"small",onChange:d},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a0),Q=>(l.openBlock(),l.createBlock(ge,{key:Q.value,label:Q.label,value:Q.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[23]||(_[23]=[l.createElementVNode("div",{class:"row-label"},"参数设置",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(te,{modelValue:b.value,"onUpdate:modelValue":_[5]||(_[5]=Q=>b.value=Q),placeholder:"请选择设备",onChange:S,size:"small",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(y.value,Q=>(l.openBlock(),l.createBlock(ge,{key:Q.deviceCode,label:Q.deviceName,value:Q.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.createVNode(te,{modelValue:w.value,"onUpdate:modelValue":_[6]||(_[6]=Q=>w.value=Q),placeholder:"请选择字段",onChange:P,size:"small",filterable:"",clearable:"",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(E.value,Q=>(l.openBlock(),l.createBlock(ge,{key:Q.dataField,label:Q.name,value:Q.dataField},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[24]||(_[24]=[l.createElementVNode("div",{class:"row-label"},"条件配置",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(le,{modelValue:f.value,"onUpdate:modelValue":_[7]||(_[7]=Q=>f.value=Q),"active-value":!0,"inactive-value":!1,size:"small",onChange:h},null,8,["modelValue"]),l.createVNode(bt,{type:"primary",size:"small",onClick:g,style:{"margin-left":"10px"}},{default:l.withCtx(()=>_[25]||(_[25]=[l.createTextVNode("配置")])),_:1})]),_:1})]),_:1})])]),_:1}),l.createVNode(Z,{title:"箭头1设置",name:"2"},{default:l.withCtx(()=>[l.createElementVNode("div",Zj,[l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[26]||(_[26]=[l.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(te,{modelValue:c.name,"onUpdate:modelValue":_[8]||(_[8]=Q=>c.name=Q),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:d},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cl),Q=>(l.openBlock(),l.createBlock(ge,{key:Q.value,label:Q.label,value:Q.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[27]||(_[27]=[l.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:c.args.width,"onUpdate:modelValue":_[9]||(_[9]=Q=>c.args.width=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[28]||(_[28]=[l.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:c.args.height,"onUpdate:modelValue":_[10]||(_[10]=Q=>c.args.height=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[29]||(_[29]=[l.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:c.args.offset,"onUpdate:modelValue":_[11]||(_[11]=Q=>c.args.offset=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(Z,{title:"箭头2设置",name:"3"},{default:l.withCtx(()=>[l.createElementVNode("div",Qj,[l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[30]||(_[30]=[l.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(te,{modelValue:u.name,"onUpdate:modelValue":_[12]||(_[12]=Q=>u.name=Q),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:d},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cl),Q=>(l.openBlock(),l.createBlock(ge,{key:Q.value,label:Q.label,value:Q.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[31]||(_[31]=[l.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:u.args.width,"onUpdate:modelValue":_[13]||(_[13]=Q=>u.args.width=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[32]||(_[32]=[l.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:u.args.height,"onUpdate:modelValue":_[14]||(_[14]=Q=>u.args.height=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[33]||(_[33]=[l.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:u.args.offset,"onUpdate:modelValue":_[15]||(_[15]=Q=>u.args.offset=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"]),l.createVNode(Pt,{modelValue:p.show,"onUpdate:modelValue":_[17]||(_[17]=Q=>p.show=Q),width:"500px",title:"条件配置","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[p.show?(l.openBlock(),l.createBlock(h0,{key:0,payload:p.payload,type:"pipe",onClose:m},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-607d9ef1"]]),t3={class:"container"},n3={class:"row-column"},s3={class:"row-column"},r3={class:"row-column"},i3={__name:"arrow-line",props:{payload:{type:Object}},setup(n){var T,k,V,R,j,N;const e=n,t=l.ref("0");console.log(e.payload);const s=l.ref(e.payload.attrs.line.stroke),r=l.ref(e.payload.attrs.line.strokeWidth),i=e.payload.markup.length-1,o=l.ref(e.payload.markup.length-1),a=l.ref(e.payload.attrs.arrow.fill),c=l.ref(e.payload.attrs.arrow.d===Ga?ui:Sd),u=l.ref(e.payload.attrs.arrow.style.animation.split(" ")[0]===nr?nr:ci),d=l.ref(e.payload.attrs.arrow.display),f=()=>{if(e.payload.attr("line/stroke",s.value),e.payload.attr("line/strokeWidth",r.value),e.payload.attr("arrow/fill",a.value),e.payload.attr("arrow/stroke",a.value),o.value!==i){e.payload.markup=e.payload.markup.slice(0,1);for(let M=0;M<o.value;M++)e.payload.markup.push({tagName:"path",groupSelector:"arrow",selector:"arrow"+(M+1)}),e.payload.attr("arrow"+(M+1),{atConnectionRatio:1/(o.value+1)*(M+1)})}e.payload.attr("arrow/d",c.value===ui?Ga:Jm),e.payload.attr("arrow/style/animation",u.value===nr?"flashing 2s infinite linear":""),e.payload.attr("arrow/display",d.value),console.log(e.payload.markup),Qe.markup=e.payload.markup,Qe.attrs=e.payload.attrs},h=l.ref([]),p=l.ref(((V=(k=(T=e.payload.data)==null?void 0:T.fields)==null?void 0:k[0])==null?void 0:V.deviceCode)??""),g=l.ref(((N=(j=(R=e.payload.data)==null?void 0:R.fields)==null?void 0:j[0])==null?void 0:N.field)??""),m=async()=>{h.value=await Nu(),p.value&&b()};let y=l.reactive({});const b=()=>{y=h.value.find(M=>M.deviceCode===p.value),y?(x(),e.payload.data.fields=[{index:0,deviceName:y.deviceName,deviceCode:y.deviceCode,field:g.value??""}],g.value=e.payload.data.fields[0].field):(g.value="",e.payload.data.fields=[]),console.log("箭头线-配置",e.payload)},w=l.ref([]),x=async()=>{w.value=await Au(y.deviceCode)},v=()=>{e.payload.data.fields=[{index:0,deviceName:y.deviceName,deviceCode:y.deviceCode,field:g.value??""}],console.log("箭头线-配置",e.payload)},S=l.ref(e.payload.data.isCondition??!1),E=()=>{e.payload.data.isCondition=S.value},C=l.reactive({show:!1,payload:null}),P=()=>{C.show=!0,C.payload=e.payload.data.condition??[]},A=M=>{C.show=!1,C.payload=null,M&&(e.payload.data.condition=M),console.log("条件线",e.payload.data)};return l.onMounted(()=>{m()}),(M,D)=>{const B=l.resolveComponent("el-col"),G=l.resolveComponent("el-color-picker"),se=l.resolveComponent("el-row"),I=l.resolveComponent("el-input-number"),_=l.resolveComponent("el-collapse-item"),H=l.resolveComponent("el-option"),K=l.resolveComponent("el-select"),q=l.resolveComponent("el-switch"),re=l.resolveComponent("el-button"),Z=l.resolveComponent("el-collapse"),ge=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",t3,[l.createVNode(Z,{modelValue:t.value,"onUpdate:modelValue":D[10]||(D[10]=te=>t.value=te),accordion:""},{default:l.withCtx(()=>[l.createVNode(_,{title:"线段设置",name:"0"},{default:l.withCtx(()=>[l.createElementVNode("div",n3,[l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[12]||(D[12]=[l.createElementVNode("div",{class:"row-label"},"颜色",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(G,{modelValue:s.value,"onUpdate:modelValue":D[0]||(D[0]=te=>s.value=te),"show-alpha":!0,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[13]||(D[13]=[l.createElementVNode("div",{class:"row-label"},"粗细",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:r.value,"onUpdate:modelValue":D[1]||(D[1]=te=>r.value=te),size:"small","controls-position":"right",onChange:f,min:1,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(_,{title:"箭头设置",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",s3,[l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[14]||(D[14]=[l.createElementVNode("div",{class:"row-label"},"箭头数量",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:o.value,"onUpdate:modelValue":D[2]||(D[2]=te=>o.value=te),size:"small","controls-position":"right",onChange:f,min:1,max:20,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[15]||(D[15]=[l.createElementVNode("div",{class:"row-label"},"箭头颜色",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(G,{modelValue:a.value,"onUpdate:modelValue":D[3]||(D[3]=te=>a.value=te),"show-alpha":!0,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[16]||(D[16]=[l.createElementVNode("div",{class:"row-label"},"默认箭头方向",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:c.value,"onUpdate:modelValue":D[4]||(D[4]=te=>c.value=te),size:"small",onChange:f},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Sj),te=>(l.openBlock(),l.createBlock(H,{key:te.value,label:te.label,value:te.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[17]||(D[17]=[l.createElementVNode("div",{class:"row-label"},"默认箭头动作",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(q,{modelValue:u.value,"onUpdate:modelValue":D[5]||(D[5]=te=>u.value=te),"active-value":l.unref(nr),"active-text":"闪烁","inactive-value":l.unref(ci),"inactive-text":"静止",size:"small",onChange:f},null,8,["modelValue","active-value","inactive-value"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[18]||(D[18]=[l.createElementVNode("div",{class:"row-label"},"默认箭头显示",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(q,{modelValue:d.value,"onUpdate:modelValue":D[6]||(D[6]=te=>d.value=te),"active-value":"block","active-text":"显示","inactive-value":"none","inactive-text":"隐藏",size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(_,{title:"动态设置",name:"2"},{default:l.withCtx(()=>[l.createElementVNode("div",r3,[l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[19]||(D[19]=[l.createElementVNode("div",{class:"row-label"},"参数设置",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:p.value,"onUpdate:modelValue":D[7]||(D[7]=te=>p.value=te),placeholder:"请选择设备",onChange:b,size:"small",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,te=>(l.openBlock(),l.createBlock(H,{key:te.deviceCode,label:te.deviceName,value:te.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.createVNode(K,{modelValue:g.value,"onUpdate:modelValue":D[8]||(D[8]=te=>g.value=te),placeholder:"请选择字段",onChange:v,size:"small",filterable:"",clearable:"",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(w.value,te=>(l.openBlock(),l.createBlock(H,{key:te.dataField,label:te.name,value:te.dataField},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[20]||(D[20]=[l.createElementVNode("div",{class:"row-label"},"条件配置",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(q,{modelValue:S.value,"onUpdate:modelValue":D[9]||(D[9]=te=>S.value=te),"active-value":!0,"inactive-value":!1,size:"small",onChange:E},null,8,["modelValue"]),l.createVNode(re,{type:"primary",size:"small",onClick:P,style:{"margin-left":"10px"}},{default:l.withCtx(()=>D[21]||(D[21]=[l.createTextVNode("配置")])),_:1})]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"]),l.createVNode(ge,{modelValue:C.show,"onUpdate:modelValue":D[11]||(D[11]=te=>C.show=te),width:"800px",title:"条件配置","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[C.show?(l.openBlock(),l.createBlock(h0,{key:0,payload:C.payload,type:"arrow",onClose:A},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue"])])}}},o3={class:"container"},a3={class:"row-column",style:{padding:"0 1px 10px"}},f0=Ut({__name:"index",props:{payload:Object},setup(n){const e=n,t=l.ref(e.payload.data.type),s=()=>{e.payload.data.type=t.value,t.value===xd&&(Qe.attrs=Ym.attrs,Qe.markup=Ym.markup),t.value===vd&&(Qe.attrs=qm.attrs,Qe.markup=qm.markup),t.value===Cd&&(Qe.attrs=Wa.attrs,Qe.markup=Wa.markup),e.payload.attrs=null,e.payload.attr(Qe.attrs),e.payload.markup=Qe.markup,i()},r=l.shallowRef(null),i=()=>{r.value=null,t.value===xd&&(r.value=Wj),t.value===vd&&(r.value=e3),t.value===Cd&&(r.value=i3)};return l.onMounted(()=>{i()}),(o,a)=>{const c=l.resolveComponent("el-col"),u=l.resolveComponent("el-option"),d=l.resolveComponent("el-select"),f=l.resolveComponent("el-row");return l.openBlock(),l.createElementBlock("div",o3,[l.createElementVNode("div",a3,[l.createVNode(f,{gutter:20},{default:l.withCtx(()=>[l.createVNode(c,{span:12},{default:l.withCtx(()=>a[1]||(a[1]=[l.createElementVNode("div",{class:"row-label"},"线段类型",-1)])),_:1}),l.createVNode(c,{span:12},{default:l.withCtx(()=>[l.createVNode(d,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=h=>t.value=h),placeholder:"请选择线段类型",clearable:"",size:"small",onChange:s},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cj),h=>(l.openBlock(),l.createBlock(u,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.value),{payload:n.payload},null,8,["payload"]))])}}},[["__scopeId","data-v-b801c80f"]]),l3={class:"form-container"},c3=Ut({__name:"Shortcuts",setup(n){const e=l.ref([{name:"复制",windowsKey:"Ctrl + C",macKey:"Command + C"},{name:"粘贴",windowsKey:"Ctrl + V",macKey:"Command + V"},{name:"撤销",windowsKey:"Ctrl + Z",macKey:"Command + Z"},{name:"重做",windowsKey:"Ctrl + Y",macKey:"Command + Y"},{name:"框选",windowsKey:"Alt + LMB",macKey:"option + LMB"},{name:"多选",windowsKey:"Alt + LMB",macKey:"Command + LMB"}]);return(t,s)=>{const r=l.resolveComponent("el-table-column"),i=l.resolveComponent("el-table");return l.openBlock(),l.createElementBlock("div",l3,[l.createVNode(i,{data:e.value,size:"small",border:""},{default:l.withCtx(()=>[l.createVNode(r,{prop:"name",label:"名称"}),l.createVNode(r,{prop:"windowsKey",label:"windows"}),l.createVNode(r,{prop:"macKey",label:"mac"})]),_:1},8,["data"])])}}},[["__scopeId","data-v-99982d47"]]),u3=`.x6-widget-dnd {
|
|
483
|
+
添加后为:--${I.unit??""}`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const _=I.unit??"",H=e.payload.data.content;e.payload.data.content=h.value=H+"${"+a.deviceName+"."+I.name+"}"+_;const K=H.match(Sl),q=(K==null?void 0:K.length)||0;e.payload.data.fields.push({index:q,deviceName:a.deviceName,deviceCode:a.deviceCode,field:I.dataField}),e.payload.label=d(e.payload.data.content)})},h=l.ref(e.payload.data.content||null),p=l.ref(e.payload.attrs.body.fill||null),g=l.ref(e.payload.attrs.body.stroke||null),m=l.ref(e.payload.attrs.body.strokeWidth||null),y=l.ref(e.payload.attrs.body.rx||null),b=l.ref(e.payload.attrs.body.ry||null),w=l.ref(e.payload.attrs.text.fill||null),x=l.ref(e.payload.attrs.text.fontSize||null),v=l.ref(((B=e.payload.attrs.label)==null?void 0:B.textAnchor)||null),S=l.ref(((G=e.payload.attrs.label)==null?void 0:G.x)||null),E=l.ref(((se=e.payload.attrs.label)==null?void 0:se.y)||null),C=()=>{e.payload.attr("body/fill",p.value),e.payload.attr("body/stroke",g.value),e.payload.attr("body/strokeWidth",m.value),e.payload.attr("body/rx",y.value),e.payload.attr("body/ry",b.value),e.payload.attr("text/fill",w.value),e.payload.attr("text/fontSize",x.value),e.payload.attr("label/textAnchor",v.value),e.payload.attr("label/x",S.value),e.payload.attr("label/y",E.value)},P=l.ref(null),A=()=>{if(e.payload.data.content.length>h.value.length&&e.payload.data.content.endsWith("}")){const I=e.payload.data.content.match(Sl);if(I){const _=I.length-1;e.payload.data.fields.splice(_,1),h.value=e.payload.data.content.substring(0,e.payload.data.content.lastIndexOf("${"))}}e.payload.data.content=h.value,e.payload.label=d(h.value)},T=()=>{if(P.value){const I=P.value.$refs.textarea;I.focus();const _=h.value.length;I.setSelectionRange(_,_)}},k=l.ref([]),V=()=>{k.value=JSON.parse(JSON.stringify(e.payload.getPorts().map(I=>({id:I.id,attrs:I.attrs,args:{x:Number(I.args.x.replace("%","")),y:Number(I.args.y.replace("%",""))}}))))},R=()=>{const I=_u;I.attrs.text.text=`${e.payload.getPorts().length+1}`,I.args.x="50%",I.args.y="50%",e.payload.addPorts([{group:"ports",...I}]),V()},j=()=>{Ki("#drawing-board",!0)},N=(I,_,H)=>{e.payload.portProp(I,"args/"+_,H+"%"),V()},M=I=>{e.payload.removePort(I),V()};return l.onMounted(()=>{V(),i(),document.addEventListener("selectionchange",()=>{document.activeElement.tagName==="TEXTAREA"&&T()})}),(I,_)=>{const H=l.resolveComponent("el-input"),K=l.resolveComponent("el-alert"),q=l.resolveComponent("el-option"),re=l.resolveComponent("el-select"),Z=l.resolveComponent("el-table-column"),ge=l.resolveComponent("el-table"),te=l.resolveComponent("el-collapse-item"),le=l.resolveComponent("el-col"),bt=l.resolveComponent("el-color-picker"),st=l.resolveComponent("el-row"),Pt=l.resolveComponent("el-input-number"),Q=l.resolveComponent("el-button"),sr=l.resolveComponent("el-slider"),rr=l.resolveComponent("el-icon"),hi=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",jj,[l.createVNode(hi,{modelValue:t.value,"onUpdate:modelValue":_[12]||(_[12]=ae=>t.value=ae),accordion:""},{default:l.withCtx(()=>[n.payload.data.type==="text"?(l.openBlock(),l.createBlock(te,{key:0,title:"文本内容",name:"0"},{default:l.withCtx(()=>[l.createVNode(H,{ref_key:"inputRef",ref:P,type:"textarea",modelValue:h.value,"onUpdate:modelValue":_[0]||(_[0]=ae=>h.value=ae),onInput:A,onFocus:T,rows:10},null,8,["modelValue"]),l.createVNode(K,{type:"info",title:"提示",description:"请先选择设备,再选择字段,最后点击确定按钮,即可绑定设备数据。绑定完成后会由 $<> 进行包裹!",style:{"margin-top":"20px"}}),l.createVNode(re,{modelValue:o.value,"onUpdate:modelValue":_[1]||(_[1]=ae=>o.value=ae),placeholder:"请选择设备",onChange:c,filterable:"",clearable:"",style:{"margin-top":"20px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,ae=>(l.openBlock(),l.createBlock(q,{key:ae.deviceCode,label:ae.deviceName,value:ae.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.createVNode(ge,{data:r.value,border:"",style:{"margin-top":"20px"},size:"small",height:"500",onRowClick:f},{default:l.withCtx(()=>[l.createVNode(Z,{type:"index",label:"序号",width:"50",align:"center"}),l.createVNode(Z,{prop:"name",label:"字段名称","show-overflow-tooltip":""}),l.createVNode(Z,{prop:"dataField",label:"字段编码","show-overflow-tooltip":""}),l.createVNode(Z,{prop:"unit",label:"单位",width:"50"})]),_:1},8,["data"])]),_:1})):l.createCommentVNode("",!0),l.createVNode(te,{title:"图形设置",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",$j,[l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[13]||(_[13]=[l.createElementVNode("div",{class:"row-label"},"背景颜色",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(bt,{modelValue:p.value,"onUpdate:modelValue":_[2]||(_[2]=ae=>p.value=ae),"show-alpha":!0,size:"small",onChange:C},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[14]||(_[14]=[l.createElementVNode("div",{class:"row-label"},"边框颜色",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(bt,{modelValue:g.value,"onUpdate:modelValue":_[3]||(_[3]=ae=>g.value=ae),"show-alpha":!0,size:"small",onChange:C},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[15]||(_[15]=[l.createElementVNode("div",{class:"row-label"},"边框宽度",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:m.value,"onUpdate:modelValue":_[4]||(_[4]=ae=>m.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[16]||(_[16]=[l.createElementVNode("div",{class:"row-label"},"背景圆角rx",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:y.value,"onUpdate:modelValue":_[5]||(_[5]=ae=>y.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[17]||(_[17]=[l.createElementVNode("div",{class:"row-label"},"背景圆角ry",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:b.value,"onUpdate:modelValue":_[6]||(_[6]=ae=>b.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),n.payload.data.type==="text"?(l.openBlock(),l.createBlock(te,{key:1,title:"文字设置",name:"2"},{default:l.withCtx(()=>[l.createElementVNode("div",zj,[l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[18]||(_[18]=[l.createElementVNode("div",{class:"row-label"},"字体颜色",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(bt,{modelValue:w.value,"onUpdate:modelValue":_[7]||(_[7]=ae=>w.value=ae),"show-alpha":!0,size:"small",onChange:C},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[19]||(_[19]=[l.createElementVNode("div",{class:"row-label"},"字体大小",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:x.value,"onUpdate:modelValue":_[8]||(_[8]=ae=>x.value=ae),size:"small","controls-position":"right",onChange:C,min:12,max:48,step:2},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[20]||(_[20]=[l.createElementVNode("div",{class:"row-label"},"对齐方式",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:v.value,"onUpdate:modelValue":_[9]||(_[9]=ae=>v.value=ae),size:"small",onChange:C},{default:l.withCtx(()=>[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(["start","middle","end"],ae=>l.createVNode(q,{key:ae,label:ae,value:ae},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[21]||(_[21]=[l.createElementVNode("div",{class:"row-label"},"x轴偏移",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:S.value,"onUpdate:modelValue":_[10]||(_[10]=ae=>S.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(st,{gutter:20},{default:l.withCtx(()=>[l.createVNode(le,{span:12},{default:l.withCtx(()=>_[22]||(_[22]=[l.createElementVNode("div",{class:"row-label"},"y轴偏移",-1)])),_:1}),l.createVNode(le,{span:12},{default:l.withCtx(()=>[l.createVNode(Pt,{modelValue:E.value,"onUpdate:modelValue":_[11]||(_[11]=ae=>E.value=ae),size:"small","controls-position":"right",onChange:C,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})):l.createCommentVNode("",!0),l.createVNode(te,{title:"连接桩设置",name:"3"},{default:l.withCtx(()=>[l.createVNode(Q,{type:"primary",onClick:R,size:"small"},{default:l.withCtx(()=>_[23]||(_[23]=[l.createTextVNode("添加连接桩")])),_:1}),l.createVNode(Q,{type:"primary",onClick:j,size:"small"},{default:l.withCtx(()=>_[24]||(_[24]=[l.createTextVNode("显示连接桩")])),_:1}),l.createVNode(ge,{data:k.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[l.createVNode(Z,{label:"ID",width:"50",align:"center"},{default:l.withCtx(({row:ae})=>[l.createTextVNode(l.toDisplayString(ae.attrs.text.text),1)]),_:1}),l.createVNode(Z,{label:"x",width:"100",align:"center"},{default:l.withCtx(({row:ae})=>[l.createVNode(sr,{modelValue:ae.args.x,"onUpdate:modelValue":Jt=>ae.args.x=Jt,min:0,max:100,step:1,onInput:Jt=>N(ae.id,"x",Jt)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(Z,{label:"y",width:"100",align:"center"},{default:l.withCtx(({row:ae})=>[l.createVNode(sr,{modelValue:ae.args.y,"onUpdate:modelValue":Jt=>ae.args.y=Jt,min:0,max:100,step:1,onInput:Jt=>N(ae.id,"y",Jt)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(Z,{label:"操作",align:"center"},{default:l.withCtx(({row:ae})=>[l.createVNode(Q,{type:"danger",size:"small",onClick:Jt=>M(ae.id)},{default:l.withCtx(()=>[l.createVNode(rr,null,{default:l.withCtx(()=>[l.createVNode(l.unref(Vp))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-02b2bc1a"]]),Fj={class:"container"},Uj={class:"row-column"},Hj={class:"row-column"},Gj={class:"row-column"},Wj=Ut({__name:"default-line",props:{payload:Object},setup(n){var c,u,d,f;const e=n,t=l.ref("0"),s=l.ref(e.payload.attrs.line.stroke),r=l.ref(e.payload.attrs.line.strokeWidth),i=l.reactive({name:((c=e.payload.attrs.line.sourceMarker)==null?void 0:c.name)??null,args:((u=e.payload.attrs.line.sourceMarker)==null?void 0:u.args)??{}}),o=l.reactive({name:((d=e.payload.attrs.line.targetMarker)==null?void 0:d.name)??null,args:((f=e.payload.attrs.line.targetMarker)==null?void 0:f.args)??{}}),a=()=>{e.payload.attr("line/stroke",s.value),e.payload.attr("line/strokeWidth",r.value),e.payload.attr("line/sourceMarker/name",i.name),e.payload.attr("line/sourceMarker/args",i.args),e.payload.attr("line/targetMarker/name",o.name),e.payload.attr("line/targetMarker/args",o.args),Qe.markup=e.payload.markup,Qe.attrs=e.payload.attrs};return(h,p)=>{const g=l.resolveComponent("el-col"),m=l.resolveComponent("el-color-picker"),y=l.resolveComponent("el-row"),b=l.resolveComponent("el-input-number"),w=l.resolveComponent("el-collapse-item"),x=l.resolveComponent("el-option"),v=l.resolveComponent("el-select"),S=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",Fj,[l.createVNode(S,{modelValue:t.value,"onUpdate:modelValue":p[10]||(p[10]=E=>t.value=E),accordion:""},{default:l.withCtx(()=>[l.createVNode(w,{title:"线段设置",name:"0"},{default:l.withCtx(()=>[l.createElementVNode("div",Uj,[l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[11]||(p[11]=[l.createElementVNode("div",{class:"row-label"},"颜色",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=E=>s.value=E),"show-alpha":!0,size:"small",onChange:a},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[12]||(p[12]=[l.createElementVNode("div",{class:"row-label"},"粗细",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:r.value,"onUpdate:modelValue":p[1]||(p[1]=E=>r.value=E),size:"small","controls-position":"right",onChange:a,min:1,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(w,{title:"箭头1设置",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",Hj,[l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[13]||(p[13]=[l.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(v,{modelValue:i.name,"onUpdate:modelValue":p[2]||(p[2]=E=>i.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cl),E=>(l.openBlock(),l.createBlock(x,{key:E.value,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[14]||(p[14]=[l.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:i.args.width,"onUpdate:modelValue":p[3]||(p[3]=E=>i.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[15]||(p[15]=[l.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:i.args.height,"onUpdate:modelValue":p[4]||(p[4]=E=>i.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[16]||(p[16]=[l.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:i.args.offset,"onUpdate:modelValue":p[5]||(p[5]=E=>i.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(w,{title:"箭头2设置",name:"2"},{default:l.withCtx(()=>[l.createElementVNode("div",Gj,[l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[17]||(p[17]=[l.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(v,{modelValue:o.name,"onUpdate:modelValue":p[6]||(p[6]=E=>o.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cl),E=>(l.openBlock(),l.createBlock(x,{key:E.value,label:E.label,value:E.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[18]||(p[18]=[l.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:o.args.width,"onUpdate:modelValue":p[7]||(p[7]=E=>o.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[19]||(p[19]=[l.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:o.args.height,"onUpdate:modelValue":p[8]||(p[8]=E=>o.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(y,{gutter:20},{default:l.withCtx(()=>[l.createVNode(g,{span:12},{default:l.withCtx(()=>p[20]||(p[20]=[l.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),l.createVNode(g,{span:12},{default:l.withCtx(()=>[l.createVNode(b,{modelValue:o.args.offset,"onUpdate:modelValue":p[9]||(p[9]=E=>o.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-060936eb"]]),Yj={class:"form-container"},qj={class:"footer",style:{"margin-top":"10px"}},h0=Ut({__name:"condition",props:{payload:{type:Array},type:{type:String}},emits:["close"],setup(n,{emit:e}){const t=n,s=l.ref(t.payload),r=()=>{s.value.push(JSON.parse(JSON.stringify(t.type==="pipe"?Ij:Bj)))},i=u=>{s.value.splice(u,1)},o=e,a=()=>{o("close",s.value)},c=()=>{o("close",!1)};return(u,d)=>{const f=l.resolveComponent("el-button"),h=l.resolveComponent("el-input-number"),p=l.resolveComponent("el-table-column"),g=l.resolveComponent("el-option"),m=l.resolveComponent("el-select"),y=l.resolveComponent("el-switch"),b=l.resolveComponent("el-table");return l.openBlock(),l.createElementBlock("div",Yj,[l.createVNode(f,{type:"primary",size:"small",onClick:r,style:{"margin-bottom":"10px"}},{default:l.withCtx(()=>d[0]||(d[0]=[l.createTextVNode("添加条件")])),_:1}),l.createVNode(b,{data:s.value,size:"small",border:""},{default:l.withCtx(()=>[l.createVNode(p,{prop:"min",label:"最小值",width:"150",align:"center"},{default:l.withCtx(w=>[l.createVNode(h,{modelValue:w.row.min,"onUpdate:modelValue":x=>w.row.min=x,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),l.createVNode(p,{prop:"max",label:"最大值",width:"150",align:"center"},{default:l.withCtx(w=>[l.createVNode(h,{modelValue:w.row.max,"onUpdate:modelValue":x=>w.row.max=x,size:"small","controls-position":"right"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),n.type==="pipe"?(l.openBlock(),l.createBlock(p,{key:0,prop:"direction",label:"流向",align:"center"},{default:l.withCtx(w=>[l.createVNode(m,{modelValue:w.row.direction,"onUpdate:modelValue":x=>w.row.direction=x,size:"small"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a0),x=>(l.openBlock(),l.createBlock(g,{key:x.value,label:x.label,value:x.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1})):l.createCommentVNode("",!0),n.type==="arrow"?(l.openBlock(),l.createBlock(p,{key:1,prop:"direction",label:"方向",align:"center"},{default:l.withCtx(w=>[l.createVNode(y,{modelValue:w.row.direction,"onUpdate:modelValue":x=>w.row.direction=x,"active-value":l.unref(ui),"active-text":"正向","inactive-value":l.unref(Sd),"inactive-text":"反向",size:"small"},null,8,["modelValue","onUpdate:modelValue","active-value","inactive-value"])]),_:1})):l.createCommentVNode("",!0),n.type==="arrow"?(l.openBlock(),l.createBlock(p,{key:2,prop:"direction",label:"动作",align:"center"},{default:l.withCtx(w=>[l.createVNode(y,{modelValue:w.row.animation,"onUpdate:modelValue":x=>w.row.animation=x,"active-value":l.unref(nr),"active-text":"闪烁","inactive-value":l.unref(ci),"inactive-text":"静止",size:"small"},null,8,["modelValue","onUpdate:modelValue","active-value","inactive-value"])]),_:1})):l.createCommentVNode("",!0),n.type==="arrow"?(l.openBlock(),l.createBlock(p,{key:3,prop:"display",label:"显示",align:"center"},{default:l.withCtx(w=>[l.createVNode(y,{modelValue:w.row.display,"onUpdate:modelValue":x=>w.row.display=x,"active-value":"block","active-text":"显示","inactive-value":"none","inactive-text":"隐藏",size:"small"},null,8,["modelValue","onUpdate:modelValue"])]),_:1})):l.createCommentVNode("",!0),l.createVNode(p,{label:"操作",align:"center"},{default:l.withCtx(w=>[l.createVNode(f,{type:"danger",size:"small",onClick:x=>i(w.$index)},{default:l.withCtx(()=>d[1]||(d[1]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l.createElementVNode("div",qj,[l.createVNode(f,{type:"primary",onClick:a},{default:l.withCtx(()=>d[2]||(d[2]=[l.createTextVNode("保存")])),_:1}),l.createVNode(f,{onClick:c},{default:l.withCtx(()=>d[3]||(d[3]=[l.createTextVNode("取消")])),_:1})])])}}},[["__scopeId","data-v-93fe286b"]]),Jj={class:"container"},Xj={class:"row-column"},Kj={class:"row-column"},Zj={class:"row-column"},Qj={class:"row-column"},e3=Ut({__name:"pipe-line",props:{payload:Object},setup(n){var A,T,k,V,R,j,N,M,D,B,G,se;const e=n,t=l.ref("0"),s=l.ref(e.payload.attrs.line.stroke),r=l.ref(e.payload.attrs.pipe.stroke),i=l.ref(e.payload.attrs.line.strokeWidth),o=l.ref(e.payload.attrs.pipe.strokeDasharray),a=l.ref(((T=(A=e.payload.attrs.pipe)==null?void 0:A.style)==null?void 0:T.animation.split(" ")[0])??ci),c=l.reactive({name:((k=e.payload.attrs.pipe.sourceMarker)==null?void 0:k.name)??null,args:((V=e.payload.attrs.pipe.sourceMarker)==null?void 0:V.args)??{}}),u=l.reactive({name:((R=e.payload.attrs.pipe.targetMarker)==null?void 0:R.name)??null,args:((j=e.payload.attrs.pipe.targetMarker)==null?void 0:j.args)??{}}),d=()=>{e.payload.attr("line/stroke",s.value),e.payload.attr("pipe/stroke",r.value),e.payload.attr("line/strokeWidth",i.value),e.payload.attr("pipe/strokeWidth",i.value),e.payload.attr("pipe/strokeDasharray",o.value),e.payload.attr("pipe/sourceMarker/name",c.name),e.payload.attr("pipe/sourceMarker/args",c.args),e.payload.attr("pipe/targetMarker/name",u.name),e.payload.attr("pipe/targetMarker/args",u.args),e.payload.attr("pipe/style/animation",c0(a.value)),Qe.markup=e.payload.markup,Qe.attrs=e.payload.attrs,console.log("线-基础配置",Qe),console.log("线-当前配置",e.payload)},f=l.ref(e.payload.data.isCondition??!1),h=()=>{e.payload.data.isCondition=f.value},p=l.reactive({show:!1,payload:null}),g=()=>{p.show=!0,p.payload=e.payload.data.condition??[]},m=I=>{p.show=!1,p.payload=null,I&&(e.payload.data.condition=I),console.log("条件线",e.payload.data)},y=l.ref([]),b=l.ref(((D=(M=(N=e.payload.data)==null?void 0:N.fields)==null?void 0:M[0])==null?void 0:D.deviceCode)??""),w=l.ref(((se=(G=(B=e.payload.data)==null?void 0:B.fields)==null?void 0:G[0])==null?void 0:se.field)??""),x=async()=>{y.value=await Nu(),b.value&&S()};let v=l.reactive({});const S=()=>{v=y.value.find(I=>I.deviceCode===b.value),v?(C(),e.payload.data.fields=[{index:0,deviceName:v.deviceName,deviceCode:v.deviceCode,field:w.value??""}],w.value=e.payload.data.fields[0].field):(w.value="",e.payload.data.fields=[]),console.log("管道配置",e.payload)},E=l.ref([]),C=async()=>{E.value=await Au(v.deviceCode)},P=()=>{e.payload.data.fields=[{index:0,deviceName:v.deviceName,deviceCode:v.deviceCode,field:w.value??""}],console.log("管道配置",e.payload)};return l.onMounted(()=>{x()}),(I,_)=>{const H=l.resolveComponent("el-col"),K=l.resolveComponent("el-color-picker"),q=l.resolveComponent("el-row"),re=l.resolveComponent("el-input-number"),Z=l.resolveComponent("el-collapse-item"),ge=l.resolveComponent("el-option"),te=l.resolveComponent("el-select"),le=l.resolveComponent("el-switch"),bt=l.resolveComponent("el-button"),st=l.resolveComponent("el-collapse"),Pt=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",Jj,[l.createVNode(st,{modelValue:t.value,"onUpdate:modelValue":_[16]||(_[16]=Q=>t.value=Q),accordion:""},{default:l.withCtx(()=>[l.createVNode(Z,{title:"线段设置",name:"0"},{default:l.withCtx(()=>[l.createElementVNode("div",Xj,[l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[18]||(_[18]=[l.createElementVNode("div",{class:"row-label"},"颜色1",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=Q=>s.value=Q),"show-alpha":!0,size:"small",onChange:d},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[19]||(_[19]=[l.createElementVNode("div",{class:"row-label"},"颜色2",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:r.value,"onUpdate:modelValue":_[1]||(_[1]=Q=>r.value=Q),"show-alpha":!0,size:"small",onChange:d},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[20]||(_[20]=[l.createElementVNode("div",{class:"row-label"},"粗细",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:i.value,"onUpdate:modelValue":_[2]||(_[2]=Q=>i.value=Q),size:"small","controls-position":"right",onChange:d,min:1,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(Z,{title:"管道设置",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",Kj,[l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[21]||(_[21]=[l.createElementVNode("div",{class:"row-label"},"管道间隔",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:o.value,"onUpdate:modelValue":_[3]||(_[3]=Q=>o.value=Q),size:"small","controls-position":"right",onChange:d,min:5,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[22]||(_[22]=[l.createElementVNode("div",{class:"row-label"},"默认流动方向",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(te,{modelValue:a.value,"onUpdate:modelValue":_[4]||(_[4]=Q=>a.value=Q),placeholder:"请选择管道方向",size:"small",onChange:d},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a0),Q=>(l.openBlock(),l.createBlock(ge,{key:Q.value,label:Q.label,value:Q.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[23]||(_[23]=[l.createElementVNode("div",{class:"row-label"},"参数设置",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(te,{modelValue:b.value,"onUpdate:modelValue":_[5]||(_[5]=Q=>b.value=Q),placeholder:"请选择设备",onChange:S,size:"small",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(y.value,Q=>(l.openBlock(),l.createBlock(ge,{key:Q.deviceCode,label:Q.deviceName,value:Q.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.createVNode(te,{modelValue:w.value,"onUpdate:modelValue":_[6]||(_[6]=Q=>w.value=Q),placeholder:"请选择字段",onChange:P,size:"small",filterable:"",clearable:"",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(E.value,Q=>(l.openBlock(),l.createBlock(ge,{key:Q.dataField,label:Q.name,value:Q.dataField},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[24]||(_[24]=[l.createElementVNode("div",{class:"row-label"},"条件配置",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(le,{modelValue:f.value,"onUpdate:modelValue":_[7]||(_[7]=Q=>f.value=Q),"active-value":!0,"inactive-value":!1,size:"small",onChange:h},null,8,["modelValue"]),l.createVNode(bt,{type:"primary",size:"small",onClick:g,style:{"margin-left":"10px"}},{default:l.withCtx(()=>_[25]||(_[25]=[l.createTextVNode("配置")])),_:1})]),_:1})]),_:1})])]),_:1}),l.createVNode(Z,{title:"箭头1设置",name:"2"},{default:l.withCtx(()=>[l.createElementVNode("div",Zj,[l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[26]||(_[26]=[l.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(te,{modelValue:c.name,"onUpdate:modelValue":_[8]||(_[8]=Q=>c.name=Q),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:d},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cl),Q=>(l.openBlock(),l.createBlock(ge,{key:Q.value,label:Q.label,value:Q.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[27]||(_[27]=[l.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:c.args.width,"onUpdate:modelValue":_[9]||(_[9]=Q=>c.args.width=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[28]||(_[28]=[l.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:c.args.height,"onUpdate:modelValue":_[10]||(_[10]=Q=>c.args.height=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[29]||(_[29]=[l.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:c.args.offset,"onUpdate:modelValue":_[11]||(_[11]=Q=>c.args.offset=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(Z,{title:"箭头2设置",name:"3"},{default:l.withCtx(()=>[l.createElementVNode("div",Qj,[l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[30]||(_[30]=[l.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(te,{modelValue:u.name,"onUpdate:modelValue":_[12]||(_[12]=Q=>u.name=Q),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:d},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cl),Q=>(l.openBlock(),l.createBlock(ge,{key:Q.value,label:Q.label,value:Q.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[31]||(_[31]=[l.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:u.args.width,"onUpdate:modelValue":_[13]||(_[13]=Q=>u.args.width=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[32]||(_[32]=[l.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:u.args.height,"onUpdate:modelValue":_[14]||(_[14]=Q=>u.args.height=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(q,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>_[33]||(_[33]=[l.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(re,{modelValue:u.args.offset,"onUpdate:modelValue":_[15]||(_[15]=Q=>u.args.offset=Q),size:"small","controls-position":"right",onChange:d,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"]),l.createVNode(Pt,{modelValue:p.show,"onUpdate:modelValue":_[17]||(_[17]=Q=>p.show=Q),width:"500px",title:"条件配置","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[p.show?(l.openBlock(),l.createBlock(h0,{key:0,payload:p.payload,type:"pipe",onClose:m},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-607d9ef1"]]),t3={class:"container"},n3={class:"row-column"},s3={class:"row-column"},r3={class:"row-column"},i3={__name:"arrow-line",props:{payload:{type:Object}},setup(n){var T,k,V,R,j,N;const e=n,t=l.ref("0");console.log(e.payload);const s=l.ref(e.payload.attrs.line.stroke),r=l.ref(e.payload.attrs.line.strokeWidth),i=e.payload.markup.length-1,o=l.ref(e.payload.markup.length-1),a=l.ref(e.payload.attrs.arrow.fill),c=l.ref(e.payload.attrs.arrow.d===Wa?ui:Sd),u=l.ref(e.payload.attrs.arrow.style.animation.split(" ")[0]===nr?nr:ci),d=l.ref(e.payload.attrs.arrow.display),f=()=>{if(e.payload.attr("line/stroke",s.value),e.payload.attr("line/strokeWidth",r.value),e.payload.attr("arrow/fill",a.value),e.payload.attr("arrow/stroke",a.value),o.value!==i){e.payload.markup=e.payload.markup.slice(0,1);for(let M=0;M<o.value;M++)e.payload.markup.push({tagName:"path",groupSelector:"arrow",selector:"arrow"+(M+1)}),e.payload.attr("arrow"+(M+1),{atConnectionRatio:1/(o.value+1)*(M+1)})}e.payload.attr("arrow/d",c.value===ui?Wa:qm),e.payload.attr("arrow/style/animation",u.value===nr?"flashing 2s infinite linear":""),e.payload.attr("arrow/display",d.value),console.log(e.payload.markup),Qe.markup=e.payload.markup,Qe.attrs=e.payload.attrs},h=l.ref([]),p=l.ref(((V=(k=(T=e.payload.data)==null?void 0:T.fields)==null?void 0:k[0])==null?void 0:V.deviceCode)??""),g=l.ref(((N=(j=(R=e.payload.data)==null?void 0:R.fields)==null?void 0:j[0])==null?void 0:N.field)??""),m=async()=>{h.value=await Nu(),p.value&&b()};let y=l.reactive({});const b=()=>{y=h.value.find(M=>M.deviceCode===p.value),y?(x(),e.payload.data.fields=[{index:0,deviceName:y.deviceName,deviceCode:y.deviceCode,field:g.value??""}],g.value=e.payload.data.fields[0].field):(g.value="",e.payload.data.fields=[]),console.log("箭头线-配置",e.payload)},w=l.ref([]),x=async()=>{w.value=await Au(y.deviceCode)},v=()=>{e.payload.data.fields=[{index:0,deviceName:y.deviceName,deviceCode:y.deviceCode,field:g.value??""}],console.log("箭头线-配置",e.payload)},S=l.ref(e.payload.data.isCondition??!1),E=()=>{e.payload.data.isCondition=S.value},C=l.reactive({show:!1,payload:null}),P=()=>{C.show=!0,C.payload=e.payload.data.condition??[]},A=M=>{C.show=!1,C.payload=null,M&&(e.payload.data.condition=M),console.log("条件线",e.payload.data)};return l.onMounted(()=>{m()}),(M,D)=>{const B=l.resolveComponent("el-col"),G=l.resolveComponent("el-color-picker"),se=l.resolveComponent("el-row"),I=l.resolveComponent("el-input-number"),_=l.resolveComponent("el-collapse-item"),H=l.resolveComponent("el-option"),K=l.resolveComponent("el-select"),q=l.resolveComponent("el-switch"),re=l.resolveComponent("el-button"),Z=l.resolveComponent("el-collapse"),ge=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",t3,[l.createVNode(Z,{modelValue:t.value,"onUpdate:modelValue":D[10]||(D[10]=te=>t.value=te),accordion:""},{default:l.withCtx(()=>[l.createVNode(_,{title:"线段设置",name:"0"},{default:l.withCtx(()=>[l.createElementVNode("div",n3,[l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[12]||(D[12]=[l.createElementVNode("div",{class:"row-label"},"颜色",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(G,{modelValue:s.value,"onUpdate:modelValue":D[0]||(D[0]=te=>s.value=te),"show-alpha":!0,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[13]||(D[13]=[l.createElementVNode("div",{class:"row-label"},"粗细",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:r.value,"onUpdate:modelValue":D[1]||(D[1]=te=>r.value=te),size:"small","controls-position":"right",onChange:f,min:1,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(_,{title:"箭头设置",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",s3,[l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[14]||(D[14]=[l.createElementVNode("div",{class:"row-label"},"箭头数量",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(I,{modelValue:o.value,"onUpdate:modelValue":D[2]||(D[2]=te=>o.value=te),size:"small","controls-position":"right",onChange:f,min:1,max:20,step:1},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[15]||(D[15]=[l.createElementVNode("div",{class:"row-label"},"箭头颜色",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(G,{modelValue:a.value,"onUpdate:modelValue":D[3]||(D[3]=te=>a.value=te),"show-alpha":!0,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[16]||(D[16]=[l.createElementVNode("div",{class:"row-label"},"默认箭头方向",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:c.value,"onUpdate:modelValue":D[4]||(D[4]=te=>c.value=te),size:"small",onChange:f},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Sj),te=>(l.openBlock(),l.createBlock(H,{key:te.value,label:te.label,value:te.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[17]||(D[17]=[l.createElementVNode("div",{class:"row-label"},"默认箭头动作",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(q,{modelValue:u.value,"onUpdate:modelValue":D[5]||(D[5]=te=>u.value=te),"active-value":l.unref(nr),"active-text":"闪烁","inactive-value":l.unref(ci),"inactive-text":"静止",size:"small",onChange:f},null,8,["modelValue","active-value","inactive-value"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[18]||(D[18]=[l.createElementVNode("div",{class:"row-label"},"默认箭头显示",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(q,{modelValue:d.value,"onUpdate:modelValue":D[6]||(D[6]=te=>d.value=te),"active-value":"block","active-text":"显示","inactive-value":"none","inactive-text":"隐藏",size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),l.createVNode(_,{title:"动态设置",name:"2"},{default:l.withCtx(()=>[l.createElementVNode("div",r3,[l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[19]||(D[19]=[l.createElementVNode("div",{class:"row-label"},"参数设置",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:p.value,"onUpdate:modelValue":D[7]||(D[7]=te=>p.value=te),placeholder:"请选择设备",onChange:b,size:"small",filterable:"",clearable:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,te=>(l.openBlock(),l.createBlock(H,{key:te.deviceCode,label:te.deviceName,value:te.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l.createVNode(K,{modelValue:g.value,"onUpdate:modelValue":D[8]||(D[8]=te=>g.value=te),placeholder:"请选择字段",onChange:v,size:"small",filterable:"",clearable:"",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(w.value,te=>(l.openBlock(),l.createBlock(H,{key:te.dataField,label:te.name,value:te.dataField},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l.createVNode(se,{gutter:20},{default:l.withCtx(()=>[l.createVNode(B,{span:12},{default:l.withCtx(()=>D[20]||(D[20]=[l.createElementVNode("div",{class:"row-label"},"条件配置",-1)])),_:1}),l.createVNode(B,{span:12},{default:l.withCtx(()=>[l.createVNode(q,{modelValue:S.value,"onUpdate:modelValue":D[9]||(D[9]=te=>S.value=te),"active-value":!0,"inactive-value":!1,size:"small",onChange:E},null,8,["modelValue"]),l.createVNode(re,{type:"primary",size:"small",onClick:P,style:{"margin-left":"10px"}},{default:l.withCtx(()=>D[21]||(D[21]=[l.createTextVNode("配置")])),_:1})]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"]),l.createVNode(ge,{modelValue:C.show,"onUpdate:modelValue":D[11]||(D[11]=te=>C.show=te),width:"800px",title:"条件配置","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[C.show?(l.openBlock(),l.createBlock(h0,{key:0,payload:C.payload,type:"arrow",onClose:A},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue"])])}}},o3={class:"container"},a3={class:"row-column",style:{padding:"0 1px 10px"}},f0=Ut({__name:"index",props:{payload:Object},setup(n){const e=n,t=l.ref(e.payload.data.type),s=()=>{e.payload.data.type=t.value,t.value===xd&&(Qe.attrs=Ga.attrs,Qe.markup=Ga.markup),t.value===vd&&(Qe.attrs=Ym.attrs,Qe.markup=Ym.markup),t.value===Cd&&(Qe.attrs=Jm.attrs,Qe.markup=Jm.markup),e.payload.attrs=null,e.payload.attr(Qe.attrs),e.payload.markup=Qe.markup,i()},r=l.shallowRef(null),i=()=>{r.value=null,t.value===xd&&(r.value=Wj),t.value===vd&&(r.value=e3),t.value===Cd&&(r.value=i3)};return l.onMounted(()=>{i()}),(o,a)=>{const c=l.resolveComponent("el-col"),u=l.resolveComponent("el-option"),d=l.resolveComponent("el-select"),f=l.resolveComponent("el-row");return l.openBlock(),l.createElementBlock("div",o3,[l.createElementVNode("div",a3,[l.createVNode(f,{gutter:20},{default:l.withCtx(()=>[l.createVNode(c,{span:12},{default:l.withCtx(()=>a[1]||(a[1]=[l.createElementVNode("div",{class:"row-label"},"线段类型",-1)])),_:1}),l.createVNode(c,{span:12},{default:l.withCtx(()=>[l.createVNode(d,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=h=>t.value=h),placeholder:"请选择线段类型",clearable:"",size:"small",onChange:s},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Cj),h=>(l.openBlock(),l.createBlock(u,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.value),{payload:n.payload},null,8,["payload"]))])}}},[["__scopeId","data-v-b801c80f"]]),l3={class:"form-container"},c3=Ut({__name:"Shortcuts",setup(n){const e=l.ref([{name:"复制",windowsKey:"Ctrl + C",macKey:"Command + C"},{name:"粘贴",windowsKey:"Ctrl + V",macKey:"Command + V"},{name:"撤销",windowsKey:"Ctrl + Z",macKey:"Command + Z"},{name:"重做",windowsKey:"Ctrl + Y",macKey:"Command + Y"},{name:"框选",windowsKey:"Alt + LMB",macKey:"option + LMB"},{name:"多选",windowsKey:"Alt + LMB",macKey:"Command + LMB"}]);return(t,s)=>{const r=l.resolveComponent("el-table-column"),i=l.resolveComponent("el-table");return l.openBlock(),l.createElementBlock("div",l3,[l.createVNode(i,{data:e.value,size:"small",border:""},{default:l.withCtx(()=>[l.createVNode(r,{prop:"name",label:"名称"}),l.createVNode(r,{prop:"windowsKey",label:"windows"}),l.createVNode(r,{prop:"macKey",label:"mac"})]),_:1},8,["data"])])}}},[["__scopeId","data-v-99982d47"]]),u3=`.x6-widget-dnd {
|
|
484
484
|
position: absolute;
|
|
485
485
|
top: -10000px;
|
|
486
486
|
left: -10000px;
|
|
@@ -735,4 +735,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
|
|
|
735
735
|
font-size: 12px;
|
|
736
736
|
background: 0 0;
|
|
737
737
|
}
|
|
738
|
-
`;var p3=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class di extends be{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}constructor(e={}){super(),this.name="stencil",Fr(this.name,f3),this.graphs={},this.groups={},this.options=Object.assign(Object.assign({},di.defaultOptions),e),this.init()}init(){this.dnd=new _s(this.options),this.onSearch=mp(this.onSearch,200),this.initContainer(),this.initSearch(),this.initContent(),this.initGroups(),this.setTitle(),this.startListening()}load(e,t){return Array.isArray(e)?this.loadGroup(e,t):this.options.groups&&Object.keys(this.options.groups).forEach(s=>{e[s]&&this.loadGroup(e[s],s)}),this}unload(e,t){return Array.isArray(e)?this.loadGroup(e,t,!0):this.options.groups&&Object.keys(this.options.groups).forEach(s=>{e[s]&&this.loadGroup(e[s],s,!0)}),this}toggleGroup(e){return this.isGroupCollapsed(e)?this.expandGroup(e):this.collapseGroup(e),this}collapseGroup(e){if(this.isGroupCollapsable(e)){const t=this.groups[e];t&&!this.isGroupCollapsed(e)&&(this.trigger("group:collapse",{name:e}),X(t,"collapsed"))}return this}expandGroup(e){if(this.isGroupCollapsable(e)){const t=this.groups[e];t&&this.isGroupCollapsed(e)&&(this.trigger("group:expand",{name:e}),De(t,"collapsed"))}return this}isGroupCollapsable(e){const t=this.groups[e];return Pn(t,"collapsable")}isGroupCollapsed(e){const t=this.groups[e];return t&&Pn(t,"collapsed")}collapseGroups(){return Object.keys(this.groups).forEach(e=>this.collapseGroup(e)),this}expandGroups(){return Object.keys(this.groups).forEach(e=>this.expandGroup(e)),this}resizeGroup(e,t){const s=this.graphs[e];return s&&s.resize(t.width,t.height),this}addGroup(e){const t=Array.isArray(e)?e:[e];this.options.groups?this.options.groups.push(...t):this.options.groups=t,t.forEach(s=>this.initGroup(s))}removeGroup(e){const t=Array.isArray(e)?e:[e];this.options.groups&&(this.options.groups=this.options.groups.filter(s=>!t.includes(s.name)),t.forEach(s=>{const r=this.graphs[s];this.unregisterGraphEvents(r),r.dispose(),delete this.graphs[s];const i=this.groups[s];Ht(i),delete this.groups[s]}))}initContainer(){this.container=document.createElement("div"),X(this.container,this.prefixClassName(Mt.base)),fe(this.container,"data-not-found-text",this.options.notFoundText||"No matches found")}initContent(){this.content=document.createElement("div"),X(this.content,this.prefixClassName(Mt.content)),ys(this.content,this.container)}initSearch(){this.options.search&&(X(this.container,"searchable"),kt(this.container,this.renderSearch()))}initGroup(e){const t=this.options.stencilGraphOptions||{},s=document.createElement("div");X(s,this.prefixClassName(Mt.group)),fe(s,"data-name",e.name),(e.collapsable==null&&this.options.collapsable||e.collapsable!==!1)&&X(s,"collapsable"),hn(s,"collapsed",e.collapsed===!0);const r=document.createElement("h3");X(r,this.prefixClassName(Mt.groupTitle)),r.innerHTML=e.title||e.name;const i=document.createElement("div");X(i,this.prefixClassName(Mt.groupContent));const o=e.graphOptions,a=new $(Object.assign(Object.assign(Object.assign({},t),o),{container:document.createElement("div"),model:t.model||new et,width:e.graphWidth||this.options.stencilGraphWidth,height:e.graphHeight||this.options.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));this.registerGraphEvents(a),kt(i,a.container),kt(s,[r,i]),ys(s,this.content),this.groups[e.name]=s,this.graphs[e.name]=a}initGroups(){if(this.clearGroups(),this.setCollapsableState(),this.options.groups&&this.options.groups.length)this.options.groups.forEach(e=>{this.initGroup(e)});else{const e=this.options.stencilGraphOptions||{},t=new $(Object.assign(Object.assign({},e),{container:document.createElement("div"),model:e.model||new et,width:this.options.stencilGraphWidth,height:this.options.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));kt(this.content,t.container),this.graphs[xo.defaultGroupName]=t}}setCollapsableState(){this.options.collapsable=this.options.collapsable&&this.options.groups&&this.options.groups.some(e=>e.collapsable!==!1),this.options.collapsable?(X(this.container,"collapsable"),this.options.groups&&this.options.groups.every(t=>t.collapsed||t.collapsable===!1)?X(this.container,"collapsed"):De(this.container,"collapsed")):De(this.container,"collapsable")}setTitle(){const e=document.createElement("div");X(e,this.prefixClassName(Mt.title)),e.innerHTML=this.options.title,ys(e,this.container)}renderSearch(){const e=document.createElement("div");X(e,this.prefixClassName(Mt.search));const t=document.createElement("input");return fe(t,{type:"search",placeholder:this.options.placeholder||"Search"}),X(t,this.prefixClassName(Mt.searchText)),kt(e,t),e}startListening(){const e=this.prefixClassName(Mt.title),t=this.prefixClassName(Mt.searchText),s=this.prefixClassName(Mt.groupTitle);this.delegateEvents({[`click .${e}`]:"onTitleClick",[`touchstart .${e}`]:"onTitleClick",[`click .${s}`]:"onGroupTitleClick",[`touchstart .${s}`]:"onGroupTitleClick",[`input .${t}`]:"onSearch",[`focusin .${t}`]:"onSearchFocusIn",[`focusout .${t}`]:"onSearchFocusOut"})}stopListening(){this.undelegateEvents()}registerGraphEvents(e){e.on("cell:mousedown",this.onDragStart,this)}unregisterGraphEvents(e){e.off("cell:mousedown",this.onDragStart,this)}loadGroup(e,t,s){const r=this.getModel(t);if(r){const c=e.map(u=>He.isNode(u)?u:He.create(u));s===!0?r.removeCells(c):r.resetCells(c)}const i=this.getGroup(t);let o=this.options.stencilGraphHeight;i&&i.graphHeight!=null&&(o=i.graphHeight);const a=i&&i.layout||this.options.layout;if(a&&r&&ee(a,this,r,i),!o){const c=this.getGraph(t);c.fitToContent({minWidth:c.options.width,gridHeight:1,padding:i&&i.graphPadding||this.options.stencilGraphPadding||10})}return this}onDragStart(e){const{e:t,node:s}=e,r=this.getGroupByNode(s);r&&r.nodeMovable===!1||this.dnd.start(s,t)}filter(e,t){const s=Object.keys(this.graphs).reduce((r,i)=>{const o=this.graphs[i],a=i===xo.defaultGroupName?null:i,c=o.model.getNodes().filter(h=>{let p=!1;typeof t=="function"?p=ee(t,this,h,e,a,this):typeof t=="boolean"?p=t:p=this.isCellMatched(h,e,t,e.toLowerCase()!==e);const g=o.renderer.findViewByCell(h);return g&&hn(g.container,"unmatched",!p),p}),u=c.length>0,d=this.options,f=new et;return f.resetCells(c),d.layout&&ee(d.layout,this,f,this.getGroup(i)),this.groups[i]&&hn(this.groups[i],"unmatched",!u),o.fitToContent({gridWidth:1,gridHeight:1,padding:d.stencilGraphPadding||10}),r||u},!1);hn(this.container,"not-found",!s)}isCellMatched(e,t,s,r){return t&&s?Object.keys(s).some(i=>{if(i==="*"||e.shape===i){const o=s[i];return typeof o=="boolean"?o:(Array.isArray(o)?o:[o]).some(c=>{let u=e.getPropByPath(c);return u!=null?(u=`${u}`,r||(u=u.toLowerCase()),u.indexOf(t)>=0):!1})}return!1}):!0}onSearch(e){this.filter(e.target.value,this.options.search)}onSearchFocusIn(){X(this.container,"is-focused")}onSearchFocusOut(){De(this.container,"is-focused")}onTitleClick(){this.options.collapsable&&(hn(this.container,"collapsed"),Pn(this.container,"collapsed")?this.collapseGroups():this.expandGroups())}onGroupTitleClick(e){const t=e.target.closest(`.${this.prefixClassName(Mt.group)}`);t&&this.toggleGroup(fe(t,"data-name")||"");const s=Object.keys(this.groups).every(r=>{const i=this.getGroup(r),o=this.groups[r];return i&&i.collapsable===!1||Pn(o,"collapsed")});hn(this.container,"collapsed",s)}getModel(e){const t=this.getGraph(e);return t?t.model:null}getGraph(e){return this.graphs[e||xo.defaultGroupName]}getGroup(e){const t=this.options.groups;return e!=null&&t&&t.length?t.find(s=>s.name===e):null}getGroupByNode(e){const t=this.options.groups;return t?t.find(s=>{const r=this.getModel(s.name);return r?r.has(e.id):!1}):null}clearGroups(){Object.keys(this.graphs).forEach(e=>{const t=this.graphs[e];this.unregisterGraphEvents(t),t.dispose()}),Object.keys(this.groups).forEach(e=>{const t=this.groups[e];Ht(t)}),this.graphs={},this.groups={}}onRemove(){this.clearGroups(),this.dnd.remove(),this.stopListening(),this.undelegateDocumentEvents()}dispose(){this.remove(),Ur(this.name)}}p3([be.dispose()],di.prototype,"dispose",null),function(n){n.defaultOptions=Object.assign({stencilGraphWidth:200,stencilGraphHeight:800,title:"Stencil",collapsable:!1,placeholder:"Search",notFoundText:"No matches found",layout(e,t){const s={columnWidth:this.options.stencilGraphWidth/2-10,columns:2,rowHeight:80,resizeToFit:!1,dx:10,dy:10};h3(e,Object.assign(Object.assign(Object.assign({},s),this.options.layoutOptions),t?t.layoutOptions:{}))}},_s.defaults)}(di||(di={}));var Mt;(function(n){n.base="widget-stencil",n.title=`${n.base}-title`,n.search=`${n.base}-search`,n.searchText=`${n.search}-text`,n.content=`${n.base}-content`,n.group=`${n.base}-group`,n.groupTitle=`${n.group}-title`,n.groupContent=`${n.group}-content`})(Mt||(Mt={}));var xo;(function(n){n.defaultGroupName="__default__"})(xo||(xo={})),$.prototype.toSVG=function(n,e){const t=this.getPlugin("export");t&&t.toSVG(n,e)},$.prototype.toPNG=function(n,e){const t=this.getPlugin("export");t&&t.toPNG(n,e)},$.prototype.toJPEG=function(n,e){const t=this.getPlugin("export");t&&t.toJPEG(n,e)},$.prototype.exportPNG=function(n,e){const t=this.getPlugin("export");t&&t.exportPNG(n,e)},$.prototype.exportJPEG=function(n,e){const t=this.getPlugin("export");t&&t.exportJPEG(n,e)},$.prototype.exportSVG=function(n,e){const t=this.getPlugin("export");t&&t.exportSVG(n,e)};var g3=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class p0 extends Te{constructor(){super(),this.name="export"}get view(){return this.graph.view}init(e){this.graph=e}exportPNG(e="chart",t={}){this.toPNG(s=>{Ys.downloadDataUri(s,e)},t)}exportJPEG(e="chart",t={}){this.toPNG(s=>{Ys.downloadDataUri(s,e)},t)}exportSVG(e="chart",t={}){this.toSVG(s=>{Ys.downloadDataUri(Ys.svgToDataUrl(s),e)},t)}toSVG(e,t={}){this.notify("before:export",t);const s=this.view.svg,r=oe.create(s).clone();let i=r.node;const o=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),a=t.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),c=t.preserveDimensions;if(c){const f=typeof c=="boolean"?a:c;r.attr({width:f.width,height:f.height})}if(r.removeAttribute("style").attr("viewBox",[a.x,a.y,a.width,a.height].join(" ")),o.removeAttribute("transform"),t.copyStyles!==!1){const f=s.ownerDocument,h=Array.from(s.querySelectorAll("*")),p=Array.from(i.querySelectorAll("*")),g=f.styleSheets.length,m=[];for(let w=g-1;w>=0;w-=1)m[w]=f.styleSheets[w],f.styleSheets[w].disabled=!0;const y={};h.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S={};Object.keys(v).forEach(E=>{S[E]=v.getPropertyValue(E)}),y[x]=S}),g!==f.styleSheets.length&&m.forEach((w,x)=>{f.styleSheets[x]=w});for(let w=0;w<g;w+=1)f.styleSheets[w].disabled=!1;const b={};h.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S=y[x],E={};Object.keys(v).forEach(C=>{!kc(C)&&v.getPropertyValue(C)!==S[C]&&(E[C]=v.getPropertyValue(C))}),b[x]=E}),p.forEach((w,x)=>{Je(w,b[x])})}const u=t.stylesheet;if(typeof u=="string"){const f=s.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(u);r.prepend(oe.create("style",{type:"text/css"},[f]))}const d=()=>{const f=t.beforeSerialize;if(typeof f=="function"){const p=ee(f,this.graph,i);p instanceof SVGSVGElement&&(i=p)}const h=new XMLSerializer().serializeToString(i).replace(/ /g," ");this.notify("after:export",t),e(h)};if(t.serializeImages){const f=r.find("image").map(h=>new Promise(p=>{const g=h.attr("xlink:href")||h.attr("href");Ys.imageToDataUri(g,(m,y)=>{!m&&y&&h.attr("xlink:href",y),p()})}));Promise.all(f).then(d)}else d()}toDataURL(e,t){let s=t.viewBox||this.graph.getContentBBox();const r=ps(t.padding);t.width&&t.height&&(r.left+r.right>=t.width&&(r.left=r.right=0),r.top+r.bottom>=t.height&&(r.top=r.bottom=0));const i=new F(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(t.width&&t.height){const d=s.width+r.left+r.right,f=s.height+r.top+r.bottom;i.scale(d/t.width,f/t.height)}s=F.create(s).moveAndExpand(i);const o=typeof t.width=="number"&&typeof t.height=="number"?{width:t.width,height:t.height}:s;let a=t.ratio?parseFloat(t.ratio):1;(!Number.isFinite(a)||a===0)&&(a=1);const c={width:Math.max(Math.round(o.width*a),1),height:Math.max(Math.round(o.height*a),1)};{const d=document.createElement("canvas"),f=d.getContext("2d");d.width=c.width,d.height=c.height;const h=c.width-1,p=c.height-1;f.fillStyle="rgb(1,1,1)",f.fillRect(h,p,1,1);const g=f.getImageData(h,p,1,1).data;if(g[0]!==1||g[1]!==1||g[2]!==1)throw new Error("size exceeded")}const u=new Image;u.onload=()=>{const d=document.createElement("canvas");d.width=c.width,d.height=c.height;const f=d.getContext("2d");f.fillStyle=t.backgroundColor||"white",f.fillRect(0,0,c.width,c.height);try{f.drawImage(u,0,0,c.width,c.height);const h=d.toDataURL(t.type,t.quality);e(h)}catch{}},this.toSVG(d=>{u.src=`data:image/svg+xml,${encodeURIComponent(d)}`},Object.assign(Object.assign({},t),{viewBox:s,serializeImages:!0,preserveDimensions:Object.assign({},c)}))}toPNG(e,t={}){this.toDataURL(e,Object.assign(Object.assign({},t),{type:"image/png"}))}toJPEG(e,t={}){this.toDataURL(e,Object.assign(Object.assign({},t),{type:"image/jpeg"}))}notify(e,t){this.trigger(e,t),this.graph.trigger(e,t)}dispose(){this.off()}}g3([Te.dispose()],p0.prototype,"dispose",null);const m3={class:"control-box"},y3=Ut({__name:"index",props:{payload:Object},setup(n){const e=n,t=l.ref("3"),s=l.ref([]),r=()=>{s.value=JSON.parse(JSON.stringify(e.payload.getPorts().map(u=>({id:u.id,attrs:u.attrs,args:{x:Number(u.args.x.replace("%","")),y:Number(u.args.y.replace("%",""))}}))))},i=()=>{const u=_u;u.attrs.text.text=`${e.payload.getPorts().length+1}`,u.args.x="50%",u.args.y="50%",e.payload.addPorts([{group:"ports",...u}]),r()},o=()=>{Ki("#drawing-board",!0)},a=(u,d,f)=>{e.payload.portProp(u,"args/"+d,f+"%"),r()},c=u=>{e.payload.removePort(u),r()};return l.onMounted(()=>{r()}),(u,d)=>{const f=l.resolveComponent("el-button"),h=l.resolveComponent("el-table-column"),p=l.resolveComponent("el-slider"),g=l.resolveComponent("el-icon"),m=l.resolveComponent("el-table"),y=l.resolveComponent("el-collapse-item"),b=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",m3,[l.createVNode(b,{modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=w=>t.value=w),accordion:""},{default:l.withCtx(()=>[l.createVNode(y,{title:"连接桩设置",name:"3"},{default:l.withCtx(()=>[l.createVNode(f,{type:"primary",onClick:i,size:"small"},{default:l.withCtx(()=>d[1]||(d[1]=[l.createTextVNode("添加连接桩")])),_:1}),l.createVNode(f,{type:"primary",onClick:o,size:"small"},{default:l.withCtx(()=>d[2]||(d[2]=[l.createTextVNode("显示连接桩")])),_:1}),l.createVNode(m,{data:s.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[l.createVNode(h,{label:"ID",width:"50",align:"center"},{default:l.withCtx(({row:w})=>[l.createTextVNode(l.toDisplayString(w.attrs.text.text),1)]),_:1}),l.createVNode(h,{label:"x",width:"100",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(p,{modelValue:w.args.x,"onUpdate:modelValue":x=>w.args.x=x,min:0,max:100,step:1,onInput:x=>a(w.id,"x",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(h,{label:"y",width:"100",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(p,{modelValue:w.args.y,"onUpdate:modelValue":x=>w.args.y=x,min:0,max:100,step:1,onInput:x=>a(w.id,"y",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(h,{label:"操作",width:"70",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(f,{type:"danger",size:"small",onClick:x=>c(w.id)},{default:l.withCtx(()=>[l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(l.unref(Vp))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-b280098c"]]),El=[{shape:"rect",width:60,height:5,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:0}},data:{type:"base-shape"}},{shape:"rect",width:60,height:20,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape",label:"母线"}},{shape:"circle",width:40,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape"}},{shape:"ellipse",width:60,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff"}},data:{type:"base-shape"}}],g0={groups:{ports:{position:"absolute",args:{x:0,y:0},attrs:{circle:{magnet:!0,stroke:"#8f8f8f",r:4}},label:{position:"top"}}}},Od=Object.assign({name:"wiring-diagram-preview"},{__name:"index",props:{id:{type:String,default:""},background:{type:Object,default:()=>({})},grid:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},setup(n){const e=n,t=l.ref(),s=()=>{const b=document.getElementById("preview-container");t.value=new $({container:b,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center"},interacting:{nodeMovable:!1,magnetConnectable:!1,edgeMovable:!1,edgeLabelMovable:!1,arrowheadMovable:!1,vertexMovable:!1,vertexAddable:!1,vertexDeletable:!1}}),t.value.on("blank:dblclick",()=>{d()})},r=async()=>{let b,w,x;if(e.id){const{background:v,grid:S,data:E}=await Hm(e.id);b=v,w=S,x=E}else b=e.background,w={},x=e.data;t.value.drawBackground(b),t.value.drawGrid(w),t.value.fromJSON(x),c()},i=l.ref(null),o=l.ref([]),a=l.ref([]),c=()=>{o.value=t.value.getCells().filter(b=>{var w,x,v;return((w=b==null?void 0:b.data)==null?void 0:w.type)==="text"||((x=b==null?void 0:b.data)==null?void 0:x.type)==="pipe"||((v=b==null?void 0:b.data)==null?void 0:v.type)==="arrow"}),o.value.forEach(b=>{var w,x;(x=(w=b==null?void 0:b.data)==null?void 0:w.fields)!=null&&x.length&&(b==null||b.data.fields.forEach(v=>{v.field&&a.value.push({id:b==null?void 0:b.id,fields:b==null?void 0:b.data.fields})}))}),console.log("所有字段",a.value),d()},u=l.ref(!0),d=async()=>{if(!a.value.length)return;if(!u.value){Ye.warning("数据正在更新中,请稍后再试");return}i.value&&clearInterval(i.value),u.value=!1;let b=await sD(a.value).catch(()=>{u.value=!0});u.value=!0,b==null||b.forEach(w=>{var v,S,E;const x=t.value.getCellById(w.id);console.log("122222222",x),x.data.type==="text"&&(x.label=f(x.data.content,w.fields)),x.data.type==="pipe"&&(console.log("管道详情",x,(v=w.fields)==null?void 0:v[0].value),h(x,(S=w.fields)==null?void 0:S[0].value)),x.data.type==="arrow"&&p(x,(E=w.fields)==null?void 0:E[0].value)}),i.value=setTimeout(()=>{d()},1e4)},f=(b,w)=>{let x=0;return b.replace(Sl,()=>{const v=w.find(S=>S.index===x);return x++,v?v.value:u0})},h=(b,w)=>{if(!b.data.isCondition)return!1;for(let x=0;x<b.data.condition.length;x++)if(Number(w)>b.data.condition[x].min&&Number(w)<=b.data.condition[x].max)return b.attr("line2/style/animation",c0(b.data.condition[x].direction)),!1},p=(b,w)=>{if(console.log(b,w),!b.data.isCondition)return!1;for(let x=0;x<b.data.condition.length;x++)if(Number(w)>b.data.condition[x].min&&Number(w)<=b.data.condition[x].max)return b.attr("arrow/style/animation",b.data.condition[x].animation===nr?"flashing 2s infinite linear":""),b.attr("arrow/d",b.data.condition[x].direction===ui?Ga:Jm),b.attr("arrow/display",b.data.condition[x].display),!1},g=()=>{t.value.zoomToFit({maxScale:1.4,padding:20})},m=l.shallowRef(),y=()=>{new ResizeObserver(()=>{g()}).observe(m.value)};return l.onMounted(()=>{s(),r(),setTimeout(()=>{Ki("#preview-container",!1),g()},100),y()}),l.onUnmounted(()=>{clearInterval(i.value)}),(b,w)=>(l.openBlock(),l.createElementBlock("div",{id:"preview-container",ref_key:"previewRef",ref:m,onDblclick:g},null,544))}}),b3={class:"form-container"},w3={class:"footer"},x3=Ut({__name:"group-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:e}){const t=n,s=e,r=l.reactive({groupName:"",sort:1,isShow:1}),i=l.reactive({groupName:[{required:!0,message:"请输入分组名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}],isShow:[{required:!0,message:"请选择是否显示",trigger:"change"}]}),o=l.ref(),a=()=>{console.log(r),o.value.validate(u=>{if(u)r.id?Ha("/cny/custom/updateGroup",r).then(d=>{d!=null&&d.isOk?(Ye.success("保存成功"),s("close",!0)):Ye.error((d==null?void 0:d.msg)||"保存失败")}):Ha("/cny/custom/saveGroup",r).then(d=>{d!=null&&d.isOk?(Ye.success("保存成功"),s("close",!0)):Ye.error((d==null?void 0:d.msg)||"保存失败")});else return!1})},c=()=>{s("close",!1)};return l.onMounted(()=>{var u;(u=t.payload)!=null&&u.id&&(r.id=t.payload.id,r.groupName=t.payload.groupName,r.sort=t.payload.sort,r.isShow=t.payload.isShow)}),(u,d)=>{const f=l.resolveComponent("el-input"),h=l.resolveComponent("el-form-item"),p=l.resolveComponent("el-input-number"),g=l.resolveComponent("el-switch"),m=l.resolveComponent("el-button"),y=l.resolveComponent("el-form");return l.openBlock(),l.createElementBlock("div",b3,[l.createVNode(y,{ref_key:"form",ref:o,model:r,rules:i,"label-width":"90px","label-suffix":":"},{default:l.withCtx(()=>[l.createVNode(h,{label:"分组名称",prop:"groupName"},{default:l.withCtx(()=>[l.createVNode(f,{modelValue:r.groupName,"onUpdate:modelValue":d[0]||(d[0]=b=>r.groupName=b),placeholder:"请输入分组名称",clearable:""},null,8,["modelValue"])]),_:1}),l.createVNode(h,{label:"排序",prop:"sort"},{default:l.withCtx(()=>[l.createVNode(p,{modelValue:r.sort,"onUpdate:modelValue":d[1]||(d[1]=b=>r.sort=b),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),l.createVNode(h,{label:"是否显示",prop:"isShow"},{default:l.withCtx(()=>[l.createVNode(g,{modelValue:r.isShow,"onUpdate:modelValue":d[2]||(d[2]=b=>r.isShow=b),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),l.createElementVNode("div",w3,[l.createVNode(m,{type:"primary",onClick:a},{default:l.withCtx(()=>d[3]||(d[3]=[l.createTextVNode("保存")])),_:1}),l.createVNode(m,{onClick:c},{default:l.withCtx(()=>d[4]||(d[4]=[l.createTextVNode("取消")])),_:1})])]),_:1},8,["model","rules"])])}}},[["__scopeId","data-v-a2a7ce25"]]),v3={class:"form-container"},C3={class:"footer"},S3=Ut({__name:"image-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:e}){const t=e,s=n,r=l.shallowRef(null),i=l.reactive({groupId:"",id:"",imageName:"",sort:0,isShow:1,imageUrl:""}),o={imageName:[{required:!0,message:"请输入图片名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}]},a=l.ref(""),c=f=>{if(f.raw.type.indexOf("image")===-1){Ye.error("请上传图片格式的文件");return}const h=new FormData;h.append("file",f.raw),nD("/cny/file/fileUpload",h).then(p=>{p!=null&&p.isOk?(a.value=Mn.defaults.baseURL+"/cny/upload/"+(p==null?void 0:p.data),i.imageUrl=p==null?void 0:p.data):Ye.error((p==null?void 0:p.msg)||"上传失败")})},u=()=>{console.log(i),r.value.validate(f=>{if(f)Ha("/cny/custom/savePicture",i).then(h=>{h!=null&&h.isOk?(Ye.success("保存成功"),t("close",!0)):Ye.error((h==null?void 0:h.msg)||"保存失败")});else return!1})},d=()=>{t("close",!1)};return l.onMounted(()=>{var f;(f=s.payload)!=null&&f.id&&(i.id=s.payload.id,i.imageName=s.payload.imageName,i.sort=s.payload.sort,i.isShow=s.payload.isShow,i.imageUrl=s.payload.imageUrl,a.value=i.imageUrl),i.groupId=s.payload.groupId}),(f,h)=>{const p=l.resolveComponent("el-input"),g=l.resolveComponent("el-form-item"),m=l.resolveComponent("el-input-number"),y=l.resolveComponent("el-switch"),b=l.resolveComponent("el-image"),w=l.resolveComponent("el-icon"),x=l.resolveComponent("el-upload"),v=l.resolveComponent("el-button"),S=l.resolveComponent("el-form");return l.openBlock(),l.createElementBlock("div",v3,[l.createVNode(S,{ref_key:"form",ref:r,model:i,rules:o,"label-width":"90px","label-suffix":":"},{default:l.withCtx(()=>[l.createVNode(g,{label:"图片名称",prop:"imageName"},{default:l.withCtx(()=>[l.createVNode(p,{modelValue:i.imageName,"onUpdate:modelValue":h[0]||(h[0]=E=>i.imageName=E),placeholder:"请输入图片名称"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"排序",prop:"sort"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:i.sort,"onUpdate:modelValue":h[1]||(h[1]=E=>i.sort=E),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"是否显示",prop:"isShow"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:i.isShow,"onUpdate:modelValue":h[2]||(h[2]=E=>i.isShow=E),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"上传",prop:"image"},{default:l.withCtx(()=>[l.createVNode(x,{action:"","list-type":"picture",class:"avatar-uploader","show-file-list":!1,"on-change":c,"auto-upload":!1},{default:l.withCtx(()=>[a.value?(l.openBlock(),l.createBlock(b,{key:0,src:a.value,fit:"cover",style:{width:"64px",height:"64px"}},null,8,["src"])):(l.openBlock(),l.createBlock(w,{key:1,class:"avatar-uploader-icon"},{default:l.withCtx(()=>[l.createVNode(l.unref(xN))]),_:1}))]),_:1})]),_:1}),l.createElementVNode("div",C3,[l.createVNode(v,{type:"primary",onClick:u},{default:l.withCtx(()=>h[3]||(h[3]=[l.createTextVNode("保存")])),_:1}),l.createVNode(v,{onClick:d},{default:l.withCtx(()=>h[4]||(h[4]=[l.createTextVNode("取消")])),_:1})])]),_:1},8,["model"])])}}},[["__scopeId","data-v-c7d87a18"]]),E3={class:"form-container"},O3={style:{padding:"0 10px",display:"flex","flex-direction":"column",gap:"5px","align-items":"flex-start"}},M3=["src"],P3=Ut({__name:"image-management",setup(n){const e=l.reactive({items:[]}),t=()=>{Xi("/cny/custom/groupList").then(h=>{e.items=h.data})},s=l.reactive({show:!1,title:"新增图片分组",payload:null}),r=()=>{s.show=!0,s.title="新增图片分组",s.payload=null},i=h=>{s.show=!0,s.title="编辑图片分组",s.payload={id:h.id,groupName:h.groupName,sort:h.sort,isShow:h.isShow}},o=h=>{Um("/cny/custom/removeGroup/"+h).then(p=>{p.code===200?(Ye.success("删除成功"),t()):Ye.error(p.msg||"删除失败")})},a=l.reactive({show:!1,title:"新增图片",payload:null}),c=h=>{a.show=!0,a.title="新增图片",a.payload={groupId:h}},u=h=>{a.show=!0,a.title="编辑图片",a.payload={id:h.id,groupId:h.groupId,imageName:h.imageName,sort:h.sort,isShow:h.isShow,imageUrl:h.imageUrl}},d=h=>{Um("/cny/custom/removePicture/"+h).then(p=>{p.code===200?(Ye.success("删除成功"),t()):Ye.error(p.msg||"删除失败")})},f=h=>{s.show=!1,a.show=!1,h&&t()};return l.onMounted(()=>{t()}),(h,p)=>{const g=l.resolveComponent("el-button"),m=l.resolveComponent("el-table-column"),y=l.resolveComponent("el-table"),b=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",E3,[l.createVNode(g,{type:"primary",onClick:r,size:"small"},{default:l.withCtx(()=>p[2]||(p[2]=[l.createTextVNode("新增图片分组")])),_:1}),l.createVNode(y,{data:e.items,border:"",height:"500"},{default:l.withCtx(()=>[l.createVNode(m,{type:"expand"},{default:l.withCtx(w=>[l.createElementVNode("div",O3,[l.createVNode(g,{type:"primary",size:"small",onClick:x=>c(w.row.id)},{default:l.withCtx(()=>p[3]||(p[3]=[l.createTextVNode("新增图片")])),_:2},1032,["onClick"]),l.createVNode(y,{data:w.row.pictureList,border:"",size:"small"},{default:l.withCtx(()=>[l.createVNode(m,{label:"名称",prop:"imageName",align:"center"}),l.createVNode(m,{label:"图片",prop:"imageUrl",align:"center"},{default:l.withCtx(x=>[l.createElementVNode("img",{src:l.unref(Mn).defaults.baseURL+x.row.imageUrl,alt:"",style:{width:"64px",height:"64px"}},null,8,M3)]),_:1}),l.createVNode(m,{label:"排序",prop:"sort",align:"center"}),l.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:l.withCtx(x=>[l.createTextVNode(l.toDisplayString(x.row.isShow===1?"是":"否"),1)]),_:1}),l.createVNode(m,{label:"操作",align:"center"},{default:l.withCtx(x=>[l.createVNode(g,{type:"primary",size:"small",onClick:v=>u(x.row)},{default:l.withCtx(()=>p[4]||(p[4]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(g,{type:"danger",size:"small",onClick:v=>d(x.row.id)},{default:l.withCtx(()=>p[5]||(p[5]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:2},1032,["data"])])]),_:1}),l.createVNode(m,{label:"分组名称",prop:"groupName",align:"center"}),l.createVNode(m,{label:"排序",prop:"sort",align:"center"}),l.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:l.withCtx(w=>[l.createTextVNode(l.toDisplayString(w.row.isShow===1?"是":"否"),1)]),_:1}),l.createVNode(m,{label:"操作",align:"center"},{default:l.withCtx(w=>[l.createVNode(g,{type:"primary",size:"small",onClick:x=>i(w.row)},{default:l.withCtx(()=>p[6]||(p[6]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(g,{type:"danger",size:"small",onClick:x=>o(w.row.id)},{default:l.withCtx(()=>p[7]||(p[7]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l.createVNode(b,{modelValue:s.show,"onUpdate:modelValue":p[0]||(p[0]=w=>s.show=w),title:s.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[s.show?(l.openBlock(),l.createBlock(x3,{key:0,payload:s.payload,onClose:f},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),l.createVNode(b,{modelValue:a.show,"onUpdate:modelValue":p[1]||(p[1]=w=>a.show=w),title:a.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[a.show?(l.openBlock(),l.createBlock(S3,{key:0,payload:a.payload,onClose:f},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}}},[["__scopeId","data-v-a6e5644c"]]),N3={class:"page-container"},A3={class:"tool-bar"},_3={class:"action"},T3={class:"el-dropdown-link"},k3={class:"action",style:{"margin-right":"50px"}},V3={class:"board"},D3={class:"drawing-board-box"},R3={id:"controls"},L3={key:0,class:"controls-label"},I3={style:{width:"100%",height:"100%",background:"black"}},m0=Ut(Object.assign({name:"editor"},{__name:"index",props:{id:{type:String,default:""}},emits:["getJson"],setup(n,{emit:e}){const t=n,s=l.ref(),r=l.reactive({label:"",component:l.shallowRef(null)}),i=l.ref(null),o=l.ref(null),a=()=>{const V=document.getElementById("drawing-board");s.value=new $({container:V,autoResize:!0,panning:!0,mousewheel:!0,connecting:{snap:!0,allowEdge:!0,highlight:!0,router:"orth",connectionPoint:{name:"anchor"},anchor:"center",createEdge(){return s.value.createEdge({inherit:"edge",...Qe,data:{type:l0()},zIndex:0})}}}),s.value.use(Ej()),s.value.use(Oj()),s.value.use(Mj()),s.value.use(Pj()),s.value.use(Aj()),s.value.use(_j()),s.value.bindKey(["delete","backspace"],()=>{Tj(s.value)}),s.value.bindKey(["ctrl+c","cmd + c"],()=>{kj(s.value)}),s.value.bindKey(["ctrl+v","cmd + v"],()=>{Vj(s.value)}),s.value.bindKey(["ctrl+z","cmd + z"],()=>{Dj(s.value)}),s.value.bindKey(["ctrl+y","cmd + y"],()=>{Rj(s.value)});let R=null;s.value.on("edge:click",({cell:j})=>{o.value=j,r.component=f0,r.label="线段属性",i.value=Ed()}),s.value.on("edge:mouseenter",({cell:j})=>{clearTimeout(R),j.toFront(),Lj(j)}),s.value.on("edge:mouseleave",({cell:j})=>{R=setTimeout(()=>{j.toBack(),j.removeTools()},300)}),s.value.on("node:mouseenter",()=>{Ki("#drawing-board",!0)}),s.value.on("node:mouseleave",()=>{Ki("#drawing-board",!1)}),s.value.use(new p0),s.value.on("blank:click",({e:j,x:N,y:M})=>{o.value=s,r.component=lD,r.label="画布属性",i.value=Ed()}),s.value.on("cell:click",({cell:j})=>{var N,M;if(o.value=j,i.value=Ed(),((N=j.data)==null?void 0:N.type)==="text"){r.component=d0,r.label="文本属性";return}if(((M=j.data)==null?void 0:M.type)==="base-shape"){r.component=d0,r.label="基础图形属性";return}if((j==null?void 0:j.shape)==="edge"){r.component=f0,r.label="连线属性";return}if((j==null?void 0:j.shape)==="image"){r.component=y3,r.label="图片属性";return}r.component=null,r.label=null})},c=l.ref(),u=()=>{c.value=new di({target:s.value,...rD,groups:[{name:"基础组件",graphPadding:30}],search(j,N){var M;return((M=j.label)==null?void 0:M.indexOf(N))!==-1},placeholder:"搜索",notFoundText:"未找到匹配项",getDragNode:j=>{const N=j.clone({keepId:!0});return N.label!=="文本"&&(N.label=""),N}});const V=s.value.createNode({...iD}),R=El.map(j=>(j.ports=g0,s.value.createNode(j)));c.value.load([V,...R],"基础组件"),Xi("/cny/custom/groupList").then(j=>{const N=(j==null?void 0:j.data)||[];N==null||N.forEach(M=>{c.value.addGroup({name:M==null?void 0:M.groupName,graphPadding:30});const D=M==null?void 0:M.pictureList.map(B=>{const G={shape:"image",imageUrl:Mn.defaults.baseURL+(B==null?void 0:B.imageUrl),ports:g0,width:64,height:64,label:B.imageName};return s.value.createNode(G)});c.value.load(D,M==null?void 0:M.groupName),document.getElementById("stencil").appendChild(c.value.container)})}).finally(()=>{setTimeout(()=>{c.value.container.querySelectorAll(".x6-node").forEach((N,M)=>{if(M>El.length){const D=N.querySelector("text");N.style.position="relative",D&&(D.style.display="none",D.setAttribute("x","0%"),D.setAttribute("y","40"),D.style.fontSize="12px",D.style.fill="#ffffff")}N.addEventListener("mouseenter",D=>{if(M>El.length){const B=N.querySelector("text");B&&(B.style.display="block")}}),N.addEventListener("mouseleave",D=>{if(M>El.length){const B=N.querySelector("text");B&&(B.style.display="none")}})})},200)})},d=V=>{switch(V){case"snapLine":s.value.isSnaplineEnabled()?(s.value.disableSnapline(),Ye.warning("关闭对齐线")):(s.value.enableSnapline(),Ye.success("开启对齐线"));break;case"select":s.value.isSelectionEnabled()?(s.value.disableSelection(),Ye.warning("关闭框选")):(s.value.enableSelection(),Ye.success("开启框选"));break;case"drawLine":p();break;case"adaptive":g();break;case"shortcuts":y();break;case"image":w();break;case"clear":x();break;case"export":v();break}},f=l.ref(!1),h=l.ref(null),p=()=>{f.value=!0;const V=new Date;s.value.startBatch(V),s.value.disablePanning(),s.value.once("blank:mousedown",({e:R,x:j,y:N})=>{f.value&&(h.value=s.value.addEdge({source:{x:j,y:N},target:{x:j,y:N},...Qe,data:{type:l0(),isConnector:!1},zIndex:0}))}),s.value.on("blank:mousemove",({e:R,x:j,y:N})=>{f.value&&h.value.setTarget({x:j,y:N})}),s.value.on("blank:mouseup",({e:R,x:j,y:N})=>{f.value=!1,s.value.enablePanning(),s.value.stopBatch(V)})},g=()=>{s.value.zoomToFit({maxScale:1,padding:20})},m=l.reactive({show:!1}),y=()=>{m.show=!0},b=l.reactive({show:!1}),w=()=>{b.show=!0},x=()=>{s.value.clearCells(),s.value.drawBackground(Gm),s.value.drawGrid(Wm),Ye.success("清空成功")},v=()=>{const V=W().format("YYYYMMDDHHmmss");s.value.exportPNG(V,{padding:10,quality:1,backgroundColor:s.value.options.background.color})},S=e,E=l.reactive({show:!1,background:null,grid:null,data:null}),C=()=>{E.background=s.value.options.background,E.grid=s.value.options.grid,E.data=s.value.toJSON(),E.show=!0},P=()=>{S("getJson",{background:s.value.options.background,grid:s.value.options.grid,data:s.value.toJSON()})},A=async()=>{if(!t.id){s.value.drawBackground(Gm),s.value.drawGrid(Wm),s.value.fromJSON({cells:[]});return}const{background:V,grid:R,data:j}=await Hm(t.id);s.value.drawBackground(V),s.value.drawGrid(R),s.value.fromJSON(j),g()},T=l.shallowRef(null),k=()=>{new ResizeObserver(()=>{g()}).observe(T.value)};return l.onMounted(()=>{a(),u(),A(),k()}),(V,R)=>{const j=l.resolveComponent("el-icon"),N=l.resolveComponent("el-button"),M=l.resolveComponent("el-dropdown-item"),D=l.resolveComponent("el-dropdown-menu"),B=l.resolveComponent("el-dropdown"),G=l.resolveComponent("el-scrollbar"),se=l.resolveComponent("el-dialog"),I=l.resolveComponent("el-drawer");return l.openBlock(),l.createElementBlock("div",N3,[l.createElementVNode("div",A3,[l.createElementVNode("div",_3,[l.createVNode(B,{onCommand:d},{dropdown:l.withCtx(()=>[l.createVNode(D,null,{default:l.withCtx(()=>[l.createVNode(M,{command:"snapLine"},{default:l.withCtx(()=>R[4]||(R[4]=[l.createTextVNode("对齐线")])),_:1}),l.createVNode(M,{command:"select"},{default:l.withCtx(()=>R[5]||(R[5]=[l.createTextVNode("框选")])),_:1}),l.createVNode(M,{command:"drawLine"},{default:l.withCtx(()=>R[6]||(R[6]=[l.createTextVNode("绘制直线")])),_:1}),l.createVNode(M,{command:"adaptive"},{default:l.withCtx(()=>R[7]||(R[7]=[l.createTextVNode("视图自适应")])),_:1}),l.createVNode(M,{command:"shortcuts"},{default:l.withCtx(()=>R[8]||(R[8]=[l.createTextVNode("查看快捷键")])),_:1}),l.createVNode(M,{command:"image"},{default:l.withCtx(()=>R[9]||(R[9]=[l.createTextVNode("图片管理")])),_:1}),l.createVNode(M,{command:"clear"},{default:l.withCtx(()=>R[10]||(R[10]=[l.createTextVNode("清空画布")])),_:1}),l.createVNode(M,{command:"export"},{default:l.withCtx(()=>R[11]||(R[11]=[l.createTextVNode("导出成图片")])),_:1})]),_:1})]),default:l.withCtx(()=>[l.createElementVNode("span",T3,[l.createVNode(N,{size:"small",text:""},{default:l.withCtx(()=>[R[3]||(R[3]=l.createTextVNode("工具 ")),l.createVNode(j,null,{default:l.withCtx(()=>[l.createVNode(l.unref(iN))]),_:1})]),_:1})])]),_:1})]),l.createElementVNode("div",k3,[l.createVNode(l.unref(qg),{content:"预览",placement:"bottom"},{default:l.withCtx(()=>[l.createVNode(N,{size:"small",icon:l.unref(Lp),onClick:C},null,8,["icon"])]),_:1}),l.createVNode(l.unref(qg),{content:"保存",placement:"bottom"},{default:l.withCtx(()=>[l.createVNode(N,{size:"small",icon:l.unref(pN),onClick:P},null,8,["icon"])]),_:1})])]),l.createElementVNode("div",V3,[R[12]||(R[12]=l.createElementVNode("div",{id:"stencil"},null,-1)),l.createElementVNode("div",D3,[l.createElementVNode("div",{id:"drawing-board",ref_key:"drawBoard",ref:T},null,512)]),l.createElementVNode("div",R3,[r.label?(l.openBlock(),l.createElementBlock("div",L3,l.toDisplayString(r.label),1)):l.createCommentVNode("",!0),l.createVNode(G,null,{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.component),{graph:s.value,payload:o.value,key:i.value},null,8,["graph","payload"]))]),_:1})])]),l.createVNode(se,{modelValue:m.show,"onUpdate:modelValue":R[0]||(R[0]=_=>m.show=_),width:"400px",title:"快捷键","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[l.createVNode(c3)]),_:1},8,["modelValue"]),l.createVNode(se,{modelValue:b.show,"onUpdate:modelValue":R[1]||(R[1]=_=>b.show=_),width:"800px",title:"图片管理","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[l.createVNode(P3)]),_:1},8,["modelValue"]),l.createVNode(I,{class:"no-border-drawer",modelValue:E.show,"onUpdate:modelValue":R[2]||(R[2]=_=>E.show=_),title:"预览",direction:"ttb",size:"100%"},{default:l.withCtx(()=>[l.createElementVNode("div",I3,[E.show?(l.openBlock(),l.createBlock(Od,{key:0,background:E.background,grid:E.grid,data:E.data},null,8,["background","grid","data"])):l.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-50fba89c"]]),B3=[m0,Od],y0=(n,e)=>{B3.forEach(t=>{n.component(t.name,t)})};typeof window<"u"&&window.Vue&&y0(window.Vue);const j3={install:y0};Re.WiringDiagramEditor=m0,Re.WiringDiagramPreview=Od,Re.default=j3,Re.setBaseURL=eD,Re.setToken=tD,Object.defineProperties(Re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
738
|
+
`;var p3=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class di extends be{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}constructor(e={}){super(),this.name="stencil",Fr(this.name,f3),this.graphs={},this.groups={},this.options=Object.assign(Object.assign({},di.defaultOptions),e),this.init()}init(){this.dnd=new _s(this.options),this.onSearch=mp(this.onSearch,200),this.initContainer(),this.initSearch(),this.initContent(),this.initGroups(),this.setTitle(),this.startListening()}load(e,t){return Array.isArray(e)?this.loadGroup(e,t):this.options.groups&&Object.keys(this.options.groups).forEach(s=>{e[s]&&this.loadGroup(e[s],s)}),this}unload(e,t){return Array.isArray(e)?this.loadGroup(e,t,!0):this.options.groups&&Object.keys(this.options.groups).forEach(s=>{e[s]&&this.loadGroup(e[s],s,!0)}),this}toggleGroup(e){return this.isGroupCollapsed(e)?this.expandGroup(e):this.collapseGroup(e),this}collapseGroup(e){if(this.isGroupCollapsable(e)){const t=this.groups[e];t&&!this.isGroupCollapsed(e)&&(this.trigger("group:collapse",{name:e}),X(t,"collapsed"))}return this}expandGroup(e){if(this.isGroupCollapsable(e)){const t=this.groups[e];t&&this.isGroupCollapsed(e)&&(this.trigger("group:expand",{name:e}),De(t,"collapsed"))}return this}isGroupCollapsable(e){const t=this.groups[e];return Pn(t,"collapsable")}isGroupCollapsed(e){const t=this.groups[e];return t&&Pn(t,"collapsed")}collapseGroups(){return Object.keys(this.groups).forEach(e=>this.collapseGroup(e)),this}expandGroups(){return Object.keys(this.groups).forEach(e=>this.expandGroup(e)),this}resizeGroup(e,t){const s=this.graphs[e];return s&&s.resize(t.width,t.height),this}addGroup(e){const t=Array.isArray(e)?e:[e];this.options.groups?this.options.groups.push(...t):this.options.groups=t,t.forEach(s=>this.initGroup(s))}removeGroup(e){const t=Array.isArray(e)?e:[e];this.options.groups&&(this.options.groups=this.options.groups.filter(s=>!t.includes(s.name)),t.forEach(s=>{const r=this.graphs[s];this.unregisterGraphEvents(r),r.dispose(),delete this.graphs[s];const i=this.groups[s];Ht(i),delete this.groups[s]}))}initContainer(){this.container=document.createElement("div"),X(this.container,this.prefixClassName(Mt.base)),fe(this.container,"data-not-found-text",this.options.notFoundText||"No matches found")}initContent(){this.content=document.createElement("div"),X(this.content,this.prefixClassName(Mt.content)),ys(this.content,this.container)}initSearch(){this.options.search&&(X(this.container,"searchable"),kt(this.container,this.renderSearch()))}initGroup(e){const t=this.options.stencilGraphOptions||{},s=document.createElement("div");X(s,this.prefixClassName(Mt.group)),fe(s,"data-name",e.name),(e.collapsable==null&&this.options.collapsable||e.collapsable!==!1)&&X(s,"collapsable"),hn(s,"collapsed",e.collapsed===!0);const r=document.createElement("h3");X(r,this.prefixClassName(Mt.groupTitle)),r.innerHTML=e.title||e.name;const i=document.createElement("div");X(i,this.prefixClassName(Mt.groupContent));const o=e.graphOptions,a=new $(Object.assign(Object.assign(Object.assign({},t),o),{container:document.createElement("div"),model:t.model||new et,width:e.graphWidth||this.options.stencilGraphWidth,height:e.graphHeight||this.options.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));this.registerGraphEvents(a),kt(i,a.container),kt(s,[r,i]),ys(s,this.content),this.groups[e.name]=s,this.graphs[e.name]=a}initGroups(){if(this.clearGroups(),this.setCollapsableState(),this.options.groups&&this.options.groups.length)this.options.groups.forEach(e=>{this.initGroup(e)});else{const e=this.options.stencilGraphOptions||{},t=new $(Object.assign(Object.assign({},e),{container:document.createElement("div"),model:e.model||new et,width:this.options.stencilGraphWidth,height:this.options.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));kt(this.content,t.container),this.graphs[xo.defaultGroupName]=t}}setCollapsableState(){this.options.collapsable=this.options.collapsable&&this.options.groups&&this.options.groups.some(e=>e.collapsable!==!1),this.options.collapsable?(X(this.container,"collapsable"),this.options.groups&&this.options.groups.every(t=>t.collapsed||t.collapsable===!1)?X(this.container,"collapsed"):De(this.container,"collapsed")):De(this.container,"collapsable")}setTitle(){const e=document.createElement("div");X(e,this.prefixClassName(Mt.title)),e.innerHTML=this.options.title,ys(e,this.container)}renderSearch(){const e=document.createElement("div");X(e,this.prefixClassName(Mt.search));const t=document.createElement("input");return fe(t,{type:"search",placeholder:this.options.placeholder||"Search"}),X(t,this.prefixClassName(Mt.searchText)),kt(e,t),e}startListening(){const e=this.prefixClassName(Mt.title),t=this.prefixClassName(Mt.searchText),s=this.prefixClassName(Mt.groupTitle);this.delegateEvents({[`click .${e}`]:"onTitleClick",[`touchstart .${e}`]:"onTitleClick",[`click .${s}`]:"onGroupTitleClick",[`touchstart .${s}`]:"onGroupTitleClick",[`input .${t}`]:"onSearch",[`focusin .${t}`]:"onSearchFocusIn",[`focusout .${t}`]:"onSearchFocusOut"})}stopListening(){this.undelegateEvents()}registerGraphEvents(e){e.on("cell:mousedown",this.onDragStart,this)}unregisterGraphEvents(e){e.off("cell:mousedown",this.onDragStart,this)}loadGroup(e,t,s){const r=this.getModel(t);if(r){const c=e.map(u=>He.isNode(u)?u:He.create(u));s===!0?r.removeCells(c):r.resetCells(c)}const i=this.getGroup(t);let o=this.options.stencilGraphHeight;i&&i.graphHeight!=null&&(o=i.graphHeight);const a=i&&i.layout||this.options.layout;if(a&&r&&ee(a,this,r,i),!o){const c=this.getGraph(t);c.fitToContent({minWidth:c.options.width,gridHeight:1,padding:i&&i.graphPadding||this.options.stencilGraphPadding||10})}return this}onDragStart(e){const{e:t,node:s}=e,r=this.getGroupByNode(s);r&&r.nodeMovable===!1||this.dnd.start(s,t)}filter(e,t){const s=Object.keys(this.graphs).reduce((r,i)=>{const o=this.graphs[i],a=i===xo.defaultGroupName?null:i,c=o.model.getNodes().filter(h=>{let p=!1;typeof t=="function"?p=ee(t,this,h,e,a,this):typeof t=="boolean"?p=t:p=this.isCellMatched(h,e,t,e.toLowerCase()!==e);const g=o.renderer.findViewByCell(h);return g&&hn(g.container,"unmatched",!p),p}),u=c.length>0,d=this.options,f=new et;return f.resetCells(c),d.layout&&ee(d.layout,this,f,this.getGroup(i)),this.groups[i]&&hn(this.groups[i],"unmatched",!u),o.fitToContent({gridWidth:1,gridHeight:1,padding:d.stencilGraphPadding||10}),r||u},!1);hn(this.container,"not-found",!s)}isCellMatched(e,t,s,r){return t&&s?Object.keys(s).some(i=>{if(i==="*"||e.shape===i){const o=s[i];return typeof o=="boolean"?o:(Array.isArray(o)?o:[o]).some(c=>{let u=e.getPropByPath(c);return u!=null?(u=`${u}`,r||(u=u.toLowerCase()),u.indexOf(t)>=0):!1})}return!1}):!0}onSearch(e){this.filter(e.target.value,this.options.search)}onSearchFocusIn(){X(this.container,"is-focused")}onSearchFocusOut(){De(this.container,"is-focused")}onTitleClick(){this.options.collapsable&&(hn(this.container,"collapsed"),Pn(this.container,"collapsed")?this.collapseGroups():this.expandGroups())}onGroupTitleClick(e){const t=e.target.closest(`.${this.prefixClassName(Mt.group)}`);t&&this.toggleGroup(fe(t,"data-name")||"");const s=Object.keys(this.groups).every(r=>{const i=this.getGroup(r),o=this.groups[r];return i&&i.collapsable===!1||Pn(o,"collapsed")});hn(this.container,"collapsed",s)}getModel(e){const t=this.getGraph(e);return t?t.model:null}getGraph(e){return this.graphs[e||xo.defaultGroupName]}getGroup(e){const t=this.options.groups;return e!=null&&t&&t.length?t.find(s=>s.name===e):null}getGroupByNode(e){const t=this.options.groups;return t?t.find(s=>{const r=this.getModel(s.name);return r?r.has(e.id):!1}):null}clearGroups(){Object.keys(this.graphs).forEach(e=>{const t=this.graphs[e];this.unregisterGraphEvents(t),t.dispose()}),Object.keys(this.groups).forEach(e=>{const t=this.groups[e];Ht(t)}),this.graphs={},this.groups={}}onRemove(){this.clearGroups(),this.dnd.remove(),this.stopListening(),this.undelegateDocumentEvents()}dispose(){this.remove(),Ur(this.name)}}p3([be.dispose()],di.prototype,"dispose",null),function(n){n.defaultOptions=Object.assign({stencilGraphWidth:200,stencilGraphHeight:800,title:"Stencil",collapsable:!1,placeholder:"Search",notFoundText:"No matches found",layout(e,t){const s={columnWidth:this.options.stencilGraphWidth/2-10,columns:2,rowHeight:80,resizeToFit:!1,dx:10,dy:10};h3(e,Object.assign(Object.assign(Object.assign({},s),this.options.layoutOptions),t?t.layoutOptions:{}))}},_s.defaults)}(di||(di={}));var Mt;(function(n){n.base="widget-stencil",n.title=`${n.base}-title`,n.search=`${n.base}-search`,n.searchText=`${n.search}-text`,n.content=`${n.base}-content`,n.group=`${n.base}-group`,n.groupTitle=`${n.group}-title`,n.groupContent=`${n.group}-content`})(Mt||(Mt={}));var xo;(function(n){n.defaultGroupName="__default__"})(xo||(xo={})),$.prototype.toSVG=function(n,e){const t=this.getPlugin("export");t&&t.toSVG(n,e)},$.prototype.toPNG=function(n,e){const t=this.getPlugin("export");t&&t.toPNG(n,e)},$.prototype.toJPEG=function(n,e){const t=this.getPlugin("export");t&&t.toJPEG(n,e)},$.prototype.exportPNG=function(n,e){const t=this.getPlugin("export");t&&t.exportPNG(n,e)},$.prototype.exportJPEG=function(n,e){const t=this.getPlugin("export");t&&t.exportJPEG(n,e)},$.prototype.exportSVG=function(n,e){const t=this.getPlugin("export");t&&t.exportSVG(n,e)};var g3=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class p0 extends Te{constructor(){super(),this.name="export"}get view(){return this.graph.view}init(e){this.graph=e}exportPNG(e="chart",t={}){this.toPNG(s=>{Ys.downloadDataUri(s,e)},t)}exportJPEG(e="chart",t={}){this.toPNG(s=>{Ys.downloadDataUri(s,e)},t)}exportSVG(e="chart",t={}){this.toSVG(s=>{Ys.downloadDataUri(Ys.svgToDataUrl(s),e)},t)}toSVG(e,t={}){this.notify("before:export",t);const s=this.view.svg,r=oe.create(s).clone();let i=r.node;const o=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),a=t.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),c=t.preserveDimensions;if(c){const f=typeof c=="boolean"?a:c;r.attr({width:f.width,height:f.height})}if(r.removeAttribute("style").attr("viewBox",[a.x,a.y,a.width,a.height].join(" ")),o.removeAttribute("transform"),t.copyStyles!==!1){const f=s.ownerDocument,h=Array.from(s.querySelectorAll("*")),p=Array.from(i.querySelectorAll("*")),g=f.styleSheets.length,m=[];for(let w=g-1;w>=0;w-=1)m[w]=f.styleSheets[w],f.styleSheets[w].disabled=!0;const y={};h.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S={};Object.keys(v).forEach(E=>{S[E]=v.getPropertyValue(E)}),y[x]=S}),g!==f.styleSheets.length&&m.forEach((w,x)=>{f.styleSheets[x]=w});for(let w=0;w<g;w+=1)f.styleSheets[w].disabled=!1;const b={};h.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S=y[x],E={};Object.keys(v).forEach(C=>{!kc(C)&&v.getPropertyValue(C)!==S[C]&&(E[C]=v.getPropertyValue(C))}),b[x]=E}),p.forEach((w,x)=>{Je(w,b[x])})}const u=t.stylesheet;if(typeof u=="string"){const f=s.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(u);r.prepend(oe.create("style",{type:"text/css"},[f]))}const d=()=>{const f=t.beforeSerialize;if(typeof f=="function"){const p=ee(f,this.graph,i);p instanceof SVGSVGElement&&(i=p)}const h=new XMLSerializer().serializeToString(i).replace(/ /g," ");this.notify("after:export",t),e(h)};if(t.serializeImages){const f=r.find("image").map(h=>new Promise(p=>{const g=h.attr("xlink:href")||h.attr("href");Ys.imageToDataUri(g,(m,y)=>{!m&&y&&h.attr("xlink:href",y),p()})}));Promise.all(f).then(d)}else d()}toDataURL(e,t){let s=t.viewBox||this.graph.getContentBBox();const r=ps(t.padding);t.width&&t.height&&(r.left+r.right>=t.width&&(r.left=r.right=0),r.top+r.bottom>=t.height&&(r.top=r.bottom=0));const i=new F(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(t.width&&t.height){const d=s.width+r.left+r.right,f=s.height+r.top+r.bottom;i.scale(d/t.width,f/t.height)}s=F.create(s).moveAndExpand(i);const o=typeof t.width=="number"&&typeof t.height=="number"?{width:t.width,height:t.height}:s;let a=t.ratio?parseFloat(t.ratio):1;(!Number.isFinite(a)||a===0)&&(a=1);const c={width:Math.max(Math.round(o.width*a),1),height:Math.max(Math.round(o.height*a),1)};{const d=document.createElement("canvas"),f=d.getContext("2d");d.width=c.width,d.height=c.height;const h=c.width-1,p=c.height-1;f.fillStyle="rgb(1,1,1)",f.fillRect(h,p,1,1);const g=f.getImageData(h,p,1,1).data;if(g[0]!==1||g[1]!==1||g[2]!==1)throw new Error("size exceeded")}const u=new Image;u.onload=()=>{const d=document.createElement("canvas");d.width=c.width,d.height=c.height;const f=d.getContext("2d");f.fillStyle=t.backgroundColor||"white",f.fillRect(0,0,c.width,c.height);try{f.drawImage(u,0,0,c.width,c.height);const h=d.toDataURL(t.type,t.quality);e(h)}catch{}},this.toSVG(d=>{u.src=`data:image/svg+xml,${encodeURIComponent(d)}`},Object.assign(Object.assign({},t),{viewBox:s,serializeImages:!0,preserveDimensions:Object.assign({},c)}))}toPNG(e,t={}){this.toDataURL(e,Object.assign(Object.assign({},t),{type:"image/png"}))}toJPEG(e,t={}){this.toDataURL(e,Object.assign(Object.assign({},t),{type:"image/jpeg"}))}notify(e,t){this.trigger(e,t),this.graph.trigger(e,t)}dispose(){this.off()}}g3([Te.dispose()],p0.prototype,"dispose",null);const m3={class:"control-box"},y3=Ut({__name:"index",props:{payload:Object},setup(n){const e=n,t=l.ref("3"),s=l.ref([]),r=()=>{s.value=JSON.parse(JSON.stringify(e.payload.getPorts().map(u=>({id:u.id,attrs:u.attrs,args:{x:Number(u.args.x.replace("%","")),y:Number(u.args.y.replace("%",""))}}))))},i=()=>{const u=_u;u.attrs.text.text=`${e.payload.getPorts().length+1}`,u.args.x="50%",u.args.y="50%",e.payload.addPorts([{group:"ports",...u}]),r()},o=()=>{Ki("#drawing-board",!0)},a=(u,d,f)=>{e.payload.portProp(u,"args/"+d,f+"%"),r()},c=u=>{e.payload.removePort(u),r()};return l.onMounted(()=>{r()}),(u,d)=>{const f=l.resolveComponent("el-button"),h=l.resolveComponent("el-table-column"),p=l.resolveComponent("el-slider"),g=l.resolveComponent("el-icon"),m=l.resolveComponent("el-table"),y=l.resolveComponent("el-collapse-item"),b=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",m3,[l.createVNode(b,{modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=w=>t.value=w),accordion:""},{default:l.withCtx(()=>[l.createVNode(y,{title:"连接桩设置",name:"3"},{default:l.withCtx(()=>[l.createVNode(f,{type:"primary",onClick:i,size:"small"},{default:l.withCtx(()=>d[1]||(d[1]=[l.createTextVNode("添加连接桩")])),_:1}),l.createVNode(f,{type:"primary",onClick:o,size:"small"},{default:l.withCtx(()=>d[2]||(d[2]=[l.createTextVNode("显示连接桩")])),_:1}),l.createVNode(m,{data:s.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[l.createVNode(h,{label:"ID",width:"50",align:"center"},{default:l.withCtx(({row:w})=>[l.createTextVNode(l.toDisplayString(w.attrs.text.text),1)]),_:1}),l.createVNode(h,{label:"x",width:"100",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(p,{modelValue:w.args.x,"onUpdate:modelValue":x=>w.args.x=x,min:0,max:100,step:1,onInput:x=>a(w.id,"x",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(h,{label:"y",width:"100",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(p,{modelValue:w.args.y,"onUpdate:modelValue":x=>w.args.y=x,min:0,max:100,step:1,onInput:x=>a(w.id,"y",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(h,{label:"操作",width:"70",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(f,{type:"danger",size:"small",onClick:x=>c(w.id)},{default:l.withCtx(()=>[l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(l.unref(Vp))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-b280098c"]]),El=[{shape:"rect",width:60,height:5,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:0}},data:{type:"base-shape"}},{shape:"rect",width:60,height:20,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape",label:"母线"}},{shape:"circle",width:40,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape"}},{shape:"ellipse",width:60,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff"}},data:{type:"base-shape"}}],g0={groups:{ports:{position:"absolute",args:{x:0,y:0},attrs:{circle:{magnet:!0,stroke:"#8f8f8f",r:4}},label:{position:"top"}}}},Od=Object.assign({name:"wiring-diagram-preview"},{__name:"index",props:{id:{type:String,default:""},background:{type:Object,default:()=>({})},grid:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},setup(n){const e=n,t=l.ref(),s=()=>{const b=document.getElementById("preview-container");t.value=new $({container:b,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center"},interacting:{nodeMovable:!1,magnetConnectable:!1,edgeMovable:!1,edgeLabelMovable:!1,arrowheadMovable:!1,vertexMovable:!1,vertexAddable:!1,vertexDeletable:!1}}),t.value.on("blank:dblclick",()=>{d()})},r=async()=>{let b,w,x;if(e.id){const{background:v,grid:S,data:E}=await Hm(e.id);b=v,w=S,x=E}else b=e.background,w={},x=e.data;t.value.drawBackground(b),t.value.drawGrid(w),t.value.fromJSON(x),c()},i=l.ref(null),o=l.ref([]),a=l.ref([]),c=()=>{o.value=t.value.getCells().filter(b=>{var w,x,v;return((w=b==null?void 0:b.data)==null?void 0:w.type)==="text"||((x=b==null?void 0:b.data)==null?void 0:x.type)==="pipe"||((v=b==null?void 0:b.data)==null?void 0:v.type)==="arrow"}),o.value.forEach(b=>{var w,x;(x=(w=b==null?void 0:b.data)==null?void 0:w.fields)!=null&&x.length&&(b==null||b.data.fields.forEach(v=>{v.field&&a.value.push({id:b==null?void 0:b.id,fields:b==null?void 0:b.data.fields})}))}),console.log("所有字段",a.value),d()},u=l.ref(!0),d=async()=>{if(!a.value.length)return;if(!u.value){Ye.warning("数据正在更新中,请稍后再试");return}i.value&&clearInterval(i.value),u.value=!1;let b=await sD(a.value).catch(()=>{u.value=!0});u.value=!0,b==null||b.forEach(w=>{var v,S,E;const x=t.value.getCellById(w.id);console.log("122222222",x),x.data.type==="text"&&(x.label=f(x.data.content,w.fields)),x.data.type==="pipe"&&(console.log("管道详情",x,(v=w.fields)==null?void 0:v[0].value),h(x,(S=w.fields)==null?void 0:S[0].value)),x.data.type==="arrow"&&p(x,(E=w.fields)==null?void 0:E[0].value)}),i.value=setTimeout(()=>{d()},1e4)},f=(b,w)=>{let x=0;return b.replace(Sl,()=>{const v=w.find(S=>S.index===x);return x++,v?v.value:u0})},h=(b,w)=>{if(!b.data.isCondition)return!1;for(let x=0;x<b.data.condition.length;x++)if(Number(w)>b.data.condition[x].min&&Number(w)<=b.data.condition[x].max)return b.attr("line2/style/animation",c0(b.data.condition[x].direction)),!1},p=(b,w)=>{if(console.log(b,w),!b.data.isCondition)return!1;for(let x=0;x<b.data.condition.length;x++)if(Number(w)>b.data.condition[x].min&&Number(w)<=b.data.condition[x].max)return b.attr("arrow/style/animation",b.data.condition[x].animation===nr?"flashing 2s infinite linear":""),b.attr("arrow/d",b.data.condition[x].direction===ui?Wa:qm),b.attr("arrow/display",b.data.condition[x].display),!1},g=()=>{t.value.zoomToFit({maxScale:1.4,padding:20})},m=l.shallowRef(),y=()=>{new ResizeObserver(()=>{g()}).observe(m.value)};return l.onMounted(()=>{s(),r(),setTimeout(()=>{Ki("#preview-container",!1),g()},100),y()}),l.onUnmounted(()=>{clearInterval(i.value)}),(b,w)=>(l.openBlock(),l.createElementBlock("div",{id:"preview-container",ref_key:"previewRef",ref:m,onDblclick:g},null,544))}}),b3={class:"form-container"},w3={class:"footer"},x3=Ut({__name:"group-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:e}){const t=n,s=e,r=l.reactive({groupName:"",sort:1,isShow:1}),i=l.reactive({groupName:[{required:!0,message:"请输入分组名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}],isShow:[{required:!0,message:"请选择是否显示",trigger:"change"}]}),o=l.ref(),a=()=>{console.log(r),o.value.validate(u=>{if(u)r.id?Ha("/cny/custom/updateGroup",r).then(d=>{d!=null&&d.isOk?(Ye.success("保存成功"),s("close",!0)):Ye.error((d==null?void 0:d.msg)||"保存失败")}):Ha("/cny/custom/saveGroup",r).then(d=>{d!=null&&d.isOk?(Ye.success("保存成功"),s("close",!0)):Ye.error((d==null?void 0:d.msg)||"保存失败")});else return!1})},c=()=>{s("close",!1)};return l.onMounted(()=>{var u;(u=t.payload)!=null&&u.id&&(r.id=t.payload.id,r.groupName=t.payload.groupName,r.sort=t.payload.sort,r.isShow=t.payload.isShow)}),(u,d)=>{const f=l.resolveComponent("el-input"),h=l.resolveComponent("el-form-item"),p=l.resolveComponent("el-input-number"),g=l.resolveComponent("el-switch"),m=l.resolveComponent("el-button"),y=l.resolveComponent("el-form");return l.openBlock(),l.createElementBlock("div",b3,[l.createVNode(y,{ref_key:"form",ref:o,model:r,rules:i,"label-width":"90px","label-suffix":":"},{default:l.withCtx(()=>[l.createVNode(h,{label:"分组名称",prop:"groupName"},{default:l.withCtx(()=>[l.createVNode(f,{modelValue:r.groupName,"onUpdate:modelValue":d[0]||(d[0]=b=>r.groupName=b),placeholder:"请输入分组名称",clearable:""},null,8,["modelValue"])]),_:1}),l.createVNode(h,{label:"排序",prop:"sort"},{default:l.withCtx(()=>[l.createVNode(p,{modelValue:r.sort,"onUpdate:modelValue":d[1]||(d[1]=b=>r.sort=b),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),l.createVNode(h,{label:"是否显示",prop:"isShow"},{default:l.withCtx(()=>[l.createVNode(g,{modelValue:r.isShow,"onUpdate:modelValue":d[2]||(d[2]=b=>r.isShow=b),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),l.createElementVNode("div",w3,[l.createVNode(m,{type:"primary",onClick:a},{default:l.withCtx(()=>d[3]||(d[3]=[l.createTextVNode("保存")])),_:1}),l.createVNode(m,{onClick:c},{default:l.withCtx(()=>d[4]||(d[4]=[l.createTextVNode("取消")])),_:1})])]),_:1},8,["model","rules"])])}}},[["__scopeId","data-v-a2a7ce25"]]),v3={class:"form-container"},C3={class:"footer"},S3=Ut({__name:"image-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:e}){const t=e,s=n,r=l.shallowRef(null),i=l.reactive({groupId:"",id:"",imageName:"",sort:0,isShow:1,imageUrl:""}),o={imageName:[{required:!0,message:"请输入图片名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}]},a=l.ref(""),c=f=>{if(f.raw.type.indexOf("image")===-1){Ye.error("请上传图片格式的文件");return}const h=new FormData;h.append("file",f.raw),nD("/cny/file/fileUpload",h).then(p=>{p!=null&&p.isOk?(a.value=Mn.defaults.baseURL+"/cny/upload/"+(p==null?void 0:p.data),i.imageUrl=p==null?void 0:p.data):Ye.error((p==null?void 0:p.msg)||"上传失败")})},u=()=>{console.log(i),r.value.validate(f=>{if(f)Ha("/cny/custom/savePicture",i).then(h=>{h!=null&&h.isOk?(Ye.success("保存成功"),t("close",!0)):Ye.error((h==null?void 0:h.msg)||"保存失败")});else return!1})},d=()=>{t("close",!1)};return l.onMounted(()=>{var f;(f=s.payload)!=null&&f.id&&(i.id=s.payload.id,i.imageName=s.payload.imageName,i.sort=s.payload.sort,i.isShow=s.payload.isShow,i.imageUrl=s.payload.imageUrl,a.value=i.imageUrl),i.groupId=s.payload.groupId}),(f,h)=>{const p=l.resolveComponent("el-input"),g=l.resolveComponent("el-form-item"),m=l.resolveComponent("el-input-number"),y=l.resolveComponent("el-switch"),b=l.resolveComponent("el-image"),w=l.resolveComponent("el-icon"),x=l.resolveComponent("el-upload"),v=l.resolveComponent("el-button"),S=l.resolveComponent("el-form");return l.openBlock(),l.createElementBlock("div",v3,[l.createVNode(S,{ref_key:"form",ref:r,model:i,rules:o,"label-width":"90px","label-suffix":":"},{default:l.withCtx(()=>[l.createVNode(g,{label:"图片名称",prop:"imageName"},{default:l.withCtx(()=>[l.createVNode(p,{modelValue:i.imageName,"onUpdate:modelValue":h[0]||(h[0]=E=>i.imageName=E),placeholder:"请输入图片名称"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"排序",prop:"sort"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:i.sort,"onUpdate:modelValue":h[1]||(h[1]=E=>i.sort=E),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"是否显示",prop:"isShow"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:i.isShow,"onUpdate:modelValue":h[2]||(h[2]=E=>i.isShow=E),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"上传",prop:"image"},{default:l.withCtx(()=>[l.createVNode(x,{action:"","list-type":"picture",class:"avatar-uploader","show-file-list":!1,"on-change":c,"auto-upload":!1},{default:l.withCtx(()=>[a.value?(l.openBlock(),l.createBlock(b,{key:0,src:a.value,fit:"cover",style:{width:"64px",height:"64px"}},null,8,["src"])):(l.openBlock(),l.createBlock(w,{key:1,class:"avatar-uploader-icon"},{default:l.withCtx(()=>[l.createVNode(l.unref(xN))]),_:1}))]),_:1})]),_:1}),l.createElementVNode("div",C3,[l.createVNode(v,{type:"primary",onClick:u},{default:l.withCtx(()=>h[3]||(h[3]=[l.createTextVNode("保存")])),_:1}),l.createVNode(v,{onClick:d},{default:l.withCtx(()=>h[4]||(h[4]=[l.createTextVNode("取消")])),_:1})])]),_:1},8,["model"])])}}},[["__scopeId","data-v-c7d87a18"]]),E3={class:"form-container"},O3={style:{padding:"0 10px",display:"flex","flex-direction":"column",gap:"5px","align-items":"flex-start"}},M3=["src"],P3=Ut({__name:"image-management",setup(n){const e=l.reactive({items:[]}),t=()=>{Xi("/cny/custom/groupList").then(h=>{e.items=h.data})},s=l.reactive({show:!1,title:"新增图片分组",payload:null}),r=()=>{s.show=!0,s.title="新增图片分组",s.payload=null},i=h=>{s.show=!0,s.title="编辑图片分组",s.payload={id:h.id,groupName:h.groupName,sort:h.sort,isShow:h.isShow}},o=h=>{Um("/cny/custom/removeGroup/"+h).then(p=>{p.code===200?(Ye.success("删除成功"),t()):Ye.error(p.msg||"删除失败")})},a=l.reactive({show:!1,title:"新增图片",payload:null}),c=h=>{a.show=!0,a.title="新增图片",a.payload={groupId:h}},u=h=>{a.show=!0,a.title="编辑图片",a.payload={id:h.id,groupId:h.groupId,imageName:h.imageName,sort:h.sort,isShow:h.isShow,imageUrl:h.imageUrl}},d=h=>{Um("/cny/custom/removePicture/"+h).then(p=>{p.code===200?(Ye.success("删除成功"),t()):Ye.error(p.msg||"删除失败")})},f=h=>{s.show=!1,a.show=!1,h&&t()};return l.onMounted(()=>{t()}),(h,p)=>{const g=l.resolveComponent("el-button"),m=l.resolveComponent("el-table-column"),y=l.resolveComponent("el-table"),b=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",E3,[l.createVNode(g,{type:"primary",onClick:r,size:"small"},{default:l.withCtx(()=>p[2]||(p[2]=[l.createTextVNode("新增图片分组")])),_:1}),l.createVNode(y,{data:e.items,border:"",height:"500"},{default:l.withCtx(()=>[l.createVNode(m,{type:"expand"},{default:l.withCtx(w=>[l.createElementVNode("div",O3,[l.createVNode(g,{type:"primary",size:"small",onClick:x=>c(w.row.id)},{default:l.withCtx(()=>p[3]||(p[3]=[l.createTextVNode("新增图片")])),_:2},1032,["onClick"]),l.createVNode(y,{data:w.row.pictureList,border:"",size:"small"},{default:l.withCtx(()=>[l.createVNode(m,{label:"名称",prop:"imageName",align:"center"}),l.createVNode(m,{label:"图片",prop:"imageUrl",align:"center"},{default:l.withCtx(x=>[l.createElementVNode("img",{src:l.unref(Mn).defaults.baseURL+x.row.imageUrl,alt:"",style:{width:"64px",height:"64px"}},null,8,M3)]),_:1}),l.createVNode(m,{label:"排序",prop:"sort",align:"center"}),l.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:l.withCtx(x=>[l.createTextVNode(l.toDisplayString(x.row.isShow===1?"是":"否"),1)]),_:1}),l.createVNode(m,{label:"操作",align:"center"},{default:l.withCtx(x=>[l.createVNode(g,{type:"primary",size:"small",onClick:v=>u(x.row)},{default:l.withCtx(()=>p[4]||(p[4]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(g,{type:"danger",size:"small",onClick:v=>d(x.row.id)},{default:l.withCtx(()=>p[5]||(p[5]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:2},1032,["data"])])]),_:1}),l.createVNode(m,{label:"分组名称",prop:"groupName",align:"center"}),l.createVNode(m,{label:"排序",prop:"sort",align:"center"}),l.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:l.withCtx(w=>[l.createTextVNode(l.toDisplayString(w.row.isShow===1?"是":"否"),1)]),_:1}),l.createVNode(m,{label:"操作",align:"center"},{default:l.withCtx(w=>[l.createVNode(g,{type:"primary",size:"small",onClick:x=>i(w.row)},{default:l.withCtx(()=>p[6]||(p[6]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(g,{type:"danger",size:"small",onClick:x=>o(w.row.id)},{default:l.withCtx(()=>p[7]||(p[7]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l.createVNode(b,{modelValue:s.show,"onUpdate:modelValue":p[0]||(p[0]=w=>s.show=w),title:s.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[s.show?(l.openBlock(),l.createBlock(x3,{key:0,payload:s.payload,onClose:f},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),l.createVNode(b,{modelValue:a.show,"onUpdate:modelValue":p[1]||(p[1]=w=>a.show=w),title:a.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[a.show?(l.openBlock(),l.createBlock(S3,{key:0,payload:a.payload,onClose:f},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}}},[["__scopeId","data-v-a6e5644c"]]),N3={class:"page-container"},A3={class:"tool-bar"},_3={class:"action"},T3={class:"el-dropdown-link"},k3={class:"action",style:{"margin-right":"50px"}},V3={class:"board"},D3={class:"drawing-board-box"},R3={id:"controls"},L3={key:0,class:"controls-label"},I3={style:{width:"100%",height:"100%",background:"black"}},m0=Ut(Object.assign({name:"editor"},{__name:"index",props:{id:{type:String,default:""}},emits:["getJson"],setup(n,{emit:e}){const t=n,s=l.ref(),r=l.reactive({label:"",component:l.shallowRef(null)}),i=l.ref(null),o=l.ref(null),a=()=>{const V=document.getElementById("drawing-board");s.value=new $({container:V,autoResize:!0,panning:!0,mousewheel:!0,connecting:{snap:!0,allowEdge:!0,highlight:!0,router:"orth",connectionPoint:{name:"anchor"},anchor:"center",createEdge(){return s.value.createEdge({inherit:"edge",...Qe,data:{type:l0()},zIndex:0})}}}),s.value.use(Ej()),s.value.use(Oj()),s.value.use(Mj()),s.value.use(Pj()),s.value.use(Aj()),s.value.use(_j()),s.value.bindKey(["delete","backspace"],()=>{Tj(s.value)}),s.value.bindKey(["ctrl+c","cmd + c"],()=>{kj(s.value)}),s.value.bindKey(["ctrl+v","cmd + v"],()=>{Vj(s.value)}),s.value.bindKey(["ctrl+z","cmd + z"],()=>{Dj(s.value)}),s.value.bindKey(["ctrl+y","cmd + y"],()=>{Rj(s.value)});let R=null;s.value.on("edge:click",({cell:j})=>{o.value=j,r.component=f0,r.label="线段属性",i.value=Ed()}),s.value.on("edge:mouseenter",({cell:j})=>{clearTimeout(R),j.toFront(),Lj(j)}),s.value.on("edge:mouseleave",({cell:j})=>{R=setTimeout(()=>{j.toBack(),j.removeTools()},300)}),s.value.on("node:mouseenter",()=>{Ki("#drawing-board",!0)}),s.value.on("node:mouseleave",()=>{Ki("#drawing-board",!1)}),s.value.use(new p0),s.value.on("blank:click",({e:j,x:N,y:M})=>{o.value=s,r.component=lD,r.label="画布属性",i.value=Ed()}),s.value.on("cell:click",({cell:j})=>{var N,M;if(o.value=j,i.value=Ed(),((N=j.data)==null?void 0:N.type)==="text"){r.component=d0,r.label="文本属性";return}if(((M=j.data)==null?void 0:M.type)==="base-shape"){r.component=d0,r.label="基础图形属性";return}if((j==null?void 0:j.shape)==="edge"){r.component=f0,r.label="连线属性";return}if((j==null?void 0:j.shape)==="image"){r.component=y3,r.label="图片属性";return}r.component=null,r.label=null})},c=l.ref(),u=()=>{c.value=new di({target:s.value,...rD,groups:[{name:"基础组件",graphPadding:30}],search(j,N){var M;return((M=j.label)==null?void 0:M.indexOf(N))!==-1},placeholder:"搜索",notFoundText:"未找到匹配项",getDragNode:j=>{const N=j.clone({keepId:!0});return N.label!=="文本"&&(N.label=""),N}});const V=s.value.createNode({...iD}),R=El.map(j=>(j.ports=g0,s.value.createNode(j)));c.value.load([V,...R],"基础组件"),Xi("/cny/custom/groupList").then(j=>{const N=(j==null?void 0:j.data)||[];N==null||N.forEach(M=>{c.value.addGroup({name:M==null?void 0:M.groupName,graphPadding:30});const D=M==null?void 0:M.pictureList.map(B=>{const G={shape:"image",imageUrl:Mn.defaults.baseURL+(B==null?void 0:B.imageUrl),ports:g0,width:64,height:64,label:B.imageName};return s.value.createNode(G)});c.value.load(D,M==null?void 0:M.groupName),document.getElementById("stencil").appendChild(c.value.container)})}).finally(()=>{setTimeout(()=>{c.value.container.querySelectorAll(".x6-node").forEach((N,M)=>{if(M>El.length){const D=N.querySelector("text");N.style.position="relative",D&&(D.style.display="none",D.setAttribute("x","0%"),D.setAttribute("y","40"),D.style.fontSize="12px",D.style.fill="#ffffff")}N.addEventListener("mouseenter",D=>{if(M>El.length){const B=N.querySelector("text");B&&(B.style.display="block")}}),N.addEventListener("mouseleave",D=>{if(M>El.length){const B=N.querySelector("text");B&&(B.style.display="none")}})})},200)})},d=V=>{switch(V){case"snapLine":s.value.isSnaplineEnabled()?(s.value.disableSnapline(),Ye.warning("关闭对齐线")):(s.value.enableSnapline(),Ye.success("开启对齐线"));break;case"select":s.value.isSelectionEnabled()?(s.value.disableSelection(),Ye.warning("关闭框选")):(s.value.enableSelection(),Ye.success("开启框选"));break;case"drawLine":p();break;case"adaptive":g();break;case"shortcuts":y();break;case"image":w();break;case"clear":x();break;case"export":v();break}},f=l.ref(!1),h=l.ref(null),p=()=>{f.value=!0;const V=new Date;s.value.startBatch(V),s.value.disablePanning(),s.value.once("blank:mousedown",({e:R,x:j,y:N})=>{f.value&&(h.value=s.value.addEdge({source:{x:j,y:N},target:{x:j,y:N},...Qe,data:{type:l0(),isConnector:!1},zIndex:0}))}),s.value.on("blank:mousemove",({e:R,x:j,y:N})=>{f.value&&h.value.setTarget({x:j,y:N})}),s.value.on("blank:mouseup",({e:R,x:j,y:N})=>{f.value=!1,s.value.enablePanning(),s.value.stopBatch(V)})},g=()=>{s.value.zoomToFit({maxScale:1,padding:20})},m=l.reactive({show:!1}),y=()=>{m.show=!0},b=l.reactive({show:!1}),w=()=>{b.show=!0},x=()=>{s.value.clearCells(),s.value.drawBackground(Gm),s.value.drawGrid(Wm),Ye.success("清空成功")},v=()=>{const V=W().format("YYYYMMDDHHmmss");s.value.exportPNG(V,{padding:10,quality:1,backgroundColor:s.value.options.background.color})},S=e,E=l.reactive({show:!1,background:null,grid:null,data:null}),C=()=>{E.background=s.value.options.background,E.grid=s.value.options.grid,E.data=s.value.toJSON(),E.show=!0},P=()=>{S("getJson",{background:s.value.options.background,grid:s.value.options.grid,data:s.value.toJSON()})},A=async()=>{if(!t.id){s.value.drawBackground(Gm),s.value.drawGrid(Wm),s.value.fromJSON({cells:[]});return}const{background:V,grid:R,data:j}=await Hm(t.id);s.value.drawBackground(V),s.value.drawGrid(R),s.value.fromJSON(j),g()},T=l.shallowRef(null),k=()=>{new ResizeObserver(()=>{g()}).observe(T.value)};return l.onMounted(()=>{a(),u(),A(),k()}),(V,R)=>{const j=l.resolveComponent("el-icon"),N=l.resolveComponent("el-button"),M=l.resolveComponent("el-dropdown-item"),D=l.resolveComponent("el-dropdown-menu"),B=l.resolveComponent("el-dropdown"),G=l.resolveComponent("el-scrollbar"),se=l.resolveComponent("el-dialog"),I=l.resolveComponent("el-drawer");return l.openBlock(),l.createElementBlock("div",N3,[l.createElementVNode("div",A3,[l.createElementVNode("div",_3,[l.createVNode(B,{onCommand:d},{dropdown:l.withCtx(()=>[l.createVNode(D,null,{default:l.withCtx(()=>[l.createVNode(M,{command:"snapLine"},{default:l.withCtx(()=>R[4]||(R[4]=[l.createTextVNode("对齐线")])),_:1}),l.createVNode(M,{command:"select"},{default:l.withCtx(()=>R[5]||(R[5]=[l.createTextVNode("框选")])),_:1}),l.createVNode(M,{command:"drawLine"},{default:l.withCtx(()=>R[6]||(R[6]=[l.createTextVNode("绘制直线")])),_:1}),l.createVNode(M,{command:"adaptive"},{default:l.withCtx(()=>R[7]||(R[7]=[l.createTextVNode("视图自适应")])),_:1}),l.createVNode(M,{command:"shortcuts"},{default:l.withCtx(()=>R[8]||(R[8]=[l.createTextVNode("查看快捷键")])),_:1}),l.createVNode(M,{command:"image"},{default:l.withCtx(()=>R[9]||(R[9]=[l.createTextVNode("图片管理")])),_:1}),l.createVNode(M,{command:"clear"},{default:l.withCtx(()=>R[10]||(R[10]=[l.createTextVNode("清空画布")])),_:1}),l.createVNode(M,{command:"export"},{default:l.withCtx(()=>R[11]||(R[11]=[l.createTextVNode("导出成图片")])),_:1})]),_:1})]),default:l.withCtx(()=>[l.createElementVNode("span",T3,[l.createVNode(N,{size:"small",text:""},{default:l.withCtx(()=>[R[3]||(R[3]=l.createTextVNode("工具 ")),l.createVNode(j,null,{default:l.withCtx(()=>[l.createVNode(l.unref(iN))]),_:1})]),_:1})])]),_:1})]),l.createElementVNode("div",k3,[l.createVNode(l.unref(qg),{content:"预览",placement:"bottom"},{default:l.withCtx(()=>[l.createVNode(N,{size:"small",icon:l.unref(Lp),onClick:C},null,8,["icon"])]),_:1}),l.createVNode(l.unref(qg),{content:"保存",placement:"bottom"},{default:l.withCtx(()=>[l.createVNode(N,{size:"small",icon:l.unref(pN),onClick:P},null,8,["icon"])]),_:1})])]),l.createElementVNode("div",V3,[R[12]||(R[12]=l.createElementVNode("div",{id:"stencil"},null,-1)),l.createElementVNode("div",D3,[l.createElementVNode("div",{id:"drawing-board",ref_key:"drawBoard",ref:T},null,512)]),l.createElementVNode("div",R3,[r.label?(l.openBlock(),l.createElementBlock("div",L3,l.toDisplayString(r.label),1)):l.createCommentVNode("",!0),l.createVNode(G,null,{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.component),{graph:s.value,payload:o.value,key:i.value},null,8,["graph","payload"]))]),_:1})])]),l.createVNode(se,{modelValue:m.show,"onUpdate:modelValue":R[0]||(R[0]=_=>m.show=_),width:"400px",title:"快捷键","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[l.createVNode(c3)]),_:1},8,["modelValue"]),l.createVNode(se,{modelValue:b.show,"onUpdate:modelValue":R[1]||(R[1]=_=>b.show=_),width:"800px",title:"图片管理","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[l.createVNode(P3)]),_:1},8,["modelValue"]),l.createVNode(I,{class:"no-border-drawer",modelValue:E.show,"onUpdate:modelValue":R[2]||(R[2]=_=>E.show=_),title:"预览",direction:"ttb",size:"100%"},{default:l.withCtx(()=>[l.createElementVNode("div",I3,[E.show?(l.openBlock(),l.createBlock(Od,{key:0,background:E.background,grid:E.grid,data:E.data},null,8,["background","grid","data"])):l.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-50fba89c"]]),B3=[m0,Od],y0=(n,e)=>{B3.forEach(t=>{n.component(t.name,t)})};typeof window<"u"&&window.Vue&&y0(window.Vue);const j3={install:y0};Re.WiringDiagramEditor=m0,Re.WiringDiagramPreview=Od,Re.default=j3,Re.setBaseURL=eD,Re.setToken=tD,Object.defineProperties(Re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED