md/static/js/md-cytoscape.esm-bEGULzDv.js

17 lines
371 KiB
JavaScript
Raw Normal View History

import{aq as Ri}from"./md-index-TGP-egEp.js";function Ue(r){"@babel/helpers - typeof";return Ue=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},Ue(r)}function ii(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Gu(r,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}function oi(r,e,t){return e&&Gu(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Zo(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Tr(r,e){return Ku(r)||Wu(r,e)||Qo(r,e)||Uu()}function Ku(r){if(Array.isArray(r))return r}function Wu(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a=[],n=!0,i=!1,o,s;try{for(t=t.call(r);!(n=(o=t.next()).done)&&(a.push(o.value),!(e&&a.length===e));n=!0);}catch(l){i=!0,s=l}finally{try{!n&&t.return!=null&&t.return()}finally{if(i)throw s}}return a}}function Qo(r,e){if(r){if(typeof r=="string")return Oi(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Oi(r,e)}}function Oi(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=r[t];return a}function Uu(){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 Jo(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Qo(r))||e){t&&(r=t);var a=0,n=function(){};return{s:n,n:function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(l){throw l},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,o=!1,s;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return i=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}}}var Ke=typeof window>"u"?null:window,Ii=Ke?Ke.navigator:null;Ke&&Ke.document;var Yu=Ue(""),_o=Ue({}),Xu=Ue(function(){}),Zu=typeof HTMLElement>"u"?"undefined":Ue(HTMLElement),wa=function(e){return e&&e.instanceString&&qe(e.instanceString)?e.instanceString():null},ce=function(e){return e!=null&&Ue(e)==Yu},qe=function(e){return e!=null&&Ue(e)===Xu},Oe=function(e){return!yr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Te=function(e){return e!=null&&Ue(e)===_o&&!Oe(e)&&e.constructor===Object},Qu=function(e){return e!=null&&Ue(e)===_o},ne=function(e){return e!=null&&Ue(e)===Ue(1)&&!isNaN(e)},Ju=function(e){return ne(e)&&Math.floor(e)===e},_a=function(e){if(Zu!=="undefined")return e!=null&&e instanceof HTMLElement},yr=function(e){return xa(e)||jo(e)},xa=function(e){return wa(e)==="collection"&&e._private.single},jo=function(e){return wa(e)==="collection"&&!e._private.single},si=function(e){return wa(e)==="core"},es=function(e){return wa(e)==="stylesheet"},_u=function(e){return wa(e)==="event"},jr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},ju=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},el=function(e){return Te(e)&&ne(e.x1)&&ne(e.x2)&&ne(e.y1)&&ne(e.y2)},rl=function(e){return Qu(e)&&qe(e.then)},tl=function(){return Ii&&Ii.userAgent.match(/msie|trident|edge/i)},la=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);return i.join("$")});var a=function n(){var i=this,o=arguments,s,l=t.apply(i,o),u=n.cache;return(s=u[l])||(s=u[l]=e.apply(i,o)),s};return a.cache={},a},ui=la(function(r){return r.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),vn=la(function(r){return r.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),rs=la(function(r,e){return r+e[0].toUpperCase()+e.substring(1)},function(r,e){return r+"$"+e}),zi=function(e){return jr(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},We="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",al="rgb[a]?\\(("+We+"[%]?)\\s*,\\s*("+We+"[%]?)\\s*,\\s*("+We+"[%]?)(?:\\s*,\\s*("+We+"))?\\)",nl="rgb[a]?\\((?:"+We+"[%]?)\\s*,\\s*(?:"+We+"[%]?)\\s*,\\s*(?:"+We+"[%]?)(?:\\s*,\\s*(?:"+We+"))?\\)",il="hsl[a]?\\(("+We+")\\s*,\\s*("+We+"[%])\\s*,\\s*("+We+"[%])(?:\\s*,\\s*("+We+"))?\\)",ol="hsl[a]?\\((?:"+We+")\\s*,\\s*(?:"+We+"[%])\\s*,\\s*(?:"+We+"[%])(?:\\s*,\\s*(?:"+We+"))?\\)",sl="\\#[0-9a-fA-F]{3}",ul="\\#[0-9a-fA-F]{6}",ts=function(e,t){return e<t?-1:e>t?1:0},ll=function(e,t){return-1*ts(e,t)},pe=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t<e.length;t++){var a=e[t];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var o=n[i];r[o]=a[o]}}return r},vl=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var t=e.length===4,a,n,i,o=16;return t?(a=parseInt(e[1]+e[1],o),n=parseInt(e[2]+e[2],o),i=parseInt(e[3]+e[3],o)):(a=parseInt(e[1]+e[2],o),n=parseInt(e[3]+e[4],o),i=parseInt(e[5]+e[6],o)),[a,n,i]}},fl=function(e){var t,a,n,i,o,s,l,u;function v(d,y,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(y-d)*6*p:p<1/2?y:p<2/3?d+(y-d)*(2/3-p)*6:d}var f=new RegExp("^"+il+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,o=f[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(n===0)s=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;s=Math.round(255*v(h,c,a+1/3)),l=Math.round(255*v(h,c,a)),u=Math.round(255*v(h,c,a-1/3))}t=[s,l,u,o]}return t},cl=function(e){var t,a=new RegExp("^"+al+"$").exec(e);if(a){t=[];for(var n=[],i=1;i<=3;i++){var o=a[i];if(o[o.length-1]==="%"&&(n[i]=!0),o=parseFloat(o),n[i]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}v
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
Licensed under The MIT License (http://opensource.org/licenses/MIT)
*/var ks=0,Ps=1,Bs=2,Kr=function r(e){if(!(this instanceof r))return new r(e);this.id="Thenable/1.0.7",this.state=ks,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Kr.prototype={fulfill:function(e){return to(this,Ps,"fulfillValue",e)},reject:function(e){return to(this,Bs,"rejectReason",e)},then:function(e,t){var a=this,n=new Kr;return a.onFulfilled.push(no(e,n,"fulfill")),a.onRejected.push(no(t,n,"reject")),Ms(a),n.proxy}};var to=function(e,t,a,n){return e.state===ks&&(e.state=t,e[a]=n,Ms(e)),e},Ms=function(e){e.state===Ps?ao(e,"onFulfilled",e.fulfillValue):e.state===Bs&&ao(e,"onRejected",e.rejectReason)},ao=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var s=0;s<n.length;s++)n[s](a)};typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},no=function(e,t,a){return function(n){if(typeof e!="function")t[a].call(t,n);else{var i;try{i=e(n)}catch(o){t.reject(o);return}$f(t,i)}}},$f=function r(e,t){if(e===t||e.proxy===t){e.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(Ue(t)==="object"&&t!==null||typeof t=="function")try{a=t.then}catch(i){e.reject(i);return}if(typeof a=="function"){var n=!1;try{a.call(t,function(i){n||(n=!0,i===t?e.reject(new TypeError("circular thenable chain")):r(e,i))},function(i){n||(n=!0,e.reject(i))})}catch(i){n||e.reject(i)}return}e.fulfill(t)};Kr.all=function(r){return new Kr(function(e,t){for(var a=new Array(r.length),n=0,i=function(l,u){a[l]=u,n++,n===r.length&&e(a)},o=0;o<r.length;o++)(function(s){var l=r[s],u=l!=null&&l.then!=null;if(u)l.then(function(f){i(s,f)},function(f){t(f)});else{var v=l;i(s,v)}})(o)})};Kr.resolve=function(r){return new Kr(function(e,t){e(r)})};Kr.reject=function(r){return new Kr(function(e,t){t(r)})};var qt=typeof Promise<"u"?Promise:Kr,Un=function(e,t,a){var n=si(e),i=!n,o=this._private=pe({duration:1e3},t,a);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&qe(o.complete)&&o.completes.push(o.complete),i){var s=e.position();o.startPosition=o.startPosition||{x:s.x,y:s.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(n){var l=e.pan();o.startPan={x:l.x,y:l.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},pt=Un.prototype;pe(pt,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t,a=e.target._private.animation;e.queue?t=a.queue:t=a.current,t.push(this),yr(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return e===void 0?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,a=t.playing;return e===void 0?t.progress:(a&&this.pause(),t.progress=e,t.started=!1,a&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var a=function(u,v){var f=e[u];f!=null&&(e[u]=e[v],e[v]=f)};if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),e.style)for(var n=0;n<e.style.length;n++){var i=e.style[n],o=i.name,s=e.startStyle[o];e.startStyle[o]=i,e.style[n]=s}return t&&this.play(),this},promise:function(e){var t=this._private,a;switch(e){case"frame":a=t.frames;break;default:
Event object based on jQuery events, MIT license
https://jquery.org/license/
https://tldrlegal.com/license/mit-license
https://github.com/jquery/jquery/blob/master/src/event.js
*/var Ys=function(e,t){this.recycle(e,t)};function ea(){return!1}function Fa(){return!0}Ys.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=ea,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Fa:ea):e!=null&&e.type?t=e:this.type=e,t!=null&&(this.originalEvent=t.originalEvent,this.type=t.type!=null?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:a.x*n+i.x,y:a.y*n+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=Fa;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Fa;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Fa,this.stopPropagation()},isDefaultPrevented:ea,isPropagationStopped:ea,isImmediatePropagationStopped:ea};var Xs=/^([^.]+)(\.(?:[^.]+))?$/,Lh=".*",Zs={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},po=Object.keys(Zs),Ah={};function wn(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ah,e=arguments.length>1?arguments[1]:void 0,t=0;t<po.length;t++){var a=po[t];this[a]=r[a]||Zs[a]}this.context=e||this.context,this.listeners=[],this.emitting=0}var at=wn.prototype,Qs=function(e,t,a,n,i,o,s){qe(n)&&(i=n,n=null),s&&(o==null?o=s:o=pe({},o,s));for(var l=Oe(a)?a:a.split(/\s+/),u=0;u<l.length;u++){var v=l[u];if(!jr(v)){var f=v.match(Xs);if(f){var c=f[1],h=f[2]?f[2]:null,d=t(e,v,c,h,n,i,o);if(d===!1)break}}}},yo=function(e,t){return e.addEventFields(e.context,t),new Ys(t.type,t)},Rh=function(e,t,a){if(_u(a)){t(e,a);return}else if(Te(a)){t(e,yo(e,a));return}for(var n=Oe(a)?a:a.split(/\s+/),i=0;i<n.length;i++){var o=n[i];if(!jr(o)){var s=o.match(Xs);if(s){var l=s[1],u=s[2]?s[2]:null,v=yo(e,{type:l,namespace:u,target:e.context});t(e,v)}}}};at.on=at.addListener=function(r,e,t,a,n){return Qs(this,function(i,o,s,l,u,v,f){qe(v)&&i.listeners.push({event:o,callback:v,type:s,namespace:l,qualifier:u,conf:f})},r,e,t,a,n),this};at.one=function(r,e,t,a){return this.on(r,e,t,a,{one:!0})};at.removeListener=at.off=function(r,e,t,a){var n=this;this.emitting!==0&&(this.listeners=sv(this.listeners));for(var i=this.listeners,o=function(u){var v=i[u];Qs(n,function(f,c,h,d,y,p){if((v.type===h||r==="*")&&(!d&&v.namespace!==".*"||v.namespace===d)&&(!y||f.qualifierCompare(v.qualifier,y))&&(!p||v.callback===p))return i.splice(u,1),!1},r,e,t,a)},s=i.length-1;s>=0;s--)o(s);return this};at.removeAllListeners=function(){return this.removeListener("*")};at.emit=at.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,Oe(e)||(e=[e]),Rh(this,function(i,o){t!=null&&(a=[{event:o.event,type:o.type,namespace:o.namespace,callback:t}],n=a.length);for(var s=function(v){var f=a[v];if(f.type===o.type&&(!f.namespace||f.namespace===o.namespace||f.namespace===Lh)&&i.eventMatches(i.context,f,o)){var c=[o];e!=null&&lv(c,e),i.beforeEmit(i.context,f,o),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(y){return y!==f}));var h=i.callbackContext(i.context,f,o),d=f.callback.apply(h,c);i.afterEmit(i.context,f,o),d===!1&&(o.stopPropagation(),o.preventDefault())}},l=0;l<n;l++)s(l);i.bubble(i.context)&&!o.isPropagationStopped()&&i.parent(i.context).emit(o,e)},r),this.emitting--,this};var Oh={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,a){var n=t.qualifier;return n!=null?e!==a.target&&xa(a.target)&&n.matches(a.target):!0},addEventFields
`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,p=0;p<v.length;p++){var g=v[p],m=this.calculateLabelDimensions(r,g),b=m.width;if(h){var w=g.split("").join(u);g=w}if(b>f){var S=g.matchAll(y),E="",x=0,D=Jo(S),C;try{for(D.s();!(C=D.n()).done;){var M=C.value,P=M[0],B=g.substring(x,M.index);x=M.index+P.length;var L=E.length===0?B:E+B+P,k=this.calculateLabelDimensions(r,L),O=k.width;O<=f?E+=B+P:(E&&d.push(E),E=B+P)}}catch(q){D.e(q)}finally{D.f()}E.match(/^[\s\u200b]+$/)||d.push(E)}else d.push(g)}o("labelWrapCachedLines",d),n=o("labelWrapCachedText",d.join(`
`)),o("labelWrapKey",l)}else if(s==="ellipsis"){var A=r.pstyle("text-max-width").pfValue,R="",I="…",V=!1;if(this.calculateLabelDimensions(r,n).width<A)return n;for(var G=0;G<n.length;G++){var F=this.calculateLabelDimensions(r,R+n[G]+I).width;if(F>A)break;R+=n[G],G===n.length-1&&(V=!0)}return V||(R+=I),R}return n};Nr.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if(e==="auto")if(r.isNode())switch(t){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Nr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=dt(e,r._private.labelDimsKey),o=t.labelDimCache||(t.labelDimCache=[]),s=o[i];if(s!=null)return s;var l=0,u=r.pstyle("font-style").strValue,v=r.pstyle("font-size").pfValue,f=r.pstyle("font-family").strValue,c=r.pstyle("font-weight").strValue,h=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=n.createElement("canvas"),d=this.labelCalcCanvasContext=h.getContext("2d");var y=h.style;y.position="absolute",y.left="-9999px",y.top="-9999px",y.zIndex="-1",y.visibility="hidden",y.pointerEvents="none"}d.font="".concat(u," ").concat(c," ").concat(v,"px ").concat(f);for(var p=0,g=0,m=e.split(`
`),b=0;b<m.length;b++){var w=m[b],S=d.measureText(w),E=Math.ceil(S.width),x=v;p=Math.max(E,p),g+=x}return p+=l,g+=l,o[i]={width:p,height:g}};Nr.calculateLabelAngle=function(r,e){var t=r._private,a=t.rscratch,n=r.isEdge(),i=e?e+"-":"",o=r.pstyle(i+"text-rotation"),s=o.strValue;return s==="none"?0:n&&s==="autorotate"?a.labelAutoAngle:s==="autorotate"?0:o.pfValue};Nr.calculateLabelAngles=function(r){var e=this,t=r.isEdge(),a=r._private,n=a.rscratch;n.labelAngle=e.calculateLabelAngle(r),t&&(n.sourceLabelAngle=e.calculateLabelAngle(r,"source"),n.targetLabelAngle=e.calculateLabelAngle(r,"target"))};var pu={},No=28,Fo=!1;pu.getNodeShape=function(r){var e=this,t=r.pstyle("shape").value;if(t==="cutrectangle"&&(r.width()<No||r.height()<No))return Fo||(Me("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Fo=!0),"rectangle";if(r.isParent())return t==="rectangle"||t==="roundrectangle"||t==="round-rectangle"||t==="cutrectangle"||t==="cut-rectangle"||t==="barrel"?t:"rectangle";if(t==="polygon"){var a=r.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(a).name}return t};var Dn={};Dn.registerCalculationListeners=function(){var r=this.cy,e=r.collection(),t=this,a=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var l=0;l<o.length;l++){var u=o[l],v=u._private,f=v.rstyle;f.clean=!1,f.cleanConnected=!1}};t.binder(r).on("bounds.* dirty.*",function(o){var s=o.target;a(s)}).on("style.* background.*",function(o){var s=o.target;a(s,!1)});var n=function(o){if(o){var s=t.onUpdateEleCalcsFns;e.cleanStyle();for(var l=0;l<e.length;l++){var u=e[l],v=u._private.rstyle;u.isNode()&&!v.cleanConnected&&(a(u.connectedEdges()),v.cleanConnected=!0)}if(s)for(var f=0;f<s.length;f++){var c=s[f];c(o,e)}t.recalculateRenderedStyle(e),e=r.collection()}};t.flushRenderedStyleQueue=function(){n(!0)},t.beforeRender(n,t.beforeRenderPriorities.eleCalcs)};Dn.onUpdateEleCalcs=function(r){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(r)};Dn.recalculateRenderedStyle=function(r,e){var t=function(w){return w._private.rstyle.cleanConnected},a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<r.length;i++){var o=r[i],s=o._private,l=s.rstyle;o.isEdge()&&(!t(o.source())||!t(o.target()))&&(l.clean=!1),!(e&&l.clean||o.removed())&&o.pstyle("display").value!=="none"&&(s.group==="nodes"?n.push(o):a.push(o),l.clean=!0)}for(var u=0;u<n.length;u++){var v=n[u],f=v._private,c=f.rstyle,h=v.position();this.recalculateNodeLabelProjection(v),c.nodeX=h.x,c.nodeY=h.y,c.nodeW=v.pstyle("width").pfValue,c.nodeH=v.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var d=0;d<a.length;d++){var y=a[d],p=y._private,g=p.rstyle,m=p.rscratch;g.srcX=m.arrowStartX,g.srcY=m.arrowStartY,g.tgtX=m.arrowEndX,g.tgtY=m.arrowEndY,g.midX=m.midX,g.midY=m.midY,g.labelAngle=m.labelAngle,g.sourceLabelAngle=m.sourceLabelAngle,g.targetLabelAngle=m.targetLabelAngle}}};var kn={};kn.updateCachedGrabbedEles=function(){var r=this.cachedZSortedEles;if(r){r.drag=[],r.nondrag=[];for(var e=[],t=0;t<r.length;t++){var a=r[t],n=a._private.rscratch;a.grabbed()&&!a.isParent()?e.push(a):n.inDragLayer?r.drag.push(a):r.nondrag.push(a)}for(var t=0;t<e.length;t++){var a=e[t];r.drag.push(a)}}};kn.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};kn.getCachedZSortedEles=function(r){if(r||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(js),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var yu={};[bt,un,ur,Da,ki,Nr,pu,Dn,kn].forEach(function(r){pe(yu,r)});var mu={};mu.getCachedImage=function(r,e,t){var a=this,n=a.imageCache=a.imageCache||{},i=n[r];if(i)return i.image.complete||i.image.addEventListener("load",t),i.image;i=n[r]=n[r]||{};var o=i.image=new Image;o.addEventListener("load",t),o.addEventListener("error",function(){o.error=!0});var s="data:",l=r.substring(0,s.length).toLowerCase()===s;return l||(e=e==="null"?null:e,o.crossOrigin=e),o.s