vis.js is a dynamic, browser-based visualization library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
492 KiB

  1. /**
  2. * vis.js
  3. * https://github.com/almende/vis
  4. *
  5. * A dynamic, browser-based visualization library.
  6. *
  7. * @version 4.0.0-SNAPSHOT
  8. * @date 2015-04-24
  9. *
  10. * @license
  11. * Copyright (C) 2011-2014 Almende B.V, http://almende.com
  12. *
  13. * Vis.js is dual licensed under both
  14. *
  15. * * The Apache 2.0 License
  16. * http://www.apache.org/licenses/LICENSE-2.0
  17. *
  18. * and
  19. *
  20. * * The MIT License
  21. * http://opensource.org/licenses/MIT
  22. *
  23. * Vis.js may be distributed under either license.
  24. */
  25. "use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.vis=e():t.vis=e()}(this,function(){return function(t){function e(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){e.util=i(1),e.DOMutil=i(2),e.DataSet=i(3),e.DataView=i(4),e.Queue=i(5),e.Graph3d=i(6),e.graph3d={Camera:i(7),Filter:i(8),Point2d:i(9),Point3d:i(10),Slider:i(11),StepNumber:i(12)},e.Timeline=i(13),e.Graph2d=i(14),e.timeline={DateUtil:i(15),DataStep:i(16),Range:i(17),stack:i(18),TimeStep:i(19),components:{items:{Item:i(20),BackgroundItem:i(21),BoxItem:i(22),PointItem:i(23),RangeItem:i(24)},Component:i(25),CurrentTime:i(26),CustomTime:i(27),DataAxis:i(28),GraphGroup:i(29),Group:i(30),BackgroundGroup:i(31),ItemSet:i(32),Legend:i(33),LineGraph:i(34),TimeAxis:i(35)}},e.Network=i(36),e.network={Images:i(37),dotparser:i(38),gephiParser:i(39)},e.Graph=function(){throw new Error("Graph is renamed to Network. Please create a graph as new vis.Network(...)")},e.moment=i(40),e.hammer=i(41),e.Hammer=i(41)},function(t,e,i){var o=i(40);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){for(;1==t.hasChildNodes();)e.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},e.giveRange=function(t,e,i,o){if(e==t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)},e.isString=function(t){return t instanceof String||"string"==typeof t},e.isDate=function(t){if(t instanceof Date)return!0;if(e.isString(t)){var i=n.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.isDataTable=function(t){return"undefined"!=typeof google&&google.visualization&&google.visualization.DataTable&&t instanceof google.visualization.DataTable},e.randomUUID=function(){var t=function(){return Math.floor(65536*Math.random()).toString(16)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},e.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!=typeof t[i]&&(t[i]=e)},e.fillIfDefined=function(t,e){for(var i in t)void 0!==e[i]&&"object"!=typeof e[i]&&(t[i]=e[i])},e.protoExtend=function(t,e){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var n in o)t[n]=o[n]}return t},e.extend=function(t,e){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])}return t},e.selectiveExtend=function(t,e,i){if(!Array.isArray(t))throw new Error("Array with property names expected as first argument");for(var o=2;o<arguments.length;o++)for(var n=arguments[o],s=0;s<t.length;s++){var r=t[s];n.hasOwnProperty(r)&&(e[r]=n[r])}return e},e.selectiveDeepExtend=function(t,i,o){if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var n=2;n<arguments.length;n++)for(var s=arguments[n],r=0;r<t.length;r++){var a=t[r];if(s.hasOwnProperty(a))if(o[a]&&o[a].constructor===Object)void 0===i[a]&&(i[a]={}),i[a].constructor===Object?e.deepExtend(i[a],o[a]):i[a]=o[a];else{if(Array.isArray(o[a]))throw new TypeError("Arrays are not supported by deepExtend");i[a]=o[a]}}return i},e.selectiveNotDeepExtend=function(t,i,o){if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var n in o)if(o.hasOwnProperty(n)&&-1==t.indexOf(n))if(o[n]&&o[n].constructor===Object)void 0===i[n]&&(i[n]={}),i[n].constructor===Object?e.deepExtend(i[n],o[n]):i[n]=o[n];else{if(Array.isArray(o[n]))throw new TypeError("Arrays are not supported by deepExtend");i[n]=o[n]}return i},e.deepExtend=function(t,i,o){for(var n in i)if(i.hasOwnProperty(n)||o===!0)if(i[n]&&i[n].constructor===Object)void 0===t[n]&&(t[n]={}),t[n].constructor===Object?e.deepExtend(t[n],i[n],o):t[n]=i[n];else if(Array.isArray(i[n])){t[n]=[];for(var s=0;s<i[n].length;s++)t[n].push(i[n][s])}else t[n]=i[n];return t},e.equalArray=function(t,e){if(t.length!=e.length)return!1;for(var i=0,o=t.length;o>i;i++)if(t[i]!=e[i])return!1;return!0},e.convert=fu
  26. return t.length},o.prototype.getNumberOfColumns=function(t){var e=0;for(var i in t[0])t[0].hasOwnProperty(i)&&e++;return e},o.prototype.getDistinctValues=function(t,e){for(var i=[],o=0;o<t.length;o++)-1==i.indexOf(t[o][e])&&i.push(t[o][e]);return i},o.prototype.getColumnRange=function(t,e){for(var i={min:t[0][e],max:t[0][e]},o=0;o<t.length;o++)i.min>t[o][e]&&(i.min=t[o][e]),i.max<t[o][e]&&(i.max=t[o][e]);return i},o.prototype._dataInitialize=function(t,e){var i=this;if(this.dataSet&&this.dataSet.off("*",this._onChange),void 0!==t){Array.isArray(t)&&(t=new a(t));var n;if(!(t instanceof a||t instanceof h))throw new Error("Array, DataSet, or DataView expected");if(n=t.get(),0!=n.length){this.dataSet=t,this.dataTable=n,this._onChange=function(){i.setData(i.dataSet)},this.dataSet.on("*",this._onChange),this.colX="x",this.colY="y",this.colZ="z",this.colValue="style",this.colFilter="filter",n[0].hasOwnProperty("filter")&&void 0===this.dataFilter&&(this.dataFilter=new p(t,this.colFilter,this),this.dataFilter.setOnLoadCallback(function(){i.redraw()}));var s=this.style==o.STYLE.BAR||this.style==o.STYLE.BARCOLOR||this.style==o.STYLE.BARSIZE;if(s){if(void 0!==this.defaultXBarWidth)this.xBarWidth=this.defaultXBarWidth;else{var r=this.getDistinctValues(n,this.colX);this.xBarWidth=r[1]-r[0]||1}if(void 0!==this.defaultYBarWidth)this.yBarWidth=this.defaultYBarWidth;else{var d=this.getDistinctValues(n,this.colY);this.yBarWidth=d[1]-d[0]||1}}var l=this.getColumnRange(n,this.colX);s&&(l.min-=this.xBarWidth/2,l.max+=this.xBarWidth/2),this.xMin=void 0!==this.defaultXMin?this.defaultXMin:l.min,this.xMax=void 0!==this.defaultXMax?this.defaultXMax:l.max,this.xMax<=this.xMin&&(this.xMax=this.xMin+1),this.xStep=void 0!==this.defaultXStep?this.defaultXStep:(this.xMax-this.xMin)/5;var u=this.getColumnRange(n,this.colY);s&&(u.min-=this.yBarWidth/2,u.max+=this.yBarWidth/2),this.yMin=void 0!==this.defaultYMin?this.defaultYMin:u.min,this.yMax=void 0!==this.defaultYMax?this.defaultYMax:u.max,this.yMax<=this.yMin&&(this.yMax=this.yMin+1),this.yStep=void 0!==this.defaultYStep?this.defaultYStep:(this.yMax-this.yMin)/5;var c=this.getColumnRange(n,this.colZ);if(this.zMin=void 0!==this.defaultZMin?this.defaultZMin:c.min,this.zMax=void 0!==this.defaultZMax?this.defaultZMax:c.max,this.zMax<=this.zMin&&(this.zMax=this.zMin+1),this.zStep=void 0!==this.defaultZStep?this.defaultZStep:(this.zMax-this.zMin)/5,void 0!==this.colValue){var f=this.getColumnRange(n,this.colValue);this.valueMin=void 0!==this.defaultValueMin?this.defaultValueMin:f.min,this.valueMax=void 0!==this.defaultValueMax?this.defaultValueMax:f.max,this.valueMax<=this.valueMin&&(this.valueMax=this.valueMin+1)}this._setScale()}}},o.prototype._getDataPoints=function(t){var e,i,n,s,r,a,h=[];if(this.style===o.STYLE.GRID||this.style===o.STYLE.SURFACE){var d=[],u=[];for(n=0;n<this.getNumberOfRows(t);n++)e=t[n][this.colX]||0,i=t[n][this.colY]||0,-1===d.indexOf(e)&&d.push(e),-1===u.indexOf(i)&&u.push(i);var c=function(t,e){return t-e};d.sort(c),u.sort(c);var p=[];for(n=0;n<t.length;n++){e=t[n][this.colX]||0,i=t[n][this.colY]||0,s=t[n][this.colZ]||0;var f=d.indexOf(e),m=u.indexOf(i);void 0===p[f]&&(p[f]=[]);var v=new l;v.x=e,v.y=i,v.z=s,r={},r.point=v,r.trans=void 0,r.screen=void 0,r.bottom=new l(e,i,this.zMin),p[f][m]=r,h.push(r)}for(e=0;e<p.length;e++)for(i=0;i<p[e].length;i++)p[e][i]&&(p[e][i].pointRight=e<p.length-1?p[e+1][i]:void 0,p[e][i].pointTop=i<p[e].length-1?p[e][i+1]:void 0,p[e][i].pointCross=e<p.length-1&&i<p[e].length-1?p[e+1][i+1]:void 0)}else for(n=0;n<t.length;n++)a=new l,a.x=t[n][this.colX]||0,a.y=t[n][this.colY]||0,a.z=t[n][this.colZ]||0,void 0!==this.colValue&&(a.value=t[n][this.colValue]||0),r={},r.point=a,r.bottom=new l(a.x,a.y,this.zMin),r.trans=void 0,r.screen=void 0,h.push(r);return h},o.prototype.create=function(){for(;this.containerElement.hasChildNodes();)this.containerElement.removeChild(this.containerElement.firstChild);this.frame=document.createElement("div"),this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.canvas=document.createElement("canvas")
  27. this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(4);o.prototype.isLoaded=function(){return this.loaded},o.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},o.prototype.getLabel=function(){return this.graph.filterLabel},o.prototype.getColumn=function(){return this.column},o.prototype.getSelectedValue=function(){return void 0===this.index?void 0:this.values[this.index]},o.prototype.getValues=function(){return this.values},o.prototype.getValue=function(t){if(t>=this.values.length)throw"Error: index out of range";return this.values[t]},o.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];var e;if(this.dataPoints[t])e=this.dataPoints[t];else{var i={};i.column=this.column,i.value=this.values[t];var o=new n(this.data,{filter:function(t){return t[i.column]==i.value}}).get();e=this.graph._getDataPoints(o),this.dataPoints[t]=e}return e},o.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},o.prototype.selectValue=function(t){if(t>=this.values.length)throw"Error: index out of range";this.index=t,this.value=this.values[t]},o.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t<this.values.length){{this._getDataPoints(t)}void 0===e.progress&&(e.progress=document.createElement("DIV"),e.progress.style.position="absolute",e.progress.style.color="gray",e.appendChild(e.progress));var i=this.getLoadedProgress();e.progress.innerHTML="Loading animation... "+i+"%",e.progress.style.bottom="60px",e.progress.style.left="10px";var o=this;setTimeout(function(){o.loadInBackground(t+1)},10),this.loaded=!1}else this.loaded=!0,void 0!==e.progress&&(e.removeChild(e.progress),e.progress=void 0),this.onLoadCallback&&this.onLoadCallback()},t.exports=o},function(t,e,i){function o(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=o},function(t,e,i){function o(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}o.subtract=function(t,e){var i=new o;return i.x=t.x-e.x,i.y=t.y-e.y,i.z=t.z-e.z,i},o.add=function(t,e){var i=new o;return i.x=t.x+e.x,i.y=t.y+e.y,i.z=t.z+e.z,i},o.avg=function(t,e){return new o((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},o.crossProduct=function(t,e){var i=new o;return i.x=t.y*e.z-t.z*e.y,i.y=t.z*e.x-t.x*e.z,i.z=t.x*e.y-t.y*e.x,i},o.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=o},function(t,e,i){function o(t,e){if(void 0===t)throw"Error: No container element defined";if(this.container=t,this.visible=e&&void 0!=e.visible?e.visible:!0,this.visible){this.frame=document.createElement("DIV"),this.frame.style.width="100%",this.frame.style.position="relative",this.container.appendChild(this.frame),this.frame.prev=document.createElement("INPUT"),this.frame.prev.type="BUTTON",this.frame.prev.value="Prev",this.frame.appendChild(this.frame.prev),this.frame.play=document.createElement("INPUT"),this.frame.play.type="BUTTON",this.frame.play.value="Play",this.frame.appendChild(this.frame.play),this.frame.next=document.createElement("INPUT"),this.frame.next.type="BUTTON",this.frame.next.value="Next",this.frame.appendChild(this.frame.next),this.frame.bar=document.createElement("INPUT"),this.frame.bar.type="BUTTON",this.frame.bar.style.position="absolute",this.frame.bar.style.border="1px solid red",this.frame.bar.style.width="100px",this.frame.bar.style.height="6px",this.frame.bar.style.borderRadius="2px",this.frame.bar.style.MozBorderRadius="2px",this.frame.bar.style.border="1px solid #7F7F7F",this.frame.bar.style.backgroundColor="#E5E5E5",this.frame.appendChild(this.frame.bar),this.frame.slide=document.createElement("INPUT"),this.frame.slide.type="BUTTON",this.frame.slide.style.margin="0px",this.frame.slide.value=" ",this.frame.slide.style.position="relative",this.frame.slide.style.left="-100px",this.frame.appendChild(this.frame.slide);var i=this;this.frame.slide.onmousedown=function(t){i._onMouseDown(t)},this.frame.prev.onclick=f
  28. (h!=r||l!=a)&&(r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0},o.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},o.prototype.moveTo=function(t){var e=(this.start+this.end)/2,i=e-t,o=this.start-i,n=this.end-i;this.setRange(o,n)},t.exports=o},function(t,e,i){var o=.001;e.orderByStart=function(t){t.sort(function(t,e){return t.data.start-e.data.start})},e.orderByEnd=function(t){t.sort(function(t,e){var i="end"in t.data?t.data.end:t.data.start,o="end"in e.data?e.data.end:e.data.start;return i-o})},e.stack=function(t,i,o){var n,s;if(o)for(n=0,s=t.length;s>n;n++)t[n].top=null;for(n=0,s=t.length;s>n;n++){var r=t[n];if(r.stack&&null===r.top){r.top=i.axis;do{for(var a=null,h=0,d=t.length;d>h;h++){var l=t[h];if(null!==l.top&&l!==r&&l.stack&&e.collision(r,l,i.item)){a=l;break}}null!=a&&(r.top=a.top+a.height+i.item.vertical)}while(a)}}},e.nostack=function(t,e,i){var o,n,s;for(o=0,n=t.length;n>o;o++)if(void 0!==t[o].data.subgroup){s=e.axis;for(var r in i)i.hasOwnProperty(r)&&1==i[r].visible&&i[r].index<i[t[o].data.subgroup].index&&(s+=i[r].height+e.item.vertical);t[o].top=s}else t[o].top=e.axis},e.collision=function(t,e,i){return t.left-i.horizontal+o<e.left+e.width&&t.left+t.width+i.horizontal-o>e.left&&t.top-i.vertical+o<e.top+e.height&&t.top+t.height+i.vertical-o>e.top}},function(t,e,i){function o(t,e,i,n){this.current=new Date,this._start=new Date,this._end=new Date,this.autoScale=!0,this.scale="day",this.step=1,this.setRange(t,e,i),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,this.hiddenDates=n,void 0===n&&(this.hiddenDates=[]),this.format=o.FORMAT}var n=i(40),s=i(15),r=i(1);o.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",month:"YYYY",year:""}},o.prototype.setFormat=function(t){var e=r.deepExtend({},o.FORMAT);this.format=r.deepExtend(e,t)},o.prototype.setRange=function(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=void 0!=t?new Date(t.valueOf()):new Date,this._end=void 0!=e?new Date(e.valueOf()):new Date,this.autoScale&&this.setMinimumStep(i)},o.prototype.first=function(){this.current=new Date(this._start.valueOf()),this.roundToMinor()},o.prototype.roundToMinor=function(){switch(this.scale){case"year":this.current.setFullYear(this.step*Math.floor(this.current.getFullYear()/this.step)),this.current.setMonth(0);case"month":this.current.setDate(1);case"day":case"weekday":this.current.setHours(0);case"hour":this.current.setMinutes(0);case"minute":this.current.setSeconds(0);case"second":this.current.setMilliseconds(0)}if(1!=this.step)switch(this.scale){case"millisecond":this.current.setMilliseconds(this.current.getMilliseconds()-this.current.getMilliseconds()%this.step);break;case"second":this.current.setSeconds(this.current.getSeconds()-this.current.getSeconds()%this.step);break;case"minute":this.current.setMinutes(this.current.getMinutes()-this.current.getMinutes()%this.step);break;case"hour":this.current.setHours(this.current.getHours()-this.current.getHours()%this.step);break;case"weekday":case"day":this.current.setDate(this.current.getDate()-1-(this.current.getDate()-1)%this.step+1);break;case"month":this.current.setMonth(this.current.getMonth()-this.current.getMonth()%this.step);break;case"year":this.current.setFullYear(this.current.getFullYear()-this.current.getFullYear()%this.step)}},o.prototype.hasNext=function(){return this.current.valueOf()<=this._end.valueOf()},o.prototype.next=function(){var t=this.current.valueOf();if(this.current.getMonth()<6)switch(this.scale){case"millisecond":this.current=new Date(this.current.valueOf()+this.step);break;case"second":this.current=new Date(this.current.valueOf()+1e3*this.step);break;case"minute":this.current=new Date(this.current.valueOf()+1e3*this.step*60);break;case"hour":this.current=new Date(this.cu
  29. },o.prototype.updateGroup=function(t,e){this.groups[t]=e},o.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},o.prototype.setOptions=function(t){if(t){var e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);var i=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","customRange","title","format","alignZeros"];n.selectiveExtend(i,this.options,t),this.minWidth=Number((""+this.options.width).replace("px","")),1==e&&this.dom.frame&&(this.hide(),this.show())}},o.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)},o.prototype._redrawGroupIcons=function(){s.prepareElements(this.svgElements);var t,e=this.options.iconWidth,i=15,o=4,n=o+.5*i;t="left"==this.options.orientation?o:this.width-e-o;for(var r in this.groups)this.groups.hasOwnProperty(r)&&(1!=this.groups[r].visible||void 0!==this.linegraphOptions.visibility[r]&&1!=this.linegraphOptions.visibility[r]||(this.groups[r].drawIcon(t,n,this.svgElements,this.svg,e,i),n+=i+o));s.cleanupElements(this.svgElements),this.iconsRemoved=!1},o.prototype._cleanupIcons=function(){0==this.iconsRemoved&&(s.prepareElements(this.svgElements),s.cleanupElements(this.svgElements),this.iconsRemoved=!0)},o.prototype.show=function(){this.hidden=!1,this.dom.frame.parentNode||("left"==this.options.orientation?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer)},o.prototype.hide=function(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.parentNode&&this.dom.lineContainer.parentNode.removeChild(this.dom.lineContainer)},o.prototype.setRange=function(t,e){0==this.master&&1==this.options.alignZeros&&-1!=this.zeroCrossing&&t>0&&(t=0),this.range.start=t,this.range.end=e},o.prototype.redraw=function(){var t=!1,e=0;this.dom.lineContainer.style.top=this.body.domProps.scrollTop+"px";for(var i in this.groups)this.groups.hasOwnProperty(i)&&(1!=this.groups[i].visible||void 0!==this.linegraphOptions.visibility[i]&&1!=this.linegraphOptions.visibility[i]||e++);if(0==this.amountOfGroups||0==e)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace("px","")),this.dom.lineContainer.style.height=this.height+"px",this.width=1==this.options.visible?Number((""+this.options.width).replace("px","")):0;var o=this.props,n=this.dom.frame;n.className="vis-data-axis",this._calculateCharSize();var s=this.options.orientation,r=this.options.showMinorLabels,a=this.options.showMajorLabels;o.minorLabelHeight=r?o.minorCharHeight:0,o.majorLabelHeight=a?o.majorCharHeight:0,o.minorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.minorLinesOffset,o.minorLineHeight=1,o.majorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.majorLinesOffset,o.majorLineHeight=1,"left"==s?(n.style.top="0",n.style.left="0",n.style.bottom="",n.style.width=this.width+"px",n.style.height=this.height+"px",this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(n.style.top="",n.style.bottom="0",n.style.left="0",n.style.width=this.width+"px",n.style.height=this.height+"px",this.props.width=this.body.domProps.right.width,this.props.height=this.body.dom
  30. t.parent&&t.parent.remove(t)},o.prototype._constructByEndArray=function(t){for(var e=[],i=0;i<t.length;i++)t[i]instanceof f&&e.push(t[i]);return e},o.prototype._onTouch=function(t){this.touchParams.item=this.itemFromTarget(t),this.touchParams.dragLeftItem=t.target.dragLeftItem||!1,this.touchParams.dragRightItem=t.target.dragRightItem||!1,this.touchParams.itemProps=null},o.prototype._onDragStart=function(t){if(this.options.editable.updateTime||this.options.editable.updateGroup){var e,i=this.touchParams.item||null,o=this;if(i&&i.selected){var n=this.touchParams.dragLeftItem,r=this.touchParams.dragRightItem;n?(e={item:n,initialX:t.center.x,dragLeft:!0,data:s.extend({},i.data)},this.touchParams.itemProps=[e]):r?(e={item:r,initialX:t.center.x,dragRight:!0,data:s.extend({},i.data)},this.touchParams.itemProps=[e]):this.touchParams.itemProps=this.getSelection().map(function(e){var i=o.items[e],n={item:i,initialX:t.center.x,data:s.extend({},i.data)};return n}),t.stopPropagation()}else this.options.editable.add&&t.srcEvent.ctrlKey&&this._onDragStartAddItem(t)}},o.prototype._onDragStartAddItem=function(t){var e=this.options.snap||null,i=s.getAbsoluteLeft(this.dom.frame),o=t.center.x-i-10,n=this.body.util.toTime(o),r=this.body.util.getScale(),a=this.body.util.getStep(),h=e?e(n,r,a):h,d=h,l={type:"range",start:h,end:d,content:"new item"},u=s.randomUUID();l[this.itemsData._fieldId]=u;var c=this.groupFromTarget(t);c&&(l.group=c.groupId);var p=new f(l,this.conversion,this.options);p.id=u,p.data=l,this._addItem(p);var m={item:p,dragRight:!0,initialX:t.center.x,data:s.extend({},l)};this.touchParams.itemProps=[m],t.stopPropagation()},o.prototype._onDrag=function(t){if(this.touchParams.itemProps){t.stopPropagation();var e=this,i=this.options.snap||null,o=this.body.dom.root.offsetLeft+this.body.domProps.left.width,n=this.body.util.getScale(),r=this.body.util.getStep();this.touchParams.itemProps.forEach(function(a){var h=e.body.util.toTime(t.center.x-o),d=e.body.util.toTime(a.initialX-o),l=h-d,u=s.extend({},a.item.data);if(e.options.editable.updateTime)if(a.dragLeft){if(void 0!=u.start){var c=s.convert(a.data.start,"Date"),p=new Date(c.valueOf()+l);u.start=i?i(p,n,r):p}}else if(a.dragRight){if(void 0!=u.end){var f=s.convert(a.data.end,"Date"),m=new Date(f.valueOf()+l);u.end=i?i(m,n,r):m}}else if(void 0!=u.start){var c=s.convert(a.data.start,"Date").valueOf(),p=new Date(c+l);if(void 0!=u.end){var f=s.convert(a.data.end,"Date"),v=f.valueOf()-c.valueOf();u.start=i?i(p,n,r):p,u.end=new Date(u.start.valueOf()+v)}else u.start=i?i(p,n,r):p}if(e.options.editable.updateGroup&&!a.dragLeft&&!a.dragRight&&void 0!=u.group){var g=e.groupFromTarget(t);g&&(u.group=g.groupId)}e.options.onMoving(u,function(t){t&&a.item.setData(t)})}),this.stackDirty=!0,this.body.emitter.emit("change")}},o.prototype._moveToGroup=function(t,e){var i=this.groups[e];if(i&&i.groupId!=t.data.group){var o=t.parent;o.remove(t),o.order(),i.add(t),i.order(),t.data.group=i.groupId}},o.prototype._onDragEnd=function(t){if(this.touchParams.itemProps){t.stopPropagation();var e=[],i=this,o=this.itemsData.getDataSet(),n=this.touchParams.itemProps;this.touchParams.itemProps=null,n.forEach(function(t){var n=t.item.id,r=null!=i.itemsData.get(n,i.itemOptions);if(r){var a=s.extend({},t.item.data);i.options.onMove(a,function(s){s?(s[o._fieldId]=n,e.push(s)):(t.item.setData(t.data),i.stackDirty=!0,i.body.emitter.emit("change"))})}else i.options.onAdd(t.item.data,function(e){i._removeItem(t.item),e&&i.itemsData.getDataSet().add(e),i.stackDirty=!0,i.body.emitter.emit("change")})}),e.length&&o.update(e)}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&t.srcEvent.ctrlKey,i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var o=this.getSelection(),n=this.itemFromTarget(t),s=n?[n.id]:[];this.setSelection(s);var r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r})}},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemF
  31. this.physics=new c["default"](this.body),this.layoutEngine=new O["default"](this.body),this.clustering=new f["default"](this.body),this.manipulation=new C["default"](this.body,this.canvas,this.selectionHandler),this.nodesHandler=new h["default"](this.body,s,this.groups,this.layoutEngine),this.edgesHandler=new l["default"](this.body,s,this.groups),this.configurationSystem=new S["default"](this),this.canvas._create(),this.setOptions(i),this.setData(e)}var n=function(t){return t&&t.__esModule?t:{"default":t}},s=i(49),r=n(s),a=i(50),h=n(a),d=i(51),l=n(d),u=i(52),c=n(u),p=i(53),f=n(p),m=i(54),v=n(m),g=i(55),y=n(g),b=i(56),w=n(b),_=i(57),x=n(_),k=i(58),M=n(k),D=i(59),O=n(D),T=i(60),C=n(T),E=i(61),S=n(E),P=i(62),I=n(P);i(63);var N=i(42),A=(i(41),i(1)),z=(i(3),i(4),i(38)),R=i(39),L=i(37),F=i(64);N(o.prototype),o.prototype.setOptions=function(t){if(void 0!==t){var e=I["default"].validate(t);e===!0&&(t={},console.error("Errors have been found in the supplied options object. None of the options will be used.")),t=this.layoutEngine.setOptions(t.layout,t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.canvas.setOptions(t.canvas),this.renderer.setOptions(t.rendering),this.view.setOptions(t.view),this.interactionHandler.setOptions(t.interaction),this.selectionHandler.setOptions(t.selection),this.clustering.setOptions(t.clustering),this.manipulation.setOptions(t.manipulation),this.configurationSystem.setOptions(t),void 0!==t.clickToUse?t.clickToUse===!0?void 0===this.activator&&(this.activator=new F(this.frame),this.activator.on("change",this._createKeyBinds.bind(this))):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},o.prototype._updateVisibleIndices=function(){var t=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var i in t)t.hasOwnProperty(i)&&t[i].options.hidden===!1&&this.body.nodeIndices.push(i);for(var o in e)e.hasOwnProperty(o)&&e[o].options.hidden===!1&&this.body.edgeIndices.push(o)},o.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(e){t._updateVisibleIndices(),t.physics.updatePhysicsIndices(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation")})},o.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){if(t&&t.dot){var e=z.DOTToGraph(t.dot);return void this.setData(e)}}else if(t&&t.gephi){if(t&&t.gephi){var i=R.parseGephi(t.gephi);return void this.setData(i)}}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("initPhysics")},o.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),A.recursiveDOMDelete(this.body.container)},o.prototype._updateValueRange=function(t){var e,i=void 0,o=void 0,n=0;for(e in t)if(t.hasOwnProperty(e)){var s=t[e].getValue();void 0!==s&&(i=void 0===i?s:Math.min(s,i),o=void 0===o?s:Math.max(s,o),n+=s)}if(void 0!==i&&void 0!==o)for(e in t)t.hasOwnProperty(e)&&t[e].setValueRange(i,o,n)},o.prototype.isActive=function(){return!this.activator||this.activator.active},t.exports=o},function(t,e,i){function o(t){this.images={},this.imageBroken={},this.callback=t}o.prototype.load=function(t,e){var i=this.images[t];if(void 0===i){var o=this;i=new Image,i.onload=function(){0===this.width&&(document.body.appendChild(this),this.width=this.offsetWidth,this.height=this.offsetHeight,document.body.removeChild(this)),o.call
  32. n=0,"left"==e.options.barChart.align?n-=.5*e.options.barChart.width:"right"==e.options.barChart.align&&(n+=.5*e.options.barChart.width)),{width:o,offset:n}},o.getStackedBarYRange=function(t,e,i,n,s){if(t.length>0){t.sort(function(t,e){return t.x==e.x?t.groupId-e.groupId:t.x-e.x});var r={};o._getDataIntersections(r,t),e[n]=o._getStackedBarYRange(r,t),e[n].yAxisOrientation=s,i.push(n)}},o._getStackedBarYRange=function(t,e){for(var i,o=e[0].y,n=e[0].y,s=0;s<e.length;s++)i=e[s].x,void 0===t[i]?(o=o>e[s].y?e[s].y:o,n=n<e[s].y?e[s].y:n):t[i].accumulated+=e[s].y;for(var r in t)t.hasOwnProperty(r)&&(o=o>t[r].accumulated?t[r].accumulated:o,n=n<t[r].accumulated?t[r].accumulated:n);return{min:o,max:n}},t.exports=o},function(t,e,i){function o(t,e){this.groupId=t,this.options=e}var n=i(2);o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;o<t.length;o++)e=e>t[o].y?t[o].y:e,i=i<t[o].y?t[o].y:i;return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},o.prototype.draw=function(t,e,i,n){o.draw(t,e,i,n)},o.draw=function(t,e,i,o){void 0===o&&(o=0);for(var s=0;s<t.length;s++)n.drawPoint(t[s].x+o,t[s].y,e,i.svgElements,i.svg,t[s].label)},t.exports=o},function(t,e,i){var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}();Object.defineProperty(e,"__esModule",{value:!0});var s=i(1),r=function(){function t(){o(this,t),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D
  33. return h>o&&(h=o),h}}]),t}();e["default"]=d,t.exports=e["default"]},function(t,e,i){var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}();Object.defineProperty(e,"__esModule",{value:!0}),"undefined"!=typeof window&&(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame);var s=i(1),r=function(){function t(e,i){var n=this;o(this,t),this.body=e,this.canvas=i,this.redrawRequested=!1,this.renderTimer=!1,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.pixelRatio=void 0,this.allowRedrawRequests=!0,this.dragging=!1,this.body.emitter.on("dragStart",function(){n.dragging=!0}),this.body.emitter.on("dragEnd",function(){return n.dragging=!1}),this.body.emitter.on("_redraw",function(){n.renderingActive===!1&&n._redraw()}),this.body.emitter.on("_blockRedrawRequests",function(){n.allowRedrawRequests=!1}),this.body.emitter.on("_allowRedrawRequests",function(){n.allowRedrawRequests=!0}),this.body.emitter.on("_requestRedraw",this._requestRedraw.bind(this)),this.body.emitter.on("_startRendering",function(){n.renderRequests+=1,n.renderingActive=!0,n._startRendering()}),this.body.emitter.on("_stopRendering",function(){n.renderRequests-=1,n.renderingActive=n.renderRequests>0}),this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideNodesOnDrag:!1},s.extend(this.options,this.defaultOptions),this._determineBrowserMethod()}return n(t,[{key:"setOptions",value:function(t){void 0!==t&&s.deepExtend(this.options,t)}},{key:"_startRendering",value:function(){this.renderingActive===!0&&(this.renderTimer||(this.requiresTimeout===!0?this.renderTimer=window.setTimeout(this._renderStep.bind(this),this.simulationInterval):this.renderTimer=window.requestAnimationFrame(this._renderStep.bind(this))))}},{key:"_renderStep",value:function(){this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering()}},{key:"redraw",value:function(){this._redraw()}},{key:"_requestRedraw",value:function(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedrawRequests===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(this._redraw.bind(this,!1),0):window.requestAnimationFrame(this._redraw.bind(this,!1)))}},{key:"_redraw",value:function(){var t=void 0===arguments[0]?!1:arguments[0];this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var e=this.canvas.frame.canvas.getContext("2d");(0===this.canvas.frame.canvas.width||0===this.canvas.frame.canvas.height)&&this.canvas.setSize(),void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;e.clearRect(0,0,i,o),this.body.emitter.emit("beforeDrawing",e),e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),t===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&this._drawEdges(e),(this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1)&&this._drawNodes(e,t),this.controlNodesActive===!0&&this._drawControlNodes(e),this.body.emitter.emit("afterDrawing",e),e.restore(),t===!0&&e.clearRect(0,0,i,o)}},{key:"_drawNodes",value:function(t){for(var e,i=void 0===arguments[1]?!1:arguments[1],o=this.body.nodes,n=this.body.nodeIndices,s=[],r=0;r<n.length;r++)e=o[n[r]],e.isSelected()?s.push(n[r]):(i===!0&&e.draw(t),e.draw(t));for(var r=0;r<s.length;r++)e=o[s[r]],e.draw(t)}},{key:"_drawEdges",value:f
  34. value:function(t){for(var e=0;e<t.edges.length;e++){var i=t.edges[e];i.select(),this._addToSelection(i)}}},{key:"_hoverConnectedEdges",value:function(t){for(var e=0;e<t.edges.length;e++){var i=t.edges[e];i.hover=!0,this._addToHover(i)}}},{key:"_unselectConnectedEdges",value:function(t){for(var e=0;e<t.edges.length;e++){var i=t.edges[e];i.unselect(),this._removeFromSelection(i)}}},{key:"blurObject",value:function(t){t.hover===!0&&(t.hover=!1,this.body.emitter.emit("blurNode",{node:t.id}))}},{key:"hoverObject",value:function(t){t.hover===!1&&(t.hover=!0,this._addToHover(t),t instanceof s&&this.body.emitter.emit("hoverNode",{node:t.id})),t instanceof s&&this._hoverConnectedEdges(t)}},{key:"getSelection",value:function(){var t=this.getSelectedNodes(),e=this.getSelectedEdges();return{nodes:t,edges:e}}},{key:"getSelectedNodes",value:function(){var t=[];if(this.options.select===!0)for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&t.push(e);return t}},{key:"getSelectedEdges",value:function(){var t=[];if(this.options.select===!0)for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&t.push(e);return t}},{key:"selectNodes",value:function(t){var e=void 0===arguments[1]?!0:arguments[1],i=void 0,o=void 0;if(!t||void 0===t.length)throw"Selection must be an array with ids";for(this.unselectAll(),i=0;i<t.length;i++){o=t[i];var n=this.body.nodes[o];if(!n)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(n,e)}this.body.emitter.emit("_requestRedraw")}},{key:"selectEdges",value:function(t){var e=void 0,i=void 0;if(!t||void 0===t.length)throw"Selection must be an array with ids";for(this.unselectAll(),e=0;e<t.length;e++){i=t[e];var o=this.body.edges[i];if(!o)throw new RangeError('Edge with id "'+i+'" not found');this.selectObject(o)}this.body.emitter.emit("_requestRedraw")}},{key:"updateSelection",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(this.body.nodes.hasOwnProperty(t)||delete this.selectionObj.nodes[t]);for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(this.body.edges.hasOwnProperty(e)||delete this.selectionObj.edges[e])}}]),t}();e["default"]=a,t.exports=e["default"]},function(t,e,i){var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}();Object.defineProperty(e,"__esModule",{value:!0});var s=i(1),r=function(){function t(e){var i=this;o(this,t),this.body=e,this.initialRandomSeed=Math.round(1e6*Math.random()),this.randomSeed=this.initialRandomSeed,this.options={},this.optionsBackup={},this.defaultOptions={randomSeed:void 0,hierarchical:{enabled:!1,levelSeparation:150,direction:"UD",sortMethod:"hubsize"}},s.extend(this.options,this.defaultOptions),this.hierarchicalLevels={},this.body.emitter.on("_dataChanged",function(){i.setupHierarchicalLayout()}),this.body.emitter.on("_resetHierarchicalLayout",function(){i.setupHierarchicalLayout(),i.body.emitter.emit("fit",{duration:0})})}return n(t,[{key:"setOptions",value:function(t,e){if(void 0!==t){var i=this.options.hierarchical.enabled;if(s.mergeOptions(this.options,t,"hierarchical"),void 0!==t.randomSeed&&(this.randomSeed=t.randomSeed),this.options.hierarchical.enabled===!0)return"RL"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?this.options.hierarchical.levelSeparation>0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptions(e);if(i===!0)return this.body.emitter.emit("refresh"),s.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptions",value:function(t){if(this.options.hierarchical.enabled===!0){void 0===t.physics||t.physics===!0?(t.physics={solve
  35. levelSeparation:[150,20,500,5],direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"]}},interaction:{dragNodes:!0,dragView:!0,zoomView:!0,hoverEnabled:!1,navigationButtons:!1,tooltipDelay:[300,0,1e3,25],keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0}},manipulation:{enabled:!1,initiallyActive:!1,locale:["en","nl"],functionality:{addNode:!0,addEdge:!0,editNode:!0,editEdge:!0,deleteNode:!0,deleteEdge:!0}},physics:{barnesHut:{gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,5,.005],damping:[.09,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,5,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,5,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","repulsion","hierarchicalRepulsion"],timestep:[.5,0,1,.05]},selection:{select:!0,selectConnectedEdges:!0},rendering:{hideEdgesOnDrag:!1,hideNodesOnDrag:!1}},this.actualOptions={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},selection:{},rendering:{},configure:!1,configureContainer:void 0},this.domElements=[],this.colorPicker=new a["default"](this.network.canvas.pixelRatio),this.wrapper}return s(t,[{key:"setOptions",value:function(t){if(void 0!==t&&h.extend(this.actualOptions,t),this._clean(),void 0!==this.actualOptions.configure&&this.actualOptions.configure!==!1){h.deepExtend(this.actualOptions.nodes,this.network.nodesHandler.options,!0),h.deepExtend(this.actualOptions.edges,this.network.edgesHandler.options,!0),h.deepExtend(this.actualOptions.layout,this.network.layoutEngine.options,!0),h.deepExtend(this.actualOptions.interaction,this.network.interactionHandler.options,!0),h.deepExtend(this.actualOptions.manipulation,this.network.manipulation.options,!0),h.deepExtend(this.actualOptions.physics,this.network.physics.options,!0),h.deepExtend(this.actualOptions.selection,this.network.selectionHandler.selection,!0),h.deepExtend(this.actualOptions.rendering,this.network.renderer.selection,!0),this.container=this.network.body.container;var e=!0;"string"==typeof this.actualOptions.configure?e=this.actualOptions.configure:this.actualOptions.configure instanceof Array?e=this.actualOptions.configure.join():"object"==typeof this.actualOptions.configure?(void 0!==this.actualOptions.configure.container&&(this.container=this.actualOptions.configure.container),void 0!==this.actualOptions.configure.filter&&(e=this.actualOptions.configure.filter)):"boolean"==typeof this.actualOptions.configure&&(e=this.actualOptions.configure),e!==!1&&this._create(e)}}},{key:"_create",value:function(t){var e=this;this._clean(),this.changedOptions=[];var i=0;for(var o in this.possibleOptions)if(this.possibleOptions.hasOwnProperty(o)){if(t===!0||-1!==t.indexOf(o)){var n=this.possibleOptions[o];i>0&&this._makeItem([]),this._makeHeader(o);var s=[o];this._handleObject(n,s)}i++}var r=document.createElement("div");r.className="vis-network-configuration button",r.innerHTML="generate options",r.onclick=function(){e._printOptions()},r.onmouseover=function(){r.className="vis-network-configuration button hover"},r.onmouseout=function(){r.className="vis-network-configuration button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-network-configuration vis-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(r),this._push(),this.colorPicker.insertTo(this.container)}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-network-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t])}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.
  36. return this.format(this.localeData().calendar(n,this,Ot(e)))}function te(){return new p(this)}function ee(t,e){var i;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=f(t)?t:Ot(t),+this>+t):(i=f(t)?+t:+Ot(t),i<+this.clone().startOf(e))}function ie(t,e){var i;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=f(t)?t:Ot(t),+t>+this):(i=f(t)?+t:+Ot(t),+this.clone().endOf(e)<i)}function oe(t,e,i){return this.isAfter(t,i)&&this.isBefore(e,i)}function ne(t,e){var i;return e=D(e||"millisecond"),"millisecond"===e?(t=f(t)?t:Ot(t),+this===+t):(i=+Ot(t),+this.clone().startOf(e)<=i&&i<=+this.clone().endOf(e))}function se(t){return 0>t?Math.ceil(t):Math.floor(t)}function re(t,e,i){var o,n,s=At(t,this),r=6e4*(s.utcOffset()-this.utcOffset());return e=D(e),"year"===e||"month"===e||"quarter"===e?(n=ae(this,s),"quarter"===e?n/=3:"year"===e&&(n/=12)):(o=this-s,n="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-r)/864e5:"week"===e?(o-r)/6048e5:o),i?n:se(n)}function ae(t,e){var i,o,n=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(n,"months");return 0>e-s?(i=t.clone().add(n-1,"months"),o=(e-s)/(s-i)):(i=t.clone().add(n+1,"months"),o=(e-s)/(i-s)),-(n+o)}function he(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function de(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():z(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):z(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function le(t){var i=z(this,t||e.defaultFormat);return this.localeData().postformat(i)}function ue(t,e){return qt({to:this,from:t}).locale(this.locale()).humanize(!e)}function ce(t){return this.from(Ot(),t)}function pe(t){var e;return void 0===t?this._locale._abbr:(e=k(t),null!=e&&(this._locale=e),this)}function fe(){return this._locale}function me(t){switch(t=D(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function ve(t){return t=D(t),void 0===t||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")}function ge(){return+this._d-6e4*(this._offset||0)}function ye(){return Math.floor(+this/1e3)}function be(){return this._offset?new Date(+this):this._d}function we(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function _e(){return l(this)}function xe(){return h({},this._pf)}function ke(){return this._pf.overflow}function Me(t,e){I(0,[t,t.length],0,e)}function De(t,e,i){return at(Ot([t,11,31+e-i]),e,i).week}function Oe(t){var e=at(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")}function Te(t){var e=at(this,1,4).year;return null==t?e:this.add(t-e,"y")}function Ce(){return De(this.year(),1,4)}function Ee(){var t=this.localeData()._week;return De(this.year(),t.dow,t.doy)}function Se(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Pe(t,e){if("string"==typeof t)if(isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function Ie(t){return this._weekdays[t.day()]}function Ne(t){return this._weekdaysShort[t.day()]}function Ae(t){return this._weekdaysMin[t.day()]}function ze(t){var e,i,o;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(i=Ot([2e3,1]).day(e),o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[e]=new RegExp(o.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Re(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Pe(t,this.localeData()),this.add(t-e,"d")):e}function Le(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Fe(t){return
  37. var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,o=e&(de|le),n=this.attrTest(t);return o&&(i&Pt||!n)?e|pe:o||n?i&St?e|ue:e&de?e|le:de:fe}}),p(it,et,{defaults:{event:"pan",threshold:10,pointers:1,direction:Bt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Lt&&e.push(ae),t&Ft&&e.push(re),e},directionTest:function(t){var e=this.options,i=!0,o=t.distance,n=t.direction,s=t.deltaX,r=t.deltaY;return n&e.direction||(e.direction&Lt?(n=0===s?It:0>s?Nt:At,i=s!=this.pX,o=Math.abs(t.deltaX)):(n=0===r?It:0>r?zt:Rt,i=r!=this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},attrTest:function(t){return et.prototype.attrTest.call(this,t)&&(this.state&de||!(this.state&de)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=$(t.direction);e&&this.manager.emit(this.options.event+e,t),this._super.emit.call(this,t)}}),p(ot,et,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&de)},emit:function(t){if(this._super.emit.call(this,t),1!==t.scale){var e=t.scale<1?"in":"out";this.manager.emit(this.options.event+e,t)}}}),p(nt,Q,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distance<e.threshold,n=t.deltaTime>e.time;if(this._input=t,!o||!i||t.eventType&(St|Pt)&&!n)this.reset();else if(t.eventType&Ct)this.reset(),this._timer=h(function(){this.state=ce,this.tryEmit()},e.time,this);else if(t.eventType&St)return ce;return fe},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ce&&(t&&t.eventType&St?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=gt(),this.manager.emit(this.options.event,this._input)))}}),p(st,et,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&de)}}),p(rt,et,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Lt|Ft,pointers:1},getTouchAction:function(){return it.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Lt|Ft)?e=t.velocity:i&Lt?e=t.velocityX:i&Ft&&(e=t.velocityY),this._super.attrTest.call(this,t)&&i&t.direction&&t.distance>this.options.threshold&&vt(e)>this.options.velocity&&t.eventType&St},emit:function(t){var e=$(t.direction);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),p(at,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ne]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distance<e.threshold,n=t.deltaTime<e.time;if(this.reset(),t.eventType&Ct&&0===this.count)return this.failTimeout();if(o&&n&&i){if(t.eventType!=St)return this.failTimeout();var s=this.pTime?t.timeStamp-this.pTime<e.interval:!0,r=!this.pCenter||F(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,r&&s?this.count+=1:this.count=1,this._input=t;var a=this.count%e.taps;if(0===a)return this.hasRequireFailures()?(this._timer=h(function(){this.state=ce,this.tryEmit()},e.interval,this),de):ce}return fe},failTimeout:function(){return this._timer=h(function(){this.state=fe},this.options.interval,this),fe},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ce&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ht.VERSION="2.0.4",ht.defaults={domEvents:!1,touchAction:ie,enable:!0,inputTarget:null,inputClass:null,preset:[[st,{enable:!1}],[ot,{enable:!1},["rotate"]],[rt,{direction:Lt}],[it,{direction:Lt},["swipe"]],[at],[at,{event:"doubletap",taps:2},["tap"]],[nt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",
  38. o(this,t),this.body=e,this.physicsBody=i,this.setOptions(n)}return n(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,i=this.physicsBody.physicsEdgeIndices,o=this.body.edges,n=0;n<i.length;n++)if(e=o[i[n]],e.connected===!0&&e.toId!==e.fromId&&void 0!==this.body.nodes[e.toId]&&void 0!==this.body.nodes[e.fromId])if(void 0!==e.edgeType.via){t=void 0===e.options.length?this.options.springLength:e.options.length;var s=e.to,r=e.edgeType.via,a=e.from;this._calculateSpringForce(s,r,.5*t),this._calculateSpringForce(r,a,.5*t)}else t=void 0===e.options.length?1.5*this.options.springLength:e.options.length,this._calculateSpringForce(e.from,e.to,t)}},{key:"_calculateSpringForce",value:function(t,e,i){var o,n,s,r,a,h;o=t.x-e.x,n=t.y-e.y,h=Math.sqrt(o*o+n*n),h=0===h?.01:h,a=this.options.springConstant*(i-h)/h,s=o*a,r=n*a,void 0!==this.physicsBody.forces[t.id]&&(this.physicsBody.forces[t.id].x+=s,this.physicsBody.forces[t.id].y+=r),void 0!==this.physicsBody.forces[e.id]&&(this.physicsBody.forces[e.id].x-=s,this.physicsBody.forces[e.id].y-=r)}}]),t}();e["default"]=s,t.exports=e["default"]},function(t,e,i){var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}();Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(e,i,n){o(this,t),this.body=e,this.physicsBody=i,this.setOptions(n)}return n(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t,e,i,o,n,s,r,a,h=this.body.edges,d=.5,l=this.physicsBody.physicsEdgeIndices,u=this.physicsBody.physicsNodeIndices,c=this.physicsBody.forces,p=0;p<u.length;p++){var f=u[p];c[f].springFx=0,c[f].springFy=0}for(var p=0;p<l.length;p++)e=h[l[p]],e.connected===!0&&(t=void 0===e.options.length?this.options.springLength:e.options.length,i=e.from.x-e.to.x,o=e.from.y-e.to.y,a=Math.sqrt(i*i+o*o),a=0===a?.01:a,r=this.options.springConstant*(t-a)/a,n=i*r,s=o*r,e.to.level!=e.from.level?(c[e.toId].springFx-=n,c[e.toId].springFy-=s,c[e.fromId].springFx+=n,c[e.fromId].springFy+=s):(c[e.toId].x-=d*n,c[e.toId].y-=d*s,c[e.fromId].x+=d*n,c[e.fromId].y+=d*s));for(var m,v,r=1,p=0;p<u.length;p++){var f=u[p];m=Math.min(r,Math.max(-r,c[f].springFx)),v=Math.min(r,Math.max(-r,c[f].springFy)),c[f].x+=m,c[f].y+=v}for(var g=0,y=0,p=0;p<u.length;p++){var f=u[p];g+=c[f].x,y+=c[f].y}for(var b=g/u.length,w=y/u.length,p=0;p<u.length;p++){var f=u[p];c[f].x-=b,c[f].y-=w}}}]),t}();e["default"]=s,t.exports=e["default"]},function(t,e,i){var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}();Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(e,i,n){o(this,t),this.body=e,this.physicsBody=i,this.setOptions(n)}return n(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){var t,e,i,o,n,s=this.body.nodes,r=this.physicsBody.physicsNodeIndices,a=this.physicsBody.forces,h=this.options.centralGravity,d=0;for(n=0;n<r.length;n++){var l=r[n];o=s[l],t=-o.x,e=-o.y,i=Math.sqrt(t*t+e*e),d=0===i?0:h/i,a[l].x=t*d,a[l].y=e*d}}}]),t}();e["default"]=s,t.exports=e["default"]},function(t,e,i){var o=function(t){return t&&t.__esModule?t:{"default":t}},n=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function l(t,e,i){var o=Object.getOwnPropertyDescriptor(t,e);if(void 0===o){var n=Object.getPrototypeOf(t);return null===n?void 0:l(n,e,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)},r=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Sup
  39. this.enableShadow(t),t.fill(),this.disableShadow(t),t.stroke(),this.boundingBox.top=this.top,this.boundingBox.left=this.left,this.boundingBox.right=this.left+this.width,this.boundingBox.bottom=this.top+this.height,this.labelModule.draw(t,e,i,o)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.width/2,o=this.height/2,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){var o=function(t){return t&&t.__esModule?t:{"default":t}},n=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),r=function u(t,e,i){var o=Object.getOwnPropertyDescriptor(t,e);if(void 0===o){var n=Object.getPrototypeOf(t);return null===n?void 0:u(n,e,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)},a=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)};Object.defineProperty(e,"__esModule",{value:!0});var h=i(104),d=o(h),l=function(t){function e(t,i,o){n(this,e),r(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,i,o)}return a(e,t),s(e,[{key:"resize",value:function(t,e){if(void 0===this.width){var i=5,o=this.labelModule.getTextSize(t,e),n=Math.max(o.width,o.height)+2*i;this.options.size=n/2,this.width=n,this.height=n}}},{key:"draw",value:function(t,e,i,o,n){this.resize(t,o),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,o,n,this.options.size),this.boundingBox.top=i-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=i+this.options.size,this.labelModule.draw(t,e,i,o)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.width/2,o=this.height/2,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){var o=function(t){return t&&t.__esModule?t:{"default":t}},n=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),r=function u(t,e,i){var o=Object.getOwnPropertyDescriptor(t,e);if(void 0===o){var n=Object.getPrototypeOf(t);return null===n?void 0:u(n,e,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)},a=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)};Object.defineProperty(e,"__esModule",{value:!0});var h=i(104),d=o(h),l=function(t){function e(t,i,o,s){n(this,e),r(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,i,o),this.imageObj=s,this._swapToImageResizeWhenImageLoaded=!0}return a(e,t),s(e,[{key:"resize",value:function(){if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){if(!this.width){var t=2*this.options.size;this.width=t,this.height=t,this._swapToImageResizeWhenImageLoaded=!0}}else this._swapToImageResizeWhenImageLoaded&&(this.width=void 0,this.height=void 0,this._swapToImageResizeWhenImageLoaded=!1),this._resizeImage()}},{key:"draw",value:function(t,e,i,o,n){this.resize(),this.left=e-this.width/2,this.top=i-this.height/2;var s=Math.min(.5*this.height,.5*this.width);this._drawRawCircle(t,e,i,o,n,s),t.save(),t.circle(e,i,s),t.stroke(),t.cli
  40. },s=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),r=function u(t,e,i){var o=Object.getOwnPropertyDescriptor(t,e);if(void 0===o){var n=Object.getPrototypeOf(t);return null===n?void 0:u(n,e,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)},a=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)};Object.defineProperty(e,"__esModule",{value:!0});var h=i(107),d=o(h),l=function(t){function e(t,i,o){n(this,e),r(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,i,o)}return a(e,t),s(e,[{key:"cleanup",value:function(){return!1}},{key:"_line",value:function(t){return t.beginPath(),t.moveTo(this.from.x,this.from.y),t.lineTo(this.to.x,this.to.y),this.enableShadow(t),t.stroke(),void this.disableShadow(t)}},{key:"getPoint",value:function(t){return{x:(1-t)*this.from.x+t*this.to.x,y:(1-t)*this.from.y+t*this.to.y}}},{key:"_findBorderPosition",value:function(t,e){var i=this.to,o=this.from;t.id===this.from.id&&(i=this.from,o=this.to);var n=Math.atan2(i.y-o.y,i.x-o.x),s=i.x-o.x,r=i.y-o.y,a=Math.sqrt(s*s+r*r),h=t.distanceToBorder(e,n),d=(a-h)/a,l={};return l.x=(1-d)*o.x+d*i.x,l.y=(1-d)*o.y+d*i.y,l}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){return this._getDistanceToLine(t,e,i,o,n,s)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}();Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(e,i,n){o(this,t),this.body=i,this.labelModule=n,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return n(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"_distanceToBorder",value:function(t){var e=1;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+e}},{key:"enableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor="rgba(0,0,0,0.5)",t.shadowBlur=this.options.shadow.size,t.shadowOffsetX=this.options.shadow.x,t.shadowOffsetY=this.options.shadow.y)}},{key:"disableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}]),t}();e["default"]=s,t.exports=e["default"]},function(t,e,i){var o=function(t){return t&&t.__esModule?t:{"default":t}},n=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),r=function u(t,e,i){var o=Object.getOwnPropertyDescriptor(t,e);if(void 0===o){var n=Object.getPrototypeOf(t);return null===n?void 0:u(n,e,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)},a=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)};Object.defineProperty(e,"__esModule",{value:!0});var h=i(103),d=o(h),l=function(t){function e(t,i,o){n(this,e),r(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,i,o)}return a(e,t),s(e,[{key:"_resizeImage",value:function(){if(!thi
  41. //# sourceMappingURL=vis.map