/** * Minified by jsDelivr using Terser v5.37.0. * Original file: /npm/cytoscape-cola@2.5.1/cytoscape-cola.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ !function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("webcola")):"function"==typeof define&&define.amd?define(["webcola"],t):"object"==typeof exports?exports.cytoscapeCola=t(require("webcola")):n.cytoscapeCola=t(n.webcola)}(this,(function(n){return function(n){var t={};function e(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=n,e.c=t,e.i=function(n){return n},e.d=function(n,t,o){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:o})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=3)}([function(n,t,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},i=e(1),r=e(2),a=e(5)||("undefined"!=typeof window?window.cola:null),c=e(4),u=function(n){return(void 0===n?"undefined":o(n))===o(0)},s=function(){},f=function(n,t){var e;return null!=(e=n)&&(void 0===e?"undefined":o(e))===o((function(){}))?n.apply(t,[t]):n};function d(n){this.options=i({},r,n)}d.prototype.run=function(){var n=this,t=this.options;n.manuallyStopped=!1;var e=t.cy,i=t.eles,r=i.nodes(),d=i.edges(),l=!1,p=r.filter((function(n){return n.isParent()})),y=r.subtract(p),h=t.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()};void 0===h.x2&&(h.x2=h.x1+h.w),void 0===h.w&&(h.w=h.x2-h.x1),void 0===h.y2&&(h.y2=h.y1+h.h),void 0===h.h&&(h.h=h.y2-h.y1);var g=function(){for(var n=0;n0&&b.constraints(D),b.groups(p.map((function(n,e){var o=f(t.nodeSpacing,n),i=function(t){return parseFloat(n.style("padding-"+t))},r=i("left")+o,a=i("right")+o,c=i("top")+o,u=i("bottom")+o;return n.scratch().cola={index:e,padding:Math.max(r,a,c,u),leaves:n.children().intersection(y).map((function(n){return n[0].scratch().cola.index})),fixed:n.locked()},n})).map((function(n){return n.scratch().cola.groups=n.children().intersection(p).map((function(n){return n.scratch().cola.index})),n.scratch().cola})));var T=void 0,q=void 0;null!=t.edgeLength?(T=t.edgeLength,q="linkDistance"):null!=t.edgeSymDiffLength?(T=t.edgeSymDiffLength,q="symmetricDiffLinkLengths"):null!=t.edgeJaccardLength?(T=t.edgeJaccardLength,q="jaccardLinkLengths"):(T=100,q="linkDistance");var E;if(b.links(d.stdFilter((function(n){return y.contains(n.source())&&y.contains(n.target())})).map((function(n){var t=n.scratch().cola={source:n.source()[0].scratch().cola.index,target:n.target()[0].scratch().cola.index};return null!=T&&(t.calcLength=f(T,n)),t}))),b.size([h.w,h.h]),null!=T&&b[q]((function(n){return n.calcLength})),t.flow){var j=void 0;(void 0===(E=t.flow)?"undefined":o(E))===o("")?j={axis:t.flow,minSeparation:50}:u(t.flow)?j={axis:"y",minSeparation:t.flow}:!function(n){return null!=n&&(void 0===n?"undefined":o(n))===o({})}(t.flow)?j={axis:"y",minSeparation:50}:((j=t.flow).axis=j.axis||"y",j.minSeparation=null!=j.minSeparation?j.minSeparation:50),b.flowLayout(j.axis,j.minSeparation)}return n.trigger({type:"layoutstart",layout:n}),b.avoidOverlaps(t.avoidOverlap).handleDisconnected(t.handleDisconnected).start(t.unconstrIter,t.userConstIter,t.allConstIter,void 0,void 0,t.centerGraph),t.infinite||setTimeout((function(){n.manuallyStopped||b.stop()}),t.maxSimulationTime),this},d.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},n.exports=d},function(n,t,e){"use strict";n.exports=null!=Object.assign?Object.assign.bind(Object):function(n){for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o