UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

4 lines 443 kB
import{a as v}from"./chunk-GTKDMUJJ.mjs";function Ye(t){"@babel/helpers - typeof";return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(t)}v(Ye,"_typeof");function ur(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}v(ur,"_classCallCheck");function Zi(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}v(Zi,"_defineProperties");function lr(t,e,r){return e&&Zi(t.prototype,e),r&&Zi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}v(lr,"_createClass");function po(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}v(po,"_defineProperty$1");function We(t,e){return bl(t)||xl(t,e)||xi(t,e)||Tl()}v(We,"_slicedToArray");function yo(t){return ml(t)||wl(t)||xi(t)||El()}v(yo,"_toConsumableArray");function ml(t){if(Array.isArray(t))return ni(t)}v(ml,"_arrayWithoutHoles");function bl(t){if(Array.isArray(t))return t}v(bl,"_arrayWithHoles");function wl(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}v(wl,"_iterableToArray");function xl(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a=[],n=!0,i=!1,s,o;try{for(r=r.call(t);!(n=(s=r.next()).done)&&(a.push(s.value),!(e&&a.length===e));n=!0);}catch(l){i=!0,o=l}finally{try{!n&&r.return!=null&&r.return()}finally{if(i)throw o}}return a}}v(xl,"_iterableToArrayLimit");function xi(t,e){if(t){if(typeof t=="string")return ni(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ni(t,e)}}v(xi,"_unsupportedIterableToArray");function ni(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}v(ni,"_arrayLikeToArray");function El(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}v(El,"_nonIterableSpread");function Tl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}v(Tl,"_nonIterableRest");function xt(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=xi(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var a=0,n=v(function(){},"F");return{s:n,n:v(function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:v(function(l){throw l},"e"),f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,o;return{s:v(function(){r=r.call(t)},"s"),n:v(function(){var l=r.next();return i=l.done,l},"n"),e:v(function(l){s=!0,o=l},"e"),f:v(function(){try{!i&&r.return!=null&&r.return()}finally{if(s)throw o}},"f")}}v(xt,"_createForOfIteratorHelper");var Ue=typeof window>"u"?null:window,Qi=Ue?Ue.navigator:null;Ue&&Ue.document;var Cl=Ye(""),mo=Ye({}),Sl=Ye(function(){}),Dl=typeof HTMLElement>"u"?"undefined":Ye(HTMLElement),Ba=v(function(e){return e&&e.instanceString&&Ke(e.instanceString)?e.instanceString():null},"instanceStr"),ce=v(function(e){return e!=null&&Ye(e)==Cl},"string"),Ke=v(function(e){return e!=null&&Ye(e)===Sl},"fn"),Oe=v(function(e){return!Et(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},"array"),Pe=v(function(e){return e!=null&&Ye(e)===mo&&!Oe(e)&&e.constructor===Object},"plainObject"),kl=v(function(e){return e!=null&&Ye(e)===mo},"object"),ae=v(function(e){return e!=null&&Ye(e)===Ye(1)&&!isNaN(e)},"number"),Pl=v(function(e){return ae(e)&&Math.floor(e)===e},"integer"),fn=v(function(e){if(Dl!=="undefined")return e!=null&&e instanceof HTMLElement},"htmlElement"),Et=v(function(e){return Aa(e)||bo(e)},"elementOrCollection"),Aa=v(function(e){return Ba(e)==="collection"&&e._private.single},"element"),bo=v(function(e){return Ba(e)==="collection"&&!e._private.single},"collection"),Ei=v(function(e){return Ba(e)==="core"},"core"),wo=v(function(e){return Ba(e)==="stylesheet"},"stylesheet"),Bl=v(function(e){return Ba(e)==="event"},"event"),rr=v(function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},"emptyString"),Al=v(function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},"domElement"),Rl=v(function(e){return Pe(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},"boundingBox"),Ml=v(function(e){return kl(e)&&Ke(e.then)},"promise"),Ll=v(function(){return Qi&&Qi.userAgent.match(/msie|trident|edge/i)},"ms"),ma=v(function(e,r){r||(r=v(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join("$")},"keyFn"));var a=v(function n(){var i=this,s=arguments,o,l=r.apply(i,s),u=n.cache;return(o=u[l])||(o=u[l]=e.apply(i,s)),o},"memoizedFn");return a.cache={},a},"memoize"),Ti=ma(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Tn=ma(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),xo=ma(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Ji=v(function(e){return rr(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),Xe="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Il="rgb[a]?\\(("+Xe+"[%]?)\\s*,\\s*("+Xe+"[%]?)\\s*,\\s*("+Xe+"[%]?)(?:\\s*,\\s*("+Xe+"))?\\)",Ol="rgb[a]?\\((?:"+Xe+"[%]?)\\s*,\\s*(?:"+Xe+"[%]?)\\s*,\\s*(?:"+Xe+"[%]?)(?:\\s*,\\s*(?:"+Xe+"))?\\)",Nl="hsl[a]?\\(("+Xe+")\\s*,\\s*("+Xe+"[%])\\s*,\\s*("+Xe+"[%])(?:\\s*,\\s*("+Xe+"))?\\)",zl="hsl[a]?\\((?:"+Xe+")\\s*,\\s*(?:"+Xe+"[%])\\s*,\\s*(?:"+Xe+"[%])(?:\\s*,\\s*(?:"+Xe+"))?\\)",Fl="\\#[0-9a-fA-F]{3}",Vl="\\#[0-9a-fA-F]{6}",Eo=v(function(e,r){return e<r?-1:e>r?1:0},"ascending"),ql=v(function(e,r){return-1*Eo(e,r)},"descending"),he=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var a=e[r];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var s=n[i];t[s]=a[s]}}return t},$l=v(function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,a,n,i,s=16;return r?(a=parseInt(e[1]+e[1],s),n=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(a=parseInt(e[1]+e[2],s),n=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[a,n,i]}},"hex2tuple"),Kl=v(function(e){var r,a,n,i,s,o,l,u;function f(h,m,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?h+(m-h)*6*y:y<1/2?m:y<2/3?h+(m-h)*(2/3-y)*6:h}v(f,"hue2rgb");var c=new RegExp("^"+Nl+"$").exec(e);if(c){if(a=parseInt(c[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(c[2]),n<0||n>100||(n=n/100,i=parseFloat(c[3]),i<0||i>100)||(i=i/100,s=c[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var d=i<.5?i*(1+n):i+n-i*n,g=2*i-d;o=Math.round(255*f(g,d,a+1/3)),l=Math.round(255*f(g,d,a)),u=Math.round(255*f(g,d,a-1/3))}r=[o,l,u,s]}return r},"hsl2tuple"),Gl=v(function(e){var r,a=new RegExp("^"+Il+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},"rgb2tuple"),Wl=v(function(e){return Hl[e.toLowerCase()]},"colorname2tuple"),To=v(function(e){return(Oe(e)?e:null)||Wl(e)||$l(e)||Gl(e)||Kl(e)},"color2tuple"),Hl={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Co=v(function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var s=a[i];if(Pe(s))throw Error("Tried to set map with object key");i<a.length-1?(r[s]==null&&(r[s]={}),r=r[s]):r[s]=e.value}},"setMap"),So=v(function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i<n;i++){var s=a[i];if(Pe(s))throw Error("Tried to get map with object key");if(r=r[s],r==null)return r}return r},"getMap");function Ul(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}v(Ul,"isObject");var br=Ul,la=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xl(t,e){return e={exports:{}},t(e,e.exports),e.exports}v(Xl,"createCommonjsModule");var Yl=typeof la=="object"&&la&&la.Object===Object&&la,_l=Yl,Zl=typeof self=="object"&&self&&self.Object===Object&&self,Ql=_l||Zl||Function("return this")(),Cn=Ql,Jl=v(function(){return Cn.Date.now()},"now"),Kn=Jl,jl=/\s/;function ev(t){for(var e=t.length;e--&&jl.test(t.charAt(e)););return e}v(ev,"trimmedEndIndex");var tv=ev,rv=/^\s+/;function av(t){return t&&t.slice(0,tv(t)+1).replace(rv,"")}v(av,"baseTrim");var nv=av,iv=Cn.Symbol,Vr=iv,Do=Object.prototype,sv=Do.hasOwnProperty,ov=Do.toString,ra=Vr?Vr.toStringTag:void 0;function uv(t){var e=sv.call(t,ra),r=t[ra];try{t[ra]=void 0;var a=!0}catch{}var n=ov.call(t);return a&&(e?t[ra]=r:delete t[ra]),n}v(uv,"getRawTag");var lv=uv,vv=Object.prototype,fv=vv.toString;function cv(t){return fv.call(t)}v(cv,"objectToString");var dv=cv,hv="[object Null]",gv="[object Undefined]",ji=Vr?Vr.toStringTag:void 0;function pv(t){return t==null?t===void 0?gv:hv:ji&&ji in Object(t)?lv(t):dv(t)}v(pv,"baseGetTag");var ko=pv;function yv(t){return t!=null&&typeof t=="object"}v(yv,"isObjectLike");var mv=yv,bv="[object Symbol]";function wv(t){return typeof t=="symbol"||mv(t)&&ko(t)==bv}v(wv,"isSymbol");var Ra=wv,es=NaN,xv=/^[-+]0x[0-9a-f]+$/i,Ev=/^0b[01]+$/i,Tv=/^0o[0-7]+$/i,Cv=parseInt;function Sv(t){if(typeof t=="number")return t;if(Ra(t))return es;if(br(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=br(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=nv(t);var r=Ev.test(t);return r||Tv.test(t)?Cv(t.slice(2),r?2:8):xv.test(t)?es:+t}v(Sv,"toNumber");var ts=Sv,Dv="Expected a function",kv=Math.max,Pv=Math.min;function Bv(t,e,r){var a,n,i,s,o,l,u=0,f=!1,c=!1,d=!0;if(typeof t!="function")throw new TypeError(Dv);e=ts(e)||0,br(r)&&(f=!!r.leading,c="maxWait"in r,i=c?kv(ts(r.maxWait)||0,e):i,d="trailing"in r?!!r.trailing:d);function g(T){var E=a,D=n;return a=n=void 0,u=T,s=t.apply(D,E),s}v(g,"invokeFunc");function h(T){return u=T,o=setTimeout(p,e),f?g(T):s}v(h,"leadingEdge");function m(T){var E=T-l,D=T-u,C=e-E;return c?Pv(C,i-D):C}v(m,"remainingWait");function y(T){var E=T-l,D=T-u;return l===void 0||E>=e||E<0||c&&D>=i}v(y,"shouldInvoke");function p(){var T=Kn();if(y(T))return b(T);o=setTimeout(p,m(T))}v(p,"timerExpired");function b(T){return o=void 0,d&&a?g(T):(a=n=void 0,s)}v(b,"trailingEdge");function w(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}v(w,"cancel");function x(){return o===void 0?s:b(Kn())}v(x,"flush");function S(){var T=Kn(),E=y(T);if(a=arguments,n=this,l=T,E){if(o===void 0)return h(l);if(c)return clearTimeout(o),o=setTimeout(p,e),g(l)}return o===void 0&&(o=setTimeout(p,e)),s}return v(S,"debounced"),S.cancel=w,S.flush=x,S}v(Bv,"debounce");var Ma=Bv,Gn=Ue?Ue.performance:null,Po=Gn&&Gn.now?function(){return Gn.now()}:function(){return Date.now()},Av=function(){if(Ue){if(Ue.requestAnimationFrame)return function(t){Ue.requestAnimationFrame(t)};if(Ue.mozRequestAnimationFrame)return function(t){Ue.mozRequestAnimationFrame(t)};if(Ue.webkitRequestAnimationFrame)return function(t){Ue.webkitRequestAnimationFrame(t)};if(Ue.msRequestAnimationFrame)return function(t){Ue.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(Po())},1e3/60)}}(),cn=v(function(e){return Av(e)},"requestAnimationFrame"),Ht=Po,Mr=9261,Bo=65599,va=5381,Ao=v(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mr,a=r,n;n=e.next(),!n.done;)a=a*Bo+n.value|0;return a},"hashIterableInts"),ba=v(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mr;return r*Bo+e|0},"hashInt"),wa=v(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:va;return(r<<5)+r+e|0},"hashIntAlt"),Rv=v(function(e,r){return e*2097152+r},"combineHashes"),Zt=v(function(e){return e[0]*2097152+e[1]},"combineHashesArray"),$a=v(function(e,r){return[ba(e[0],r[0]),wa(e[1],r[1])]},"hashArrays"),Mv=v(function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:v(function(){return n<i?a.value=e[n++]:a.done=!0,a},"next")};return Ao(s,r)},"hashIntsArray"),ar=v(function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:v(function(){return n<i?a.value=e.charCodeAt(n++):a.done=!0,a},"next")};return Ao(s,r)},"hashString"),Ro=v(function(){return Lv(arguments)},"hashStrings"),Lv=v(function(e){for(var r,a=0;a<e.length;a++){var n=e[a];a===0?r=ar(n):r=ar(n,r)}return r},"hashStringsArray"),rs=!0,Iv=console.warn!=null,Ov=console.trace!=null,Ci=Number.MAX_SAFE_INTEGER||9007199254740991,Mo=v(function(){return!0},"trueify"),dn=v(function(){return!1},"falsify"),as=v(function(){return 0},"zeroify"),Si=v(function(){},"noop"),$e=v(function(e){throw new Error(e)},"error"),Lo=v(function(e){if(e!==void 0)rs=!!e;else return rs},"warnings"),Re=v(function(e){Lo()&&(Iv?console.warn(e):(console.log(e),Ov&&console.trace()))},"warn"),Nv=v(function(e){return he({},e)},"clone"),zt=v(function(e){return e==null?e:Oe(e)?e.slice():Pe(e)?Nv(e):e},"copy"),zv=v(function(e){return e.slice()},"copyArray"),Io=v(function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},"uuid"),Fv={},Oo=v(function(){return Fv},"staticEmptyObject"),et=v(function(e){var r=Object.keys(e);return function(a){for(var n={},i=0;i<r.length;i++){var s=r[i],o=a?.[s];n[s]=o===void 0?e[s]:o}return n}},"defaults"),nr=v(function(e,r,a){for(var n=e.length-1;n>=0&&!(e[n]===r&&(e.splice(n,1),a));n--);},"removeFromArray"),Di=v(function(e){e.splice(0,e.length)},"clearArray"),Vv=v(function(e,r){for(var a=0;a<r.length;a++){var n=r[a];e.push(n)}},"push"),At=v(function(e,r,a){return a&&(r=xo(a,r)),e[r]},"getPrefixedProperty"),Jt=v(function(e,r,a,n){a&&(r=xo(a,r)),e[r]=n},"setPrefixedProperty"),qv=function(){function t(){ur(this,t),this._obj={}}return v(t,"ObjectMap"),lr(t,[{key:"set",value:v(function(r,a){return this._obj[r]=a,this},"set")},{key:"delete",value:v(function(r){return this._obj[r]=void 0,this},"_delete")},{key:"clear",value:v(function(){this._obj={}},"clear")},{key:"has",value:v(function(r){return this._obj[r]!==void 0},"has")},{key:"get",value:v(function(r){return this._obj[r]},"get")}]),t}(),Ft=typeof Map<"u"?Map:qv,$v="undefined",Kv=function(){function t(e){if(ur(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var a=0;a<r.length;a++)this.add(r[a])}}return v(t,"ObjectSet"),lr(t,[{key:"instanceString",value:v(function(){return"set"},"instanceString")},{key:"add",value:v(function(r){var a=this._obj;a[r]!==1&&(a[r]=1,this.size++)},"add")},{key:"delete",value:v(function(r){var a=this._obj;a[r]===1&&(a[r]=0,this.size--)},"_delete")},{key:"clear",value:v(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:v(function(r){return this._obj[r]===1},"has")},{key:"toArray",value:v(function(){var r=this;return Object.keys(this._obj).filter(function(a){return r.has(a)})},"toArray")},{key:"forEach",value:v(function(r,a){return this.toArray().forEach(r,a)},"forEach")}]),t}(),Wr=(typeof Set>"u"?"undefined":Ye(Set))!==$v?Set:Kv,Sn=v(function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!Ei(e)){$e("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){$e("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new Wr,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Oe(r.classes)?u=r.classes:ce(r.classes)&&(u=r.classes.split(/\s+/));for(var f=0,c=u.length;f<c;f++){var d=u[f];!d||d===""||i.classes.add(d)}this.createEmitter();var g=r.style||r.css;g&&(Re("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(g)),(a===void 0||a)&&this.restore()},"Element"),ns=v(function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},v(function(a,n,i){var s;Pe(a)&&!Et(a)&&(s=a,a=s.roots||s.root,n=s.visit,i=s.directed),i=arguments.length===2&&!Ke(n)?n:i,n=Ke(n)?n:function(){};for(var o=this._private.cy,l=a=ce(a)?this.filter(a):a,u=[],f=[],c={},d={},g={},h=0,m,y=this.byGroup(),p=y.nodes,b=y.edges,w=0;w<l.length;w++){var x=l[w],S=x.id();x.isNode()&&(u.unshift(x),e.bfs&&(g[S]=!0,f.push(x)),d[S]=0)}for(var T=v(function(){var M=e.bfs?u.shift():u.pop(),R=M.id();if(e.dfs){if(g[R])return"continue";g[R]=!0,f.push(M)}var I=d[R],L=c[R],O=L!=null?L.source():null,N=L!=null?L.target():null,$=L==null?void 0:M.same(O)?N[0]:O[0],H=void 0;if(H=n(M,L,$,h++,I),H===!0)return m=M,"break";if(H===!1)return"break";for(var q=M.connectedEdges().filter(function(Q){return(!i||Q.source().same(M))&&b.has(Q)}),K=0;K<q.length;K++){var Y=q[K],Z=Y.connectedNodes().filter(function(Q){return!Q.same(M)&&p.has(Q)}),J=Z.id();Z.length!==0&&!g[J]&&(Z=Z[0],u.push(Z),e.bfs&&(g[J]=!0,f.push(Z)),c[J]=Y,d[J]=d[R]+1)}},"_loop");u.length!==0;){var E=T();if(E!=="continue"&&E==="break")break}for(var D=o.collection(),C=0;C<f.length;C++){var B=f[C],A=c[B.id()];A!=null&&D.push(A),D.push(B)}return{path:o.collection(D),found:o.collection(m)}},"searchFn")},"defineSearch"),xa={breadthFirstSearch:ns({bfs:!0}),depthFirstSearch:ns({dfs:!0})};xa.bfs=xa.breadthFirstSearch;xa.dfs=xa.depthFirstSearch;var Gv=Xl(function(t,e){(function(){var r,a,n,i,s,o,l,u,f,c,d,g,h,m,y;n=Math.floor,c=Math.min,a=v(function(p,b){return p<b?-1:p>b?1:0},"defaultCmp"),f=v(function(p,b,w,x,S){var T;if(w==null&&(w=0),S==null&&(S=a),w<0)throw new Error("lo must be non-negative");for(x==null&&(x=p.length);w<x;)T=n((w+x)/2),S(b,p[T])<0?x=T:w=T+1;return[].splice.apply(p,[w,w-w].concat(b)),b},"insort"),o=v(function(p,b,w){return w==null&&(w=a),p.push(b),m(p,0,p.length-1,w)},"heappush"),s=v(function(p,b){var w,x;return b==null&&(b=a),w=p.pop(),p.length?(x=p[0],p[0]=w,y(p,0,b)):x=w,x},"heappop"),u=v(function(p,b,w){var x;return w==null&&(w=a),x=p[0],p[0]=b,y(p,0,w),x},"heapreplace"),l=v(function(p,b,w){var x;return w==null&&(w=a),p.length&&w(p[0],b)<0&&(x=[p[0],b],b=x[0],p[0]=x[1],y(p,0,w)),b},"heappushpop"),i=v(function(p,b){var w,x,S,T,E,D;for(b==null&&(b=a),T=function(){D=[];for(var C=0,B=n(p.length/2);0<=B?C<B:C>B;0<=B?C++:C--)D.push(C);return D}.apply(this).reverse(),E=[],x=0,S=T.length;x<S;x++)w=T[x],E.push(y(p,w,b));return E},"heapify"),h=v(function(p,b,w){var x;if(w==null&&(w=a),x=p.indexOf(b),x!==-1)return m(p,0,x,w),y(p,x,w)},"updateItem"),d=v(function(p,b,w){var x,S,T,E,D;if(w==null&&(w=a),S=p.slice(0,b),!S.length)return S;for(i(S,w),D=p.slice(b),T=0,E=D.length;T<E;T++)x=D[T],l(S,x,w);return S.sort(w).reverse()},"nlargest"),g=v(function(p,b,w){var x,S,T,E,D,C,B,A,P;if(w==null&&(w=a),b*10<=p.length){if(T=p.slice(0,b).sort(w),!T.length)return T;for(S=T[T.length-1],B=p.slice(b),E=0,C=B.length;E<C;E++)x=B[E],w(x,S)<0&&(f(T,x,0,null,w),T.pop(),S=T[T.length-1]);return T}for(i(p,w),P=[],D=0,A=c(b,p.length);0<=A?D<A:D>A;0<=A?++D:--D)P.push(s(p,w));return P},"nsmallest"),m=v(function(p,b,w,x){var S,T,E;for(x==null&&(x=a),S=p[w];w>b;){if(E=w-1>>1,T=p[E],x(S,T)<0){p[w]=T,w=E;continue}break}return p[w]=S},"_siftdown"),y=v(function(p,b,w){var x,S,T,E,D;for(w==null&&(w=a),S=p.length,D=b,T=p[b],x=2*b+1;x<S;)E=x+1,E<S&&!(w(p[x],p[E])<0)&&(x=E),p[b]=p[x],b=x,x=2*b+1;return p[b]=T,m(p,D,b,w)},"_siftup"),r=function(){p.push=o,p.pop=s,p.replace=u,p.pushpop=l,p.heapify=i,p.updateItem=h,p.nlargest=d,p.nsmallest=g;function p(b){this.cmp=b??a,this.nodes=[]}return v(p,"Heap"),p.prototype.push=function(b){return o(this.nodes,b,this.cmp)},p.prototype.pop=function(){return s(this.nodes,this.cmp)},p.prototype.peek=function(){return this.nodes[0]},p.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1},p.prototype.replace=function(b){return u(this.nodes,b,this.cmp)},p.prototype.pushpop=function(b){return l(this.nodes,b,this.cmp)},p.prototype.heapify=function(){return i(this.nodes,this.cmp)},p.prototype.updateItem=function(b){return h(this.nodes,b,this.cmp)},p.prototype.clear=function(){return this.nodes=[]},p.prototype.empty=function(){return this.nodes.length===0},p.prototype.size=function(){return this.nodes.length},p.prototype.clone=function(){var b;return b=new p,b.nodes=this.nodes.slice(0),b},p.prototype.toArray=function(){return this.nodes.slice(0)},p.prototype.insert=p.prototype.push,p.prototype.top=p.prototype.peek,p.prototype.front=p.prototype.peek,p.prototype.has=p.prototype.contains,p.prototype.copy=p.prototype.clone,p}(),function(p,b){return t.exports=b()}(this,function(){return r})}).call(la)}),La=Gv,Wv=et({root:null,weight:v(function(e){return 1},"weight"),directed:!1}),Hv={dijkstra:v(function(e){if(!Pe(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var a=Wv(e),n=a.root,i=a.weight,s=a.directed,o=this,l=i,u=ce(n)?this.filter(n)[0]:n[0],f={},c={},d={},g=this.byGroup(),h=g.nodes,m=g.edges;m.unmergeBy(function(I){return I.isLoop()});for(var y=v(function(L){return f[L.id()]},"getDist"),p=v(function(L,O){f[L.id()]=O,b.updateItem(L)},"setDist"),b=new La(function(I,L){return y(I)-y(L)}),w=0;w<h.length;w++){var x=h[w];f[x.id()]=x.same(u)?0:1/0,b.push(x)}for(var S=v(function(L,O){for(var N=(s?L.edgesTo(O):L.edgesWith(O)).intersect(m),$=1/0,H,q=0;q<N.length;q++){var K=N[q],Y=l(K);(Y<$||!H)&&($=Y,H=K)}return{edge:H,dist:$}},"distBetween");b.size()>0;){var T=b.pop(),E=y(T),D=T.id();if(d[D]=E,E!==1/0)for(var C=T.neighborhood().intersect(h),B=0;B<C.length;B++){var A=C[B],P=A.id(),M=S(T,A),R=E+M.dist;R<y(A)&&(p(A,R),c[P]={node:T,edge:M.edge})}}return{distanceTo:v(function(L){var O=ce(L)?h.filter(L)[0]:L[0];return d[O.id()]},"distanceTo"),pathTo:v(function(L){var O=ce(L)?h.filter(L)[0]:L[0],N=[],$=O,H=$.id();if(O.length>0)for(N.unshift(O);c[H];){var q=c[H];N.unshift(q.edge),N.unshift(q.node),$=q.node,H=$.id()}return o.spawn(N)},"pathTo")}},"dijkstra")},Uv={kruskal:v(function(e){e=e||function(w){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,l=v(function(x){for(var S=0;S<s.length;S++){var T=s[S];if(T.has(x))return S}},"findSetIndex"),u=0;u<i;u++)s[u]=this.spawn(a[u]);for(var f=n.sort(function(w,x){return e(w)-e(x)}),c=0;c<f.length;c++){var d=f[c],g=d.source()[0],h=d.target()[0],m=l(g),y=l(h),p=s[m],b=s[y];m!==y&&(o.merge(d),p.merge(b),s.splice(y,1))}return o},"kruskal")},Xv=et({root:null,goal:null,weight:v(function(e){return 1},"weight"),heuristic:v(function(e){return 0},"heuristic"),directed:!1}),Yv={aStar:v(function(e){var r=this.cy(),a=Xv(e),n=a.root,i=a.goal,s=a.heuristic,o=a.directed,l=a.weight;n=r.collection(n)[0],i=r.collection(i)[0];var u=n.id(),f=i.id(),c={},d={},g={},h=new La(function(H,q){return d[H.id()]-d[q.id()]}),m=new Wr,y={},p={},b=v(function(q,K){h.push(q),m.add(K)},"addToOpenSet"),w,x,S=v(function(){w=h.pop(),x=w.id(),m.delete(x)},"popFromOpenSet"),T=v(function(q){return m.has(q)},"isInOpenSet");b(n,u),c[u]=0,d[u]=s(n);for(var E=0;h.size()>0;){if(S(),E++,x===f){for(var D=[],C=i,B=f,A=p[B];D.unshift(C),A!=null&&D.unshift(A),C=y[B],C!=null;)B=C.id(),A=p[B];return{found:!0,distance:c[x],path:this.spawn(D),steps:E}}g[x]=!0;for(var P=w._private.edges,M=0;M<P.length;M++){var R=P[M];if(this.hasElementWithId(R.id())&&!(o&&R.data("source")!==x)){var I=R.source(),L=R.target(),O=I.id()!==x?I:L,N=O.id();if(this.hasElementWithId(N)&&!g[N]){var $=c[x]+l(R);if(!T(N)){c[N]=$,d[N]=$+s(O),b(O,N),y[N]=w,p[N]=R;continue}$<c[N]&&(c[N]=$,d[N]=$+s(O),y[N]=w,p[N]=R)}}}}return{found:!1,distance:void 0,path:void 0,steps:E}},"aStar")},_v=et({weight:v(function(e){return 1},"weight"),directed:!1}),Zv={floydWarshall:v(function(e){for(var r=this.cy(),a=_v(e),n=a.weight,i=a.directed,s=n,o=this.byGroup(),l=o.nodes,u=o.edges,f=l.length,c=f*f,d=v(function(Y){return l.indexOf(Y)},"indexOf"),g=v(function(Y){return l[Y]},"atIndex"),h=new Array(c),m=0;m<c;m++){var y=m%f,p=(m-y)/f;p===y?h[m]=0:h[m]=1/0}for(var b=new Array(c),w=new Array(c),x=0;x<u.length;x++){var S=u[x],T=S.source()[0],E=S.target()[0];if(T!==E){var D=d(T),C=d(E),B=D*f+C,A=s(S);if(h[B]>A&&(h[B]=A,b[B]=C,w[B]=S),!i){var P=C*f+D;!i&&h[P]>A&&(h[P]=A,b[P]=D,w[P]=S)}}}for(var M=0;M<f;M++)for(var R=0;R<f;R++)for(var I=R*f+M,L=0;L<f;L++){var O=R*f+L,N=M*f+L;h[I]+h[N]<h[O]&&(h[O]=h[I]+h[N],b[O]=b[I])}var $=v(function(Y){return(ce(Y)?r.filter(Y):Y)[0]},"getArgEle"),H=v(function(Y){return d($(Y))},"indexOfArgEle"),q={distance:v(function(Y,Z){var J=H(Y),Q=H(Z);return h[J*f+Q]},"distance"),path:v(function(Y,Z){var J=H(Y),Q=H(Z),ee=g(J);if(J===Q)return ee.collection();if(b[J*f+Q]==null)return r.collection();var re=r.collection(),W=J,z;for(re.merge(ee);J!==Q;)W=J,J=b[J*f+Q],z=w[W*f+J],re.merge(z),re.merge(g(J));return re},"path")};return q},"floydWarshall")},Qv=et({weight:v(function(e){return 1},"weight"),directed:!1,root:null}),Jv={bellmanFord:v(function(e){var r=this,a=Qv(e),n=a.weight,i=a.directed,s=a.root,o=n,l=this,u=this.cy(),f=this.byGroup(),c=f.edges,d=f.nodes,g=d.length,h=new Ft,m=!1,y=[];s=u.collection(s)[0],c.unmergeBy(function(Le){return Le.isLoop()});for(var p=c.length,b=v(function(ve){var ue=h.get(ve.id());return ue||(ue={},h.set(ve.id(),ue)),ue},"getInfo"),w=v(function(ve){return(ce(ve)?u.$(ve):ve)[0]},"getNodeFromTo"),x=v(function(ve){return b(w(ve)).dist},"distanceTo"),S=v(function(ve){for(var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,ye=w(ve),me=[],ge=ye;;){if(ge==null)return r.spawn();var be=b(ge),Te=be.edge,De=be.pred;if(me.unshift(ge[0]),ge.same(ue)&&me.length>0)break;Te!=null&&me.unshift(Te),ge=De}return l.spawn(me)},"pathTo"),T=0;T<g;T++){var E=d[T],D=b(E);E.same(s)?D.dist=0:D.dist=1/0,D.pred=null,D.edge=null}for(var C=!1,B=v(function(ve,ue,ye,me,ge,be){var Te=me.dist+be;Te<ge.dist&&!ye.same(me.edge)&&(ge.dist=Te,ge.pred=ve,ge.edge=ye,C=!0)},"checkForEdgeReplacement"),A=1;A<g;A++){C=!1;for(var P=0;P<p;P++){var M=c[P],R=M.source(),I=M.target(),L=o(M),O=b(R),N=b(I);B(R,I,M,O,N,L),i||B(I,R,M,N,O,L)}if(!C)break}if(C)for(var $=[],H=0;H<p;H++){var q=c[H],K=q.source(),Y=q.target(),Z=o(q),J=b(K).dist,Q=b(Y).dist;if(J+Z<Q||!i&&Q+Z<J)if(m||(Re("Graph contains a negative weight cycle for Bellman-Ford"),m=!0),e.findNegativeWeightCycles!==!1){var ee=[];J+Z<Q&&ee.push(K),!i&&Q+Z<J&&ee.push(Y);for(var re=ee.length,W=0;W<re;W++){var z=ee[W],U=[z];U.push(b(z).edge);for(var te=b(z).pred;U.indexOf(te)===-1;)U.push(te),U.push(b(te).edge),te=b(te).pred;U=U.slice(U.indexOf(te));for(var se=U[0].id(),le=0,Se=2;Se<U.length;Se+=2)U[Se].id()<se&&(se=U[Se].id(),le=Se);U=U.slice(le).concat(U.slice(0,le)),U.push(U[0]);var Me=U.map(function(Le){return Le.id()}).join(",");$.indexOf(Me)===-1&&(y.push(l.spawn(U)),$.push(Me))}}else break}return{distanceTo:x,pathTo:S,hasNegativeWeightCycle:m,negativeWeightCycles:y}},"bellmanFord")},jv=Math.sqrt(2),ef=v(function(e,r,a){a.length===0&&$e("Karger-Stein must be run on a connected (sub)graph");for(var n=a[e],i=n[1],s=n[2],o=r[i],l=r[s],u=a,f=u.length-1;f>=0;f--){var c=u[f],d=c[1],g=c[2];(r[d]===o&&r[g]===l||r[d]===l&&r[g]===o)&&u.splice(f,1)}for(var h=0;h<u.length;h++){var m=u[h];m[1]===l?(u[h]=m.slice(),u[h][1]=o):m[2]===l&&(u[h]=m.slice(),u[h][2]=o)}for(var y=0;y<r.length;y++)r[y]===l&&(r[y]=o);return u},"collapse"),Wn=v(function(e,r,a,n){for(;a>n;){var i=Math.floor(Math.random()*r.length);r=ef(i,e,r),a--}return r},"contractUntil"),tf={kargerStein:v(function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(N){return N.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/jv);if(i<2){$e("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],f=0;f<s;f++){var c=n[f];u.push([f,a.indexOf(c.source()),a.indexOf(c.target())])}for(var d=1/0,g=[],h=new Array(i),m=new Array(i),y=new Array(i),p=v(function($,H){for(var q=0;q<i;q++)H[q]=$[q]},"copyNodesMap"),b=0;b<=o;b++){for(var w=0;w<i;w++)m[w]=w;var x=Wn(m,u.slice(),i,l),S=x.slice();p(m,y);var T=Wn(m,x,l,2),E=Wn(y,S,l,2);T.length<=E.length&&T.length<d?(d=T.length,g=T,p(m,h)):E.length<=T.length&&E.length<d&&(d=E.length,g=E,p(y,h))}for(var D=this.spawn(g.map(function(N){return n[N[0]]})),C=this.spawn(),B=this.spawn(),A=h[0],P=0;P<h.length;P++){var M=h[P],R=a[P];M===A?C.merge(R):B.merge(R)}var I=v(function($){var H=e.spawn();return $.forEach(function(q){H.merge(q),q.connectedEdges().forEach(function(K){e.contains(K)&&!D.contains(K)&&H.merge(K)})}),H},"constructComponent"),L=[I(C),I(B)],O={cut:D,components:L,partition1:C,partition2:B};return O},"kargerStein")},rf=v(function(e){return{x:e.x,y:e.y}},"copyPosition"),Dn=v(function(e,r,a){return{x:e.x*r+a.x,y:e.y*r+a.y}},"modelToRenderedPosition"),No=v(function(e,r,a){return{x:(e.x-a.x)/r,y:(e.y-a.y)/r}},"renderedToModelPosition"),Lr=v(function(e){return{x:e[0],y:e[1]}},"array2point"),af=v(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i<a;i++){var s=e[i];isFinite(s)&&(n=Math.min(s,n))}return n},"min"),nf=v(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i<a;i++){var s=e[i];isFinite(s)&&(n=Math.max(s,n))}return n},"max"),sf=v(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s<a;s++){var o=e[s];isFinite(o)&&(n+=o,i++)}return n/i},"mean"),of=v(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a<e.length&&e.splice(a,e.length-a),r>0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(d,g){return d-g});var f=e.length,c=Math.floor(f/2);return f%2!==0?e[c+1+o]:(e[c-1+o]+e[c+o])/2},"median"),uf=v(function(e){return Math.PI*e/180},"deg2rad"),Ka=v(function(e,r){return Math.atan2(r,e)-Math.PI/2},"getAngleFromDisp"),ki=Math.log2||function(t){return Math.log(t)/Math.log(2)},zo=v(function(e){return e>0?1:e<0?-1:0},"signum"),wr=v(function(e,r){return Math.sqrt(hr(e,r))},"dist"),hr=v(function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},"sqdist"),lf=v(function(e){for(var r=e.length,a=0,n=0;n<r;n++)a+=e[n];for(var i=0;i<r;i++)e[i]=e[i]/a;return e},"inPlaceSumNormalize"),je=v(function(e,r,a,n){return(1-n)*(1-n)*e+2*(1-n)*n*r+n*n*a},"qbezierAt"),Or=v(function(e,r,a,n){return{x:je(e.x,r.x,a.x,n),y:je(e.y,r.y,a.y,n)}},"qbezierPtAt"),vf=v(function(e,r,a,n){var i={x:r.x-e.x,y:r.y-e.y},s=wr(e,r),o={x:i.x/s,y:i.y/s};return a=a??0,n=n??a*s,{x:e.x+o.x*n,y:e.y+o.y*n}},"lineAt"),Ea=v(function(e,r,a){return Math.max(e,Math.min(a,r))},"bound"),yt=v(function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},"makeBoundingBox"),ff=v(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),cf=v(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),df=v(function(e,r,a){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+a,y2:e.y2+a,w:e.w,h:e.h}},"shiftBoundingBox"),Fo=v(function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},"updateBoundingBox"),hf=v(function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},"expandBoundingBoxByPoint"),tn=v(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBox"),rn=v(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=We(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),is=v(function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},"assignBoundingBox"),Pi=v(function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},"boundingBoxesIntersect"),qr=v(function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},"inBoundingBox"),gf=v(function(e,r){return qr(e,r.x,r.y)},"pointInBoundingBox"),Vo=v(function(e,r){return qr(e,r.x1,r.y1)&&qr(e,r.x2,r.y2)},"boundingBoxInBoundingBox"),qo=v(function(e,r,a,n,i,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?xr(i,s):l,f=i/2,c=s/2;u=Math.min(u,f,c);var d=u!==f,g=u!==c,h;if(d){var m=a-f+u-o,y=n-c-o,p=a+f-u+o,b=y;if(h=jt(e,r,a,n,m,y,p,b,!1),h.length>0)return h}if(g){var w=a+f+o,x=n-c+u-o,S=w,T=n+c-u+o;if(h=jt(e,r,a,n,w,x,S,T,!1),h.length>0)return h}if(d){var E=a-f+u-o,D=n+c+o,C=a+f-u+o,B=D;if(h=jt(e,r,a,n,E,D,C,B,!1),h.length>0)return h}if(g){var A=a-f-o,P=n-c+u-o,M=A,R=n+c-u+o;if(h=jt(e,r,a,n,A,P,M,R,!1),h.length>0)return h}var I;{var L=a-f+u,O=n-c+u;if(I=fa(e,r,a,n,L,O,u+o),I.length>0&&I[0]<=L&&I[1]<=O)return[I[0],I[1]]}{var N=a+f-u,$=n-c+u;if(I=fa(e,r,a,n,N,$,u+o),I.length>0&&I[0]>=N&&I[1]<=$)return[I[0],I[1]]}{var H=a+f-u,q=n+c-u;if(I=fa(e,r,a,n,H,q,u+o),I.length>0&&I[0]>=H&&I[1]>=q)return[I[0],I[1]]}{var K=a-f+u,Y=n+c-u;if(I=fa(e,r,a,n,K,Y,u+o),I.length>0&&I[0]<=K&&I[1]>=Y)return[I[0],I[1]]}return[]},"roundRectangleIntersectLine"),pf=v(function(e,r,a,n,i,s,o){var l=o,u=Math.min(a,i),f=Math.max(a,i),c=Math.min(n,s),d=Math.max(n,s);return u-l<=e&&e<=f+l&&c-l<=r&&r<=d+l},"inLineVicinity"),yf=v(function(e,r,a,n,i,s,o,l,u){var f={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(e<f.x1||e>f.x2||r<f.y1||r>f.y2)},"inBezierVicinity"),mf=v(function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},"solveQuadratic"),bf=v(function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,l,u,f,c,d,g,h;if(l=(3*a-r*r)/9,u=-(27*n)+r*(9*a-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,g=r/3,o>0){c=u+Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),d=u-Math.sqrt(o),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),i[0]=-g+c+d,g+=(c+d)/2,i[4]=i[2]=-g,g=Math.sqrt(3)*(-d+c)/2,i[3]=g,i[5]=-g;return}if(i[5]=i[3]=0,o===0){h=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-g+2*h,i[4]=i[2]=-(h+g);return}l=-l,f=l*l*l,f=Math.acos(u/Math.sqrt(f)),h=2*Math.sqrt(l),i[0]=-g+h*Math.cos(f/3),i[2]=-g+h*Math.cos((f+2*Math.PI)/3),i[4]=-g+h*Math.cos((f+4*Math.PI)/3)},"solveCubic"),wf=v(function(e,r,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,f=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,c=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,d=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,g=[];bf(u,f,c,d,g);for(var h=1e-7,m=[],y=0;y<6;y+=2)Math.abs(g[y+1])<h&&g[y]>=0&&g[y]<=1&&m.push(g[y]);m.push(1),m.push(0);for(var p=-1,b,w,x,S=0;S<m.length;S++)b=Math.pow(1-m[S],2)*a+2*(1-m[S])*m[S]*i+m[S]*m[S]*o,w=Math.pow(1-m[S],2)*n+2*(1-m[S])*m[S]*s+m[S]*m[S]*l,x=Math.pow(b-e,2)+Math.pow(w-r,2),p>=0?x<p&&(p=x):p=x;return p},"sqdistToQuadraticBezier"),xf=v(function(e,r,a,n,i,s){var o=[e-a,r-n],l=[i-a,s-n],u=l[0]*l[0]+l[1]*l[1],f=o[0]*o[0]+o[1]*o[1],c=o[0]*l[0]+o[1]*l[1],d=c*c/u;return c<0?f:d>u?(e-i)*(e-i)+(r-s)*(r-s):f-d},"sqdistToFiniteLine"),pt=v(function(e,r,a){for(var n,i,s,o,l,u=0,f=0;f<a.length/2;f++)if(n=a[f*2],i=a[f*2+1],f+1<a.length/2?(s=a[(f+1)*2],o=a[(f+1)*2+1]):(s=a[(f+1-a.length/2)*2],o=a[(f+1-a.length/2)*2+1]),!(n==e&&s==e))if(n>=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},"pointInsidePolygonPoints"),Ut=v(function(e,r,a,n,i,s,o,l,u){var f=new Array(a.length),c;l[0]!=null?(c=Math.atan(l[1]/l[0]),l[0]<0?c=c+Math.PI/2:c=-c-Math.PI/2):c=l;for(var d=Math.cos(-c),g=Math.sin(-c),h=0;h<f.length/2;h++)f[h*2]=s/2*(a[h*2]*d-a[h*2+1]*g),f[h*2+1]=o/2*(a[h*2+1]*d+a[h*2]*g),f[h*2]+=n,f[h*2+1]+=i;var m;if(u>0){var y=gn(f,-u);m=hn(y)}else m=f;return pt(e,r,m)},"pointInsidePolygon"),Ef=v(function(e,r,a,n,i,s,o,l){for(var u=new Array(a.length*2),f=0;f<l.length;f++){var c=l[f];u[f*4+0]=c.startX,u[f*4+1]=c.startY,u[f*4+2]=c.stopX,u[f*4+3]=c.stopY;var d=Math.pow(c.cx-e,2)+Math.pow(c.cy-r,2);if(d<=Math.pow(c.radius,2))return!0}return pt(e,r,u)},"pointInsideRoundPolygon"),hn=v(function(e){for(var r=new Array(e.length/2),a,n,i,s,o,l,u,f,c=0;c<e.length/4;c++){a=e[c*4],n=e[c*4+1],i=e[c*4+2],s=e[c*4+3],c<e.length/4-1?(o=e[(c+1)*4],l=e[(c+1)*4+1],u=e[(c+1)*4+2],f=e[(c+1)*4+3]):(o=e[0],l=e[1],u=e[2],f=e[3]);var d=jt(a,n,i,s,o,l,u,f,!0);r[c*2]=d[0],r[c*2+1]=d[1]}return r},"joinLines"),gn=v(function(e,r){for(var a=new Array(e.length*2),n,i,s,o,l=0;l<e.length/2;l++){n=e[l*2],i=e[l*2+1],l<e.length/2-1?(s=e[(l+1)*2],o=e[(l+1)*2+1]):(s=e[0],o=e[1]);var u=o-i,f=-(s-n),c=Math.sqrt(u*u+f*f),d=u/c,g=f/c;a[l*4]=n+d*r,a[l*4+1]=i+g*r,a[l*4+2]=s+d*r,a[l*4+3]=o+g*r}return a},"expandPolygon"),Tf=v(function(e,r,a,n,i,s){var o=a-e,l=n-r;o/=i,l/=s;var u=Math.sqrt(o*o+l*l),f=u-1;if(f<0)return[];var c=f/u;return[(a-e)*c+e,(n-r)*c+r]},"intersectLineEllipse"),mr=v(function(e,r,a,n,i,s,o){return e-=i,r-=s,e/=a/2+o,r/=n/2+o,e*e+r*r<=1},"checkInEllipse"),fa=v(function(e,r,a,n,i,s,o){var l=[a-e,n-r],u=[e-i,r-s],f=l[0]*l[0]+l[1]*l[1],c=2*(u[0]*l[0]+u[1]*l[1]),d=u[0]*u[0]+u[1]*u[1]-o*o,g=c*c-4*f*d;if(g<0)return[];var h=(-c+Math.sqrt(g))/(2*f),m=(-c-Math.sqrt(g))/(2*f),y=Math.min(h,m),p=Math.max(h,m),b=[];if(y>=0&&y<=1&&b.push(y),p>=0&&p<=1&&b.push(p),b.length===0)return[];var w=b[0]*l[0]+e,x=b[0]*l[1]+r;if(b.length>1){if(b[0]==b[1])return[w,x];var S=b[1]*l[0]+e,T=b[1]*l[1]+r;return[w,x,S,T]}else return[w,x]},"intersectLineCircle"),Hn=v(function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},"midOfThree"),jt=v(function(e,r,a,n,i,s,o,l,u){var f=e-i,c=a-e,d=o-i,g=r-s,h=n-r,m=l-s,y=d*g-m*f,p=c*g-h*f,b=m*c-d*h;if(b!==0){var w=y/b,x=p/b,S=.001,T=0-S,E=1+S;return T<=w&&w<=E&&T<=x&&x<=E?[e+w*c,r+w*h]:u?[e+w*c,r+w*h]:[]}else return y===0||p===0?Hn(e,a,o)===o?[o,l]:Hn(e,a,i)===i?[i,s]:Hn(i,o,a)===a?[a,n]:[]:[]},"finiteLinesIntersect"),Ta=v(function(e,r,a,n,i,s,o,l){var u=[],f,c=new Array(a.length),d=!0;s==null&&(d=!1);var g;if(d){for(var h=0;h<c.length/2;h++)c[h*2]=a[h*2]*s+n,c[h*2+1]=a[h*2+1]*o+i;if(l>0){var m=gn(c,-l);g=hn(m)}else g=c}else g=a;for(var y,p,b,w,x=0;x<g.length/2;x++)y=g[x*2],p=g[x*2+1],x<g.length/2-1?(b=g[(x+1)*2],w=g[(x+1)*2+1]):(b=g[0],w=g[1]),f=jt(e,r,n,i,y,p,b,w),f.length!==0&&u.push(f[0],f[1]);return u},"polygonIntersectLine"),Cf=v(function(e,r,a,n,i,s,o,l,u){var f=[],c,d=new Array(a.length*2);u.forEach(function(b,w){w===0?(d[d.length-2]=b.startX,d[d.length-1]=b.startY):(d[w*4-2]=b.startX,d[w*4-1]=b.startY),d[w*4]=b.stopX,d[w*4+1]=b.stopY,c=fa(e,r,n,i,b.cx,b.cy,b.radius),c.length!==0&&f.push(c[0],c[1])});for(var g=0;g<d.length/4;g++)c=jt(e,r,n,i,d[g*4],d[g*4+1],d[g*4+2],d[g*4+3],!1),c.length!==0&&f.push(c[0],c[1]);if(f.length>2){for(var h=[f[0],f[1]],m=Math.pow(h[0]-e,2)+Math.pow(h[1]-r,2),y=1;y<f.length/2;y++){var p=Math.pow(f[y*2]-e,2)+Math.pow(f[y*2+1]-r,2);p<=m&&(h[0]=f[y*2],h[1]=f[y*2+1],m=p)}return h}return f},"roundPolygonIntersectLine"),Ga=v(function(e,r,a){var n=[e[0]-r[0],e[1]-r[1]],i=Math.sqrt(n[0]*n[0]+n[1]*n[1]),s=(i-a)/i;return s<0&&(s=1e-5),[r[0]+s*n[0],r[1]+s*n[1]]},"shortenIntersection"),dt=v(function(e,r){var a=ii(e,r);return a=$o(a),a},"generateUnitNgonPointsFitToSquare"),$o=v(function(e){for(var r,a,n=e.length/2,i=1/0,s=1/0,o=-1/0,l=-1/0,u=0;u<n;u++)r=e[2*u],a=e[2*u+1],i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,a),l=Math.max(l,a);for(var f=2/(o-i),c=2/(l-s),d=0;d<n;d++)r=e[2*d]=e[2*d]*f,a=e[2*d+1]=e[2*d+1]*c,i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,a),l=Math.max(l,a);if(s<-1)for(var g=0;g<n;g++)a=e[2*g+1]=e[2*g+1]+(-1-s);return e},"fitPolygonToSquare"),ii=v(function(e,r){var a=1/e*2*Math.PI,n=e%2===0?Math.PI/2+a/2:Math.PI/2;n+=r;for(var i=new Array(e*2),s,o=0;o<e;o++)s=o*a+n,i[2*o]=Math.cos(s),i[2*o+1]=Math.sin(-s);return i},"generateUnitNgonPoints"),xr=v(function(e,r){return Math.min(e/4,r/4,8)},"getRoundRectangleRadius"),Ko=v(function(e,r){return Math.min(e/10,r/10,8)},"getRoundPolygonRadius"),Bi=v(function(){return 8},"getCutRectangleCornerLength"),Sf=v(function(e,r,a){return[e-2*r+a,2*(r-e),e]},"bezierPtsToQuadCoeff"),si=v(function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants"),Df=et({dampingFactor:.8,precision:1e-6,iterations:200,weight:v(function(e){return 1},"weight")}),kf={pageRank:v(function(e){for(var r=Df(e),a=r.dampingFactor,n=r.precision,i=r.iterations,s=r.weight,o=this._private.cy,l=this.byGroup(),u=l.nodes,f=l.edges,c=u.length,d=c*c,g=f.length,h=new Array(d),m=new Array(c),y=(1-a)/c,p=0;p<c;p++){for(var b=0;b<c;b++){var w=p*c+b;h[w]=0}m[p]=0}for(var x=0;x<g;x++){var S=f[x],T=S.data("source"),E=S.data("target");if(T!==E){var D=u.indexOfId(T),C=u.indexOfId(E),B=s(S),A=C*c+D;h[A]+=B,m[D]+=B}}for(var P=1/c+y,M=0;M<c;M++)if(m[M]===0)for(var R=0;R<c;R++){var I=R*c+M;h[I]=P}else for(var L=0;L<c;L++){var O=L*c+M;h[O]=h[O]/m[M]+y}for(var N=new Array(c),$=new Array(c),H,q=0;q<c;q++)N[q]=1;for(var K=0;K<i;K++){for(var Y=0;Y<c;Y++)$[Y]=0;for(var Z=0;Z<c;Z++)for(var J=0;J<c;J++){var Q=Z*c+J;$[Z]+=h[Q]*N[J]}lf($),H=N,N=$,$=H;for(var ee=0,re=0;re<c;re++){var W=H[re]-N[re];ee+=W*W}if(ee<n)break}var z={rank:v(function(te){return te=o.collection(te)[0],N[u.indexOf(te)]},"rank")};return z},"pageRank")},ss=et({root:null,weight:v(function(e){return 1},"weight"),directed:!1,alpha:0}),Nr={degreeCentralityNormalized:v(function(e){e=ss(e);var r=this.cy(),a=this.nodes(),n=a.length;if(e.directed){for(var f={},c={},d=0,g=0,h=0;h<n;h++){var m=a[h],y=m.id();e.root=m;var p=this.degreeCentrality(e);d<p.indegree&&(d=p.indegree),g<p.outdegree&&(g=p.outdegree),f[y]=p.indegree,c[y]=p.outdegree}return{indegree:v(function(w){return d==0?0:(ce(w)&&(w=r.filter(w)),f[w.id()]/d)},"indegree"),outdegree:v(function(w){return g===0?0:(ce(w)&&(w=r.filter(w)),c[w.id()]/g)},"outdegree")}}else{for(var i={},s=0,o=0;o<n;o++){var l=a[o];e.root=l;var u=this.degreeCentrality(e);s<u.degree&&(s=u.degree),i[l.id()]=u.degree}return{degree:v(function(w){return s===0?0:(ce(w)&&(w=r.filter(w)),i[w.id()]/s)},"degree")}}},"degreeCentralityNormalized"),degreeCentrality:v(function(e){e=ss(e);var r=this.cy(),a=this,n=e,i=n.root,s=n.weight,o=n.directed,l=n.alpha;if(i=r.collection(i)[0],o){for(var g=i.connectedEdges(),h=g.filter(function(T){return T.target().same(i)&&a.has(T)}),m=g.filter(function(T){return T.source().same(i)&&a.has(T)}),y=h.length,p=m.length,b=0,w=0,x=0;x<h.length;x++)b+=s(h[x]);for(var S=0;S<m.length;S++)w+=s(m[S]);return{indegree:Math.pow(y,1-l)*Math.pow(b,l),outdegree:Math.pow(p,1-l)*Math.pow(w,l)}}else{for(var u=i.connectedEdges().intersection(a),f=u.length,c=0,d=0;d<u.length;d++)c+=s(u[d]);return{degree:Math.pow(f,1-l)*Math.pow(c,l)}}},"degreeCentrality")};Nr.dc=Nr.degreeCentrality;Nr.dcn=Nr.degreeCentralityNormalised=Nr.degreeCentralityNormalized;var os=et({harmonic:!0,weight:v(function(){return 1},"weight"),directed:!1,root:null}),zr={closenessCentralityNormalized:v(function(e){for(var r=os(e),a=r.harmonic,n=r.weight,i=r.directed,s=this.cy(),o={},l=0,u=this.nodes(),f=this.floydWarshall({weight:n,directed:i}),c=0;c<u.length;c++){for(var d=0,g=u[c],h=0;h<u.length;h++)if(c!==h){var m=f.distance(g,u[h]);a?d+=1/m:d+=m}a||(d=1/d),l<d&&(l=d),o[g.id()]=d}return{closeness:v(function(p){return l==0?0:(ce(p)?p=s.filter(p)[0].id():p=p.id(),o[p]/l)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:v(function(e){var r=os(e),a=r.root,n=r.weight,i=r.directed,s=r.harmonic;a=this.filter(a)[0];for(var o=this.dijkstra({root:a,weight:n,directed:i}),l=0,u=this.nodes(),f=0;f<u.length;f++){var c=u[f];if(!c.same(a)){var d=o.distanceTo(c);s?l+=1/d:l+=d}}return s?l:1/l},"closenessCentrality")};zr.cc=zr.closenessCentrality;zr.ccn=zr.closenessCentralityNormalised=zr.closenessCentralityNormalized;var Pf=et({weight:null,directed:!1}),oi={betweennessCentrality:v(function(e){for(var r=Pf(e),a=r.directed,n=r.weight,i=n!=null,s=this.cy(),o=this.nodes(),l={},u={},f=0,c={set:v(function(w,x){u[w]=x,x>f&&(f=x)},"set"),get:v(function(w){return u[w]},"get")},d=0;d<o.length;d++){var g=o[d],h=g.id();a?l[h]=g.outgoers().nodes():l[h]=g.openNeighborhood().nodes(),c.set(h,0)}for(var m=v(function(w){for(var x=o[w].id(),S=[],T={},E={},D={},C=new La(function(J,Q){return D[J]-D[Q]}),B=0;B<o.length;B++){var A=o[B].id();T[A]=[],E[A]=0,D[A]=1/0}for(E[x]=1,D[x]=0,C.push(x);!C.empty();){var P=C.pop();if(S.push(P),i)for(var M=0;M<l[P].length;M++){var R=l[P][M],I=s.getElementById(P),L=void 0;I.edgesTo(R).length>0?L=I.edgesTo(R)[0]:L=R.edgesTo(I)[0];var O=n(L);R=R.id(),D[R]>D[P]+O&&(D[R]=D[P]+O,C.nodes.indexOf(R)<0?C.push(R):C.updateItem(R),E[R]=0,T[R]=[]),D[R]==D[P]+O&&(E[R]=E[R]+E[P],T[R].push(P))}else for(var N=0;N<l[P].length;N++){var $=l[P][N].id();D[$]==1/0&&(C.push($),D[$]=D[P]+1),D[$]==D[P