UnisKB/static/admin/assets/index-DikDLlMq.js

203 lines
1.3 MiB
JavaScript
Raw Normal View History

var P8=Object.defineProperty;var C8=(e,t,n)=>t in e?P8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fa=(e,t,n)=>C8(e,typeof t!="symbol"?t+"":t,n);import{dr as Sv,eN as wu,dn as io,eO as Fx,db as oh,eP as Hm,eQ as Uf,eR as ih,eS as LM,eT as js,ep as dc,de as pa,eU as R8,dc as fc,ek as $M,eV as j8,eW as Xm,eX as Ds,eg as i_,ei as Hw,dk as ah,au as pc,eY as FM,eZ as lh,eq as Rv,e_ as Xw,di as ao,e$ as a_,dM as l_,eo as kd,dS as Bo,f0 as Av,dj as Yf,f1 as jv,f2 as qm,dR as hc,dh as dl,dg as Ao,f3 as D8,f4 as BM,eE as Eu,en as Ta,f5 as I8,f6 as L8,f7 as Dv,f8 as s_,f9 as VM,dL as sh,fa as UM,bL as qw,df as Ym,at as Iv,dQ as Im,dO as eh,ej as $8,em as Bx,el as F8,as as WM,fb as GM,fc as B8,dm as u_,dd as V8,es as kg,fd as U8,fe as zM,ff as HM,fg as XM,fh as W8,fi as G8,dp as z8,fj as H8,fk as X8,fl as q8,fm as Y8,fn as Tg,ev as K8,fo as qM,dN as YM,er as Yw,fp as KM,fq as Kw,fr as Z8,dl as Km,fs as ZM,ft as J8,fu as JM,fv as QM,fw as Q8,fx as eD,fy as tD,ew as Lm,eC as nD,fz as rD,fA as oD,aw as iD,fB as aD,fC as lD,fD as sD,fE as uD,fF as cD,fG as dD,fH as fD,ai as pD,eF as hD,fI as vD,ax as mD,fJ as yD,fK as gD,fL as _D,fM as bD,fN as wD,fO as ED,av as OD,fP as xD,eG as SD,fQ as AD,eD as MD,fR as kD,fS as TD,fT as ND,fU as PD,ay as Vn,aB as je,aV as Zm,aD as J,aW as Ht,aF as _e,aX as ar,aH as k,aI as K,aE as at,aY as Gr,aG as P,b1 as pn,b2 as _n,c_ as uw,bX as Bf,dw as Vx,aJ as de,bY as Zw,aK as et,aS as Xt,cf as Kf,fV as Ga,aP as Li,aA as ek,aN as sc,aO as $n,aQ as tk,b6 as Ir,b8 as Wa,bd as nk,cg as Wf,cp as Ng,fW as Pg,bW as ng,aT as po,aZ as me,b7 as Mv,ce as Cl,cE as rk,ci as $m,c1 as ei,aC as yt,c0 as Jw,aM as nr,ch as cl,d4 as CD,aU as Zf,bB as kv,fX as RD,fY as jD,fZ as ok,f_ as ik,f$ as DD,g0 as ID,g1 as LD,g2 as $D,g3 as FD,g4 as oo,du as Qw,dv as BD,ct as VD,bD as Gf,dF as UD,b3 as zf,g5 as is,cI as WD,g6 as eE,g7 as Ux,g8 as Zp,g9 as GD,ga as tE,gb as nE,gc as zD,gd as HD,b4 as ak,bZ as cw,az as XD,eB as Wx,cX as qD,bG as Od,bH as Nl,bI as gu,bK as Va,bJ as If}from"./admin-BkqzSx7d.js";import{g as YD,t as Gx,a as zx,i as vc,n as KD,c as rE,l as rg,d as ZD}from"./data-De9gjkyk.js";import{_ as Pd}from"./AIModeParamSettingDialog.vue_vue_type_script_setup_true_lang-BXGe6m62.js";import{G as oE,d as JD,e as QD,f as eI,_ as lk,c as sk,b as tI,a as nI}from"./ToolDialog.vue_vue_type_style_index_0_lang-w5fl2QJu.js";import{d as uk,c as uh,v as Jm,e as rI,g as ck,f as oI,a as iI,r as aI}from"./reduce-Yvm7YAXp.js";import{c as iE,b as c_,i as aE,p as dk,n as lE,a as lI,d as sE,e as sI,f as uI,g as cI,h as dI,u as fI,j as pI,k as hI,l as vI,m as mI,r as yI,o as gI,q as _I,s as bI,t as wI}from"./uniqBy-CmWHIAxs.js";import{c as EI,a as OI,b as xI,e as SI,f as AI,m as MI,d as kI,h as TI}from"./min-Dif6Cg4O.js";import{d as fk,e as NI,g as PI,h as CI,i as RI,z as jI,s as DI,m as II,a as LI,b as $I,f as FI,c as BI,r as VI,u as UI}from"./zipObject-Ceyl1BP7.js";import{l as pk,_ as hk}from"./vue-draggable-plus-BjfV0UzS.js";import{_ as WI}from"./FieldFormDialog.vue_vue_type_script_setup_true_lang-BvyW1EJ6.js";import{_ as fn}from"./defineProperty-DbXIQDXj.js";import"./typeof-QjJsDpFa.js";const vk=Object.freeze(Object.defineProperty({__proto__:null,get default(){return cre}},Symbol.toStringTag,{value:"Module"}));var GI=NaN;function Hx(e){return typeof e=="number"?e:Sv(e)?GI:+e}function d_(e,t){return function(n,a){var r;if(n===void 0&&a===void 0)return t;if(n!==void 0&&(r=n),a!==void 0){if(r===void 0)return a;typeof n=="string"||typeof a=="string"?(n=wu(n),a=wu(a)):(n=Hx(n),a=Hx(a)),r=e(n,a)}return r}}var zI=d_(function(e,t){return e+t},0),HI="Expected a function";function XI(e,t){if(typeof t!="function")throw new TypeError(HI);return e=io(e),function(){if(--e<1)return t.apply(this,arguments)}}var Cg=Fx&&new Fx,mk=Cg?function(e,t){return Cg.set(e,t),e}:oh;function Fm(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4])
/* [wrapped with `+t+`] */
`)}var u4=1,c4=2,d4=8,f4=16,p4=32,h4=64,v4=128,m4=256,y4=512,g4=[["ary",v4],["bind",u4],["bindKey",c4],["curry",d4],["curryRight",f4],["flip",y4],["partial",p4],["partialRight",h4],["rearg",m4]];function _4(e,t){return fc(g4,function(n){var a="_."+n[0];t&n[1]&&!$M(e,a)&&e.push(a)}),e.sort()}function wk(e,t,n){var a=t+"";return j8(e,s4(a,_4(a4(a),n)))}var b4=4,w4=8,Xx=32,qx=64;function Ek(e,t,n,a,r,s,c,v,f,_){var g=t&w4,b=g?c:void 0,x=g?void 0:c,A=g?s:void 0,S=g?void 0:s;t|=g?Xx:qx,t&=~(g?qx:Xx),t&b4||(t&=-4);var E=[e,t,r,A,b,S,x,v,f,_],T=n.apply(void 0,E);return dw(e)&&bk(T,E),T.placeholder=a,wk(T,e,t)}function Lv(e){var t=e;return t.placeholder}var E4=Math.min;function O4(e,t){for(var n=e.length,a=E4(t.length,n),r=js(e);a--;){var s=t[a];e[a]=Xm(s,n)?r[s]:void 0}return e}var Yx="__lodash_placeholder__";function Hf(e,t){for(var n=-1,a=e.length,r=0,s=[];++n<a;){var c=e[n];(c===t||c===Yx)&&(e[n]=Yx,s[r++]=n)}return s}var x4=1,S4=2,A4=8,M4=16,k4=128,T4=512;function p_(e,t,n,a,r,s,c,v,f,_){var g=t&k4,b=t&x4,x=t&S4,A=t&(A4|M4),S=t&T4,E=x?void 0:Fm(e);function T(){for(var I=arguments.length,R=Array(I),U=I;U--;)R[U]=arguments[U];if(A)var L=Lv(T),D=JI(R,L);if(a&&(R=yk(R,a,r,A)),s&&(R=gk(R,s,c,A)),I-=D,A&&I<_){var W=Hf(R,L);return Ek(e,t,p_,T.placeholder,n,R,W,v,f,_-I)}var Y=b?n:this,B=x?Y[e]:e;return I=R.length,v?R=O4(R,v):S&&I>1&&R.reverse(),g&&f<I&&(R.length=f),this&&this!==ih&&this instanceof T&&(B=E||Fm(B)),B.apply(Y,R)}return T}function N4(e,t,n){var a=Fm(e);function r(){for(var s=arguments.length,c=Array(s),v=s,f=Lv(r);v--;)c[v]=arguments[v];var _=s<3&&c[0]!==f&&c[s-1]!==f?[]:Hf(c,f);if(s-=_.length,s<n)return Ek(e,t,p_,r.placeholder,void 0,c,_,void 0,void 0,n-s);var g=this&&this!==ih&&this instanceof r?a:e;return Ds(g,this,c)}return r}var P4=1;function C4(e,t,n,a){var r=t&P4,s=Fm(e);function c(){for(var v=-1,f=arguments.length,_=-1,g=a.length,b=Array(g+f),x=this&&this!==ih&&this instanceof c?s:e;++_<g;)b[_]=a[_];for(;f--;)b[_++]=arguments[++v];return Ds(x,r?n:this,b)}return c}var Kx="__lodash_placeholder__",_1=1,R4=2,j4=4,Zx=8,mm=128,Jx=256,D4=Math.min;function I4(e,t){var n=e[1],a=t[1],r=n|a,s=r<(_1|R4|mm),c=a==mm&&n==Zx||a==mm&&n==Jx&&e[7].length<=t[8]||a==(mm|Jx)&&t[7].length<=t[8]&&n==Zx;if(!(s||c))return e;a&_1&&(e[2]=t[2],r|=n&_1?0:j4);var v=t[3];if(v){var f=e[3];e[3]=f?yk(f,v,t[4]):v,e[4]=f?Hf(e[3],Kx):t[4]}return v=t[5],v&&(f=e[5],e[5]=f?gk(f,v,t[6]):v,e[6]=f?Hf(e[5],Kx):t[6]),v=t[7],v&&(e[7]=v),a&mm&&(e[8]=e[8]==null?t[8]:D4(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=r,e}var L4="Expected a function",Qx=1,$4=2,eS=8,tS=16,nS=32,F4=64,rS=Math.max;function Cd(e,t,n,a,r,s,c,v){var f=t&$4;if(!f&&typeof e!="function")throw new TypeError(L4);var _=a?a.length:0;if(_||(t&=-97,a=r=void 0),c=c===void 0?c:rS(io(c),0),v=v===void 0?v:io(v),_-=r?r.length:0,t&F4){var g=a,b=r;a=r=void 0}var x=f?void 0:uE(e),A=[e,t,n,a,r,g,b,s,c,v];if(x&&I4(A,x),e=A[0],t=A[1],n=A[2],a=A[3],r=A[4],v=A[9]=A[9]===void 0?f?0:e.length:rS(A[9]-_,0),!v&&t&(eS|tS)&&(t&=-25),!t||t==Qx)var S=YI(e,t,n);else t==eS||t==tS?S=N4(e,t,v):(t==nS||t==(Qx|nS))&&!r.length?S=C4(e,t,n,a):S=p_.apply(void 0,A);var E=x?mk:bk;return wk(E(S,A),e,t)}var B4=128;function Ok(e,t,n){return t=n?void 0:t,t=e&&t==null?e.length:t,Cd(e,B4,void 0,void 0,void 0,void 0,t)}var V4=i_(function(e,t){Hw(t,ah(t),e)}),fw=i_(function(e,t,n,a){Hw(t,ah(t),e,a)}),U4=i_(function(e,t,n,a){Hw(t,pc(t),e,a)});function cE(e,t){for(var n=-1,a=t.length,r=Array(a),s=e==null;++n<a;)r[n]=s?void 0:FM(e,t[n]);return r}var W4=lh(cE),G4="[object DOMException]",z4="[object Error]";function dE(e){if(!dc(e))return!1;var t=Rv(e);return t==z4||t==G4||typeof e.message=="string"&&typeof e.name=="string"&&!Xw(e)}var xk=ao(function(e,t){try{return Ds(e,void 0,t)}catch(n){return dE(n)?n:new Error(n)}}),H4="Expected a function";function Sk(e,t){var n;if(typeof t!="function")throw new TypeError(H4);return e=io(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var X4=1,q4=32,h_=ao(function(e,t,n){var a=X4;if(n.length){var r=Hf(n,Lv(h_));a|=q4}return Cd(e,a,t,n,r)});h_.placeholder={};var Y4=lh(fu
`:"";e.replace(x,function(T,I,R,U,L,D){return R||(R=U),b+=e.slice(_,D).replace(d7,n7),I&&(v=!0,b+=`' +
__e(`+I+`) +
'`),L&&(f=!0,b+=`';
`+L+`;
__p += '`),R&&(b+=`' +
((__t = (`+R+`)) == null ? '' : __t) +
'`),_=D+T.length,T}),b+=`';
`;var S=hS.call(t,"variable")&&t.variable;if(!S)b=`with (obj) {
`+b+`
}
`;else if(u7.test(S))throw new Error(i7);b=(f?b.replace(a7,""):b).replace(l7,"$1").replace(s7,"$1;"),b="function("+(S||"obj")+`) {
`+(S?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(f?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+b+`return __p
}`;var E=xk(function(){return Function(s,A+"return "+b).apply(void 0,c)});if(E.source=b,dE(E))throw E;return E}function w_(e,t){return t(e)}var h7=9007199254740991,w1=4294967295,v7=Math.min;function m7(e,t){if(e=io(e),e<1||e>h7)return[];var n=w1,a=v7(e,w1);t=uh(t),e-=w1;for(var r=ZM(a,t);++n<e;)t(n);return r}function y7(){return this}function kT(e,t){var n=e;return n instanceof eo&&(n=n.value()),uk(t,function(a,r){return r.func.apply(r.thisArg,qm([a],r.args))},n)}function g7(){return kT(this.__wrapped__,this.__actions__)}function _7(e){return Bo(e).toLowerCase()}function b7(e){return pa(e)?dl(e,a_):Sv(e)?[e]:js(J8(Bo(e)))}var vS=9007199254740991;function w7(e){return e?Dv(io(e),-vS,vS):e===0?e:0}function E7(e){return Bo(e).toUpperCase()}function O7(e,t,n){var a=pa(e),r=a||JM(e)||QM(e);if(t=Ao(t),n==null){var s=e&&e.constructor;r?n=a?new s:[]:Uf(e)?n=Iv(s)?Hm(Q8(e)):{}:n={}}return(r?fc:sh)(e,function(c,v,f){return t(n,c,v,f)}),n}function TT(e,t){for(var n=e.length;n--&&Yw(t,e[n],0)>-1;);return n}function NT(e,t){for(var n=-1,a=e.length;++n<a&&Yw(t,e[n],0)>-1;);return n}function x7(e,t,n){if(e=Bo(e),e&&(n||t===void 0))return eD(e);if(!e||!(t=wu(t)))return e;var a=Ou(e),r=Ou(t),s=NT(a,r),c=TT(a,r)+1;return Jf(a,s,c).join("")}function S7(e,t,n){if(e=Bo(e),e&&(n||t===void 0))return e.slice(0,tD(e)+1);if(!e||!(t=wu(t)))return e;var a=Ou(e),r=TT(a,Ou(t))+1;return Jf(a,0,r).join("")}var A7=/^\s+/;function M7(e,t,n){if(e=Bo(e),e&&(n||t===void 0))return e.replace(A7,"");if(!e||!(t=wu(t)))return e;var a=Ou(e),r=NT(a,Ou(t));return Jf(a,r).join("")}var k7=30,T7="...",N7=/\w*$/;function P7(e,t){var n=k7,a=T7;if(Uf(t)){var r="separator"in t?t.separator:r;n="length"in t?io(t.length):n,a="omission"in t?wu(t.omission):a}e=Bo(e);var s=e.length;if($v(e)){var c=Ou(e);s=c.length}if(n>=s)return e;var v=n-Bv(a);if(v<1)return a;var f=c?Jf(c,0,v).join(""):e.slice(0,v);if(r===void 0)return f+a;if(c&&(v+=f.length-v),sE(r)){if(e.slice(v).search(r)){var _,g=f;for(r.global||(r=RegExp(r.source,Bo(N7.exec(r))+"g")),r.lastIndex=0;_=r.exec(g);)var b=_.index;f=f.slice(0,b===void 0?v:b)}}else if(e.indexOf(wu(r),v)!=v){var x=f.lastIndexOf(r);x>-1&&(f=f.slice(0,x))}return f+a}function C7(e){return Ok(e,1)}var R7={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},j7=hE(R7),PT=/&(?:amp|lt|gt|quot|#39);/g,D7=RegExp(PT.source);function I7(e){return e=Bo(e),e&&D7.test(e)?e.replace(PT,j7):e}var L7=ao(function(e){var t=Eu(e);return Ta(t)&&(t=void 0),Lm(hc(e,1,Ta,!0),Ao(t))}),$7=ao(function(e){var t=Eu(e);return t=typeof t=="function"?t:void 0,Lm(hc(e,1,Ta,!0),void 0,t)});function F7(e,t){return t=typeof t=="function"?t:void 0,e&&e.length?Lm(e,void 0,t):[]}function B7(e,t){return e==null?!0:KM(e,t)}var V7=Math.max;function ME(e){if(!(e&&e.length))return[];var t=0;return e=Ym(e,function(n){if(Ta(n))return t=V7(n.length,t),!0}),ZM(t,function(n){return dl(e,qM(n))})}function CT(e,t){if(!(e&&e.length))return[];var n=ME(e);return t==null?n:dl(n,function(a){return Ds(t,void 0,a)})}function RT(e,t,n,a){return Kw(e,t,n(YM(e,t)),a)}function U7(e,t,n){return e==null?e:RT(e,t,uh(n))}function W7(e,t,n,a){return a=typeof a=="function"?a:void 0,e==null?e:RT(e,t,uh(n),a)}var G7=Fv(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()});function z7(e){return e==null?[]:ck(e,ah(e))}var H7=ao(function(e,t){return Ta(e)?c_(e,t):[]});function X7(e,t){return g_(uh(t),e)}var q7=lh(function(e){var t=e.length,n=t?e[0]:0,a=this.__wrapped__,r=function(s){return cE(s,e)};return t>1||this.__actions__.length||!(a instanceof eo)||!Xm(n)?this.thru(r):(a=a.slice(n,+n+(t?1:0)),a.__actions__.push({func:w_,args:[r],thisArg:void 0}),new Is(a,this.__chain__).thru(function(s){return t&&!s.length&&s.push(void 0),s}))});function Y7(){return Yk(this)}function K7(){var e=this.__wrapped__;if(e instanceof eo){var t=e;return this.__actions__.length&&(t=new eo(this)),t=t.reverse(),t.__actions__.push({func:w_,args:[gw],thisArg:void 0}),new Is(t,this.__chain__)}return this.thru(gw)}function kE(e,t,n){var a=e.length;if(a<2)return a?Lm(e[0]):[];for(var r=-1,s=Array(a);++r<a;)for(var c=e[r],v=-1;++v<a;)v!=r&
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/var pB="4.17.21",hB=2,vB=1,mB=3,jT=4294967295,yB=Array.prototype,gB=Object.prototype,DT=gB.hasOwnProperty,mS=Tg?Tg.iterator:void 0,_B=Math.max,yS=Math.min,NE=(function(e){return function(t,n,a){if(a==null){var r=Uf(n),s=r&&pc(n),c=s&&s.length&&m_(n,s);(c?c.length:r)||(a=n,n=t,t=this)}return e(t,n,a)}})(V$);ce.after=Ri.after;ce.ary=Ri.ary;ce.assign=Ar.assign;ce.assignIn=Ar.assignIn;ce.assignInWith=Ar.assignInWith;ce.assignWith=Ar.assignWith;ce.at=Ar.at;ce.before=Ri.before;ce.bind=Ri.bind;ce.bindAll=Mo.bindAll;ce.bindKey=Ri.bindKey;ce.castArray=fr.castArray;ce.chain=mc.chain;ce.chunk=Bn.chunk;ce.compact=Bn.compact;ce.concat=Bn.concat;ce.cond=Mo.cond;ce.conforms=Mo.conforms;ce.constant=Mo.constant;ce.countBy=Vo.countBy;ce.create=Ar.create;ce.curry=Ri.curry;ce.curryRight=Ri.curryRight;ce.debounce=Ri.debounce;ce.defaults=Ar.defaults;ce.defaultsDeep=Ar.defaultsDeep;ce.defer=Ri.defer;ce.delay=Ri.delay;ce.difference=Bn.difference;ce.differenceBy=Bn.differenceBy;ce.differenceWith=Bn.differenceWith;ce.drop=Bn.drop;ce.dropRight=Bn.dropRight;ce.dropRightWhile=Bn.dropRightWhile;ce.dropWhile=Bn.dropWhile;ce.fill=Bn.fill;ce.filter=Vo.filter;ce.flatMap=Vo.flatMap;ce.flatMapDeep=Vo.flatMapDeep;ce.flatMapDepth=Vo.flatMapDepth;ce.flatten=Bn.flatten;ce.flattenDeep=Bn.flattenDeep;ce.flattenDepth=Bn.flattenDepth;ce.flip=Ri.flip;ce.flow=Mo.flow;ce.flowRight=Mo.flowRight;ce.fromPairs=Bn.fromPairs;ce.functions=Ar.functions;ce.functionsIn=Ar.functionsIn;ce.groupBy=Vo.groupBy;ce.initial=Bn.initial;ce.intersection=Bn.intersection;ce.intersectionBy=Bn.intersectionBy;ce.intersectionWith=Bn.intersectionWith;ce.invert=Ar.invert;ce.invertBy=Ar.invertBy;ce.invokeMap=Vo.invokeMap;ce.iteratee=Mo.iteratee;ce.keyBy=Vo.keyBy;ce.keys=pc;ce.keysIn=Ar.keysIn;ce.map=Vo.map;ce.mapKeys=Ar.mapKeys;ce.mapValues=Ar.mapValues;ce.matches=Mo.matches;ce.matchesProperty=Mo.matchesProperty;ce.memoize=Ri.memoize;ce.merge=Ar.merge;ce.mergeWith=Ar.mergeWith;ce.method=Mo.method;ce.methodOf=Mo.methodOf;ce.mixin=NE;ce.negate=lE;ce.nthArg=Mo.nthArg;ce.omit=Ar.omit;ce.omitBy=Ar.omitBy;ce.once=Ri.once;ce.orderBy=Vo.orderBy;ce.over=Mo.over;ce.overArgs=Ri.overArgs;ce.overEvery=Mo.overEvery;ce.overSome=Mo.overSome;ce.partial=Ri.partial;ce.partialRight=Ri.partialRight;ce.partition=Vo.partition;ce.pick=Ar.pick;ce.pickBy=Ar.pickBy;ce.property=Mo.property;ce.propertyOf=Mo.propertyOf;ce.pull=Bn.pull;ce.pullAll=Bn.pullAll;ce.pullAllBy=Bn.pullAllBy;ce.pullAllWith=Bn.pullAllWith;ce.pullAt=Bn.pullAt;ce.range=Mo.range;ce.rangeRight=Mo.rangeRight;ce.rearg=Ri.rearg;ce.reject=Vo.reject;ce.remove=Bn.remove;ce.rest=Ri.rest;ce.reverse=Bn.reverse;ce.sampleSize=Vo.sampleSize;ce.set=Ar.set;ce.setWith=Ar.setWith;ce.shuffle=Vo.shuffle;ce.slice=Bn.slice;ce.sortBy=Vo.sortBy;ce.sortedUniq=Bn.sortedUniq;ce.sortedUniqBy=Bn.sortedUniqBy;ce.split=bo.split;ce.spread=Ri.spread;ce.tail=Bn.tail;ce.take=Bn.take;ce.takeRight=Bn.takeRight;ce.takeRightWhile=Bn.takeRightWhile;ce.takeWhile=Bn.takeWhile;ce.tap=mc.tap;ce.throttle=Ri.throttle;ce.thru=w_;ce.toArray=fr.toArray;ce.toPairs=Ar.toPairs;ce.toPairsIn=Ar.toPairsIn;ce.toPath=Mo.toPath;ce.toPlainObject=fr.toPlainObject;ce.transform=Ar.transform;ce.unary=Ri.unary;ce.union=Bn.union;ce.unionBy=Bn.unionBy;ce.unionWith=Bn.unionWith;ce.uniq=Bn.uniq;ce.uniqBy=Bn.uniqBy;ce.uniqWith=Bn.uniqWith;ce.unset=Ar.unset;ce.unzip=Bn.unzip;ce.unzipWith=Bn.unzipWith;ce.update=Ar.update;ce.updateWith=Ar.updateWith;ce.values=Ar.values;ce.valuesIn=Ar.valuesIn;ce.without=Bn.without;ce.words=bo.words;ce.wrap=Ri.wrap;ce.xor=Bn.xor;ce.xorBy=Bn.xorBy;ce.xorWith=Bn.xorWith;ce.zip=Bn.zip;ce.zipObject=Bn.zipObject;ce.zipObjectDeep=Bn.zipObjectDeep;ce.zipWith=Bn.zipWith;ce.entries=Ar.toPairs;ce.entriesIn=Ar.toPairsIn;ce.extend=Ar.assignIn;ce.extendWith=Ar.assignInWith;NE(ce,ce);ce.add=pl.add;ce.attempt=Mo.attempt;ce.camelCase=bo.camelCase;ce.capitalize=bo.capitalize;ce.ceil=pl.ceil;ce.clamp=TE.clamp;ce.clone=fr.clone;ce.cloneDeep=fr.cloneDeep;ce.cloneDeepWith=fr.cloneDeepWith;ce.cloneWith=fr.cloneWith;ce.conformsTo=fr.conformsTo;ce.deburr=bo.deburr;ce.defaultTo=Mo.defaultTo;ce.divide=pl.divide;ce.
{{${yt("views.applicationWorkflow.nodes.searchKnowledgeNode.label")}.data}}
${yt("views.problem.title")}
{{${yt("views.applicationWorkflow.nodes.startNode.label")}.question}}`,dialogue_number:1,is_result:!0,temperature:null,max_tokens:null,dialogue_type:"WORKFLOW",model_setting:{reasoning_content_start:"<think>",reasoning_content_end:"</think>",reasoning_content_enable:!1}},b=$n({get:()=>x.nodeModel.properties.node_data?(x.nodeModel.properties.node_data.model_setting||me.set(x.nodeModel.properties.node_data,"model_setting",{reasoning_content_start:"<think>",reasoning_content_end:"</think>",reasoning_content_enable:!1}),x.nodeModel.properties.node_data):(me.set(x.nodeModel.properties,"node_data",g),x.nodeModel.properties.node_data),set:Be=>{me.set(x.nodeModel.properties,"node_data",Be)}}),x=e,A=je(),S=je(null),E=je(),T=je(),I=()=>{var Be;return(Be=A.value)==null?void 0:Be.validate().catch(dt=>Promise.reject({node:x.nodeModel,errMessage:dt}))},R=t();function U(){var dt;const Be=r.value==="systemManage"?{model_type:"LLM",workspace_id:(dt=R.value)==null?void 0:dt.workspace_id}:{model_type:"LLM"};po({type:"model",systemType:r.value}).getSelectModelList(Be).then(St=>{S.value=me.groupBy(St==null?void 0:St.data,"provider")})}const L=Be=>{var dt;Be&&((dt=E.value)==null||dt.open(Be,a,b.value.model_params_setting))},D=je(),W=Be=>{var dt;Be&&((dt=D.value)==null||dt.open(Be,a))},Y=Be=>{me.set(x.nodeModel.properties.node_data,"system",Be)},B=()=>{var Be;(Be=T.value)==null||Be.open(b.value.model_setting)};function V(Be){me.set(x.nodeModel.properties.node_data,"model_params_setting",Be)}function z(Be){let dt=me.cloneDeep(x.nodeModel.properties.node_data.model_setting);dt={...dt,...Be},me.set(x.nodeModel.properties.node_data,"model_setting",dt)}const H=je();function q(){const Be={mcp_servers:b.value.mcp_servers,mcp_tool_ids:b.value.mcp_tool_ids,mcp_source:b.value.mcp_source};H.value.open(Be,rt.value)}function ee(Be){me.set(x.nodeModel.properties.node_data,"mcp_servers",Be.mcp_servers),me.set(x.nodeModel.properties.node_data,"mcp_tool_ids",Be.mcp_tool_ids),me.set(x.nodeModel.properties.node_data,"mcp_source",Be.mcp_source)}const ue=je();function ie(){ue.value.open(b.value.tool_ids)}function be(Be){me.set(x.nodeModel.properties.node_data,"tool_ids",Be.tool_ids)}function De(Be){const dt=x.nodeModel.properties.node_data.tool_ids.filter(St=>St!==Be);me.set(x.nodeModel.properties.node_data,"tool_ids",dt)}function Ne(Be){const dt=x.nodeModel.properties.node_data.mcp_tool_ids.filter(St=>St!==Be);me.set(x.nodeModel.properties.node_data,"mcp_tool_ids",dt)}const Ae=je([]);function Te(){var dt;const Be=r.value==="systemManage"?{scope:"WORKSPACE",tool_type:"CUSTOM",workspace_id:(dt=R.value)==null?void 0:dt.workspace_id}:{scope:"WORKSPACE",tool_type:"CUSTOM"};po({type:"tool",systemType:r.value}).getAllToolList(Be).then(St=>{Ae.value=[...St.data.shared_tools,...St.data.tools].filter(He=>He.is_active)})}const rt=je([]);function tt(){var dt;const Be=r.value==="systemManage"?{scope:"WORKSPACE",tool_type:"MCP",workspace_id:(dt=R.value)==null?void 0:dt.workspace_id}:{scope:"WORKSPACE",tool_type:"MCP"};po({type:"tool",systemType:r.value}).getAllToolList(Be).then(St=>{rt.value=[...St.data.shared_tools,...St.data.tools].filter(He=>He.is_active)})}return Ir(()=>{var Be,dt,St,He;U(),typeof((Be=x.nodeModel.properties.node_data)==null?void 0:Be.is_result)>"u"&&vc(x.nodeModel)&&me.set(x.nodeModel.properties.node_data,"is_result",!0),me.set(x.nodeModel,"validate",I),b.value.dialogue_type||(b.value.dialogue_type="WORKFLOW"),(dt=x.nodeModel.properties.node_data)!=null&&dt.mcp_tool_id&&(me.set(x.nodeModel.properties.node_data,"mcp_tool_ids",[(St=x.nodeModel.properties.node_data)==null?void 0:St.mcp_tool_id]),me.set(x.nodeModel.properties.node_data,"mcp_tool_id",void 0)),((He=x.nodeModel.properties.node_data)==null?void 0:He.mcp_output_enable)===void 0&&me.set(x.nodeModel.properties.node_data,"mcp_output_enable",!0),Te(),tt()}),(Be,dt)=>{const St=J("AppIcon"),He=J("el-button"),Qt=J("ModelSelect"),Fe=J("el-form-item"),we=J("el-tooltip"),Re=J("MdEditorMagnify"),Ye=J("el-option"),Ot=J("el-select"),bt=J("el-input-number"),Ft=J("el-switch"),en=J("el-avatar"),on=J("ToolIcon"),W
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var ue=function(){return ue=Object.assign||function(N){for(var C,X=1,ae=arguments.length;X<ae;X++)for(var Ee in C=arguments[X])Object.prototype.hasOwnProperty.call(C,Ee)&&(N[Ee]=C[Ee]);return N},ue.apply(this,arguments)};function ie(N){var C=typeof Symbol=="function"&&N[Symbol.iterator],X=0;return C?C.call(N):{next:function(){return N&&X>=N.length&&(N=void 0),{value:N&&N[X++],done:!N}}}}function be(N,C){var X=typeof Symbol=="function"&&N[Symbol.iterator];if(!X)return N;var ae,Ee,Ke=X.call(N),wt=[];try{for(;(C===void 0||C-- >0)&&!(ae=Ke.next()).done;)wt.push(ae.value)}catch(Kt){Ee={error:Kt}}finally{try{ae&&!ae.done&&(X=Ke.return)&&X.call(Ke)}finally{if(Ee)throw Ee.error}}return wt}function De(){for(var N=[],C=0;C<arguments.length;C++)N=N.concat(be(arguments[C]));return N}var Ne=Symbol("mobx did run lazy initializers"),Ae=Symbol("mobx pending decorators"),Te={},rt={};function tt(N,C){var X=C?Te:rt;return X[N]||(X[N]={configurable:!0,enumerable:C,get:function(){return Be(this),this[N]},set:function(ae){Be(this),this[N]=ae}})}function Be(N){var C,X;if(N[Ne]!==!0){var ae=N[Ae];if(ae){T(N,Ne,!0);var Ee=De(Object.getOwnPropertySymbols(ae),Object.keys(ae));try{for(var Ke=ie(Ee),wt=Ke.next();!wt.done;wt=Ke.next()){var Kt=ae[wt.value];Kt.propertyCreator(N,Kt.prop,Kt.descriptor,Kt.decoratorTarget,Kt.decoratorArguments)}}catch(Sn){C={error:Sn}}finally{try{wt&&!wt.done&&(X=Ke.return)&&X.call(Ke)}finally{if(C)throw C.error}}}}}function dt(N,C){return function(){var X,ae=function(Ee,Ke,wt,Kt){if(Kt===!0)return C(Ee,Ke,wt,Ee,X),null;if(!Object.prototype.hasOwnProperty.call(Ee,Ae)){var Sn=Ee[Ae];T(Ee,Ae,ue({},Sn))}return Ee[Ae][Ke]={prop:Ke,propertyCreator:C,descriptor:wt,decoratorTarget:Ee,decoratorArguments:X},tt(Ke,N)};return St(arguments)?(X=v,ae.apply(null,arguments)):(X=Array.prototype.slice.call(arguments),ae)}}function St(N){return(N.length===2||N.length===3)&&(typeof N[1]=="string"||typeof N[1]=="symbol")||N.length===4&&N[3]===!0}function He(N,C,X){return si(N)?N:Array.isArray(N)?Wt.array(N,{name:X}):E(N)?Wt.object(N,void 0,{name:X}):R(N)?Wt.map(N,{name:X}):U(N)?Wt.set(N,{name:X}):N}function Qt(N){return N}function Fe(N){b(N);var C=dt(!0,(function(ae,Ee,Ke,wt,Kt){var Sn=Ke?Ke.initializer?Ke.initializer.call(ae):Ke.value:void 0;ia(ae).addObservableProp(Ee,Sn,N)})),X=(s!==void 0&&s.env,C);return X.enhancer=N,X}var we={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Re(N){return N==null?we:typeof N=="string"?{name:N,deep:!0,proxy:!0}:N}Object.freeze(we);var Ye=Fe(He),Ot=Fe((function(N,C,X){return N==null||ci(N)||_a(N)||Ko(N)||ni(N)?N:Array.isArray(N)?Wt.array(N,{name:X,deep:!1}):E(N)?Wt.object(N,void 0,{name:X,deep:!1}):R(N)?Wt.map(N,{name:X,deep:!1}):U(N)?Wt.set(N,{name:X,deep:!1}):g(!1)})),bt=Fe(Qt),Ft=Fe((function(N,C,X){return Vt(N,C)?C:N}));function en(N){return N.defaultDecorator?N.defaultDecorator.enhancer:N.deep===!1?Qt:He}var on={box:function(N,C){arguments.length>2&&nt("box");var X=Re(C);return new Lr(N,en(X),X.name,!0,X.equals)},array:function(N,C){arguments.length>2&&nt("array");var X=Re(C);return Fl(N,en(X),X.name)},map:function(N,C){arguments.length>2&&nt("map");var X=Re(C);return new Pc(N,en(X),X.name)},set:function(N,C){arguments.length>2&&nt("set");var X=Re(C);return new qa(N,en(X),X.name)},object:function(N,C,X){typeof arguments[1]=="string"&&nt("object");var ae=Re(X);if(ae.proxy===!1)return ma({},N,C,ae);var Ee=ku(ae),Ke=ma({},void 0,void 0,ae),wt=us(Ke);return Ud(wt,N,C,Ee),wt},ref:bt,shallow:Ot,deep:Ye,struct:Ft},Wt=function(N,C,X){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return Ye.apply(null,arguments);if(si(N))return N;var ae=E(N)?Wt.object(N,C,X):Array.isArray(N)?Wt.array(N,C):R(N)?Wt.map(N,C):U(N)?Wt.set(N,C):N;if(ae!==N)return ae;g(!1)};function nt(N){g("Expected one or two arguments to observable."+N+". Did you accidentally try to use observable."+N+" as decorator?")}Object.keys(on).forEach((function(N){return Wt[N]=on[N]}));var sn,We,yn=dt(!1,(function(N,C,X,ae,Ee){var Ke=X.get,wt=X.s
/*
Tracing '`+N.name+`'
You are entering this break point because derivation '`+N.name+"' is being traced and '"+C.name+`' is now forcing it to update.
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
The stackframe you are looking for is at least ~6-8 stack-frames up.
`+(N instanceof za?N.derivation.toString().replace(/[*]\//g,"/"):"")+`
The dependencies for this derivation are:
`+X.join(`
`)+`
*/
`)()}}function va(N,C,X){C.length>=1e3?C.push("(and many more)"):(C.push(""+new Array(X).join(" ")+N.name),N.dependencies&&N.dependencies.forEach((function(ae){return va(ae,C,X+1)})))}var Pa=(function(){function N(C,X,ae,Ee){C===void 0&&(C="Reaction@"+_()),Ee===void 0&&(Ee=!1),this.name=C,this.onInvalidate=X,this.errorHandler=ae,this.requiresObservable=Ee,this.observing=[],this.newObserving=[],this.dependenciesState=sn.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+_(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=We.NONE}return N.prototype.onBecomeStale=function(){this.schedule()},N.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Rn.pendingReactions.push(this),wc())},N.prototype.isScheduled=function(){return this._isScheduled},N.prototype.runReaction=function(){if(!this.isDisposed){if(Ki(),this._isScheduled=!1,Dr(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(C){this.reportExceptionInDerivation(C)}}oa()}},N.prototype.track=function(C){if(!this.isDisposed){Ki(),this._isRunning=!0;var X=ko(this,C,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Se(this),br(X)&&this.reportExceptionInDerivation(X.cause),oa()}},N.prototype.reportExceptionInDerivation=function(C){var X=this;if(this.errorHandler)this.errorHandler(C,this);else{if(Rn.disableErrorBoundaries)throw C;Rn.suppressReactionErrors,Rn.globalReactionErrorHandlers.forEach((function(ae){return ae(C,X)}))}},N.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ki(),Se(this),oa()))},N.prototype.getDisposer=function(){var C=this.dispose.bind(this);return C[B]=this,C},N.prototype.toString=function(){return"Reaction["+this.name+"]"},N.prototype.trace=function(C){C===void 0&&(C=!1),(function(){for(var X=[],ae=0;ae<arguments.length;ae++)X[ae]=arguments[ae];var Ee=!1;typeof X[X.length-1]=="boolean"&&(Ee=X.pop());var Ke=Vr(X);if(!Ke)return g(!1);Ke.isTracing,We.NONE,Ke.isTracing=Ee?We.BREAK:We.LOG})(this,C)},N})(),bc=function(N){return N()};function wc(){Rn.inBatch>0||Rn.isRunningReactions||bc(Ld)}function Ld(){Rn.isRunningReactions=!0;for(var N=Rn.pendingReactions,C=0;N.length>0;){++C==100&&N.splice(0);for(var X=N.splice(0),ae=0,Ee=X.length;ae<Ee;ae++)X[ae].runReaction()}Rn.isRunningReactions=!1}var Fs=I("Reaction",Pa);function $d(N){var C=bc;bc=function(X){return N((function(){return C(X)}))}}function Ec(N){return function(){}}function rp(){g(!1)}function Il(N){return function(C,X,ae){if(ae){if(ae.value)return{value:Yo(N,ae.value),enumerable:!1,configurable:!0,writable:!0};var Ee=ae.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Yo(N,Ee.call(this))}}}return Fd(N).apply(this,arguments)}}function Fd(N){return function(C,X,ae){Object.defineProperty(C,X,{configurable:!0,enumerable:!1,get:function(){},set:function(Ee){T(this,X,gl(N,Ee))}})}}var gl=function(N,C,X,ae){return arguments.length===1&&typeof N=="function"?Yo(N.name||"<unnamed action>",N):arguments.length===2&&typeof C=="function"?Yo(N,C):arguments.length===1&&typeof N=="string"?Il(N):ae!==!0?Il(C).apply(null,arguments):void T(N,C,Yo(N.name||C,X.value,this))};function Oc(N,C){return ti(typeof N=="string"?N:N.name||"<unnamed action>",typeof N=="function"?N:C,this,void 0)}function Mu(N){return typeof N=="function"&&N.isMobxAction===!0}function xc(N,C,X){T(N,C,Yo(C,X.bind(N)))}function Sc(N,C){C===void 0&&(C=f);var X,ae=C&&C.name||N.name||"Autorun@"+_();if(!C.scheduler&&!C.delay)X=new Pa(ae,(function(){this.track(wt)}),C.onError,C.requiresObservable);else{var Ee=Bd(C),Ke=!1;X=new Pa(ae,(function(){Ke||(Ke=!0,Ee((function(){Ke=!1,X.isDisposed||X.track(wt)})))}),C.onError,C.requiresObservable)}function wt(){N(X)}return X.schedule(),X.getDisposer()}gl.bound=function(N,C,X,ae){return ae===!0?(xc(N,C,X.value),null):X?{configurable:!0,enumerable:!1,get:function(){return xc(this,C,X.value||X.initializer.call(this)),this[C]},set:rp}:{enumerable:!1,configurable:!0,set:function(Ee){xc(this,C,Ee)},
`)&&(He="(?: "+He+")",Fe=" "+Fe,Qt++),ee=new RegExp("^(?:"+He+")",St)),z&&(ee=new RegExp("^"+He+"$(?!\\s)",St)),B&&(ue=Ae.lastIndex),ie=v(R,dt?ee:Ae,Fe),dt?ie?(ie.input=Y(ie.input,Qt),ie[0]=Y(ie[0],Qt),ie.index=Ae.lastIndex,Ae.lastIndex+=ie[0].length):Ae.lastIndex=0:B&&ie&&(Ae.lastIndex=Ae.global?ie.index+ie[0].length:ue),z&&ie&&ie.length>1&&v(I,ie[0],ee,(function(){for(be=1;be<arguments.length-2;be++)arguments[be]===void 0&&(ie[be]=void 0)})),ie&&Be)for(ie.groups=De=A(null),be=0;be<Be.length;be++)De[(Ne=Be[be])[0]]=ie[Ne[1]];return ie}),n.exports=U},function(n,a,r){var s=r(16),c=r(7),v=r(75),f=r(59),_=r(45),g=r(40),b=r(115),x=r(63),A=r(81)("splice"),S=c.TypeError,E=Math.max,T=Math.min,I=9007199254740991,R="Maximum allowed length exceeded";s({target:"Array",proto:!0,forced:!A},{splice:function(U,L){var D,W,Y,B,V,z,H=g(this),q=_(H),ee=v(U,q),ue=arguments.length;if(ue===0?D=W=0:ue===1?(D=0,W=q-ee):(D=ue-2,W=T(E(f(L),0),q-ee)),q+D-W>I)throw S(R);for(Y=b(H,W),B=0;B<W;B++)(V=ee+B)in H&&x(Y,B,H[V]);if(Y.length=W,D<W){for(B=ee;B<q-W;B++)z=B+D,(V=B+W)in H?H[z]=H[V]:delete H[z];for(B=q;B>q-W+D;B--)delete H[B-1]}else if(D>W)for(B=q-W;B>ee;B--)z=B+D-1,(V=B+W-1)in H?H[z]=H[V]:delete H[z];for(B=0;B<D;B++)H[B+ee]=arguments[B+2];return H.length=q-W+D,Y}})},function(n,a,r){var s=r(16),c=r(205);s({target:"String",proto:!0,forced:r(206)("anchor")},{anchor:function(v){return c(this,"a","name",v)}})},function(n,a,r){(function(s){var c=typeof s=="object"&&s&&s.Object===Object&&s;a.a=c}).call(this,r(68))},function(n,a,r){(function(s){var c=r(31),v=t&&!t.nodeType&&t,f=v&&typeof s=="object"&&s&&!s.nodeType&&s,_=f&&f.exports===v?c.a.Buffer:void 0,g=_?_.allocUnsafe:void 0;a.a=function(b,x){if(x)return b.slice();var A=b.length,S=g?g(A):new b.constructor(A);return b.copy(S),S}}).call(this,r(122)(n))},function(n,a,r){var s=r(70),c=r(18);n.exports=!!Object.getOwnPropertySymbols&&!c((function(){var v=Symbol();return!String(v)||!(Object(v)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},function(n,a,r){var s=r(7),c=r(110),v="__core-js_shared__",f=s[v]||c(v,{});n.exports=f},function(n,a,r){var s=r(7),c=Object.defineProperty;n.exports=function(v,f){try{c(s,v,{value:f,configurable:!0,writable:!0})}catch{s[v]=f}return f}},function(n,a){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(n,a){a.f=Object.getOwnPropertySymbols},function(n,a,r){var s={};s[r(28)("toStringTag")]="z",n.exports=String(s)==="[object z]"},function(n,a,r){var s=r(7),c=r(75),v=r(45),f=r(63),_=s.Array,g=Math.max;n.exports=function(b,x,A){for(var S=v(b),E=c(x,S),T=c(A===void 0?S:A,S),I=_(g(T-E,0)),R=0;E<T;E++,R++)f(I,R,b[E]);return I.length=R,I}},function(n,a,r){var s=r(178);n.exports=function(c,v){return new(s(c))(v===0?0:v)}},function(n,a,r){var s=r(16),c=r(34),v=r(71),f=r(73),_=r(30),g=r(180),b=r(101),x=r(102),A=r(78),S=r(57),E=r(42),T=r(28),I=r(80),R=r(142),U=f.PROPER,L=f.CONFIGURABLE,D=R.IteratorPrototype,W=R.BUGGY_SAFARI_ITERATORS,Y=T("iterator"),B="keys",V="values",z="entries",H=function(){return this};n.exports=function(q,ee,ue,ie,be,De,Ne){g(ue,ee,ie);var Ae,Te,rt,tt=function(we){if(we===be&&Qt)return Qt;if(!W&&we in St)return St[we];switch(we){case B:case V:case z:return function(){return new ue(this,we)}}return function(){return new ue(this)}},Be=ee+" Iterator",dt=!1,St=q.prototype,He=St[Y]||St["@@iterator"]||be&&St[be],Qt=!W&&He||tt(be),Fe=ee=="Array"&&St.entries||He;if(Fe&&(Ae=b(Fe.call(new q)))!==Object.prototype&&Ae.next&&(v||b(Ae)===D||(x?x(Ae,D):_(Ae[Y])||E(Ae,Y,H)),A(Ae,Be,!0,!0),v&&(I[Be]=H)),U&&be==V&&He&&He.name!==V&&(!v&&L?S(St,"name",V):(dt=!0,Qt=function(){return c(He,this)})),be)if(Te={values:tt(V),keys:De?Qt:tt(B),entries:tt(z)},Ne)for(rt in Te)(W||dt||!(rt in St))&&E(St,rt,Te[rt]);else s({target:ee,proto:!0,forced:W||dt},Te);return v&&!Ne||St[Y]===Qt||E(St,Y,Qt,{name:be}),I[ee]=Qt,Te}},function(n,a,r){var s=r(7),c=r(64),v=r(34),f=r(32),_=r(88),g=r(145),b=r(45),x=r(54),A=r(146),S=r(118),E=r(147),T=s.TypeError,I=function(U,L){this.stopped=U,this.result=L},R=I.prototype;n.exports=function
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(){var f,_="Expected a function",g="__lodash_hash_undefined__",b="__lodash_placeholder__",x=16,A=32,S=64,E=128,T=256,I=1/0,R=9007199254740991,U=NaN,L=4294967295,D=[["ary",E],["bind",1],["bindKey",2],["curry",8],["curryRight",x],["flip",512],["partial",A],["partialRight",S],["rearg",T]],W="[object Arguments]",Y="[object Array]",B="[object Boolean]",V="[object Date]",z="[object Error]",H="[object Function]",q="[object GeneratorFunction]",ee="[object Map]",ue="[object Number]",ie="[object Object]",be="[object Promise]",De="[object RegExp]",Ne="[object Set]",Ae="[object String]",Te="[object Symbol]",rt="[object WeakMap]",tt="[object ArrayBuffer]",Be="[object DataView]",dt="[object Float32Array]",St="[object Float64Array]",He="[object Int8Array]",Qt="[object Int16Array]",Fe="[object Int32Array]",we="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ye="[object Uint16Array]",Ot="[object Uint32Array]",bt=/\b__p \+= '';/g,Ft=/\b(__p \+=) '' \+/g,en=/(__e\(.*?\)|\b__t\)) \+\n'';/g,on=/&(?:amp|lt|gt|quot|#39);/g,Wt=/[&<>"']/g,nt=RegExp(on.source),sn=RegExp(Wt.source),We=/<%-([\s\S]+?)%>/g,yn=/<%([\s\S]+?)%>/g,Kn=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gn=/^\w*$/,br=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/[\\^$.*+?()[\]{}|]/g,zr=RegExp(Dr.source),jn=/^\s+/,ko=/\s/,Se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qe=/\{\n\/\* \[wrapped with (.+)\] \*/,$e=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,an=/[()=,{}\[\]\/\s]/,tn=/\\(\\)?/g,Tn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sr=/\w*$/,li=/^[-+]0x[0-9a-f]+$/i,Ei=/^0b[01]+$/i,Yo=/^\[object .+?Constructor\]$/,ti=/^0o[0-7]+$/i,Nn=/^(?:0|[1-9]\d*)$/,Un=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zn=/($^)/,ur=/['\n\r\u2028\u2029\\]/g,to="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Lr="\\u2700-\\u27bf",ml="a-z\\xdf-\\xf6\\xf8-\\xff",za="A-Z\\xc0-\\xd6\\xd8-\\xde",yl="\\ufe0e\\ufe0f",as="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",np="[']",gc="[\\ud800-\\udfff]",ha="["+as+"]",$s="["+to+"]",Rn="\\d+",Id="[\\u2700-\\u27bf]",Eo="["+ml+"]",_c="[^\\ud800-\\udfff"+as+Rn+Lr+ml+za+"]",Ki="\\ud83c[\\udffb-\\udfff]",oa="[^\\ud800-\\udfff]",Au="(?:\\ud83c[\\udde6-\\uddff]){2}",Na="[\\ud800-\\udbff][\\udc00-\\udfff]",va="["+za+"]",Pa="(?:"+Eo+"|"+_c+")",bc="(?:"+va+"|"+_c+")",wc="(?:['](?:d|ll|m|re|s|t|ve))?",Ld="(?:['](?:D|LL|M|RE|S|T|VE))?",Fs="(?:"+$s+"|"+Ki+")?",$d="[\\ufe0e\\ufe0f]?",Ec=$d+Fs+("(?:\\u200d(?:"+[oa,Au,Na].join("|")+")"+$d+Fs+")*"),rp="(?:"+[Id,Au,Na].join("|")+")"+Ec,Il="(?:"+[oa+$s+"?",$s,Au,Na,gc].join("|")+")",Fd=RegExp(np,"g"),gl=RegExp($s,"g"),Oc=RegExp(Ki+"(?="+Ki+")|"+Il+Ec,"g"),Mu=RegExp([va+"?"+Eo+"+"+wc+"(?="+[ha,va,"$"].join("|")+")",bc+"+"+Ld+"(?="+[ha,va+Pa,"$"].join("|")+")",va+"?"+Pa+"+"+wc,va+"+"+Ld,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rn,rp].join("|"),"g"),xc=RegExp("[\\u200d\\ud800-\\udfff"+to+yl+"]"),Sc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,op=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bd=-1,Kr={};Kr[dt]=Kr[St]=Kr[He]=Kr[Qt]=Kr[Fe]=Kr[we]=Kr[Re]=Kr[Ye]=Kr[Ot]=!0,Kr[W]=Kr[Y]=Kr[tt]=Kr[B]=Kr[Be]=Kr[V]=Kr[z]=Kr[H]=Kr[ee]=Kr[ue]=Kr[ie]=Kr[De]=Kr[Ne]=Kr[Ae]=Kr[rt]=!1;var Xr={};Xr[W]=Xr[Y]=Xr[tt]=Xr[Be]=Xr[B]=Xr[V]=Xr[dt]=Xr[St]=Xr[He]=Xr[Qt]=Xr[Fe]=Xr[ee]=Xr[ue]=Xr[ie]=Xr[De]=Xr[Ne]=Xr[Ae]=Xr[Te]=Xr[we]=Xr[Re]=Xr[Ye]=Xr[Ot]=!0,Xr[z]=Xr[H]=Xr[rt]=!1;var Vd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ls=parseFloat,ma=parseInt,ku=typeof s=="object"&&s&&s.Ob
/* [wrapped with `+re+`] */
`)})($,(function(Z,re){return Fi(D,(function(ve){var xe="_."+ve[0];re&ve[1]&&!Zi(Z,xe)&&Z.push(xe)})),Z.sort()})((function(Z){var re=Z.match(Qe);return re?re[1].split($e):[]})($),O)))}function kp(p){var y=0,O=0;return function(){var $=Yd(),Z=16-($-O);if(O=$,Z>0){if(++y>=800)return arguments[0]}else y=0;return p.apply(f,arguments)}}function Ml(p,y){var O=-1,$=p.length,Z=$-1;for(y=y===f?$:y;++O<y;){var re=gp(O,Z),ve=p[re];p[re]=p[O],p[O]=ve}return p.length=y,p}var Tp=(function(p){var y=Zl(p,(function($){return O.size===500&&O.clear(),$})),O=y.cache;return y})((function(p){var y=[];return p.charCodeAt(0)===46&&y.push(""),p.replace(br,(function(O,$,Z,re){y.push(Z?re.replace(tn,"$1"):$||O)})),y}));function il(p){if(typeof p=="string"||gt(p))return p;var y=p+"";return y=="0"&&1/p==-1/0?"-0":y}function Es(p){if(p!=null){try{return Or.call(p)}catch{}try{return p+""}catch{}}return""}function wf(p){if(p instanceof jr)return p.clone();var y=new ja(p.__wrapped__,p.__chain__);return y.__actions__=yi(p.__actions__),y.__index__=p.__index__,y.__values__=p.__values__,y}var Ph=kr((function(p,y){return Co(p)?el(p,oi(y,1,Co,!0)):[]})),Ch=kr((function(p,y){var O=xo(y);return Co(O)&&(O=f),Co(p)?el(p,oi(y,1,Co,!0),rr(O,2)):[]})),Rh=kr((function(p,y){var O=xo(y);return Co(O)&&(O=f),Co(p)?el(p,oi(y,1,Co,!0),f,O):[]}));function Np(p,y,O){var $=p==null?0:p.length;if(!$)return-1;var Z=O==null?0:ht(O);return Z<0&&(Z=Wo($+Z,0)),Vi(p,rr(y,3),Z)}function Ef(p,y,O){var $=p==null?0:p.length;if(!$)return-1;var Z=$-1;return O!==f&&(Z=ht(O),Z=O<0?Wo($+Z,0):Gi(Z,$-1)),Vi(p,rr(y,3),Z,!0)}function Qc(p){return p!=null&&p.length?oi(p,1):[]}function jh(p){return p&&p.length?p[0]:f}var al=kr((function(p){var y=Vr(p,uf);return y.length&&y[0]===p[0]?Bc(y):[]})),Os=kr((function(p){var y=xo(p),O=Vr(p,uf);return y===xo(O)?y=f:O.pop(),O.length&&O[0]===p[0]?Bc(O,rr(y,2)):[]})),em=kr((function(p){var y=xo(p),O=Vr(p,uf);return(y=typeof y=="function"?y:f)&&O.pop(),O.length&&O[0]===p[0]?Bc(O,f,y):[]}));function xo(p){var y=p==null?0:p.length;return y?p[y-1]:f}var ed=kr(iu);function iu(p,y){return p&&p.length&&y&&y.length?rf(p,y):p}var td=xl((function(p,y){var O=p==null?0:p.length,$=$c(p,y);return yp(p,Vr(y,(function(Z){return Ii(Z,O)?+Z:Z})).sort(Fu)),$}));function Hu(p){return p==null?p:Hv.call(p)}var nd=kr((function(p){return ys(oi(p,1,Co,!0))})),rd=kr((function(p){var y=xo(p);return Co(y)&&(y=f),ys(oi(p,1,Co,!0),rr(y,2))})),od=kr((function(p){var y=xo(p);return y=typeof y=="function"?y:f,ys(oi(p,1,Co,!0),f,y)}));function au(p){if(!p||!p.length)return[];var y=0;return p=Bi(p,(function(O){if(Co(O))return y=Wo(O.length,y),!0})),Fl(y,(function(O){return Vr(p,Ui(O))}))}function Yl(p,y){if(!p||!p.length)return[];var O=au(p);return y==null?O:Vr(O,(function($){return lo(y,f,$)}))}var gi=kr((function(p,y){return Co(p)?el(p,y):[]})),Of=kr((function(p){return sf(Bi(p,Co))})),id=kr((function(p){var y=xo(p);return Co(y)&&(y=f),sf(Bi(p,Co),rr(y,2))})),lu=kr((function(p){var y=xo(p);return y=typeof y=="function"?y:f,sf(Bi(p,Co),f,y)})),Xu=kr(au),Si=kr((function(p){var y=p.length,O=y>1?p[y-1]:f;return O=typeof O=="function"?(p.pop(),O):f,Yl(p,O)}));function Po(p){var y=le(p);return y.__chain__=!0,y}function ad(p,y){return y(p)}var Hi=xl((function(p){var y=p.length,O=y?p[0]:0,$=this.__wrapped__,Z=function(re){return $c(re,p)};return!(y>1||this.__actions__.length)&&$ instanceof jr&&Ii(O)?(($=$.slice(O,+O+(y?1:0))).__actions__.push({func:ad,args:[Z],thisArg:f}),new ja($,this.__chain__).thru((function(re){return y&&!re.length&&re.push(f),re}))):this.thru(Z)})),Wn=Xl((function(p,y,O){vn.call(p,O)?++p[O]:Qa(p,O,1)})),xf=pf(Np),ld=pf(Ef);function Sf(p,y){return(wr(p)?Fi:Oo)(p,rr(y,3))}function Pp(p,y){return(wr(p)?Gd:bh)(p,rr(y,3))}var Dh=Xl((function(p,y,O){vn.call(p,O)?p[O].push(y):Qa(p,O,[y])})),xs=kr((function(p,y,O){var $=-1,Z=typeof y=="function",re=ca(p)?bn(p.length):[];return Oo(p,(function(ve){re[++$]=Z?lo(y,ve,O):zi(ve,y,O)})),re})),Ih=Xl((function(p,y,O){Qa(p,O,y)}));function su(p,y){return(wr(p)?Vr:Oa)(p,rr(y,3))}var Lh=Xl((function(p,y,O){p[O?0:1].push(y)}),(function(){return[[],
`;p.replace(xn,(function(rn,sr,Pn,qe,yr,Br){return Pn||(Pn=qe),qt+=p.slice(_t,Br).replace(ur,Vs),sr&&(Z=!0,qt+=`' +
__e(`+sr+`) +
'`),yr&&(re=!0,qt+=`';
`+yr+`;
__p += '`),Pn&&(qt+=`' +
((__t = (`+Pn+`)) == null ? '' : __t) +
'`),_t=Br+rn.length,rn})),qt+=`';
`;var qn=vn.call(y,"variable")&&y.variable;if(qn){if(an.test(qn))throw new Rr("Invalid `variable` option passed into `_.template`")}else qt=`with (obj) {
`+qt+`
}
`;qt=(re?qt.replace(bt,""):qt).replace(Ft,"$1").replace(en,"$1;"),qt="function("+(qn||"obj")+`) {
`+(qn?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(re?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+qt+`return __p
}`;var Lt=er((function(){return yo(xe,An+"return "+qt).apply(f,Ue)}));if(Lt.source=qt,Ai(Lt))throw Lt;return Lt},le.times=function(p,y){if((p=ht(p))<1||p>R)return[];var O=L,$=Gi(p,L);y=rr(y),p-=L;for(var Z=Fl($,y);++O<p;)y(O);return Z},le.toFinite=jt,le.toInteger=ht,le.toLength=Zt,le.toLower=function(p){return At(p).toLowerCase()},le.toNumber=Gt,le.toSafeInteger=function(p){return p?vs(ht(p),-9007199254740991,R):p===0?p:0},le.toString=At,le.toUpper=function(p){return At(p).toUpperCase()},le.trim=function(p,y,O){if((p=At(p))&&(O||y===f))return Ra(p);if(!p||!(y=sa(y)))return p;var $=Qi(p),Z=Qi(y);return no($,_a($,Z),Nc($,Z)+1).join("")},le.trimEnd=function(p,y,O){if((p=At(p))&&(O||y===f))return p.slice(0,ci(p)+1);if(!p||!(y=sa(y)))return p;var $=Qi(p);return no($,0,Nc($,Qi(y))+1).join("")},le.trimStart=function(p,y,O){if((p=At(p))&&(O||y===f))return p.replace(jn,"");if(!p||!(y=sa(y)))return p;var $=Qi(p);return no($,_a($,Qi(y))).join("")},le.truncate=function(p,y){var O=30,$="...";if(Lo(y)){var Z="separator"in y?y.separator:Z;O="length"in y?ht(y.length):O,$="omission"in y?sa(y.omission):$}var re=(p=At(p)).length;if(qa(p)){var ve=Qi(p);re=ve.length}if(O>=re)return p;var xe=O-Wi($);if(xe<1)return $;var Ue=ve?no(ve,0,xe).join(""):p.slice(0,xe);if(Z===f)return Ue+$;if(ve&&(xe+=Ue.length-xe),se(Z)){if(p.slice(xe).search(Z)){var _t,xt=Ue;for(Z.global||(Z=X(Z.source,At(Sr.exec(Z))+"g")),Z.lastIndex=0;_t=Z.exec(xt);)var qt=_t.index;Ue=Ue.slice(0,qt===f?xe:qt)}}else if(p.indexOf(sa(Z),xe)!=xe){var xn=Ue.lastIndexOf(Z);xn>-1&&(Ue=Ue.slice(0,xn))}return Ue+$},le.unescape=function(p){return(p=At(p))&&nt.test(p)?p.replace(on,aa):p},le.uniqueId=function(p){var y=++qr;return At(p)+y},le.upperCase=fi,le.upperFirst=Jo,le.each=Sf,le.eachRight=Pp,le.first=jh,ye(le,(Me={},Dn(le,(function(p,y){vn.call(le.prototype,y)||(Me[y]=p)})),Me),{chain:!1}),le.VERSION="4.17.21",Fi(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(p){le[p].placeholder=le})),Fi(["drop","take"],(function(p,y){jr.prototype[p]=function(O){O=O===f?1:Wo(ht(O),0);var $=this.__filtered__&&!y?new jr(this):this.clone();return $.__filtered__?$.__takeCount__=Gi(O,$.__takeCount__):$.__views__.push({size:Gi(O,L),type:p+($.__dir__<0?"Right":"")}),$},jr.prototype[p+"Right"]=function(O){return this.reverse()[p](O).reverse()}})),Fi(["filter","map","takeWhile"],(function(p,y){var O=y+1,$=O==1||O==3;jr.prototype[p]=function(Z){var re=this.clone();return re.__iteratees__.push({iteratee:rr(Z,3),type:O}),re.__filtered__=re.__filtered__||$,re}})),Fi(["head","last"],(function(p,y){var O="take"+(y?"Right":"");jr.prototype[p]=function(){return this[O](1).value()[0]}})),Fi(["initial","tail"],(function(p,y){var O="drop"+(y?"":"Right");jr.prototype[p]=function(){return this.__filtered__?new jr(this):this[O](1)}})),jr.prototype.compact=function(){return this.filter(tr)},jr.prototype.find=function(p){return this.filter(p).head()},jr.prototype.findLast=function(p){return this.reverse().find(p)},jr.prototype.invokeMap=kr((function(p,y){return typeof p=="function"?new jr(this):this.map((function(O){return zi(O,p,y)}))})),jr.prototype.reject=function(p){return this.filter(ud(rr(p)))},jr.prototype.slice=function(p,y){p=ht(p);var O=this;return O.__filtered__&&(p>0||y<0)?new jr(O):(p<0?O=O.takeRight(-p):p&&(O=O.drop(p)),y!==f&&(O=(y=ht(y))<0?O.dropRight(-y):O.take(y-p)),O)},jr.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},jr.prototype.toArray=function(){return this.take(L)},Dn(jr.prototype,(function(p,y){var O=/^(?:filter|find|map|reject)|While$/.test(y),$=/^(?:head|last)$/.test(y),Z=le[$?"take"+(y=="last"?"Right":""):y],re=$||/^find/.test(y);Z&&(le.prototype[y]=function(){var ve=this.__wrapped__,xe=$?[1]:arguments,Ue=ve instanceof jr,_t=xe[0],xt=Ue||wr(ve),qt=function(sr){var Pn=Z.apply(le,ui([sr],xe));return $&&xn?Pn[0]:Pn};xt&&O&&typeof _t=="function"&&_t.length!=1&&(Ue=xt=!1);var xn=this.__chain__,An=!!this.__actions__.length,qn=re&&!xn,Lt=Ue&&!An;if(!re&&xt){ve=Lt?ve:new jr(this);var rn=p.apply(ve,xe);return rn.__actions__.push({func:ad,args:[
\v\f\r    \u2028\u2029\uFEFF`},function(n,a){var r,s,c=n.exports={};function v(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}function _(R){if(r===setTimeout)return setTimeout(R,0);if((r===v||!r)&&setTimeout)return r=setTimeout,setTimeout(R,0);try{return r(R,0)}catch{try{return r.call(null,R,0)}catch{return r.call(this,R,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:v}catch{r=v}try{s=typeof clearTimeout=="function"?clearTimeout:f}catch{s=f}})();var g,b=[],x=!1,A=-1;function S(){x&&g&&(x=!1,g.length?b=g.concat(b):A=-1,b.length&&E())}function E(){if(!x){var R=_(S);x=!0;for(var U=b.length;U;){for(g=b,b=[];++A<U;)g&&g[A].run();A=-1,U=b.length}g=null,x=!1,(function(L){if(s===clearTimeout)return clearTimeout(L);if((s===f||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(L);try{s(L)}catch{try{return s.call(null,L)}catch{return s.call(this,L)}}})(R)}}function T(R,U){this.fun=R,this.array=U}function I(){}c.nextTick=function(R){var U=new Array(arguments.length-1);if(arguments.length>1)for(var L=1;L<arguments.length;L++)U[L-1]=arguments[L];b.push(new T(R,U)),b.length!==1||x||_(E)},T.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=I,c.addListener=I,c.once=I,c.off=I,c.removeListener=I,c.removeAllListeners=I,c.emit=I,c.prependListener=I,c.prependOnceListener=I,c.listeners=function(R){return[]},c.binding=function(R){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(R){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(n,a,r){var s=r(32),c=r(165),v=r(28)("species");n.exports=function(f,_){var g,b=s(f).constructor;return b===void 0||(g=s(b)[v])==null?_:c(g)}},function(n,a,r){var s=r(7),c=r(99),v=r(88),f=s.TypeError;n.exports=function(_){if(c(_))return _;throw f(v(_)+" is not a constructor")}},function(n,a,r){var s=r(16),c=r(161).trim;s({target:"String",proto:!0,forced:r(200)("trim")},{trim:function(){return c(this)}})},function(n,a,r){var s=r(34),c=r(123),v=r(32),f=r(94),_=r(39),g=r(44),b=r(62),x=r(124),A=r(125);c("match",(function(S,E,T){return[function(I){var R=g(this),U=I==null?void 0:b(I,S);return U?s(U,I,R):new RegExp(I)[S](_(R))},function(I){var R=v(this),U=_(I),L=T(E,R,U);if(L.done)return L.value;if(!R.global)return A(R,U);var D=R.unicode;R.lastIndex=0;for(var W,Y=[],B=0;(W=A(R,U))!==null;){var V=_(W[0]);Y[B]=V,V===""&&(R.lastIndex=x(U,f(R.lastIndex),D)),B++}return B===0?null:Y}]}))},function(n,a,r){var s,c,v,f,_=r(7),g=r(76),b=r(64),x=r(30),A=r(35),S=r(18),E=r(138),T=r(98),I=r(91),R=r(169),U=r(128),L=_.setImmediate,D=_.clearImmediate,W=_.process,Y=_.Dispatch,B=_.Function,V=_.MessageChannel,z=_.String,H=0,q={},ee="onreadystatechange";try{s=_.location}catch{}var ue=function(Ne){if(A(q,Ne)){var Ae=q[Ne];delete q[Ne],Ae()}},ie=function(Ne){return function(){ue(Ne)}},be=function(Ne){ue(Ne.data)},De=function(Ne){_.postMessage(z(Ne),s.protocol+"//"+s.host)};L&&D||(L=function(Ne){var Ae=T(arguments,1);return q[++H]=function(){g(x(Ne)?Ne:B(Ne),void 0,Ae)},c(H),H},D=function(Ne){delete q[Ne]},U?c=function(Ne){W.nextTick(ie(Ne))}:Y&&Y.now?c=function(Ne){Y.now(ie(Ne))}:V&&!R?(f=(v=new V).port2,v.port1.onmessage=be,c=b(f.postMessage,f)):_.addEventListener&&x(_.postMessage)&&!_.importScripts&&s&&s.protocol!=="file:"&&!S(De)?(c=De,_.addEventListener("message",be,!1)):c=ee in I("script")?function(Ne){E.appendChild(I("script")).onreadystatechange=function(){E.removeChild(this),ue(Ne)}}:function(Ne){setTimeout(ie(Ne),0)}),n.exports={set:L,clear:D}},function(n,a,r){var s=r(55);n.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},function(n,a,r){var s=r(56),c=function(v){var f,_;this.promise=new v((function(g,b){if(f!==void 0||_!==void 0)throw TypeError("Bad Promise constructor");f=g,_=b})),this.resolve=s(f),this.reject=s(_)};n.exports.f=function(v){return new c(v)}},function(n,a,r){a.a=function(){return!1}},function(n,a,r){(function(
`)&&v.flags==="s")}))},function(n,a,r){var s=r(18),c=r(7).RegExp;n.exports=s((function(){var v=c("(?<a>b)","g");return v.exec("b").groups.a!=="b"||"b".replace(v,"$<a>c")!=="bc"}))},function(n,a,r){var s=r(16),c=r(15),v=r(56),f=r(40),_=r(45),g=r(39),b=r(18),x=r(193),A=r(121),S=r(194),E=r(195),T=r(70),I=r(196),R=[],U=c(R.sort),L=c(R.push),D=b((function(){R.sort(void 0)})),W=b((function(){R.sort(null)})),Y=A("sort"),B=!b((function(){if(T)return T<70;if(!(S&&S>3)){if(E)return!0;if(I)return I<603;var V,z,H,q,ee="";for(V=65;V<76;V++){switch(z=String.fromCharCode(V),V){case 66:case 69:case 70:case 72:H=3;break;case 68:case 71:H=4;break;default:H=2}for(q=0;q<47;q++)R.push({k:z+q,v:H})}for(R.sort((function(ue,ie){return ie.v-ue.v})),q=0;q<R.length;q++)z=R[q].k.charAt(0),ee.charAt(ee.length-1)!==z&&(ee+=z);return ee!=="DGBEFHACIJK"}}));s({target:"Array",proto:!0,forced:D||!W||!Y||!B},{sort:function(V){V!==void 0&&v(V);var z=f(this);if(B)return V===void 0?U(z):U(z,V);var H,q,ee=[],ue=_(z);for(q=0;q<ue;q++)q in z&&L(ee,z[q]);for(x(ee,(function(ie){return function(be,De){return De===void 0?-1:be===void 0?1:ie!==void 0?+ie(be,De)||0:g(be)>g(De)?1:-1}})(V)),H=ee.length,q=0;q<H;)z[q]=ee[q++];for(;q<ue;)delete z[q++];return z}})},function(n,a,r){var s=r(114),c=Math.floor,v=function(g,b){var x=g.length,A=c(x/2);return x<8?f(g,b):_(g,v(s(g,0,A),b),v(s(g,A),b),b)},f=function(g,b){for(var x,A,S=g.length,E=1;E<S;){for(A=E,x=g[E];A&&b(g[A-1],x)>0;)g[A]=g[--A];A!==E++&&(g[A]=x)}return g},_=function(g,b,x,A){for(var S=b.length,E=x.length,T=0,I=0;T<S||I<E;)g[T+I]=T<S&&I<E?A(b[T],x[I])<=0?b[T++]:x[I++]:T<S?b[T++]:x[I++];return g};n.exports=v},function(n,a,r){var s=r(55).match(/firefox\/(\d+)/i);n.exports=!!s&&+s[1]},function(n,a,r){var s=r(55);n.exports=/MSIE|Trident/.test(s)},function(n,a,r){var s=r(55).match(/AppleWebKit\/(\d+)\./);n.exports=!!s&&+s[1]},function(n,a,r){var s=r(7),c=r(159),v=s.TypeError;n.exports=function(f){if(c(f))throw v("The method doesn't accept regular expressions");return f}},function(n,a,r){var s=r(28)("match");n.exports=function(c){var v=/./;try{"/./"[c](v)}catch{try{return v[s]=!1,"/./"[c](v)}catch{}}return!1}},function(n,a,r){r(16)({target:"Number",stat:!0},{isNaN:function(s){return s!=s}})},function(n,a,r){var s=r(73).PROPER,c=r(18),v=r(162);n.exports=function(f){return c((function(){return!!v[f]()||"…"[f]()!=="…"||s&&v[f].name!==f}))}},function(n,a,r){var s=r(15),c=r(40),v=Math.floor,f=s("".charAt),_=s("".replace),g=s("".slice),b=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,x=/\$([$&'`]|\d{1,2})/g;n.exports=function(A,S,E,T,I,R){var U=E+A.length,L=T.length,D=x;return I!==void 0&&(I=c(I),D=b),_(R,D,(function(W,Y){var B;switch(f(Y,0)){case"$":return"$";case"&":return A;case"`":return g(S,0,E);case"'":return g(S,U);case"<":B=I[g(Y,1,-1)];break;default:var V=+Y;if(V===0)return W;if(V>L){var z=v(V/10);return z===0?W:z<=L?T[z-1]===void 0?f(Y,1):T[z-1]+f(Y,1):W}B=T[V-1]}return B===void 0?"":B}))}},function(n,a,r){var s=r(36),c=r(15),v=r(34),f=r(18),_=r(77),g=r(112),b=r(84),x=r(40),A=r(85),S=Object.assign,E=Object.defineProperty,T=c([].concat);n.exports=!S||f((function(){if(s&&S({b:1},S(E({},"a",{enumerable:!0,get:function(){E(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},R={},U=Symbol(),L="abcdefghijklmnopqrst";return I[U]=7,L.split("").forEach((function(D){R[D]=D})),S({},I)[U]!=7||_(S({},R)).join("")!=L}))?function(I,R){for(var U=x(I),L=arguments.length,D=1,W=g.f,Y=b.f;L>D;)for(var B,V=A(arguments[D++]),z=W?T(_(V),W(V)):_(V),H=z.length,q=0;H>q;)B=z[q++],s&&!v(Y,V,B)||(U[B]=V[B]);return U}:S},function(n,a,r){var s=r(7),c=r(15),v=r(56),f=r(33),_=r(35),g=r(98),b=s.Function,x=c([].concat),A=c([].join),S={},E=function(T,I,R){if(!_(S,I)){for(var U=[],L=0;L<I;L++)U[L]="a["+L+"]";S[I]=b("C,a","return new C("+A(U,",")+")")}return S[I](T,R)};n.exports=b.bind||function(T){var I=v(this),R=I.prototype,U=g(arguments,1),L=function(){var D=x(U,g(arguments));return this instanceof L?E(I,D.length,D):I.apply(T,D)};return f(R)&&(L.prototype=R),L}},function(n,a,r){var s=r(35);n.exports=function(c){return c!==void 0&&(s(c
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Hl(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Ia(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function wh(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Ol(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Oa(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}(function(i){i[i.DEFAULT=0]="DEFAULT",i[i.INCREASE=1]="INCREASE"})(No||(No={}));var vp={false:[-1/0,-1/0,1/0,1/0],true:[0,0,0,0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},mp=(jo=(function(){function i(u,h){(function(w,M){if(!(w instanceof M))throw new TypeError("Cannot call a class as a function")})(this,i),Ol(this,"MINI_SCALE_SIZE",.2),Ol(this,"MAX_SCALE_SIZE",16),Ia(this,"SCALE_X",pp,this),Ia(this,"SKEW_Y",hp,this),Ia(this,"SKEW_X",Bc,this),Ia(this,"SCALE_Y",zi,this),Ia(this,"TRANSLATE_X",tf,this),Ia(this,"TRANSLATE_Y",$u,this),Ia(this,"ZOOM_SIZE",Da,this),Ol(this,"eventCenter",void 0),Ol(this,"translateLimitMinX",void 0),Ol(this,"translateLimitMinY",void 0),Ol(this,"translateLimitMaxX",void 0),Ol(this,"translateLimitMaxY",void 0),this.eventCenter=u;var d=h.stopMoveGraph,m=d!==void 0&&d;this.updateTranslateLimits(m)}var o,l;return o=i,l=[{key:"setZoomMiniSize",value:function(u){this.MINI_SCALE_SIZE=u}},{key:"setZoomMaxSize",value:function(u){this.MAX_SCALE_SIZE=u}},{key:"HtmlPointToCanvasPoint",value:function(u){var h=ms(u,2),d=h[0],m=h[1];return[(d-this.TRANSLATE_X)/this.SCALE_X,(m-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(u){var h=ms(u,2),d=h[0],m=h[1];return[d*this.SCALE_X+this.TRANSLATE_X,m*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(u,h,d){var m=ms(u,2),w=m[0],M=m[1];return[w+h/this.SCALE_X,M+d/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(u,h){return[u/this.SCALE_X,h/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var u=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(u,")")}}},{key:"zoom",value:function(){var u=arguments.length>0&&arguments[0]!==void 0&&arguments[0],h=arguments.length>1?arguments[1]:void 0,d=this.SCALE_X,m=this.SCALE_Y;return u===!0?(d+=this.ZOOM_SIZE,m+=this.ZOOM_SIZE):u===!1?(d-=this.ZOOM_SIZE,m-=this.ZOOM_SIZE):typeof u=="number"&&(d=u,m=u),d<this.MINI_SCALE_SIZE||d>this.MAX_SCALE_SIZE||(h&&(this.TRANSLATE_X-=(d-this.SCALE_X)*h[0],this.TRANSLATE_Y-=(m-this.SCALE_Y)*h[1]),this.SCALE_X=d,this.SCALE_Y=m,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(u){this.eventCenter.emit(Dn.GRAPH_TRANSFORM,{type:u,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}},{key:"translate",value:function(u,h){this.TRANSLATE_X+u<=this.translateLimitMaxX&&this.TRANSLATE_X+u>=this.translateLimitMinX&&(this.TRANSLATE_X+=u),this.TRANSLATE_Y+h<=this.translateLimitMaxY&&this.TRANSLATE_Y+h>=this.translateLimitMinY&&(this.TRANSLATE_Y+=h),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(u,h,d,m){var w=ms(this.CanvasPointToHtmlPoint([u,h]),2),M=d/2-w[0],j=m/2-w[1];this.TRANSLATE_X+=M,this.TRANSLATE_Y+=j,this.emit
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Bu(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var Vu=function(i,o,l){var u=Hc(i,2),h=u[0],d=u[1],m=Hc(o,2),w=m[0],M=m[1],j=Hc(l,2),F=j[0],Q=j[1];return h>w&&h<F&&d>M&&d<Q},Uu=function(i,o){var l=!1;switch(o.multipleSelectKey){case"meta":l=i.metaKey;break;case"alt":l=i.altKey;break;case"shift":l=i.shiftKey;break;case"ctrl":l=i.ctrlKey;break;default:l=!1}return l};r(167),r(126),r(83),r(29),r(12),r(13),r(14),r(47);var hf=function(i){return function(o,l,u){var h=Object(o);if(!Ko(o)){var d=jc(l);o=Vs(o),l=function(w){return d(h[w],w,h)}}var m=i(o,l,u);return m>-1?h[d?o[m]:m]:void 0}},Wu=function(i,o,l,u){for(var h=i.length,d=l+-1;++d<h;)if(o(i[d],d,i))return d;return-1},Ep=/\s/,vf=function(i){for(var o=i.length;o--&&Ep.test(i.charAt(o)););return o},Nh=/^\s+/,Op=function(i){return i&&i.slice(0,vf(i)+1).replace(Nh,"")},rl=/^[-+]0x[0-9a-f]+$/i,xp=/^0b[01]+$/i,Sp=/^0o[0-7]+$/i,Ap=parseInt,Gu=function(i){if(typeof i=="number")return i;if(gr(i))return NaN;if(Lr(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=Lr(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=Op(i);var l=xp.test(i);return l||Sp.test(i)?Ap(i.slice(2),l?2:8):rl.test(i)?NaN:+i},xl=1/0,Xc=function(i){return i?(i=Gu(i))===xl||i===-1/0?17976931348623157e292*(i<0?-1:1):i==i?i:0:i===0?i:0},mf=function(i){var o=Xc(i),l=o%1;return o==o?l?o-l:o:0},yf=Math.max,gs,_s=hf((function(i,o,l){var u=i==null?0:i.length;if(!u)return-1;var h=l==null?0:mf(l);return h<0&&(h=yf(u+h,0)),Wu(i,jc(o),h)})),rr=new Uint8Array(16);function zu(){if(!gs&&!(gs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gs(rr)}for(var qc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ol=function(i){return typeof i=="string"&&qc.test(i)},di=[],tu=0;tu<256;++tu)di.push((tu+256).toString(16).substr(1));var Do=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=(di[i[o+0]]+di[i[o+1]]+di[i[o+2]]+di[i[o+3]]+"-"+di[i[o+4]]+di[i[o+5]]+"-"+di[i[o+6]]+di[i[o+7]]+"-"+di[i[o+8]]+di[i[o+9]]+"-"+di[i[o+10]]+di[i[o+11]]+di[i[o+12]]+di[i[o+13]]+di[i[o+14]]+di[i[o+15]]).toLowerCase();if(!ol(l))throw TypeError("Stringified UUID is invalid");return l},bs=function(i,o,l){var u=(i=i||{}).random||(i.rng||zu)();return u[6]=15&u[6]|64,u[8]=63&u[8]|128,Do(u)},ta=function(){return bs()},Yc=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",l=i.nodes.reduce((function(u,h){return u[h.id]=o+bs(),h.id=u[h.id],u}),{});return i.edges.forEach((function(u){u.id=o+bs(),u.sourceNodeId=l[u.sourceNodeId],u.targetNodeId=l[u.targetNodeId]})),i},Ii=(r(105),r(127),r(207),function(i,o,l){var u=i.x,h=i.y,d=o.x,m=o.y,w=l.x,M=l.y,j=(M-m)/(w-d),F=m-j*d;return u>=d&&u<=w&&h>=m&&h<=M&&Math.abs(h-j*u+F)<Number.EPSILON});function Ho(i){return Ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Ho(i)}function Sl(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function Al(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?Sl(Object(l),!0).forEach((function(u){gf(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):Sl(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function gf(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writabl
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Xi(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function ll(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function Io(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?ll(Object(l),!0).forEach((function(u){jp(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):ll(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function ua(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function $a(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function tm(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function cd(){return cd=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,o,l){var u=uu(i,o);if(u){var h=Object.getOwnPropertyDescriptor(u,o);return h.get?h.get.call(arguments.length<3?i:l):h.value}},cd.apply(this,arguments)}function uu(i,o){for(;!Object.prototype.hasOwnProperty.call(i,o)&&(i=na(i))!==null;);return i}function wr(i,o){return wr=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},wr(i,o)}function Fh(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=na(i);if(o){var h=na(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return ca(this,l)}}function ca(i,o){if(o&&(Zl(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Co(i)}function Co(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function na(i){return na=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},na(i)}function jp(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Ai(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var Sa=(zn=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&wr(d,m)})(h,i);var o,l,u=Fh(h);function h(){var d;$a(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return jp(Co(d=u.call.apply(u,[this].concat(w))),"modelType",Mr.POLYLINE_EDGE),jp(Co(d),"draggingPointList",void 0),ua(Co(d),"dbClickPosition",Rp,Co(d)),d}return o=h,(l=[{key:"initEdgeData",value:function(d){this.offset=30,cd(na(h.prototype),"initEdgeData",this).call(this,d)}},{key:"getEdgeStyle",value:function(){var d=this.graphModel.theme.polyline;return Io(Io({},cd(na(h.prototype),"getEdgeStyle",this).call(this)),no(d))}},{key:"getTextPosition",value:function(){var d,m=(d=this.text)===null||d===void 0?void 0:d.value;if(this.dbClickPosition&&!m){var w=this.dbClickPosition;return{x:w.x,y:w.y}}var M=ir(this.points),j=ud(Xn(M),2),F=j[0],Q=j[1];return{x:(F.x+Q.x)/2,y:(F.y+Q.y)/2}}},{key:"
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function gt(i){return gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},gt(i)}function ot(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(F){j=!0,m=F}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||mt(i,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function mt(i,o){if(i){if(typeof i=="string")return Rt(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?Rt(i,o):void 0}}function Rt(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var Bt=function(i,o){var l;switch(i.type){case"line":default:l=new qu(i,o);break;case"polyline":l=new Sa(i,o)}return l},jt=function(i,o){return 2*Math.abs(i.centerX-o.centerX)<i.width+o.width&&2*Math.abs(i.centerY-o.centerY)<i.height+o.height},ht=function(i){var o=[],l={};return i.forEach((function(u){var h="".concat(u.x,"-").concat(u.y);u.id=h,l[h]=u})),Object.keys(l).forEach((function(u){o.push(l[u])})),o},Zt=function(i,o){var l=[i,{x:i.x,y:o.y},o];return ht(l)},Gt=function(i,o){return i.width===0&&i.height===0?i:{centerX:i.centerX,centerY:i.centerY,minX:i.minX-o,minY:i.minY-o,maxX:i.maxX+o,maxY:i.maxY+o,height:i.height+2*o,width:i.width+2*o}},Dt=function(i,o){var l=Math.abs(i.x-o.centerX),u=Math.abs(i.y-o.centerY);return l/o.width>u/o.height?fo.HORIZONTAL:fo.VERTICAL},At=function(i,o,l){return Dt(l,o)===fo.HORIZONTAL?{x:l.x>i.centerX?i.maxX:i.minX,y:l.y}:{x:l.x,y:l.y>i.centerY?i.maxY:i.minY}},Ze=function(i,o){var l=Math.min(i.minX,o.minX),u=Math.min(i.minY,o.minY),h=Math.max(i.maxX,o.maxX),d=Math.max(i.maxY,o.maxY);return{centerX:(l+h)/2,centerY:(u+d)/2,minX:l,minY:u,maxX:h,maxY:d,height:d-u,width:h-l}},pt=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0,l=[],u=[];i.forEach((function(F){l.push(F.x),u.push(F.y)}));var h=Math.min.apply(Math,l),d=Math.max.apply(Math,l),m=Math.min.apply(Math,u),w=Math.max.apply(Math,u),M=d-h,j=w-m;return o&&(M+=o,j+=o),{centerX:(h+d)/2,centerY:(m+w)/2,maxX:d,maxY:w,minX:h,minY:m,x:(h+d)/2,y:(m+w)/2,height:j,width:M}},$t=function(i){var o=i.minX,l=i.minY,u=i.maxX,h=i.maxY;return[{x:o,y:l},{x:u,y:l},{x:u,y:h},{x:o,y:h}]},nn=function(i,o){var l=i.x,u=i.y;return l<o.minX||l>o.maxX||u<o.minY||u>o.maxY},kt=function(i,o){return o<i.minX||o>i.maxX?[]:[{x:o,y:i.minY},{x:o,y:i.maxY}]},ln=function(i,o){return o<i.minY||o>i.maxY?[]:[{x:i.minX,y:o},{x:i.maxX,y:o}]},Nt=function(i,o){return kt(i,o.x).concat(ln(i,o.y))},Yt=function(i,o){return Math.abs(i.x-o.x)+Math.abs(i.y-o.y)},Tt=function(i,o){var l=0;return o.forEach((function(u){u&&(i.x===u.x&&(l+=-2),i.y===u.y&&(l+=-2))})),l},Jt=function(i,o,l,u,h){return Yt(i,o)+Yt(i,l)+Tt(i,[o,l,u,h])},Cn=function i(o,l,u,h,d){d||(d=0),o.unshift(l[h]),u[h]&&u[h]!==h&&d<=100&&i(o,l,u,u[h],d+1)},Hn=function(i,o){var l=i.indexOf(o);l>-1&&i.splice(l,1)},It=function(i,o,l,u){var h=o.x-i.x,d=o.y-i.y,m=u.x-l.x,w=u.y-l.y,M=(-d*(i.x-l.x)+h*(i.y-l.y))/(-m*d+h*w),j=(m*(i.y-l.y)-w*(i.x-l.x))/(-m*d+h*w);return M>=0&&M<=1&&j>=0&&j<=1},Pt=function(i,o,l){if(l.width===0&&l.height===0)return!1;var u=ot($t(l),4),h=u[0],d=u[1],m=u[2],w=u[3];return It(i,o,h,d)||It(i,o,h,w)||It(i,o,d,m)||It(i,o,m,w)},Mt=function(i,o,l,u){var h=[];return i.forEach((function(d){d!==o&&(d.x!==o.x&&d.y!==o.y||Pt(d,o,l)||Pt(d,o,u)||h.push(d))})),ht(h)},Ln=function(i,o,l,u,h,d,m){var w=[],M=[o],j={},F={},Q={};F[o.id]=0,Q[o.id]=Jt(o,l,o);var ne={};i.forEach((function(Le){ne[Le.id]=Le}));for(var ge=function(){var Le=void 0,ft=1/0;if(M.forEach((function(Et){Q[Et.id]<ft&&(ft=Q[Et.id],Le=Et)})),Le===l){var ct=[];return Cn(ct,ne,j,l.id),{v:ct}}Hn(M,Le),w.push(Le),Mt(i,Le,u,h).forEach((function(Et){if(w.indexOf(Et)===-1){M.indexOf(Et)===-1&&M.push(Et);var zt=Q[Le.id]+Yt(Le,Et);F[Et.id]&&zt>=F[Et.id]||(j[Et.id]=Le.id,F[Et.id]=zt,Q[Et.id]=F[Et.id]+Jt(Et,l,o,d,m))}}))};M.length;){var ke=ge();if(gt(ke)==="object")return ke.v}return[o,l]},or=function(i){return xo(i)},mn=function(i){for(var o=1;o<i.length-1;){var l=i[o-1],u=i[o],h=i[o+1];l.x===u.x&&u.x===h.x||l.y===u.y&&u.y===h.y?i.splice(o,1):o++}return i},cr=function(i,o,l,u,h){var d=or(l),m=or(u),w=Gt(d,h),M=Gt(m,h),j=At(w
L`).concat(d.rightX," ").concat(d.rightY,`
L`).concat(m.rightX," ").concat(m.rightY,`
L`).concat(m.leftX," ").concat(m.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},Jo=function(i){var o=i.start,l=i.end,u=i.sourceNode,h=i.targetNode,d=i.offset,m=xo(u),w=xo(h),M=Gt(m,d),j=Gt(w,d);return{sNext:At(M,m,o),ePre:At(j,w,l)}},go=function(i){var o=i.replace(/M/g,"").replace(/C/g,",").split(",");return[er(o[0]),er(o[1]),er(o[2]),er(o[3])]},er=function(i){var o=ot(i.replace(/(^\s*)/g,"").split(" "),2);return{x:+o[0],y:+o[1]}},pi=function(i,o){var l=ot(i,4);return[Lo(l[0],l[1],l[2],l[3],o),i[3]]},Tr=function(i,o){for(var l,u=i.x,h=i.y,d=ir(o),m=Number.MAX_SAFE_INTEGER,w=[],M=0;M<d.length;M++)w.push({start:d[M],end:d[(M+1)%d.length]});if(w.forEach((function(ne){var ge=ne.start,ke=ne.end;if(ge.x===ke.x){var Le={x:ge.x,y:h};if(Ii(Le,ge,ke)){var ft=Math.abs(ge.x-u);ft<m&&(m=ft,l=Le)}}else if(ge.y===ke.y){var ct={x:u,y:ge.y};if(Ii(ct,ge,ke)){var Et=Math.abs(ge.y-h);Et<m&&(m=Et,l=ct)}}})),!l){var j=w[0],F=j.start,Q=j.end;l={x:F.x+(Q.x-F.x)/2,y:F.y+(Q.y-F.y)/2}}return l},In=function(i){return el(i,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},mr=function(i,o){return Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2))};function tr(i,o){return typeof o!="function"?function(l,u,h){return Object.assign({type:i.edgeType},h)}:function(l,u,h){var d=o(l,u,h);return d?typeof d=="string"?Object.assign({},h,{type:d}):Object.assign({type:d},h):{type:i.edgeType}}}r(208);var _o=function(){};function kl(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function So(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var ye=(function(){function i(u){var h=this,d=u.onDragStart,m=d===void 0?_o:d,w=u.onDragging,M=w===void 0?_o:w,j=u.onDragEnd,F=j===void 0?_o:j,Q=u.eventType,ne=Q===void 0?"":Q,ge=u.eventCenter,ke=ge===void 0?null:ge,Le=u.step,ft=Le===void 0?1:Le,ct=u.isStopPropagation,Et=ct===void 0||ct,zt=u.model,En=zt===void 0?null:zt,wn=u.data,Yn=wn===void 0?null:wn;(function(gn,Fn){if(!(gn instanceof Fn))throw new TypeError("Cannot call a class as a function")})(this,i),So(this,"onDragStart",void 0),So(this,"onDragging",void 0),So(this,"onDragEnd",void 0),So(this,"step",void 0),So(this,"isStopPropagation",void 0),So(this,"isDragging",!1),So(this,"isStartDragging",!1),So(this,"startX",0),So(this,"startY",0),So(this,"sumDeltaX",0),So(this,"sumDeltaY",0),So(this,"eventType",void 0),So(this,"eventCenter",void 0),So(this,"model",void 0),So(this,"data",void 0),So(this,"startTime",void 0),So(this,"handleMouseDown",(function(gn){var Fn,Mn,$r,Wr=(Fn=window)===null||Fn===void 0?void 0:Fn.document;if(gn.button===0){h.isStopPropagation&&gn.stopPropagation(),h.isStartDragging=!0,h.startX=gn.clientX,h.startY=gn.clientY,Wr.addEventListener("mousemove",h.handleMouseMove,!1),Wr.addEventListener("mouseup",h.handleMouseUp,!1);var vr=(Mn=h.model)===null||Mn===void 0?void 0:Mn.getData();($r=h.eventCenter)===null||$r===void 0||$r.emit(Dn["".concat(h.eventType,"_MOUSEDOWN")],{e:gn,data:h.data||vr}),h.startTime=new Date().getTime()}})),So(this,"handleMouseMove",(function(gn){if(h.isStopPropagation&&gn.stopPropagation(),h.isStartDragging&&(h.sumDeltaX+=gn.clientX-h.startX,h.sumDeltaY+=gn.clientY-h.startY,h.startX=gn.clientX,h.startY=gn.clientY,h.step<=1||Math.abs(h.sumDeltaX)>h.step||Math.abs(h.sumDeltaY)>h.step)){var Fn,Mn=h.sumDeltaX%h.step,$r=h.sumDeltaY%h.step,Wr=h.sumDeltaX-Mn,vr=h.sumDeltaY-$r;h.sumDeltaX=Mn,h.sumDeltaY=$r;var Jr,_i=(Fn=h.model)===null||Fn===void 0?void 0:Fn.getData();h.isDragging||((Jr=h.eventCenter)===null||Jr===void 0||Jr.emit(Dn["".concat(h.eventType,"_DRAGSTART")],{e:gn,data:h.data||_i}),h.onDragStart({event:gn})),h.isDragging=!0,Promise.resolve().then((function(){var bi,Aa;h.onDragging({deltaX:Wr,deltaY:vr,event:gn}),(bi=h.eventCenter)===null||bi===void 0||bi.emit(Dn["".concat(h.eventType,"_MOUSEMOVE")],{e:gn,data:h.data||_i}),(Aa=h.even
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function $(i){return(function(o){if(Array.isArray(o))return re(o)})(i)||(function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)})(i)||Z(i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Z(i,o){if(i){if(typeof i=="string")return re(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?re(i,o):void 0}}function re(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function ve(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function xe(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Ue(i,o,l){return o&&xe(i.prototype,o),i}function _t(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&rn(i,o)}function xt(i){var o=Lt();return function(){var l,u=sr(i);if(o){var h=sr(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return qt(this,l)}}function qt(i,o){if(o&&(y(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xn(i)}function xn(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function An(i){var o=typeof Map=="function"?new Map:void 0;return An=function(l){if(l===null||(u=l,Function.toString.call(u).indexOf("[native code]")===-1))return l;var u;if(typeof l!="function")throw new TypeError("Super expression must either be null or a function");if(o!==void 0){if(o.has(l))return o.get(l);o.set(l,h)}function h(){return qn(l,arguments,sr(this).constructor)}return h.prototype=Object.create(l.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),rn(h,l)},An(i)}function qn(i,o,l){return qn=Lt()?Reflect.construct:function(u,h,d){var m=[null];m.push.apply(m,h);var w=new(Function.bind.apply(u,m));return d&&rn(w,d.prototype),w},qn.apply(null,arguments)}function Lt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function rn(i,o){return rn=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},rn(i,o)}function sr(i){return sr=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},sr(i)}function Pn(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var qe,yr,Br,Jn,dr,Mi,Fa,Jl,ki,As,du,Mf,Ip,Ms=(function(i){_t(l,i);var o=xt(l);function l(){var u;ve(this,l);for(var h=arguments.length,d=new Array(h),m=0;m<h;m++)d[m]=arguments[m];return Pn(xn(u=o.call(this,d.length)),"rows",void 0),Pn(xn(u),"columns",void 0),u.fill(new Array(3)),d.forEach((function(w,M){u[M]=w})),u.columns=d[0].length,u.rows=d.length,Object.setPrototypeOf(xn(u),l.prototype),u}return Ue(l,[{key:"getRow",value:function(u){return this[u]}},{key:"getColumn",value:function(u){return $(this.map((function(h){return h[u]})))}},{key:"transpose",value:function(){for(var u=[],h=0;h<this.columns;h++)u.push(this.getColumn(h));return qn(l,u)}},{key:"cross",value:function(u){var h=new Array(this.rows).fill("").map((function(){return[]}));if(this.columns===u.rows)for(var d=0;d<this.rows;d++)for(var m=this.getRow(d),w=function(j){var F=u.getColumn(j);h[d][j]=m.reduce((function(Q,ne,ge){return Q+ne*F[ge]}),0)},M=0;M<u.columns;M++)w(M);return qn(l,$(h))}},{key:"to2D",value:function(){return this.map((function(u){return[u[0],u[1]]}))}},{key:"toPoints",value:function(){return this.map((function(u){return new p(u[0],u[1])}))}},{key:"toString",value:function(){var u=O(this[0],2),h=u[0],d=u[1],m=O(this[1],2),w=m[0],M=m[1],j=O(this[2],2),F=j[0],Q=j[1];return"matrix(".concat(h," ").concat(d," ")
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function fu(i){return(function(o){if(Array.isArray(o))return V_(o)})(i)||(function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)})(i)||Fp(i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Fp(i,o){if(i){if(typeof i=="string")return V_(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?V_(i,o):void 0}}function V_(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function ay(i){return ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ay(i)}function ks(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function CC(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function pu(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Qn(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var l2,s2=200,u2=(qe=(function(){function i(u){(function(ge,ke){if(!(ge instanceof ke))throw new TypeError("Cannot call a class as a function")})(this,i),pu(this,"rootEl",void 0),ks(this,"width",yr,this),ks(this,"height",Br,this),pu(this,"theme",void 0),pu(this,"eventCenter",void 0),pu(this,"modelMap",new Map),pu(this,"topElement",void 0),pu(this,"animation",void 0),pu(this,"idGenerator",void 0),pu(this,"edgeGenerator",void 0),pu(this,"nodeMoveRules",[]),pu(this,"customTrajectory",void 0),ks(this,"edgeType",Jn,this),ks(this,"nodes",dr,this),ks(this,"edges",Mi,this),ks(this,"overlapMode",Fa,this),ks(this,"background",Jl,this),ks(this,"transformModel",ki,this),ks(this,"editConfigModel",As,this),ks(this,"gridSize",du,this),ks(this,"partial",Mf,this),ks(this,"fakerNode",Ip,this);var h,d=u.container,m=u.background,w=m===void 0?{}:m,M=u.grid,j=u.idGenerator,F=u.edgeGenerator,Q=u.animation,ne=u.customTrajectory;this.background=w,ay(M)==="object"&&(this.gridSize=M.size),this.rootEl=d,this.editConfigModel=new ef(u),this.eventCenter=new pf,this.transformModel=new mp(this.eventCenter,u),this.theme=ql(u.style),this.edgeType=u.edgeType||"polyline",this.width=u.width,this.height=u.height,this.animation=(h=Q)&&typeof h!="boolean"?Qs(no(Lp),h):no(h===!0?rm:Lp),this.partial=u.partial,this.overlapMode=u.overlapMode||0,this.idGenerator=j,this.customTrajectory=ne,this.edgeGenerator=tr(this,F),this.width=u.width||this.rootEl.getBoundingClientRect().width,this.height=u.height||this.rootEl.getBoundingClientRect().height,this.flowId=ta()}var o,l;return o=i,l=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(u,h,d){return u[h.id]={index:d,model:h},u}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(u,h,d){return u[h.id]={index:d,model:h},u}),{})}},{key:"modelsMap",get:function(){return[].concat(fu(this.nodes),fu(this.edges)).reduce((function(u,h){return u[h.id]=h,u}),{})}},{key:"sortElements",get:function(){var u=[];this.nodes.forEach((function(j){return u.push(j)})),this.edges.forEach((function(j){return u.push(j)})),u=u.sort((function(j,F){return j.zIndex-F.zIndex}));for(var h=[],d=[-200,-200],m=[this.width+s2,this.height+s2],w=0;w<u.length;w++){var M=u[w];M.visible&&(!this.partial||M.isSelected||this.isElementInArea(M,d,m,!1,!1))&&h.push(M)}return h}},{key:"textEditElement",get:function(){var u=this.nodes.find((function(d){return d.state===Zr.TEXT_EDIT})),h=this.edges.find((function(d){return d.state===Zr.TEXT_EDIT}));return
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function h2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var v2,Bh=function(i){var o={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(i).forEach((function(l){var u=QC(l,2),h=u[0],d=u[1];(h==="style"||Z_(d)!=="object")&&(o[h]=d)})),Object(We.g)("line",o)};function J_(i){return J_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},J_(i)}function m2(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function dy(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?m2(Object(l),!0).forEach((function(u){eR(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):m2(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function eR(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function tR(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function nR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Q_(i,o){return Q_=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},Q_(i,o)}function rR(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=fy(i);if(o){var h=fy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return oR(this,l)}}function oR(i,o){if(o&&(J_(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function fy(i){return fy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},fy(i)}var y2,iR=yu(v2=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&Q_(d,m)})(h,i);var o,l,u=rR(h);function h(){return tR(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"render",value:function(){var d=this.props.snaplineModel,m=d.position,w=d.isShowHorizontal,M=d.isShowVertical,j=d.getStyle(),F=m.x,Q=F===void 0?0:F,ne=m.y,ge=ne===void 0?0:ne,ke=dy(dy({x1:-1e5,y1:ge,x2:1e5,y2:ge},j),{},{stroke:w?j.stroke:"none"}),Le=dy(dy({x1:Q,y1:-1e5,x2:Q,y2:1e5},j),{},{stroke:M?j.stroke:"none"});return Object(We.g)("g",{className:"lf-snapline"},Object(We.g)(Bh,ke),Object(We.g)(Bh,Le))}}])&&nR(o.prototype,l),h})(We.a))||v2;function eb(i){return eb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},eb(i)}function aR(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(F){j=!0,m=F}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return g2(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function g2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Tf(i){var o=i.x,l=i.y,u=i.width,h=i.height,d=i.className,m=i.radius,w=o-u/2,M=l-h/2,j={};return Object.entries(i).forEach((function(F){var Q=aR(F,2),ne=Q[0],ge=Q[1];eb(ge)!=="object"&&(j[ne]=ge)})),j.className=d?"lf-basic-shape ".concat(d):"lf-basic-shape",m&&(j.rx=m,j.ry=m),j.x=w,j.y=M,Object(We.g)("rect",j)}function tb(i){return tb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},tb(i)}function Vh(){return Vh=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},Vh.apply(this,arguments)}function _2(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function b2(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?_2(Object(l),!0).forEach((function(u){lR(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):_2(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function lR(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function sR(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function uR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function nb(i,o){return nb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},nb(i,o)}function cR(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=py(i);if(o){var h=py(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return dR(this,l)}}function dR(i,o){if(o&&(tb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function py(i){return py=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},py(i)}Tf.defaultProps={className:"",radius:""};var w2,fR=yu(y2=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&nb(d,m)})(h,i);var o,l,u=cR(h);function h(){return sR(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getNodesOutline",value:function(){var d=this.props.graphModel,m=d.nodes,w=d.editConfigModel,M=w.hoverOutline,j=w.nodeSelectedOutline,F=[];return m.forEach((function(Q){if(Q.isHovered||Q.isSelected){var ne=Q.isHovered,ge=Q.isSelected,ke=Q.x,Le=Q.y,ft=Q.width,ct=Q.height;if(j&&ge||M&&ne){var Et=Q.getOutlineStyle(),zt={};if(Object.keys(Et).forEach((function(wn){wn!=="hover"&&(zt[wn]=Et[wn])})),ne){var En=Et.hover;zt=b2(b2({},zt),En)}F.push(Object(We.g)(Tf,Vh({transform:Q.transform,className:"lf-outline-node",x:ke,y:Le,width:ft+10,height:ct+10},zt)))}}})),F}},{key:"getEdgeOutline",value:function(){for(var d=this.props.graphModel,m=d.edges,w=d.editConfigModel,M=w.edgeSelectedOutline,j=w.hoverOutline,F=[],Q=0;Q<m.length;Q++){var ne=m[Q];(M&&ne.isSelected||j&&ne.isHovered)&&(ne.modelType===Mr.LINE_EDGE?F.push(this.getLineOutline(ne)):n
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function E2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Uh(i){var o=i.x,l=o===void 0?0:o,u=i.y,h=u===void 0?0:u,d=i.r,m=d===void 0?4:d,w=i.className,M={cx:l,cy:h,r:m,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(i).forEach((function(j){var F=pR(j,2),Q=F[0],ne=F[1];rb(ne)!=="object"&&(M[Q]=ne)})),M.className=w?"lf-basic-shape ".concat(w):"lf-basic-shape",Object(We.g)("circle",M)}function ob(i){return ob=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ob(i)}function hR(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(F){j=!0,m=F}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return O2(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return O2(l,u)}})(i,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function O2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function om(){return om=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},om.apply(this,arguments)}function x2(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function vR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function S2(i,o,l){return o&&vR(i.prototype,o),i}function A2(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&ib(i,o)}function ib(i,o){return ib=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},ib(i,o)}function M2(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=vy(i);if(o){var h=vy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return mR(this,l)}}function mR(i,o){if(o&&(ob(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hy(i)}function hy(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function vy(i){return vy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},vy(i)}function ab(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var k2,T2=(function(i){A2(l,i);var o=M2(l);function l(){var u;return x2(this,l),ab(hy(u=o.call(this)),"dragHandler",void 0),ab(hy(u),"onDragging",(function(h){var d=h.event,m=u.props,w=m.graphModel,M=m.bezierModel,j=m.type,F=w.getPointByClient({x:d.clientX,y:d.clientY}).canvasOverlayPosition,Q=F.x,ne=F.y;M.updateAdjustAnchor({x:Q,y:ne},j),w.eventCenter.emit(Dn.EDGE_ADJUST,{data:M.getData()})})),ab(hy(u),"onDragEnd",(function(){u.props.bezierModel.isDragging=!1})),u.dragHandler=new ye({onDragging:u.onDragging,onDragEnd:u.onDragEnd}),u}return S2(l,[{key:"render",value:function(){var u=this,h=this.props.position,d=h.x,m=h.y,w=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(We.g)(Uh,om({className:"lf-bezier-adjust-anchor",x:d,y:m},w,{onMouseDown:function(M){u.dragHandler.handleMouseDown(M)}}))}}]),l})(We.a),yR=yu(w2=(function(i){A2(l,i);var o=M2(l);function l(){return x2(this,l),o.apply(this,arguments)}return S2(l,[{key:"getBezierAdjust",value:function(u,h){var d=u.path,m=u.id,w=hR(go(d),4),M=w[0],j=w[1],F=w[2],Q=w[3],ne=u.getEdgeStyle().adjustLine,ge=[];return ge.push(Object(We.g)(Bh,om({x1:M.x,y1:M.y,x2:j.x,y2:j.y},ne))),ge.push(Object(We.g)(T2,{position:j,bezierModel:u,graphModel:h,key:"".concat(m,"_ePre"),type:"sNext"})),ge.push(Object(We.g)(Bh,om({x1:Q.x,y1:Q.y,x2:F.x,y2:F.y},ne))),ge.push(Object(We.g)(T2,{position:F,bezierModel:u,graphModel:h,key:"".concat(m,"_sNext"),type:"ePre"})),ge}},{key:"selectedBezierEdge",value:function(){for(var u=this.props.graphModel,h=u.edges,d=[],m=0;m<h.length;m++){var w=h[m];w.isSelected&&w.modelType===Mr.BEZIER_EDGE&&w.draggable&&d.push(this.getBezierAdjust(w,u))}return d}},{key:"render",value:function(){return Object(We.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),l})(We.a))||w2;function lb(i){return lb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},lb(i)}function gR(i,o){if(!(i instanceof o))throw new TypeError("Cannot cal
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function D2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function I2(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function _y(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?I2(Object(l),!0).forEach((function(u){L2(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):I2(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function PR(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function CR(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function RR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function im(){return im=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,o,l){var u=jR(i,o);if(u){var h=Object.getOwnPropertyDescriptor(u,o);return h.get?h.get.call(arguments.length<3?i:l):h.value}},im.apply(this,arguments)}function jR(i,o){for(;!Object.prototype.hasOwnProperty.call(i,o)&&(i=Nf(i))!==null;);return i}function hb(i,o){return hb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},hb(i,o)}function DR(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Nf(i);if(o){var h=Nf(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return IR(this,l)}}function IR(i,o){if(o&&(fb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return by(i)}function by(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Nf(i){return Nf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Nf(i)}function L2(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function hu(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var vb=(uo=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&hb(d,m)})(h,i);var o,l,u=DR(h);function h(){var d;CR(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return L2(by(d=u.call.apply(u,[this].concat(w))),"modelType",Mr.BEZIER_EDGE),PR(by(d),"path",R2,by(d)),d}return o=h,(l=[{key:"initEdgeData",value:function(d){this.offset=100,im(Nf(h.prototype),"initEdgeData",this).call(this,d)}},{key:"getEdgeStyle",value:function(){var d=this.graphModel.theme.bezier;return _y(_y({},im(Nf(h.prototype),"getEdgeStyle",this).call(this)),no(d))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var d=0,m=0;return this.pointsList.forEach((function(w){var M=w.x,j=w.y;d+=M,m+=j})),{x:d/this.pointsList.length,y:m/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},
C `).concat(M.x," ").concat(M.y,`,
`).concat(j.x," ").concat(j.y,`,
`).concat(F.x," ").concat(F.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var d=this.getControls(),m=d.sNext,w=d.ePre;this.updatePath(m,w)}},{key:"updatePath",value:function(d,m){d=no(d),m=no(m);var w={x:this.startPoint.x,y:this.startPoint.y},M={x:this.endPoint.x,y:this.endPoint.y};if(!d||!m){var j=this.getControls();d=j.sNext,m=j.ePre}this.pointsList=[w,d,m,M],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(d){this.startPoint=Object.assign({},d),this.updatePoints()}},{key:"updateEndPoint",value:function(d){this.endPoint=Object.assign({},d),this.updatePoints()}},{key:"moveStartPoint",value:function(d,m){this.startPoint.x+=d,this.startPoint.y+=m;var w=pb(this.pointsList,3),M=w[1],j=w[2];M.x+=d,M.y+=m,this.updatePath(M,j)}},{key:"moveEndPoint",value:function(d,m){this.endPoint.x+=d,this.endPoint.y+=m;var w=pb(this.pointsList,3),M=w[1],j=w[2];j.x+=d,j.y+=m,this.updatePath(M,j)}},{key:"updateAdjustAnchor",value:function(d,m){m==="sNext"?this.pointsList[1]=d:m==="ePre"&&(this.pointsList[2]=d),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var d=this.pointsList;return d[d.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(d){var m=d.startPoint,w=d.endPoint,M=d.sourceNode,j=d.targetNode,F=Jo({start:m,end:w,sourceNode:M,targetNode:j,offset:this.offset}),Q=F.sNext,ne=F.ePre;this.pointsList=[m,Q,ne,w],this.initPoints()}}])&&RR(o.prototype,l),h})(ld),R2=hu(uo.prototype,"path",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),hu(uo.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"initPoints"),uo.prototype),hu(uo.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updatePoints"),uo.prototype),hu(uo.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updateStartPoint"),uo.prototype),hu(uo.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updateEndPoint"),uo.prototype),hu(uo.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"moveStartPoint"),uo.prototype),hu(uo.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"moveEndPoint"),uo.prototype),hu(uo.prototype,"updateAdjustAnchor",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updateAdjustAnchor"),uo.prototype),hu(uo.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"getAdjustStart"),uo.prototype),hu(uo.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"getAdjustEnd"),uo.prototype),hu(uo.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updateAfterAdjustStartAndEnd"),uo.prototype),uo),un,$2,F2,B2,V2,U2,W2,G2,z2,H2,X2,q2,Y2,K2,Z2,J2,Q2,eO,tO,nO,rO,oO,iO,LR=function(i){return i==null};function $R(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(F){j=!0,m=F}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||aO(i,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function mb(i){return mb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},mb(i)}function aO(i,o){if(i){if(typeof i=="string")return lO(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?lO(i,o):void 0}}function lO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function sO(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function sl(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?sO(Object(l),!0).forEach((function(u){Tl(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):sO(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function Ti(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function FR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Tl(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Nr(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var md,uO,yd=(un=(function(){function i(u,h){(function(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")})(this,i),Tl(this,"id",""),Ti(this,"type",$2,this),Ti(this,"x",F2,this),Ti(this,"y",B2,this),Ti(this,"text",V2,this),Ti(this,"properties",U2,this),Ti(this,"_width",W2,this),Ti(this,"_height",G2,this),Ti(this,"anchorsOffset",z2,this),Ti(this,"isSelected",H2,this),Ti(this,"isHovered",X2,this),Ti(this,"isShowAnchor",q2,this),Ti(this,"isDragging",Y2,this),Ti(this,"isHitable",K2,this),Ti(this,"draggable",Z2,this),Ti(this,"visible",J2,this),Ti(this,"enableRotate",Q2,this),Tl(this,"virtual",!1),Tl(this,"graphModel",void 0),Ti(this,"zIndex",eO,this),Ti(this,"state",tO,this),Ti(this,"autoToFront",nO,this),Ti(this,"style",rO,this),Ti(this,"transform",oO,this),Ti(this,"_rotate",iO,this),Tl(this,"BaseType",co.NODE),Tl(this,"modelType",Mr.NODE),Tl(this,"additionStateData",void 0),Tl(this,"targetRules",[]),Tl(this,"sourceRules",[]),Tl(this,"moveRules",[]),Tl(this,"hasSetTargetRules",!1),Tl(this,"hasSetSourceRules",!1),this.graphModel=h,this.initNodeData(u),this.setAttributes()}var o,l;return o=i,l=[{key:"width",get:function(){return this._width},set:function(u){this._width=u}},{key:"height",get:function(){return this._height},set:function(u){this._height=u}},{key:"rotate",get:function(){return this._rotate},set:function(u){this._rotate=u;var h=this.x,d=h===void 0?0:h,m=this.y,w=m===void 0?0:m;this.transform=new kf(-d,-w).rotate(u).translate(d,w).toString()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(u){if(u.properties||(u.properties={}),!u.id){var h=this.graphModel.idGenerator,d=
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ft,ct=!0,Et=!1;return{s:function(){ge=ge.call(Q)},n:function(){var zt=ge.next();return ct=zt.done,zt},e:function(zt){Et=!0,ft=zt},f:function(){try{ct||ge.return==null||ge.return()}finally{if(Et)throw ft}}}})(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(M.s();!(d=M.n()).done;){var j=(0,d.value)(this,u,h);if(!j)return!1;if(mb(j)==="object"){var F=j;if(F.x===!1&&F.y===!1)return!1;m=m&&F.x,w=w&&F.y}}}catch(Q){M.e(Q)}finally{M.f()}return{x:m,y:w}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var u=this.anchorsOffset,h=this.id,d=this.x,m=this.y;return u&&u.length>0?u.map((function(w,M){return w.length?(w=w,{id:"".concat(h,"_").concat(M),x:d+w[0],y:m+w[1]}):sl(sl({},w=w),{},{x:d+w.x,y:m+w.y,id:w.id||"".concat(h,"_").concat(M)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(u){return(function(h,d){for(var m,w=Ef(d),M=Number.MAX_SAFE_INTEGER,j=0;j<w.length;j++){var F=al(h.x,h.y,w[j].x,w[j].y);F<M&&(M=F,m={index:j,anchor:Al(Al({},w[j]),{},{x:w[j].x,y:w[j].y,id:w[j].id})})}return m})(u,this)}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){var u=this.getAnchorsByOffset(),h=this.x,d=this.y,m=this.rotate;return u.forEach((function(w){var M=w.x,j=w.y,F=$R(new Ms([M,j,1]).translate(-h,-d).rotate(m).translate(h,d)[0],2),Q=F[0],ne=F[1];w.x=Q,w.y=ne})),u}},{key:"getAnchorInfo",value:function(u){if(!LR(u))for(var h=0;h<this.anchors.length;h++){var d=this.anchors[h];if(d.id===u)return d}}},{key:"addNodeMoveRules",value:function(u){this.moveRules.includes(u)||this.moveRules.push(u)}},{key:"move",value:function(u,h){var d=arguments.length>2&&arguments[2]!==void 0&&arguments[2],m=!1,w=!1;if(d)m=!0,w=!0;else{var M=this.isAllowMoveNode(u,h);typeof M=="boolean"?(m=M,w=M):(m=M.x,w=M.y)}if(m){var j=this.x+u;this.x=j,this.text&&this.moveText(u,0)}if(w){var F=this.y+h;this.y=F,this.text&&this.moveText(0,h)}return m||w}},{key:"getMoveDistance",value:function(u,h){var d=arguments.length>2&&arguments[2]!==void 0&&arguments[2],m=!1,w=!1,M=0,j=0;if(d)m=!0,w=!0;else{var F=this.isAllowMoveNode(u,h);typeof F=="boolean"?(m=F,w=F):(m=F.x,w=F.y)}if(m&&u){var Q=this.x+u;this.x=Q,this.text&&this.moveText(u,0),M=u}if(w&&h){var ne=this.y+h;this.y=ne,this.text&&this.moveText(0,h),j=h}return[M,j]}},{key:"moveTo",value:function(u,h){var d=arguments.length>2&&arguments[2]!==void 0&&arguments[2],m=u-this.x,w=h-this.y;return!(!d&&!this.isAllowMoveNode(m,w)||(this.text&&this.text&&this.moveText(m,w),this.x=u,this.y=h,0))}},{key:"moveText",value:function(u,h){var d=this.text,m=d.x,w=d.y,M=d.value,j=d.draggable,F=d.editable;this.text={value:M,editable:F,draggable:j,x:m+u,y:w+h}}},{key:"updateText",value:function(u){this.text=sl(sl({},Object(c.I)(this.text)),{},{value:u})}},{key:"setSelected",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=u}},{key:"setHovered",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=u,this.setIsShowAnchor(u)}},{key:"setIsShowAnchor",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=u}},{key:"setEnableRotate",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.enableRotate=u}},{key:"setHitable",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=u}},{key:"setElementState",value:function(u,h){this.state=u,this.additionStateData=h}},{key:"setProperty",value:function(u,h){this.properties=sl(sl({},Object(c.I)(this.properties)),{},Tl({},u,gi(h))),this.setAttributes()}},{key:"setProperties",value:function(u){this.properties=sl(sl({},Object(c.I)(this.properties)),gi(u)),this.setAttributes()}},{key:"deleteProperty",value:function(u){delete this.properties[u],this.set
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function vO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function mO(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function yO(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?mO(Object(l),!0).forEach((function(u){_O(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):mO(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function gO(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function HR(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function XR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function xb(){return xb=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,o,l){var u=qR(i,o);if(u){var h=Object.getOwnPropertyDescriptor(u,o);return h.get?h.get.call(arguments.length<3?i:l):h.value}},xb.apply(this,arguments)}function qR(i,o){for(;!Object.prototype.hasOwnProperty.call(i,o)&&(i=zh(i))!==null;);return i}function Sb(i,o){return Sb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},Sb(i,o)}function YR(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=zh(i);if(o){var h=zh(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return KR(this,l)}}function KR(i,o){if(o&&(Eb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gh(i)}function Gh(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function zh(i){return zh=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},zh(i)}function _O(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Hh(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var Zu,bO,wO,Ab=(Ba=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&Sb(d,m)})(h,i);var o,l,u=YR(h);function h(){var d;HR(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return _O(Gh(d=u.call.apply(u,[this].concat(w))),"modelType",Mr.DIAMOND_NODE),gO(Gh(d),"rx",pO,Gh(d)),gO(Gh(d),"ry",hO,Gh(d)),d}return o=h,(l=[{key:"getNodeStyle",value:function(){var d=xb(zh(h.prototype),"getNodeStyle",this).call(this),m=this.graphModel.theme.diamond;return yO(yO({},d),no(m))}},{key:"points",get:function(){var d=this.x,m=this.y,w=this.rx,M=this.ry;return[[d,m-M],[d+w,m],[d,m+M],[d-w,m]]}},{key:"pointsPosition",get:function(){return this.points.map((function(d){return{x:d[0],y:d[1]}}))}},{key:"width",get:function(){var d=Number.MAX_SAFE_INTEGER,m=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(w){var M=Ob(w,1)[0];M<d&&(d=M),M>m&&(m=M)})),m-d}},{key
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function MO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function kO(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function TO(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?kO(Object(l),!0).forEach((function(u){NO(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):kO(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function n3(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function r3(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function o3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Rb(){return Rb=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,o,l){var u=i3(i,o);if(u){var h=Object.getOwnPropertyDescriptor(u,o);return h.get?h.get.call(arguments.length<3?i:l):h.value}},Rb.apply(this,arguments)}function i3(i,o){for(;!Object.prototype.hasOwnProperty.call(i,o)&&(i=Yh(i))!==null;);return i}function jb(i,o){return jb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},jb(i,o)}function a3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Yh(i);if(o){var h=Yh(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return l3(this,l)}}function l3(i,o){if(o&&(Pb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oy(i)}function Oy(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Yh(i){return Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Yh(i)}function NO(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function xy(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var Db,PO,Ib=(Ts=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&jb(d,m)})(h,i);var o,l,u=a3(h);function h(){var d;r3(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return NO(Oy(d=u.call.apply(u,[this].concat(w))),"modelType",Mr.POLYGON_NODE),n3(Oy(d),"points",AO,Oy(d)),d}return o=h,(l=[{key:"getNodeStyle",value:function(){var d=Rb(Yh(h.prototype),"getNodeStyle",this).call(this),m=this.graphModel.theme.polygon;return TO(TO({},d),no(m))}},{key:"pointsPosition",get:function(){var d=this.x,m=this.y,w=this.width,M=this.height;return this.points.map((function(j){return{x:j[0]+d-w/2,y:j[1]+m-M/2}}))}},{key:"width",get:function(){var d=Number.MAX_SAFE_INTEGER,m=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(w){var M=Cb(w,1)[0];M<d&&(d=M),M>m&&(m=M)})),m-d}},{key:"height",get:function(){var d=Number.MAX_SAFE_INTEGER,m=Number.MIN_SAFE_IN
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function YO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function A3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Kb(i,o){return Kb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},Kb(i,o)}function M3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=ky(i);if(o){var h=ky(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return k3(this,l)}}function k3(i,o){if(o&&(Yb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ju(i)}function Ju(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function ky(i){return ky=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},ky(i)}function Qu(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var T3=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&Kb(d,m)})(h,i);var o,l,u=M3(h);function h(){var d;return(function(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")})(this,h),Qu(Ju(d=u.call(this)),"preTargetNode",void 0),Qu(Ju(d),"sourceRuleResults",void 0),Qu(Ju(d),"targetRuleResults",void 0),Qu(Ju(d),"dragHandler",void 0),Qu(Ju(d),"t",void 0),Qu(Ju(d),"onDragStart",(function(m){var w=m.event,M=d.props,j=M.anchorData,F=M.nodeModel,Q=M.graphModel;Q.overlapMode,Q.selectNodeById(F.id),F.autoToFront&&Q.toFront(F.id),Q.eventCenter.emit(Dn.ANCHOR_DRAGSTART,{data:j,e:w,nodeModel:F}),d.setState({startX:j.x,startY:j.y,endX:j.x,endY:j.y})})),Qu(Ju(d),"onDragging",(function(m){var w=m.event,M=d.props,j=M.graphModel,F=M.nodeModel,Q=M.anchorData,ne=j.transformModel,ge=j.eventCenter,ke=j.width,Le=j.height,ft=j.editConfigModel,ct=ft.autoExpand,Et=ft.stopMoveGraph,zt=w.clientX,En=w.clientY,wn=j.getPointByClient({x:zt,y:En}),Yn=wn.domOverlayPosition,gn=Yn.x,Fn=Yn.y,Mn=wn.canvasOverlayPosition,$r=Mn.x,Wr=Mn.y;d.t&&My(d.t);var vr=[];gn<10?vr=[10,0]:gn+10>ke?vr=[-10,0]:Fn<10?vr=[0,10]:Fn+10>Le&&(vr=[0,-10]),d.setState({endX:$r,endY:Wr,dragging:!0}),d.moveAnchorEnd($r,Wr),vr.length>0&&!Et&&ct&&(d.t=XO((function(){var Jr=S3(vr,2),_i=Jr[0],bi=Jr[1];ne.translate(_i,bi);var Aa=d.state,ts=Aa.endX,ns=Aa.endY;d.setState({endX:ts-_i,endY:ns-bi}),d.moveAnchorEnd(ts-_i,ns-bi)}))),ge.emit(Dn.ANCHOR_DRAG,{data:Q,e:w,nodeModel:F})})),Qu(Ju(d),"onDragEnd",(function(m){var w=m.event;d.t&&My(d.t);var M=d.checkEnd(w);d.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),d.sourceRuleResults.clear(),d.targetRuleResults.clear();var j=d.props,F=j.graphModel,Q=j.nodeModel,ne=j.anchorData;F.eventCenter.emit(Dn.ANCHOR_DRAGEND,{data:ne,e:w,nodeModel:Q,edgeModel:M})})),Qu(Ju(d),"checkEnd",(function(m){var w=d.props,M=w.graphModel,j=w.nodeModel,F=w.anchorData,Q=F.x,ne=F.y,ge=F.id,ke=(M.edgeType,d.state),Le=ke.endX,ft=ke.endY,ct=ke.dragging,Et=Qc({x:Le,y:ft},M);if(d.preTargetNode&&d.preTargetNode.state!==Zr.DEFAULT&&d.preTargetNode.setElementState(Zr.DEFAULT),ct&&Et&&Et.node){var zt=Et.node,En=Et.anchor.id,wn="".concat(j.id,"_").concat(zt.id,"_").concat(En,"_").concat(ge),Yn=d.sourceRuleResults.get(wn)||{},gn=Yn.isAllPass,Fn=Yn.msg,Mn=d.targetRuleResults.get(wn)||{},$r=Mn.isAllPass,Wr=Mn.msg;if(gn&&$r){zt.setElementState(Zr.DEFAULT);var vr=M.edgeGenerator(j.getData(),M.getNodeModelById(Et.node.id).getData()),Jr=M.addEdge(um(um({},vr),{},{sourceNode
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ZO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function JO(i){var o=i.x,l=o===void 0?0:o,u=i.y,h=u===void 0?0:u,d=i.value,m=i.fontSize,w=i.fill,M=w===void 0?"currentColor":w,j=i.overflowMode,F=j===void 0?"default":j,Q=i.textWidth,ne=Q===void 0?"":Q,ge=i.model,ke={textAnchor:"middle","dominant-baseline":"middle",x:l,y:h,fill:M};if(Object.entries(i).forEach((function(En){var wn=C3(En,2),Yn=wn[0],gn=wn[1];Zb(gn)!=="object"&&(ke[Yn]=gn)})),d){var Le=String(d).split(/[\r\n]/g),ft=Le.length;if(F!=="default"){var ct=ge.BaseType,Et=ge.modelType;if(ct===co.NODE&&Et!==Mr.TEXT_NODE||ct===co.EDGE&&ne)return(function(En){var wn=En.value,Yn=En.fontSize,gn=En.model,Fn=En.fontFamily,Mn=Fn===void 0?"":Fn,$r=En.lineHeight,Wr=En.wrapPadding,vr=Wr===void 0?"0, 0":Wr,Jr=En.overflowMode,_i=En.x,bi=En.y,Aa=gn.width,ts=gn.textHeight,ns=En.textWidth||Aa,nc=String(wn).split(/[\r\n]/g),Gp=nc.length,Qy=od({rows:nc,style:{fontSize:"".concat(Yn,"px"),width:"".concat(ns,"px"),fontFamily:Mn,lineHeight:$r,padding:vr},rowsLength:Gp,className:"lf-get-text-height"}),zp=gn.height>Qy?gn.height:Qy;ts&&(zp=ts);var jf=Jr==="ellipsis";return jf&&(zp=Yn+2),Object(We.g)("g",null,Object(We.g)("foreignObject",{width:ns,height:zp,x:_i-ns/2,y:bi-zp/2},Object(We.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:zp,width:ns,padding:vr}},Object(We.g)("div",{className:jf?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:jf?nc.join(""):"",style:N3({},En)},nc.map((function(Df){return Object(We.g)("div",{className:"lf-node-text--auto-wrap-inner"},Df)}))))))})(i)}if(ft>1){var zt=Le.map((function(En,wn){var Yn=(wn-(ft-1)/2)*(m+2);return Object(We.g)("tspan",{className:"lf-text-tspan",x:l,y:h+Yn},En)}));return Object(We.g)("text",ke,zt)}return Object(We.g)("text",ke,d)}}function Jb(i){return Jb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Jb(i)}function Qb(){return Qb=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},Qb.apply(this,arguments)}function R3(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(F){j=!0,m=F}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return QO(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return QO(l,u)}})(i,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function QO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function j3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function e0(i,o){return e0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},e0(i,o)}function D3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Ty(i);if(o){var h=Ty(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return I3(this,l)}}function I3(i,o){if(o&&(Jb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cf(i)}function Cf(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ty(i){return Ty=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Ty(i)}function Bp(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var ex=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&e0(d,m)})(h,i);var o,l,u=D3(h);function h(d){var m;(function(M,j){if(!(M instanceof j))throw new TypeError("Cannot call a class as a function")})(this,h),Bp(Cf(m=u.call(this)),"dragHandler",void 0),Bp(Cf(m),"sumDeltaX",0),Bp(Cf(m),"sumDeltaY",0),Bp(Cf(m),"stepDrag",void 0),Bp(Cf(m),"onDragging",(function(M){var j=M.deltaX,F=M.deltaY,Q=m.props,ne=Q.model,ge=R3(Q.graphModel.transformModel.fixDeltaXY(j,F),2),ke=ge[0],Le=ge[1];ne.moveText(ke,Le)})),Bp(Cf(m),"dblClickHandler",(function(){m.props.editable&&m.props.model.setElementState(Zr.TEXT_EDIT)})),Bp(Cf(m),"mouseDownHandle",(function(M){var j=m.props,F=j.draggable,Q=j.model,ne=j.graphModel.editConfigModel.nodeTextDraggable;(F||ne)&&(m.stepDrag.model=Q,m.stepDrag.handleMouseDown(M))})),d.model;var w=d.draggable;return m.stepDrag=new ye({onDragging:m.onDragging,step:1,isStopPropagation:w}),m}return o=h,(l=[{key:"getShape",value:function(){var d=this.props,m=d.model,w=d.graphModel,M=m.text,j=w.editConfigModel,F=M.value,Q=M.x,ne=M.y,ge=M.editable,ke=M.draggable,Le={x:Q,y:ne,className:"",value:F};ge?Le.className="lf-element-text":ke||j.nodeTextDraggable?Le.className="lf-text-draggable":Le.className="lf-text-disabled";var ft=m.getTextStyle();return Object(We.g)(JO,Qb({},Le,ft,{model:m}))}},{key:"render",value:function(){if(this.props.model.text)return Object(We.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&j3(o.prototype,l),h})(We.a),L3=Us(window,"navigator.userAgent","").match(/MSIE|Trident/)!==null,tx=r(130);function t0(i){return t0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},t0(i)}function n0(){return n0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},n0.apply(this,arguments)}function $3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function r0(i,o){return r0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},r0(i,o)}function F3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.co
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function nx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function rx(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function i0(i,o){return i0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},i0(i,o)}function G3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Ry(i);if(o){var h=Ry(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return z3(this,l)}}function z3(i,o){if(o&&(o0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ra(i)}function ra(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ry(i){return Ry=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Ry(i)}function da(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var gd=(function(i){(function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),w&&i0(m,w)})(d,i);var o,l,u,h=G3(d);function d(m){var w;(function(ne,ge){if(!(ne instanceof ge))throw new TypeError("Cannot call a class as a function")})(this,d),da(ra(w=h.call(this)),"t",void 0),da(ra(w),"moveOffset",void 0),da(ra(w),"stepDrag",void 0),da(ra(w),"contextMenuTime",void 0),da(ra(w),"mouseUpDrag",void 0),da(ra(w),"startTime",void 0),da(ra(w),"clickTimer",void 0),da(ra(w),"modelDisposer",void 0),da(ra(w),"onDragStart",(function(ne){var ge=ne.event,ke=ge.clientX,Le=ge.clientY,ft=w.props,ct=ft.model,Et=ft.graphModel.getPointByClient({x:ke,y:Le}).canvasOverlayPosition,zt=Et.x,En=Et.y;w.moveOffset={x:ct.x-zt,y:ct.y-En}})),da(ra(w),"onDragging",(function(ne){var ge=ne.event,ke=w.props,Le=ke.model,ft=ke.graphModel,ct=ft.editConfigModel,Et=ct.stopMoveGraph,zt=ct.autoExpand,En=ft.transformModel,wn=ft.selectNodes,Yn=ft.width,gn=ft.height,Fn=ft.gridSize;Le.isDragging=!0;var Mn=ge.clientX,$r=ge.clientY,Wr=ft.getPointByClient({x:Mn,y:$r}).canvasOverlayPosition,vr=Wr.x,Jr=Wr.y,_i=Cy(En.CanvasPointToHtmlPoint([vr,Jr]),2),bi=_i[0],Aa=_i[1];if(vr+=w.moveOffset.x,Jr+=w.moveOffset.y,vr=nl(vr,Fn),Jr=nl(Jr,Fn),Yn&&gn){if(!zt||Et||!(bi<0||Aa<0||bi>Yn||Aa>gn)){var ts=Cy(En.CanvasPointToHtmlPoint([vr-Le.width/2,Jr-Le.height/2]),2),ns=ts[0],nc=ts[1],Gp=Cy(En.CanvasPointToHtmlPoint([vr+Le.width/2,Jr+Le.height/2]),2),Qy=Gp[0],zp=Gp[1],jf=Math.max(Fn,20),Df=[];ns<0?Df=[jf,0]:Qy>ft.width?Df=[-jf,0]:nc<0?Df=[0,jf]:zp>ft.height&&(Df=[0,-jf]),w.t&&My(w.t);var k8=new kf(-vr,-Jr).rotate(Le.rotate).translate(vr,Jr).toString();Le.transform=k8;var eg=wn.map((function(tg){return tg.id}));eg.indexOf(Le.id)===-1&&(eg=[Le.id]),Df.length>0&&!Et&&zt?w.t=XO((function(){var tg=Cy(Df,2),Lx=tg[0],$x=tg[1];En.translate(Lx,$x);var T8=-Lx/En.SCALE_X,N8=-$x/En.SCALE_X;ft.moveNodes(eg,T8,N8)})):ft.moveNodes(eg,vr-Le.x,Jr-Le.y)}}else ft.moveNode2Coordinate(Le.id,vr,Jr)})),da(ra(w),"onDragEnd",(function(){w.t&&My(w.t),w.props.model.isDragging=!1})),da(ra(w),"handleMouseUp",(function(){var ne=w.props.model;w.mouseUpDrag=ne.isDragging})),da(ra(w),"handleClick",(function(ne){var ge=w.mouseUpDrag===!1;if(w.startTime){var ke=w.props,Le=ke.model,ft=ke.graphModel;if(ge){var ct={data:Le.getData(),e:ne,position:ft.getPointByClient({x:ne.clientX,y:ne.clientY}),isSelected:!1,isMultiple:!1},Et=ne.button===2,zt=ne.detail===2;if(!Et){var En=ft.editConfigModel,wn=Uu(ne,En);ct.isMultiple=wn,Le.isSelected&&!zt&&wn?(ct.isSelected=!1,Le.setSelected(
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ox(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function ix(i){var o=i.points,l=i.className,u={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(i).forEach((function(h){var d=ej(h,2),m=d[0],w=d[1];h0(w)!=="object"&&(u[m]=w)})),u.className=l?"lf-basic-shape ".concat(l):"lf-basic-shape",u.points=o.map((function(h){return h.join(",")})).join(" "),Object(We.g)("polygon",u)}function v0(i){return v0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},v0(i)}function m0(){return m0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},m0.apply(this,arguments)}function tj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function nj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function y0(i,o){return y0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},y0(i,o)}function rj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Iy(i);if(o){var h=Iy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return oj(this,l)}}function oj(i,o){if(o&&(v0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function Iy(i){return Iy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Iy(i)}var g0=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&y0(d,m)})(h,i);var o,l,u=rj(h);function h(){return tj(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getShape",value:function(){var d=this.props.model,m=d.x,w=d.y,M=d.width,j=d.height,F=d.points,Q=d.getNodeStyle(),ne={transform:"matrix(1 0 0 1 ".concat(m-M/2," ").concat(w-j/2,")")};return Object(We.g)("g",ne,Object(We.g)(ix,m0({},Q,{points:F,x:m,y:w})))}}])&&nj(o.prototype,l),h})(gd);function _0(i){return _0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_0(i)}function b0(){return b0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},b0.apply(this,arguments)}function ij(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function aj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function w0(i,o){return w0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},w0(i,o)}function lj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Ly(i);if(o){var h=Ly(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return sj(this,l)}}function sj(i,o){if(o&&(_0(o)==="
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ax(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function cj(i){var o=i.x,l=o===void 0?0:o,u=i.y,h=u===void 0?0:u,d=i.rx,m=d===void 0?4:d,w=i.ry,M=w===void 0?4:w,j=i.className,F={cx:l,cy:h,rx:m,ry:M,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(i).forEach((function(Q){var ne=uj(Q,2),ge=ne[0],ke=ne[1];O0(ke)!=="object"&&(F[ge]=ke)})),F.className=j?"lf-basic-shape ".concat(j):"lf-basic-shape",Object(We.g)("ellipse",F)}function x0(i){return x0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},x0(i)}function S0(){return S0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},S0.apply(this,arguments)}function dj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function fj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function A0(i,o){return A0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},A0(i,o)}function pj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=$y(i);if(o){var h=$y(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return hj(this,l)}}function hj(i,o){if(o&&(x0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function $y(i){return $y=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},$y(i)}var M0=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&A0(d,m)})(h,i);var o,l,u=pj(h);function h(){return dj(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getShape",value:function(){var d=this.props.model,m=d.getNodeStyle();return Object(We.g)(cj,S0({},m,{x:d.x,y:d.y,rx:d.rx,ry:d.ry}))}}])&&fj(o.prototype,l),h})(gd);function k0(i){return k0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},k0(i)}function lx(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function sx(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?lx(Object(l),!0).forEach((function(u){vj(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):lx(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function vj(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function mj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function yj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function T0(i,o){return T0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},T0(i,o)}function gj(i){var o=(functio
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function dx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Pj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function V0(i,o){return V0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},V0(i,o)}function Cj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Wy(i);if(o){var h=Wy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return Rj(this,l)}}function Rj(i,o){if(o&&(B0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ql(i)}function Ql(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Wy(i){return Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Wy(i)}function es(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}(function(i){i.SOURCE="SOURCE",i.TARGET="TARGET"})(ec||(ec={}));var fx=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&V0(d,m)})(h,i);var o,l,u=Cj(h);function h(d){var m;(function(F,Q){if(!(F instanceof Q))throw new TypeError("Cannot call a class as a function")})(this,h),es(Ql(m=u.call(this)),"stepDragData",void 0),es(Ql(m),"stepDrag",void 0),es(Ql(m),"oldEdge",void 0),es(Ql(m),"preTargetNode",void 0),es(Ql(m),"targetRuleResults",void 0),es(Ql(m),"sourceRuleResults",void 0),es(Ql(m),"handleMouseDown",(function(F){m.stepDrag&&m.stepDrag.handleMouseDown(F)})),es(Ql(m),"onDragStart",(function(){var F=m.props,Q=F.x,ne=F.y,ge=F.edgeModel,ke=ge.startPoint,Le=ge.endPoint,ft=ge.pointsList;m.oldEdge={startPoint:ke,endPoint:Le,pointsList:ft},m.setState({endX:Q,endY:ne,dragging:!0})})),es(Ql(m),"onDragging",(function(F){var Q=F.deltaX,ne=F.deltaY,ge=m.state,ke=ge.endX,Le=ge.endY,ft=m.props,ct=ft.graphModel,Et=ft.type,zt=ct.transformModel,En=ct.editConfigModel,wn=Nj(zt.moveCanvasPointByHtml([ke,Le],Q,ne),2),Yn=wn[0],gn=wn[1];m.setState({endX:Yn,endY:gn,dragging:!0});var Fn=m.props.edgeModel,Mn=Qc({x:ke,y:Le},ct);if(Mn&&Mn.node&&m.isAllowAdjust(Mn).pass){var $r,Wr=Fn.startPoint,vr=Fn.endPoint,Jr=Fn.sourceNode,_i=Fn.targetNode;Et===ec.SOURCE?$r={startPoint:{x:Mn.anchor.x,y:Mn.anchor.y},endPoint:{x:vr.x,y:vr.y},sourceNode:Mn.node,targetNode:_i}:Et===ec.TARGET&&($r={startPoint:{x:Wr.x,y:Wr.y},endPoint:{x:Mn.anchor.x,y:Mn.anchor.y},sourceNode:Jr,targetNode:Mn.node}),Fn.updateAfterAdjustStartAndEnd($r)}else Et===ec.SOURCE?Fn.updateStartPoint({x:Yn,y:gn}):Et===ec.TARGET&&Fn.updateEndPoint({x:Yn,y:gn});Fn.text.value&&En.adjustEdge&&Fn.setText(Object.assign({},Fn.text,Fn.textPosition))})),es(Ql(m),"onDragEnd",(function(F){var Q=F.event;try{var ne;m.setState({dragging:!1});var ge=m.props,ke=ge.graphModel,Le=ge.edgeModel,ft=ge.type,ct=m.state,Et=ct.endX,zt=ct.endY,En=ct.dragging,wn=Qc({x:Et,y:zt},ke);if(!En)return;var Yn,gn=!1;if(wn&&wn.node){var Fn=m.isAllowAdjust(wn),Mn=Fn.pass,$r=Fn.msg,Wr=Fn.newTargetNode;if(Mn){var vr=Le.getData(),Jr=vr.text,_i=vr.sourceAnchorId,bi=_i===void 0?"":_i,Aa=vr.targetAnchorId;Yn=_d(_d({sourceAnchorId:bi,targetAnchorId:Aa===void 0?"":Aa},Tj(vr,kj)),{},{text:(Jr==null?void 0:Jr.value)||""}),ft===ec.SOURCE?(Yn=_d(_d({},ke.edgeGenerator(ke.getNodeModelById(wn.node.id).getData(),ke.getNodeModelById(Le.targetNodeId).getData(),Yn)),{},{sourceNodeId:wn.node.id,sourceAnchorId:wn.anchor.id,startPoint:{x:wn.anchor.x,y:wn.anchor.y},targetNodeId
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function px(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Dj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function Ij(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function W0(i,o){return W0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},W0(i,o)}function Lj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Gy(i);if(o){var h=Gy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return $j(this,l)}}function $j(i,o){if(o&&(U0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mu(i)}function mu(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Gy(i){return Gy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Gy(i)}function tc(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var pm=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&W0(d,m)})(h,i);var o,l,u=Lj(h);function h(){var d;Dj(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return tc(mu(d=u.call.apply(u,[this].concat(w))),"startTime",void 0),tc(mu(d),"contextMenuTime",void 0),tc(mu(d),"clickTimer",void 0),tc(mu(d),"textRef",Object(We.f)()),tc(mu(d),"handleHover",(function(j,F){var Q=d.props,ne=Q.model,ge=Q.graphModel.eventCenter;ne.setHovered(j);var ke=j?Dn.EDGE_MOUSEENTER:Dn.EDGE_MOUSELEAVE,Le=ne.getData();ge.emit(ke,{data:Le,e:F})})),tc(mu(d),"setHoverON",(function(j){d.props.model.isHovered||(d.textRef&&d.textRef.current&&d.textRef.current.setHoverON(),d.handleHover(!0,j))})),tc(mu(d),"setHoverOFF",(function(j){d.props.model.isHovered&&(d.textRef&&d.textRef.current&&d.textRef.current.setHoverOFF(),d.handleHover(!1,j))})),tc(mu(d),"handleContextMenu",(function(j){j.preventDefault(),d.contextMenuTime=new Date().getTime(),d.clickTimer&&clearTimeout(d.clickTimer);var F=d.props,Q=F.model,ne=F.graphModel,ge=ne.getPointByClient({x:j.clientX,y:j.clientY});ne.setElementStateById(Q.id,Zr.SHOW_MENU,ge.domOverlayPosition),d.toFront(),Q.isSelected||ne.selectEdgeById(Q.id);var ke=Q==null?void 0:Q.getData();ne.eventCenter.emit(Dn.EDGE_CONTEXTMENU,{data:ke,e:j,position:ge})})),tc(mu(d),"handleMouseDown",(function(j){j.stopPropagation(),d.startTime=new Date().getTime()})),tc(mu(d),"handleMouseUp",(function(j){if(d.startTime&&!(new Date().getTime()-d.startTime>200||j.button===2)){var F=j.detail===2,Q=d.props,ne=Q.model,ge=Q.graphModel,ke=ne==null?void 0:ne.getData(),Le=ge.getPointByClient({x:j.clientX,y:j.clientY});if(F){var ft=ge.editConfigModel,ct=ge.textEditElement;if(ct&&ct.id===ne.id&&ge.setElementStateById(ne.id,Zr.DEFAULT),ft.edgeTextEdit&&ne.text.editable&&ge.setElementStateById(ne.id,Zr.TEXT_EDIT),ne.modelType===Mr.POLYLINE_EDGE){var Et=ne,zt=ge.getPointByClient({x:j.x,y:j.y}).canvasOverlayPosition,En=zt.x,wn=zt.y,Yn=Tr({x:En,y:wn},Et.points);Et.dbClickPosition=Yn}ge.eventCenter.emit(Dn.EDGE_DBCLICK,{data:ke,e:j,position:Le})}else ge.eventCenter.emit(Dn.ELEMENT_CLICK,{data:ke,e:j,position:Le}),ge.eventCenter.emit(Dn.EDGE_CLICK,{data:ke,e:j,position:Le});var gn=ge.editConfigModel;ge.selectEdgeById(ne.id,Uu(j,gn)),d.toFront()}})),d}return o=h,(l=[{key:"getShape",value:function(){return Object(We.g)("g",null,this.getEdge())}},{key:"getTextStyle
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function hx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var hm=function(i){var o={d:""};return Object.entries(i).forEach((function(l){var u=Fj(l,2),h=u[0],d=u[1],m=G0(d);h!=="style"&&m==="object"||(o[h]=d)})),Object(We.g)("path",o)};function z0(i){return z0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},z0(i)}function H0(){return H0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},H0.apply(this,arguments)}function Bj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function Vj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function X0(i,o){return X0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},X0(i,o)}function Uj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=zy(i);if(o){var h=zy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return Wj(this,l)}}function Wj(i,o){if(o&&(z0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function zy(i){return zy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},zy(i)}var q0=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&X0(d,m)})(h,i);var o,l,u=Uj(h);function h(){return Bj(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getEdge",value:function(){var d=this.props.model,m=d.startPoint,w=d.endPoint,M=d.isAnimation,j=d.arrowConfig,F=d.getEdgeStyle(),Q=d.getEdgeAnimationStyle(),ne=Q.strokeDasharray,ge=Q.stroke,ke=Q.strokeDashoffset,Le=Q.animationName,ft=Q.animationDuration,ct=Q.animationIterationCount,Et=Q.animationTimingFunction,zt=Q.animationDirection;return Object(We.g)(Bh,H0({},F,{x1:m.x,y1:m.y,x2:w.x,y2:w.y},j,M?{strokeDasharray:ne,stroke:ge,style:{strokeDashoffset:ke,animationName:Le,animationDuration:ft,animationIterationCount:ct,animationTimingFunction:Et,animationDirection:zt}}:{}))}},{key:"getAppendWidth",value:function(){var d=this.props.model,m=d.startPoint,w=d.endPoint,M=fi({start:m,end:w}),j=M.d,F=M.strokeWidth,Q=M.fill,ne=M.strokeDasharray,ge=M.stroke;return Object(We.g)(hm,{d:j,fill:Q,strokeWidth:F,stroke:ge,strokeDasharray:ne})}}])&&Vj(o.prototype,l),h})(pm);function Y0(i){return Y0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Y0(i)}function Gj(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(F){j=!0,m=F}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return vx(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function vx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var zj=function(i){var o={points:"",fill:"none"};return Object.entries(i).forEach((function(l){var u=Gj(l,2),h=u[0],d=u[1];(h==="style"||Y0(d)!=="object")&&(o[h]=d)})),Object(We.g)("polyline",o)};function K0(i){return K0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},K0(i)}function mx(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function Hy(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?mx(Object(l),!0).forEach((function(u){wd(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):mx(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function Z0(){return Z0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},Z0.apply(this,arguments)}function Hj(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(F){j=!0,m=F}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return yx(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return yx(l,u)}})(i,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function yx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Xj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function J0(i,o){return J0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},J0(i,o)}function qj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Xy(i);if(o){var h=Xy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return Yj(this,l)}}function Yj(i,o){if(o&&(K0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bd(i)}function bd(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Xy(i){return Xy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Xy(i)}function wd(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var Q0=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&J0(d,m)})(h,i);var o,l,u=qj(h);function h(){var d;return(function(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")})(this,h),wd(bd(d=u.call(this)),"drag",void 0),wd(bd(d),"isDragging",void 0),wd(bd(d),"isShowAdjustPointTemp",void 0),wd(bd(d),"appendInfo",void 0),wd(bd(d),"onDragStart",(function(){var m=d.props.model;m.dragAppendStart(),d.isShowAdjustPointTemp=m.isShowAdjustPoint,m.isShowAdjustPoint=!1})),wd(bd(d),"onDragging",(function(m){var w=m.deltaX,M=m.deltaY,j=d.props,F=j.model,Q=j.graphModel;d.isDragging=!0;var ne=Q.transformModel,ge=Q.editConfigModel,ke=Hj(ne.fixDeltaXY(w,M),2),Le=ke[0],ft=ke[1],ct=F,Et=ge.adjustEdgeMiddle;d.appendInfo=Et?ct.dragAppendSimple(d.appendInfo,{x:Le,y:ft}):ct.dragAppend(d.appendInfo,{x:Le,y:ft})})),wd(bd(d),"onDragEnd",(function(){var m=d.props,w=m.model,M=m.graphModel.eventCenter,j=w;j.dragAppendEnd(),d.isDragging=!1,j.isShowAdjustPoint=d.isShowAdjustPointTemp,d.appendInfo=void 0,M.emit(Dn.EDGE_ADJUST,{data:j.getData()})})),wd(bd(d),"beforeDragStart",(function(m,w){w.dragAble&&d.drag.handleMouseDown(m),d.appendInfo=w})),d.drag=new ye({onDragStart:d.onDragStart,onDragging:d.onDragging,onDragEnd:d.onDragEnd,isStopPropagation:!1}),d}return o=h,(l=[{key:"getEdge",value:function(){var d=this.props.model,m=d.points,w=d.isAnimation,M=d.arrowConfig,j=d.getEdgeStyle(),F=d.getEdgeAnimationStyle(),Q=F.strokeDasharray,ne=F.stroke,ge=F.strokeDashoffset,ke=F.animationName,Le=F.animationDuration,ft=F.animationIterationCount,ct=F.animationTimingFunction,Et=F.animationDirection;return Object(We.g)(zj,Z0({points:m},j,M,w?{strokeDasharray:Q,stroke:ne,style:{strokeDashoffset:ge,animationName:ke,animationDuration:Le,animationIterationCount:ft,animationTimingFunction:ct,animationDirection:Et}}:{}))}},{key:"getArrowInfo",value:function(){var d=this.props.model,m=d.points,w=d.isSelected,M={start:null,end:null,hover:this.state.hover,isSelected:w},j=ir(m);return j.length>=2&&(M.start=j[j.length-2],M.end=j[j.length-1]),M}},{key:"getLastTwoPoints",value:function(){var d=this.props.model.points,m=ir(d);return m.length>=2?[m[m.length-2],m[m.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(d){var m,w=d.start,M=d.end;if(w.x===M.x&&w.y===M.y)m="";else{var j={start:w,end:M,offset:10,verticalLength:5},F=cu(Hy(Hy({},j),{},{type:"start"})),Q=cu(Hy(Hy({},j),{},{type:"end"}));m="M".concat(F.leftX," ").concat(F.leftY,`
L`).concat(F.rightX," ").concat(F.rightY,`
L`).concat(Q.rightX," ").concat(Q.rightY,`
L`).concat(Q.leftX," ").concat(Q.leftY," z")}return{d:m,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(d){var m=this.getAppendAttributes(d),w=m.d,M=m.strokeWidth,j=m.fill,F=m.strokeDasharray,Q=m.stroke;return Object(We.g)(hm,{d:w,fill:j,strokeWidth:M,stroke:Q,strokeDasharray:F})}},{key:"getAppendWidth",value:function(){for(var d=this,m=this.props,w=m.model,M=m.graphModel,j=w.pointsList,F=w.draggable,Q=[],ne=j.length,ge=function(Le){var ft="lf-polyline-append",ct={start:{x:j[Le].x,y:j[Le].y},end:{x:j[Le+1].x,y:j[Le+1].y},startIndex:Le,endIndex:Le+1,direction:"",dragAble:!0},Et=Object(We.g)("g",{className:ft},d.getAppendShape(ct)),zt=M.editConfigModel,En=zt.adjustEdge,wn=zt.adjustEdgeMiddle;if(En&&F){var Yn=ct.startIndex,gn=ct.endIndex,Fn=wn&&(Yn===0||gn===ne-1);ct.dragAble=!Fn,ct.start.x===ct.end.x?(ct.dragAble&&(ft+="-ew-resize"),ct.direction=fo.VERTICAL):ct.start.y===ct.end.y&&(ct.dragAble&&(ft+="-ns-resize"),ct.direction=fo.HORIZONTAL),Et=Object(We.g)("g",{className:d.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(Mn){return d.beforeDragStart(Mn,ct)}},Object(We.g)("g",{className:ft},d.getAppendShape(ct)))}Q.push(Et)},ke=0;ke<ne-1;ke++)ge(ke);return Object(We.g)("g",null,Q)}}])&&Xj(o.prototype,l),h})(pm);function e1(i){return e1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},e1(i)}function Kj(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(F){j=!0,m=F}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return gx(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return gx(l,u)}})(i,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function gx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function t1(){return t1=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},t1.apply(this,arguments)}function Zj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function Jj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function n1(i,o){return n1=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},n1(i,o)}function Qj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=qy(i);if(o){var h=qy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return e8(this,l)}}function e8(i,o){if(o&&(e1(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function qy(i){return qy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},qy(i)}var r1=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&n1(d,m)})(h,i);var o,l,u=Qj(h);function h(){return Zj(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getEdge",value:function(){var d=this.props.model,m=d.getEdgeStyle(),w=d.path,M=d.isAnimation,j=d.arrowConfig,F=d.getEdgeAnimationStyle(),Q=F.strokeDasharray,ne=F.stroke,ge=F.strokeDashoffset,ke=F.animationName,Le=F.animationDuration,ft=F.animationIterationCount,ct=F.animationTimingFunction,Et=F.animationDirection;return Object(We.g)(hm,t1({d:w},m,j,M?{strokeDasharray:Q,stroke:ne,style:{strokeDashoffset:ge,animationName:ke,animationDuration:Le,animationIterationCount:ft,animationTimingFunction:ct,animationDirection:Et}}:{}))}},{key:"getAppendWidth",value:function(){var d=this.props.model.path;return Object(We.g)(hm,{d,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var d=this.props.model,m=this.state.hover,w=d.isSelected,M=d.getArrowStyle().offset,j=d.pointsList.map((function(Q){return{x:Q.x,y:Q.y}})),F=Kj(pi(j,M),2);return{start:F[0],end:F[1],hover:m,isSelected:w}}},{key:"getLastTwoPoints",value:function(){var d=this.props.model,m=d.getArrowStyle().offset,w=d.pointsList.map((function(M){return{x:M.x,y:M.y}}));return pi(w,m)}}])&&Jj(o.prototype,l),h})(pm);function o1(i){return o1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},o1(i)}function _x(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function t8(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function n8(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function r8(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function i1(i,o){return i1=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},i1(i,o)}function o8(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sha
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function xx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Sx(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function Up(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?Sx(Object(l),!0).forEach((function(u){Wp(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):Sx(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function Ax(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function s1(i,o){return s1=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},s1(i,o)}function v8(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Ky(i);if(o){var h=Ky(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return m8(this,l)}}function m8(i,o){if(o&&(l1(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qh(i)}function Qh(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ky(i){return Ky=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Ky(i)}function Wp(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var Mx,kx,Tx,u1=yu((Ox=Ex=(function(i){(function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),w&&s1(m,w)})(d,i);var o,l,u,h=v8(d);function d(){var m;return(function(w,M){if(!(w instanceof M))throw new TypeError("Cannot call a class as a function")})(this,d),Wp(Qh(m=h.call(this)),"ref",Object(We.f)()),Wp(Qh(m),"__prevText",{type:"",text:"",id:""}),Wp(Qh(m),"keyupHandler",(function(w){var M=m.props.graphModel.textEditElement;w.key==="Enter"&&w.altKey&&M.setElementState(0)})),Wp(Qh(m),"inputHandler",(function(w){var M=w.target.innerText,j=m.props.graphModel.textEditElement;m.__prevText={type:j.type,text:M.replace(/(\r\n)+$|(\n)+$/,""),id:j.id}})),Wp(Qh(m),"keydownHandler",(function(w){w.stopPropagation()})),m.state={style:{left:0,top:0}},m}return o=d,u=[{key:"getDerivedStateFromProps",value:function(m){var w,M=m.graphModel,j=M.transformModel,F=M.theme,Q=F.inputText,ne=M.textEditElement;if(ne){var ge;if((ge=ne.text)===null||ge===void 0||!ge.value)if(ne.BaseType===co.EDGE){var ke=(ne=ne).text,Le=ne.textPosition,ft=Le.x,ct=Le.y;ke.x=ft,ke.y=ct,ne.setText(ke)}else ne=ne;var Et={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(ne.BaseType===co.EDGE){var zt=F.edgeText,En=zt.overflowMode,wn=zt.lineHeight,Yn=zt.wrapPadding,gn=zt.textWidth;gn&&En==="autoWrap"&&(w=Up(Up({},Et),{},{width:gn,minWidth:gn,lineHeight:wn,padding:Yn}))}else if(ne.BaseType===co.NODE){var Fn=F.nodeText,Mn=Fn.overflowMode,$r=Fn.lineHeight,Wr=Fn.wrapPadding,vr=Fn.textWidth,Jr=ne,_i=Jr.width,bi=Jr.modelType,Aa=Jr.textWidth||vr||_i;(bi!==Mr.TEXT_NODE&&Mn==="autoWrap"||bi===Mr.TEXT_NODE&&vr)&&(w=Up(Up({},Et),{},{width:Aa,minWidth:Aa,lineHeight:$r,padding:Wr}))}var ts=ne.text,ns=ts.x,nc=ts.y,Gp=h8(j.CanvasPointToHtmlPoint([ns,nc]),2);return{style:Up(Up({left:Gp[0],top:Gp[1]},w),Q)}}}}],(l=[{key:"componentDidUpdate",value:function(){var m=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function g8(i){return(function(o){if(Array.isArray(o))return d1(o)})(i)||(function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)})(i)||Px(i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Px(i,o){if(i){if(typeof i=="string")return d1(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?d1(i,o):void 0}}function d1(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function _8(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function f1(i,o){return f1=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},f1(i,o)}function b8(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Zy(i);if(o){var h=Zy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return w8(this,l)}}function w8(i,o){if(o&&(c1(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ev(i)}function ev(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Zy(i){return Zy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Zy(i)}function tv(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var p1=yu((Tx=kx=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&f1(d,m)})(h,i);var o,l,u=b8(h);function h(d){var m;(function(F,Q){if(!(F instanceof Q))throw new TypeError("Cannot call a class as a function")})(this,h),tv(ev(m=u.call(this)),"stepDrag",void 0),tv(ev(m),"handleMouseDown",(function(F){m.stepDrag.handleMouseDown(F)})),tv(ev(m),"handleWheelEvent",(function(F){var Q,ne;F.preventDefault();var ge=F.deltaX,ke=F.deltaY,Le=F.clientX,ft=F.clientY,ct=F.ctrlKey,Et=new WheelEvent("wheel",{deltaX:ge,deltaY:ke,clientX:Le,clientY:ft,ctrlKey:ct});(Q=m.props.logicFlow.container)===null||Q===void 0||(ne=Q.querySelector('.lf-canvas-overlay[name="canvas-overlay"]'))===null||ne===void 0||ne.dispatchEvent(Et)})),tv(ev(m),"onDragging",(function(F){var Q=F.deltaX,ne=F.deltaY,ge=m.props.graphModel,ke=ge.getSelectElements(!0);ge.moveNodes(ke.nodes.map((function(Le){return Le.id})),Q,ne)})),tv(ev(m),"handleContextMenu",(function(F){F.preventDefault();var Q=m.props,ne=Q.graphModel,ge=Q.graphModel,ke=ge.eventCenter,Le=ge.selectElements,ft=ne.getPointByClient({x:F.clientX,y:F.clientY}),ct={nodes:[],edges:[]};g8(Le.values()).forEach((function(Et){Et.BaseType===co.NODE&&ct.nodes.push(Et.getData()),Et.BaseType===co.EDGE&&ct.edges.push(Et.getData())})),ke.emit(Dn.SELECTION_CONTEXTMENU,{data:ct,e:F,position:ft})}));var w=d.graphModel,M=w.gridSize,j=w.eventCenter;return m.stepDrag=new ye({onDragging:m.onDragging,step:M,eventType:"SELECTION",eventCenter:j}),m}return o=h,(l=[{key:"render",value:function(){var d=this.props.graphModel,m=d.selectElements,w=d.transformModel;if(!(m.size<=1)){var M=Number.MAX_SAFE_INTEGER,j=Number.MAX_SAFE_INTEGER,F=Number.MIN_SAFE_INTEGER,Q=Number.MIN_SAFE_INTEGER;m.forEach((function(Le){var ft={x:0,y:0,x1:0,y1:0};Le.BaseType===co.NODE&&(ft=(function(ct){var Et=ct.x,zt=ct.y,En=ct.width,wn=ct.height;return{x:Et-En/2,y:zt-wn/2,x1:Et+En/2,y1:zt+wn/2}})(Le)),Le.BaseType===co.EDGE&&(ft=y8(Le)),M=Math.min(M,ft.x),j=Math.min(j,ft.y),F=Math.max(F,ft.x1),Q=Math.max(Q,ft.y1)}));var ne=Nx(w.CanvasPointToHtmlPoint([M,j]),2);M=ne[0],j=ne[1];var ge=Nx(w.CanvasPointToHtmlPoint([F,Q]),2);F=ge[0],Q=ge[1];var ke={left:"".concat(M-10,"px"),top:"".concat(j-10,"px"),width:""
`;function mg(e,t,n){var a=CV(n),r="";if(t==="#text")return rv+a+e;if(t==="#cdata-section")return rv+a+"<![CDATA["+e+"]]>";if(t==="#comment")return rv+a+"<!--"+e+"-->";if((""+t).charAt(0)==="-")return" "+t.substring(1)+'="'+RV(e)+'"';if(Array.isArray(e))e.forEach(function(f){r+=mg(f,t,n+1)});else if(GT(e)==="[object Object]"){var s=Object.keys(e),c="",v="";r+=(n===0?"":rv+a)+"<"+t,s.forEach(function(f){f.charAt(0)==="-"?c+=mg(e[f],f,n+1):v+=mg(e[f],f,n+1)}),r+=c+(v!==""?">"+v+(rv+a)+"</"+t+">":" />")}else r+=rv+a+("<"+t+">"+e.toString()+"</"+t+">");return r}function jV(e){var t="";for(var n in e)t+=mg(e[n],n,0);return t}var hl=function(){};hl.ObjTree=function(){return this};hl.ObjTree.VERSION="0.23";hl.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
`;hl.ObjTree.prototype.attr_prefix="-";hl.ObjTree.prototype.parseXML=function(e){var t;if(window.DOMParser){var n=new DOMParser,a=n.parseFromString(e,"application/xml");if(!a)return;t=a.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(e),t=n.documentElement);if(t)return this.parseDOM(t)};hl.ObjTree.prototype.parseHTTP=function(e,t,n){var a={};for(var r in t)a[r]=t[r];if(a.method||(typeof a.postBody>"u"&&typeof a.postbody>"u"&&typeof a.parameters>"u"?a.method="get":a.method="post"),n){a.asynchronous=!0;var s=this,c=n,v=a.onComplete;a.onComplete=function(g){var b;g&&g.responseXML&&g.responseXML.documentElement&&(b=s.parseDOM(g.responseXML.documentElement)),c(b,g),v&&v(g)}}else a.asynchronous=!1;var f;if(typeof HTTP<"u"&&HTTP.Request){a.uri=e;var _=new HTTP.Request(a);_&&(f=_.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var _=new Ajax.Request(e,a);_&&(f=_.transport)}if(n)return f;if(f&&f.responseXML&&f.responseXML.documentElement)return this.parseDOM(f.responseXML.documentElement)};hl.ObjTree.prototype.parseDOM=function(e){if(e){if(this.__force_array={},this.force_array)for(var t=0;t<this.force_array.length;t++)this.__force_array[this.force_array[t]]=1;var n=this.parseElement(e);if(this.__force_array[e.nodeName]&&(n=[n]),e.nodeType!=11){var a={};a[e.nodeName]=n,n=a}return n}};hl.ObjTree.prototype.parseElement=function(e){if(e.nodeType!=7){if(e.nodeType==3||e.nodeType==4||e.nodeType==8){var t=e.nodeValue.match(/[^\x00-\x20]/);return t==null?void 0:e.nodeValue}var n=null,a={};if(e.attributes&&e.attributes.length){n={};for(var r=0;r<e.attributes.length;r++){var s=e.attributes[r].nodeName;if(typeof s=="string"){var c=e.attributes[r].nodeValue;try{c=JSON.parse(e.attributes[r].nodeValue.replace(/'/g,'"'))}catch{c=e.attributes[r].nodeValue}c&&(s=this.attr_prefix+s,typeof a[s]>"u"&&(a[s]=0),a[s]++,this.addNode(n,s,a[s],c))}}}if(e.childNodes&&e.childNodes.length){var v=!0;n&&(v=!1);for(var r=0;r<e.childNodes.length&&v;r++){var f=e.childNodes[r].nodeType;f==3||f==4||f==8||(v=!1)}if(v){n||(n="");for(var r=0;r<e.childNodes.length;r++)n+=e.childNodes[r].nodeValue}else{n||(n={});for(var r=0;r<e.childNodes.length;r++){var s=e.childNodes[r].nodeName;if(typeof s=="string"){var c=this.parseElement(e.childNodes[r]);c&&(typeof a[s]>"u"&&(a[s]=0),a[s]++,this.addNode(n,s,a[s],c))}}}}else n===null&&(n={});return n}};hl.ObjTree.prototype.addNode=function(e,t,n,a){this.__force_array[t]?(n==1&&(e[t]=[]),e[t][e[t].length]=a):n==1?e[t]=a:n==2?e[t]=[e[t],a]:e[t][e[t].length]=a};hl.ObjTree.prototype.writeXML=function(e){var t=this.hash_to_xml(null,e);return this.xmlDecl+t};hl.ObjTree.prototype.hash_to_xml=function(e,t){var n=[],a=[];for(var r in t)if(t.hasOwnProperty(r)){var s=t[r];r.charAt(0)!=this.attr_prefix?typeof s>"u"||s==null?n[n.length]="<"+r+" />":typeof s=="object"&&s.constructor==Array?n[n.length]=this.array_to_xml(r,s):typeof s=="object"?n[n.length]=this.hash_to_xml(r,s):n[n.length]=this.scalar_to_xml(r,s):a[a.length]=" "+r.substring(1)+'="'+this.xml_escape(s)+'"'}var c=a.join(""),v=n.join("");return typeof e>"u"||e==null||(n.length>0?v.match(/\n/)?v="<"+e+c+`>
`+v+"</"+e+`>
`:v="<"+e+c+">"+v+"</"+e+`>
`:v="<"+e+c+` />
`),v};hl.ObjTree.prototype.array_to_xml=function(e,t){for(var n=[],a=0;a<t.length;a++){var r=t[a];typeof r>"u"||r==null?n[n.length]="<"+e+" />":typeof r=="object"&&r.constructor==Array?n[n.length]=this.array_to_xml(e,r):typeof r=="object"?n[n.length]=this.hash_to_xml(e,r):n[n.length]=this.scalar_to_xml(e,r)}return n.join("")};hl.ObjTree.prototype.scalar_to_xml=function(e,t){return e=="#text"?this.xml_escape(t):"<"+e+">"+this.xml_escape(t)+"</"+e+`>
`};hl.ObjTree.prototype.xml_escape=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var DV=function(e){return new hl.ObjTree().parseXML(e)},IV=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,r){a.__proto__=r}||function(a,r){for(var s in r)r.hasOwnProperty(s)&&(a[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function a(){this.constructor=t}t.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}})(),ww=function(){return ww=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ww.apply(this,arguments)},E_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var a=n.call(e),r,s=[],c;try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(v){c={error:v}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(c)throw c.error}}return s},uc;(function(e){e.START="bpmn:startEvent",e.END="bpmn:endEvent",e.GATEWAY="bpmn:exclusiveGateway",e.USER="bpmn:userTask",e.SYSTEM="bpmn:serviceTask",e.FLOW="bpmn:sequenceFlow"})(uc||(uc={}));var zT=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],AS=["properties","startPoint","endPoint","pointsList"];function MS(e){var t=e?AS.concat(e):AS;return function(n){function a(r){var s={};return typeof r=="string"?r:Array.isArray(r)?r.map(function(c){return a(c)}):(Object.entries(r).forEach(function(c){var v=E_(c,2),f=v[0],_=v[1];typeof _!="object"?f.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(f)?s[f]=_:s["-"+f]=_:t.includes(f)?s["-"+f]=a(_):s[f]=a(_)}),s)}return a(n)}}function Lg(e){var t={};return Object.entries(e).forEach(function(n){var a=E_(n,2),r=a[0],s=a[1];r.indexOf("-")===0?t[r.substring(1)]=Ig(s):typeof s=="string"?t[r]=s:Object.prototype.toString.call(s)==="[object Object]"?t[r]=Lg(s):Array.isArray(s)?t[r]=s.map(function(c){return Lg(c)}):t[r]=s}),t}function LV(e,t,n){var a=new Map;t.nodes.forEach(function(s){var c,v={"-id":s.id};if(!((c=s.text)===null||c===void 0)&&c.value&&(v["-name"]=s.text.value),s.properties){var f=MS(n)(s.properties);Object.assign(v,f)}a.set(s.id,v),e[s.type]?Array.isArray(e[s.type])?e[s.type].push(v):e[s.type]=[e[s.type],v]:e[s.type]=v});var r=t.edges.map(function(s){var c,v,f=a.get(s.targetNodeId);f["bpmn:incoming"]?Array.isArray(f["bpmn:incoming"])?f["bpmn:incoming"].push(s.id):f["bpmn:incoming"]=[f["bpmn:incoming"],s.id]:f["bpmn:incoming"]=s.id;var _={"-id":s.id,"-sourceRef":s.sourceNodeId,"-targetRef":s.targetNodeId};if(!((c=s.text)===null||c===void 0)&&c.value&&(_["-name"]=(v=s.text)===null||v===void 0?void 0:v.value),s.properties){var g=MS(n)(s.properties);Object.assign(_,g)}return _});t.edges.forEach(function(s){var c=a.get(s.sourceNodeId);c["bpmn:outgoing"]?Array.isArray(c["bpmn:outgoing"])?c["bpmn:outgoing"].push(s.id):c["bpmn:outgoing"]=[c["bpmn:outgoing"],s.id]:c["bpmn:outgoing"]=s.id}),e[uc.FLOW]=r}function $V(e,t){e["bpmndi:BPMNEdge"]=t.edges.map(function(n){var a,r=n.id,s=n.pointsList.map(function(v){var f=v.x,_=v.y;return{"-x":f,"-y":_}}),c={"-id":r+"_di","-bpmnElement":r,"di:waypoint":s};return!((a=n.text)===null||a===void 0)&&a.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),c}),e["bpmndi:BPMNShape"]=t.nodes.map(function(n){var a,r=n.id,s=100,c=80,v=n.x,f=n.y,_=Qf.shapeConfigMap.get(n.type);_&&(s=_.width,c=_.height),v-=s/2,f-=c/2;var g={"-id":r+"_di","-bpmnElement":r,"dc:Bounds":{"-x":v,"-y":f,"-width":s,"-height":c}};return!((a=n.text)===null||a===void 0)&&a.value&&(g["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),g})}function FV(e){var t=[],n=[],a=e["bpmn:definitions"];if(a){var r=a["bpmn:process"];Object.keys(r).forEach(function(s){if(s.indexOf("bpmn:")===0){var c=r[s];if(s===uc.FLOW){var v=a["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNE
`).forEach(function(f){s<f.length&&(s=f.length)}),n={value:a,x:Number(r["-x"])+s*10/2,y:Number(r["-y"])+7}}var c;Object.entries(t).forEach(function(f){var _=E_(f,2),g=_[0],b=_[1];zT.indexOf(g)===-1&&(c||(c={}),c[g]=b)}),c&&(c=Lg(c));var v={id:t["-id"],type:uc.FLOW,pointsList:e["di:waypoint"].map(function(f){return{x:Number(f["-x"]),y:Number(f["-y"])}}),sourceNodeId:t["-sourceRef"],targetNodeId:t["-targetRef"],properties:c};return n&&(v.text=n),v}var Qf=(function(){function e(t){var n=this,a=t.lf;this.adapterOut=function(r,s){var c=ww({},n.processAttributes);LV(c,r,s);var v={"-id":"BPMNPlane_1","-bpmnElement":c["-id"]};$V(v,r);var f=n.definitionAttributes;f["bpmn:process"]=c,f["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":v};var _={"bpmn:definitions":f};return _},this.adapterIn=function(r){if(r)return FV(r)},a.adapterIn=function(r){return n.adapterIn(r)},a.adapterOut=function(r,s){return n.adapterOut(r,s)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+SS()},this.definitionAttributes={"-id":"Definitions_"+SS(),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.0"}}return e.prototype.setCustomShape=function(t,n){e.shapeConfigMap.set(t,n)},e.pluginName="bpmn-adapter",e.shapeConfigMap=new Map,e})();Qf.shapeConfigMap.set(uc.START,{width:bS.width,height:bS.height});Qf.shapeConfigMap.set(uc.END,{width:wS.width,height:wS.height});Qf.shapeConfigMap.set(uc.GATEWAY,{width:ES.width,height:ES.height});Qf.shapeConfigMap.set(uc.SYSTEM,{width:OS.width,height:OS.height});Qf.shapeConfigMap.set(uc.USER,{width:xS.width,height:xS.height});(function(e){IV(t,e);function t(n){var a=e.call(this,n)||this;a.adapterXmlIn=function(s){var c=DV(s);return a.adapterIn(c)},a.adapterXmlOut=function(s,c){var v=a.adapterOut(s,c);return jV(v)};var r=n.lf;return r.adapterIn=a.adapterXmlIn,r.adapterOut=a.adapterXmlOut,a}return t.pluginName="bpmnXmlAdapter",t})(Qf);var UV=(function(){function e(){globalThis._ids=this,this._ids=new Set}return e.prototype.generateId=function(){var t="xxxxxxx".replace(/[x]/g,function(n){var a=Math.random()*16|0,r=n==="x"?a:a&3|8;return r.toString(16)});return t},e.prototype.next=function(){for(var t=this.generateId();this._ids.has(t);)t=this.generateId();return this._ids.add(t),t},e})(),WV=(globalThis==null?void 0:globalThis._ids)||new UV;function GV(){return WV.next()}hn.h("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),hn.h("path",{d:"M 18,18 l 2.25,-7.5 m -2.25,7.5 l 5.25,1.5",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(0,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(30,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(60,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(90,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(120,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(150,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{
`;vl.ObjTree.prototype.attr_prefix="-";vl.ObjTree.prototype.parseXML=function(e){var t;if(window.DOMParser){var n=new DOMParser,a=n.parseFromString(e,"application/xml");if(!a)return;t=a.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(e),t=n.documentElement);if(t){var r=this.parseDOM(t);return r}};vl.ObjTree.prototype.parseHTTP=function(e,t,n){var a={};for(var r in t)a[r]=t[r];if(a.method||(typeof a.postBody>"u"&&typeof a.postbody>"u"&&typeof a.parameters>"u"?a.method="get":a.method="post"),n){a.asynchronous=!0;var s=this,c=n,v=a.onComplete;a.onComplete=function(g){var b;g&&g.responseXML&&g.responseXML.documentElement&&(b=s.parseDOM(g.responseXML.documentElement)),c(b,g),v&&v(g)}}else a.asynchronous=!1;var f;if(typeof HTTP<"u"&&HTTP.Request){a.uri=e;var _=new HTTP.Request(a);_&&(f=_.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var _=new Ajax.Request(e,a);_&&(f=_.transport)}if(n)return f;if(f&&f.responseXML&&f.responseXML.documentElement)return this.parseDOM(f.responseXML.documentElement)};vl.ObjTree.prototype.parseDOM=function(e){if(e){if(this.__force_array={},this.force_array)for(var t=0;t<this.force_array.length;t++)this.__force_array[this.force_array[t]]=1;var n=this.parseElement(e);if(this.__force_array[e.nodeName]&&(n=[n]),e.nodeType!==11){var a={};a[e.nodeName]=n,n=a}return n}};vl.ObjTree.prototype.parseElement=function(e){if(e.nodeType!==7){if(e.nodeType===3||e.nodeType===4||e.nodeType===8){var t=e.nodeValue.match(/[^\x00-\x20]/);return t==null?void 0:e.nodeValue}var n=null,a={};if(e.attributes&&e.attributes.length){n={};for(var r=0;r<e.attributes.length;r++){var s=e.attributes[r].nodeName;if(typeof s=="string"){var c=e.attributes[r].nodeValue;try{c=JSON.parse(e.attributes[r].nodeValue.replace(/'/g,'"'))}catch{c=e.attributes[r].nodeValue}c!=null&&(s=this.attr_prefix+s,typeof a[s]>"u"&&(a[s]=0),a[s]++,this.addNode(n,s,a[s],c))}}}if(e.childNodes&&e.childNodes.length){var v=!0;n&&(v=!1);for(var r=0;r<e.childNodes.length&&v;r++){var f=e.childNodes[r].nodeType;f===3||f===4||f===8||(v=!1)}if(v){n||(n="");for(var r=0;r<e.childNodes.length;r++)n+=e.childNodes[r].nodeValue}else{n||(n={});for(var r=0;r<e.childNodes.length;r++){var s=e.childNodes[r].nodeName;if(typeof s=="string"){var c=this.parseElement(e.childNodes[r]);c&&(typeof a[s]>"u"&&(a[s]=0),a[s]++,this.addNode(n,s,a[s],c))}}}}else n===null&&(n={});return n}};vl.ObjTree.prototype.addNode=function(e,t,n,a){this.__force_array[t]?(n===1&&(e[t]=[]),e[t][e[t].length]=a):n===1?e[t]=a:n===2?e[t]=[e[t],a]:e[t][e[t].length]=a};vl.ObjTree.prototype.writeXML=function(e){var t=this.hash_to_xml(null,e);return this.xmlDecl+t};vl.ObjTree.prototype.hash_to_xml=function(e,t){var n=[],a=[];for(var r in t)if(t!=null&&t.hasOwnProperty(r)){var s=t[r];r.charAt(0)!==this.attr_prefix?typeof s>"u"||s==null?n[n.length]="<"+r+" />":typeof s=="object"&&s.constructor===Array?n[n.length]=this.array_to_xml(r,s):typeof s=="object"?n[n.length]=this.hash_to_xml(r,s):n[n.length]=this.scalar_to_xml(r,s):a[a.length]=" "+r.substring(1)+'="'+this.xml_escape(s)+'"'}var c=a.join(""),v=n.join("");return typeof e>"u"||e==null||(n.length>0?v.match(/\n/)?v="<"+e+c+`>
`+v+"</"+e+`>
`:v="<"+e+c+">"+v+"</"+e+`>
`:v="<"+e+c+` />
`),v};vl.ObjTree.prototype.array_to_xml=function(e,t){for(var n=[],a=0;a<t.length;a++){var r=t[a];typeof r>"u"||r==null?n[n.length]="<"+e+" />":typeof r=="object"&&r.constructor===Array?n[n.length]=this.array_to_xml(e,r):typeof r=="object"?n[n.length]=this.hash_to_xml(e,r):n[n.length]=this.scalar_to_xml(e,r)}return n.join("")};vl.ObjTree.prototype.scalar_to_xml=function(e,t){return e==="#text"?this.xml_escape(t):"<"+e+">"+this.xml_escape(t)+"</"+e+`>
`};vl.ObjTree.prototype.xml_escape=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var dU=function(e){return new vl.ObjTree().parseXML(e)};function cN(e){return Object.prototype.toString.call(e)}function HS(e){return" ".repeat(e)}function Ug(e){return cN(e)==="[object Object]"?Object.keys(e).reduce(function(t,n){var a=n;return n.charAt(0)==="-"&&(a=n.substring(1)),t[a]=Ug(e[n]),t},{}):Array.isArray(e)?e.map(function(t){return Ug(t)}):e}function fU(e){var t=e;try{typeof t!="string"&&(t=JSON.parse(e))}catch{t=JSON.stringify(Ug(e)).replace(/"/g,"'")}return t}var XS=`
`;function gg(e,t,n){var a=HS(n),r="",s=XS+a;if(t==="-json")return"";if(t==="#text")return s+e;if(t==="#cdata-section")return s+"<![CDATA["+e+"]]>";if(t==="#comment")return s+"<!--"+e+"-->";if((""+t).charAt(0)==="-")return" "+t.substring(1)+'="'+fU(e)+'"';if(Array.isArray(e))r+=e.map(function(_){return gg(_,t,n+1)}).join("");else if(cN(e)==="[object Object]"){var c=Object.keys(e),v="",f=e["-json"]?XS+HS(n+1)+e["-json"]:"";r+=(n===0?"":s)+"<"+t,c.forEach(function(_){_.charAt(0)==="-"?v+=gg(e[_],_,n+1):f+=gg(e[_],_,n+1)}),r+=v+(f!==""?">"+f+s+"</"+t+">":" />")}else r+=s+"<"+t+">"+e.toString()+"</"+t+">";return r}function pU(e){var t="";for(var n in e)t+=gg(e[n],n,0);return t}var hU=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,r){a.__proto__=r}||function(a,r){for(var s in r)r.hasOwnProperty(s)&&(a[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function a(){this.constructor=t}t.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}})(),kw=function(){return kw=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},kw.apply(this,arguments)},qS=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},LE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Uv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var a=n.call(e),r,s=[],c;try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(v){c={error:v}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(c)throw c.error}}return s},_v=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Uv(arguments[t]));return e},fl;(function(e){e.START="bpmn:startEvent",e.END="bpmn:endEvent",e.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",e.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",e.BOUNDARY="bpmn:boundaryEvent",e.PARALLEL_GATEWAY="bpmn:parallelGateway",e.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",e.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",e.USER="bpmn:userTask",e.SYSTEM="bpmn:serviceTask",e.FLOW="bpmn:sequenceFlow",e.SUBPROCESS="bpmn:subProcess"})(fl||(fl={}));var dN=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],vU=["properties","startPoint","endPoint","pointsList"],Wg={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},fN=function(e,t){var n=Object.keys(t||{});return n.forEach(function(a){if(e[a]){var r=t[a],s=r.in,c=r.out;s&&(e[a].in=s),c&&(e[a].out=c)}else e[a]=t[a]}),e},Rs={"bpmn:startEvent":{out:function(e){var t,n,a=e.properties;return((n=(t=Rs[a.definitionType])===null||t===void 0?void 0:t.out)===null||n===void 0?void 0:n.call(t,e))||{}}},"bpmn:intermediateCatchEvent":{out:function(e){var t,n,a=e.properties;return((n=(t=Rs[a.definitionType])===null||t===void 0?void 0:t.out)===null||n===void 0?void 0:n.call(t,e))||{}}},"bpmn:intermediateThrowEvent":{out:function(e){var t,n,a=e.properties;return((n=(t=Rs[a.definitionType])===null||t===void 0?void 0:t.out)===null||n===void 0?void 0:n.call(t,e))||{}}},"bpmn:boundaryEvent":{out:function(e){var t,n,a=e.properties;return((n=(t=Rs[a.definitionType])===null||t===void 0?void 0:t.out)===null||n===void 0?void 0:n.call(t,e))||{}}},"bpmn:sequenceFlow":{out:function(e){var t=e.properties,n=t.expressionType,a=t.condition;return a?n==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2
`).forEach(function(_){s<_.length&&(s=_.length)}),n={value:a,x:Number(r["-x"])+s*10/2,y:Number(r["-y"])+7}}var c={};Object.entries(t).forEach(function(_){var g=Uv(_,2),b=g[0],x=g[1];dN.includes(b)||(c[b]=x)}),c=Gg(c);var v=e["di:waypoint"].map(function(_){return{x:Number(_["-x"]),y:Number(_["-y"])}}),f={id:t["-id"],type:fl.FLOW,pointsList:v,sourceNodeId:t["-sourceRef"],targetNodeId:t["-targetRef"],properties:c};return n&&(f.text=n),f}var Dl=(function(){function e(t){var n=this,a=t.lf;this.adapterOut=function(r,s){var c,v,f=kw({},n.processAttributes);yU(f,r,s);var _={"-id":"BPMNPlane_1","-bpmnElement":f["-id"]};gU(_,r);var g=n.definitionAttributes;g["bpmn:process"]=f,g["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":_};var b={"bpmn:definitions":g};if(!((c=s==null?void 0:s.mapping)===null||c===void 0)&&c.out){var x=(v=s==null?void 0:s.mapping)===null||v===void 0?void 0:v.out,A=function(S){Array.isArray(S)&&S.forEach(function(E){return A(E)}),typeof S=="object"&&Object.keys(S).forEach(function(E){var T;(T=x[E])?(S[T]=ce.cloneDeep(S[E]),delete S[E],A(S[T])):A(S[E])})};A(b)}return b},this.adapterIn=function(r,s){if(r)return bU(r,s)},a.adapterIn=this.adapterIn,a.adapterOut=this.adapterOut,this.processAttributes={"-isExecutable":"true","-id":"Process"},this.definitionAttributes={"-id":"Definitions","-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.10"}}return e.prototype.setCustomShape=function(t,n){e.shapeConfigMap.set(t,n)},e.pluginName="bpmn-adapter",e.shapeConfigMap=new Map,e})();Dl.shapeConfigMap.set(fl.START,{width:LS.width,height:LS.height});Dl.shapeConfigMap.set(fl.END,{width:$S.width,height:$S.height});Dl.shapeConfigMap.set(fl.INTERMEDIATE_CATCH,{width:Vg.width,height:Vg.height});Dl.shapeConfigMap.set(fl.INTERMEDIATE_THROW,{width:Vg.width,height:Vg.height});Dl.shapeConfigMap.set(fl.BOUNDARY,{width:FS.width,height:FS.height});Dl.shapeConfigMap.set(fl.PARALLEL_GATEWAY,{width:BS.width,height:BS.height});Dl.shapeConfigMap.set(fl.INCLUSIVE_GATEWAY,{width:VS.width,height:VS.height});Dl.shapeConfigMap.set(fl.EXCLUSIVE_GATEWAY,{width:US.width,height:US.height});Dl.shapeConfigMap.set(fl.SYSTEM,{width:WS.width,height:WS.height});Dl.shapeConfigMap.set(fl.USER,{width:GS.width,height:GS.height});Dl.shapeConfigMap.set(fl.SUBPROCESS,{width:zS.width,height:zS.height});(function(e){hU(t,e);function t(n){var a=e.call(this,n)||this;a.adapterXmlIn=function(c){var v=dU(c);return a.adapterIn(v,a.props)},a.adapterXmlOut=function(c){var v=a.adapterOut(c,a.props);return pU(v)};var r=n.lf,s=n.props;return r.adapterIn=a.adapterXmlIn,r.adapterOut=a.adapterXmlOut,a.props=s,a}return t.pluginName="BPMNAdapter",t})(Dl);var ZS;(function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"})(ZS||(ZS={}));var OU=(function(){function e(t){var n=this,a=t.lf;this.__disabled=!1,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.__draw=function(s){var c=n.lf.getPointByClient(s.clientX,s.clientY).domOverlayPosition,v=c.x,f=c.y;n.endPoint={x:v,y:f};var _=n.startPoint,g=_.x,b=_.y,x=n.wrapper.style,A=g,S=b,E=v-g,T=f-b;v<g&&(A=v,E=g-v),f<b&&(S=f,T=b-f),x.left=A+"px",x.top=S+"px",x.width=E+"px",x.height=T+"px"},this.__drawOff=function(){document.removeEventListener("mousemove",n.__draw),document.removeEventListener("mouseup",n.__drawOff),n.wrapper.oncontextmenu=null,n.__domContainer.removeChild(n.wrapper);var s=n.startPoint,c=s.x,v=s.y,f=n.endPoint,_=f.x,g=f.y;if(!(Math.abs(_-c)<10&&Math.abs(g-v)<10)){var b=[Math.min(c,_),Math.min(v,g)],x=[Math.max(c,_),Math.max(v,g)],A=n.lf.graphModel.getAreaElement(b,x,n.isWholeEdge,n.isWholeNode,!0),S=n.lf.graphModel.group;A.forEach(function(E){(!S||!S.getNodeGroup(E.id))&&n.lf.selectElementById(E.id,!0)}),n.lf.emit("selection:selected",A)}},this.lf=a;var r=a.getEditConfi
<g filter="url(#filter0_d_5119_232585)">
<path d="M20.9998 29.8333C28.0875 29.8333 33.8332 24.0876 33.8332 17C33.8332 9.91231 28.0875 4.16663 20.9998 4.16663C13.9122 4.16663 8.1665 9.91231 8.1665 17C8.1665 24.0876 13.9122 29.8333 20.9998 29.8333Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.9998 27.5C26.7988 27.5 31.4998 22.799 31.4998 17C31.4998 11.201 26.7988 6.49996 20.9998 6.49996C15.2008 6.49996 10.4998 11.201 10.4998 17C10.4998 22.799 15.2008 27.5 20.9998 27.5ZM33.8332 17C33.8332 24.0876 28.0875 29.8333 20.9998 29.8333C13.9122 29.8333 8.1665 24.0876 8.1665 17C8.1665 9.91231 13.9122 4.16663 20.9998 4.16663C28.0875 4.16663 33.8332 9.91231 33.8332 17Z" fill="#3370FF"/>
</g>
<defs>
<filter id="filter0_d_5119_232585" x="-1" y="-1" width="44" height="44" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="4"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.2 0 0 0 0 0.439216 0 0 0 0 1 0 0 0 0.1 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5119_232585"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5119_232585" result="shape"/>
</filter>
</defs>
</svg>
`:`<svg width="100%" height="100%" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d_5199_166905)">
<path d="M20.9998 29.8333C28.0875 29.8333 33.8332 24.0876 33.8332 17C33.8332 9.91231 28.0875 4.16663 20.9998 4.16663C13.9122 4.16663 8.1665 9.91231 8.1665 17C8.1665 24.0876 13.9122 29.8333 20.9998 29.8333Z" fill="#3370FF"/>
<path d="M19.8332 11.75C19.8332 11.4278 20.0943 11.1666 20.4165 11.1666H21.5832C21.9053 11.1666 22.1665 11.4278 22.1665 11.75V15.8333H26.2498C26.572 15.8333 26.8332 16.0945 26.8332 16.4166V17.5833C26.8332 17.9055 26.572 18.1666 26.2498 18.1666H22.1665V22.25C22.1665 22.5721 21.9053 22.8333 21.5832 22.8333H20.4165C20.0943 22.8333 19.8332 22.5721 19.8332 22.25V18.1666H15.7498C15.4277 18.1666 15.1665 17.9055 15.1665 17.5833V16.4166C15.1665 16.0945 15.4277 15.8333 15.7498 15.8333H19.8332V11.75Z" fill="white"/>
</g>
<defs>
<filter id="filter0_d_5199_166905" x="-1" y="-1" width="44" height="44" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="4"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.2 0 0 0 0 0.439216 0 0 0 0 1 0 0 0 0.1 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5199_166905"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5199_166905" result="shape"/>
</filter>
</defs>
</svg>`}})])}setHtml(n){if(this.isMounted)this.r&&this.r.component&&(this.r.component.props.properties=this.props.model.getProperties());else{this.isMounted=!0;const a=document.createElement("div");n.appendChild(a),this.renderVueComponent(a)}}componentWillUnmount(){super.componentWillUnmount(),this.unmount()}getComponentContainer(){return this.root}targetId(){return`${this.props.graphModel.flowId}:${this.props.model.id}`}renderVueComponent(n){var s;this.unmountVueComponent(),this.root=n;const{model:a,graphModel:r}=this.props;if(n)if(zg())hN(this.targetId(),this.component,n,a,r,void 0,this.props.graphModel.get_provide);else{this.r=kv(this.component,{properties:this.props.model.properties,nodeModel:this.props.model}),this.app=ik({render(){return this.r},provide(){return{getNode:()=>a,getGraph:()=>r,workflowMode:sc.Application}}}),this.app.use(DD,{locale:ID}),this.app.use(LD),this.app.use($D),this.app.use(ok);for(const[c,v]of Object.entries(FD))this.app.component(c,v);(s=this.app)==null||s.mount(n)}}unmountVueComponent(){return this.app&&(this.app.unmount(),this.app=null),this.root&&(this.root.innerHTML=""),this.root}unmount(){zg()&&vN(this.targetId()),this.unmountVueComponent()}}class vo extends sN.model{refreshDeges(){this.incoming.edges.forEach(t=>{t.updatePathByAnchor()}),this.outgoing.edges.forEach(t=>{t.updatePathByAnchor()})}set_position(t){const{x:n,y:a}=t;n&&(this.x=n),a&&(this.y=a),this.refreshDeges()}getResizeOutlineStyle(){const t=super.getResizeOutlineStyle();return t.stroke="none",t}getControlPointStyle(){const t=super.getControlPointStyle();return t.stroke="none",t.fill="none",t}getNodeStyle(){return{overflow:"visible"}}getOutlineStyle(){const t=super.getOutlineStyle();return t.stroke="none",t.hover&&(t.hover.stroke="none"),t}getAnchorStyle(t){const n=super.getAnchorStyle(t);return t.type==="left"?(n.fill="red",n.hover.fill="transparent",n.hover.stroke="transpanrent",n.className="lf-hide-default"):n.fill="green",n}setHeight(t){const n=this.height,a=t+100;this.height=a,this.properties.height=a,this.move(0,(a-n)/2),this.outgoing.edges.forEach(r=>{r.updatePathByAnchor()}),this.incoming.edges.forEach(r=>{r.updatePathByAnchor()})}get_width(){var t;return((t=this.properties)==null?void 0:t.width)||340}setAttributes(){const{t}=ok.global;this.width=this.get_width();const n=(r,s)=>{const c=this.graphModel.getNodeIncomingNode(r);for(const v in c){const f=c[v];if(f.id===s)return!0;if(n(f.id,s))return!0}return!1},a={message:t("views.applicationWorkflow.tip.onlyRight"),validate:(r,s,c)=>c.type==="right"};this.sourceRules.push({message:t("views.applicationWorkflow.tip.notRecyclable"),validate:(r,s,c,v)=>s.id==r.id?!1:!this.graphModel.getNodeIncomingEdge(s.id).find(g=>g.targetAnchorId==v.id&&g.sourceAnchorId==c.id)&&!n(r.id,s.id)}),this.sourceRules.push(a),this.targetRules.push({message:t("views.applicationWorkflow.tip.onlyLeft"),validate:(r,s,c,v)=>v.type==="left"})}getDefaultAnchor(){const{id:t,x:n,y:a,width:r}=this,s=this.properties.showNode===void 0?!0:this.properties.showNode,c=[];return this.type!==nr.Base&&([nr.Start,nr.LoopStartNode.toString()].includes(this.type)||c.push({x:n-r/2+10,y:s?a:a-15,id:`${t}_left`,edgeAddable:!1,type:"left"}),c.push({x:n+r/2-10,y:s?a:a-15,id:`${t}_right`,type:"right"})),c}}let CU=class extends ho{constructor(t){super(t,AV)}};const RU={type:"ai-chat-node",model:vo,view:CU},mN=Object.freeze(Object.defineProperty({__proto__:null,default:RU},Symbol.toStringTag,{value:"Module"})),jU={class:"title-decoration-1 mb-8"},DU={class:"flex align-center"},IU={class:"mr-4"},LU=Vn({__name:"index",props:{nodeModel:{}},setup(e){const t=Li(),n=$n(()=>t.path.includes("resource-management")?"systemManage":"workspace"),a={question_reference_address:["start-node","question"],api_input_field_list:[],user_input_field_list:[],document_list:["start-node","document"],image_list:["start-node","image"],audio_list:["start-node","audio"],video_list:["start-node","video"]},r=je(),s=$n({get:()=>(f.nodeModel.properties.node_data||me.set(f.nodeModel.properties,"node_data",a),f.nodeModel.properties.node_data),set:g
* Sortable 1.15.6
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function JS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function cc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JS(Object(n),!0).forEach(function(a){BU(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JS(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _g(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_g=function(t){return typeof t}:_g=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_g(e)}function BU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Td(){return Td=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Td.apply(this,arguments)}function VU(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function UU(e,t){if(e==null)return{};var n=VU(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var WU="1.15.6";function Md(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Rd=Md(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ey=Md(/Edge/i),QS=Md(/firefox/i),Pm=Md(/safari/i)&&!Md(/chrome/i)&&!Md(/android/i),$E=Md(/iP(ad|od|hone)/i),gN=Md(/chrome/i)&&Md(/android/i),_N={capture:!1,passive:!1};function ro(e,t,n){e.addEventListener(t,n,!Rd&&_N)}function Qr(e,t,n){e.removeEventListener(t,n,!Rd&&_N)}function Hg(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function bN(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function bu(e,t,n,a){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Hg(e,t):Hg(e,t))||a&&e===n)return e;if(e===n)break}while(e=bN(e))}return null}var eA=/\s+/g;function rs(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var a=(" "+e.className+" ").replace(eA," ").replace(" "+t+" "," ");e.className=(a+(n?" "+t:"")).replace(eA," ")}}function xr(e,t,n){var a=e&&e.style;if(a){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in a)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),a[t]=n+(typeof n=="string"?"":"px")}}function bv(e,t){var n="";if(typeof e=="string")n=e;else do{var a=xr(e,"transform");a&&a!=="none"&&(n=a+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function wN(e,t,n){if(e){var a=e.getElementsByTagName(t),r=0,s=a.length;if(n)for(;r<s;r++)n(a[r],r);return a}return[]}function lc(){var e=document.scrollingElement;return e||document.documentElement}function Yi(e,t,n,a,r){if(!(!e.getBoundingClientRect&&e!==window)){var s,c,v,f,_,g,b;if(e!==window&&e.parentNode&&e!==lc()?(s=e.getBoundingClientRect(),c=s.top,v=s.left,f=s.bottom,_=s.right,g=s.height,b=s.width):(c=0,v=0,f=window.innerHeight,_=window.innerWidth,g=window.innerHeight,b=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!Rd))do if(r&&r.getBoundingClientRect&&(xr(r,"transform")!=="none"||n&&xr(r,"position")!=="static")){var x=r.getBoundingClientRect();c-=x.top+parseInt(xr(r,"border-top-width")),v-=x.left+parseInt(xr(r,"border-left-width")),f=c+s.height,_=v+s.width;break}while(r=r.parentNode);if(a&&e!==window){var A=bv(r||e),
{{form}}
${yt("views.applicationWorkflow.nodes.formNode.form_content_format2")}`,form_field_list:[]}),A=$n({get:()=>(t.nodeModel.properties.node_data||me.set(t.nodeModel.properties,"node_data",x.value),t.nodeModel.properties.node_data),set:R=>{me.set(t.nodeModel.properties,"node_data",R)}}),S=R=>{var U;if(R.default_value){const L=(U=R.option_list)==null?void 0:U.filter(D=>R.default_value.indexOf(D.value)>-1).map(D=>D.label).join(",");return L||R.default_value}if(R.default_value!==void 0)return R.default_value},E=()=>{var R;return(R=n.value)==null?void 0:R.validate()};function T(R){me.set(t.nodeModel.properties.node_data,"form_content_format",R)}function I(){if(!a.value)return;const U=a.value.$el.querySelector(".el-table__body-wrapper tbody");U&&_r.create(U,{animation:150,ghostClass:"ghost-row",onEnd:L=>{if(L.oldIndex===void 0||L.newIndex===void 0)return;const D=me.cloneDeep([...A.value.form_field_list]),[W]=D.splice(L.oldIndex,1);D.splice(L.newIndex,0,W),A.value.form_field_list=D,c()}})}return Ir(()=>{me.set(t.nodeModel,"validate",E),c(),t.nodeModel.graphModel.eventCenter.emit("refresh_incoming_node_field")}),(R,U)=>{const L=J("AppIcon"),D=J("el-tooltip"),W=J("MdEditorMagnify"),Y=J("el-form-item"),B=J("el-button"),V=J("el-table-column"),z=J("el-tag"),H=J("el-switch"),q=J("el-table"),ee=J("el-form"),ue=J("el-card");return _e(),at(wo,{nodeModel:e.nodeModel},{default:P(()=>[K("h5",HG,de(R.$t("views.applicationWorkflow.nodeSetting")),1),k(ue,{shadow:"never",class:"card-never",style:{"--el-card-padding":"12px"}},{default:P(()=>[k(ee,{onSubmit:U[4]||(U[4]=Xt(()=>{},["prevent"])),model:A.value,"label-position":"top","require-asterisk-position":"right","label-width":"auto",ref_key:"formNodeFormRef",ref:n,"hide-required-asterisk":""},{default:P(()=>[k(Y,{label:R.$t("views.applicationWorkflow.nodes.formNode.formContent.label"),prop:"form_content_format",rules:{required:!0,message:R.$t("views.applicationWorkflow.nodes.formNode.formContent.requiredMessage"),trigger:"blur"}},{label:P(()=>[K("div",XG,[K("div",qG,[K("span",null,[et(de(R.$t("views.applicationWorkflow.nodes.formNode.formContent.label")),1),U[5]||(U[5]=K("span",{class:"color-danger"},"*",-1))])]),k(D,{effect:"dark",placement:"right","popper-class":"max-w-200"},{content:P(()=>[et(de(R.$t("views.applicationWorkflow.nodes.formNode.formContent.tooltip",{form:"{ form }"})),1)]),default:P(()=>[k(L,{iconName:"app-warning",class:"app-warning-icon"})]),_:1})])]),default:P(()=>[k(W,{title:R.$t("views.applicationWorkflow.nodes.formNode.formContent.label"),modelValue:A.value.form_content_format,"onUpdate:modelValue":U[0]||(U[0]=ie=>A.value.form_content_format=ie),style:{height:"150px"},onSubmitDialog:T},null,8,["title","modelValue"])]),_:1},8,["label","rules"]),k(Y,{label:R.$t("views.applicationWorkflow.nodes.formNode.formSetting"),onClick:U[3]||(U[3]=Xt(()=>{},["prevent"]))},{label:P(()=>[K("div",YG,[K("h5",KG,de(R.$t("views.applicationWorkflow.nodes.formNode.formSetting")),1),k(B,{link:"",type:"primary",onClick:U[1]||(U[1]=ie=>_())},{default:P(()=>[k(L,{iconName:"app-add-outlined",class:"mr-4"}),et(" "+de(R.$t("common.add")),1)]),_:1})])]),default:P(()=>[A.value.form_field_list.length>0?(_e(),at(q,{key:0,class:"border",data:A.value.form_field_list,ref_key:"tableRef",ref:a,"row-key":"field"},{default:P(()=>[k(V,{prop:"field",label:R.$t("dynamicsForm.paramForm.field.label"),width:"95"},{default:P(({row:ie})=>[K("span",{title:ie.field,class:"ellipsis-1"},de(ie.field),9,ZG)]),_:1},8,["label"]),k(V,{prop:"label",label:R.$t("dynamicsForm.paramForm.name.label")},{default:P(({row:ie})=>[ie.label&&ie.label.input_type==="TooltipLabel"?(_e(),Ht("span",JG,[K("span",{title:ie.label.label,class:"ellipsis-1"},de(ie.label.label),9,QG)])):(_e(),Ht("span",ez,[K("span",{title:ie.label,class:"ellipsis-1"},de(ie.label),9,tz)]))]),_:1},8,["label"]),k(V,{label:R.$t("dynamicsForm.paramForm.input_type.label"),width:"110px"},{default:P(({row:ie})=>[k(z,{type:"info",class:"info-tag"},{default:P(()=>{var be;return[et(de((be=_n(WD).find(De=>De.value===ie.input_type))==null?void 0:be.label),1)]}),_:2},1024)]),_:1},8,["
"math": {
"url": "your_server",
"transport": "sse"
}
}`,zH=Vn({__name:"index",props:{nodeModel:{}},setup(e){const t=e,n=Li(),{params:{id:a}}=n,s=Ga("getApplicationDetail")(),c=$n(()=>n.path.includes("resource-management")?"systemManage":"workspace"),v=je(),f=je(!1),_=B=>B.ctrlKey===!0?(B.preventDefault(),!0):(B.stopPropagation(),!0),g={mcp_tool:"",mcp_tools:[],mcp_servers:"",mcp_server:"",mcp_source:"referencing",mcp_tool_id:"",tool_params:{},tool_form_field:[],params_nested:""},b=je([]);function x(B){me.set(t.nodeModel.properties.node_data,"mcp_servers",B)}async function A(){const B=await po({type:"tool",systemType:c.value}).getToolById(L.value.mcp_tool_id,f);L.value.mcp_servers=B.data.code}function S(){if(L.value.mcp_source==="referencing"&&!L.value.mcp_tool_id){ei(yt("views.applicationWorkflow.nodes.mcpNode.mcpToolTip"));return}if(L.value.mcp_source==="referencing"&&L.value.mcp_tool_id&&!b.value.find(B=>B.id===L.value.mcp_tool_id)){ei(yt("views.applicationWorkflow.nodes.mcpNode.mcpToolTip"));return}if(L.value.mcp_source==="custom"&&!L.value.mcp_servers){ei(yt("views.applicationWorkflow.nodes.mcpNode.mcpServerTip"));return}try{JSON.parse(L.value.mcp_servers);const B=I(L.value.mcp_servers);if(B.length>0){T.value.open(B);return}}catch{ei(yt("views.applicationWorkflow.nodes.mcpNode.mcpServerTip"));return}E(L.value.mcp_servers)}function E(B){po({type:"application",systemType:c.value}).getMcpTools(a,B,f).then(V=>{var z;L.value.mcp_tools=V.data,zf(yt("views.applicationWorkflow.nodes.mcpNode.getToolsSuccess")),L.value.mcp_server=(z=L.value.mcp_tools.find(H=>H.name===L.value.mcp_tool))==null?void 0:z.server})}const T=je();function I(B){const V=/\{\{\s*([a-zA-Z_][\w.]*)\s*\}\}/g,z=new Set,H=q=>{if(typeof q=="string"){let ee;for(;(ee=V.exec(q))!==null;)z.add(ee[1])}else Array.isArray(q)?q.forEach(H):q&&typeof q=="object"&&Object.values(q).forEach(H)};if(typeof B=="string")try{H(JSON.parse(B))}catch{H(B)}else H(B);return[...z]}function R(B){let V=L.value.mcp_servers;for(const z in B)V=V.replace(`{{${z}}}`,B[z]);E(V)}function U(){var V,z,H,q,ee,ue;L.value.mcp_server=(V=L.value.mcp_tools.find(ie=>ie.name===L.value.mcp_tool))==null?void 0:V.server;const B=(z=L.value.mcp_tools.find(ie=>ie.name===L.value.mcp_tool))==null?void 0:z.args_schema;L.value.tool_form_field=[];for(const ie in B==null?void 0:B.properties){const be=B==null?void 0:B.properties[ie].properties;if(be){L.value.params_nested=ie;for(const De in be){let Ne="TextInput";be[De].type==="string"?Ne="TextInput":be[De].type==="number"?Ne="NumberInput":be[De].type==="boolean"?Ne="SwitchInput":(be[De].type==="array"||be[De].type==="object")&&(Ne="JsonInput"),L.value.tool_form_field.push({field:De,label:{input_type:"TooltipLabel",label:De,attrs:{tooltip:be[De].description},props_info:{}},input_type:Ne,source:"referencing",required:((H=B.properties[ie].required)==null?void 0:H.indexOf(De))!==-1,props_info:{rules:[{required:((q=B.properties[ie].required)==null?void 0:q.indexOf(De))!==-1,message:yt("dynamicsForm.tip.requiredMessage"),trigger:"blur"}]}})}}else{L.value.params_nested="";let De="TextInput";B.properties[ie].type==="string"?De="TextInput":B.properties[ie].type==="number"?De="NumberInput":B.properties[ie].type==="boolean"?De="SwitchInput":(B.properties[ie].type==="array"||B.properties[ie].type==="object")&&(De="JsonInput"),L.value.tool_form_field.push({field:ie,label:{input_type:"TooltipLabel",label:ie,attrs:{tooltip:B.properties[ie].description},props_info:{}},input_type:De,source:"referencing",required:((ee=B.required)==null?void 0:ee.indexOf(ie))!==-1,props_info:{rules:[{required:((ue=B.required)==null?void 0:ue.indexOf(ie))!==-1,message:yt("dynamicsForm.tip.requiredMessage"),trigger:"blur"}]}})}}L.value.params_nested?L.value.tool_params={[L.value.params_nested]:{}}:L.value.tool_params={}}const L=$n({get:()=>(t.nodeModel.properties.node_data||me.set(t.nodeModel.properties,"node_data",g),t.nodeModel.properties.node_data),set:B=>{me.set(t.nodeModel.properties,"node_data",B)}}),D=je(),W=async()=>{if(v.value){const B=L.value.tool_form_field.filter(V=>V.required).map(V=>V.label.label);if(B.length>0){for(const V of B)if(L.valu
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VK(e,t){if(e){if(typeof e=="string")return yA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yA(e,t)}}function yA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function UK(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,s=!1,c,v;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){s=!0,v=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw v}}return a}}function WK(e){if(Array.isArray(e))return e}var GK=function(){return 1},dP=function(t,n,a,r){return zK(t,n,a||GK,r||function(s){return t.outEdges(s)})},zK=function(t,n,a,r){var s=new Map,c=new cP,v,f,_=function(x){var A=x.v!==v?x.v:x.w,S=s.get(A),E=a(x),T=f.distance+E;if(E<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+E);T<S.distance&&(S.distance=T,S.predecessor=v,c.decrease(A,T))};for(t.nodes().forEach(function(b){var x=b===n?0:Number.POSITIVE_INFINITY;s.set(b,{distance:x}),c.add(b,x)});c.size()>0&&(v=c.removeMin(),f=s.get(v),!(f&&f.distance===Number.POSITIVE_INFINITY));)r(v).forEach(_);var g={};return Array.from(s.entries()).forEach(function(b){var x=FK(b,2),A=x[0],S=x[1];return g[String(A)]=S,g}),g},HK=function(t,n,a){var r={};return t.nodes().forEach(function(s){return r[String(s)]=dP(t,s,n,a),r}),r},fP=function(t){var n=0,a=[],r=new Map,s=[];function c(v){var f,_={onStack:!0,lowlink:n,index:n};if(r.set(v,_),n+=1,a.push(v),(f=t.successors(v))===null||f===void 0||f.forEach(function(A){var S;if(r.has(A)){if(!((S=r.get(A))===null||S===void 0)&&S.onStack){var T=r.get(A);_.lowlink=Math.min(_.lowlink,T.index)}}else{c(A);var E=r.get(A);_.lowlink=Math.min(_.lowlink,E.lowlink)}}),_.lowlink===_.index){var g=[],b;do{b=a.pop();var x=r.get(b);x.onStack=!1,g.push(b)}while(v!==b);s.push(g)}}return t.nodes().forEach(function(v){r.has(v)||c(v)}),s},XK=function(t){return fP(t).filter(function(n){return n.length>1||n.length===1&&t.hasEdge(n[0],n[0])})};function Rw(e){"@babel/helpers - typeof";return Rw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rw(e)}function qK(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function YK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KK(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bm(e,t)}function ZK(e){var t=pP();return function(){var a=Vm(e),r;if(t){var s=Vm(this).constructor;r=Reflect.construct(a,arguments,s)}else r=a.apply(this,arguments);return JK(this,r)}}function JK(e,t){if(t&&(Rw(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QK(e)}function QK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jw(e){var t=typeof Map=="function"?new Map:void 0;return jw=function(a){if(a===null||!eZ(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(a))return t.get(a);t.set(a,r)}function r(){return xg(a,arguments,Vm(this).constructor)}return r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Bm(r,a)},jw(e)}function xg(e,t,n){return pP()?xg=Reflect.construct:xg=function(r,s,c){var v=[null];v.push.apply(v,s);var f=Function.bind.apply(r,v),_=new f;return c&
`,r);return}throw r}n(" updateInputGraph",()=>{IJ(e,a)})})},jJ=(e,t,n)=>{t(" removeSelfEdges",()=>{QJ(e)}),t(" acyclic",()=>{gA.run(e)}),t(" nestingGraph.run",()=>{xA.run(e)}),t(" rank",()=>{VZ(vP(e))}),t(" injectEdgeLabelProxies",()=>{zJ(e)}),t(" removeEmptyRanks",()=>{wZ(e)}),t(" nestingGraph.cleanup",()=>{xA.cleanup(e)}),t(" normalizeRanks",()=>{bZ(e)}),t(" assignRankMinMax",()=>{HJ(e)}),t(" removeEdgeLabelProxies",()=>{XJ(e)}),t(" normalize.run",()=>{wA.run(e)}),t(" parentDummyChains",()=>{HZ(e)}),t(" addBorderSegments",()=>{ZZ(e)}),n&&n.keepNodeOrder&&t(" initDataOrder",()=>{CJ(e,n.nodeOrder)}),t(" order",()=>{vJ(e,n==null?void 0:n.keepNodeOrder)}),t(" insertSelfEdges",()=>{eQ(e)}),t(" adjustCoordinateSystem",()=>{MA.adjust(e)}),t(" position",()=>{PJ(e)}),t(" positionSelfEdges",()=>{tQ(e)}),t(" removeBorderNodes",()=>{JJ(e)}),t(" normalize.undo",()=>{wA.undo(e)}),t(" fixupEdgeLabelCoords",()=>{KJ(e)}),t(" undoCoordinateSystem",()=>{MA.undo(e)}),t(" translateGraph",()=>{qJ(e)}),t(" assignNodeIntersects",()=>{YJ(e)}),t(" reversePoints",()=>{ZJ(e)}),t(" acyclic.undo",()=>{gA.undo(e)})},DJ=(e,t)=>{e.nodes().forEach(n=>{const a=e.node(n),r=t.node(n);r!==void 0?(a.fixorder=r._order,delete r._order):delete a.fixorder})},IJ=(e,t)=>{e.nodes().forEach(n=>{var a;const r=e.node(n);if(r){const s=t.node(n);r.x=s.x,r.y=s.y,r._order=s.order,r._rank=s.rank,!((a=t.children(n))===null||a===void 0)&&a.length&&(r.width=s.width,r.height=s.height)}}),e.edges().forEach(n=>{const a=e.edge(n),r=t.edge(n);a.points=r?r.points:[],r&&r.hasOwnProperty("x")&&(a.x=r.x,a.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height},LJ=["nodesep","edgesep","ranksep","marginx","marginy"],$J={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I1=["acyclicer","ranker","rankdir","align"],FJ=["width","height","layer","fixorder"],BJ={width:0,height:0},VJ=["minlen","weight","width","height","labeloffset"],UJ={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L1=["labelpos"],WJ=e=>{const t=new Nd({multigraph:!0,compound:!0}),n=F1(e.graph()),a={};return I1==null||I1.forEach(r=>{n[r]!==void 0&&(a[r]=n[r])}),t.setGraph(Object.assign({},$J,$1(n,LJ),a)),e.nodes().forEach(r=>{const s=F1(e.node(r)),c=Object.assign(Object.assign({},BJ),s),v=$1(c,FJ);t.setNode(r,v),t.setParent(r,e.parent(r))}),e.edges().forEach(r=>{const s=F1(e.edge(r)),c={};L1==null||L1.forEach(v=>{s[v]!==void 0&&(c[v]=s[v])}),t.setEdgeObj(r,Object.assign({},UJ,$1(s,VJ),c))}),t},GJ=e=>{const t=e.graph();t.ranksep||(t.ranksep=0),t.ranksep/=2,e.nodes().forEach(n=>{const a=e.node(n);isNaN(a.layer)||a.layer||(a.layer=0)}),e.edges().forEach(n=>{var a;const r=e.edge(n);r.minlen*=2,((a=r.labelpos)===null||a===void 0?void 0:a.toLowerCase())!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})},zJ=e=>{e.edges().forEach(t=>{const n=e.edge(t);if(n.width&&n.height){const a=e.node(t.v),r=e.node(t.w),s={e:t,rank:(r.rank-a.rank)/2+a.rank};Gv(e,"edge-proxy",s,"_ep")}})},HJ=e=>{let t=0;e.nodes().forEach(n=>{var a,r;const s=e.node(n);s.borderTop&&(s.minRank=(a=e.node(s.borderTop))===null||a===void 0?void 0:a.rank,s.maxRank=(r=e.node(s.borderBottom))===null||r===void 0?void 0:r.rank,t=Math.max(t,s.maxRank||-1/0))}),e.graph().maxRank=t},XJ=e=>{e.nodes().forEach(t=>{const n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})},qJ=e=>{let t,n=0,a,r=0;const s=e.graph(),c=s.marginx||0,v=s.marginy||0,f=_=>{if(!_)return;const g=_.x,b=_.y,x=_.width,A=_.height;!isNaN(g)&&!isNaN(x)&&(t===void 0&&(t=g-x/2),t=Math.min(t,g-x/2),n=Math.max(n,g+x/2)),!isNaN(b)&&!isNaN(A)&&(a===void 0&&(a=b-A/2),a=Math.min(a,b-A/2),r=Math.max(r,b+A/2))};e.nodes().forEach(_=>{f(e.node(_))}),e.edges().forEach(_=>{const g=e.edge(_);g!=null&&g.hasOwnProperty("x")&&f(g)}),t-=c,a-=v,e.nodes().forEach(_=>{const g=e.node(_);g&&(g.x-=t,g.y-=a)}),e.edges().forEach(_=>{var g;const b=e.edge(_);(g=b.points)===null||g===void 0||g.forEach(x=>{x.x-=t,x.y-=a}),b.hasOwnProperty("x")&&(b.x-=t),b
`;function s(G){return typeof atob<"u"?atob(G):"base64:"+G}function c(G){var se=new Error("(regl) "+G);throw console.error(se),se}function v(G,se){G||c(se)}function f(G){return G?": "+G:""}function _(G,se,Oe){G in se||c("unknown parameter ("+G+")"+f(Oe)+". possible values: "+Object.keys(se).join())}function g(G,se){n(G)||c("invalid parameter type"+f(se)+". must be a typed array")}function b(G,se){switch(se){case"number":return typeof G=="number";case"object":return typeof G=="object";case"string":return typeof G=="string";case"boolean":return typeof G=="boolean";case"function":return typeof G=="function";case"undefined":return typeof G>"u";case"symbol":return typeof G=="symbol"}}function x(G,se,Oe){b(G,se)||c("invalid parameter type"+f(Oe)+". expected "+se+", got "+typeof G)}function A(G,se){G>=0&&(G|0)===G||c("invalid parameter type, ("+G+")"+f(se)+". must be a nonnegative integer")}function S(G,se,Oe){se.indexOf(G)<0&&c("invalid value"+f(Oe)+". must be one of: "+se)}var E=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function T(G){Object.keys(G).forEach(function(se){E.indexOf(se)<0&&c('invalid regl constructor argument "'+se+'". must be one of '+E)})}function I(G,se){for(G=G+"";G.length<se;)G=" "+G;return G}function R(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function U(G,se){this.number=G,this.line=se,this.errors=[]}function L(G,se,Oe){this.file=G,this.line=se,this.message=Oe}function D(){var G=new Error,se=(G.stack||G).toString(),Oe=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(se);if(Oe)return Oe[1];var st=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(se);return st?st[1]:"unknown"}function W(){var G=new Error,se=(G.stack||G).toString(),Oe=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(se);if(Oe)return Oe[1];var st=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(se);return st?st[1]:"unknown"}function Y(G,se){var Oe=G.split(`
`),st=1,gt=0,ot={unknown:new R,0:new R};ot.unknown.name=ot[0].name=se||D(),ot.unknown.lines.push(new U(0,""));for(var mt=0;mt<Oe.length;++mt){var Rt=Oe[mt],Bt=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(Rt);if(Bt)switch(Bt[1]){case"line":var jt=/(\d+)(\s+\d+)?/.exec(Bt[2]);jt&&(st=jt[1]|0,jt[2]&&(gt=jt[2]|0,gt in ot||(ot[gt]=new R)));break;case"define":var ht=/SHADER_NAME(_B64)?\s+(.*)$/.exec(Bt[2]);ht&&(ot[gt].name=ht[1]?s(ht[2]):ht[2]);break}ot[gt].lines.push(new U(st++,Rt))}return Object.keys(ot).forEach(function(Zt){var Gt=ot[Zt];Gt.lines.forEach(function(Dt){Gt.index[Dt.number]=Dt})}),ot}function B(G){var se=[];return G.split(`
`).forEach(function(Oe){if(!(Oe.length<5)){var st=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(Oe);st?se.push(new L(st[1]|0,st[2]|0,st[3].trim())):Oe.length>0&&se.push(new L("unknown",0,Oe))}}),se}function V(G,se){se.forEach(function(Oe){var st=G[Oe.file];if(st){var gt=st.index[Oe.line];if(gt){gt.errors.push(Oe),st.hasErrors=!0;return}}G.unknown.hasErrors=!0,G.unknown.lines[0].errors.push(Oe)})}function z(G,se,Oe,st,gt){if(!G.getShaderParameter(se,G.COMPILE_STATUS)){var ot=G.getShaderInfoLog(se),mt=st===G.FRAGMENT_SHADER?"fragment":"vertex";De(Oe,"string",mt+" shader source must be a string",gt);var Rt=Y(Oe,gt),Bt=B(ot);V(Rt,Bt),Object.keys(Rt).forEach(function(jt){var ht=Rt[jt];if(!ht.hasErrors)return;var Zt=[""],Gt=[""];function Dt(At,Ze){Zt.push(At),Gt.push(Ze||"")}Dt("file number "+jt+": "+ht.name+`
`,"color:red;text-decoration:underline;font-weight:bold"),ht.lines.forEach(function(At){if(At.errors.length>0){Dt(I(At.number,4)+"| ","background-color:yellow; font-weight:bold"),Dt(At.line+r,"color:red; background-color:yellow; font-weight:bold");var Ze=0;At.errors.forEach(function(pt){var $t=pt.message,nn=/^\s*'(.*)'\s*:\s*(.*)$/.exec($t);if(nn){var kt=nn[1];switch($t=nn[2],kt){case"assign":kt="=";break}Ze=Math.max(At.line.indexOf(kt,Ze),0)}else Ze=0;Dt(I("| ",6)),Dt(I("^^^",Ze+3)+r,"font-weight:bold"),Dt(I("| ",6)),Dt($t+r,"font-weight:bold")}),Dt(I("| ",6)+r)}else Dt(I(At.number,4)+"| "),Dt(At.line+r,"color:red")}),typeof document<"u"&&!window.chrome?(Gt[0]=Zt.join("%c"),console.log.apply(console,Gt)):console.log(Zt.join(""))}),v.raise("Error compiling "+mt+" shader, "+Rt[0].name)}}function H(G,se,Oe,st,gt){if(!G.getProgramParameter(se,G.LINK_STATUS)){var ot=G.getProgramInfoLog(se),mt=Y(Oe,gt),Rt=Y(st,gt),Bt='Error linking program with vertex shader, "'+Rt[0].name+'", and fragment shader "'+mt[0].name+'"';typeof document<"u"?console.log("%c"+Bt+r+"%c"+ot,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(Bt+r+ot),v.raise(Bt)}}function q(G){G._commandRef=D()}function ee(G,se,Oe,st){q(G);function gt(Bt){return Bt?st.id(Bt):0}G._fragId=gt(G.static.frag),G._vertId=gt(G.static.vert);function ot(Bt,jt){Object.keys(jt).forEach(function(ht){Bt[st.id(ht)]=!0})}var mt=G._uniformSet={};ot(mt,se.static),ot(mt,se.dynamic);var Rt=G._attributeSet={};ot(Rt,Oe.static),ot(Rt,Oe.dynamic),G._hasCount="count"in G.static||"count"in G.dynamic||"elements"in G.static||"elements"in G.dynamic}function ue(G,se){var Oe=W();c(G+" in command "+(se||D())+(Oe==="unknown"?"":" called from "+Oe))}function ie(G,se,Oe){G||ue(se,Oe||D())}function be(G,se,Oe,st){G in se||ue("unknown parameter ("+G+")"+f(Oe)+". possible values: "+Object.keys(se).join(),st||D())}function De(G,se,Oe,st){b(G,se)||ue("invalid parameter type"+f(Oe)+". expected "+se+", got "+typeof G,st||D())}function Ne(G){G()}function Ae(G,se,Oe){G.texture?S(G.texture._texture.internalformat,se,"unsupported texture format for attachment"):S(G.renderbuffer._renderbuffer.format,Oe,"unsupported renderbuffer format for attachment")}var Te=33071,rt=9728,tt=9984,Be=9985,dt=9986,St=9987,He=5120,Qt=5121,Fe=5122,we=5123,Re=5124,Ye=5125,Ot=5126,bt=32819,Ft=32820,en=33635,on=34042,Wt=36193,nt={};nt[He]=nt[Qt]=1,nt[Fe]=nt[we]=nt[Wt]=nt[en]=nt[bt]=nt[Ft]=2,nt[Re]=nt[Ye]=nt[Ot]=nt[on]=4;function sn(G,se){return G===Ft||G===bt||G===en?2:G===on?4:nt[G]*se}function We(G){return!(G&G-1)&&!!G}function yn(G,se,Oe){var st,gt=se.width,ot=se.height,mt=se.channels;v(gt>0&&gt<=Oe.maxTextureSize&&ot>0&&ot<=Oe.maxTextureSize,"invalid texture shape"),(G.wrapS!==Te||G.wrapT!==Te)&&v(We(gt)&&We(ot),"incompatible wrap mode for texture, both width and height must be power of 2"),se.mipmask===1?gt!==1&&ot!==1&&v(G.minFilter!==tt&&G.minFilter!==dt&&G.minFilter!==Be&&G.minFilter!==St,"min filter requires mipmap"):(v(We(gt)&&We(ot),"texture must be a square power of 2 to support mipmapping"),v(se.mipmask===(gt<<1)-1,"missing or incomplete mipmap data")),se.type===Ot&&(Oe.extensions.indexOf("oes_texture_float_linear")<0&&v(G.minFilter===rt&&G.magFilter===rt,"filter not supported, must enable oes_texture_float_linear"),v(!G.genMipmaps,"mipmap generation not supported with float textures"));var Rt=se.images;for(st=0;st<16;++st)if(Rt[st]){var Bt=gt>>st,jt=ot>>st;v(se.mipmask&1<<st,"missing mipmap data");var ht=Rt[st];if(v(ht.width===Bt&&ht.height===jt,"invalid shape for mip images"),v(ht.format===se.format&&ht.internalformat===se.internalformat&&ht.type===se.type,"incompatible type for mip image"),!ht.compressed)if(ht.data){var Zt=Math.ceil(sn(ht.type,mt)*Bt/ht.unpackAlignment)*ht.unpackAlignment;v(ht.data.byteLength===Zt*jt,"invalid data for image, buffer size is inconsistent with image format")}else ht.element||ht.copy}else G.genMipmaps||v((se.mipmask&1<<st)===0,"extra mipmap data");se.compressed&&v(!G.genMipmaps,"mipmap generation for compressed images not supported")}function Kn(G,se,Oe,st){var gt
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Dt=Function.apply(null,se.concat(Gt));return Dt.apply(null,Oe)}return{global:Rt,link:st,block:gt,proc:jt,scope:ot,cond:mt,compile:ht}}var Xl="xyzw".split(""),Zs=5121,Js=1,Qs=2,ff=0,ql=1,eu=2,pf=3,nl=4,zc=5,Hc=6,Bu="dither",Vu="blend.enable",Uu="blend.color",hf="blend.equation",Wu="blend.func",Ep="depth.enable",vf="depth.func",Nh="depth.range",Op="depth.mask",rl="colorMask",xp="cull.enable",Sp="cull.face",Ap="frontFace",Gu="lineWidth",xl="polygonOffset.enable",Xc="polygonOffset.offset",mf="sample.alpha",yf="sample.enable",gs="sample.coverage",_s="stencil.enable",rr="stencil.mask",zu="stencil.func",qc="stencil.opFront",ol="stencil.opBack",di="scissor.enable",tu="scissor.box",Do="viewport",bs="profile",ta="framebuffer",Yc="vert",Ii="frag",Ho="elements",Sl="primitive",Al="count",gf="offset",Ct="instances",nu="vao",Kc="Width",Zc="Height",ws=ta+Kc,ru=ta+Zc,_f=Do+Kc,Mp=Do+Zc,ou="drawingBuffer",Jc=ou+Kc,bf=ou+Zc,kp=[Wu,hf,zu,qc,ol,gs,Do,tu,Xc],Ml=34962,Tp=34963,il=35632,Es=35633,wf=3553,Ph=34067,Ch=2884,Rh=3042,Np=3024,Ef=2960,Qc=2929,jh=3089,al=32823,Os=32926,em=32928,xo=5126,ed=35664,iu=35665,td=35666,Hu=5124,nd=35667,rd=35668,od=35669,au=35670,Yl=35671,gi=35672,Of=35673,id=35674,lu=35675,Xu=35676,Si=35678,Po=35680,ad=4,Hi=1028,Wn=1029,xf=2304,ld=2305,Sf=32775,Pp=32776,Dh=519,xs=7680,Ih=0,su=1,Lh=32774,Cp=513,sd=36160,$h=36064,La={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Kl=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Ss={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},zn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Rp={frag:il,vert:Es},qu={cw:xf,ccw:ld};function Zl(G){return Array.isArray(G)||n(G)||$i(G)}function ud(G){return G.sort(function(se,Oe){return se===Do?-1:Oe===Do?1:se<Oe?-1:1})}function Xi(G,se,Oe,st){this.thisDep=G,this.contextDep=se,this.propDep=Oe,this.append=st}function ll(G){return G&&!(G.thisDep||G.contextDep||G.propDep)}function Io(G){return new Xi(!1,!1,!1,G)}function ua(G,se){var Oe=G.type;if(Oe===ff){var st=G.data.length;return new Xi(!0,st>=1,st>=2,se)}else if(Oe===nl){var gt=G.data;return new Xi(gt.thisDep,gt.contextDep,gt.propDep,se)}else{if(Oe===zc)return new Xi(!1,!1,!1,se);if(Oe===Hc){for(var ot=!1,mt=!1,Rt=!1,Bt=0;Bt<G.data.length;++Bt){var jt=G.data[Bt];if(jt.type===ql)Rt=!0;else if(jt.type===eu)mt=!0;else if(jt.type===pf)ot=!0;else if(jt.type===ff){ot=!0;var ht=jt.data;ht>=1&&(mt=!0),ht>=2&&(Rt=!0)}else jt.type===nl&&(ot=ot||jt.data.thisDep,mt=mt||jt.data.contextDep,Rt=Rt||jt.data.propDep)}return new Xi(ot,mt,Rt,se)}else return new Xi(Oe===pf,Oe===eu,Oe===ql,se)}}var $a=new Xi(!1,!1,!1,function(){});function tm(G,se,Oe,st,gt,ot,mt,Rt,Bt,jt,ht,Zt,Gt,Dt,At){var Ze=jt.Record,pt={add:32774,subtract:32778,"reverse subtract":32779};Oe.ext_blend_minmax&&(pt.min=Sf,pt.max=Pp);var $t=Oe.angle_instanced_arrays,nn=Oe.webgl_draw_buffers,kt={dirty:!0,profile:At.profile},ln={},Nt=[],Yt={},Tt={};function Jt(he){return he.replace(".","_")}function Cn(he,oe,Pe){var Ge=Jt(he);Nt.push(he),ln[Ge]=kt[Ge]=!!Pe,Yt[Ge]=oe}function Hn(he,oe,Pe){var Ge=Jt(he);Nt.push(he),Array.isArray(Pe)?(kt[Ge]=Pe.slice(),ln[Ge]=Pe.slice()):kt[Ge]=ln[Ge]=Pe,Tt[Ge]=oe}Cn(Bu,Np),Cn(Vu,Rh),Hn(Uu,"blendColor",[0,0,0,0]),Hn(hf,"blendEquationSeparate",[Lh,Lh]),Hn(Wu,"blendFuncSeparate",[su,Ih,su,Ih]),Cn(Ep,Qc,!0),Hn(vf,"depthFunc",Cp),Hn(Nh,"depthRange",[0,1]),Hn(Op,"