UNPKG

react-sigma

Version:

Lightweight but powerful library for drawing network graphs built on top of SigmaJS

1 lines 1.78 kB
var Sigma=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=180)}({180:function(e,t){(function(){(function(e){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.parsers"),sigma.utils.pkg("sigma.utils"),sigma.utils.xhr=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;var e,t;if(window.ActiveXObject)for(t in e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"])try{return new ActiveXObject(e[t])}catch(e){}return null},sigma.parsers.json=function(e,t,n){var r,o=sigma.utils.xhr();if(!o)throw"XMLHttpRequest not supported, cannot load the file.";o.open("GET",e,!0),o.onreadystatechange=function(){4===o.readyState&&(r=JSON.parse(o.responseText),t instanceof sigma?(t.graph.clear(),t.graph.read(r)):"object"==typeof t?(t.graph=r,t=new sigma(t)):"function"==typeof t&&(n=t,t=null),n&&n(t||r))},o.send()}}).call(this)}).call(window)}});