1
2
3
4
5
6
7
8
|
/**
* Minified by jsDelivr using UglifyJS v3.4.4.
* Original file: /npm/cytoscape-dagre@2.2.2/cytoscape-dagre.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("dagre")):"function"==typeof define&&define.amd?define(["dagre"],n):"object"==typeof exports?exports.cytoscapeDagre=n(require("dagre")):e.cytoscapeDagre=n(e.dagre)}(this,function(t){return function(t){var r={};function o(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=r,o.i=function(e){return e},o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s=3)}([function(e,n,t){"use strict";var S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=t(2),o=t(1),j=t(4);function i(e){this.options=o({},r,e)}i.prototype.run=function(){var r=this.options,e=r.cy,n=r.eles,t=function(e,n){return"function"==typeof n?n.apply(e,[e]):n},o=r.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()};void 0===o.x2&&(o.x2=o.x1+o.w),void 0===o.w&&(o.w=o.x2-o.x1),void 0===o.y2&&(o.y2=o.y1+o.h),void 0===o.h&&(o.h=o.y2-o.y1);var i=new j.graphlib.Graph({multigraph:!0,compound:!0}),a={},u=function(e,n){null!=n&&(a[e]=n)};u("nodesep",r.nodeSep),u("edgesep",r.edgeSep),u("ranksep",r.rankSep),u("rankdir",r.rankDir),u("ranker",r.ranker),i.setGraph(a),i.setDefaultEdgeLabel(function(){return{}}),i.setDefaultNodeLabel(function(){return{}});for(var c=n.nodes(),d=0;d<c.length;d++){var s=c[d],f=s.layoutDimensions(r);i.setNode(s.id(),{width:f.w,height:f.h,name:s.id()})}for(var p=0;p<c.length;p++){var y=c[p];y.isChild()&&i.setParent(y.id(),y.parent().id())}for(var l=n.edges().stdFilter(function(e){return!e.source().isParent()&&!e.target().isParent()}),h=0;h<l.length;h++){var g=l[h];i.setEdge(g.source().id(),g.target().id(),{minlen:t(g,r.minLen),weight:t(g,r.edgeWeight),name:g.id()},g.id())}j.layout(i);for(var x=i.nodes(),v=0;v<x.length;v++){var m=x[v],b=i.node(m);e.getElementById(m).scratch().dagre=b}var w=void 0;r.boundingBox?(w={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},c.forEach(function(e){var n=e.scratch().dagre;w.x1=Math.min(w.x1,n.x),w.x2=Math.max(w.x2,n.x),w.y1=Math.min(w.y1,n.y),w.y2=Math.max(w.y2,n.y)}),w.w=w.x2-w.x1,w.h=w.y2-w.y1):w=o;return c.layoutPositions(this,r,function(e){var n=(e="object"===(void 0===e?"undefined":S(e))?e:this).scratch().dagre;return function(e){if(r.boundingBox){var n=0===w.w?0:(e.x-w.x1)/w.w,t=0===w.h?0:(e.y-w.y1)/w.h;return{x:o.x1+n*o.w,y:o.y1+t*o.h}}return e}({x:n.x,y:n.y})}),this},e.exports=i},function(e,n,t){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(1<e?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach(function(n){Object.keys(n).forEach(function(e){return t[e]=n[e]})}),t}},function(e,n,t){"use strict";var r={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,ranker:void 0,minLen:function(e){return 1},edgeWeight:function(e){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(e,n){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(e,n){return n},ready:function(){},stop:function(){}};e.exports=r},function(e,n,t){"use strict";var r=t(0),o=function(e){e&&e("layout","dagre",r)};"undefined"!=typeof cytoscape&&o(cytoscape),e.exports=o},function(e,n){e.exports=t}])});
//# sourceMappingURL=/sm/653f14dc85cb194fee69b74fe6b9b034938c93f534910af207b005ce64ca3a02.map
|